Add kinetis LMS small config

pull/773/head
Mattia Moffa 2026-05-07 16:16:15 +02:00 committed by Daniele Lacamera
parent 8a70a83039
commit 1ce8234e49
1 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,49 @@
ARCH?=ARM
TARGET?=kinetis_kl26
SIGN?=LMS
HASH?=SHA256
LMS_LEVELS=1
LMS_HEIGHT=10
LMS_WINTERNITZ=8
IMAGE_SIGNATURE_SIZE=1456
# Keytools (sign.c) forces header_sz >= 2 * sig_sz for LMS, so the minimum
# is 3552; round up to the next power of two.
IMAGE_HEADER_SIZE=4096
MCUXSDK?=0
MCUXPRESSO?=$(PWD)/../NXP/SDK_2_2_0_FRDM-KL26Z
MCUXPRESSO_CMSIS?=$(MCUXPRESSO)/CMSIS
MCUXPRESSO_CPU?=MKL26Z128VLH4
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/MKL26Z4
DEBUG?=0
VTOR?=1
CORTEX_M0?=1
NO_ASM?=0
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
PKA?=0
DEBUG_UART?=1
# Cortex-M0+ doesn't support unaligned word accesses. WOLFSSL_USE_ALIGN
# routes word-sized hash operations through byte-safe code paths when the
# buffers (e.g. LMS internal hash state) aren't 4-byte aligned.
CFLAGS_EXTRA+=-DWOLFSSL_USE_ALIGN
# Logical sector = 4 KL26 hardware sectors (1KB each). Required because
# IMAGE_HEADER_SIZE (4096) must be <= WOLFBOOT_SECTOR_SIZE.
WOLFBOOT_SECTOR_SIZE?=0x1000
# 128KB flash, 16KB SRAM
# 32KB bootloader, 44KB boot/update partitions, 4KB swap at last logical sector
WOLFBOOT_PARTITION_SIZE?=0xB000
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x8000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x13000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x1F000