mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
cpu/cortexm_common: add riotboot and slot support
RIOTBOOT_SLOT_LEN is calculated as an hexadecimal value and handles ROM_LEN defined as kilobytes like '512K' This enables support for all the cortex-m0+/3/4/7 arch, so most boards embedding these are potentially supported. One needs just to ensure that the CPU can be initialised at least twice. Co-authored-by: Gaëtan Harter <gaetan.harter@fu-berlin.de>
This commit is contained in:
parent
9cfdf6e379
commit
7a6849ca17
@ -24,3 +24,11 @@ TOOLCHAINS_SUPPORTED = gnu llvm
|
||||
LINKFLAGS += $(if $(ROM_OFFSET),$(LINKFLAGPREFIX)--defsym=_rom_offset=$(ROM_OFFSET))
|
||||
# FW_ROM_LEN: rom length to use for firmware linking. Allows linking only in a section of the rom.
|
||||
LINKFLAGS += $(if $(FW_ROM_LEN),$(LINKFLAGPREFIX)--defsym=_fw_rom_length=$(FW_ROM_LEN))
|
||||
|
||||
|
||||
# Configure riotboot bootloader and slot lengths
|
||||
# 4KB are currently enough
|
||||
RIOTBOOT_LEN ?= 0x1000
|
||||
# Take the whole flash minus RIOTBOOT_LEN
|
||||
SLOT0_LEN ?= $(shell printf "0x%x" $$(($(ROM_LEN:%K=%*1024)-$(RIOTBOOT_LEN))))
|
||||
SLOT0_LEN := $(SLOT0_LEN)
|
||||
|
Loading…
Reference in New Issue
Block a user