Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds LPC55S69 hardware-crypto enablement and supporting tooling for flashing/debug plus wolfCrypt test/benchmark support on the test application.
Changes:
- Add Lauterbach
.cmmscripts for factory flashing, update-image flashing, and debug setup. - Enable/parameterize LPC55S69 crypto acceleration build knobs (PKA), RNG/HashCrypt/Casper integration, and wolfCrypt test/benchmark execution.
- Update LPC55S69 linker/config defaults (RAM size, partitions, hash algorithm) to accommodate new crypto/test needs.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/scripts/lpc55s69/lpc55s69_flash_update.cmm | Adds Lauterbach script to program a signed update image. |
| tools/scripts/lpc55s69/lpc55s69_flash_factory_bin.cmm | Adds Lauterbach script to erase and flash a factory image. |
| tools/scripts/lpc55s69/lpc55s69_debug.cmm | Adds Lauterbach script to load symbols and set breakpoints for debugging. |
| test-app/wolfcrypt_support.c | Uses LPC55S69 SysTick millisecond counter for timing APIs used by wolfCrypt tests/benchmarks. |
| test-app/syscalls.c | Adds vsnprintf forward declaration to route printf-family functions. |
| test-app/startup_arm.c | Maps SysTick ISR name for LPC55S69 builds. |
| test-app/app_lpc55s69.c | Adds SysTick timebase, wolfCrypt test/benchmark runner, and weak syscall stubs. |
| test-app/Makefile | Adds RSA object and LPC55S69 hardware-crypto build/ld flags (PKA vs no-hwaccel). |
| test-app/ARM-lpc55s69.ld | Increases RAM, adds heap/stack region symbols used by runtime/debug. |
| include/user_settings.h | Adjusts RNG/DRBG and cipher settings for LPC55S69 (incl. interleave limitation). |
| hal/lpc55s69.c | Initializes HashCrypt/Casper and adjusts RNG peripheral handling based on hwaccel macros. |
| config/examples/lpc55s69.config | Updates defaults (SHA256, PKA off, partition locations) and documents larger-sector option. |
| config/examples/lpc55s69-tz.config | Same as above for TZ build. |
| arch.mk | Adds include paths and objects for LPC55S69 Casper/HashCrypt/RNG under PKA builds. |
Comments suppressed due to low confidence (1)
hal/lpc55s69.c:1
- The return values of
wc_hashcrypt_init()/wc_casper_init()are ignored. If initialization fails (clocking, reset state, secure/non-secure access, etc.), later crypto operations may fail in harder-to-debug ways. Recommend checking the return codes and either logging (whenDEBUG_UART) and/or failing fast in a controlled way.
/* lpc55s69.c
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
danielinux
left a comment
There was a problem hiding this comment.
do not tie RNG to NO_HWACCEL. CASPER/HASHCRYPT acceleration can be disabled while the hardware RNG is still required by WOLFCRYPT_SECURE_MODE, e.g. when compiling with trustzone.
You still need something like:
ifeq ($(WOLFCRYPT_TZ),1)
OBJS+=$(MCUXPRESSO)/drivers/rng_1/fsl_rng.o
endif
when PKA=0.
Then in hal/lpc55s69.c, you should remove the WOLFSSL_NXP_LPC55S69_NO_HWACCEL guards around RNG_Init() and RNG_GetRandomData(), or replace them with a dedicated RNG macro if you need one
reworked the rng code, clleaned up various other areas. I think all the pr issues should be addressed at this point. |
No description provided.