1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
19373: examples/suit_update: improve default module selection r=bergzand a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
This commit is contained in:
bors[bot] 2023-03-29 09:44:59 +00:00 committed by GitHub
commit 7f95ee7558
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -13,12 +13,9 @@ RIOTBASE ?= $(CURDIR)/../..
# Include packages that pull up and auto-init the link layer. # Include packages that pull up and auto-init the link layer.
# NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present # NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present
# uncomment this to compile in support for a possibly available radio
#USEMODULE += netdev_default
USEMODULE += auto_init_gnrc_netif USEMODULE += auto_init_gnrc_netif
# Specify the mandatory networking modules for IPv6 and UDP # Specify the mandatory networking modules for IPv6 and UDP
USEMODULE += gnrc_ipv6_router_default USEMODULE += gnrc_ipv6_default
USEMODULE += sock_udp USEMODULE += sock_udp
# Additional networking modules that can be dropped if not needed # Additional networking modules that can be dropped if not needed
USEMODULE += gnrc_icmpv6_echo USEMODULE += gnrc_icmpv6_echo
@ -87,6 +84,8 @@ ifeq (1,$(USE_ETHOS))
IFACE ?= riot0 IFACE ?= riot0
TERMPROG = $(RIOTTOOLS)/ethos/ethos TERMPROG = $(RIOTTOOLS)/ethos/ethos
TERMFLAGS = $(IFACE) $(PORT) TERMFLAGS = $(IFACE) $(PORT)
else
USEMODULE += netdev_default
endif endif
# Ensure both slot bin files are always generated and linked to avoid compiling # Ensure both slot bin files are always generated and linked to avoid compiling

View File

@ -40,6 +40,7 @@
#endif #endif
#ifdef MODULE_PERIPH_GPIO #ifdef MODULE_PERIPH_GPIO
#include "board.h"
#include "periph/gpio.h" #include "periph/gpio.h"
#endif #endif

View File

@ -44,7 +44,7 @@ static int _version_handler(suit_manifest_t *manifest, int key,
if (nanocbor_get_int32(it, &version) >= 0) { if (nanocbor_get_int32(it, &version) >= 0) {
if (version == SUIT_VERSION) { if (version == SUIT_VERSION) {
manifest->validated |= SUIT_VALIDATED_VERSION; manifest->validated |= SUIT_VALIDATED_VERSION;
LOG_INFO("suit: validated manifest version\n)"); LOG_INFO("suit: validated manifest version\n");
return SUIT_OK; return SUIT_OK;
} }
} }
@ -71,11 +71,11 @@ static int _seq_no_handler(suit_manifest_t *manifest, int key,
seq_nr, stored_seq_no); seq_nr, stored_seq_no);
if (seq_nr <= stored_seq_no) { if (seq_nr <= stored_seq_no) {
LOG_ERROR("seq_nr <= running image\n)"); LOG_ERROR("seq_nr <= running image\n");
return SUIT_ERR_SEQUENCE_NUMBER; return SUIT_ERR_SEQUENCE_NUMBER;
} }
LOG_INFO("suit: validated sequence number\n)"); LOG_INFO("suit: validated sequence number\n");
manifest->seq_number = seq_nr; manifest->seq_number = seq_nr;
manifest->validated |= SUIT_VALIDATED_SEQ_NR; manifest->validated |= SUIT_VALIDATED_SEQ_NR;
return SUIT_OK; return SUIT_OK;