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.

MSP430F5328 #pragma DATA_SECTION Doesn't Work !



Hello,


Am trying to place a value in the information segment D ".infoD" using DATA_SECTION pragma CSSv6, using instructions in the following URL : and when looking at the .hex file i don't find any thing indicate that the placement procedure has been done , after playing with some option it worked and what i have done was changing the object code format from ( eabi ) to ( coff ) , but this impacted the application performance , and what i need to now i there a way to use the DATA_SECTION pragma and keep the object code in ( eabi ) format ?

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

My Code :

#include <msp430.h>

#pragma DATA_SECTION(port_bit, ".infoD")
const unsigned char port_bit = 0x15;

int main(void) {

    WDTCTL = WDTPW | WDTHOLD;        // Stop watchdog timer
    P1DIR |= 0x01;                    // Set P1.0 to output direction

    while(1) {

        P1OUT ^= 0x01;                // Toggle P1.0 using exclusive-OR

        __delay_cycles(300000);

    }
        //((void (*)(void))0x1000)();

    return 0;
}

BR,

**Attention** This is a public forum