Commit Graph

2315 Commits (5fb5b4b6ea112a9caddf3a5551e4423bf6103579)

Author SHA1 Message Date
Mattia Moffa 5fb5b4b6ea nRF5340 TrustZone port 2025-11-25 03:01:03 +01:00
gojimmypi 530619e3ab Remove duplicate FLASH_CR_PNB_nn 2025-11-20 18:28:03 +01:00
gojimmypi 5463d02638 Suggested changes to stm32g0 2025-11-20 18:28:03 +01:00
David Garske 2546ebcaf9 Fixes for unused variables. Also repaired STM32WB55 build with PKA 2025-11-20 18:26:58 +01:00
Mattia Moffa e6383d7b20 Shorten line 2025-11-20 18:00:55 +01:00
Mattia Moffa 521d6ab914 Fix new stm32h5-tz-tpm.config 2025-11-20 18:00:55 +01:00
Mattia Moffa 076eabcc54 Non-TZ nRF5340 fixes 2025-11-20 18:00:55 +01:00
Mattia Moffa 60d953ea97 Fix stm32h5.config 2025-11-20 18:00:55 +01:00
Mattia Moffa d5b2b4728d Various STM32 TrustZone improvements
- New config flags for flash geometry
- New script to automatically set option bytes
- End of stack address fix for the STM32U5 test app
- STM32U5 support for NUCLEO-U575ZI-Q (previously only supported
  discovery board)
