Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Establish early communication with ITM #10

Closed
vkottler opened this issue Oct 17, 2023 · 13 comments
Closed

Establish early communication with ITM #10

vkottler opened this issue Oct 17, 2023 · 13 comments
Assignees
Labels
enhancement New feature or request

Comments

@vkottler
Copy link
Owner

ARM documentation: https://developer.arm.com/documentation/100166/0001/Instrumentation-Trace-Macrocell-Unit?lang=en

I'm pretty sure we can use SWO viewer for this? https://wiki.segger.com/J-Link_SWO_Viewer

@vkottler vkottler added the enhancement New feature or request label Oct 17, 2023
@vkottler vkottler self-assigned this Oct 17, 2023
@vkottler
Copy link
Owner Author

@vkottler
Copy link
Owner Author

@vkottler
Copy link
Owner Author

The following section describes the ITM registers whose implementation is specific to this processor. Other registers are described in the Armv7-M Architectural Reference Manual.

We need to get ahold of the architecture manual as well..

(note: created vkottler/ifgen#57 while working on this)

@vkottler
Copy link
Owner Author

@vkottler
Copy link
Owner Author

Next step is to populate the rest of the register bit-fields for all of the other ITM registers, then try actually using the ITM.

From there we should be able to bootstrap everything else (assuming we can get the SWO-based bi-directional comm working!)

@vkottler
Copy link
Owner Author

https://developer.arm.com/documentation/ddi0484/c/Debug/About-debug

Doesn't seem like the M0+ has the debug interface/ITM, should we consider trying the Segger-specific RTT stuff?

@vkottler
Copy link
Owner Author

https://github.com/SEGGERMicro/RTT

seems like the thing to check out

@vkottler
Copy link
Owner Author

Yep. Those examples are what I need to get working it seems.

@vkottler
Copy link
Owner Author

Big success on this branch: #9.

Getting the "hello, world!" console spam:

image

Using JLinkSWOViewerCLExe. I was also able to get the same working with the GUI version.

I think next we want to try the GDB port integration!

@vkottler
Copy link
Owner Author

vkottler commented Oct 18, 2023

Open question: is there a reading end of this ITM? That would be super legit, I don't think there is though.

edit: but how do people say you can do semi-hosting with this, then?

https://wiki.segger.com/Semihosting

@vkottler
Copy link
Owner Author

Even more recent success on this front: #11.

I'd like to do a bit more tweaking so we can get this to true "one button workflow" level (figure out why we need to hit enter a few times when entering GDB + ensure that the program also starts with another continue by default).

@vkottler
Copy link
Owner Author

Once this is complete, we can start trying to implement character handling + echo and stuff? Basically make an initial CLI.

@vkottler
Copy link
Owner Author

vkottler commented Oct 22, 2023

See this comment: #6 (comment).

edit: we did also get output working via the ITM

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

No branches or pull requests

1 participant