Tips and tricks for saving RAM
Posted: Sat Jan 30, 2021 4:03 pm
Hi all
For a new project I am using a mcu (stm32f031) with a small amount of ram (4 KB).
Used to mcu with> = 32KB of ram, in my projects I create many local variables that are destroyed after the macro is terminated.To make the same macros work I had to transform local variables into global variables.
Are there some compiler settings to allow you to optimize the use of the ram, perhaps at the expense of general performance?
For a new project I am using a mcu (stm32f031) with a small amount of ram (4 KB).
Used to mcu with> = 32KB of ram, in my projects I create many local variables that are destroyed after the macro is terminated.To make the same macros work I had to transform local variables into global variables.
Are there some compiler settings to allow you to optimize the use of the ram, perhaps at the expense of general performance?