wolfBoot/config/examples/samd21.config

42 lines
1.2 KiB
Plaintext

ARCH?=ARM
TARGET?=samr21
SIGN?=ECC256
HASH?=SHA256
DEBUG?=0
DEBUG_UART?=0
VTOR?=1
CORTEX_M0?=1
NO_ASM?=0
NO_MPU?=1
EXT_FLASH?=0
SPI_FLASH?=0
ALLOW_DOWNGRADE?=0
NVM_FLASH_WRITEONCE?=1
WOLFBOOT_VERSION?=0
V?=0
SPMATH?=1
RAM_CODE?=0
DUALBANK_SWAP?=0
# Cortex-M0+ doesn't support unaligned word accesses. WOLFSSL_USE_ALIGN
# routes word-sized hash operations through byte-safe code paths when the
# input/output buffers aren't 4-byte aligned.
CFLAGS_EXTRA+=-DWOLFSSL_USE_ALIGN
# ATSAMD21J17A/G17A: 128KB flash, 16KB SRAM.
# NVMCTRL erases a 256-byte row, which is the smallest unit wolfBoot can swap.
WOLFBOOT_SECTOR_SIZE?=0x100
# 32KB bootloader, 2 * 47.75KB boot/update partitions, one row of swap.
# Largest signed application is 47KB: the partition less the 256-byte header
# and the two trailer rows NVM_FLASH_WRITEONCE uses.
#
# The bootloader region is 32KB because the NVMCTRL BOOTPROT fuse only
# protects 8KB, 16KB or 32KB. Any other boundary either leaves the
# bootloader writable or extends the protection into the boot partition,
# where it would block the swap.
WOLFBOOT_PARTITION_SIZE?=0xBF00
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x8000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x13F00
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x1FE00