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