chore: build wolfSSL without DEBUG_WOLFSSL (-32 KB flash) - #51
Merged
Merged
Conversation
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
…-thread-v7jlsy # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Clankmaster · project thread
Before: Arduino-wolfSSL's
user_settings.hdefinesDEBUG_WOLFSSL, so everyWOLFSSL_MSG/WOLFSSL_ENTERtrace string and call is compiled into flash. That code is only reachable whenFREEINK_WOLFSSL_DEBUGturns tracing on.After:
x4-pro-light-sleepapp image shrinks from 6,208,737 B to 6,176,721 B (-32,016 B, 94.7% to 94.2%). Setting-DFREEINK_WOLFSSL_DEBUGbrings the traces back.How:
scripts/patch_wolfssl.pyappends#undef DEBUG_WOLFSSLto its existing user_settings.h overrides unlessFREEINK_WOLFSSL_DEBUGis defined. This is the same macrofreeink-sdkSecureClient uses to callwolfSSL_Debugging_ON(). The app'swolfSSL_Arduino_Serial_Printhook 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