This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Scatter loading - possible to have 'root region' in library

Hi everyone,

Is it possible for armlink to handle a 'root region' from a library (not an object file)? I've tried to do that via a scatter loading file, but did not succeed.

> armlink  --noremove --callgraph --map --info totals,unused --symbols --list myprog.map   --scatter scatter.txt --entry entrypoint -o myprog.axf  myprog.o mylib.a
"scatter.txt", line 9 (column 12): Error: L6236E: No section matches selector - no section to be FIRST/LAST.

However, 'entrypoint' is part of INITCA9 section, contained in mylib.a.

> fromelf mylib.a | grep INITCA9
** Section #1 'INITCA9' (SHT_PROGBITS) [SHF_ALLOC + SHF_EXECINSTR + SHF_ENTRYSECT]

Scatter.txt looks like this:

ROM_LOAD 0x80000000
{
    ROM_EXEC +0
    {
        * (INITCA9, +First)                 ; Core initialization code
[...]

Note that linking works without complaints from armlink whenever I add the object file directly to the command line:

> armlink  --noremove --callgraph --map --info totals,unused --symbols --list myprog.map   --scatter scatter.txt --entry entrypoint -o myprog.axf  myprog.o mylib.a init.o

Thanks for your help in advance!

Ciao, Andre

0