2025-11-20 18:00:55 +01:00
David Garske 4e1c9f0e1f Revert changes to cppcheck and unused arguments 2025-11-19 16:29:28 +01:00
David Garske 8cb3d33339 Added STM32H5 SPI Driver and support for TPM
Cleanup STM32H5 HAL port.
Refactor `__ARM_FEATURE_CMSE` to `TZ_SECURE()`
Refactor attribute cmse_nonsecure_entry to use new macro `CSME_NSE_API`
Added TPM Non Secure Callable API's
Added TPM support to STM32H5 test application
2025-11-19 16:29:28 +01:00
David Garske ecf1cb8a92 Peer review fixes. Added new WOLFBOOT_RESTORE_CLOCK option 2025-11-19 11:11:28 +01:00
David Garske 3a85a27fb9 Unify the hdr_cpy (we don't need two) 2025-11-19 11:11:28 +01:00
David Garske c2ed553da1 Added Vorago VA416x0 wolfBoot support
Added check on image header size and sector size.
Expanded the ML-DSA testing.
2025-11-19 11:11:28 +01:00
Badr Bacem KAABIA 6313077805 fix(spi_flash): Resolve protocol errors and write verification bug
This commit improves the robustness and protocol compliance of the SPI flash
driver by resolving critical bugs and standardizing command sequences.

Key Changes:

1.  **Write Verification Bug (spi_flash_write_sb):**
    * Replaced the complex bitwise verification logic with a direct comparison
      (`verify == buf[j]`) for robust data validation.

2.  **Protocol Violations & Performance:**
    * **spi_flash_probe:** Fixed silent protocol failure by adding mandatory
      `WREN` before `WRSR` and adding explicit `wait_busy()` and `WRDI`.
    * **spi_flash_write_page:** Removed redundant `wait_busy()` after `WREN`
      to improve performance.
    * **Erase Functions:** Standardized erase flow by ensuring an explicit
      `wait_busy()` is performed after `WREN` before issuing the command.

These changes prevent silent failures, potential flash corruption, and
unnecessary latency.

Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
2025-11-18 15:20:10 +01:00
gojimmypi d513adc3b7 Introduce keygen --no-overwrite to avoid prompt 2025-11-13 17:59:22 +01:00
David Garske a559b750b0
Merge pull request #629 from danielinux/sim-dualbank
Add simulator support for DUALBANK, test bank swap
2025-11-10 08:25:19 -08:00
David Garske 79fa066e5c Fix for the STM32 internal flash erase page selection mask (some variants have larger sizes) 2025-11-10 13:51:04 +01:00
Daniel Pouzzner c02c273cf5
Merge pull request #624 from gojimmypi/pr-detect-user-settings
Hard fail if the wrong user settings is detected
2025-11-08 09:30:01 -06:00
Daniele Lacamera a6d029552b Restore .config after dualbank test 2025-11-03 11:28:47 +01:00
Daniele Lacamera 10a0c0bfa0 Add simulator support for DUALBANK, test bank swap 2025-11-03 11:21:22 +01:00
gojimmypi f198c6ba49
Hard fail if the wrong user settings is detected 2025-10-31 11:11:05 -07:00
David Garske a8afa747ae
Merge pull request #620 from gojimmypi/pr-keystore-cleanup
Ensure no generated keystore files are included
2025-10-31 08:52:32 -07:00
Daniel Pouzzner 61d6232b8c
Merge pull request #618 from gojimmypi/pr-vs-line-endings
Update Visual Studio project file line endings for Windows CRLF
2025-10-30 23:59:46 -05:00
David Garske cc8096507e
Merge pull request #619 from mattia-moffa/20251030-h5-dualbank
Fix STM32H5 dualbank update
2025-10-30 13:43:44 -07:00
gojimmypi fe3967ea44
Ensure no generated keystore files are included 2025-10-30 13:36:57 -07:00
Mattia Moffa f453a68f4b Add stm32h5-tz-dualbank.config to CI 2025-10-30 21:15:20 +01:00
Mattia Moffa 07bb1e1d88 Change START to STRT to be consistent with official name 2025-10-30 20:32:17 +01:00
Mattia Moffa 61f1710ba8 Fix STM32H5 dualbank update 2025-10-30 20:27:49 +01:00
David Garske c6776bc097 Improvements to lib-fs status and added keystore. Added some useful logging/debugging 2025-10-30 16:31:27 +01:00
Juliusz Sosinowicz 2ac0c5dba5 Add CI 2025-10-30 16:31:27 +01:00
David Garske fd10a1d8a5 Patch to fix unit-test missing `wolfBoot_get_blob_version` 2025-10-30 16:31:27 +01:00
David Garske c0f6fca1a9 Fix for P1021 stage 1 2025-10-30 16:31:27 +01:00
David Garske 4d0106caee Fixes for build warnings 2025-10-30 16:31:27 +01:00
David Garske c4b1422307 Fix build error with MMU defined. 2025-10-30 16:31:27 +01:00
Juliusz Sosinowicz 2345138a1b Implement filesystem-based partition state access and CLI tools
- Add filesystem access implementation in HAL (`hal/filesystem.c`)
- Introduce new library_fs target and build rules for filesystem-backed partition management
- Provide example configuration for library_fs
- Add CLI application (`hal/library_fs.c`) to query and manage partitions
- Update documentation with usage instructions and build steps for the new CLI tool
- Update .gitignore
2025-10-30 16:31:27 +01:00
David Garske b795cce0f7
Merge pull request #617 from mattia-moffa/20251023-h5-update-fix
Fix STM32H5 update
2025-10-29 13:53:55 -07:00
Mattia Moffa 70d25f457a Fix docs link 2025-10-29 15:10:53 +01:00
Mattia Moffa ea9484f6a4 Add docs for NSC APIs and update H5 option bytes 2025-10-29 15:02:58 +01:00
Mattia Moffa 18134632a7 Fix non-trustzone configs 2025-10-29 00:41:52 +01:00
Mattia Moffa 177358e88d Update H5 app to use new NSC API
- Make the update and swap partitions secure and inaccessible from the
  app except via NSC API
- Add a couple of necessary new NSC functions
- Update the app to only use NSC API
- Fix hal_flash_erase to account for secure addresses
- Fix some bugs in xmodem implementation
2025-10-29 00:13:01 +01:00
gojimmypi 8c48c5225b
Update project file line endings for Windows CRLF 2025-10-28 11:37:49 -07:00
David Garske e0e9217161 Fix some issues with documentation for STM32H5 and include steps to test update using STM32 programmer. 2025-10-24 09:25:41 -07:00
Mattia Moffa fd2c81a1f8 Fix H5 erase bug 2025-10-24 18:09:57 +02:00
Mattia Moffa 70f12a2a5e Update docs 2025-10-24 18:09:03 +02:00
Mattia Moffa fdcd7be322 Don't use hardcoded value; add comment 2025-10-23 22:41:20 +02:00
Mattia Moffa 58baba21e0 Fix STM32H5 update 2025-10-23 21:52:42 +02:00
David Garske a93f2b7d00 Update other submodules too 2025-10-23 18:35:09 +02:00
David Garske 80ec565802 Fixes for test failures 2025-10-23 18:35:09 +02:00
David Garske a7a8ca5a57 Fixes for wolfBoot after wolfSSL ARM ASM PR https://github.com/wolfSSL/wolfssl/pull/9284 2025-10-23 18:35:09 +02:00