I'm having a look at automatic speculation of loads with the 7.4 series of compiler/linkers. However, if I turn it on, I get link failures for all the sections sized to exactly fit their contents. Two examples are the stack and a single pointer:
-stack 0x1000
MEMORY
{
ICB_PTR : org = 000800CFCh, len = 000000004h /* 4 bytes */
STACK : org = 000840000h, len = 000001000h /* 4096 bytes */
}
SECTIONS
{
icbPtrSect: type = NOLOAD
{
_lnk_pIcb = .;
. += 4;
} > ICB_PTR
.stack: fill = 0xCCCCCCCC
{
_lnk_DataMemoryStart = .;
} > STACK
}
but, on linking, I get:
"link.cmd", line 76: error:
program will not fit into available memory. placement with alignment fails
for section ".stack" size 0x1000 . Available memory ranges:
STACK size: 0x1000 unused: 0x1000 max hole: 0x1000
"link.cmd", line 63: error:
program will not fit into available memory. run placement with alignment
fails for section "icbPtrSect" size 0x4 . Available memory ranges:
ICB_PTR size: 0x4 unused: 0x4 max hole: 0x4
Does anyone know what is going on here and how to overcome it? I still get the errors if I remove the -mh-auto option from the file(s) access those sections but leave it there for other seemingly independent files...
The target is a C6455, if that makes any difference.
Thanks in advance,
SPH