Hello.
I need to place my own bootloader at address 0. Is it possible to place SoftDevice at the end of the flash?
Hello.
I need to place my own bootloader at address 0. Is it possible to place SoftDevice at the end of the flash?
Hi,
No, that is not possible. The SoftDevice is only distributed ad a binary which is built to start from address 0 (or in fact address 0x1000, with the MBR which is part of the SoftDevice hex, at address 0).
One alternative could be to use the MBR and SoftDevice as is and have your bootloader at de end of the flash just like the nRF5 SDK bootloader. In this case, the MBR will run first, but not do much other than jumping to your bootloader, where you can do whatever you like.
thanks for the answer. I have one more.
Does the SoftDevice use any memory area in the range from MBR_SIZE to MBR_SIZE + SD_SIZE to store its settings (states)? in other words, is it possible to be sure that once calculated CRC for SoftDevices will never change?
thanks for the answer. I have one more.
Does the SoftDevice use any memory area in the range from MBR_SIZE to MBR_SIZE + SD_SIZE to store its settings (states)? in other words, is it possible to be sure that once calculated CRC for SoftDevices will never change?
Hi,
No, the SoftDevice does not store any settings in flash. The flash in the SoftDevie region will stay the same forever, so if you calculate a CRC for that region it will always be valid.
Vladimir have you managed to move softdevice to other location? I would like to have my custom bootloader on the location 0x0 and then pack softdevice + app as a single hex for my FOTA. So independent of the SDK/softdevice changes i can make FOTA. I would use external flash and my bootloader would have a driver for that flash and check if a new hex file exists in it. In my application i would have a modem and i would download a new hex file into the flash.
I also have some questions:
- how would application know where to look for the softdevice API?
- i would have to manually patch the softdevice to jump to my new application location?
- what else needs to be done for this to work?
Hi,
The SoftDevice hex files we distribute are not compiled as position-independent code. This means that absolute addresses are used, and therefore it is impossible to make it work if you move it to a different location.