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.

run placement fails on legacy project

Other Parts Discussed in Thread: CCSTUDIO

Hello,

i recently upgraded to CCS 4 (4.2.4.00032) from CCS 3.3 (3.3.82.13) and imported my project via Project->Import Legacy  CCSv3.3 Project. The Project biult without errors under CCS 3.3 but with CCS 4 i get the follwing two faults:

run placement fails for object ".ebss", size 0x21020 (page 1). 

Available ranges: RAML1        size: 0x700        unused: 0x700        max hole: 0x700 RAMH0        size: 0x2000       unused: 0x2000       max hole: 0x2000

 

run placement fails for object ".stack", size 0x2bf (page 1). 

Available ranges: RAMM1_STACK   size: 0x2bf        unused: 0x2bf        max hole: 0x2bf

 

When i look up the .map file from V3.3 the section .ebss only has a length of 0x1001.

 

Any ideas how i can fix this? Every hint is appreciated ;)

 

Greetings

Jan

  • Jan,

    As you probably inferred, the linker errors are saying that those sections .ebss and .stack are too large to fit into the memory available in the regions they have been allocated to. You would need to either place them into memory regions with sufficient space or reduce the size of those sections.

    .ebss section is compiler generated section for uninitialized global and static variables. You could look at the link map (.map) file generated with CCS 3.3 and CCS4 and compare where the extra size is coming from. Since the version of compiler tools is different between CCS3 and CCS4 that could be introducing difference is size of these sections, but the link map file should help you understand where those differences are.

  • Thank you for this information, i decreased the stack size in the linker settings by 2 bytes and now this error is gone.

    And you are right about the different sizes of .ebss in CSS3 it looked like this:

    .ebss      1    003f8000    00001088     UNINITIALIZED
                      003f8000    00000840     Flash281x_API.obj (.ebss)
                      003f8840    0000059b     Main_DDC.obj (.ebss)
                      003f8ddb    00000001     AdjustmentDrive.obj (.ebss)
                      003f8ddc    00000004     rts2800_ml.lib : _lock.obj (.ebss)
                      003f8de0    00000004     Flash2812_API_V210.lib : Flash28_Globals.obj (.ebss)
                      003f8de4    00000002     LoadCellCalibration.obj (.ebss)
                      003f8de6    00000008     SPR_SerialInterface.obj (.ebss)
                      003f8dee    00000006     RivetAndPlateMeas.obj (.ebss)
                      003f8df4    00000005     MainProcess.obj (.ebss)
                      003f8df9    00000002     AnalyseRivetCurve.obj (.ebss)
                      003f8e00    000000ec     ISR_Functions.obj (.ebss)
                      003f8f00    00000080     rts2800_ml.lib : exit.obj (.ebss)
                      003f8f80    00000108     SPI_IO_Expander.obj (.ebss)

    and in CCS4 like this:

    .ebss      1    00000000    0002106c     FAILED TO ALLOCATE

     

    I understand that the size could change with different compiler tools but from 0x1088 to 0x2106c, thats quite a difference. Optimization was set to none in both cases.

  • Are you sure that nothing has changed in the source files between the 2 builds, like the size of a global array?

    One thing you could do is set up CCSv4 to use the same version of compiler tools that were used with CCS 3.3. Please see this wiki article on how you can set CCSv4 to use a different version of the compiler tools: http://processors.wiki.ti.com/index.php/Compiler_Installation_and_Selection#CCStudio_4.0
    This can help narrow down if there is something in the source files contributing to the increased size of .ebss section or if it is due to the different versions of codegen tools.

    What are the version of compiler tools used in the CCS3 and CCS4 projects?

     

  • Thank you for this hint.

    I switched to the code generation tools i used with CCS3 according to the wiki. And the project finished build without errors.

     

    The following versions of code generation tools were used:

    CCS4 - CGT 5.2.11

    CCS3 - CGT 5.0.2

    ----------------------- EDIT ----------------------------

    I just tried CGT 5.2.3 which was installed together with CCS4 and it also builds without error.

  • That's interesting, that 5.2.11 produces a much larger .ebss section than 5.2.3. You could use CGT 5.2.3 for now since you have a successful build with it, but the following experiment could help determine where the increased size is coming from. 

    Modify the linker command file and increase the length of the memory section where .ebss is being allocated to be large enough to fit it. Ofcourse the memory range will not be valid for the device or something you'd actually be able to run on the target, but would just be a test to create a link map file so you can see what input sections are contributing to .ebss and what their sizes are.

    You may also want to give CGT 6.0.1 a try to see if that works. This is the latest codegen tools version and is available as an update from CCS Update Manager (menu Help->Software updates->Find and Install).

     

  • I installed CGT 6.0.1 and got the same problem as with 5.2.11. Then i increased the size of the section for .ebss and found the following in the map file.

    .ebss      1    00509200    0002106c     UNINITIALIZED
                      00509200    000205c8     Main_DDC.obj (.ebss)
                      005297c8    00000008     SPR_SerialInterface.obj (.ebss)
                      005297d0    00000006     RivetAndPlateMeas.obj (.ebss)
                      005297d6    00000005     MainProcess.obj (.ebss)
                      005297db    00000001     AdjustmentDrive.obj (.ebss)
                      005297dc    00000004     Flash2812_API_V210.lib : Flash28_Globals.obj (.ebss)
                      005297e0    00000004     rts2800_ml.lib : _lock.obj (.ebss)
                      005297e4    00000004                    : exit.obj (.ebss)
                      005297e8    00000002     AnalyseRivetCurve.obj (.ebss)
                      005297ea    00000002     LoadCellCalibration.obj (.ebss)
                      005297ec    00000014     --HOLE--
                      00529800    00000840     Flash281x_API.obj (.ebss)
                      0052a040    00000108     SPI_IO_Expander.obj (.ebss)
                      0052a148    00000038     --HOLE--
                      0052a180    000000ec     ISR_Functions.obj (.ebss)

    as you can se, compared to my previous post, the Main_DDC.obj section is much bigger. Any idea where this might come from?

  • The main size difference is in Main_DDC.obj. Can you attach the preprocessed version of the source file Main_DDC.c so we can look into it?

    To create the preprocessed file, just add -ppo and -ppa to the compiler options (they should be under Build Properties->Compiler->Parser Preprocessing Options, change Mode from automatic to Manual, then enable these 2 options). This will generate a Main_DDC.pp file in the same directory. The .pp file pulls in all the necessary include files so you don't have to worry about sending all the include files separately.

    If you can attach this file and also the compile and link options used in your project, that would be helpful.

  • 6813.Main_DDC.zip

    Compiler options:

    -v28 -ml -g --preproc_only --preproc_with_compile --define="_DEBUG" --define="LARGE_MODEL" --include_path="D:/CCS4/ccsv4/tools/compiler/C2000 Code Generation Tools 6.0.1/include" --include_path="D:/CCS4/xdais_6_25_01_08/packages/ti/xdais" --include_path="../Include" --include_path="D:/Software/CCS4-Projects/SystemInclude/TI/Include" --quiet --diag_warning=225 --obj_directory="../Source/Debug/Obj"

     

    Linke options:

    -z -m"S554_0200_.map" --stack_size=0x2bd --warn_sections -i"D:/CCS4/ccsv4/tools/compiler/C2000 Code Generation Tools 6.0.1/lib" -i"D:/CCS4/ccsv4/tools/compiler/C2000 Code Generation Tools 6.0.1/include" -i"D:/Software/CCS4-Projects/S554_DDC" -i"D:/Software/CCS4-Projects/SystemInclude/TI/Lib" --reread_libs --rom_model

  • Jan,

    Thanks for providing the source file. That helped me identify the issue. The problem is that 5.2.3 (and the older version you used with CCS 3.3) actually had a bug where it was not correctly allocating an array size of greater than 64k. This was fixed in v5.2.9 and higher. If you take a look at the DefectHistory.txt file included with 5.2.11, you will see this bug described under SDSCM00038398. So the newer tools are actually doing the right thing while the older tools were not.

    Looking at your source file, the "Data" array inside struct T_ProgBuffer has a size of size 0x20000. This should actually create the very large sized .ebss section as seen in the newer tools, but the older codegen tools was truncating it and allocating much smaller space than really needed.

    Hope this clears things up.

     

  • Thank you very much for this information and the time you invested. This should help me to fix the problem.