Enable traces on Serial Wire Output #debugging
Hi,
I am just getting started with Zephyr and currently working on a STM32F746ZE. I added a custom configuration for this board based on STM32F746G_DISCO.
After having run successfully the blinky example, I am now trying to have traces on SWO (not UART), so that ultimately I have added in my Kconfig.defconfig:
Following the documentation, I added in the blinky main.c:
I build and flash it flawlessly but I got no output on my console (using JLINK to connect and I guess I am missing a flag/define/config somewhere (I get a little confused about where to define things in
|
|
Replying to my own issue: First I misunderstood module registration:
Then, I used
After that I managed to get traces via the JLINK SWO Viewer. However, it only works if I launch the SWO viewer AFTER my application is launched. If I trigger a reset of the target during a
|
|
I am still struggling to figure out why I cannot keep receiving traces through reboots.
On the same dev board with FreeRTOS it was consistent: I was able to log target resets without re-launching I don't understand why even with the basics samples (blinky, button, ...) when I reset the target the SWO output is "broken" and I have to launch a new instance of Thanks
|
|
Carles Cufi
Hi there,
We don’t use SWO but RTT (also from Segger) and we don’t need to reset the JLinkRTTViewer/Logger when we reset the target. Could it be that the way Zephr flashes and then resets the target (pin reset vs software reset) is different from FreeRTOS?
In theory this is all handled by the on-board debugger chip so it should make no difference.
Which board are you using?
Carles
From: users@... <users@...>
On Behalf Of David K via Lists.Zephyrproject.Org
Sent: 10 March 2020 17:13 To: users@... Cc: users@... Subject: Re: [Zephyr-users] Enable traces on Serial Wire Output #debugging
I am still struggling to figure out why I cannot keep receiving traces through reboots. On the same dev board with FreeRTOS it was consistent: I was able to log target resets without re-launching
I don't understand why even with the basics samples (blinky, button, ...) when I reset the target the SWO output is "broken" and I have to launch a new instance of
Thanks
|
|
Hi, thanks for your feedback !
I have a STM32F746ZE-based board and using
|
|
Carles Cufi
+ Erwan, Simen, Krzysztof, Andrzej
As mentioned in an earlier email (to which you replied without context so I had to start a new thread), RTT does work across reboots without problems, at least on Nordic platforms.
You wrote: > Hi, thanks for your feedback ! I have a STM32F746ZE-based board and using west with jlink runner to flash it. I have the same issue when I reset the target via JLink Commander.
I do not know whether Zephyr does anything at all to the SWO pin connected to the debugger chip, and especially not on an STM32 platform (I copied Erwan who maintains these boards), but I might be wrong.
Carles
From: users@... <users@...>
On Behalf Of David K via Lists.Zephyrproject.Org
Sent: 10 March 2020 17:13 To: users@... Cc: users@... Subject: Re: [Zephyr-users] Enable traces on Serial Wire Output #debugging
I am still struggling to figure out why I cannot keep receiving traces through reboots. On the same dev board with FreeRTOS it was consistent: I was able to log target resets without re-launching
I don't understand why even with the basics samples (blinky, button, ...) when I reset the target the SWO output is "broken" and I have to launch a new instance of
Thanks
|
|
Hi all,
I use segger ozone to do debugging via RTT it's free download which may be helpful. It does have swo trace and STM32 JTAG configuration inbuilt it may be something to consider. But I work with Nordic silicon so not sure about the STM chips. Billy..
|
|
Erwan Gouriou
Hi David, I'm not a SWO user myself but I'm suspecting a clock set up issue. On FreeRTOS, what was the clock configuration you were using ? Cheers
On Wed, 11 Mar 2020 at 12:13, Cufi, Carles <Carles.Cufi@...> wrote:
|
|
Hi there, Thanks for the feedback and sorry for the delay.
Here is my function that initializes the clock, it is called right after
Also, not sure if it is related but I have 2 Time bases:
Thanks for your help, in parallel I will look into RTT alternative.
|
|
And I forgot to include the FreeRTOS part:
Where
|
|