[En-Nut-Discussion] Custom linker script

Philipp Burch phip at hb9etc.ch
Wed Sep 9 20:01:12 CEST 2015


Hi Coleman!

On 09.09.2015 17:10, Coleman Brumley wrote:
>>
>>>>>>> "Coleman" == Coleman Brumley <cbrumley at polarsoft.biz> writes:
>>
>>     Coleman> Hello.  Can I copy at91sam7x256_rom.ld to my local directory,
>>     Coleman> and will that override the linker script in the ldscripts
>>     Coleman> folder? I need to modify the location in flash where my
>>     Coleman> software loads from.
>>

In Tools -> GCC Settings, there is an option "Local Linker Script",
where you should be able to specify the path to your own ldscript. I
don't know if this is a new feature or if it is present in your Nut/OS
version already, though.

Another option could be to extend the LDFLAGS variable in your Makefile
with the path to your linker file (e.g. adding
LDFLAGS=-T /your/script.ld), but this will need some care, as the linker
then gets two files which "accumulate" according to the docs. So I'd
only use this possiblity as kind of last resort. Actually, I'm not even
sure if it is possible to craft an extension to a linker file in a
sensible manner.

Regards,
Philipp


More information about the En-Nut-Discussion mailing list