Memory mapping for TC27xTF

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hi all,

I generate code for my program with IBM Rhapsody and then it is executed on the Application Kit TC2X7. However if I add some new functionalities in my code I have the following linker-related errors:


"C:\App\HighTec\toolchains\tricore\v4.6.6.0-infineon-1.1/bin/tricore-gcc" -o "rhp_froga.elf" -T"..\ld\iRAM.ld" "MainDefaultComponent.o" "RiCEvent.o" "RiCEventQueue.o" "RiCOSMainloop.o" "RiCOxf.o" "RiCReactive.o" "RiCTaskEM.o" "RiCTimer.o" "RiCTypes.o" "app\app.o" "app\stm1s.o" "app\stm500ms.o" "app\system_ov.o" "bsp\interrupts.o" "bsp\system_tc27x.o" "bsp\timer.o" "hw_sim\leds_bsp.o" "mxf\Adaptor\RiCOSTargetServices.o" "mxf\Utils\MemAlloc.o" "mxf\Utils\RiCProtected.o" -Wl,--gc-sections -mcpu=tc27xx -Wl,--mem-holes -Wl,--no-warn-flags -Wl,-Map="rhp_froga.map" -Wl,--cref -fshort-double -Wl,--extmap="a"
c:/app/hightec/toolchains/tricore/v4.6.6.0-infineon-1.1/bin/../lib/gcc/tricore/4.6.4/../../../../tricore/bin/ld.exe: error: section '.rodata' of MainDefaultComponent.o will not fit in output section '.rodata' (possible memory region overflow enable --warn-section-assignment for more information or disable --mem-holes)
c:/app/hightec/toolchains/tricore/v4.6.6.0-infineon-1.1/bin/../lib/gcc/tricore/4.6.4/../../../../tricore/bin/ld.exe: error: section '.rodata' of app\stm1s.o will not fit in output section '.rodata' (possible memory region overflow enable --warn-section-assignment for more information or disable --mem-holes)
c:/app/hightec/toolchains/tricore/v4.6.6.0-infineon-1.1/bin/../lib/gcc/tricore/4.6.4/../../../../tricore/bin/ld.exe: error: section '.rodata' of app\stm500ms.o will not fit in output section '.rodata' (possible memory region overflow enable --warn-section-assignment for more information or disable --mem-holes)
c:/app/hightec/toolchains/tricore/v4.6.6.0-infineon-1.1/bin/../lib/gcc/tricore/4.6.4/../../../../tricore/bin/ld.exe: error: section '.rodata' of app\system_ov.o will not fit in output section '.rodata' (possible memory region overflow enable --warn-section-assignment for more information or disable --mem-holes)
c:/app/hightec/toolchains/tricore/v4.6.6.0-infineon-1.1/bin/../lib/gcc/tricore/4.6.4/../../../../tricore/bin/ld.exe: error: section '.rodata' of bsp\system_tc27x.o will not fit in output section '.rodata' (possible memory region overflow enable --warn-section-assignment for more information or disable --mem-holes)
c:/app/hightec/toolchains/tricore/v4.6.6.0-infineon-1.1/bin/../lib/gcc/tricore/4.6.4/../../../../tricore/bin/ld.exe: error: section '.rodata' of bsp\timer.o will not fit in output section '.rodata' (possible memory region overflow enable --warn-section-assignment for more information or disable --mem-holes)
c:/app/hightec/toolchains/tricore/v4.6.6.0-infineon-1.1/bin/../lib/gcc/tricore/4.6.4/../../../../tricore/bin/ld.exe: error: rhp_froga.elf section `.data' will not fit in region `PMI_PSPR'
c:/app/hightec/toolchains/tricore/v4.6.6.0-infineon-1.1/bin/../lib/gcc/tricore/4.6.4/../../../../tricore/bin/ld.exe: error: region `PMI_PSPR' overflowed by 948 bytes
collect2: ld returned 1 exit status
make: *** [rhp_froga.elf] Error 1


I suppose that the code size is incompatible with the actual memory map set by default (.map):


Memory Configuration

Name Origin Length Used Free Attributes
PMU_PFLASH0 0x80000000 0x00200000 0x00000058 0x001fffa8 xr !p
PMU_PFLASH1 0x80200000 0x00200000 0x00000000 0x00200000 xr !p
PMU_DFLASH0 0xaf000000 0x00100000 0x00000000 0x00100000 r !xp
PMU_DFLASH0_1 0xaf100000 0x00004000 0x00000000 0x00004000 r !xp
PMU_DFLASH1 0xaf110000 0x00010000 0x00000000 0x00010000 r !xp
BROM 0x8fff8000 0x00008000 0x00000000 0x00008000 xr !p
PMI_PSPR 0xc0000000 0x00006000 0x000063b4 0xfffffc4c xw !p
DMI_DSPR 0xd0000000 0x0001c000 0x00006fc0 0x00015040 w !xp
LMU_SRAM 0x90000000 0x00008000 0x00000000 0x00008000 w !xp
*default* 0x00000000 0xffffffff 0x00000047 0xffffffb8


How can I solve this? Is there any documentation about memory configuration or procedure to do that under this architecture?

Thanks in advance
0 Likes
1 Reply
cwunder
Employee
Employee
5 likes given 50 likes received 50 solutions authored
Your program has exceeded the internal PMI_PSPR RAM size. You need to reduce your code size, or change the linker/locator from iRAM to iROM (Flash).
0 Likes