2009-06-07 06:35 PM
Creating section in FLASH for datastorrage
2011-05-17 03:46 AM
Hi
I am using the Keil compiler. I want to store data in FLASH (EEPROM-Emulation). Writing and reading works fine. I use #define to define the beginning of the flashregion where my data is stored. Now I wanted to create a section in the scatterfile so that the compiler doesnt map any code or something into the region where my data is stored. If I only define a region with no data in it, it is removed by the linker. If I place a Variable in it like __attribute__(''VarSection'') const volatile char dummy[1024]; This section is initialized to 0 when I program the device and the stored data is cleared. Even if I decline the section as UNINIT in the scatterfile the data is initialized. How can I define a section in the scatterfile which is not initialized by the programmer?2011-05-17 03:46 AM
Ok I find a solution by myself
The variable has to be defined as zero_init like __attribute__((''VarSection''), zero_init) const volatile char dummy[1024]; I thought ''zero_init'' means the opposite....2011-05-17 03:46 AM
Hi,
I can use your solution - if you wish to share with the community, Thx2011-05-17 03:46 AM
Hi,
I can use your solution - if you wish to share with the community, Thx2011-05-17 03:46 AM
Quote:
if you wish to share with the community
He just did share it with ''the community'' by posting here! Thanks, dschneeweis, for doing that - I was wondering how this might be achieved with Keil...! :D