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,

     

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

    The non-secure region has 128 kB flash available to the application. Based on the output from the linker, you are overflowing the region with ~62kB: 

    /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

    Placing it in another region will not help here, as you're using up all the RAM.

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

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

    The non-secure region has 128 kB flash available to the application. Based on the output from the linker, you are overflowing the region with ~62kB: 

    /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

    Placing it in another region will not help here, as you're using up all the RAM.

     

    Kind regards,

    Håkon

Children
No Data
Related