Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

[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....

@xor-gate xor-gate requested a review from maartentamboer June 14, 2017 21:14
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants