Add TI LAUNCHXL-F28P55X (C2000 C28x) bare-metal wolfCrypt example - #576
Add TI LAUNCHXL-F28P55X (C2000 C28x) bare-metal wolfCrypt example#576dgarske wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new bare-metal wolfCrypt bring-up example targeting the TI LAUNCHXL-F28P55X (TMS320F28P550SJ / C28x, CHAR_BIT==16), with a scoped algorithm set and on-device known-answer tests plus optional ECC SP-math smoke tests.
Changes:
- Introduces a C28x board-support
main()that runs SHA-2/SHA-3/SHAKE KATs, ML-DSA-87 verify (and optional sign), and integrates wolfcrypt test/benchmark harnesses. - Adds build scaffolding for TI CGT + C2000Ware (Makefile, ccxml, linker command files, user_settings.h).
- Adds embedded KAT vector headers for ML-DSA-87 verify and ECDSA P-256 verify.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| embedded/ti-c2000-f28p55x/Source/wolf_main.c | Bare-metal entry point, UART/JTAG logging hooks, timer timebase, KATs, ML-DSA verify/sign demo, optional ECC tests |
| embedded/ti-c2000-f28p55x/Source/mldsa87_kat.h | ML-DSA-87 public key + signature KAT vectors for on-target verification |
| embedded/ti-c2000-f28p55x/Source/ecc_p256_kat.h | RFC 6979-based deterministic ECDSA P-256 verify KAT inputs |
| embedded/ti-c2000-f28p55x/Header/user_settings.h | wolfSSL/wolfCrypt configuration tailored for C28x (CHAR_BIT==16) and scoped algorithm set |
| embedded/ti-c2000-f28p55x/Makefile | Headless cl2000 build for scoped wolfCrypt subset + optional ECC/sign modes |
| embedded/ti-c2000-f28p55x/README.md | Usage/build/run notes, 16-bit-byte pitfalls, memory/layout guidance |
| embedded/ti-c2000-f28p55x/28p55x_wolf_flash_lnk.cmd | Flash build linker layout (stack/heap/RAM region allocations) |
| embedded/ti-c2000-f28p55x/28p55x_wolf_sign_lnk.cmd | Alternate linker layout for ML-DSA sign build with large heap |
| embedded/ti-c2000-f28p55x/ccxml/F28P550SJ.ccxml | CCS target configuration for XDS110 + F28P550SJ |
| embedded/ti-c2000-f28p55x/.gitignore | Ignores build output artifacts |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d05386e to
d086a31
Compare
… mp_int + AES source review fixes
SparkiDev
left a comment
There was a problem hiding this comment.
Don't have to do all of them - I know that AI just does this.
| * sign build and the ML-KEM-768 build need the RAM for their large key/poly | ||
| * state, so use a smaller capture buffer there (the log only ever holds a few | ||
| * KB of text). */ | ||
| #if defined(WOLF_MLDSA_SIGN) || defined(WOLF_MLKEM) |
There was a problem hiding this comment.
Guard check around the wrong way?
| (void)path; (void)flags; (void)llv_fd; | ||
| return 0; | ||
| } | ||
| int WOLF_close(int dev_fd) { (void)dev_fd; return 0; } |
There was a problem hiding this comment.
Prefer not to have functions in one line.
| ret = wc_ecc_set_rng(&keyA, &rng); | ||
| } | ||
| if (ret == 0) { | ||
| ret = mp_init(&r); |
|
|
||
| /* Focused SHA3-256 known-answer test (SHA3-256("abc")), to confirm the | ||
| * 16-bit-byte Keccak path is correct on the C28x. */ | ||
| { |
There was a problem hiding this comment.
Personal dislike of these blocks.
Could extract these to functions.
| printf("\r\n--- ML-KEM-768 ---\r\n"); | ||
| { | ||
| static MlKemKey kemk; | ||
| static byte kem_pk[WC_ML_KEM_768_PUBLIC_KEY_SIZE]; |
New embedded/ti-c2000-f28p55x/ example for the TMS320F28P550SJ (C28x DSP, CHAR_BIT==16). Scoped bare-metal build (cl2000) demonstrating, validated on hardware: SHA-256/384/512(+512-224/256), SHA-3, SHAKE128/256; ML-DSA-87 verify, keygen and sign (make SIGN=1); and ECDSA + ECDH P-256 via SP math (make ECC=1). ML-DSA verify uses the smallest-mem streaming verifier. Includes BSP/startup, SCIA + JTAG-RAM logging, linker scripts, KAT headers, a wolfcrypt test/benchmark harness, a stack-usage profiler, and a 'make compile-ci' guard. Needs a wolfSSL checkout with the CHAR_BIT!=8 fixes (set WOLFROOT).