Examples updated to newest wolfBoot

pull/2/head
Daniele Lacamera 2019-10-17 11:07:28 +02:00
parent 8fc46cf956
commit 1a9ce49de6
9 changed files with 269 additions and 58 deletions

View File

@ -20,9 +20,14 @@ $(BOOT_ELF): nrf5_iot_sdk_3288530.zip $(WOLFBOOT_BIN) .contiki_patched
make -C $(DTLS_OTA) TARGET=nrf52dk NRF52_SDK_ROOT=$(NRF52_SDK_ROOT) SMALL=1 make -C $(DTLS_OTA) TARGET=nrf52dk NRF52_SDK_ROOT=$(NRF52_SDK_ROOT) SMALL=1
$(WOLFBOOT_BIN): $(WOLFBOOT_BIN):
cp target.h $(WOLFBOOT)/include
cp nrf52.ld $(WOLFBOOT)/hal cp nrf52.ld $(WOLFBOOT)/hal
make -C $(WOLFBOOT) BOOT0_OFFSET=0x10000 VTOR=0 TARGET=nrf52 DEBUG=$(DEBUG) wolfboot.bin make -C $(WOLFBOOT) \
WOLFBOOT_PARTITION_BOOT_ADDRESS=0x2f000 \
WOLFBOOT_SECTOR_SIZE=0x1000 \
WOLFBOOT_PARTITION_SIZE=0x28000 \
WOLFBOOT_PARTITION_SWAP_ADDRESS=0x57000 \
WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x58000 \
VTOR=0 TARGET=nrf52 DEBUG=$(DEBUG) wolfboot.bin
nrf5_iot_sdk_3288530.zip: nrf5_iot_sdk_3288530.zip:
wget https://developer.nordicsemi.com/nRF5_IoT_SDK/nRF5_IoT_SDK_v0.9.x/nrf5_iot_sdk_3288530.zip wget https://developer.nordicsemi.com/nRF5_IoT_SDK/nRF5_IoT_SDK_v0.9.x/nrf5_iot_sdk_3288530.zip

View File

