I would like to migrate from GCC to the new ARM COMPILER 6. But I'm not able to well convert the Gnu liker script (ld) to the equivalent of ARM Scatter file.
The Original Code is as following:
arm-none-eabi-ld -T link.ld test.o shared/bootcode.o shared/vertors.o -o test.elf
Where link.ld script is as following
ENTRY(bootcode) SECTIONS { . = 0x00000000; /* Code starts with vectors, then bootcode, then other code */ .text : { *vectors.o(vectors) *bootcode.o(boot) *(.text) /* remainder of code */ } =0 .data : { *(.data) } .bss : { *(.bss) } /* Notes section * This is not used so we discard it. Although not used it needs to be * explicitly mentioned in the linker script as some toolchains will place * the notes section at adderss 0 if it is not explicitly mentioned*/ /DISCARD/ : { *(.note*) } }
I would like to use armlink as a linker :
armlink --cpu=8-A.32 --entry=bootcode test.o shared/bootcode.o shared/vertors.o -o test.elf --scatter=ld.scat
But I did not succeed in Creating a valid scatter File. I tried to play with the armlink options (--first, --last, --ro_base, --rw_base) but nothing went as expected (I'm getting successful compilation but the test is not working).
Any Idea on that please?