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.
Hi,
I have #10099D program will not fit into available memory error. I am using 2837xD_FLASG_lnk_CPU1.cmd file. I have 4 source files, it worked fine, but after adding fft.c file (120 line) it won't fin into flash memory.
In the Memory Allocation window the FALSHB is purple and show (100%) But the chip contains 1MB flash. I do not understand it.
Please help!
Tanks,
Louis
PS: How can I attach the command file? Drag and Drop does nothing...Okay this part solved I have to ZIP the CMD files
Hopefully you find the compilation log. I could not find any *.log file but I zipped which were modified during the last build CPU1_FLASH folder.
If you need a specific file please send me it's name.
Thanks,
LouisCompilation_log.zip
Louis,
What I meant by compilation log was the console output when you trigger the build of your project in CCS. You can save that to a file and send it.
Best Regards
Siddharth
Hi Siddharth,
Okay my fault. Here it is:
**** Build of configuration CPU1_FLASH for project adc_ex11_multiple_soc_epwm ****
"C:\\ti\\ccs1110\\ccs\\utils\\bin\\gmake" -k -j 16 all -O
Building file: "../Items/items.c"
Invoking: C2000 Compiler
"C:/ti/ccs1110/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 -Ooff --fp_mode=relaxed --include_path="C:/Users/lbala/ccs/workspace_v11/adc_ex11_multiple_soc_epwm" --include_path="C:/Users/lbala/ccs/workspace_v11/adc_ex11_multiple_soc_epwm/device" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f2837xd/driverlib" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/calibration/hrpwm/F2837xD/include" --include_path="C:/ti/ccs1110/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/include" --define=DEBUG --define=CPU1 --define=_FLASH --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="Items/items.d_raw" --include_path="C:/Users/lbala/ccs/workspace_v11/adc_ex11_multiple_soc_epwm/CPU1_FLASH/syscfg" --obj_directory="Items" "../Items/items.c"
Finished building: "../Items/items.c"
Building file: "../fft.c"
Invoking: C2000 Compiler
"C:/ti/ccs1110/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 -Ooff --fp_mode=relaxed --include_path="C:/Users/lbala/ccs/workspace_v11/adc_ex11_multiple_soc_epwm" --include_path="C:/Users/lbala/ccs/workspace_v11/adc_ex11_multiple_soc_epwm/device" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f2837xd/driverlib" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/calibration/hrpwm/F2837xD/include" --include_path="C:/ti/ccs1110/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/include" --define=DEBUG --define=CPU1 --define=_FLASH --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="fft.d_raw" --include_path="C:/Users/lbala/ccs/workspace_v11/adc_ex11_multiple_soc_epwm/CPU1_FLASH/syscfg" "../fft.c"
"../fft.c", line 88 (col. 34): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 88 (col. 34): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 88 (col. 34): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 88 (col. 60): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 88 (col. 45): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 88 (col. 47): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 88 (col. 62): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 91 (col. 34): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 91 (col. 34): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 91 (col. 34): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 91 (col. 60): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 91 (col. 45): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 91 (col. 47): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 91 (col. 62): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 95 (col. 34): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 95 (col. 34): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 95 (col. 34): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 95 (col. 60): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 95 (col. 45): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 95 (col. 47): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 95 (col. 62): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 98 (col. 34): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 98 (col. 34): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 98 (col. 34): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 98 (col. 60): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 98 (col. 45): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 98 (col. 47): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
"../fft.c", line 98 (col. 62): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.
Finished building: "../fft.c"
Building file: "../main.c"
Invoking: C2000 Compiler
"C:/ti/ccs1110/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 -Ooff --fp_mode=relaxed --include_path="C:/Users/lbala/ccs/workspace_v11/adc_ex11_multiple_soc_epwm" --include_path="C:/Users/lbala/ccs/workspace_v11/adc_ex11_multiple_soc_epwm/device" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f2837xd/driverlib" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/calibration/hrpwm/F2837xD/include" --include_path="C:/ti/ccs1110/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/include" --define=DEBUG --define=CPU1 --define=_FLASH --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="main.d_raw" --include_path="C:/Users/lbala/ccs/workspace_v11/adc_ex11_multiple_soc_epwm/CPU1_FLASH/syscfg" "../main.c"
Finished building: "../main.c"
Building target: "adc_ex11_multiple_soc_epwm.out"
Invoking: C2000 Linker
"C:/ti/ccs1110/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 -Ooff --fp_mode=relaxed --define=DEBUG --define=CPU1 --define=_FLASH --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi -z -m"adc_ex11_multiple_soc_epwm.map" --heap_size=0x200 --stack_size=0x3F8 --warn_sections -i"C:/ti/ccs1110/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/lib" -i"C:/ti/ccs1110/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="adc_ex11_multiple_soc_epwm_linkInfo.xml" --entry_point=code_start --rom_model -o "adc_ex11_multiple_soc_epwm.out" "./fft.obj" "./main.obj" "./Items/items.obj" "./device/F2837xD_CodeStartBranch.obj" "./device/device.obj" "../2837xD_FLASH_lnk_cpu1.cmd" "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/calibration/hrpwm/f2837xd/lib/SFO_v8_fpu_lib_build_c28_driverlib.lib" "C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f2837xd/driverlib/ccs/Debug/driverlib.lib" -llibc.a
<Linking>
"../2837xD_FLASH_lnk_cpu1.cmd", line 78: 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 ".cinit" size 0x1d page 0. Available memory ranges:
FLASHB size: 0x2000 unused: 0x0 max hole: 0x0
error #10010: errors encountered during linking; "adc_ex11_multiple_soc_epwm.out" not built
>> Compilation failure
makefile:151: recipe for target 'adc_ex11_multiple_soc_epwm.out' failed
gmake[1]: *** [adc_ex11_multiple_soc_epwm.out] Error 1
makefile:147: recipe for target 'all' failed
gmake: *** [all] Error 2
**** Build Finished ****
I think the problem is that I called sin(x), cos(x) and atan(x) which uses 64-bit FP numbers. If I modify the calls to sinf(x), cosf(x), atanf(x) then the error disappears. But I have to know how can I program an app which is greater than 8192 bytes flash segment. It is funny: this MCU has 1MB flash. Memory Allocation when there is error:
When I use the 32-but sinf(x) functions the Memory Allocation is:
Thanks for your help.
Louis
Louis,
From the error, the placement is failing for ".cinit" section.
Pls update the linker command file 2837xD_FLASH_lnk_cpu1.cmd file to update the line for ".cinit" as below
.cinit : >> FLASHB | FLASHC PAGE = 0, ALIGN(8)
This will indicate to the compiler to use FlashB and FlashC regions for allocation of this section.
Let us know if you are able to resolve this issue after updating this file.
Best Regards
Siddharth
Hi Siddharth,
I accidentally pressed "this resolved my issue" button, but I could not undo that.
This answer does not solve my issue because after the modification I got a waning message: "...split placement for this section is not permitted..."
Louis
PS: How can I remove RESOLVED from your answer?
Louis,
Certain sections must remain contiguous in memory and cannot be split. Looks like .cinit is one of them.
You can create a combined memory range (FlashA and FlashB) for this section
FLASHA_B : origin = 0x080002, length = 0x003FFE /* on-chip Flash */
FLASHC : origin = 0x084000, length = 0x002000 /* on-chip Flash */
then specify the same name for .cinit
.cinit : > FLASHA_B PAGE = 0, ALIGN(8)
You will have to update the linker command file to change FlashB to other Flash memory region since FlashB is combined.
Best Regards
Siddharth
Hi Siddharth,
It is even worse:
Errors, warnings:
#10010 errors encountered during linking; "adc_ex11_multiple_soc_epwm.out" not built adc_ex11_multiple_soc_epwm C/C++ Problem
<a href="file:/C:/ti/ccs1110/ccs/tools/compiler/dmed/HTML/10099.html">#10099-D</a> 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. run placement with alignment/blocking fails for section ".init_array" size 0 page 0 2837xD_FLASH_lnk_cpu1.cmd /adc_ex11_multiple_soc_epwm line 94 C/C++ Problem
<a href="file:/C:/ti/ccs1110/ccs/tools/compiler/dmed/HTML/10099.html">#10099-D</a> 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. run placement with alignment/blocking fails for section ".switch" size 0 page 0 2837xD_FLASH_lnk_cpu1.cmd /adc_ex11_multiple_soc_epwm line 90 C/C++ Problem
gmake: *** [all] Error 2 adc_ex11_multiple_soc_epwm C/C++ Problem
gmake[1]: *** [adc_ex11_multiple_soc_epwm.out] Error 1 adc_ex11_multiple_soc_epwm C/C++ Problem
#10097 memory range not found: FLASHB on page 0 2837xD_FLASH_lnk_cpu1.cmd /adc_ex11_multiple_soc_epwm line 86 C/C++ Problem
#10097 memory range not found: FLASHB on page 0 2837xD_FLASH_lnk_cpu1.cmd /adc_ex11_multiple_soc_epwm line 90 C/C++ Problem
#10097 memory range not found: FLASHB on page 0 2837xD_FLASH_lnk_cpu1.cmd /adc_ex11_multiple_soc_epwm line 94 C/C++ Problem
Would please test your suggestions first? Thank you!
I do not know why a programmer should write the linker command file. I have app, which consists 54 files, and it's size not larger than 30KB and I cannot flash it into a MCU which contains 1MB flash memeory? If you subtract the start address 0x080000 to address 0x0C00000 = 0x040000 = around 262KB. Where is the 3/4 of the flash?
Louis
Louis,
I had already mentioned that you will have to update the linker command file to change FlashB to other Flash memory regions since FlashB will be combined.
If you read the error , it states the "memory range not found: FLASHB" since it no longer exists.
Pls try using the attached linker command file
Best Regards
Siddharth
Hi Siddharth,
This file seems to me okay, there is no error but FLASHC = 8192 (100%)
As my application grows, should I modify the linker file? I mean should I add the currently not used FLASH G/H/I/J...N segments, like this:
.text : >> FLASHC | FLASHD | FLASHE | FLASHF | FLASHG |FLASHH |FLASHI PAGE = 0, ALIGN(8)
Questions:
Many thanks for your help.
Louis
Louis,
1. Yes, as your program/code size increases , you need to allocate additional memory regions that are currently not used
2. Pls refer the datasheet for the Flash memory map. Each CPU has its own flash bank [256KW], the total flash for each device is 512KW
3. Lenght of FLASHE is 0x8000 which might have accomodated the entire .cinit section, hence it might have solved the issue. Length of FlashA is only 0x2000.
Best Regards
Siddharth