Skip to content

Commit

Permalink
wolfBoot partition size on stm32c0-lms: 10KB
Browse files Browse the repository at this point in the history
With gcc < 13, LMS setup won't fit in 8KB (overflow of 32B).
  • Loading branch information
danielinux committed Apr 11, 2024
1 parent 5538850 commit 737ecaf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
6 changes: 3 additions & 3 deletions config/examples/stm32c0-lms-8-10-1.config
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
19 changes: 2 additions & 17 deletions docs/Targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 737ecaf

Please sign in to comment.