1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/examples/suit_update/Makefile.suit.custom
2022-06-03 08:49:44 +02:00

32 lines
1.0 KiB
Makefile

# Required variables defined in riotboot.inc.mk or Makefile.include
BINDIR_APP = $(CURDIR)/bin/$(BOARD)/$(APPLICATION)
$(BINDIR_APP): $(CLEAN)
$(Q)mkdir -p $(BINDIR_APP)
# Include to be able to use memoized
include $(RIOTBASE)/makefiles/utils/variables.mk
EPOCH = $(call memoized,EPOCH,$(shell date +%s))
APP_VER ?= $(EPOCH)
# Default addressing if following README.native.md
ifeq ($(BOARD),native)
SUIT_CLIENT ?= [2001:db8::2]
SUIT_COAP_SERVER ?= [2001:db8::1]
$(call target-export-variables,test-with-config,SUIT_COAP_SERVER)
endif
ifeq ($(BOARD),native)
# Set settings for publishing fake fw payloads to native
SUIT_NATIVE_PAYLOAD ?= "AABBCCDD"
SUIT_NATIVE_PAYLOAD_BIN ?= $(BINDIR_APP)/fw.$(APP_VER).bin
# Make sure it is built
BUILD_FILES += $(SUIT_NATIVE_PAYLOAD_BIN)
$(SUIT_NATIVE_PAYLOAD_BIN): $(BINDIR_APP)
$(Q)echo $(SUIT_NATIVE_PAYLOAD) > $@
SUIT_FW_STORAGE ?= /nvm0/SLOT0.TXT
SUIT_MANIFEST_PAYLOADS ?= $(SUIT_NATIVE_PAYLOAD_BIN)
SUIT_MANIFEST_SLOTFILES ?= $(SUIT_NATIVE_PAYLOAD_BIN):0:$(SUIT_FW_STORAGE)
endif