@ -128,20 +128,21 @@ wolfboot-align.bin:CFLAGS+=-I$(KINETIS_DRIVERS)/drivers -I$(KINETIS_DRIVERS) -DC
wolfboot-align.bin:LDFLAGS=$(CFLAGS) -Wl,-gc-sections -ffreestanding -nostartfiles -lc -lnosys -specs=nano.specs -Wl,-Map=image.map wolfboot-align.bin:LDFLAGS=$(CFLAGS) -Wl,-gc-sections -ffreestanding -nostartfiles -lc -lnosys -specs=nano.specs -Wl,-Map=image.map
wolfboot-align.bin: wolfboot-align.bin:
make -C ../wolfBoot TARGET=kinetis NVM_FLASH_WRITEONCE=1 clean make -C ../wolfBoot TARGET=kinetis NVM_FLASH_WRITEONCE=1 clean
cp -f src/target.h ../wolfBoot/include/
rm -f ../wolfBoot/hal/kinetis.o rm -f ../wolfBoot/hal/kinetis.o
rm -f ../wolfBoot/src/*.o rm -f ../wolfBoot/src/*.o
rm -f $(KINETIS_DRIVERS)/drivers/*.o rm -f $(KINETIS_DRIVERS)/drivers/*.o
make -C ../wolfBoot TARGET=kinetis DEBUG=$(DEBUG) NVM_FLASH_WRITEONCE=1 wolfboot-align.bin make -C ../wolfBoot TARGET=kinetis DEBUG=$(DEBUG) NVM_FLASH_WRITEONCE=1 \
WOLFBOOT_SECTOR_SIZE=0x1000 \
WOLFBOOT_PARTITION_SIZE=0x7A000 \
WOLFBOOT_PARTITION_BOOT_ADDRESS=0xA000 \
WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x84000 \
WOLFBOOT_PARTITION_SWAP_ADDRESS=0xff000 \
wolfboot-align.bin
cp ../wolfBoot/wolfboot-align.bin . cp ../wolfBoot/wolfboot-align.bin .
standalone:LSCRIPT:=k64f_standalone.ld standalone:LSCRIPT:=k64f_standalone.ld
standalone: image.bin standalone: image.bin
$(LIBS): picotcp $(LIBS): picotcp
make -C picotcp EXTRA_CFLAGS="-DPICO_PORT_CUSTOM $(CFLAGS) -I../src -I../freeRTOS/include -I../freeRTOS -I../$(FREERTOS_PORT)" \ make -C picotcp EXTRA_CFLAGS="-DPICO_PORT_CUSTOM $(CFLAGS) -I../src -I../freeRTOS/include -I../freeRTOS -I../$(FREERTOS_PORT)" \
ARCH=cortexm4-hardfloat CROSS_COMPILE=arm-none-eabi- RTOS=1 \ ARCH=cortexm4-hardfloat CROSS_COMPILE=arm-none-eabi- RTOS=1 \

@ -1 +1 @@
Subproject commit 89653f2aa7ad259fabca6caaaf411287ac39f222 Subproject commit 789a1561b416f4caa29b00325e36f69a9a6b8b4b

@ -1 +1 @@
Subproject commit b05f9bc2c20527ffc2a52213be34614fb6f7f005 Subproject commit 3d0e3b01179cf4dc0d633385274ec8844c4792d4

View File

@ -9,7 +9,7 @@ IMAGE_VERSION=5
BOARD ?= samr21-xpro BOARD ?= samr21-xpro
# This has to be the absolute path to the RIOT base directory: # This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../RIOT/ RIOTBASE ?= $(abspath $(CURDIR)/../RIOT/)
# Comment this out to disable code in RIOT that does safety checking # Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the # which is not needed in a production environment but helps in the
@ -33,6 +33,7 @@ USEMODULE += periph_flashpage
WOLFBOOT_DIR=$(abspath $(RIOTBASE)/../../wolfBoot) WOLFBOOT_DIR=$(abspath $(RIOTBASE)/../../wolfBoot)
USEMODULE_INCLUDES+=-I$(WOLFBOOT_DIR)/include USEMODULE_INCLUDES+=-I$(WOLFBOOT_DIR)/include
CFLAGS+=-Wno-unused-parameter -Wno-unused-variable -Wno-missing-include-dirs
include $(RIOTBASE)/Makefile.include include $(RIOTBASE)/Makefile.include
include ../wolfboot.mk include ../wolfboot.mk

View File

@ -1,4 +1,4 @@
WOLFBOOT_DIR=../../../../wolfBoot WOLFBOOT_DIR=$(abspath $(CURDIR)/../../../wolfBoot)
INCLUDES+=-I$(WOLFBOOT_DIR)/include INCLUDES+=-I$(WOLFBOOT_DIR)/include
SRC+=libwolfboot.c samr21.c SRC+=libwolfboot.c samr21.c
NO_AUTO_SRC = 1 NO_AUTO_SRC = 1

View File

@ -1,6 +1,6 @@
/* libwolfboot.c /* libwolfboot.c
* *
* Copyright (C) 2018 wolfSSL Inc. * Copyright (C) 2019 wolfSSL Inc.
* *
* This file is part of wolfBoot. * This file is part of wolfBoot.
* *
@ -18,88 +18,193 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/ */
#include <hal.h>
#include <stdint.h> #include <stdint.h>
#include <inttypes.h> #include <inttypes.h>
#include <wolfboot/wolfboot.h>
static uint8_t *get_trailer(uint8_t part) #include "hal.h"
#include "wolfboot/wolfboot.h"
#include "image.h"
#ifndef NULL
# define NULL (void *)0
#endif
uint32_t ext_cache;
#ifndef TRAILER_SKIP
# define TRAILER_SKIP 0
#endif
#define PART_BOOT_ENDFLAGS ((WOLFBOOT_PARTITION_BOOT_ADDRESS + WOLFBOOT_PARTITION_SIZE) - TRAILER_SKIP)
#define PART_UPDATE_ENDFLAGS ((WOLFBOOT_PARTITION_UPDATE_ADDRESS + WOLFBOOT_PARTITION_SIZE) - TRAILER_SKIP)
#ifdef NVM_FLASH_WRITEONCE
#include <stddef.h>
extern void *memcpy(void *dst, const void *src, size_t n);
static uint8_t NVM_CACHE[WOLFBOOT_SECTOR_SIZE];
int RAMFUNCTION hal_trailer_write(uint32_t addr, uint8_t val) {
uint32_t addr_align = addr & (~(WOLFBOOT_SECTOR_SIZE - 1));
uint32_t addr_off = addr & (WOLFBOOT_SECTOR_SIZE - 1);
int ret = 0;
memcpy(NVM_CACHE, (void *)addr_align, WOLFBOOT_SECTOR_SIZE);
ret = hal_flash_erase(addr_align, WOLFBOOT_SECTOR_SIZE);
if (ret != 0)
return ret;
NVM_CACHE[addr_off] = val;
ret = hal_flash_write(addr_align, NVM_CACHE, WOLFBOOT_SECTOR_SIZE);
return ret;
}
#else
# define hal_trailer_write(addr, val) hal_flash_write(addr, (void *)&val, 1)
#endif
#if defined PART_UPDATE_EXT
static uint8_t* RAMFUNCTION get_trailer_at(uint8_t part, uint32_t at)
{ {
if (part == PART_BOOT) if (part == PART_BOOT)
return (void *)(WOLFBOOT_PARTITION_BOOT_ADDRESS + WOLFBOOT_PARTITION_SIZE); return (void *)(PART_BOOT_ENDFLAGS - (sizeof(uint32_t) + at));
else if (part == PART_UPDATE) else if (part == PART_UPDATE) {
return (void *)(WOLFBOOT_PARTITION_UPDATE_ADDRESS + WOLFBOOT_PARTITION_SIZE); ext_flash_read(PART_UPDATE_ENDFLAGS - (sizeof(uint32_t) + at), (void *)&ext_cache, sizeof(uint32_t));
else return (uint8_t *)&ext_cache;
return (void *)0; } else
return NULL;
} }
int wolfBoot_set_partition_state(uint8_t part, uint8_t newst) static void RAMFUNCTION set_trailer_at(uint8_t part, uint32_t at, uint8_t val)
{
if (part == PART_BOOT) {
hal_trailer_write(PART_BOOT_ENDFLAGS - (sizeof(uint32_t) + at), val);
}
else if (part == PART_UPDATE) {
ext_flash_write(PART_UPDATE_ENDFLAGS - (sizeof(uint32_t) + at), (void *)&val, 1);
}
}
static void RAMFUNCTION set_partition_magic(uint8_t part)
{
uint32_t wolfboot_magic_trail = WOLFBOOT_MAGIC_TRAIL;
if (part == PART_BOOT) {
hal_flash_write(PART_BOOT_ENDFLAGS - sizeof(uint32_t), (void *)&wolfboot_magic_trail, sizeof(uint32_t));
}
else if (part == PART_UPDATE) {
ext_flash_write(PART_UPDATE_ENDFLAGS - sizeof(uint32_t), (void *)&wolfboot_magic_trail, sizeof(uint32_t));
}
}
#else
static uint8_t* RAMFUNCTION get_trailer_at(uint8_t part, uint32_t at)
{
if (part == PART_BOOT)
return (void *)(PART_BOOT_ENDFLAGS - (sizeof(uint32_t) + at));
else if (part == PART_UPDATE) {
return (void *)(PART_UPDATE_ENDFLAGS - (sizeof(uint32_t) + at));
} else
return NULL;
}
static void RAMFUNCTION set_trailer_at(uint8_t part, uint32_t at, uint8_t val)
{
if (part == PART_BOOT) {
hal_trailer_write(PART_BOOT_ENDFLAGS - (sizeof(uint32_t) + at), val);
}
else if (part == PART_UPDATE) {
hal_trailer_write(PART_UPDATE_ENDFLAGS - (sizeof(uint32_t) + at), val);
}
}
static void RAMFUNCTION set_partition_magic(uint8_t part)
{
uint32_t wolfboot_magic_trail = WOLFBOOT_MAGIC_TRAIL;
if (part == PART_BOOT) {
hal_flash_write(PART_BOOT_ENDFLAGS - sizeof(uint32_t), (void *)&wolfboot_magic_trail, sizeof(uint32_t));
}
else if (part == PART_UPDATE) {
hal_flash_write(PART_UPDATE_ENDFLAGS - sizeof(uint32_t), (void *)&wolfboot_magic_trail, sizeof(uint32_t));
}
}
#endif /* PART_UPDATE_EXT */
static uint32_t* RAMFUNCTION get_partition_magic(uint8_t part)
{
return (uint32_t *)get_trailer_at(part, 0);
}
static uint8_t* RAMFUNCTION get_partition_state(uint8_t part)
{
return (uint8_t *)get_trailer_at(part, 1);
}
static uint8_t* RAMFUNCTION get_sector_flags(uint8_t part, uint32_t pos)
{
return (uint8_t *)get_trailer_at(part, 2 + pos);
}
static void RAMFUNCTION set_partition_state(uint8_t part, uint8_t val)
{
set_trailer_at(part, 1, val);
}
static void RAMFUNCTION set_sector_flags(uint8_t part, uint32_t pos, uint8_t val)
{
set_trailer_at(part, 2 + pos, val);
}
int RAMFUNCTION wolfBoot_set_partition_state(uint8_t part, uint8_t newst)
{ {
uint8_t *trailer_end = get_trailer(part);
uint32_t *magic; uint32_t *magic;
uint8_t *state; uint8_t *state;
uint32_t wolfboot_magic_trail = WOLFBOOT_MAGIC_TRAIL; magic = get_partition_magic(part);
if (!trailer_end)
return -1;
magic = (uint32_t *)(trailer_end - sizeof(uint32_t));
if (*magic != WOLFBOOT_MAGIC_TRAIL) if (*magic != WOLFBOOT_MAGIC_TRAIL)
hal_flash_write((uint32_t)magic, (void *)&wolfboot_magic_trail, sizeof(uint32_t)); set_partition_magic(part);
state = (trailer_end - sizeof(uint32_t)) - 1; state = get_partition_state(part);
if (*state != newst) if (*state != newst)
hal_flash_write((uint32_t)state, (void *)&newst, 1); set_partition_state(part, newst);
return 0; return 0;
} }
int wolfBoot_set_sector_flag(uint8_t part, uint8_t sector, uint8_t newflag) int RAMFUNCTION wolfBoot_set_sector_flag(uint8_t part, uint8_t sector, uint8_t newflag)
{ {
uint8_t *trailer_end = get_trailer(part);
uint32_t *magic; uint32_t *magic;
uint8_t *flags; uint8_t *flags;
uint8_t fl_value; uint8_t fl_value;
uint32_t wolfboot_magic_trail = WOLFBOOT_MAGIC_TRAIL; uint32_t wolfboot_magic_trail = WOLFBOOT_MAGIC_TRAIL;
uint8_t pos = sector >> 1; uint8_t pos = sector >> 1;
if (!trailer_end) magic = get_partition_magic(part);
return -1;
magic = (uint32_t *)(trailer_end - sizeof(uint32_t));
if (*magic != WOLFBOOT_MAGIC_TRAIL) if (*magic != WOLFBOOT_MAGIC_TRAIL)
hal_flash_write((uint32_t)magic, (void *)&wolfboot_magic_trail, sizeof(uint32_t)); set_partition_magic(part);
flags = (trailer_end - sizeof(uint32_t)) - (2 + pos); flags = get_sector_flags(part, pos);
if (sector == (pos << 1)) if (sector == (pos << 1))
fl_value = (*flags & 0xF0) | (newflag & 0x0F); fl_value = (*flags & 0xF0) | (newflag & 0x0F);
else else
fl_value = ((newflag & 0x0F) << 4) | (*flags & 0x0F); fl_value = ((newflag & 0x0F) << 4) | (*flags & 0x0F);
if (fl_value != *flags) if (fl_value != *flags)
hal_flash_write((uint32_t)flags, &fl_value, 1); set_sector_flags(part, pos, fl_value);
return 0; return 0;
} }
int wolfBoot_get_partition_state(uint8_t part, uint8_t *st) int RAMFUNCTION wolfBoot_get_partition_state(uint8_t part, uint8_t *st)
{ {
uint8_t *trailer_end = get_trailer(part);
uint32_t *magic; uint32_t *magic;
uint8_t *state; uint8_t *state;
if (!trailer_end) magic = get_partition_magic(part);
return -1;
magic = (uint32_t *)(trailer_end - sizeof(uint32_t));
if (*magic != WOLFBOOT_MAGIC_TRAIL) if (*magic != WOLFBOOT_MAGIC_TRAIL)
return -1; return -1;
state = (trailer_end - sizeof(uint32_t)) - 1; state = get_partition_state(part);
*st = *state; *st = *state;
return 0; return 0;
} }
int wolfBoot_get_sector_flag(uint8_t part, uint8_t sector, uint8_t *flag) int wolfBoot_get_sector_flag(uint8_t part, uint8_t sector, uint8_t *flag)
{ {
uint8_t *trailer_end = get_trailer(part);
uint32_t *magic; uint32_t *magic;
uint8_t *flags; uint8_t *flags;
uint8_t pos = sector >> 1; uint8_t pos = sector >> 1;
if (!trailer_end) magic = get_partition_magic(part);
return -1;
magic = (uint32_t *)(trailer_end - sizeof(uint32_t));
if (*magic != WOLFBOOT_MAGIC_TRAIL) if (*magic != WOLFBOOT_MAGIC_TRAIL)
return -1; return -1;
flags = (trailer_end - sizeof(uint32_t)) - (2 + pos); flags = get_sector_flags(part, pos);
if (sector == (pos << 1)) if (sector == (pos << 1))
*flag = *flags & 0x0F; *flag = *flags & 0x0F;
else else
@ -107,28 +212,123 @@ int wolfBoot_get_sector_flag(uint8_t part, uint8_t sector, uint8_t *flag)
return 0; return 0;
} }
void wolfBoot_erase_partition(uint8_t part) void RAMFUNCTION wolfBoot_erase_partition(uint8_t part)
{ {
if (part == PART_BOOT) if (part == PART_BOOT)
hal_flash_erase(WOLFBOOT_PARTITION_BOOT_ADDRESS, WOLFBOOT_PARTITION_SIZE); hal_flash_erase(WOLFBOOT_PARTITION_BOOT_ADDRESS, WOLFBOOT_PARTITION_SIZE);
if (part == PART_UPDATE) if (part == PART_UPDATE) {
#ifdef PART_UPDATE_EXT
ext_flash_unlock();
ext_flash_erase(WOLFBOOT_PARTITION_UPDATE_ADDRESS, WOLFBOOT_PARTITION_SIZE);
ext_flash_lock();
#else
hal_flash_erase(WOLFBOOT_PARTITION_UPDATE_ADDRESS, WOLFBOOT_PARTITION_SIZE); hal_flash_erase(WOLFBOOT_PARTITION_UPDATE_ADDRESS, WOLFBOOT_PARTITION_SIZE);
#endif
}
if (part == PART_SWAP) if (part == PART_SWAP)
hal_flash_erase(WOLFBOOT_PARTITION_SWAP_ADDRESS, WOLFBOOT_SECTOR_SIZE); hal_flash_erase(WOLFBOOT_PARTITION_SWAP_ADDRESS, WOLFBOOT_SECTOR_SIZE);
} }
void wolfBoot_update_trigger(void) void RAMFUNCTION wolfBoot_update_trigger(void)
{ {
uint8_t st = IMG_STATE_UPDATING; uint8_t st = IMG_STATE_UPDATING;
#ifdef PART_UPDATE_EXT
ext_flash_unlock();
wolfBoot_set_partition_state(PART_UPDATE, st);
ext_flash_lock();
#else
hal_flash_unlock(); hal_flash_unlock();
wolfBoot_set_partition_state(PART_UPDATE, st); wolfBoot_set_partition_state(PART_UPDATE, st);
hal_flash_lock(); hal_flash_lock();
#endif
} }
void wolfBoot_success(void) void RAMFUNCTION wolfBoot_success(void)
{ {
uint8_t st = IMG_STATE_SUCCESS; uint8_t st = IMG_STATE_SUCCESS;
hal_flash_unlock(); hal_flash_unlock();
wolfBoot_set_partition_state(PART_BOOT, st); wolfBoot_set_partition_state(PART_BOOT, st);
hal_flash_lock(); hal_flash_lock();
} }
uint8_t wolfBoot_find_header(uint8_t *haystack, uint8_t type, uint8_t **ptr)
{
uint8_t *p = haystack;
while (*p != 0) {
if (*p == HDR_PADDING) {
p++;
continue;
}
if (*p == type) {
p++;
*ptr = (p + 1);
return *p;
}
p++;
p += (*p + 1);
}
*ptr = NULL;
return 0;
}
#ifdef EXT_FLASH
static uint8_t hdr_cpy[IMAGE_HEADER_SIZE];
static uint32_t hdr_cpy_done = 0;
#endif
uint32_t wolfBoot_get_image_version(uint8_t part)
{
uint32_t *version_field = NULL;
uint32_t version = 0;
uint8_t *image = NULL;
uint32_t *magic = NULL;
if(part == PART_UPDATE) {
#ifdef PART_UPDATE_EXT
ext_flash_read((uint32_t)WOLFBOOT_PARTITION_UPDATE_ADDRESS, hdr_cpy, IMAGE_HEADER_SIZE);
hdr_cpy_done = 1;
image = hdr_cpy;
#else
image = (uint8_t *)WOLFBOOT_PARTITION_UPDATE_ADDRESS;
#endif
}
if (part == PART_BOOT)
image = (uint8_t *)WOLFBOOT_PARTITION_BOOT_ADDRESS;
if (image) {
magic = (uint32_t *)image;
if (*magic != WOLFBOOT_MAGIC)
return 0;
wolfBoot_find_header(image + IMAGE_HEADER_OFFSET, HDR_VERSION, (void *)&version_field);
if (version_field)
return *version_field;
}
return 0;
}
uint16_t wolfBoot_get_image_type(uint8_t part)
{
uint16_t *type_field = NULL;
uint8_t *image = NULL;
uint32_t *magic = NULL;
if(part == PART_UPDATE) {
#ifdef PART_UPDATE_EXT
ext_flash_read((uint32_t)WOLFBOOT_PARTITION_UPDATE_ADDRESS, hdr_cpy, IMAGE_HEADER_SIZE);
hdr_cpy_done = 1;
image = hdr_cpy;
#else
image = (uint8_t *)WOLFBOOT_PARTITION_UPDATE_ADDRESS;
#endif
}
if (part == PART_BOOT)
image = (uint8_t *)WOLFBOOT_PARTITION_BOOT_ADDRESS;
if (image) {
magic = (uint32_t *)image;
if (*magic != WOLFBOOT_MAGIC)
return 0;
wolfBoot_find_header(image + IMAGE_HEADER_OFFSET, HDR_IMG_TYPE, (void *)&type_field);
if (type_field)
return *type_field;
}
return 0;
}

