Skip to content

Conversation

@zjli-2019
Copy link
Contributor

It will be handy to log data from up channel to a file, just like JLinkRTTLogger.

So, a new option --log-file is added to specify the file name and enable logging mode.

Other two options are also added to select up/down channels.

@rgrr
Copy link
Contributor

rgrr commented Apr 4, 2023

Sorry to jump into this PR... I'm currently doing some API experiments and one of my ideas was to do some RTT console fetching in an example. Unfortunately the current RTT implementation is not very flexible (underestimation).
How about extending the RTT module so that it exposes some methods like: SearchSignature() (perhaps in smaller bunches) and FetchData()?
If you already have your hands on this code, how about refactoring it a "little" bit?

@zjli-2019
Copy link
Contributor Author

@rgrr, RTTControlBlock.from_target in pyocd.debug.rtt seems just like SearchSignature.

@flit
Copy link
Member

flit commented Apr 5, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rgrr
Copy link
Contributor

rgrr commented Apr 5, 2023

@rgrr, RTTControlBlock.from_target in pyocd.debug.rtt seems just like SearchSignature.

@zjli-2019 : perhaps we have different sources, but I cannot find something like pyocd.debug.rtt or RTTControlBlock in pyocd. Do you have a link to a file?

@zjli-2019
Copy link
Contributor Author

@rgrr you can find it on the develop branch:

def from_target(cls, target: SoCTarget, address: int = None,

@rgrr
Copy link
Contributor

rgrr commented Apr 6, 2023

@rgrr you can find it on the develop branch:

def from_target(cls, target: SoCTarget, address: int = None,

Thanks for pointing me into that direction. That's exactly what I was looking for. Question is when this will be integrated.

@flit
Copy link
Member

flit commented Apr 9, 2023

Question is when this will be integrated.

I'm planning a release of everything on the develop branch as soon as the CMSIS-Pack debug sequence support (#1488) is merged in. The only thing remaining (I hope!) is a fix for an issue related to generation of memory regions for flash algorithms that don't have an explicit region definition, when there are certain alias regions present. Actively being worked on.

Copy link
Member

@flit flit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the minor file-related requests.

On a more functional level, do you think it would make sense to have logging be independent of viewing/input? So you could simultaneously view and log, or save a log from an interactive session.

Add copyright; add an empty line.
@zjli-2019
Copy link
Contributor Author

Just the minor file-related requests.

On a more functional level, do you think it would make sense to have logging be independent of viewing/input? So you could simultaneously view and log, or save a log from an interactive session.

It is nice to be able to simultaneously view and log, or save a log from an interactive session.
If so, file format has to be considered: how to store input/output separately, how to parse it later, etc.

In my case, an up channel is used to transfer binary trace data. Logging mode
is just like JLinkRTTLogger, and all data coming from the up channel is saved to a file that will be processed later.

@flit
Copy link
Member

flit commented Apr 11, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@flit flit merged commit 6f14ce2 into pyocd:develop Apr 16, 2023
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.

3 participants