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

How to program application along with s110 softdevice ?

Hi,

I'm writing a sample application that uses the s110 softdevice (7.1.0) on Adafruit blefriend. I can program the softdevice using Segger J-Link and upload the application hex over DFU and it works.

However if I program the application directly (linked at 0x16000), then the bootloader does not seem to jump to the application (debugging it looks like it's going into a while(1) loop)

I have setup the bootloader settings section at 0x3fc00 as instructed in other suggestions found here, but that does not help.

Is there something obviously wrong with what I'm doing ?

Thanks

Note: I've attached the flash dumps to see if you can spot anything.

flash-dfu.bin flash-jlink.bin

Parents
  • Once you do your first upgrade via DFU, it stashes a CRC of the application in flash. When you reprogram via the J-Link or other programmer the CRC of what you programmed will not match what the DFU has stored in flash. The bootloader will calculate the CRC of the application in memory and compare it to the stored value. If they do not match it considers the application corrupt and will not jump into the application.

    The quick and dirty fix I do when this occurs is to reprogram the DFU with the programmer which also erases the stored CRC in flash.

Reply
  • Once you do your first upgrade via DFU, it stashes a CRC of the application in flash. When you reprogram via the J-Link or other programmer the CRC of what you programmed will not match what the DFU has stored in flash. The bootloader will calculate the CRC of the application in memory and compare it to the stored value. If they do not match it considers the application corrupt and will not jump into the application.

    The quick and dirty fix I do when this occurs is to reprogram the DFU with the programmer which also erases the stored CRC in flash.

Children
Related