1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/gd32v/Makefile.include
Benjamin Valentin d26937fe9c cpu/gd32v: don't set FW_ROM_LEN to ROM_LEN
FW_ROM_LEN is supposed to be a subset of ROM_LEN that contains the firmware
(without bootloader, AUX slot).
2024-02-28 13:49:12 +01:00

34 lines
859 B
Makefile

RAM_START_ADDR ?= 0x20000000
ROM_START_ADDR ?= 0x08000000
ifneq (,$(filter gd32vf103%bt6 gd32vf103%bu6,$(CPU_MODEL)))
RAM_LEN ?= 32K
ROM_LEN ?= 128K
else ifneq (,$(filter gd32vf103%8t6 gd32vf103%8u6,$(CPU_MODEL)))
RAM_LEN ?= 20K
ROM_LEN ?= 64K
else ifneq (,$(filter gd32vf103%6t6 gd32vf103%6u6,$(CPU_MODEL)))
RAM_LEN ?= 10K
ROM_LEN ?= 32K
else ifneq (,$(filter gd32vf103%4t6 gd32vf103%4u6,$(CPU_MODEL)))
RAM_LEN ?= 6K
ROM_LEN ?= 16K
else
$(error CPU model $(CPU_MODEL) not supported)
endif
ROM_LEN := $(shell printf "0x%x" $$(($(ROM_LEN:%K=%*1024))))
RIOTBOOT_HDR_LEN ?= 0x400
ifneq (,$(filter usbus_dfu tinyusb_dfu,$(USEMODULE)))
RIOTBOOT_LEN ?= 0x4000
else
RIOTBOOT_LEN ?= 0x1000
endif
LINKER_SCRIPT ?= riscv.ld
CFLAGS += -DCPU_MODEL_$(call uppercase_and_underscore,$(CPU_MODEL))
include $(RIOTCPU)/riscv_common/Makefile.include