Skip to content

Conversation

@pamaury
Copy link
Contributor

@pamaury pamaury commented Jan 26, 2026

Backport #27235. Depends on #29173 and #29167, only review last commit

When opentitanlib is invoked via an external C/C++ wrapper library, the
SpiConsoleDevice object is reinstantiated repeatedly to comply with
Rust's ownership rules (and satisfy the borrow checker). On each
reinstantiation of the SpiConsoleDevice struct, the next expected frame
number is reset to 0. This causes the SpiConsoleDevice to ignore a valid
frame when used through an external wrapper library, as is the case with
the OtlibWrapper used in the opentitan-provisioning repo. This was
causing CI issues in
lowRISC/opentitan-provisioning#165.

As such, this provides a mechanism for users of the SpiConsoleDevice to
ignore the frame number, which frankly  is not necessary when the
SpiConsoleDevice is used alongside the TX-indicator GPIO feature.
This feature does not make use of a circular transmit buffer, but rather
transmits only a single frame in the buffer at a time.

Signed-off-by: Tim Trippel <[email protected]>
(cherry picked from commit 9ca5d54)
@pamaury
Copy link
Contributor Author

pamaury commented Feb 2, 2026

CI failure is unrelated

@pamaury pamaury added this pull request to the merge queue Feb 2, 2026
Merged via the queue into lowRISC:master with commit 1390d64 Feb 2, 2026
46 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants