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.

TMS320F28379D: CLAMath EABI and unused sections

Part Number: TMS320F28379D

Hello,

I have some shared source codes between my CPU1 and CPU2 projects.

Some of these souce codes have constant data that are used just by CPU1, but both CPUs are allocating memory for it.

I looked into "--gen-func-subsections" and "--gen-data-subsections" compiler flags but they didn't solved my issue.

Right now i'm looking to use the "--unused_section_elimination" flag, but it is EABI only.

I started to port my project to EABI, but it seems that the CLAmath lib is trying to place code inside the Local RAMs, leaving me out of memory.

When porting from COFF to EABI, i changed my CLAmath libs to "cla1_math_library_datarom_fpu32_eabi.lib" and "F2837xRevB_c1bootROM_CLADataROMSymbols_eabi_fpu32.lib".

Is there any additional step that I'm missing?

Additionally, can i pursue any other strategy to discard unused data sections?

BR,

Lucas Munaretto

  • Hi Lucas,

    Have you made any changes to your linker command file when you ported? Also is the command file define CLA_MATH_TABLES_IN_ROM set to ensure math tables located in ROM are used and RAM is not used to store the math tables?

    Thanks,

    Ashwini

  • Hi Ashwini,

    Thanks for the reply.

    I was aware of the CLA_MATH_TABLES_IN_ROM, which is explained in the CLAmath documentation, but i didn't needed it in the COFF project. I tried to set it using EABI but it didn't change anything.

    About the command file, i updated it with EABI symbols, i.e., removed some underscores (_Cla1funcsLoadStart -> Cla1funcsLoadStart). The sections were already surrounded by the __TI_EABI__ symbol.

    I removed almost every program code and built my application. Below is the respective CLA program ram:

    BR,

    Lucas

  • Hi Lucas,

    I am not aware of any reasons for why the EABI libraries should make a difference. However, if your appication is using doubles then that may be a reason for the additional memory. See this reference page for details on COFF to EABI migration.

    https://software-dl.ti.com/ccs/esd/documents/C2000_c28x_migration_from_coff_to_eabi.html

    If this does not help, please could you send the map files for COFF and EABI compilations as well as the compiler error for out of memory with EABI? That may provide some clues.

    Thanks,

    Ashwini

  • Yes, I agree with you. The EABI shouldn't make a difference. I'm not using double.

    I'm sending the maps from COFF and EABI compilations as well the compiler error for out of memory and the .png of the CLA_PROG_MEM memory view.

    One strange behaviour is that in EABI compilation there is some objects from CPU1 source code (files as shared among both CPUs, but CPU2 doens't use it).

    I'll take a look in the reference. Thanks.

    BR,

    Lucas

    eabi_and_coff_comparation.zip

  • Hi Lucas,

    I looked at the object files being mapped to Cla1Prog in the "minimal" map files. In the EABI compilation, there are object files for llc_tasks and mac_tasks but I don't see the same in the COFF version. This would be something to explore.

    COFF:
    Cla1Prog   0    00080008    0000011e     RUN ADDR = 0000a000
                      00080008    0000006e     app_cla.obj (Cla1Prog:_my_ads_cla_task)
                      00080076    00000058     cla1_math_library_datarom_fpu32.lib : CLAatan2.obj (Cla1Prog:_CLAatan2)
                      000800ce    00000038                                         : CLAsin.obj (Cla1Prog:_CLAsin)
                      00080106    00000020                                         : CLAsqrt.obj (Cla1Prog:_CLAsqrt)

    EABI:

    Cla1Prog   0    00080008    00000bf0     RUN ADDR = 0000a000
                      00080008    00000366     rts2800_fpu32_eabi.lib : frcmpyd.cla.obj (Cla1Prog:__TI_frcmpyd)
                      0008036e    000002f0                            : mpyd.cla.obj (Cla1Prog:__claabi_mpyd)
                      0008065e    00000220     llc_tasks.obj (Cla1Prog:DataLink_LLC_Rx_Task)
                      0008087e    000000f0     rts2800_fpu32_eabi.lib : fltid.cla.obj (Cla1Prog:__claabi_fltid)
                      0008096e    000000e2     mac_tasks.obj (Cla1Prog:DataLink_MAC_Rx_Task)
                      00080a50    000000c2     rts2800_fpu32_eabi.lib : cvtdf.cla.obj (Cla1Prog:__claabi_cvtdf)
                      00080b12    0000009e     app_cla.obj (Cla1Prog:my_ads_cla_task)
                      00080bb0    00000048     mac_tasks.obj (Cla1Prog:DataLink_MAC_Tx_Task)

    Thanks,

    Ashwini

  • Hello Ashwini,

    Yes, these methods are from our library but aren't supposed to be compiled, just like in the COFF version.

    Anyway, I'm gonna hold up the port from COFF to EABI. Right now we don't have much time left to explore port issues.

    Thanks for your help.

    BR,

    Lucas

  • Hi Lucas,

    Ok. I am closing this thread for now. Please feel free to reopen the thread if you have any other questions.

    Thanks,
    Ashwini