Simple question: why there are two linker script files in Atmel Studio 7 ASF4 project?
One links the program to flash, one links the project to SRAM...
(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)
The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.
In my project settings the linker uses flash.ld.
If I delete the sram.ld file I have no compile error and my board works.
So I suppose sram.ld is unused for a "default" project.
Is it needed if I want my code to be executed entirely in ram instead of flash?
I think projects defaults to flash for devices with flash. If you want your program to be linked to run from ram (note, linked, it still has to 'get there'), then you can change the -T option in the project properties.
I think we provide both since it's not that unusual, and some examples are good.
Ok, thank you very much.
© 2020 Microchip Technology Inc.