This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR2355: I broke my code and FRAM not writing

Part Number: MSP430FR2355


I have the following code....I was expecting to go to the memory browser at 0x1800 and see 1,2,3,4,etc...but instead see all F......Somehow I broke my code...What am I missing?  Wanna flash code with this being permanent

#include <msp430.h>

#pragma DATA_SECTION (permanent_Info,".info")
#pragma LOCATION(permanent_Info, 0x1800)

char permanent_Info[9] = {'1', '2', '3', '4', '0', '0', '0', '0', '0'};

int main(void)
{
    WDTCTL = WDTPW | WDTHOLD;   // stop watchdog timer
}

  • 1) There's no reference to permanent_Info, so the linker will discard it. Try adding:

    > char *volatile blahblah = permanent_Info;

    2) There appears to be an interaction (or maybe non-interaction) between DATA_SECTION and LOCATION. Observed behavior is that if you use LOCATION, startup initialization is used. But unless you disable DFWP (CCS General->FRWP) startup can't actually write there. Based on your earlier description, I suggest you remove the LOCATION specifier. It will end up at 0x1800 even without that.


  • Thank you Bruce!  This resolved my issue.....

    I found that not using "volatile" works and as long as I do an assignment I can also keep location in as well

    You have been a great help over the process of this hardware guy learning firmware!!!  Learning waaaayy more about the tools than I thought I would have to....I'm hoping to get back to debugging firmware at some point....I still have the outstanding issue of the "no verification" issue you've been helping with....

**Attention** This is a public forum