mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sys/riotboot: common default NUM_SLOT, SLOT_* config
This commit is contained in:
parent
9be2421890
commit
06426c41b0
@ -76,13 +76,6 @@ ifneq (,$(filter usbus_dfu tinyusb_dfu,$(USEMODULE)))
|
|||||||
else
|
else
|
||||||
RIOTBOOT_LEN ?= 0x1000
|
RIOTBOOT_LEN ?= 0x1000
|
||||||
endif
|
endif
|
||||||
# Currently 2 slots are supported by default, equals in length
|
|
||||||
NUM_SLOTS ?= 2
|
|
||||||
# Take the whole flash minus RIOTBOOT_LEN and divide it by NUM_SLOTS
|
|
||||||
SLOT0_LEN ?= $(shell printf "0x%x" $$((($(ROM_LEN:%K=%*1024)-$(RIOTBOOT_LEN)) / $(NUM_SLOTS))))
|
|
||||||
SLOT1_LEN ?= $(SLOT0_LEN)
|
|
||||||
SLOT0_LEN := $(SLOT0_LEN)
|
|
||||||
SLOT1_LEN := $(SLOT1_LEN)
|
|
||||||
|
|
||||||
# JLink is able to flash any ARM CPUs
|
# JLink is able to flash any ARM CPUs
|
||||||
PROGRAMMERS_SUPPORTED += jlink
|
PROGRAMMERS_SUPPORTED += jlink
|
||||||
|
@ -26,13 +26,6 @@ else
|
|||||||
RIOTBOOT_LEN ?= 0x1000
|
RIOTBOOT_LEN ?= 0x1000
|
||||||
endif
|
endif
|
||||||
|
|
||||||
NUM_SLOTS ?= 2
|
|
||||||
|
|
||||||
SLOT0_LEN ?= $(shell printf "0x%x" $$((($(ROM_LEN:%K=%*1024)-$(RIOTBOOT_LEN)) / $(NUM_SLOTS))))
|
|
||||||
SLOT1_LEN ?= $(SLOT0_LEN)
|
|
||||||
SLOT0_LEN := $(SLOT0_LEN)
|
|
||||||
SLOT1_LEN := $(SLOT1_LEN)
|
|
||||||
|
|
||||||
LINKER_SCRIPT ?= riscv.ld
|
LINKER_SCRIPT ?= riscv.ld
|
||||||
|
|
||||||
CFLAGS += -DCPU_MODEL_$(call uppercase_and_underscore,$(CPU_MODEL))
|
CFLAGS += -DCPU_MODEL_$(call uppercase_and_underscore,$(CPU_MODEL))
|
||||||
|
@ -5,6 +5,15 @@
|
|||||||
# aligned according to CPU_IRQ_NUMOF (ref: cpu/cortexm_common/Makefile.include)
|
# aligned according to CPU_IRQ_NUMOF (ref: cpu/cortexm_common/Makefile.include)
|
||||||
RIOTBOOT_HDR_LEN ?= 0x100
|
RIOTBOOT_HDR_LEN ?= 0x100
|
||||||
|
|
||||||
|
# Currently 2 slots are supported by default, equals in length
|
||||||
|
NUM_SLOTS ?= 2
|
||||||
|
|
||||||
|
# Take the whole flash minus RIOTBOOT_LEN and divide it by NUM_SLOTS
|
||||||
|
SLOT0_LEN ?= $(shell printf "0x%x" $$((($(ROM_LEN:%K=%*1024)-$(RIOTBOOT_LEN)) / $(NUM_SLOTS))))
|
||||||
|
SLOT1_LEN ?= $(SLOT0_LEN)
|
||||||
|
SLOT0_LEN := $(SLOT0_LEN)
|
||||||
|
SLOT1_LEN := $(SLOT1_LEN)
|
||||||
|
|
||||||
# By default, slot 0 is found just after RIOTBOOT_LEN. Slot 1 after
|
# By default, slot 0 is found just after RIOTBOOT_LEN. Slot 1 after
|
||||||
# slot 0. The values might be overridden to add more or less offset
|
# slot 0. The values might be overridden to add more or less offset
|
||||||
# if needed.
|
# if needed.
|
||||||
|
Loading…
Reference in New Issue
Block a user