2021-01-07 17:05:50 +01:00
|
|
|
export CPU_ATXMEGA 1
|
|
|
|
|
2021-01-23 22:19:29 +01:00
|
|
|
# should expand RAM ?
|
|
|
|
EXP_RAM = 0
|
|
|
|
|
2021-01-07 17:05:50 +01:00
|
|
|
# CPU ROM/RAM
|
|
|
|
ifneq (,$(findstring atxmega8,$(CPU_MODEL)))
|
|
|
|
RAM_LEN = 1K
|
|
|
|
ROM_LEN = 8K
|
|
|
|
endif
|
|
|
|
ifneq (,$(findstring atxmega16,$(CPU_MODEL)))
|
|
|
|
RAM_LEN = 2K
|
|
|
|
ROM_LEN = 16K
|
|
|
|
endif
|
|
|
|
ifneq (,$(findstring atxmega32,$(CPU_MODEL)))
|
|
|
|
RAM_LEN = 4K
|
|
|
|
ROM_LEN = 32K
|
|
|
|
endif
|
|
|
|
ifneq (,$(findstring atxmega64,$(CPU_MODEL)))
|
2021-01-23 22:19:29 +01:00
|
|
|
RAM_LEN = 4K
|
2021-01-07 17:05:50 +01:00
|
|
|
ROM_LEN = 64K
|
|
|
|
endif
|
2021-01-23 22:19:29 +01:00
|
|
|
ifneq (,$(findstring atxmega128,$(CPU_MODEL)))
|
|
|
|
RAM_LEN = 8K
|
2021-01-07 17:05:50 +01:00
|
|
|
ROM_LEN = 128K
|
2021-01-23 22:19:29 +01:00
|
|
|
endif
|
2021-01-07 17:05:50 +01:00
|
|
|
ifneq (,$(findstring atxmega192,$(CPU_MODEL)))
|
|
|
|
RAM_LEN = 16K
|
|
|
|
ROM_LEN = 192K
|
|
|
|
endif
|
|
|
|
ifneq (,$(findstring atxmega256,$(CPU_MODEL)))
|
|
|
|
RAM_LEN = 16K
|
|
|
|
ROM_LEN = 256K
|
|
|
|
endif
|
|
|
|
ifneq (,$(findstring atxmega384,$(CPU_MODEL)))
|
|
|
|
RAM_LEN = 32K
|
|
|
|
ROM_LEN = 384K
|
|
|
|
endif
|
|
|
|
|
2021-01-23 22:19:29 +01:00
|
|
|
ifneq (,$(findstring a1,$(shell echo $(CPU_MODEL) | cut -c8-)))
|
|
|
|
ifeq ($(EXP_RAM),1)
|
|
|
|
CFLAGS += -DRAM_LEN=$(RAM_LEN)-1
|
|
|
|
LDSCRIPT_EXTRA = -Wl,--defsym=__heap_end=0x800000+$(RAM_LEN)-1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2021-08-31 14:42:09 +02:00
|
|
|
ifneq (,$(filter atxmega128a1 atxmega128a1u atxmega128a4u,$(CPU_MODEL)))
|
|
|
|
LINKER_SCRIPT ?= avrxmega7.ld
|
|
|
|
else
|
|
|
|
LINKER_SCRIPT ?= avrxmega6.ld
|
|
|
|
endif
|
|
|
|
|
2021-01-07 17:05:50 +01:00
|
|
|
# CPU depends on the avr8 common module, so include it
|
|
|
|
include $(RIOTCPU)/avr8_common/Makefile.include
|
2021-01-23 22:19:29 +01:00
|
|
|
|
|
|
|
PSEUDOMODULE += atxmega_ebi
|