Skip to content

Conversation

@jmichelp
Copy link
Contributor

Orbuculum stopped accepting raw TPIU frames since v2.2.0. As TPIU framing is stable, parsing it in Python makes sense, leaving the other more complicated layers to Orbuculum to parse.

The code additionnaly leveraged the official python wrapper pyorb (pip install python-orbuculum) to directly use liborb and thus removes the need to write data to files, call binaries and then parse their text output. As packets are then returned as different python classes, it also opens support for more advanced ITM/ETM/DTW work for SCA.

Also added self-test to make sure future code changes don't introduce regression as the parsing is a bit twisted.

Code is heavily inspired from the TPIU decoder contained in Orbuculum project.

Orbuculum stopped accepting raw TPIU frames since v2.2.0.
As TPIU framing is stable, parsing it in Python makes sense, leaving the
other more complicated layers to Orbuculum.
The code additionnaly leveraged the official python wrapper pyorb
(`pip install python-orbuculum`) to directly use liborb and thus removes
the need to write data to files, call binaries and then parse their text
output. As packets are then returned as different python classes, it
also opens support for more advanced ITM/ETM/DTW work for SCA.
@jmichelp
Copy link
Contributor Author

mypy is failing because match/case statement has been introduced in python 3.10 and mypy workflow uses python 3.9.

That being said, python 3.9 is EOL and not supported anymore since Oct 31, 2025. Changing the code into if/elif/else statement would impact the readability IMO. But I can also remove the function completely as it's more a helper function for debugging/inspecting packets.

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