1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

makefiles/arch/avr8: Add xmega linker conditions

The current script doesn't allow change script path and name.
Add LDSCRIPT_COMPAT_PATH and LDSCRIPT_COMPAT_NAME default
values to allow a unique path inside atxmega folder.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This commit is contained in:
Gerson Fernando Budke 2021-01-02 15:29:08 -03:00
parent 699248c65f
commit 4b2bcd560b

View File

@ -2,7 +2,14 @@
TARGET_ARCH_AVR ?= avr
TARGET_ARCH ?= $(TARGET_ARCH_AVR)
CFLAGS_CPU = -mmcu=$(CPU) $(CFLAGS_FPU)
ifeq (atxmega,$(CPU))
ifeq (,$(CPU_MODEL))
$(error CPU_MODEL must have been defined by the board Makefile.features)
endif
CFLAGS_CPU ?= -mmcu=$(CPU_MODEL) $(CFLAGS_FPU)
else
CFLAGS_CPU ?= -mmcu=$(CPU) $(CFLAGS_FPU)
endif
CFLAGS_LINK = -ffunction-sections -fdata-sections -fno-builtin -fshort-enums
CFLAGS_DBG ?= -ggdb -g3
CFLAGS_OPT ?= -Os