EFR32xG25 Secure Element example - #627
Conversation
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Adds a headless Simplicity Studio (slc-cli) example project for EFR32xG25 that runs wolfcrypt_test + benchmark, with optional on-device TLS 1.3 mem-IO testing, all routed through the Silicon Labs Secure Element via wolfSSL crypto callbacks.
Changes:
- Adds an
slcproject (.slcp) that builds wolfSSL sources from a neighboring checkout and configures required Silicon Labs components. - Introduces shared
user_settings.hfor Secure Element offload + optional TLS 1.3 and Thumb2 asm toggles. - Adds headless
build.sh/flash.shscripts and documentation for toolchain setup, build/flash, and measured results.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| embedded/efr32xg25/wolfcrypt_test.slcp | New SLC project definition, sources, components, and build configuration for the example. |
| embedded/efr32xg25/user_settings.h | Shared wolfSSL/wolfCrypt configuration for SE crypto-callback routing and optional TLS/asm features. |
| embedded/efr32xg25/app.c | Main entry point: prints SE info, runs tests/bench, optional TLS 1.3, and provides _gettimeofday() when needed. |
| embedded/efr32xg25/tls13_test.c | Optional TLS 1.3 on-device handshake + record-layer test over an in-memory transport. |
| embedded/efr32xg25/build.sh | Headless generation/build script that locates SDK/tools via ~/.silabs/*.json registries. |
| embedded/efr32xg25/flash.sh | Flash/reset script using Silicon Labs Commander located via tools.json. |
| embedded/efr32xg25/README.md | Setup and usage docs plus performance measurements and notes. |
| embedded/efr32xg25/.gitignore | Ignores generated build output and local rewritten .slcp. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…, benchmark and TLS 1.3
907efd7 to
2698164
Compare
Add EFR32xG25 Secure Element example
Headless
slc-cliproject that runs the wolfCrypt test and benchmark, and an optional on-device TLS 1.3 test, on an EFR32xG25 with crypto routed to the Secure Element through the wolfSSL crypto callback port.Needs the port from wolfSSL PR wolfSSL/wolfssl#11267
What it adds
embedded/efr32xg25/:wolfcrypt_test.slcp,user_settings.h- project and shared configurationapp.c- entry point, prints the SE firmware version and Secure Vault level, then runs the test and benchmarktls13_test.c- optional TLS 1.3 client and server, both on the devicebuild.sh,flash.sh-slc generateplus make, andcommanderflashREADME.md- toolchain install, build, and the measured hardware-versus-software tableDesign notes
wolfssl-examples;WOLFSSL_ROOToverrides that.slcresolves everypath:entry relative to the.slcpfile, so a non-default root is rewritten to a path relative to the example directory and the rewritten copy has to stay there.build.shandflash.shread~/.silabs/sdks.jsonand~/.silabs/tools.jsonrather than hardcoding paths.WOLFSSL_SILABS_CRYPTOCBpointsWC_USE_DEVIDat the SE, so the stock benchmark measures every algorithm twice and labels the rowsHWandSW. Each comparison therefore comes from one run on one part.app.csupplies a_gettimeofday()seeded from the build date, overriding newlib's weak stub. Without it every certificate reads as not yet valid. That is adequate for a self-contained demo and nothing more.Hardware and test status
Validated on an EFR32FG25B222F1920IM56 (BRD4270B, Secure Vault High, SE firmware 2.2.0):
wolfcrypt_testfull PASS, benchmark clean.TLS13-AES128-GCM-SHA256,TLS13-AES256-GCM-SHA384andTLS13-CHACHA20-POLY1305-SHA256, all pass.Scope
The TLS 1.3 test and the Thumb2 assembly software path are both opt-in blocks at the top of
user_settings.h; their sources are already in the project and compile to nothing while off.