mirror of https://github.com/wolfSSL/wolfBoot.git
The LPC54S018M HAL had three critical SPIFI controller issues preventing
flash write/erase operations from working, which blocked wolfBoot_success(),
wolfBoot_update_trigger(), and the firmware swap:
1. Wrong memory-mode read command: Used opcode 0x6B (Quad Output, serial
address) but the boot ROM configures 0xEB (Quad I/O, quad address) with
MCMD=0xEB930000. The mismatch caused garbled address bits when re-entering
XIP after flash operations, crashing on instruction fetch.
2. SPIFI POLL mode not waiting: The boot ROM leaves CLIMIT[7:0]=0x00 which
makes the hardware POLL comparison always succeed immediately. Set
IDATA=0x00 and CLIMIT[7:0]=0x01 to properly wait for flash BUSY to clear.
3. SPIFI reset clears CTRL/CLIMIT: The reset used to exit memory mode clears
the boot ROM's timing config (CTRL=0x600F03E8) and cache limit
(CLIMIT=0x08000000). Save and restore both registers around every reset.
Additional changes:
- Add RAMFUNCTION memcpy (src/string.o) to test app for SPIFI XIP safety
- Add bare-metal UART driver for Flexcomm0 (non-blocking, skips if FC0
doesn't respond — observed on some LPC54S018M-EVK boards)
- Add DSB+ISB barriers after entering memory mode for pipeline coherency
- Enable DEBUG_UART in example config
- Update test app to follow LPC55S69 port patterns with LED indicators
for boot version and update status
Tested: cold boot, ECC256 signature verify, wolfBoot_success(),
wolfBoot_update_trigger(), and full v1->v2 firmware swap all working.
Swap takes ~60 seconds for the 960KB partition (240 sector operations).
|
||
|---|---|---|
| .. | ||
| README.md | ||
| aurix-tc375-ecc.config | ||
| aurix-tc375-elf-ecc.config | ||
| aurix-tc375-elf-wolfHSM-certs-ecc.config | ||
| aurix-tc375-elf-wolfHSM-certs-rsa4096.config | ||
| aurix-tc375-elf-wolfHSM-ecc.config | ||
| aurix-tc375-hsm-ecc.config | ||
| aurix-tc375-hsm-self-update-wolfHSM-certs-rsa4096.config | ||
| aurix-tc375-hsm-wolfHSM-certs-ecc.config | ||
| aurix-tc375-hsm-wolfHSM-certs-rsa4096.config | ||
| cypsoc6.config | ||
| hifive1.config | ||
| imx-rt1040.config | ||
| imx-rt1050.config | ||
| imx-rt1060.config | ||
| imx-rt1060_hab.config | ||
| imx-rt1064.config | ||
| kinetis-k64f.config | ||
| kinetis-k82f.config | ||
| kontron_vx3060_s2.config | ||
| library.config | ||
| library_fs.config | ||
| lpc55s69-tz.config | ||
| lpc55s69.config | ||
| lpc54606j512.config | ||
| mcxa.config | ||
| mcxn-tz.config | ||
| mcxn-wolfcrypt-tz.config | ||
| mcxn.config | ||
| mcxw-tz.config | ||
| mcxw.config | ||
| nrf54l15-wolfcrypt-tz.config | ||
| nrf54l15.config | ||
| nrf5340-tz.config | ||
| nrf5340-wolfcrypt-tz.config | ||
| nrf5340.config | ||
| nrf5340_net.config | ||
| nrf52840.config | ||
| nxp-ls1028a-tpm.config | ||
| nxp-ls1028a.config | ||
| nxp-p1021.config | ||
| nxp-s32k142.config | ||
| nxp-s32k144.config | ||
| nxp-s32k146.config | ||
| nxp-s32k148.config | ||
| nxp-t1024.config | ||
| nxp-t1040.config | ||
| nxp-t2080.config | ||
| nxp_lpc54s018m.config | ||
| pic32ck.config | ||
| pic32cz.config | ||
| polarfire_mpfs250.config | ||
| polarfire_mpfs250_hss_l2lim.config | ||
| polarfire_mpfs250_m_qspi.config | ||
| polarfire_mpfs250_qspi.config | ||
| raspi3-encrypted.config | ||
| raspi3.config | ||
| renesas-rx65n.config | ||
| renesas-rx72n.config | ||
| rp2350.config | ||
| sama5d3.config | ||
| same51-dualbank.config | ||
| same51.config | ||
| sim-delta-update.config | ||
| sim-dualbank.config | ||
| sim-elf-scattered.config | ||
| sim-encrypt-delta-nvm-writeonce-update.config | ||
| sim-encrypt-delta-update.config | ||
| sim-encrypt-nvm-writeonce-flags-home-invert-update.config | ||
| sim-encrypt-nvm-writeonce-flags-home-update.config | ||
| sim-encrypt-nvm-writeonce-update.config | ||
| sim-encrypt-update.config | ||
| sim-lms.config | ||
| sim-ml-dsa-ecc-hybrid.config | ||
| sim-ml-dsa.config | ||
| sim-ml-dsa3.config | ||
| sim-ml-dsa5.config | ||
| sim-nobackup-flags-home.config | ||
| sim-nobackup-nvm-writeonce.config | ||
| sim-nobackup.config | ||
| sim-nvm-writeonce-flags-home-invert.config | ||
| sim-nvm-writeonce-flags-home.config | ||
| sim-nvm-writeonce.config | ||
| sim-self-header-ext.config | ||
| sim-self-header.config | ||
| sim-self-update-ext.config | ||
| sim-self-update-monolithic.config | ||
| sim-self-update.config | ||
| sim-tpm-keystore.config | ||
| sim-tpm-measured.config | ||
| sim-tpm-seal.config | ||
| sim-tpm.config | ||
| sim-wolfHSM-client-certchain-ecc.config | ||
| sim-wolfHSM-client-certchain-rsa4096.config | ||
| sim-wolfHSM-client-ecc.config | ||
| sim-wolfHSM-client-mldsa.config | ||
| sim-wolfHSM-server-certchain-ecc.config | ||
| sim-wolfHSM-server-certchain-rsa4096.config | ||
| sim-xmss.config | ||
| sim.config | ||
| sim32-elf-scattered.config | ||
| sim32.config | ||
| stm32c0-lms-8-10-1.config | ||
| stm32c0-rsa2048.config | ||
| stm32c0.config | ||
| stm32f1.config | ||
| stm32f4-small-blocks-uart-update.config | ||
| stm32f7-dualbank.config | ||
| stm32f7.config | ||
| stm32f407-discovery.config | ||
| stm32f411-blackpill.config | ||
| stm32g0.config | ||
| stm32h5-dualbank.config | ||
| stm32h5-no-tz.config | ||
| stm32h5-tz-dualbank-otp-lms.config | ||
| stm32h5-tz-dualbank-otp.config | ||
| stm32h5-tz-dualbank.config | ||
| stm32h5-tz-psa-otp.config | ||
| stm32h5-tz-psa.config | ||
| stm32h5-tz-tpm.config | ||
| stm32h5-tz.config | ||
| stm32h5.config | ||
| stm32h7-octospi.config | ||
| stm32h7.config | ||
| stm32l0.config | ||
| stm32l4-cube.config | ||
| stm32l5-nonsecure-dualbank.config | ||
| stm32l5-wolfcrypt-tz.config | ||
| stm32l5.config | ||
| stm32u5-nonsecure-dualbank.config | ||
| stm32u5-wolfcrypt-tz.config | ||
| stm32u5.config | ||
| stm32wb-delta-enc-ext.config | ||
| stm32wb-delta-ext.config | ||
| stm32wb-delta.config | ||
| stm32wb-pka-1mb.config | ||
| stm32wb-tpm.config | ||
| stm32wb-uart-flash-encryption-aes128.config | ||
| stm32wb-uart-flash-encryption-aes256.config | ||
| stm32wb-uart-flash-encryption.config | ||
| stm32wb.config | ||
| ti-tms570lc435.config | ||
| versal_vmk180.config | ||
| versal_vmk180_sdcard.config | ||
| visualgdb-stm32l4.config | ||
| vorago_va416x0.config | ||
| x86_64_efi.config | ||
| x86_fsp_qemu.config | ||
| x86_fsp_qemu_seal.config | ||
| zynqmp.config | ||
| zynqmp_sdcard.config | ||
README.md
Config Example Files
This directory contains example .config presets for various target devices.
Make
The examples here can be copied directly to the project .config file to use with make.
CMake
See the CMakePresets.json file.
Config files can be added or updated to the CMakePresets.json like this:
python3 ./tools/scripts/config2presets.py ./config/examples/stm32h7.config
# then test it:
./tools/scripts/wolfboot_cmake_full_build.sh --target stm32h7
Troubleshooting
The wrong toolchain is being used, or a target was not specified
Error: no such instruction: `isb'