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.

CCS/TMS320F28379D: Memory problem

Part Number: TMS320F28379D
Other Parts Discussed in Thread: CONTROLSUITE

Tool/software: Code Composer Studio

Hello

I am using the CLA on a TMS320F28379D. For the first task, I had some trouble to get it runnning but in the end it works fine.

When I now want to add a second CLA task, I get some kind of memory problem: program will not fit into available memory.  placement with alignment/blocking fails for section "Cla1Prog" size 0xa6e page 0

This is the console log:


**** Build of configuration Debug for project Interleaved_Boost ****

"C:\\Program Files\\ccsv6\\utils\\bin\\gmake" -k all
'Building target: Interleaved_Boost.out'
'Invoking: C2000 Linker'
"C:/Program Files/ccsv6/tools/compiler/c2000_15.12.3.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --tmu_support=tmu0 --vcu_support=vcu2 --float_support=fpu32 --advice:performance=all -g --define=CPU1 --display_error_number --diag_warning=225 --diag_wrap=off -z -m"Interleaved_Boost.map" --stack_size=0x200 --warn_sections -i"/F2837xD_common/cmd" -i"/F2837xD_headers/cmd" -i"C:/Program Files/ccsv6/tools/compiler/c2000_15.12.3.LTS/lib" -i"C:/Program Files/ccsv6/tools/compiler/c2000_15.12.3.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="Interleaved_Boost_linkInfo.xml" --rom_model -o "Interleaved_Boost.out" "./F2837xD_Adc.obj" "./F2837xD_CodeStartBranch.obj" "./F2837xD_DefaultISR.obj" "./F2837xD_EPwm.obj" "./F2837xD_GlobalVariableDefs.obj" "./F2837xD_Gpio.obj" "./F2837xD_Ipc.obj" "./F2837xD_PieCtrl.obj" "./F2837xD_PieVect.obj" "./F2837xD_SysCtrl.obj" "./F2837xD_usDelay.obj" "./cla.obj" "./cla_taks.obj" "./main.obj" "../SFO_v8_fpu_lib_build_c28.lib"  -lrts2800_fpu32.lib -l"C:/Program Files/controlSUITE/device_support/F2837xD/v190/F2837xD_common/cmd/2837xD_RAM_CLA_lnk_cpu1.cmd" -l"C:/Program Files/controlSUITE/device_support/F2837xD/v190/F2837xD_headers/cmd/F2837xD_Headers_nonBIOS_cpu1.cmd"
<Linking>
warning #10247-D: creating output section ".scratchpad" without a SECTIONS specification
"C:/Program Files/controlSUITE/device_support/F2837xD/v190/F2837xD_common/cmd/2837xD_RAM_CLA_lnk_cpu1.cmd", line 82: error #10099-D: program will not fit into available memory.  placement with alignment/blocking fails for section "Cla1Prog" size 0xa6e page 0.  Available memory ranges:
   RAMLS5       size: 0x800        unused: 0x800        max hole: 0x800     
error #10010: errors encountered during linking; "Interleaved_Boost.out" not built
gmake: *** [Interleaved_Boost.out] Error 1
gmake: Target 'all' not remade because of errors.

>> Compilation failure
makefile:155: recipe for target 'Interleaved_Boost.out' failed

**** Build Finished ****

I tried to enlarge the memory size of 'RAMLS5' by changing the length from 0x000800 to 0x001000 in the 2827xD_RAM_CLA_lnk_cpu1.cmd but this did not help

MEMORY
{
PAGE 0 :
   /* BEGIN is used for the "boot to SARAM" bootloader mode   */

   BEGIN               : origin = 0x000000, length = 0x000002
   RAMM0               : origin = 0x000122, length = 0x0002DE
   RAMD0               : origin = 0x00B000, length = 0x000800
   RAMD1            : origin = 0x00B800, length = 0x000800
   RAMLS4              : origin = 0x00A000, length = 0x000800
   RAMLS5           : origin = 0x00A800, length = 0x000800 //tried to change this one but same problem remained
   RESET               : origin = 0x3FFFC0, length = 0x000002

Could I have some input and a way to solve the problem?

  • Hi,

    Look like one RAM block is not enough for this so you have to combine two RAM block (like below) and allocate the program section to combine RAM block.

    RAMLS4 : origin = 0x00A000, length = 0x001000

    You could also place the section in multiple RAM block like below -

    .text : >> RAMLS4 | RAMLS5 , PAGE = 0

    You can find more detail about linking on following wiki page

    processors.wiki.ti.com/.../C28x_Compiler_-_Understanding_Linking

    Regards,
    Vivek Singh
  • Hello Vivek

    I tried both your solutions (seperately and independently) but they don't seem to work, I still get the same error :/

    You also talk about allocation, but where does this need to be done?

    Kind regards
    Simon
  • Hello Vivek

    I noticed something really weird. In task 2 of my cla, I have the following three lines of code:
    //EPwm1Regs.CMPA.bit.CMPA = (int)(((100-D1)/100)*EPWM_TIMER_TBPRD-1);
    //EPwm2Regs.CMPA.bit.CMPA = (int)(((100-D2)/100)*EPWM_TIMER_TBPRD-1);
    //EPwm3Regs.CMPA.bit.CMPA = (int)(((100-D3)/100)*EPWM_TIMER_TBPRD-1);

    because I want to calculate and afterwards set the duty cycle from the CLA.
    When I comment them out, the problem disappears...

    How is this possible? I thought that it was possible to write to ePWM registers from the CLA?
    Sorry for the maybe stupid questions but I just want to make a controller for a power electronics application for my PhD, I never learned a lot about microcontrollers/computers during my education.

    Kind regards
    Simon
  • Simon,

    How is this possible? I thought that it was possible to write to ePWM registers from the CLA?

    Yes, you can access the EPWM registers from CLA. Look like when you include this code, the code size is going up because of EPWM register structures. Are you modifying controlSUITE example here or it's new project?

    Vivek Singh

  • Hey Vivek

    Sorry I forgot to reply to this one. I adjusted a controlsuite example :)
    For the moment I left it out of the CLA and do it afterwards, since that does not give any troubles

    Kind regards
  • Closing the post.