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.

  • The last page in the flash images I've uploaded are same, the first 88K (bootloader) is same as well. But the flash image with DFU updated application works while the other does not.

    It does not make sense.

    Edit: Both have the same application 11728 bytes at offset 0x16000

Reply Children
No Data
Related