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

memory mappings for nrf51 sdk examples

I have the "old style" nRF6310 board + nrf51422 boards. I want to test different examples from the latest sdk, and possibly with different softdevices as well. I appreciate that for every softdevice I have to change the memory settings in "Options for target" in Keil, however I find it hard to find a comprehensive collection of the different values for the different Softdevices, and for the different flash memory sizes as well. Everytime I want to adapt an example for my board it's a pain. Where can I find such information? Thanks!

Parents
  • Ok, I have finally found it by myself, maybe it can be useful for someone else (pls correct me if I am wrong): the memory mapping information is in the sxxx_SoftDevice_specification_vx.pdf, in the chapter 10. There is a chart like this: image description

    When you modify the target CPU of the example project in Keil, the parameters of the memory are overwritten, and you need to adapt them again to accomodate the softdevice.

    So, for instance, let's suppose you want to use nrf51422_xxac with S110: In Options for Target you now have this: image description

    What you have to do is change the values as follows:

    Replace IROM1 Start with CODE_R1_BASE (you can find it in the following page of the pdf)

    Replace IROM1 Size with: current value - CODE_R1_BASE (Example, CODE_R1_BASE is 0x16000-> Start = 0x16000, Size = 0x40000-0x16000 = 0x2A000)

    Replace IRAM1 with RAM_R1_BASE;

    Replace Size with: currentsize - (RAM_R1_BASE - current start) (Example, RAM_R1_BASE is 0x20002000-> Start = 0x20002000, Size = 0x4000 - (0x20002000-0x2000000) = 0x2000

Reply
  • Ok, I have finally found it by myself, maybe it can be useful for someone else (pls correct me if I am wrong): the memory mapping information is in the sxxx_SoftDevice_specification_vx.pdf, in the chapter 10. There is a chart like this: image description

    When you modify the target CPU of the example project in Keil, the parameters of the memory are overwritten, and you need to adapt them again to accomodate the softdevice.

    So, for instance, let's suppose you want to use nrf51422_xxac with S110: In Options for Target you now have this: image description

    What you have to do is change the values as follows:

    Replace IROM1 Start with CODE_R1_BASE (you can find it in the following page of the pdf)

    Replace IROM1 Size with: current value - CODE_R1_BASE (Example, CODE_R1_BASE is 0x16000-> Start = 0x16000, Size = 0x40000-0x16000 = 0x2A000)

    Replace IRAM1 with RAM_R1_BASE;

    Replace Size with: currentsize - (RAM_R1_BASE - current start) (Example, RAM_R1_BASE is 0x20002000-> Start = 0x20002000, Size = 0x4000 - (0x20002000-0x2000000) = 0x2000

Children
No Data
Related