Skip to content

Add STM32MP135 support#8

Merged
LinuxJedi merged 1 commit into
wolfSSL:mainfrom
LinuxJedi:simulator-stm32mp1
May 18, 2026
Merged

Add STM32MP135 support#8
LinuxJedi merged 1 commit into
wolfSSL:mainfrom
LinuxJedi:simulator-stm32mp1

Conversation

@LinuxJedi
Copy link
Copy Markdown
Member

@LinuxJedi LinuxJedi commented May 13, 2026

Bare metal Cortex-A using virtual DDR RAM. Also adds SHA3 / SHAKE support to the STM32 simulator for the MP135.

Note: wolfSSL doesn't yet support SHAKE hardware acceleration, and software SHAKE is currently broken when compiling hardware SHA3 acceleration.

Copilot AI review requested due to automatic review settings May 13, 2026 10:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds STM32MP135 (Cortex‑A7) support to STM32Sim, including Cortex‑A vs Cortex‑M boot/ELF handling, a new chip wiring/memory map, and HASH peripheral extensions needed to run MP13 SHA3/SHAKE workloads. It also introduces MP135 smoke firmware + a wolfCrypt MP135 firmware/test workflow to validate the new target end-to-end.

Changes:

  • Add a new stm32mp135 chip target (Cortex‑A7/ARM mode) with DDR-based memory map and peripheral wiring.
  • Extend core CPU/ELF loading to be CPU-kind aware (Cortex‑M vector-table boot vs Cortex‑A entry-point boot).
  • Add MP13 HASH ALGO decoding (4-bit field) and SHA3/SHAKE support (plus new MP135 smoke + wolfCrypt CI coverage).

Reviewed changes

Copilot reviewed 31 out of 31 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
STM32Sim/stm32-sim/runner-bin/tests/smoke.rs Adds MP135 smoke test build/run harness and output assertions.
STM32Sim/stm32-sim/runner-bin/src/main.rs Loads ELF and constructs CPU using per-chip cpu_kind.
STM32Sim/stm32-sim/peripherals/src/hash/v1.rs Adds MP13 ALGO decoding + SHA3CFGR register mirror + MP13 KAT tests.
STM32Sim/stm32-sim/peripherals/src/hash/mod.rs Adds SHA3/SHAKE algos and SHAKE wrapper to fit DynDigest engine.
STM32Sim/stm32-sim/peripherals/Cargo.toml Adds sha3 dependency to peripherals crate.
STM32Sim/stm32-sim/core/src/lib.rs Re-exports CpuKind from core.
STM32Sim/stm32-sim/core/src/elf.rs Adds CPU-kind aware ELF parsing (Cortex‑M vectors vs Cortex‑A entry).
STM32Sim/stm32-sim/core/src/cpu.rs Adds CpuKind, Cortex‑A Unicorn mode + Cortex‑A7 model selection.
STM32Sim/stm32-sim/chips/src/stm32u575.rs Sets cpu_kind for U5 chips.
STM32Sim/stm32-sim/chips/src/stm32mp135.rs New MP135 chip definition (DDR/SRAM map, UART4/CRYP1/HASH1/RNG1/PKA).
STM32Sim/stm32-sim/chips/src/stm32h753.rs Sets cpu_kind for H7 chip.
STM32Sim/stm32-sim/chips/src/lib.rs Adds cpu_kind to Chip, registers/list stm32mp135.
STM32Sim/scripts/run-wolfcrypt-mp135.sh New helper script to build/run MP135 wolfCrypt firmware in the Docker image.
STM32Sim/README.md Updates STM32Sim docs for MP135/Cortex‑A7 and HASH SHA3/SHAKE support.
STM32Sim/firmware/wolfcrypt-test-mp135/user_settings.h New wolfSSL user settings enabling MP13 crypto features (SHA3/SHAKE/SHA384/512).
STM32Sim/firmware/wolfcrypt-test-mp135/toolchain-arm-none-eabi.cmake New CMake toolchain for Cortex‑A7 ARM-mode build.
STM32Sim/firmware/wolfcrypt-test-mp135/stm32mp13xx_hal_conf.h New HAL configuration header for MP13 wolfCrypt build.
STM32Sim/firmware/wolfcrypt-test-mp135/stm32mp135.ld New linker script for DDR-only Cortex‑A7 firmware.
STM32Sim/firmware/wolfcrypt-test-mp135/startup.S New Cortex‑A7 reset/startup for wolfCrypt firmware.
STM32Sim/firmware/wolfcrypt-test-mp135/mmu.c New simple 1MiB-section MMU mapping for wolfCrypt firmware.
STM32Sim/firmware/wolfcrypt-test-mp135/main.c New wolfCrypt firmware main (UART, stubs, test_complete/test_result).
STM32Sim/firmware/wolfcrypt-test-mp135/CMakeLists.txt New build for MP13 wolfCrypt firmware using STM32CubeMP13 + wolfSSL.
STM32Sim/firmware/smoke-test-mp135/startup.S New Cortex‑A7 startup for MP135 smoke firmware.
STM32Sim/firmware/smoke-test-mp135/smoke.ld New DDR-only linker script for MP135 smoke firmware.
STM32Sim/firmware/smoke-test-mp135/mmu.c New MMU setup for smoke firmware.
STM32Sim/firmware/smoke-test-mp135/Makefile New Makefile for MP135 smoke firmware build.
STM32Sim/firmware/smoke-test-mp135/main.c New MP135 smoke firmware (UART4/RNG1/CRYP1/HASH1 incl. SHA3-256 KAT).
STM32Sim/Dockerfile.wolfcrypt Adds STM32CubeMP13 + MP135 firmware/script into wolfCrypt Docker image.
README.md Updates top-level README supported target list to include MP135.
.github/workflows/stm32-wolfcrypt-test-mp135.yml New GitHub Actions workflow to run MP135 wolfCrypt test via Docker.
.github/workflows/stm32-test-suite.yml Adds building MP135 smoke firmware in CI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread STM32Sim/stm32-sim/peripherals/src/hash/v1.rs Outdated
Comment thread STM32Sim/firmware/wolfcrypt-test-mp135/main.c Outdated
@LinuxJedi LinuxJedi force-pushed the simulator-stm32mp1 branch from dda35fd to 26f2fe9 Compare May 13, 2026 10:29
@LinuxJedi
Copy link
Copy Markdown
Member Author

LinuxJedi commented May 13, 2026

ATECC608 failure fixed in #7, this will need rebasing once that is merged.

@LinuxJedi LinuxJedi force-pushed the simulator-stm32mp1 branch from 26f2fe9 to d507309 Compare May 13, 2026 12:29
Bare metal Cortex-A using virtual DDR RAM. Also adds SHA3 / SHAKE
support to the STM32 simulator for the MP135.
@LinuxJedi LinuxJedi force-pushed the simulator-stm32mp1 branch from d507309 to 4cd817e Compare May 18, 2026 20:57
@LinuxJedi LinuxJedi merged commit 840da2f into wolfSSL:main May 18, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants