Skip to content

Commit

Permalink
cpu/kinetis: change ROM_LEN to not use shell arithmetic
Browse files Browse the repository at this point in the history
Define ROM_LEN with a non arithmetic value as it is evaluated in
`cortexm_common` without a shell context.
The `K` is correctly handled by both the linker and `cortexm_common`.

This fixes issues when `ROM_LEN` is evaluated in
cortexm_common/Makefile.include.
  • Loading branch information
cladmi committed Feb 22, 2019
1 parent ae67414 commit 219f22c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cpu/kinetis/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -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 is 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 += \
Expand Down

0 comments on commit 219f22c

Please sign in to comment.