From 1ce8234e49e601b47d881809f642cb76cfbe1456 Mon Sep 17 00:00:00 2001 From: Mattia Moffa Date: Thu, 7 May 2026 16:16:15 +0200 Subject: [PATCH] Add kinetis LMS small config --- config/examples/kinetis-kl26-lms-small.config | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 config/examples/kinetis-kl26-lms-small.config diff --git a/config/examples/kinetis-kl26-lms-small.config b/config/examples/kinetis-kl26-lms-small.config new file mode 100644 index 00000000..e5a7e8a0 --- /dev/null +++ b/config/examples/kinetis-kl26-lms-small.config @@ -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