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.

External Memory Initialize

Other Parts Discussed in Thread: UNIFLASH

Hi,

I am working with EVM eZdsp  F28335

 

I have a question re the external memory usage.

Is it possible to define a global variable on the external memory and initialize it with a const.

 

For example:

Const real_32_T var[3] = {1, 2, 3};

#pragma DATA_section(var, "MATHDATA") 

 

The thing I'm missing out on, is the fact that the external memory is initialized upon power up on the main function, but the global are compiled to be located on the external memory before the memory actually exist.

 

What is the correct way to perform such variable definition(if possible)?

 

Thanks for helping,

Ilana.

  • Hi,

    Here's how you should configure "#pragma DATA_section"

    Regards,

    Gautam

  • Hi

    Thank you for your response

    I used the command exactly but the problem is that the initial values ​​are not sets.

    Regards

    Ilana

  • Hi,

    So what issue are you facing currently ?

    Regards,

    Gautam

  • IIana,

    With the 'const' qualifier, the compiler assumes that the symbol resides in non-volatile memory.  The compiler does not initialize the symbol.  If you have RAM in external memory, you cannot use 'const' on values linked there.  The .const and .econst sections must be linked to non-volatile memory.  They are almost always linked to the internal flash memory.

    If you have non-volatile memory (e.g., flash, eeprom) hung off the external memory interface, you will still face challenges linking .const/.econst there.  The non-volatile memory will need to be programmed with all initialized sections that are linked there (e.g., .const, .econst, and any others).  This can be done, but the flash programming tools provided by TI (e.g., CCS, UniFlash) will not do this.  You'd need to use the HEX2000 hex utility to create a hex file from the .out file, and then use some other means to get your external memory device programmed.

    Regards,

    David