tft: firmware files from a local firmware/ folder, checked by SHA-256
Nextion's seven firmware files cannot be in the repo, so the repo now ships their SHA-256 hashes (src/nxhmi/firmware.sha256, Editor 1.68.2.3035) and every build checks the files against them. The files live in the git-ignored firmware/ folder; `nxhmi firmware --from <Editor folder>` copies them, `nxhmi firmware` reports ok / missing / wrong hash. build-tft and the MCP tool take --firmware-dir / firmware_dir (also NXHMI_FIRMWARE_DIR) instead of the Editor folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0287cf21e4
commit
85422a1ef4
14 files changed
+259
-44
No files matched your search
@@ -19,7 +19,10 @@ src/nxhmi/
|
||||
fonts.py .zi v6 fonts, generation from TrueType
|
||||
render.py page renderer matching the Editor canvas
|
||||
tft.py .tft helpers (layout table, header checksums, trailer, seal, name hash)
|
||||
tft_build.py .HMI -> .tft builder (subset; firmware files come from the user's Editor folder)
|
||||
tft_build.py .HMI -> .tft builder (subset)
|
||||
firmware.py Nextion's firmware files for the builder: load from firmware/, SHA-256 check
|
||||
firmware.sha256 expected hashes (Editor 1.68.2.3035), in .tft order
|
||||
firmware/ git-ignored except README.md: the user's copies of Nextion's firmware files
|
||||
tft_code.py Nextion script -> tokenised chunks
|
||||
cli.py python -m nxhmi ...
|
||||
mcp_server.py MCP server (stdio JSON-RPC, no deps) -- tools for Claude incl. render_page images
|
||||
@@ -48,7 +51,9 @@ that, re-save the demo with Nextion Editor (open, File > Save As) and replace th
|
||||
All findings and the fixture come from **Nextion Editor 1.68.2.3035** (`nxhmi.TESTED_EDITOR_VERSION`).
|
||||
When verifying against a different Editor build, say so in the commit and in docs/NOTES.md; if a
|
||||
new build writes different bytes, document the difference in docs/FORMAT.md per version and bump
|
||||
`TESTED_EDITOR_VERSION` only after the fixture is re-saved and all tests pass.
|
||||
`TESTED_EDITOR_VERSION` only after the fixture is re-saved and all tests pass. A new Editor build
|
||||
also ships new firmware files: update `src/nxhmi/firmware.sha256` only together with re-measured
|
||||
`.tft` samples.
|
||||
|
||||
## Rules
|
||||
|
||||
@@ -56,7 +61,8 @@ new build writes different bytes, document the difference in docs/FORMAT.md per
|
||||
files, or by asking the Editor whether a hand-made file loads. Never decompile, decrypt or
|
||||
patch Nextion software.
|
||||
- **Never commit Nextion's files**: no `.tft` output (it embeds Nextion firmware), nothing from
|
||||
the Editor's install folder, no third-party projects. Test data is generated (`examples/`) or
|
||||
the Editor's install folder (local copies live in the git-ignored `firmware/`; only their
|
||||
hashes are committed), no third-party projects. Test data is generated (`examples/`) or
|
||||
is our own demo re-saved by the Editor.
|
||||
- Every format claim in `docs/FORMAT.md` needs evidence (byte-identical Editor output, or the
|
||||
Editor accepting a file we wrote). Mark guesses as **OPEN**.
|
||||
|
||||
Reference in new issue
Block a user