From 737ecaf3384379fa2dcb017f9eb6a56ef30a4f91 Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Thu, 11 Apr 2024 11:45:42 +0200 Subject: [PATCH] wolfBoot partition size on stm32c0-lms: 10KB With gcc < 13, LMS setup won't fit in 8KB (overflow of 32B). --- config/examples/stm32c0-lms-8-10-1.config | 6 +++--- docs/Targets.md | 19 ++----------------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/config/examples/stm32c0-lms-8-10-1.config b/config/examples/stm32c0-lms-8-10-1.config index 758831c97..0438af3c6 100644 --- a/config/examples/stm32c0-lms-8-10-1.config +++ b/config/examples/stm32c0-lms-8-10-1.config @@ -33,11 +33,11 @@ CFLAGS_EXTRA+=-DUSE_SLOW_SHA256 #CFLAGS_EXTRA+=-DFLASH_SECURABLE_MEMORY_SUPPORT -#Partition: Boot: 8KB, App, 10KB +#Partition: Boot: 10KB, App, 10KB WOLFBOOT_PARTITION_SIZE?=0x2800 WOLFBOOT_SECTOR_SIZE?=0x800 -#Max WOLFBOOT size is 8KB -WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x08002000 +#Max WOLFBOOT size is 10KB +WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x08002800 WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x085000 WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x08007800 diff --git a/docs/Targets.md b/docs/Targets.md index 9fbf8f45b..bf3df2372 100644 --- a/docs/Targets.md +++ b/docs/Targets.md @@ -445,11 +445,11 @@ Supports STM32C0x0/STM32C0x1. Instructions are for the STM Nucleo-C031C6 dev boa Tested build configurations: * With RSA2048 and SHA2-256 the code size is 10988 and it boots in under 1 second. * With ED25519 and SHA2-384 the code size is 10024 and takes about 10 seconds for the LED to turn on. -* With LMS-8-10-1 and SHA2-256 the code size is 8164 +* With LMS-8-10-1 and SHA2-256 the code size is 8164 on gcc-13 (could fit in 8KB partition) ### Example 32KB partitioning on STM32-G070 -with ED25519: +with ED25519 or LMS-8-10-1: - Sector size: 2KB - Wolfboot partition size: 10KB @@ -464,21 +464,6 @@ with ED25519: #define WOLFBOOT_PARTITION_SWAP_ADDRESS 0x08007800 /* at 30KB */ ``` -with LMS: - -- Sector size: 2KB -- Wolfboot partition size: 8KB -- Application partition size: 10 KB -- Swap size 2KB - -```C -#define WOLFBOOT_SECTOR_SIZE 0x800 /* 2 KB */ -#define WOLFBOOT_PARTITION_BOOT_ADDRESS 0x08002000 /* at 8KB */ -#define WOLFBOOT_PARTITION_SIZE 0x2800 /* 10 KB */ -#define WOLFBOOT_PARTITION_UPDATE_ADDRESS 0x08005000 /* at 20KB */ -#define WOLFBOOT_PARTITION_SWAP_ADDRESS 0x08007800 /* at 30KB */ -``` - with RSA2048: - Sector size: 2KB