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.

Compiler/TMS320F280025C: ELF & Data Section

Part Number: TMS320F280025C

Tool/software: TI C/C++ Compiler

Hi,

I have ported my project from F280041 to F280025c

I have changed my project from legacy COFF to ELF format. But i am facing an issue while creating a data section.

I kept a variable "signature" in a particular flash memory location. But it is not available in .map file.

Samething i tried with legacy COFF, i can able to see the variable in map file. But it is not coming in map file with ELF format and not storing that variable in memory location. How to solve this issue

#define SIGNATURE 0x12345678

#pragma DATA_SECTION(signature,"SignatureLoc");
const UINT32 signature = SIGNATURE;

Thanks 

Nikhil

  • The variable signature must not be referenced in the program.  When building for EABI, all variables and functions which are not used by the program are removed.  Use #pragma RETAIN to tell the compiler to keep a variable or function that is not referenced by the program.  For all the details, please search the C28x compiler manual for the sub-chapter titled The RETAIN Pragma.

    Thanks and regards,

    -George

  • Hi,

    I am facing issue with global variable initialization when i am using EABI. how to solve that, is there any setting i need to do for global variable initialization?

    Thanks

    Nikhil

  • nik said:
    I am facing issue with global variable initialization when i am using EABI

    What has gone wrong?  Exactly how do you see this bad behavior?  What do you expect instead?

    For correct handling of the initialization of global variables, you usually link with the option --rom_model.  Everything else happens automatically.  For the details, please search the C28x compiler manual for the sub-chapter titled System Initialization.  Focus on the parts that are relevant to EABI. Ignore the parts that are relevant to COFF ABI.

    Thanks and regards,

    -George

  • Hi,

    I am getting a strange issue. After 5 to 10min running code is going to illegal ISR.

    The same thing is working fine with legacy COFF. But not working with EABI?

    My stack size is 0x200. DO i need to increase the stack size with EABI?

    Or issue is something else ?

    Thanks

    Nikhil

  • Intermittent behavior such as ...

    nik said:
    After 5 to 10min running code is going to illegal ISR.

    ... is not usually caused by a problem in the compiler.  

    You need to further narrow down the possible cause of the problem.  To get help with that, I recommend you start a new thread in the C2000 device forum.  Or, if you prefer, I can notify those experts about this thread.

    Thanks and regards,

    -George