Skip to content
Snippets Groups Projects
Unverified Commit 098770ae authored by cladmi's avatar cladmi
Browse files

atmega_common: use binutils 2.26 ldscript for older versions

This allows configuring __TEXT_REGION_LENGTH__ and __DATA_REGION_LENGTH__
for previous versions (ubuntu xenial for example).
parent 56a1ac4f
No related branches found
No related tags found
No related merge requests found
......@@ -31,3 +31,8 @@ endif
# It is made optional until all boards are updated
LINKFLAGS += $(if $(ROM_LEN),$(LINKFLAGPREFIX)--defsym=__TEXT_REGION_LENGTH__=$(ROM_LEN))
LINKFLAGS += $(if $(RAM_LEN),$(LINKFLAGPREFIX)--defsym=__DATA_REGION_LENGTH__=$(RAM_LEN))
# Use newer linker script to have ROM/RAM configuration symbols in binutils<2.26
LDSCRIPT_COMPAT = $(if $(shell $(TARGET_ARCH)-ld --verbose | grep __TEXT_REGION_LENGTH__),,\
-T$(RIOTCPU)/$(CPU)/ldscripts_compat/avr_2.26.ld)
LINKFLAGS += $(LDSCRIPT_COMPAT)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment