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

S130 linker memory allocation

Hello!

The linker file for S130 v2 on nrf51822_xxaa states the following:

MEMORY
   {
     FLASH (rx) : ORIGIN = 0x1b000, LENGTH = 0x25000
     RAM (rwx) :  ORIGIN = 0x20000000, LENGTH = 0x4000
   }

And the release notes the following:

The combined MBR and SoftDevice memory requirements for this version are as follows:

  • Flash: 108 kB ( 0x1B000 bytes).
  • RAM: 4.9 kB ( 0x13C8 bytes) (minimum required memory - actual requirements are dependent upon the configuration chosen at sd_ble_enable() time).

So should the linker file be modified to what is bellow?

MEMORY
   {
     FLASH (rx) : ORIGIN = 0x1b000, LENGTH = 0x25000
     RAM (rwx) :  ORIGIN = 0x200013c8, LENGTH = 0x2c38
   }
Parents
  • It should be modified for your actual RAM requirements, which will at a minimum be 0x200013c8 but will most likely be higher than that. Since that chip has pretty scarce RAM, turn all the configuration parameters down to the minimum you require for the app, set the RAM base quite high, then use the call into the softdevice to work out how much RAM it really needs, and re-set it to that value in the project.

    My current S130 project uses a RAM base of 0x20001fe8 and that one has a pretty small set of resources.

Reply
  • It should be modified for your actual RAM requirements, which will at a minimum be 0x200013c8 but will most likely be higher than that. Since that chip has pretty scarce RAM, turn all the configuration parameters down to the minimum you require for the app, set the RAM base quite high, then use the call into the softdevice to work out how much RAM it really needs, and re-set it to that value in the project.

    My current S130 project uses a RAM base of 0x20001fe8 and that one has a pretty small set of resources.

Children
Related