An IDE/MCUEXPRESSO/RW612 directory with a known-good user_settings.h and the
steps to build the port against the SDK rather than Zephyr, plus the port
README's pointer to it. The README itself grew alongside the offloads it
documents.
SE050 and CryptoCell are supported with this.
WOLFSSL_NO_RSA_SW to disable the RSA software implementation.
WOLFSSL_NO_ECC_SW to disable the ECC software implementation.
- fsp.ld Removed
- README additional description to place the RTT control block at a fixed
- renesas_fspsm_aes.c : WOLFSSL_MAX_32BIT use, fixes indent
- .gitignore Added fsp.ld in RA6M4 projects
Replace USE_FAST_MATH/TFM_TIMING_RESISTANT with SP math, sized for the
fixed key sizes this board uses (RSA 2048, ECC P-256, Curve25519,
FFDHE 2048): WOLFSSL_SP_MATH + WOLFSSL_HAVE_SP_RSA/DH/ECC, with
WOLFSSL_SP_ARM_CORTEX_M_ASM for the Cortex-M33 assembly path and
WOLFSSL_SP_SMALL/WOLFSSL_SP_NO_MALLOC/WOLFSSL_SP_NO_DYN_STACK/
WOLFSSL_SP_NO_3072 to keep it small and heap/VLA-free for this
embedded target.
Pass 1 only matched the exact "/*#define X*/" form, but the checked-in
wolfssl_demo.h spells BENCHMARK's line with spaces ("/* #define
BENCHMARK */"). That left -Mode bench unable to enable BENCHMARK, and
any other mode's pass 2 matched "#define BENCHMARK" inside the spaced
comment and produced an invalid nested comment ("/* /*#define
BENCHMARK*/ */"), breaking the header. Use a whitespace-tolerant regex
instead of a literal match.
build.bat: %ERRORLEVEL% inside a parenthesized if-block is expanded at
parse time, before the PowerShell call runs, so it silently ignored a
failed set_demo_mode.ps1. Use "if errorlevel 1", matching the same fix
already applied to the clean step below.
debug_run.bat: QC_DELAY_MS was read into a variable and shown in
status messages, but the generated J-Link command file never actually
emitted a "sleep" command between "g" and "qc" -- the probe
disconnected immediately instead of waiting. Emit "sleep !QC_DELAY_MS!"
in both the restart and reload command files.
user_settings.h: enable GCM_TABLE_4BIT (faster software GHASH) and
default to TLS 1.3 instead of requiring a manual edit to try it.
test_main.c: guser_PKCbInfo was only declared in the #else branch of
TLS_MULTITHREAD_TEST, but sce_test()'s CRYPT_TEST/BENCHMARK branches
use it unconditionally -- building with TLS_MULTITHREAD_TEST and
CRYPT_TEST/BENCHMARK together left it undeclared. Declare it
unconditionally; guser_PKCbInfo_taskA/taskB stay under
TLS_MULTITHREAD_TEST since only the TLS_CLIENT branch's per-task
connections use those.
Rewrite the SEGGER_RTT setup steps in README.md to add the
.txt.rtt_block section to the persistent script/fsp.ld instead of the
auto-generated fsp_gen.ld, which gets overwritten every time the FSP
Configurator regenerates project content. Note that build.bat now
prints the RTT control block address after a build.
Add script/fsp.ld for both the wolfssl and test projects (the
project's linker config looks for fsp.ld under ${ProjName}/script,
which didn't exist there before); test/script/fsp.ld additionally
defines the .txt.rtt_block section.
Add an Appendix section documenting build.bat and debug_run.bat usage.
The portable aesgcm_misaligned_test() (wolfcrypt/test/test.c) sets a
plaintext key, so it never reaches wc_fspsm_AesGcmEncrypt()/Decrypt()
-- wc_fspsm_AesCipher() only dispatches to the SCE hardware path once
keyflgs_crypt.bits.aes*_installedkey_set is set by SCE_KeyGeneration().
Add sce_aesgcm_misaligned_test(), following the existing
sce_aesgcm128_test()/sce_aesgcm256_test() wrapped-key pattern, to
actually exercise the hardware with misaligned AAD/data at every byte
offset within a block, for both AES-128 and AES-256. Verified passing
on RA6M4 hardware.
ca_cert_der_sign and ca_ecc_cert_der_sign are regenerated output of the
SCE-signing tool (tools/example_keys/generate_SignedCA.*) against the
current CA certs, so they no longer match the checked-in bytes.
Also drop the stray `static` on sizeof_ca_ecc_cert_der_sign so its
linkage matches sizeof_ca_cert_der_sign right above it; nothing in
this tree references either symbol from another translation unit yet,
but the RSA/ECC pair should behave the same way once something does.
The network stack (PHY link, ARP for the gateway) isn't necessarily
ready the instant a connection task starts, so a connect attempt made
too early fails with ETIMEDOUT(-116) or ENOTCONN(-128). The
non-multithreaded caller in test_main.c already retries around its own
wolfSSL_TLS_client_do() call for exactly this; TLS_MULTITHREAD_TEST's
per-task connections had no equivalent, so they'd fail outright instead
of retrying. Close and recreate the socket each attempt, since its
state after a failed connect isn't reusable.
FreeRTOS's TaskFunction_t is "void (*)(void*)", but wolfSSL_TLS_client_do()
was declared/defined to always return int, and the non-multithread caller
in test_main.c uses that return code. Under TLS_MULTITHREAD_TEST, make it
return void instead (it already ends itself via vTaskDelete(NULL) rather
than returning a value there), matching TaskFunction_t exactly; keep the
int-returning definition for the non-multithread, direct-call path.
wc_GetTime()/time() resolves to ARM semihosting (_gettimeofday, from
librdimon, via --specs=rdimon.specs) on this board, which has no RTC.
Semihosting blocks forever unless an active debugger is servicing the
call -- fine under an e2studio GUI debug session, but hangs a target
flashed and run standalone (e.g. via debug_run.bat). asn_test()'s
wc_GetTime() call in CRYPT_TEST, and peer certificate date validation
in TLS_CLIENT, both hit this.
Register a wc_SetTimeCb() callback that derives a plausible "now" from
the build date/time (__DATE__/__TIME__), the same approach already
used in IDE/Renesas/e2studio/RX65N/GR-ROSE/common/wolfssl_dummy.c, so
it stays roughly current as the project keeps getting rebuilt instead
of a hand-maintained literal. Replace with a real RTC-backed callback
if wall-clock time is ever needed (e.g. real certificate expiry
checks).
- build.bat / debug_run.bat: build and flash+run the RA6M4 wolfssl/test
e2studio projects from cmd.exe/PowerShell, mirroring the RX72N
EnvisionKit Simple demo's existing batch tooling. debug_run.bat drives
a real SEGGER J-Link via JLink Commander (unlike RX72N's RFP-based
workaround) and prints the _SEGGER_RTT control block address after a
successful build to save manually locating it for RTT Viewer.
- set_demo_mode.ps1: switch common/wolfssl_demo.h between CRYPT_TEST /
BENCHMARK / TLS_CLIENT, matching the RX72N demo's mode switcher.
- tools/example_keys/generate_SignedCA.bat: Windows wrapper for
generate_SignedCA.sh via Git for Windows' bash, with fixed RSA/ECC
arguments.
- tools/README.md: document the above and correct a stale script name.
- include.am: list the new files for source distribution.