Skip to content

Release 1.8.0#37

Merged
boringethan merged 21 commits into
mainfrom
next
Jun 19, 2026
Merged

Release 1.8.0#37
boringethan merged 21 commits into
mainfrom
next

Conversation

@boringethan

Copy link
Copy Markdown
Contributor

Release 1.8.0 — promotes 1.8.0-rc.0 to final. Merging next → main; 1.8.0 will be tagged on the resulting merge commit, which triggers CI to build Release firmware and publish the GitHub Release.

Changes since 1.7.0

Features

  • Console serial EEPROM module — OW_CMD_SERIAL (0x07): read / guarded-write / force-write of the serial record
  • Serial_Init called at boot
  • serial_record_t layout + console_serial API; odometer ring shrunk 15→13 slots to make room for serial at 0xD0

Fixes

  • Arm TEC trip by sizing the motion-config JSON token pool (token-pool overflow)
  • Refit EEPROM map into the writable lower half (chip write-protects 0x80–0xFF)

CI

  • Build Release firmware for rc/final tags
  • Treat -dev.* tags as prereleases

Docs / refactor

  • Document OW_CMD_SERIAL in CommandHandling.md; comment fix (OW_ERROR not NAK)
  • Move MOTION_CFG_MAX_JSON_TOKENS into motion_config.h
  • Track CLAUDE.md; add console_serial.c to firmware sources

Release steps

  • Approve & merge this PR (georgevigelette)
  • Tag 1.8.0 on main → CI builds Release + publishes GitHub Release as "latest"

boringethan and others added 19 commits June 17, 2026 12:44
…prom

feat: console serial number in external EEPROM (OW_CMD_SERIAL)
Was an untracked local file, so it never reached worktrees/fresh clones (which
is why flashing from a worktree needed manual setup). Track it on next.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The 24AA025E48 permanently write-protects its UPPER HALF (0x80..0xFF); only
0x00..0x7F is writable (datasheet DS20002124H, confirmed on hardware). The map
wrongly assumed 0x00..0xEF, so the serial record (0xD0) and odometer ring slots
8-12 (0x80..0xCF) silently failed to persist.

- EEPROM_PROTECTED_START 0xF0 -> 0x80
- odometer ring 13 -> 6 slots (0x00..0x5F)
- serial record 0xD0 -> 0x60 (0x60..0x7F)

Relaying the odometer ring invalidates existing on-EEPROM counters once (self-heals
via magic/CRC scan).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tected

fix: console EEPROM map — chip write-protects upper half (0x80-0xFF)
motion_cfg_apply_settings() tokenized the persisted config into a fixed
jsmntok_t[32]. A real config is ~1 KB with dozens of keys (71+ tokens),
so jsmn returned JSMN_ERROR_NOMEM and the routine bailed before applying
anything -- leaving TEC_TRIP_VALUE at 0, which disarmed the TEC thermal
trip (the telemetry guard short-circuits on TEC_TRIP_VALUE != 0.0). The
laser over-temperature interlock was silently off on any unit with a
full config.

- Add MOTION_CFG_MAX_JSON_TOKENS (256) in a HAL-free header shared by
  firmware and host test; resize the token pool (static, off-stack).
- Fail loudly on parse error: distinguish NOMEM, print to console, and
  push a system/error message to the host so it can't fail silently.
- Add host_tests/test_motion_cfg_tokens.c regression test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drop the single-define motion_cfg_limits.h header and place the token
bound alongside the other config constants in motion_config.h. The host
test can't include that HAL-coupled header, so it mirrors the value with
a sync comment; its primary guards (a real config needs >32 tokens; 32
yields NOMEM) don't depend on the production value.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-overflow

fix: arm TEC trip by sizing motion-config JSON token pool
build-firmware.yml exit 1'd on any tag that wasn't X.Y.Z or X.Y.Z-rc.N,
so a -dev.N tag built the firmware but failed the run and produced no
GitHub Release. Accept X.Y.Z-dev.N as a prerelease too (matching the
sensor-fw workflow) and add the -dev.* tag trigger.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Port the sensor-fw build-config strategy: tag builds compile Release
(-Os) except -dev.* which stay Debug; branch pushes and manual dispatch
stay Debug. Thread the resolved config through the build, artifact
upload, and release-asset paths, and record it in the release notes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
boringethan and others added 2 commits June 18, 2026 16:52
cppcheck (constVariablePointer) flagged the read-only setup-request
pointer in CDC_Control_FS. The Medical Firmware Safety & Security Scan
runs cppcheck with --error-exitcode=1, so this lone style finding failed
the whole scan on every push since the PORT_CLOSE feature landed.

req is only read (wValue, NULL check) and never written through, so
qualify it (and the cast) as const.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Qualifying req as const (prev commit) let cppcheck deduce pbuf is used
const-only and flag it. pbuf cannot be const: CDC_Control_FS is the
registered USBD_CDC_ItfTypeDef.Control callback, whose signature
(usbd_cdc.h) fixes pbuf as uint8_t*; constifying it would break the
function-pointer type match. Inline-suppress the false positive
(--inline-suppr is already enabled in the safety scan).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@boringethan
boringethan merged commit 4b4f021 into main Jun 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant