Skip to main content
Visitor II
January 24, 2026
Question

How to define STM32N6 variables in external RAM

  • January 24, 2026
  • 1 reply
  • 157 views

I am using the debugging mode in STM32CubeIDE, and the compilation result shows that there is insufficient RAM.

27_Touch_Appli.elf section `.bss' will not fit in region `RAM'

region `RAM' overflowed by 94904 bytes

 

1 reply

Associate II
January 24, 2026

Assume you have a variable declared like:

some_type myvariable;

then you can force the linker to place it in a spefic section like this:

some_type myvariable __attribute__ ((section (".anothersection")));

 The name of the section must correspond with the desired section in the ld file.