Code Size Feature Flags + Restart Policy Modifications - #53
Open
tyler-potyondy wants to merge 3 commits into
Open
Code Size Feature Flags + Restart Policy Modifications#53tyler-potyondy wants to merge 3 commits into
tyler-potyondy wants to merge 3 commits into
Conversation
Collaborator
Author
|
Ah I realized what the issue is, the default build now gets rid of Will revert copilot's commit and push the actual fix. |
|
Issue with running the script |
tyler-potyondy
force-pushed
the
ents/cfg-feature
branch
from
August 28, 2026 17:08
d31a56b to
a988774
Compare
This adds flags for the process console, debug macro, and fault policy to pass as make arguments and feed into the cargo build as features
…flags Baseline board does not include process console/debug macro/panic printing and restarts apps on faults. This reduces the kernel code size substantially.
… build lora_e5_mini now uses cfg flags and conditionally compiles to reduce code size. This can introduce some brittleness so we add this script to CI to test building kernel with each combination of flags.
tyler-potyondy
force-pushed
the
ents/cfg-feature
branch
from
August 28, 2026 17:31
a988774 to
7cd1527
Compare
Collaborator
Author
|
Should be good to go now + CI is passing. Maybe worth testing on your end too @jmadden173 just to confirm any problems are resolved. |
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.
Pull Request Overview
This pull request adds some
make/ rust feature flag changes to enable conditional compilation for various debug features that incur a code size overhead. The net effect of this PR is that the defaultmakefor the lora e5 mini board now results in a 45 kB binary size.The new flags / usages are detailed in the README for the board.
Additionally this PR updates our fault policy. For the standard build, we default to app's restarting on faults in the application. Kernel panics now result in us just rebooting the board. Although this is good from a robustness/code size standpoint, there is now no infrastructure/signal to notify a developer that the board rebooted and panicked (panics in the kernel are now silent). This seems good for deployed devices, but can be confusing if you're building the board. Adding the flag:
make -- --devwill enable all debugging features (process console, verbose panics, stop kernel on app faults etc).Finally, to make sure these new cfg flags don't result in code paths that don't build, I also added a script to CI that tries to build all combinations of the cfg feature flags.
Claude was used for a lot of the scripting changes, but I reviewed.
Testing Strategy
This pull request was tested on the board.
TODO or Help Wanted
N/A
Tock + ENTS Developer PR Form
Documentation Updated
/docs, or no updates are required.Formatting
make prepush.AI Use
code in this PR, if any, and I have manually checked and
personally certify the entire contents of this PR.