Hello Everybody,
I sreeni, working on Tiva C series MCU(32K RAM) based application and want to allocate the space in heap of more than 0x1000 bytes of memory.
It works fine when I allocate 0x1000 bytes of memory in startup.s file, but in my application I need to allocate a memory of 10K but I am getting the following error when I try to allocate more than 0x1000 bytes of heap space in startup.c file.
linking... Trial_Link_CSU.axf: Error: L6406E: No space in execution regions with .ANY selector matching startup.o(STACK). Trial_Link_CSU.axf: Error: L6406E: No space in execution regions with .ANY selector matching picojpeg.o(.data). Trial_Link_CSU.axf: Error: L6406E: No space in execution regions with .ANY selector matching variables.o(.bss). Trial_Link_CSU.axf: Error: L6406E: No space in execution regions with .ANY selector matching mmc-ek-lm4f232h5qd.o(.data). Trial_Link_CSU.axf: Error: L6406E: No space in execution regions with .ANY selector matching variables.o(.data). Trial_Link_CSU.axf: Error: L6407E: Sections of aggregate size 0x16c bytes could not fit into .ANY selector(s). Target not created
Any help is appreciated.
Thanks, sreeni
Your 32 kiloB RAM should suddenly fit 32 MegaByte?
By the way - is this a normal build, with the code placed in flash? Or is it a build where you try to place the code too in RAM? Because the linker is clearly unhappy that the amount of RAM you allows it to play with isn't enough for what you want it to cram into that RAM region.
Hi Per,
Sorry its 0x8000 bytes not 0x8000k...I am sorry for wrong typing.
thanks srini
Does the scatter file (.SCT) suggest some restricted segment/section sizing that would limit the allocation?
Hi Westonsupermare Pier,
Sorry for the late response my .sct file is as follows.
LR_IROM1 0x00000000 0x00040000 { ; load region size_region ER_IROM1 0x00000000 0x00040000 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) } RW_IRAM1 0x20000000 0x00008000 { ; RW data .ANY (+RW +ZI) } }
BTW when I am using the Linker option "Use Memory Layout from Target Dialog" then it is allowing me to allocate only 0x6000 bytes of heap and the output window shows the Program size as below.
Program Size: Code=12918 RO-data=98 RW-data=124 ZI-data=28916
Yes, As you said .sct was limiting the memory allocation and it was resolved by editing the .sct as previous post it works fine.
Thanks for all who helped me to resolve the issue.
Thanks srini