View File

@ -20,8 +20,7 @@ wolfboot-create-key: $(WOLFBOOT_KEYFILE)
$(WOLFBOOT_KEYFILE): $(WOLFBOOT_KEYFILE):
make -C $(WOLFBOOT) clean make -C $(WOLFBOOT) clean
make -C $(WOLFBOOT) distclean make -C $(WOLFBOOT) distclean
cp $(RIOTBASE)/../target.h $(WOLFBOOT)/include make -C $(WOLFBOOT) TARGET=samr21 DEBUG=0 ed25519.der \
make -C $(WOLFBOOT) TARGET=samr21 TARGET_ARCH= DEBUG=0 BOOT0_OFFSET=$(WOLFBOOT_OFFSET) ed25519.der
wolfboot: wolfboot-create-key link wolfboot: wolfboot-create-key link
@$(COLOR_ECHO) @$(COLOR_ECHO)
@ -46,8 +45,13 @@ $(WOLFBOOT_BIN):
@$(COLOR_ECHO) $(SRC) @$(COLOR_ECHO) $(SRC)
@$(COLOR_ECHO) @$(COLOR_ECHO)
make -C $(WOLFBOOT) clean make -C $(WOLFBOOT) clean
cp $(RIOTBASE)/../target.h $(WOLFBOOT)/include make -C $(WOLFBOOT) TARGET=samr21 TARGET_ARCH= DEBUG=0 BOOT0_OFFSET=$(WOLFBOOT_OFFSET) \
make -C $(WOLFBOOT) TARGET=samr21 TARGET_ARCH= DEBUG=0 BOOT0_OFFSET=$(WOLFBOOT_OFFSET) wolfboot.bin WOLFBOOT_SECTOR_SIZE=0x100 \
WOLFBOOT_PARTITION_SIZE=0x1B000 \
WOLFBOOT_PARTITION_BOOT_ADDRESS=0x08000 \
WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x23000 \
WOLFBOOT_PARTITION_SWAP_ADDRESS=0x3E000 \
wolfboot.bin
.PHONY: wolfboot-flash-bootloader wolfboot-flash .PHONY: wolfboot-flash-bootloader wolfboot-flash

@ -1 +1 @@
Subproject commit e6723ec831c1095bdbcf50a8cba636c72364e1c7 Subproject commit 1c6ea8d7325beba386e3c1007720a8e143539e35