cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to set in the System Workbench for STM32 (Eclipse) a maximum size for my program?

Diego Ballen
Associate II
Posted on August 18, 2017 at 16:53

I would like to use the flash memory for store some data. For this reason I need to assure that some flash memory will be free.

##stm32-l0
3 REPLIES 3
Posted on August 18, 2017 at 17:00

Not using it, but GNU/GCC describes this in the linker script, so would imagine there's that, or dialogs or settings for the Target you can adjust.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
S.Ma
Principal
Posted on August 18, 2017 at 22:02

As Clive said, the linker of any toolchain has a text file describing the microcontroller various memory segments (RAM, CCRAM, Flash, etc...).

One way is to modify the file to reserve a specific segment for your data.

Other ways can be to add a bin file describing the 'reserved data default values' at link time with base address: If this option is available, it can be found in the linker compilation options or project linker settings.

Last way would be to create in a C file the default values and use a possible #pragma to put this const data (if flash) in a specific start address.

Diego Ballen
Associate II
Posted on August 21, 2017 at 12:45

Thank you very much for your answers!

I understand what here is proposed. Nevertheless I do not exactly how to perform such configuration or even where to find such a file.

Does anyone has experience making such configuration?