Jump to content

Energia - Assembler warning

Recommended Posts

I'm using a FR5969 board (Rev 2) with Energia version 14 on a Mac running OS X 10.10.1. My sketch uses a 32767 byte block of the device's 'ROM' for storage and in total the memory used is given as 46667 bytes of 65536.

So the initial part of my code includes:


#define PERSIST __attribute__((section(".text")))

 and later...
uint8_t TTFX[32767] PERSIST

The program seems to run correctly except that I'm concerned about a warning:


'Assembler messages: C:\Documen~1\TBA\LOCAL~1\Temp\\ccAA9W6Q.s:1758:Warning: ignoring changed section attributes for .text



(Actually, it produces the same error on Windows XP.)


What I'd like to know is what is this error and if it's safe to ignore (must be incredibly doubtful).





Link to post
Share on other sites

It's safe to ignore.


The linker script for the compiler has "permission attributes" for the different sections or more specifically the memory segments where they go.  The default permissions for the ROM segment, where .text lives, is RX - Readable, Executable, but not Writable.  In practice this isn't enforced or enforceable in any way besides the fact that it helps the compiler catch goofy mistakes like trying to put something writable in ROM ...


... except "ROM" on the FRAM chips isn't ROM, but FRAM, which IS writable.  However the conventional name "ROM" is used in the msp430fr5969 linker script anyhow to allow the template section linker script to be used (I think that's how it works) without modification, so you end up with this benign warning since you are declaring an array that can be written to.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...