File tree Expand file tree Collapse file tree 5 files changed +11
-1
lines changed Expand file tree Collapse file tree 5 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 16
16
GNU_VERSION := 4.8.3
17
17
GNU_PREFIX := arm-none-eabi
18
18
NRFJPROG = $(ROOT_PATH)tools/OSX/rknrfgo/nrfjprog
19
- @chmod 755 $(NRFJPROG)
20
19
endif
21
20
22
21
@@ -170,7 +169,16 @@ clean:
170
169
## Program device
171
170
.PHONY: flash
172
171
flash: $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).hex
172
+ @echo ""
173
+ ifeq ($(OS),Windows_NT)
174
+ $(NRFJPROG) -e --programs $(SOFTDEVICE)
173
175
$(NRFJPROG) --reset --program $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).hex
176
+ else
177
+ @echo "Writing SoftDevice and User Code to Flash Memory"
178
+ @chmod 755 $(NRFJPROG)
179
+ $(NRFJPROG) wipe
180
+ $(NRFJPROG) program -S s110 -s $(SOFTDEVICE) -c $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).hex
181
+ endif
174
182
175
183
.PHONY: reset
176
184
reset:
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ C_SOURCE_FILES += nrf_delay.c
44
44
# Make sure we're pointing to the right SDK version
45
45
ROOT_PATH = ../../
46
46
SDK_PATH = $(ROOT_PATH ) lib/sdk/nRF51_SDK_v5.2.0.39364/Nordic/nrf51822/
47
+ SOFTDEVICE = $(ROOT_PATH ) lib/softdevice/s110_nrf51822_6.0.0/s110_nrf51822_6.0.0_softdevice.hex
47
48
48
49
# Include the correct SoftDevice header files
49
50
INCLUDEPATHS += -I"$(ROOT_PATH ) lib/softdevice/s110_nrf51822_6.0.0/s110_nrf51822_6.0.0_API/include"
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ C_SOURCE_FILES += nrf_delay.c
51
51
# Make sure we're pointing to the right SDK version
52
52
ROOT_PATH = ../../
53
53
SDK_PATH = $(ROOT_PATH ) lib/sdk/nRF51_SDK_v5.2.0.39364/Nordic/nrf51822/
54
+ SOFTDEVICE = $(ROOT_PATH ) lib/softdevice/s110_nrf51822_6.0.0/s110_nrf51822_6.0.0_softdevice.hex
54
55
55
56
# Include the correct SoftDevice header files
56
57
INCLUDEPATHS += -I"$(ROOT_PATH ) lib/softdevice/s110_nrf51822_6.0.0/s110_nrf51822_6.0.0_API/include"
You can’t perform that action at this time.
0 commit comments