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.

TMS320F28388D: Sysconfig cmd module issue ?

Part Number: TMS320F28388D
Other Parts Discussed in Thread: SYSCONFIG

Hi,

I have issues with the default cmd file, and have started to tinker with the cmd module in sysconfig.

Firstly, I have a strange warning : the CMD module says must be enabled ... and it is. 

Secondly, the linking fails. It kind of looks like it can't find the cmd file generated by sysconfig. 

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"C:/TI/CCS/CCS12.50/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --idiv_support=idiv0 --tmu_support=tmu0 --vcu_support=vcrc -Ooff --fp_mode=relaxed --advice:performance=all --define=_FLASH --define=DEBUG --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -z -m"2205_ctc_chrg7k_sw_cpu1.map" --heap_size=0x200 --stack_size=0x3F8 --warn_sections -i"C:/TI/CCS/CCS12.50/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/lib" -i"C:/TI/CCS/CCS12.50/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="2205_ctc_chrg7k_sw_cpu1_linkInfo.xml" --entry_point=code_start --rom_model -o "2205_ctc_chrg7k_sw_cpu1.out" "./syscfg/board.obj" "./syscfg/device_cmd.obj" "./syscfg/c2000ware_libraries.obj" "./device/F2838x_CodeStartBranch.obj" "./device/device.obj" "./sources/converter_io.obj" "./sources/init_cla_cpu1.obj" "./sources/main_cpu1.obj" "./sources/pll_pfc.obj" "./sources/regulation_pfc.obj" "./sources/supervision_cpu1.obj" "C:/TI/SDK/C2000Ware/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" "../sources/includes/SFO_v8_fpu_lib_build_c28_driverlib_eabi.lib" -l"syscfg/device_cmd.cmd" -llibc.a
<Linking>
warning #10461-D: Invalid to call C28 function "sqrtf" defined in "C:\TI\CCS\CCS12.50\ccs\tools\compiler\ti-cgt-c2000_22.6.1.LTS\lib\rts2800_fpu64_eabi.lib<e_sqrtf.c.obj>" from CLA file "./sources/regulation_pfc.obj"
warning #10247-D: creating output section ".text" without a SECTIONS specification
warning #10247-D: creating output section ".data" without a SECTIONS specification
warning #10247-D: creating output section ".bss" without a SECTIONS specification
warning #10247-D: creating output section ".cinit" without a SECTIONS specification
warning #10247-D: creating output section ".const" without a SECTIONS specification
warning #10247-D: creating output section "codestart" without a SECTIONS specification
warning #10247-D: creating output section "CpuToCla1MsgRAM" without a SECTIONS specification
warning #10247-D: creating output section ".bss_cla" without a SECTIONS specification
warning #10247-D: creating output section "Cla1Prog" without a SECTIONS specification
warning #10247-D: creating output section ".scratchpad" without a SECTIONS specification
warning #10247-D: creating output section ".const_cla" without a SECTIONS specification
error #10430-D: ".TI.ramfunc" section generated by __attribute__((ramfunc)) or --ramfunc=on requires a SECTIONS specification to function.
error #10010: errors encountered during linking; "2205_ctc_chrg7k_sw_cpu1.out" not built
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Thanks in advance for your help,

Best regards,

