Skip to content

chore: build wolfSSL without DEBUG_WOLFSSL (-32 KB flash) - #51

Merged
prokrypt merged 3 commits into
developmentfrom
claude/project-thread-v7jlsy
Sep 27, 2026
Merged

prokrypt merged 3 commits into
developmentfrom
claude/project-thread-v7jlsy

Conversation

@prokrypt

Copy link
Copy Markdown
Owner

Requested by Clankmaster · project thread

Before: Arduino-wolfSSL's user_settings.h defines DEBUG_WOLFSSL, so every WOLFSSL_MSG/WOLFSSL_ENTER trace string and call is compiled into flash. That code is only reachable when FREEINK_WOLFSSL_DEBUG turns tracing on.

After: x4-pro-light-sleep app image shrinks from 6,208,737 B to 6,176,721 B (-32,016 B, 94.7% to 94.2%). Setting -DFREEINK_WOLFSSL_DEBUG brings the traces back.

How: scripts/patch_wolfssl.py appends #undef DEBUG_WOLFSSL to its existing user_settings.h overrides unless FREEINK_WOLFSSL_DEBUG is defined. This is the same macro freeink-sdk SecureClient uses to call wolfSSL_Debugging_ON(). The app's wolfSSL_Arduino_Serial_Print hook in KOReaderSyncClient.cpp is gated the same way, since nothing references it otherwise.

Verify on hardware: KOReader sync and an HTTPS download (OPDS or font download) still connect over Wi-Fi.

🤖 Generated with Claude Code

https://claude.ai/code/session_013k1W4UZTzyPQnTVXwZUbkS


Generated by Claude Code

Arduino-wolfSSL's user_settings.h enables DEBUG_WOLFSSL, which compiles every
WOLFSSL_MSG/WOLFSSL_ENTER trace string and call into flash. Undefine it in the
patch_wolfssl.py overrides unless FREEINK_WOLFSSL_DEBUG is set (the same macro
SecureClient uses to turn tracing on), and gate the app's print hook with it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013k1W4UZTzyPQnTVXwZUbkS
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013k1W4UZTzyPQnTVXwZUbkS
@prokrypt prokrypt self-assigned this Sep 27, 2026
@prokrypt
prokrypt merged commit 3521473 into development Sep 27, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants