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/TDA2EVM5777: In TDA2EX MPU-A15 vector table Mapped to 0x00 location in map file but while loading .elf symbol not shown at that location

Part Number: TDA2EVM5777

Tool/software: TI C/C++ Compiler

Hello,

At the time of IPU2 implementation we had facing same issue for the ti-cgt-arm_5.2.5 compiler. For that compiler we use the -retain compiler flag in to solve this issue.

Now for MPU-A15 we are using GCC(gcc-arm-none-eabi-4_9-2015q3) compiler. When we compile the code through make file vector table get mapped to location 0x00 but

after flashing the code we are not able to find symbol of vector at that location. 

After CPU reset it shows the address 0x0000000C

Please suggest if any compiler flag is missing or any other configuration is miss.

Thanks,

Kiran  

  • Try applying __attribute__((used)) to the symbol for the vector table.

    Thanks and regards,

    -George

  • Hi George,

    We are using .s  format of file. When i have put __attribute__((.intvecs)) , I  got the compiler error.

    Please suggest the  instruction "__attribute__((used))" instead of suitable for .s file .

    Regards,

    Kiran

  • Hello Kiran,



    You can not put vector table at 0x0 as it is ROM memory. I am not sure how flashwriter interprets this address and loading it for A15 but looks like as flashing is done from M4 it might be loading it to M4's 0 mapped address.

    Anyway you can keep vector table in OCMC/DDR and using VTOR tell A15 its location.

    In PDK we do vector table copy to this address (TDA2XX_VECTOR_BASE). Refer to intvec.c in ti_components\drivers\pdk\packages\ti\csl\arch\a15\src\csl_a15_startup.c in PDK.
  • kiran vidhate said:
    We are using .s  format of file. When i have put __attribute__((.intvecs)) , I  got the compiler error.

    I apologize.  I thought you were programming in C, and you want to keep an unused variable.  You are programming in hand-coded assembly, and you want to keep an unused section.  For that, use the KEEP directive in your linker script. (Under GCC conventions, the text file which contains detailed directives for the linker is called a linker script, and usually has the file extension .lds.  Under TI conventions, this same file is called a linker command file, and usually has the extension .cmd.)  You can see an example of how KEEP is used in the ARM linker scripts that are supplied with CCS.  Here is the typical location of one example ...

    C:\ti\ccsv7\ccs_base\arm\include\AM572x.lds

    Thanks and regards,

    -George