Hi,
I have two RAM regions, and want to have all unused space in one block in one region. Default behavior is to distribute unused space between blocks ("worst-fit").
But when I add "--any_placement=first_fit" I get:
Error: L6220E: Execution region RW_DTCM size (61432 bytes) exceeds limit (61423 bytes). Region contains 11 bytes of padding and 0 bytes of veneers (total 11 bytes of linker generated content).Error: L6221E: Execution region RW_DTCM with Execution range [0x20001010,0x20010008) overlaps with Execution region RW_SRAM1 with Execution range [0x20010000,0x2004fa60).
It seems as the linker forgets to include padding in its calculation of when the region is full.
"--any_contingency" does not resolve the issue.
The padding stems from some external libraries, and it cannot be avoided.
My overall goal is to have all unallocated memory in one continuous block, for use as a "my special heap".
Relevant scatter stuff:
RW_DTCM 0x20001010 0x0000EFEF { *(DMA_MEMORY) .ANY2 (+RW +ZI) } RW_SRAM1 0x20010000 0x0003FFF0 { .ANY1 (+RW +ZI) }
Linker version:
Product: MDK Essential 5.28 (Flex)Component: ARM Compiler 5.06 update 6 (build 750)Tool: armlink [4d35ed]
Thanks for Your suggestions,
I tried with and without ANYx priorities, the results are the same.
I did not expect ANY_SIZE to work, as my region has "stuff" + "ANY". But it turns out that ANY_SIZE is not just the size of "ANY", but rather "everything in the region except padding and veneer".
Solution:
Manually reducing the ANY_SIZE by 16 bytes. (left me with 7 bytes of unused space in this region)
RW_DTCM 0x20001010 0x0000EFEF {
Changed to:
RW_DTCM 0x20001010 ANY_SIZE 0x0000EFDF 0x0000EFEF {
It is not a beautiful solution, but it will do.
Thanks a lot.
P.S. My major concern is that somebody has to manually fiddle with these numbers in the future, and I still think a linker should be able to count padding + veneers... :-)