Hello! I hope this the right place for this and if not I would be appreciative if you could point me in the right direction.
I am trying to understand more about how an application can be installed as well as the bootloader all at once through the Segger J-Link. I have been able to successfully program softdevice and the application with nrfjprog, but I understand that the Adafruit nrf52840 feather bootloader is needed to use the device with Arduino.
In my debugging process I figured one thing I could try would be to program the bootloader and the application through Arduino, then pull the entire HEX from the device using nrf connect and re-program it to see if it has the same behavior.
The problem I can't seem to figure out is that after I pull the HEX off the device, erase the chip, and then reprogram with that same hex, the application runs fine but I can no longer program the chip through the bootloader (with Arduino).
In my research I have found that the bootloader validates the CRC16 (at a particular address) before launching the application, but wouldn't the CRC16 get copied over as well? I don't understand what is different between the image I am installing with the hex through nrf connect and the image that results from installing everything through arduino? Shouldn't they be the same??
Thank you in advance and apologies if this is in the wrong place. :)
Bootloader doesn't work after re-uploading HEX to device via J-Link
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- ryanmsparks
- Posts: 2
- Joined: Tue Jan 24, 2023 1:45 am
- ryanmsparks
- Posts: 2
- Joined: Tue Jan 24, 2023 1:45 am
Re: Bootloader doesn't work after re-uploading HEX to device via J-Link
For what it’s worth, I think I figured out a workaround. To run a the bootloader with a hex I uploaded with the J-link I had to bypass the firmware verification by writing 0x01 to 0x000FF000 (on the nRF52840) followed by a reset.
Code: Select all
nrfjprog --memwr 0x000FF000 --val 0x01
Code: Select all
nrfjprog -r
Please be positive and constructive with your questions and comments.