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.

F28069 flash sector address from linker incorrect

Other Parts Discussed in Thread: CONTROLSUITE

Hi,

I need to store some paramters in the internal flash. Then I modified the linker file like this:

MEMORY
{

...

PAGE 1 :
     FLASHB      : origin = 0x3F0000, length = 0x004000,
     RAMM1       : origin = 0x000400, length = 0x000400

}

SECTIONS
{

...

FlashStoredPars : LOAD = FLASHB,
     RUN = RAMM1,
     LOAD_START(_FlashStoredParsLoadStart),
     LOAD_END(_FlashStoredParsLoadEnd),
     RUN_START(_FlashStoredParsRunStart),
     PAGE = 1

}

As I debug in the source code at the line of

     MemCopy(&FlashStoredParsLoadStart, &FlashStoredParsLoadEnd, &FlashStoredParsRunStart);

The three addresses are the same, 0x000480, which is obviously incorrect.

What could be the problem?

W. Lin

  • W.Lin,

    Do you have any code mapped into the FlashStoredPars section?  If not, the section is empty and its start and end addresses will be the same.  In your source you should have a CODE_SECTION pragma which associates C function names with that string.  Something like:

    #pragma CODE_SECTION(func_name, "FlashStoredPars")

    There's an example of this in the flash projects in controlSUITE.  For F28069, the relevant project will be at:

    C:\ti\controlSUITE\device_support\f2806x\v151\F2806x_examples_ccsv5\flash_f28069

    Regards,

    Richard

  • Hi Richard,

    Thanks a lot, your are totally right. The pragma is missing. I have added:

    #pragma DATA_SECTION(Pars, "FlashStoredPars")

    const int Pars[5] = {1,2,3,4,5}; // must initialize, otherwise the linker ignore.

    Then it works. Also the docu "Running an Application from Internal Flash Memory on the TMS320F28xxx DSP" helps.

    Regards,

    W. Lin