Skip to content
This repository has been archived by the owner on Dec 3, 2021. It is now read-only.

Handle bookkeeping of instrumentation extension packets #19

Open
tmplt opened this issue Nov 4, 2021 · 3 comments
Open

Handle bookkeeping of instrumentation extension packets #19

tmplt opened this issue Nov 4, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@tmplt
Copy link
Member

tmplt commented Nov 4, 2021

TracePacket::Extension-logic is non-trivial. From the reference documentation one finds the port of the payload bytes via id = (page * 32) + port where page is from the extension packet and port is from the instrumentation packet. However, the document (D4.2.8) also says

Whenever a debugger receives an Instrumentation packet, it uses the page number from the last Extension packet it received, or a page number of 0 if it has not received an Extension packet since it last received a Synchronization.

itm-decode should handle this and yield complete messages to the end-user.

@tmplt tmplt added the enhancement New feature or request label Nov 4, 2021
@tmplt tmplt added this to the v0.7.0 milestone Nov 4, 2021
@tmplt
Copy link
Member Author

tmplt commented Nov 4, 2021

How should this functionality be exposed to the user? Via another Decoder::pull variant?

@tmplt
Copy link
Member Author

tmplt commented Nov 12, 2021

A better idea would perhaps be to change the API to a single pull function. This function could return an enum { ITMPacket(TracePacket), MetaPacket(TimestampedTracePacket, CompleteStimMessage) } or something similar. The decoder can then be configured via some Decoder::{group_with_timestamps, complete_stim_strings}(bool).

@tmplt
Copy link
Member Author

tmplt commented Nov 21, 2021

When #20 closes, this issue should be moved to https://github.com/rust-embedded/itm.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant