diff --git a/cpu/kinetis/Makefile.include b/cpu/kinetis/Makefile.include index a5f36b4ed0..c2b50b817d 100644 --- a/cpu/kinetis/Makefile.include +++ b/cpu/kinetis/Makefile.include @@ -13,7 +13,10 @@ LINKER_SCRIPT = kinetis.ld ROM_START_ADDR = 0x00000000 RAM_BASE_ADDR = 0x20000000 RAM_START_ADDR = $$(($(RAM_BASE_ADDR)-($(KINETIS_SRAM_L_SIZE) * 1024))) -ROM_LEN = $$(($(KINETIS_ROMSIZE) * 1024)) +# Define ROM_LEN with a non arithmetic value as it must be +# evaluated in `cortexm_common` without a shell context +# The `K` is correctly handled by both the linker and `cortexm_common`. +ROM_LEN = $(KINETIS_ROMSIZE)K RAM_LEN = $$(($(KINETIS_RAMSIZE) * 1024)) CFLAGS += \