Repository navigation
Conversation
Defining SI5351_NO_CLK67 leaves out multisynth67_calc and the CLK6/CLK7 branches in set_freq, set_freq_manual, set_ms, pll_update, and ms_div. Without the macro the public API and behavior stay the same. The Uno flash check compiles the gated runtime sketch alongside the existing ones and locks it at 10442 bytes. Co-authored-by: Jason Milldrum <NT7S@users.noreply.github.com>
set_pll() is now the only copy of pll_calc, the parameter write, and pll_update, including the VCXO parameter bytes. pll_calc uses one feedback division for the normal and VCXO paths, both of which divide by 1000000. init() and reset() walk the two references, both PLLs, and the eight clocks in single loops, and set_correction() is noinline so that sequence is not duplicated when init() is inlined into main. Uno ceilings are now min_const 10202, min_runtime 10930, and the gated runtime sketch 9836. Co-authored-by: Jason Milldrum <NT7S@users.noreply.github.com>
|
Memory usage change @ b4a6c3b
Click for full report table
Click for full report CSV |
Arduino IDE users cannot pass per-sketch compiler flags, and a #define in the sketch did not reach si5351.cpp. The CLK6/7-only code now lives in weak member functions (set_freq67, ms67_div, set_ms67). When a sketch defines SI5351_NO_CLK67 before #include <si5351.h>, the header adds stubs that replace them, and the linker drops the originals. The compiler-flag opt-out still works. No public API or constructor change. Opt-out behavior is identical to the compiler-flag build (native harness, 1386 runs, byte-identical transcripts). Default builds keep 0 differing runs vs v2.4.2 and get 62 bytes smaller on the Uno (CLK6/7 R-divider handling moved out of ms_div). Uno flash (arduino-cli 1.5.1, arduino:avr 1.8.6): min_runtime 10868 default, 9870 with the sketch #define, 9836 with the flag. Adds a min_runtime_sketch_no_clk67 budget (9870) that fails at 10930 when the define is ignored, tightens min_const/min_runtime to 10140/10868, and documents the opt-out in the README.
|
Memory usage change @ e7dfd34
Click for full report table
Click for full report CSV |
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.
Targeted flash-size refactor with no API change.
Changes
SI5351_NO_CLK67compile-time gate. It removes CLK6/7 support for builds that don't need it. Pass it as a compiler define (e.g.compiler.cpp.extra_flags=-DSI5351_NO_CLK67), not as a#definein the sketch. In a gated build, CLK6/7 calls return 1 and don't touch the registers.set_pll()is now the only PLL programming path, including VCXO.init()andreset()use single loops, andset_correction()is noinline.Size (Uno, arduino:avr 1.8.6)
flash/budgets.txtis set to these sizes.Verification
run_v231_checks.sh --src, including an I2C transcript equivalence check against v2.4.2 (f885fca). Also passed:prove_v242_negative.shandflash/check_flash_budget.sh.