Skip to content

Commit b8f06ab

Browse files
committed
flash SD along with application with flash target
1 parent e05b70d commit b8f06ab

File tree

5 files changed

+11
-1
lines changed

5 files changed

+11
-1
lines changed

nRF51822/projects/Makefile.common

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ else
1616
GNU_VERSION := 4.8.3
1717
GNU_PREFIX := arm-none-eabi
1818
NRFJPROG = $(ROOT_PATH)tools/OSX/rknrfgo/nrfjprog
19-
@chmod 755 $(NRFJPROG)
2019
endif
2120

2221

@@ -170,7 +169,16 @@ clean:
170169
## Program device
171170
.PHONY: flash
172171
flash: $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).hex
172+
@echo ""
173+
ifeq ($(OS),Windows_NT)
174+
$(NRFJPROG) -e --programs $(SOFTDEVICE)
173175
$(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
174182

175183
.PHONY: reset
176184
reset:

nRF51822/projects/hrm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ C_SOURCE_FILES += nrf_delay.c
4444
# Make sure we're pointing to the right SDK version
4545
ROOT_PATH = ../../
4646
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
4748

4849
# Include the correct SoftDevice header files
4950
INCLUDEPATHS += -I"$(ROOT_PATH)lib/softdevice/s110_nrf51822_6.0.0/s110_nrf51822_6.0.0_API/include"

nRF51822/projects/uartservice/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ C_SOURCE_FILES += nrf_delay.c
5151
# Make sure we're pointing to the right SDK version
5252
ROOT_PATH = ../../
5353
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
5455

5556
# Include the correct SoftDevice header files
5657
INCLUDEPATHS += -I"$(ROOT_PATH)lib/softdevice/s110_nrf51822_6.0.0/s110_nrf51822_6.0.0_API/include"
-239 KB
Binary file not shown.
310 KB
Binary file not shown.

0 commit comments

Comments
 (0)