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

Problem with nrfjprog and corrupted images

Hi,

I use GCC for compilation and nrfjprog for flashing. A few weeks ago I needed to switch on compiler optimization (Level 1) because my code grew a little too big. Now I've often experienced corrupt images after flashing only the application. nRFgo Studio tells me that the SoftDevice is still intact, but my application crashes and behaves weird until I do a full chip erase. A readback of the application.hex from a corrupt state gave me a 900kb file instead of the 200kb from an intact application.

I use this command for flashing the application: nrfjprog -s 12345 --program hexfile.hex --sectorerase --family NRF51 && nrfjprog -s 12345 --reset

When I do a chiperase, flash the softdevice and then the application, everything works as expected.

Any ideas? Marius

Related