From 493cad03da8cf8ff19972fef6035e4edc31a59c1 Mon Sep 17 00:00:00 2001 From: cladmi <gaetan.harter@fu-berlin.de> Date: Wed, 15 Aug 2018 13:12:54 +0200 Subject: [PATCH] atmega_common: make rom and ram length definition mandatory Now all atmega cpu define them so use them by default. --- cpu/atmega_common/Makefile.include | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cpu/atmega_common/Makefile.include b/cpu/atmega_common/Makefile.include index f6a58df971..b7edf39398 100644 --- a/cpu/atmega_common/Makefile.include +++ b/cpu/atmega_common/Makefile.include @@ -28,9 +28,10 @@ ifeq ($(LTO),1) endif # Use ROM_LEN and RAM_LEN during link -# 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)) +$(if $(ROM_LEN),,$(error ROM_LEN is not defined)) +$(if $(RAM_LEN),,$(error RAM_LEN is not defined)) +LINKFLAGS += $(LINKFLAGPREFIX)--defsym=__TEXT_REGION_LENGTH__=$(ROM_LEN) +LINKFLAGS += $(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__),,\ -- GitLab