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
So have you made sure your processor has enough RAM for both the global variables and stack and heap? Or if it has multiple RAM regions - have you made sure you allocations allows the linker to fit the global data requirements of the individual object files in a way that makes it fit into the available RAM regions?
Hi Per,
You've been hit by Erik's keyboard bug ;)
Yes, and it's not the first time. The browser sometimes takes a delay finishing the loading of the page. And so it ignores the click in the text input box and instead places a couple of characters before the original "First Name" characters.
This is the only web site I have seen that has this issue. But then it's also the only forum I visit that doesn't have real user accounts.
And the only way to fix the problem is to make a new post - or clear the cookie which means the next thread you post in will result in lots of mails sent out even if the "Send me e-mail when anyone posts to this thread" isn't checked.
Hi ImPer Westermark,
Yes I can see the RAM allocation in options for target as 0x8000k, so 32768k bytes were allocated for RAM.
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.
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