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

nRF9160: Assigning variables to RAM slots

Hi,

In one module of an application I would like to statically declare a large buffer in SRAM:  static uint8_t largeBuffer[65536];

The application fails to link with the following error:

/opt/toolchains/zephyr-sdk-0.11.1/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/9.2.0/../../../../arm-zephyr-eabi/bin/ld: region `SRAM' overflowed by 62972 bytes

For the nRF9160, is there a reference for how to assign variables to SRAM slots, allowing modules to manage their own encapsulated static data?

Thanks,

Paul

Parents
  • Hi Håkon,

    In the NRFX LIB documentation it says in the discussion of porting the BSD library that the application in the non-secure partition can use the upper 128 KB of SRAM, plus 2 areas of the lower 128KB (0x2000 0000 - 0x2000 FFFF (64 KB) and 8,160 bytes in the 7th block, above the BSD library). I assumed that SRAM blocks would be assignable by some means, either in a project configuration or declaratively in code.

    Could you please give some guidance on interpretation of the SRAM map?

    Thanks,

    Paul

Reply
  • Hi Håkon,

    In the NRFX LIB documentation it says in the discussion of porting the BSD library that the application in the non-secure partition can use the upper 128 KB of SRAM, plus 2 areas of the lower 128KB (0x2000 0000 - 0x2000 FFFF (64 KB) and 8,160 bytes in the 7th block, above the BSD library). I assumed that SRAM blocks would be assignable by some means, either in a project configuration or declaratively in code.

    Could you please give some guidance on interpretation of the SRAM map?

    Thanks,

    Paul

Children
Related