AnsweredAssumed Answered

Store data in Flash at specific address

Question asked by Schmidt.Daniel.002 on Jan 31, 2017
Latest reply on Feb 1, 2017 by Schmidt.Daniel.002

I'm working with STVD and COSMIC compiler and I'm just trying to store data in flash at a specific location. What I've done up to now:

- Defining a new segement and section in STVD for the linker, specificed location for test issues should be 0xfff0 - 0xffff

-> My linker file has now an additional segment and section:

   # Segment test:
   +seg .testsection -b 0xfff0 -m 0x10 -n .testsection

 

Now I'm trying to add a constant value to this section, in this way (as COSMIC recommends):

#pragma section const {testsection}
const unsigned char variable = 0xAA;
const unsigned char variable2 = 0xBB;
#pragma section const {}

 

If I compile this everything works...but when I watch the end of the .s19 file (address 0xfff0 - 0xffff) everything is empty, where are my variables stored?

 

Does anyone has a hint?

Outcomes