Adrien

  • You can click to "Suppress". That solved my problem.

  • Hi, 

    Can you check if the device_cmd.cmd file is generated by SysConfig?

    You can refer the App note https://www.ti.com/lit/pdf/sprad49 on how to use the Linker Command tool.

    Best Regards

    Siddharth

  • You can click to "Suppress". That solved my problem.

    I was under the impression that this only "mutes" the warning, but it doesn't mean the problem is gone. Am I wrong ?

  • In my case, the problem is gone, and the code work correctly. I am not sure about your case, can you show me your config of "MEMCFG" ?

  • You can refer the App note https://www.ti.com/lit/pdf/sprad49 on how to use the Linker Command tool.

    Thanks. This is what I used to get where I am at.

    Can you check if the device_cmd.cmd file is generated by SysConfig?

    It is.

    I also noticed that the preprocessor macro CMDTOOL is undefined, and therefore the CMD_init() function is not called in Device_init(). Which is probably also an issue. 

  • Hi, 

    What are the compiler options that you have conifgured ?  Pls share the compilation log console for your project.

    The "--cmd_file="syscfg/device_cmd.opt" option has to be specified to the compiler so that it define the CMDTOOL symbol,

    Best regards

    Siddharth

  • Hi,

    The "--cmd_file="syscfg/device_cmd.opt" option has to be specified to the compiler so that it define the CMDTOOL symbo

    Thanks, it looks like it works (for the symbol define, at least).

    Here is the console log:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    **** Build of configuration FLASH for project 2205_ctc_chrg7k_sw_cpu1 ****
    "C:\\TI\\CCS\\CCS12.50\\ccs\\utils\\bin\\gmake" -k -j 16 all -O
    Building file: "../2205_ctc_chrg7k_sw_cpu1.syscfg"
    Invoking: SysConfig
    "C:/TI/CCS/CCS12.50/ccs/utils/sysconfig_1.18.0/sysconfig_cli.bat" -s "C:/TI/SDK/C2000Ware/C2000Ware_5_01_00_00/.metadata/sdk.json" -d "F2838x" --script "C:/Users/a.thurin/Desktop/Projets logiciels/2205-CTC-CHRG7K-SW/2205_ctc_chrg7k_sw_cpu2/2205_ctc_chrg7k_sw_cpu2.syscfg" --context "CPU2" --script "C:/Users/a.thurin/Desktop/Projets logiciels/2205-CTC-CHRG7K-SW/2205_ctc_chrg7k_sw_cpu1/2205_ctc_chrg7k_sw_cpu1.syscfg" --context "CPU1" -o "syscfg" --compiler ccs
    Running script...
    Validating...
    warning: CPU2 CMD_FLASH(/utilities/cmd_tool/cmd_syscfg/source/CMD) sectionMemory_cpuToCla1MsgRAM: Memcfg module must be enabled for complete error checking.
    warning: CPU2 CMD_FLASH(/utilities/cmd_tool/cmd_syscfg/source/CMD) sectionMemory_bss: The memcfg module is needed on CPU1 to assign GSRAM to CPU2.
    warning: CPU2 CMD_FLASH(/utilities/cmd_tool/cmd_syscfg/source/CMD) sectionMemory_data: The memcfg module is needed on CPU1 to assign GSRAM to CPU2.
    warning: CPU2 CMD_FLASH(/utilities/cmd_tool/cmd_syscfg/source/CMD) sectionMemory_sysmem: The memcfg module is needed on CPU1 to assign GSRAM to CPU2.
    info: CPU1 CPUSELx(/driverlib/clocktree/mux.js) cpu_sel_mux: For enabling peripherals, use the CPU1 /driverlib/sysctl.js enable_SYSCTL_PERIPH_CLK_TIMER0
    info: CPU1 PERx_CPU1_SYSCLK_GATE(/driverlib/clocktree/unknown.js) cpu1_sysclk_gate: For enabling peripherals, use the CPU1 /driverlib/sysctl.js enable_SYSCTL_PERIPH_CLK_TIMER0
    info: CPU1 PERx_CPU2_SYSCLK_GATE(/driverlib/clocktree/unknown.js) cpu2_sysclk_gate: For enabling peripherals, use the CPU1 /driverlib/sysctl.js enable_SYSCTL_PERIPH_CLK_TIMER0
    info: CPU1 PWM_PFC(/driverlib/epwm.js) epwmTimebase_clockDiv: For perfectly synchronized TBCLKs across multiple EPWM modules, the prescaler bits in the TBCTL register of each EPWM module must be set identically
    info: CPU1 PWM_PFC(/driverlib/epwm.js) epwmActionQualifier_t1Source: T1/T2 selection and configuration of a trip/digital-compare event is indpendent of the configuration of that event in the Trip-Zone submodule
    info: CPU1 PWM_PFC(/driverlib/epwm.js) epwmActionQualifier_t2Source: T1/T2 selection and configuration of a trip/digital-compare event is indpendent of the configuration of that event in the Trip-Zone submodule
    info: CPU1 PWM_PFC(/driverlib/epwm.js) hrpwm_enable: MEP becomes operational: •Three EPWMCLK cycles after the period starts when high-resolution period (TBPRDHR) control is not enabled. • When high resolution period (TBPRDHR) control is enabled via the HRPCTL register – In up-count mode: three EPWMCLK cycles after the period starts until three EPWMCLK cycles before the period ends. – In up-down count mode: when counting up, three cycles after CTR = 0 until three cycles before CTR = PRD, and when counting down, three cycles after CTR = PRD until three cycles before CTR= 0.
    info: CPU1 PWM_TDC_1(/driverlib/epwm.js) epwmTimebase_clockDiv: For perfectly synchronized TBCLKs across multiple EPWM modules, the prescaler bits in the TBCTL register of each EPWM module must be set identically
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Best regards,

    Adrien

  • Adrien,

    Looks like the contents of the linker command file is not getting linked.

    You need to define the appropriate macro (generic_flash_lnk or generic_ram_lnk) used in the device_cmd.cmd file in the project properties as shown below.

    Best Regards

    Siddharth

  • Siddharth,

    I added the generic_flash_lnk command, but the result is the same. Same with generic_ram_lnk. Also, there is no reference to a generic anything in the generated cmd file.

    Even if it worked, wouldn't that point towards a .cmd other than the generated one ?

    Best regards,

    Adrien

  • Adrien, 

    Pls share the  device_cmd.cmd file that is generated.  

    I did not mean adding a new linker command file , only the macro used with the generated device_cmd.cmd file .

    Best Regards

    Siddharth

  • Siddharth,

    OK, I get it now ! Relaxed And the problem is solved ! 

    Here is the generated cmd file :

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    #ifdef CMD_FLASH
    MEMORY
    {
    RAMM0 : origin = 0x0001B1, length = 0x00024F
    RAMM1 : origin = 0x000400, length = 0x0003F8
    CLATOCPU_MSGRAM : origin = 0x001480, length = 0x000080
    CPUTOCLA_MSGRAM : origin = 0x001500, length = 0x000080
    CLATODMA_MSGRAM : origin = 0x001680, length = 0x000080
    DMATOCLA_MSGRAM : origin = 0x001700, length = 0x000080
    CLA1_RAM_COMBINATION : origin = 0x008000, length = 0x001800
    RAMLS3 : origin = 0x009800, length = 0x000800
    RAMLS4 : origin = 0x00A000, length = 0x000800
    RAMLS5 : origin = 0x00A800, length = 0x000800
    RAMLS6 : origin = 0x00B000, length = 0x000800
    RAMLS7 : origin = 0x00B800, length = 0x000800
    RAMD0 : origin = 0x00C000, length = 0x000800
    RAMD1 : origin = 0x00C800, length = 0x000800
    RAMGS0 : origin = 0x00D000, length = 0x001000
    RAMGS1 : origin = 0x00E000, length = 0x001000
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Following your previous message, I added the CMD_FLASH to the compiler predefined symbol (+ added generic_flash_lnk in the linker predefined symbols).

    Now I understand what you meant, I added the CMD_FLASH as linker predefined symbol, and now it works Thumbsup

    Thank you very much for your help !

    Best regards,

    Adrien

  • I should say I still have 1 error : 

    Fullscreen
    1
    warning #10247-D: creating output section "CpuToCla1MsgRAM" without a SECTIONS specification
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    This corresponds to the section that has the strange warning (see first post).

    If you have a solution for that, it would be awsome !

    I also saw there were similar warnings for the CPU2 cmd configuration, hopefully the solution will work for both. 

  • Hi,

    You will have to add a section for cpuToCla1MsgRAM as shown below to get rid of this warning

    Best Regards

    Siddharth

  • Hi,

    It seems to be part of the problem : 

    Best regards,

    Adrien

  • Adrien,

    I am not sure what you meant, please clarify.

    Best Regards

    Siddharth

  • Siddharth,

    I don't know what is going on, that's the issue. There is this warning in the CMD section (only in the CPUTOCLA subsection) that says that MEMCFG needs to be enabled. Except it is (see very first screenshot in this thread), and it works for all other subsections.

    The result is that there is no cpu to cla section in the generated cmd file, which causes errors in compilation.

    There are other subsections in the cpu2 that seem to have a similar issue, but I wouldn't be surprised if it was the same issue, so I will get back to you if solving this one doesn't solve the others.

    Best regards,

    Adrien

  • Adrien

    I see that in the generated there is a already a memory  CPUTOCLA_MSGRAM allocated for the cpuToCla1MsdRAM section in the generated linker command.  Are you getting a warning or an error during the compilation?

    Best Regards

    Siddharth

  • Siddharth,

    This is very strange, I would have sworn it wasn't there last time I checked.

    The warning during linking has gone for CPU1 (but the warning in sysconfig is still there).

     

    I moved to CPU2, and the linking warning is there too, despite an identical configuration of the sysconfig CMD Module. There are also additionnal warnings, see below.

    In Sysconfig, the warning regarding memcfg needed to be activated is there in the CpuToClaMsgRAM section. There is also the same warning in sysconfig as during the linking in the sections that use GSRAM.

    This doesn't prevent compilation so I can try to carry on, but I can only hope it won't cause issues in operations ...

    Is there a chance there might be a problem with sysconfig, that would cause these warnings ?

    Best regards,

    Adrien

  • Adrien, 

    Will check and get back to you on this.  

    Best Regards

    Siddharth