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

Can application codes located in the unsed part of the flash area of the softdeivce

The size of flash of softdevice in the "s132_nrf51822_5.0.0_release-notes" is 0x23000 but atrually the size of the flash used by softdevice is 0x224A7, which I found when I open softdevice hex file . 

Can I locate a little part of the application codes between address 0x22500 and  0x23000 becuase my application is too large to be located all in Application Flash Region(between 0x23000 and  last valid address in the flash memory), if I need to enable the softdeive and make a ble application?Does it cause some problems?

Platform I used: nRF52810

SDK I used: SDK V14.1.0

softdevice version: S132

  • Hello,

    Unfortunately, you can not. The softdevice will always start the application running at 0x23000, and it is not possible to change this from the softdevice. 

    The reason it is done this way is that if you want to support DFU, it must be possible to update the application without removing the softdevice. This means that the application can't be using any of the same flash pages as the softdevice, which is why the area between 0x224A7 and 0x23000 is not used. If your application is too large, you can check that you have enabled optimization (for size). If that is not enough, I am afraid you must either use a different (smaller) softdevice, or a chip with a larger flash, such as the nRF52832 or nRF52833. 

    Best regards,

    Edvin

  • OK, thank you Edvin! Can I ask you more?

    Can I continue to do so If my application starts at 0x23000(that's it now) and I needn't use DFU service and everytime I update my firmware in the way that I reburn the hex file which merges the softdevice and application codes?

    I have a program that does this. It seems to be running normally, but I am worried about other problems that I don’t know about.

  • Not without changes in the softdevice, so I don't think you will be able to do this. Perhaps if your application contains any static flash data, you can place this in the softdevice area (directly after the softdevice), but it is not straight forward to make the adjustment so that your app starts at 0x225000. As I mentioned, the reason for this is that the softdevice will always start the application placed in 0x23000. We do not have a softdevice that starts the application at 0x22500, and even if we did those changes, it would require a lot of qualification work and costs just to change that address, so I don't find it very likely. 

    But if you have some data that you never need to change (a table of static data), then you can place this in the area right after the softdevice.

    BR,

    Edvin

  • Oh, I see, thank you very much for taking the time to help me resolve my problems.

    Only static flash data that is no longer changed can be placed after softdevice because it's not allowed to erase any page used by the softdevice and the area between 0x22500 and 0x23000 would not be wriiten by softdevice after system starting.

Related