Hi Chester, BIG thanks for your comprehensive cover of persistent using GCC and for attaching your project files. I confirm your findings using your project files. When I tried each of your test cases in my project, an error message was reported by the compiler: main.c:101:(.text+0x9c): relocation truncated to fit: R_MSP430X_ABS16 against symbol `count' defined in .persistent section in main.o in your test cases 2), 4) & 6). After a few modifications to my makefile I discovered that the error was generated when I built my project without the -mlarge option. This leads me to believe that the memory model MUST be large to use persistent variables. A large memory model then created casting warnings to be emitted from macros defined in the msp430fr5969 .h file (that comes with the compiler). Could you confirm that a large memory model MUST be used with persistent variables? And/or, do you know a way to use persistent with the small memory model? Thanks again, Peter
↧