ast10x0-hace: fix HACE KAT stack overflow (HardFault) The HACE SHA-2/HMAC KAT test (hace_sha256_test) HardFaulted with an unaligned UsageFault (wild pointer 0x191818f6) at the sha256 stream-9000 case. Root cause: run_hace_sha2_kats builds a large single stack frame that overflowed the pigweed-default 2 KiB kernel bootstrap stack into adjacent .bss (INPUT_BUF); the first case that writes that 4 KiB buffer (stream-9000) clobbered the live frame and corrupted a saved pointer. The one-shot cases passed only because they never write INPUT_BUF. Two parts: - hmac.rs: move the large HMAC working buffers (key, ipad, opad, and the 1 KiB msg) off the stack into a single .ram_nc static (HmacNcBufs), so HaceHmacCtx is just a few scalars (~20 bytes). This removes the dominant per-op stack pressure from the back-to-back HMAC cases. Remaining copy_from_slice calls are also converted to zip-copies. - config.rs: raise KernelConfigInterface::KERNEL_STACK_SIZE_BYTES from the 2 KiB default to 16 KiB, giving the bootstrap/idle kernel stacks ample headroom for the crypto KAT workloads. The AST10x0 has 768 KiB SRAM so the extra RAM is negligible. hace_sha256_test and no_panics_test both pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The OpenPRoT Technical Charter can be found at https://github.com/OpenPRoT/.github/blob/main/GOVERNANCE.md
NOTE: We are converting our build system to bazel. We recommend installing bazelisk to automatically manage bazel versions.
You can run tasks using the Pigweed workflow launcher pw or bazel.
./pw presubmit - Run presubmit checks: formatting, license checks, C/C++ header checks and clippy../pw format - Run the code formatters.bazel test //... - Run all tests.bazel build //docs - Build documentation.The project is structured as a bazel module.
No additional tools are required - all dependencies are managed by bazel.