This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Need to change BOOTLOADER_SETTINGS_ADDRESS when changing BOOTLOADER_REGION_START

Hello

I have some trouble with my DFU bootloader, because I changed the BOOTLOADER_REGION_START. This is, because I need some more space for bootloader.

Do I have to also change the BOOTLOADER_SETTINGS_ADDRESS?

So this are my current addresses:

#define BOOTLOADER_REGION_START         0x0003AC00
#define BOOTLOADER_SETTINGS_ADDRESS     0x0003E800

But, if I try to compile this, I get a linker error that the linker is unable to place the settings automatically with the required base address. I used the same offset between REGION_START and SETTINGS_ADDRESS as in the Nordic example (0x3C00). How can I get a working new SETTINGS_ADDRESS. Or do I even have to change the SETTINGS_ADDRESS?

Regards, BTprogrammer

Parents
  • Did you made the corresponding changes in the Toolchain(KEIL, GCC) too ? If you are using KEIL MDK5, then you need to update IROM1 (option for target -> target). You can keep the IRAM1 as it is.

Reply
  • Did you made the corresponding changes in the Toolchain(KEIL, GCC) too ? If you are using KEIL MDK5, then you need to update IROM1 (option for target -> target). You can keep the IRAM1 as it is.

Children
  • Hi, Yes, I changed the corresponding parameters in the project settings: IROM1 START: 0x3AC00 IROM1 SIZE: 0x7C00

  • With START address (0x3AC00) and SIZE (0x7C00), you are crossing the on chip 256 kB flash memory (I'm assuming that you are using 256kB version of NRF51822). You need to either reduce the bootloader size (IROM1: SIZE) or lower the bootloader start address (IROM1: START).

  • Oh yes, stupid mistake. I need ~19,5k for the bootloader. So I changed the start address to 0x3B000 and the size to 0x5000. Accordingly I changed the settings address to 0x3EC00. But I still get the linker error (unable to place the settings...).

  • Do you have "Option for target -> Linker -> Use memory layout from target Dialog" box checked ? If not then mark it checked.

  • Yes, this one is checked. "Report might fails..." is also checked.