2018-12-16 10:01 AM
2018-12-16 10:08 AM
The SWO/SWV methods aren't supported by Cortex-M0(+) cores, there is an EVT (Event Viewer) method, Keil's Bob Boys has posted several examples and app notes, Google should pull something useful.
2018-12-16 11:43 AM
@OP if you use Keil - the EVT thing in latest version 5.26 has been updated from 5.24 and earlier.
If you can't get it working per old instructions, ask Keil support or here.
I had to do some plumbing to make debug prints via EVT working in Keil 5.26 and Cube-generated project,
-- pa
2018-12-16 12:09 PM
Usually would need code in fputc()/_ttywrch() to retarget properly.
2018-12-16 02:05 PM
Yes but also the Keil EVR component now definitely requires allocation of RAM area, see: http://www.keil.com/support/docs/4012.htm
It was recommended but optional in previous versions. Now, without this setup, the debugger goes haywire.
Then. the EVR module requires to define time source. Cortex M0 does not support their default choice, DWT. So one has to give it a dedicated timer, or let it tamper with SysTick and displace the handler provided by the Cube HAL (yep I remember that you don't favor it) … it was a nasty time. Thanks to Keil support, they quickly helped me to understand the root cause.
-- pa