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.

#pragma DATA_SECTION doesn't work for me (Concerto M3), what am I doing wrong?

HI,

I'm trying to put a const structure with values into flash and not succeeding.  I have

#pragma DATA_SECTION(g_appHeader, ".appheader")

const unsigned short g_appHeader[] = {... };

and in my link cmd file I have:

    APPHDR (RX)     : origin = 0x00203FE0, length = 0x20

and in the SECTIONS I have:

    .appheader: > APPHDR

 

When I look at my map file after compiling with this link cmd file, I see that the APPHDR has zero bytes used!  What might I be doing wrong, please?

Thanks for any ideas,

Larry