This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Bug report: 12.2.0 SDK many armgcc Makefiles have bad 'erase' commands.

I would like to register a bug report with the nRF5 SDK version 12.2.0. If you look at the example code in the SDK you will find that every example has a different build configuration for the different development boards that Nordic Semiconductor make. For example, here is the 'blinky' example directory contents:

blinky.eww
hex
license.txt
main.c
pca10028
pca10031
pca10040
pca10056

For this example, I want to focus specifically on the 'pca10028' directory. If you look at the Makefile for the s130 soft device you see this:

tail pca10028/s130/armgcc/Makefile 
	nrfjprog --reset -f nrf51

# Flash softdevice
flash_softdevice:
	@echo Flashing: s130_nrf51_2.0.1_softdevice.hex
	nrfjprog --program $(SDK_ROOT)/components/softdevice/s130/hex/s130_nrf51_2.0.1_softdevice.hex -f nrf51 --sectorerase 
	nrfjprog --reset -f nrf51

erase:
	nrfjprog --eraseall -f nrf52

The problem is with the erase statement. It is attempting to erase an nrf52 device when clearly the pca10028 is a nrf51 device; as evidenced by the working command above.

I think that the erase command is incorrect for many of the examples and it would be good to fix that up accross the SDK. It is probably worth checking that this command is correct for all examples for all boards. Cheers.

Related