Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: RE: MSP430FR5969: GCC v5.3.0.219 using persistent attribute

$
0
0
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

Viewing all articles
Browse latest Browse all 62309

Trending Articles