Hi,

I'm currently trying to write variables (and not constants) in my own section of flash with mspgcc (not IAR) that I created in a linker script. The section is created. I can create constants with __logdata__ __attribute__((section(".logdata"))). I got rid of the const specifier and initialized the data. The data is indeed written in the right address range of memory when initialized, but when I try to change the array in the code, it doesn't change the initialization data. Is it only possible to create constants with this method? If not, how can you create variables that are modified by the program? I tried the pragma call such as:

#pragma memory=constseg("logdata");  //or #pragma memory=constseg("logdata")
Word2_t RssiData[10] ={0,0,0,0,0,0,0,0,0,0};
#pragma memory = default

but the compiler gives a message that it ignored the pragma ("ignoring #pragma memory"). What is wrong? Can I create a variable with such a call in mspgcc?

I'm thinking of creating my own function that uses low-level assembly that would write into flash. However, I would like to avoid doing that.

Best regards,

Yvan

_________________________________________________________________
Take advantage of powerful junk e-mail filters built on patented Microsoft® SmartScreen Technology. http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*.


Reply via email to