Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b65752a
Initial implementation
twcook86 Jun 3, 2026
d569f68
fixes
twcook86 Jun 11, 2026
057ea0e
default HWPUF off
twcook86 Jun 11, 2026
8fb226d
Add psa attestation support for lpc55s69
twcook86 Jun 25, 2026
2dc0488
Update docs, tweak configs
twcook86 Jun 26, 2026
85d056d
update configs
twcook86 Sep 19, 2026
e5a44f0
fenrir fixes
twcook86 Sep 19, 2026
d551ad9
fix the fix
twcook86 Sep 20, 2026
a9b7448
fix for DEBUG_UART=0
twcook86 Sep 20, 2026
3dccfd5
Remove PUF provisioning debug markers and trace messages
danielinux Sep 21, 2026
a8a95dd
Add CI job for lpc55s69 DICE + HW PUF under m33mu
danielinux Sep 21, 2026
60705a9
Remove hwpuf module
twcook86 Oct 5, 2026
154bb2f
CI: fix lpc55s69 HWPUF jobs (Copilot review)
danielinux Oct 6, 2026
e076292
lpc55s69: drop empty if/else leftover from PUF provisioning
danielinux Oct 6, 2026
f8275f3
Update wolfssl submodule to latest master
danielinux Oct 16, 2026
af488f0
lpc55s69: port HWPUF HAL to the simplified wolfSSL API
danielinux Oct 16, 2026
4981713
lpc55s69: hand SRAM2 to the NS world via AHBSC before the jump
danielinux Oct 16, 2026
e45ded9
lpc55s69: limit PUF provision page check to the pages it occupies
danielinux Oct 16, 2026
1ea208c
lpc55s69: implement hal_attestation_get_ueid for the HWPUF path
danielinux Oct 16, 2026
b3be55d
CI: run the lpc55s69 SDK setup step under bash
danielinux Oct 16, 2026
68a5549
raise footprint limits: ML_DSA (+40B, wolfSSL bump to bc9c07902 ML-DS…
danielinux Oct 16, 2026
b8e4213
lpc55s69: don't zeroize the PUF after use; end the HWPUF CI run on bkpt
danielinux Oct 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/test-configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,28 @@ jobs:
config-file: ./config/examples/lpc55s69-tz.config
board-name: lpcxpresso55s69

lpc55s69_tz_psa_test:
uses: ./.github/workflows/test-build-mcux-sdk-manifests.yml
with:
arch: arm
config-file: ./config/examples/lpc55s69-tz-psa.config
board-name: lpcxpresso55s69

lpc55s69_hwpuf_test:
uses: ./.github/workflows/test-build-mcux-sdk-manifests.yml
with:
arch: arm
config-file: ./config/examples/lpc55s69-hwpuf.config
board-name: lpcxpresso55s69
make-args: HWPUF=1

lpc55s69_benchmark_test:
uses: ./.github/workflows/test-build-mcux-sdk-manifests.yml
with:
arch: arm
config-file: ./config/examples/lpc55s69-benchmark.config
board-name: lpcxpresso55s69

m2354_test:
uses: ./.github/workflows/test-build.yml
with:
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/trustzone-emulator-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,44 @@ jobs:
./tools/keytools/otp/otp-keystore-gen
m33mu tools/keytools/otp/otp-keystore-primer.bin --persist --timeout 10 || true
m33mu wolfboot.bin test-app/image_v1_signed.bin:0x60000 --uart-stdout --expect-bkpt 0x7f --timeout 600 --persist

# LPC55S69 DICE attestation + HW PUF. The PUF root key is provisioned
# at first boot (WOLFBOOT_HWPUF_PROVISION=1) and used for DICE key
# derivation on subsequent boots. Requires m33mu with lpc55s69 PUF/RNG
# models (wolfboot-ci >= 1.22).
# The lpc55s69 HAL needs MCUXpresso SDK headers (fsl_common.h); same
# west-based setup as the lpc55s69 jobs in test-configs.yml.
- name: Checkout CMSIS (lpc55s69)
uses: actions/checkout@main
with:
repository: nxp-mcuxpresso/CMSIS_5
path: CMSIS_5

- name: Setup MCUXpresso SDK (lpc55s69)
shell: bash
run: |
python3 -m venv venv
source venv/bin/activate
pip install west
west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests.git mcuxpresso-sdk
cd mcuxpresso-sdk
sed -i '/se_hostlib\|emwin/d' manifests/boards/lpcxpresso55s69.yml
west update_board --set board lpcxpresso55s69

- name: Clean and build test with DICE attestation + HW PUF (lpc55s69)
run: |
set -o pipefail
make clean distclean
cp config/examples/lpc55s69-tz-psa.config .config
sed -i 's/^HWPUF?=0/HWPUF?=1/' .config
sed -i 's/^WOLFBOOT_HWPUF_PROVISION?=0/WOLFBOOT_HWPUF_PROVISION?=1/' .config
sed -i 's/^WOLFBOOT_UDS_UID_FALLBACK_FORTEST?=1/WOLFBOOT_UDS_UID_FALLBACK_FORTEST?=0/' .config
make MCUXSDK=1 MCUXPRESSO="$GITHUB_WORKSPACE/mcuxpresso-sdk/mcuxsdk" MCUXPRESSO_CMSIS="$GITHUB_WORKSPACE/CMSIS_5/CMSIS"
m33mu wolfboot.bin test-app/image_v1_signed.bin:0x48000 --cpu lpc55s69 --uart-stdout --expect-bkpt 0x7f --timeout 300 \
| tee /tmp/m33mu-lpc55s69-dice-hwpuf.log
grep -q "Booting version:" /tmp/m33mu-lpc55s69-dice-hwpuf.log
grep -q "Checking integrity...done" /tmp/m33mu-lpc55s69-dice-hwpuf.log
grep -q "Verifying signature...done" /tmp/m33mu-lpc55s69-dice-hwpuf.log
grep -q "attest: token size" /tmp/m33mu-lpc55s69-dice-hwpuf.log
grep -q "state=0x00" /tmp/m33mu-lpc55s69-dice-hwpuf.log
grep -q "\\[EXPECT BKPT\\] Success" /tmp/m33mu-lpc55s69-dice-hwpuf.log
12 changes: 10 additions & 2 deletions arch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2121,6 +2121,7 @@ ifeq ($(TARGET),lpc55s69)
-I$(MCUXPRESSO)/drivers/iap1 \
-I$(MCUXPRESSO)/drivers/lpc_gpio \
-I$(MCUXPRESSO)/drivers/lpc_iocon \
-I$(MCUXPRESSO)/drivers/puf \
-I$(MCUXPRESSO)/drivers/rng_1 \
-I$(MCUXPRESSO_CMSIS)/Include \
-I$(MCUXPRESSO_CMSIS)/Core/Include
Expand All @@ -2137,10 +2138,10 @@ ifeq ($(TARGET),lpc55s69)
$(MCUXPRESSO)/drivers/common/fsl_common_arm.o \
$(MCUXPRESSO)/drivers/iap1/fsl_iap.o \
$(MCUXPRESSO)/drivers/lpc_gpio/fsl_gpio.o \
$(MCUXPRESSO)/drivers/rng_1/fsl_rng.o
$(MCUXPRESSO)/drivers/rng_1/fsl_rng.o \
$(MCUXPRESSO_DRIVERS)/drivers/fsl_reset.o
ifeq ($(DEBUG_UART),1)
OBJS+=\
$(MCUXPRESSO_DRIVERS)/drivers/fsl_reset.o \
$(MCUXPRESSO)/drivers/flexcomm/fsl_flexcomm.o \
$(MCUXPRESSO)/drivers/flexcomm/usart/fsl_usart.o
endif
Expand All @@ -2152,6 +2153,13 @@ ifeq ($(TARGET),lpc55s69)
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/nxp/casper_port.o \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/nxp/hashcrypt_port.o
endif
ifeq ($(HWPUF),1)
CFLAGS+=-DWOLFSSL_HWPUF -DWOLFSSL_NXP_HWPUF
OBJS+=\
$(MCUXPRESSO)/drivers/puf/fsl_puf.o \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/cryptocb.o \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/nxp/hwpuf_port.o
endif
endif

ifeq ($(TARGET),psoc6)
Expand Down
10 changes: 5 additions & 5 deletions config/examples/lpc55s69-benchmark.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ FLASH_MULTI_SECTOR_ERASE?=1

# Turn on or off hw acceleration of crypto algs in the lpc55s69
PKA?=0
# Turn on or off hw puf
HWPUF?=0

# use 1024-byte sector to accommodate RSA4096 signature
# WOLFBOOT_SECTOR_SIZE?=0x400
WOLFBOOT_SECTOR_SIZE?=0x200

# use these for test/benchmark
WOLFBOOT_PARTITION_SIZE?=0x2b000
WOLFBOOT_PARTITION_SIZE?=0x30000
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x10000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x3b000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x66000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x40000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x70000

WOLFCRYPT_TEST?=1
WOLFCRYPT_BENCHMARK?=1
44 changes: 44 additions & 0 deletions config/examples/lpc55s69-hwpuf.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
ARCH?=ARM
TZEN?=0
TARGET?=lpc55s69
SIGN?=ECC384
HASH?=SHA256
MCUXSDK?=1
MCUXPRESSO?=$(PWD)/../NXP/mcuxpresso-sdk/mcuxsdk
MCUXPRESSO_CMSIS?=$(PWD)/../NXP/CMSIS_5/CMSIS
MCUXPRESSO_CPU?=LPC55S69JBD100_cm33_core0
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/LPC/LPC5500/LPC55S69
MCUXPRESSO_PROJECT_TEMPLATE?=$(MCUXPRESSO)/examples/_boards/lpcxpresso55s69/project_template
DEBUG?=0
DEBUG_UART?=1
VTOR?=1
CORTEX_M0?=0
CORTEX_M33?=1
NO_ASM?=0
NO_MPU=1
EXT_FLASH?=0
SPI_FLASH?=0
ALLOW_DOWNGRADE?=0
NVM_FLASH_WRITEONCE?=1
NO_ARM_ASM=1
WOLFBOOT_VERSION?=0
V?=0
SPMATH?=1
RAM_CODE?=1
DUALBANK_SWAP?=0
FLASH_MULTI_SECTOR_ERASE?=1

# Turn on or off hw acceleration of crypto algs in the lpc55s69
PKA?=0
# Turn on or off hw puf
HWPUF?=0

WOLFBOOT_SECTOR_SIZE?=0x200

# use these for test/benchmark
WOLFBOOT_PARTITION_SIZE?=0x30000
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x10000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x40000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x70000

WOLFCRYPT_TEST?=1
52 changes: 52 additions & 0 deletions config/examples/lpc55s69-tz-psa.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
ARCH?=ARM
TZEN?=1
TARGET?=lpc55s69
SIGN?=ECC384
HASH?=SHA256
MCUXSDK?=1
MCUXPRESSO?=$(PWD)/../NXP/mcuxpresso-sdk/mcuxsdk
MCUXPRESSO_CMSIS?=$(PWD)/../NXP/CMSIS_5/CMSIS
MCUXPRESSO_CPU?=LPC55S69JBD100_cm33_core0
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/LPC/LPC5500/LPC55S69
MCUXPRESSO_PROJECT_TEMPLATE?=$(MCUXPRESSO)/examples/_boards/lpcxpresso55s69/project_template
DEBUG?=0
DEBUG_UART?=1
VTOR?=1
CORTEX_M0?=0
CORTEX_M33?=1
NO_ASM?=0
NO_MPU=1
EXT_FLASH?=0
SPI_FLASH?=0
ALLOW_DOWNGRADE?=0
NVM_FLASH_WRITEONCE?=1
NO_ARM_ASM=1
WOLFBOOT_VERSION?=0
V?=0
SPMATH?=1
RAM_CODE?=1
DUALBANK_SWAP?=0
FLASH_MULTI_SECTOR_ERASE?=1
WOLFCRYPT_TZ?=1
WOLFCRYPT_TZ_PSA?=1

WOLFBOOT_ATTESTATION_TEST?=1
WOLFBOOT_UDS_UID_FALLBACK_FORTEST?=1

# Turn on or off hw acceleration of crypto algs in the lpc55s69
PKA?=0
# Turn on or off hw puf
HWPUF?=0
WOLFBOOT_HWPUF_PROVISION?=0

WOLFBOOT_SECTOR_SIZE?=0x200

# 200KB boot, 80KB keyvault, 8KB NSC, 56KB partitions, 512 swap
WOLFBOOT_KEYVAULT_ADDRESS?=0x10032000
WOLFBOOT_KEYVAULT_SIZE?=0x14000
WOLFBOOT_NSC_ADDRESS?=0x10046000
WOLFBOOT_NSC_SIZE?=0x2000
WOLFBOOT_PARTITION_SIZE?=0xE000
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x00048000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x00056000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x00064000
6 changes: 3 additions & 3 deletions config/examples/lpc55s69-tz.config
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ WOLFCRYPT_TZ_PKCS11?=1

# Turn on or off hw acceleration of crypto algs in the lpc55s69
PKA?=0
# Turn on or off hw puf
HWPUF?=0

# use 1024-byte sector to accommodate RSA4096 signature
# WOLFBOOT_SECTOR_SIZE?=0x400
WOLFBOOT_SECTOR_SIZE?=0x200

# 200KB boot, 80KB keyvault, 8KB NSC, 56KB partitions, 512/1024 swap
# 200KB boot, 80KB keyvault, 8KB NSC, 56KB partitions, 512 swap
WOLFBOOT_KEYVAULT_ADDRESS?=0x10032000
WOLFBOOT_KEYVAULT_SIZE?=0x14000
WOLFBOOT_NSC_ADDRESS?=0x10046000
Expand Down
6 changes: 3 additions & 3 deletions config/examples/lpc55s69.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ FLASH_MULTI_SECTOR_ERASE?=1

# Turn on or off hw acceleration of crypto algs in the lpc55s69
PKA?=0
# Turn on or off hw puf
HWPUF?=0

# use 1024-byte sector to accommodate RSA4096 signature
# WOLFBOOT_SECTOR_SIZE?=0x400
WOLFBOOT_SECTOR_SIZE?=0x200

# Default configuration
# 44KB boot, 52KB partitions, 512/1024 swap
# 44KB boot, 52KB partitions, 512 swap
WOLFBOOT_PARTITION_SIZE?=0xB000
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0xD000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x18000
Expand Down
54 changes: 51 additions & 3 deletions docs/Targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -3435,6 +3435,57 @@ Basic hardware acceleration supported:

See [Test and Benchmark](#lpc55s69-test-and-benchmark) for a comparison with and without hardware acceleration.

### LPC55S69: Hardware PUF (HWPUF)

wolfBoot / wolfCrypt provide support for the LPC55S69's SRAM PUF (Physically
Unclonable Function), which provides root of trust, identity, and key
generation & storage, without the need to expose keys during manufacturing.
Keys of size 128, 192, and 256 bits are supported.
To turn on HWPUF, set HWPUF=1 in the config file (see below).

### LPC55S69: Example Configurations

#### The following example configurations are provided:

- [lpc55s69.config](/config/examples/lpc55s69.config):
- Both wolfBoot and the test-app live in the non-secure realm
- Set PKA=1 in the config file to turn on hardware acceleration
(off by default)

- [lpc55s69-benchmark.config](/config/examples/lpc55s69-benchmark.config):
- Same as `lpc55s69.config`, but turns on test and benchmark code
- Set PKA=1 in the config file to turn on hardware acceleration
(off by default)

- [lpc55s69-hwpuf.config](/config/examples/lpc55s69-hwpuf.config):
- Same as `lpc55s69.config`, but turns on test code showing how to use the
hwpuf api
- Set HWPUF=1 in the config file to turn on HWPUF support (off by default)

- [lpc55s69-tz.config](/config/examples/lpc55s69-tz.config):
- wolfBoot lives in the secure realm, test-app lives in the non-secure realm
- Provides a standard PKCS #11 api to interface with crypto algs in the secure
realm

- [lpc55s69-tz-psa.config](/config/examples/lpc55s69-tz-psa.config):
- wolfBoot lives in the secure realm, test-app lives in the non-secure realm
- Provides a standard PSA api to interface with crypto algs in the secure
realm
- Provides an example of PSA Attestation
- To turn on HWPUF for use with attestation, set the following in the config
file:
- WOLFBOOT_UDS_UID_FALLBACK_FORTEST=0
- HWPUF=1
- WOLFBOOT_HWPUF_PROVISION=1

#### Summary of configurables applicable to all lpc55s69 example configurations:
- `PKA` : Turn on/off hardware acceleration of crypto algs
- `HWPUF` : Turn on/off support for the hardware PUF
- `WOLFBOOT_HWPUF_PROVISION` : Turn on/off auto-provisioning of the HWPUF on
first boot. Performs PUF enrollment and generates a UDS key for device
attestation. Stores PUF keycodes in a known flash location and uses them when
necessary.

### LPC55S69: Configuring and compiling

Copy the example configuration file and build with make:
Expand All @@ -3444,9 +3495,6 @@ cp config/examples/lpc55s69.config .config
make
```

We also provide a TrustZone configuration at `config/examples/lpc55s69-tz.config`
and a benchmarking configuration at `config/examples/lpc55s69-benchmark.config`.

### LPC55S69: Loading the firmware

Download and install the LinkServer tool:
Expand Down
Loading
Loading