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.

Code size limitation for FM28335

Other Parts Discussed in Thread: CONTROLSUITE

I am using TI FM28335 MCU. I would like to know if there is any limitation of the compiler brought by CCS6. That is, do we need to buy a special compiler or software from TI in order to have unlimited feature? I am asking so because when I compile the program I edited, I found that if the length of the code is longer than a certain level, then the compiler just stopped there without any indication. If I remove some sentences in the code, then the compilation can be finished without problems.

  • Older versions of the compiler had two variants.  One was free, but code size limited.  The other one required payment, but imposed no limit on code size.  That all changed a few years ago.  All the C2000 compilers that come with CCSv6 are free in every respect.  But maybe you have a very old version of the compiler.  What is the version of the compiler (not CCS)?

    Thanks and regards,

    -George

  • Hi, George

    Can you please let me know where to check what compiler I am using with the ccsv6? And also, if it turns out the compiler I am using with the ccsv6 is with limitation, can I replace it with a Keil compiler (we purchased the license of it)?

    Thanks.
    Lin
  • There are multiple ways to see the compiler version.  One way is to look at the banner at the top of the linker map file.  This file is typically found in the Debug directory of your CCS project.  It is usually named name_of_project.map.  You will see something similar to ...

    ******************************************************************************
                 TMS320C2000 Linker PC v6.4.9                      
    ******************************************************************************

    The version in this case is 6.4.9.

    Thanks and regards,

    -George

  • Dear George,

    According to your instruction, I found

    ****************************************
    TMS320C2000 Linker PC v6.4.6
    ****************************************

    Is the version of v6.4.6 the reason for the problem I met?

    Thanks.
    Lin
  • Version 6.4.6 does not impose any limitations on code size.  What did you see that makes you think that?  Please show it exactly as you see it, with copy-n-paste, or by attaching a screen shot, or something similar.

    Thanks and regards,

    -George

  • Hi, George

    I make a Lookup Table of "Voltage vs. Current" in my code. When the length of the Table is within certain lines, the code can be compiled successfully. But if the length of the Table is increased to a level (more accurate), then the compiler says:
    "C28xx: GEL: Encountered a problem loading file: D:\work_ccs\Example_2833xEPwmDeadBand\Debug\Example_2833xEPwmDeadBand.out Could not open file"
    without any other information and then just stops. I did not change other parts of my code when I tried to add more "voltage vs. current" data to the Table to make it more accurate step by step. So I am quite sure this is not a syntax error.

    Thanks.
    Lin
  • Hi, George

    The license shown at the bottom right corner of ccsv6 is "Free License". Will that matter? My code was 32K before I added in those Lookup Table sentences which caused the failure of the compilation.

    Thanks.
    Lin
  • That message is from CCS, not the compiler. The compilation appears to have completed successfully. Unfortunately, I am not a CCS expert, so I can't help you with that "GEL" error. We may need to move this thread to the CCS forum.
  • Hi, Archaeologist,

    Can you please move this topic to the CCS forum for me? Perhaps the history of our conversation can help them understand what is going on in my case.

    Thanks.
    Lin
  • This diagnostic ...

    Lin Zhang85 said:
    "C28xx: GEL: Encountered a problem loading file: D:\work_ccs\Example_2833xEPwmDeadBand\Debug\Example_2833xEPwmDeadBand.out Could not open file"

    does not come from the compiler.  It comes from elsewhere in CCS.  Was the build successful?  Is that .out file really there?

    Thanks and regards,

    -George

  • Hi, George

    Yes, the .out file is really there in the above indicated path. I generally click the little "debug" button in ccsv6 to run the code instead of building first and then running it. I think in that case, it was not built successfully.

    Thanks.
    Lin
  • Lin Zhang85 said:
    I generally click the little "debug" button in ccsv6

    When you click that button, CCS rebuilds the project if needed.  If this build fails, then the .out file is not present.  Please see if that is what occurred.

    Thanks and regards,

    -George

  • Hi, George

    Yes, it was as you described.

    I tried first run by clicking the "debug" button the code with one Lookup Table sentence less. The code can be compiled successfully. I checked and found there was a "Example_2833xEPwmDeadBand.out" file in the "debug" folder.

    I then added in one more "voltage vs. current" sentence onto the code and rerun it. This time, the compilation stopped with error message "C28xx: GEL: Encountered a problem loading file: D:\work_ccs\Example_2833xEPwmDeadBand\Debug\Example_2833xEPwmDeadBand.out Could not open file". I re-checked the "debug" folder and found the "Example_2833xEPwmDeadBand.out" file was gone.

    Thanks.
    Lin
  • Hi, George

    All what I have done is in the ADC Interrupt Service Routing (ISR) - "interrupt void adc_isr(void)". Will this be the reason causing trouble mentioned above?

    Thanks.
    Lin
  • Lin Zhang85 said:
    I then added in one more "voltage vs. current" sentence onto the code and rerun it. This time, the compilation stopped with error message "C28xx: GEL: Encountered a problem loading file: D:\work_ccs\Example_2833xEPwmDeadBand\Debug\Example_2833xEPwmDeadBand.out Could not open file". I re-checked the "debug" folder and found the "Example_2833xEPwmDeadBand.out" file was gone.

    I presume this is not the only diagnostic.  The compiler or linker issued yet other diagnostics before this one.  You need to focus on whatever causes those earlier diagnostics.

    Thanks and regards,

    -George

  • Hi, George

    I tried "Project--->Build All" this time and got detailed error messages as shown below. Once I remove some Lookup Table lines, then the Build can be finished successfully. Please check the error message for me.

    Thanks.
    Lin

    **** Build of configuration Debug for project Example_2833xEPwmDeadBand ****

    "C:\\ti_Jan-28-2016\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: ../Example_2833xEPwmDeadBand.c'
    'Invoking: C2000 Compiler'
    "C:/ti_Jan-28-2016/ccsv6/tools/compiler/ti-cgt-c2000_6.4.6/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --include_path="C:/ti_Jan-28-2016/ccsv6/tools/compiler/ti-cgt-c2000_6.4.6/include" --include_path="/packages/ti/xdais" --include_path="C:/ti_Jan-28-2016/controlSUITE/device_support/f2833x/v141/DSP2833x_headers/include" --include_path="C:/ti_Jan-28-2016/controlSUITE/device_support/f2833x/v141/DSP2833x_common/include" --include_path="C:/ti_Jan-28-2016/controlSUITE/libs/math/IQmath/v15c/include" --include_path="C:/ti_Jan-28-2016/controlSUITE/libs/math/FPUfastRTS/V100/include" -g --define="_DEBUG" --define="LARGE_MODEL" --quiet --verbose_diagnostics --diag_warning=225 --diag_suppress=10063 --issue_remarks --output_all_syms --cdebug_asm_data --preproc_with_compile --preproc_dependency="Example_2833xEPwmDeadBand.pp" "../Example_2833xEPwmDeadBand.c"
    'Finished building: ../Example_2833xEPwmDeadBand.c'
    ' '
    'Building target: Example_2833xEPwmDeadBand.out'
    'Invoking: C2000 Linker'
    "C:/ti_Jan-28-2016/ccsv6/tools/compiler/ti-cgt-c2000_6.4.6/bin/cl2000" -v28 -ml -mt --float_support=fpu32 -g --define="_DEBUG" --define="LARGE_MODEL" --quiet --verbose_diagnostics --diag_warning=225 --diag_suppress=10063 --issue_remarks --output_all_syms --cdebug_asm_data -z -m"Example_2833xEPwmDeadBand.map" --stack_size=0x380 --warn_sections -i"C:/ti_Jan-28-2016/ccsv6/tools/compiler/ti-cgt-c2000_6.4.6/lib" -i"C:/ti_Jan-28-2016/ccsv6/tools/compiler/ti-cgt-c2000_6.4.6/include" -i"C:/ti_Jan-28-2016/controlSUITE/device_support/f2833x/v141/DSP2833x_examples_ccsv5/epwm_deadband" -i"C:/ti_Jan-28-2016/controlSUITE/device_support/f2833x/v141/DSP2833x_common/lib" -i"C:/ti_Jan-28-2016/controlSUITE/libs/math/IQmath/v15c/lib" -i"C:/ti_Jan-28-2016/controlSUITE/libs/math/FPUfastRTS/V100/lib" --reread_libs --priority --verbose_diagnostics --issue_remarks --xml_link_info="Example_2833xEPwmDeadBand_linkInfo.xml" --entry_point=code_start --rom_model -o "Example_2833xEPwmDeadBand.out" -l"rts2800_fpu32_fast_supplement.lib" -l"rts2800_fpu32.lib" "./DSP2833x_ADC_cal.obj" "./DSP2833x_CodeStartBranch.obj" "./DSP2833x_CpuTimers.obj" "./DSP2833x_DefaultIsr.obj" "./DSP2833x_EPwm.obj" "./DSP2833x_GlobalVariableDefs.obj" "./DSP2833x_PieCtrl.obj" "./DSP2833x_PieVect.obj" "./DSP2833x_SysCtrl.obj" "./DSP2833x_usDelay.obj" "./Example_2833xEPwmDeadBand.obj" "C:/ti_Jan-28-2016/controlSUITE/device_support/f2833x/v141/DSP2833x_common/cmd/28335_RAM_lnk.cmd" "C:/ti_Jan-28-2016/controlSUITE/device_support/f2833x/v141/DSP2833x_headers/cmd/DSP2833x_Headers_nonBIOS.cmd" -l"IQmath_fpu32.lib"
    "C:/ti_Jan-28-2016/controlSUITE/device_support/f2833x/v141/DSP2833x_common/cmd/28335_RAM_lnk.cmd", line 125: error:
    program will not fit into available memory. placement with
    alignment/blocking fails for section ".text" size 0x100b page 0. Available
    memory ranges:
    RAML1 size: 0x1000 unused: 0x1000 max hole: 0x1000
    .text : > RAML1, PAGE = 0
    error: errors encountered during linking; "Example_2833xEPwmDeadBand.out" not
    built

    >> Compilation failure
    gmake: *** [Example_2833xEPwmDeadBand.out] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****
  • By adding a bit more code, the .text section grows to size 0x100b words.  This means it no longer fits in the memory range it is allocated to by the linker command file C:/ti_Jan-28-2016/controlSUITE/device_support/f2833x/v141/DSP2833x_common/cmd/28335_RAM_lnk.cmd .  This memory range is named RAML1.  The length of this memory range is 0x1000 words.  

    Solutions to this problem are discussed in this wiki article.  That said, I hesitate to tell you to modify that linker command file.  You could violate constraints of your device.  I am not an expert on those details.  For help with those details, I recommend you begin a new thread in the C2000 device forum.  

    Thanks and regards,

    -George

  • Hi, George

    Thank you so much for your help. I will move this topic to the C2000 Device Forum.

    Best.
    Lin
  • Lin,

    Here is a wiki page on the Linker:
    processors.wiki.ti.com/.../C28x_Compiler_-_Understanding_Linking

    Specifically, look at the Question: "The linker says "placement fails for object '.text' ". How can I make more memory available for .text?"
    You need to allocate more memory for your .text section. Refer to your device datasheet for the memory map. Generally, you can combine multiple RAM blocks into one larger RAM block.

    If you are working with the ContrlSUITE examples, I would recommend that you create a copy of the original linker, and use a modified version. This way you will have a golden reference to go back to if things go wrong.

    Please read through that Wiki page. If you have any more questions, don't hesitate to post.

    Thanks,
    Mark