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

[WIP] Initial ITM port 0 test with stlink-trace tool #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

xor-gate
Copy link
Contributor

Initial testing using the ITM port 0 for printf using the SWD SWO pin. It works....

@maartentamboer
Copy link
Contributor

Travis is failing, but that seems a different problem
./.travis.sh: line 25: arm-none-eabi-gcc: command not found

@@ -12,3 +12,7 @@ OpenOCD and GDB are used for development and debugging
$ ./scripts/openocd.sh &> /dev/null &
$ arm-none-eabi-gdb --command=scripts/openocd-oca-v1.cfg
```

# Instrumentation trace macrocell

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe some description about what this actually does

| (1 << ITM_TCR_ITMENA_Pos); // Main enable for ITM
ITM->TER = 0xFFFFFFFF; // Enable all stimulus ports
//ITM->TPR = 0x0000000F; // unpriviledged
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this part commented?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The ITM port is enabled from OpenOCD or stlink-trace, no need anymore to enable it from firmware. This must be removed...

ITM->TER = 0xFFFFFFFF; // Enable all stimulus ports
//ITM->TPR = 0x0000000F; // unpriviledged
*/
while (true)
Copy link
Contributor

Choose a reason for hiding this comment

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

This kills all of the other functionality of the code. Maybe move this to a thread?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was just a showoff to see it works. Probably we should integrate it nicely :+)

@xor-gate
Copy link
Contributor Author

It was just a showoff to see it works. Probably we should integrate it nicely :+)

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.

None yet

2 participants