Port firmware to ChibiOS 21.11.5 - #166
Draft
PhysicistJohn wants to merge 7 commits into
Draft
Conversation
The RTC backup checksum covers every byte except the checksum itself, including a reserved packed byte that was never assigned. Its stack value could therefore make otherwise valid state fail verification after reset. Zero-initialize the complete backup image before assigning persisted fields so the checksum and reserved byte are deterministic.
The zero-span time grid can be calculated before actual_sweep_time_us is updated, leaving the display aligned to the previous sweep duration. Calculate grid geometry without mutating global state, recompute it after the measured sweep time is stored, and redraw only when the resulting tuple changes. Use 64-bit arithmetic through the final time-domain division so short sweeps retain exact pixel geometry.
Author
Physical qualification update (exact candidate
|
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.
Summary
Port both tinySA firmware targets from the historical ChibiOS fork to ChibiOS 21.11.5. This updates the RT7/HAL9 build, board, ADC, timer, PAL, USB, queue, stream-VMT, and interrupt APIs while preserving the established analyzer behavior. It also restores measured sweep/display/self-test timing and makes F303 fault entry stack-safe.
The branch is reconstructed directly on public upstream
c979386; every commit uses the public noreply identity. No private development history or experimental feature framework is included.ChibiOS dependency
The draft temporarily points
.gitmodulesat public integration commitdb35f6df137058c612dc13e4488ac923219d881ainPhysicistJohn/chibios. That commit is exactlyver21.11.5plus two focused fixes:Current-branch fixes are ChibiOS #84 and #85. Stable backports are draft ChibiOS #86 and #87. Before this PR is marked ready, the submodule URL and gitlink will be repointed to the canonical merged stable commit.
tinySA dependencies
This draft carries the changes from #164 (current zero-span grid) and #165 (deterministic backup checksum image) as explicit commits because the qualified ChibiOS candidate contains them. They will be rebased away or recognized automatically after those independent PRs merge. The scientific formatter fix in #163 is intentionally not included.
Build verification
Arm GNU 11.3.Rel1 clean builds pass without compiler warnings:
With
SOURCE_DATE_EPOCHpinned to the port commit timestamp, two clean F303 builds are byte-identical. Final draft artifact SHA-256:13f72e9ee9a80af170438958fc26029c516f6106c87aed9a45eea335a9a59fc9.The final public binary passed destructive executable-twin fault qualification for both extended-FPU PSP origin and nested MSP origin: core and callee frames, EXC_RETURN, stack canaries, fatal-screen output, 1 KiB MSP, and 6,488-byte heap all passed with zero unexpected model warnings.
The same final exact image passed the complete executable-twin matrix:
1 -> 0 -> 1reconfiguration, EP0 PMA ownership, STALL, and reset recovery;Sealed local report SHA-256 values:
d0556431e24758a9a50ef74973b49f326482ab59d2c82d9fcab2d5d47d1a9797;73a7fa6fe114467b29305a65091d5b7bd27d15e323f73555a46124e898ef145b;c27620424a44cadb73f52acb07951b360d85ba3e8fcca8044b3332bbee1d9649.Physical evidence and boundary
The predecessor RC5 image using the same application port and equivalent ChibiOS fixes was flashed to a tinySA Ultra+ ZS407. Exact DFU write/readback, USB runtime, warm reset retention, cold boot, and all fourteen built-in self-tests passed. A fresh official-versus-candidate A/B had one first-cold measured-level threshold failure in case 2; three repeats, including a second cold run, passed. No candidate-only persistent spur cluster was found.
This clean public commit has a different embedded version and binary hash. Keep the PR draft until:
No firmware binary is being proposed as an official release in this PR.