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: How to debug a flash build

Part Number: TMS320F28379D
Other Parts Discussed in Thread: LAUNCHXL-F28379D, SYSCONFIG, C2000WARE

Hi,

I'm using launchxl-F28379D. the code was configured using Sysconfig 1.14.0, CCS 12.1.0.00007, and C2000WARE 4.02.00.00.

It worked well when the build was configured to CPU1_RAM (2837xD_RAM_Ink_cpu1.cmd), but after a few more configurations it raised a prompt saying that the code is too large for the memory.

I tried to change the configuration to CPU1_FLASH (2837xD_FLASH_Ink_cpu1.cmd), and clicked the debug button. 

The following error occurred:

No source available for "_system_post_cinit() at"

(after "at" there is a path of the .out file)

What does it mean and how can we overcome this?

Thanks

  • Hi, 

    Did you recompile the project after changing to the "CPU1_FLASH" configuration?  Are you able to compile it successfully for the Flash configuration and see the .out file getting generated?

    The system_post_cinit()  is a compiler specific function included in the runtime library.

    Best Regards

    Siddharth

  • Hi,

    I tried to recompile after changing to the "CPU1_FLASH", and then the above error was raised.

    I'm not able to compile the flash configuration successfully.

  • Hi,

    Request you to share the compilation log/console output when you are trying to build the Flash configuration.

    Best Regards

    Siddharth

  • Hi,

    I've changed the settings and the flash build is working. However, the RAM build is also necessary for me and it doesn't work.

    can you help me figure this out?

    please find attached the log of the RAM build.

    **** Build of configuration CPU1_RAM for project GaN_INV ****
    
    "C:\\ti\\ccs1210\\ccs\\utils\\bin\\gmake" -k -j 16 all -O 
     
    Building file: "../GaN_INV.c"
    Invoking: C2000 Compiler
    "C:/ti/ccs1210/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 -O4 --fp_mode=relaxed --include_path="M:/Users/OrenZ/Control_Projects/workspace_v12/GaN_INV" --include_path="C:/ti/C2000Ware_4_02_00_00/device_support/f2837xd/common/include" --include_path="C:/ti/C2000Ware_4_02_00_00/device_support/f2837xd/headers/include" --include_path="M:/Users/OrenZ/Control_Projects/workspace_v12/GaN_INV/device" --include_path="C:/ti/C2000Ware_4_02_00_00/driverlib/f2837xd/driverlib" --include_path="C:/ti/ccs1210/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include" --define=DEBUG --define=_DUAL_HEADERS --define=CPU1 --define=_LAUNCHXL_F28379D --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --preproc_with_compile --preproc_dependency="GaN_INV.d_raw" --include_path="M:/Users/OrenZ/Control_Projects/workspace_v12/GaN_INV/CPU1_RAM/syscfg" --cmd_file="syscfg/c2000ware_libraries.opt"  "../GaN_INV.c"
    Finished building: "../GaN_INV.c"
     
    Building target: "GaN_INV.out"
    Invoking: C2000 Linker
    "C:/ti/ccs1210/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 -O4 --fp_mode=relaxed --define=DEBUG --define=_DUAL_HEADERS --define=CPU1 --define=_LAUNCHXL_F28379D --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi -z -m"GaN_INV.map" --stack_size=0x100 --warn_sections -i"C:/ti/ccs1210/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/lib" -i"C:/ti/ccs1210/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="GaN_INV_linkInfo.xml" --rom_model -o "GaN_INV.out" "./F2837xD_CodeStartBranch.obj" "./F2837xD_DefaultISR.obj" "./F2837xD_GlobalVariableDefs.obj" "./F2837xD_Gpio.obj" "./F2837xD_PieCtrl.obj" "./F2837xD_PieVect.obj" "./F2837xD_SysCtrl.obj" "./F2837xD_usDelay.obj" "./GaN_INV.obj" "./syscfg/board.obj" "./syscfg/c2000ware_libraries.obj" "./device/device.obj" "../2837xD_RAM_lnk_cpu1.cmd" "../F2837xD_Headers_nonBIOS_cpu1.cmd" "../SFO_v8_fpu_lib_build_c28_driverlib_coff.lib" "C:/ti/C2000Ware_4_02_00_00/driverlib/f2837xd/driverlib/ccs/Debug/driverlib.lib"  -llibc.a 
    <Linking>
    warning #10247-D: creating output section "ramgs2" without a SECTIONS specification
    warning #10247-D: creating output section "ramgs3" without a SECTIONS specification
    "../2837xD_RAM_lnk_cpu1.cmd", line 80: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment/blocking fails for section ".text" size 0x1ef8 page 0.  Available memory ranges:
       RAMD0        size: 0x800        unused: 0x0          max hole: 0x0       
       RAMLS0       size: 0x800        unused: 0x0          max hole: 0x0       
       RAMLS1       size: 0x800        unused: 0x167        max hole: 0x167     
       RAMLS2       size: 0x800        unused: 0x800        max hole: 0x800     
       RAMLS3       size: 0x800        unused: 0x800        max hole: 0x800     
       RAMLS4       size: 0x800        unused: 0x800        max hole: 0x800     
    error #10010: errors encountered during linking; "GaN_INV.out" not built
     
    gmake[1]: *** [GaN_INV.out] Error 1
    >> Compilation failure
    makefile:157: recipe for target 'GaN_INV.out' failed
    gmake: *** [all] Error 2
    makefile:153: recipe for target 'all' failed
    
    **** Build Finished ****
    

  • Hi, 

    The issue is a linking issue where it cannot allocate the .text section in the RAM sections.  The ".text" section needs a size of 0x1ef8  which is not available in the currently allocated RAM sections.

    You can update the linker command file to accomodate the ".text" section in RAM sections. For this, you may have to update the .text section to multiple RAM sections 

    .text            : >> RAMD0 |  RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4,   PAGE = 0

    Another option is to enable code optimiiztation and check if the ".text" size is reduced. You can set it from the Project Properties

    Best Regards

    Siddharth

  • Hi,

    I tried to modify the optimization settings but it wasn't enough.

    in addition, the .text line is identical to the one you shared. If I'm reading the log correctly, there is a lot of available memory (RAMLS2-4 are empty, and RAMLS1 isn't full) but the issue raised due to a different reason.

    can you advise?

    thanks

  • Hi, 

    If memory is available , then you can try to combine RAM sections to create a single section in the linker command file

    RAMLS0_4         : origin = 0x008000, length = 0x002800

    and then try to allocate the .text section to it.

    .text            : >> RAMD0 |  RAMLS0_4,   PAGE = 0

    Best Regards

    Siddharth

  • It compiles, thanks! your help is much appreciated.

    what are the other effects of combining these sections?

    in other words, why did TI designed them into separate  sections in the first place?

    I have to understand this to know if the solution works for me.

    thanks

  • Hi, 

    There are no side effects if you combine these sections. 

    The linker command file was designed to have the same sections as the RAM memory sectors as per the Memory map specified in the TRM.

    Best Regards

    Siddharth