Skip to content

Renode chip binding: structs to ABI 1.7, accept 1.8; pin virtual-sx1262 v1.5.0 - #783

Merged
A13xB0 merged 4 commits into
mainfrom
fix-747-renode-abi
Oct 30, 2026
Merged

A13xB0 merged 4 commits into
mainfrom
fix-747-renode-abi

Conversation

@A13xB0

@A13xB0 A13xB0 commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #747.

  • VsxState and VsxCounters now follow virtual-sx1262's 1.7 header field for field. Each group is commented with the minor that appended it.
  • The floor stays at 1.3, so today's pinned library still loads. An older library fills a prefix of each struct and leaves the rest zero.
  • A minor above 1.7 is refused, since it may have appended fields again.
  • On load, the C# struct sizes are checked against the C sizes (52 and 52), so a mistyped field fails loudly.
  • The stats record goes to 47 bytes: ConsoleBaud (zero; the chip cannot see the console) and irq_suppressed. A chip older than 1.4 does not count suppressed IRQs, so its record stops at 43 bytes and the engine reports the count as absent rather than 0.

Tested live: a RAK_4631 repeater under Renode, against both the pinned 1.3.1 library and one built from virtual-sx1262 main (1.7). Both boot and transmit, with the same airtime. irq_suppressed is null on 1.3.1 and 0 on 1.7.

Not done: the issue's third point, sized vsx_get_state / vsx_get_counters. That is a virtual-sx1262 change. The pin itself is not bumped here either.

Also accepts ABI 1.8 (virtual-sx1262 v1.5.0 appended nothing to the structs) and pins v1.5.0 for emulated boards, in packaging/emulator-pins.env and the toolchain catalogue.

VsxState and VsxCounters were ABI 1.3 shapes while the version check
let any later minor in, so a 1.4+ library wrote past both. Both now
follow the 1.7 header; their sizes are checked against C's on load,
and a minor above 1.7 is refused until they are brought up to it.

The stats record goes to 47 bytes: ConsoleBaud (zero) and, from a
chip at 1.4 or later, irq_suppressed. An older chip's record stops
at 43 so the engine reads the count as absent, not zero.

Closes #747.
@A13xB0
A13xB0 force-pushed the fix-747-renode-abi branch from 9589b62 to e2b3f69 Compare October 30, 2026 17:06
@A13xB0 A13xB0 changed the title Renode chip binding: structs to ABI 1.7, refuse anything newer Renode chip binding: structs to ABI 1.7, accept 1.8; pin virtual-sx1262 v1.5.0 Oct 30, 2026
@A13xB0
A13xB0 merged commit 5ab1e5e into main Oct 30, 2026
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.

Renode chip binding: VsxState and VsxCounters are sized for virtual-sx1262 ABI 1.3, and a 1.4+ library overruns them

1 participant