-
Notifications
You must be signed in to change notification settings - Fork 2
[WIP] Initial ITM port 0 test with stlink-trace tool #2
base: master
Are you sure you want to change the base?
Conversation
Travis is failing, but that seems a different problem |
@@ -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 | |||
|
There was a problem hiding this comment.
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 | ||
*/ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 :+)
It was just a showoff to see it works. Probably we should integrate it nicely :+) |
Initial testing using the ITM port 0 for printf using the SWD SWO pin. It works....