SWV operation in TS 7.1.0

Discuss how to use the features of Atollic TrueSTUDIO, including the editor, assembler, C/C++ compiler, linker, debugger, static code analysis and team collaboration tools.

Moderators: Markus Girdland, Mattias Norlander

john.saunders
Posts: 3
Joined: Tue Jan 24, 2017 11:58 pm

SWV operation in TS 7.1.0

Postby john.saunders » Thu Feb 09, 2017 6:01 am

I am doing an evaluation of TS and trying out the debug capabilities. I have got basic break/step/run working with an ST-Link V2 and SEGGER J-Link.

We mainly have a ST-Link probes with a few J-Links used by other projects not using STM32 micros (which I borrowed for testing).

I have got to the point of trying out the SWV features by following the Atollic white paper, however I get nothing. I must admit I am new to SWV so may not be using the feature correctly.

Micro is an STM32F405ZG with external 8MHz xtal, PLL_M=8, PLL_N=336 and PLL_P=2 which I believe gives me a 168MHz core clock. When I enter 168 as the core clock I get a SWO speed of 2000kHz (2MHz) automatically. I have tried enabling PC Sampling (16384 c/s), EXC, LSU, EXETRC and Comparator 0 set to an address that I know gets an ADC sample periodically written to by DMA. I pressed the red button (BTW I think would be better if it changed to green rather than just getting a square border) and ran the target. I get no entries in any SWV trace view I have opened.

Can anyone help? Or what is a sure-fire way to set it up so I can at least see some sign of life.

Thanks.

Otatiaro
Posts: 44
Joined: Thu Nov 10, 2016 8:58 am

Re: SWV operation in TS 7.1.0

Postby Otatiaro » Thu Feb 09, 2017 10:35 am

Hello,

What board are you using, is SWO connected to the probe?

Thomas.

john.saunders
Posts: 3
Joined: Tue Jan 24, 2017 11:58 pm

Re: SWV operation in TS 7.1.0

Postby john.saunders » Thu Feb 09, 2017 10:59 pm

Sorry false alarm. I have checked the schematics for our board and the SWO pin is being used for a serial EEPROM and is not connected to the SWD port.

I am feeling kind of disappointed about that! Next HW rev I will push to change things if possible.

Lawrence
Posts: 63
Joined: Mon Nov 09, 2015 5:13 pm

Re: SWV operation in TS 7.1.0

Postby Lawrence » Fri Feb 10, 2017 2:38 am

Otatiaro, I see you are still around, I guess you dropped Segger embedded and stuck with Atollic.

Your comment got me into research mode, and I also decide to stick with Atollic.

Here is the result, the last comment below.

http://www.carminenoviello.com/about/

You see, the argument that a fast debugger is necessary is a bit overshadowed by the fact that the best programmers dont even need a debugger, Atollic is about seeing the problem beforehand, on a widely used and powerful eclipse.

And according to somebody who has implemented large projects with totally free Eclipse, the debug experience is similar and in the end does not have an effect, I will discard all the naysayers from now on.

I think most people here are just "somehow always somebody do something wrong and dont say" who complain, and say it dont work, but come back again never mention it all fixed.

I believe most people who come here did not go through the webinars, videos, and if serious enough, do a few searches in the book, I rarely do that myself lol.

For sure, first rule is to check the board schematic, make sure I write the write clock in cube mx and click the right stuff in clock view ( the numbers fix themselves magically), watch a video done by Matthias and do the same but for my specific J-Link probe ( thats about it).
Last edited by Lawrence on Thu Feb 16, 2017 5:34 pm, edited 1 time in total.

john.saunders
Posts: 3
Joined: Tue Jan 24, 2017 11:58 pm

Re: SWV operation in TS 7.1.0

Postby john.saunders » Fri Feb 10, 2017 3:32 am

For background information. I have ported a legacy STM32F405 product from IAR to Atollic GCC as a proof of concept that moving away from IAR is a not scary proposition for the company. This is my first foray into the STM family, having worked with Ti AM3505 and man non-ARM micros in the past.

Personally I use TDD and typically resolve bugs on host builds before the code ever hits flash. However there are some situations where getting the initial startup functional on a new board somehow seems less risky when you know that hardware debugging is available and working.

For me the "value add" that Atollic brings to the table is its superior debugging capabilities. If that is not required then vanilla eclipse+GCC+OpenOCD would be all that is required for basic functionality. However if I introduced a tool-chain swap that appears less functional than IAR, I would never hear the end of the complaints from other devs. Which is why I am keen for the debugging capabilities to at least parallel IAR.

I think I have all the information necessary to prove to the company that GCC is a workable alternative and that Atollic is as capable a debugger as IAR with our ST-Link probes.

Thanks for your time.

Otatiaro
Posts: 44
Joined: Thu Nov 10, 2016 8:58 am

Re: SWV operation in TS 7.1.0

Postby Otatiaro » Fri Feb 10, 2017 9:12 am

Hello,

For the original post, for serial wire to work, short check list:
- make sure the hardware is correctly connected (swd + swo pin to the debugger).
- make sure the core clock is set correctly (it is the Cortex core clock usually).
- make sure the SWO clock is ok (using JLink, don't bother, just set to auto starting from 7.1.0)
- make sure the SWV configuration is ok, by default the ITM doesn't output anything, so use ITM_SendChar to send chars to the terminal, or setup the ITM to output data on its own (PC sampling, exception trace, etc.). Don't be too optimistic on the quantity of data, especially if using an ST Link.
- if you use data trace, make sure the configuration is ok (read, wrtie or both, PC, value or both, etc).
- start the SWV using the red circle button
- run your program for a few seconds, then pause it, you should have data in the SWV logs.
- if it's not correct data, then your clock setup is probably wrong (using ST Link, with J Link it seems wrong data is discarded).
- you may want to explorer the additional Windows dedicated to SWV analysis (Window -> Show View -> Other..., search for SWV)

Thomas.

Otatiaro
Posts: 44
Joined: Thu Nov 10, 2016 8:58 am

Re: SWV operation in TS 7.1.0

Postby Otatiaro » Fri Feb 10, 2017 9:43 am

Lawrence wrote:Otatiaro, I see you are still around, I guess you dropped Segger embedded and stuck with Atollic.

Your comment got me into research mode, and I also decide to stick with Atollic.

Here is the result, the last comment below.

http://www.carminenoviello.com/about/

You see, the argument that a fast debugger is necessary is a bit overshadowed by the fact that the best programmers dont even need a debugger, Atollic is about seeing the problem beforehand, on a widely used and powerful eclipse.

And according to somebody who has implemented large projects with totally free Eclipse, the debug experience is similar and in the end does not have an effect, I will discard all the naysayers from now on.

I think most people here are just "poor guy didnt study much old cheap comp type" who complain.

I believe most people who come here did not go through the webinars, videos, and if serious enough, do a few searches in the book, I rarely do that myself lol.

For sure, even as a total beginner in eclipse, I know first rule is to check the board schematic, make sure I write the write clock in cube mx and click the right stuff in clock view ( the numbers fix themselves magically), watch a video done by Matthias and do the same but for my spcific J-Link probe ( thats about it)...


Hello,

I followed the links you posted, it seems Segger Embedded Studio is a strip down version of Rowley Crossworks. I did a few tests with SES but except from a few options, I did not see anything really worth the switch from Atollic (for someone already used to it).

About the fact that best programmers don't even need a debugger, I cannot disagree more, for me it's like saying best blacksmiths don't even need a hammer. Even if a very goos blacksmith can do something with a cheap hammer, they often have the best hammers available on the market, and they know how to use it.

I'm not a VI and makefile guy, I started developping with Visual Studio (quite a few years ago ...) and I pretty much need a good IDE and debugger to be efficient. I'm both C# and C++ expert, and if both have their strengths and weaknesses, when debugging C++ I really miss some debugging facilities (on C# you can provide custom debugger presenters, so that e.g. you don't have to follow each link in linked list to get the full picture).

I'm developping flying drones, a bug in flight can have disastrous effects, it taught me to be ultra rigorous when coding, but you WILL have bugs at first, even the very best programmers can't throw thousands of lines of codes with no bug at all. When I debug and find something is not behaving the way I expected it, I need the best tools to get the full picture and pinpoint the problem as fast as possible. I also need to have a good picture and insights about how my program really runs to plan my future devs (I have to know how much CPU I use for example).

This is why here we develop everything from scratch, from startup scripts to preemptive scheduler, low level drivers, framework, etc. To build an insight of what is really going on Inside the chip at any time.

Read the Atollic blogs, watch their webinars, improve your skills in C++ (no more C, please, we are in 2017 !), use the tools at their full potentials, and everything will start to look so much easier.

I find JLink and Atollic are both very intuitive and powerful enough to get what I want (the stack and build analyzers are a nice addition).

What I would like (christmas list):
- being able to very easily get the assembler for a specific line of code or function without starting a debug session, having to put a breakpoint, etc.
- automatic cpu usage calculation based on run cycles / sleep cycles using SWV would be great.- LLVM as back end would be nice, especially for its better code analysis
- Segger SystemView integration would be awesome, but it's already very easy to use as an external tool (did I mention you need at least 2 screens to develop ? ;) ).
- being able to develop custom plugins to integrate my real time scheduler data in a window.
- being able to tell the debugger how to present some data (e.g. linked lists), equivalent to the C# "ToString" override.
- nRF52 official support (I already made a post, it is possible to use it with Atollic, but official support would be nice).

This is my personal opinion.

Thomas.

PS : get the bible : https://www.amazon.com/Definitive-Guide ... 0124080820 and read it as a novel.
PS2 : ho and if you don't already use it, go play with https://godbolt.org/ so that you really understand what the compiler is doing with your lines of code.
PS3 : here is a video of our office, each dev has 3 screens min : https://twitter.com/EznovFrance/status/ ... 9320196096

Lawrence
Posts: 63
Joined: Mon Nov 09, 2015 5:13 pm

Re: SWV operation in TS 7.1.0

Postby Lawrence » Fri Feb 10, 2017 4:02 pm

Interresting Thomas., I do have that Bible...lol I got mine for cheaper than that :P, the only useful things from that book are DSP chapters and

My main interest are devices relating to machining and manufacturing, motor control, process control.

Altho for house security purposes I can see a use for it, lets say a robber enters the premise, a drone could be handy.

OT: So for the last few months I went into overdrive with my studies, basicly I learned as much as I could on wXmaxima and math, differential equations, matrices, laplace transforms.

I learned wxmaxima, to then learn differential equations via videos where I would just replace and discard all the algebra and techniques by 'entering things', isolate what I needed , be on my way yet save 99% of my sanity(and time) and still get the answer, or follow along a theory heavy book.

After that I watch all these videos and take good notes, follow along, from bottom to top I have now watched everything and reached my first PID video, :lol:

https://www.youtube.com/user/ControlLectures/videos

I think If I do this all day it will take me one month to finish.

Once thats done I am gonna practice wiht Scilab/xcos (mostly xcos), and have the software generate the control code for me.

http://www.e4coder.com/

I am looking into this company.

I am happy because I basicly went to university on my spare time after work (I am a machinist), but kept an open mind, choosing and testing software, seeing my options, seeing what I need to learn to build my inventions.

Here is my YT.

https://www.youtube.com/user/Skyrimninj ... =0&sort=dd

I am currently looking for group to help eachother out so that may discuss things related to "inventions", BTW I have my own legal CAD software.
This is a group where every member has his own respective inventions and skill (a experienced group, not a noobie group), this is a group where we discuss datasheets, code, or IDE techniques to unstuck ourselves when need be and keep ourselves going with friendly input.
Last edited by Lawrence on Fri Sep 13, 2019 6:37 pm, edited 1 time in total.

Lawrence
Posts: 63
Joined: Mon Nov 09, 2015 5:13 pm

Re: SWV operation in TS 7.1.0

Postby Lawrence » Mon Feb 20, 2017 3:23 pm

I followed the links you posted, it seems Segger Embedded Studio is a strip down version of Rowley Crossworks. I did a few tests with SES but except from a few options, I did not see anything really worth the switch from Atollic (for someone already used to it).

About the fact that best programmers don't even need a debugger, I cannot disagree more, for me it's like saying best blacksmiths don't even need a hammer. Even if a very goos blacksmith can do something with a cheap hammer, they often have the best hammers available on the market, and they know how to use it.

I'm not a VI and makefile guy, I started developping with Visual Studio (quite a few years ago ...) and I pretty much need a good IDE and debugger to be efficient. I'm both C# and C++ expert, and if both have their strengths and weaknesses, when debugging C++ I really miss some debugging facilities (on C# you can provide custom debugger presenters, so that e.g. you don't have to follow each link in linked list to get the full picture).

I'm developping flying drones, a bug in flight can have disastrous effects, it taught me to be ultra rigorous when coding, but you WILL have bugs at first, even the very best programmers can't throw thousands of lines of codes with no bug at all. When I debug and find something is not behaving the way I expected it, I need the best tools to get the full picture and pinpoint the problem as fast as possible. I also need to have a good picture and insights about how my program really runs to plan my future devs (I have to know how much CPU I use for example).

This is why here we develop everything from scratch, from startup scripts to preemptive scheduler, low level drivers, framework, etc. To build an insight of what is really going on Inside the chip at any time.

Read the Atollic blogs, watch their webinars, improve your skills in C++ (no more C, please, we are in 2017 !), use the tools at their full potentials, and everything will start to look so much easier.

I find JLink and Atollic are both very intuitive and powerful enough to get what I want (the stack and build analyzers are a nice addition).

What I would like (christmas list):
- being able to very easily get the assembler for a specific line of code or function without starting a debug session, having to put a breakpoint, etc.
- automatic cpu usage calculation based on run cycles / sleep cycles using SWV would be great.- LLVM as back end would be nice, especially for its better code analysis
- Segger SystemView integration would be awesome, but it's already very easy to use as an external tool (did I mention you need at least 2 screens to develop ? ;) ).
- being able to develop custom plugins to integrate my real time scheduler data in a window.
- being able to tell the debugger how to present some data (e.g. linked lists), equivalent to the C# "ToString" override.
- nRF52 official support (I already made a post, it is possible to use it with Atollic, but official support would be nice).

This is my personal opinion.

Thomas.

PS : get the bible : https://www.amazon.com/Definitive-Guide ... 0124080820 and read it as a novel.
PS2 : ho and if you don't already use it, go play with https://godbolt.org/ so that you really understand what the compiler is doing with your lines of code.
PS3 : here is a video of our office, each dev has 3 screens min : https://twitter.com/EznovFrance/status/ ... 9320196096[/quote]

Yes it appears you are correct, I believe I am of those who says no C++ because ... I dont know it.

I am like half the industry, I believe I often bae my own opinion based off other`s opinion too much.

But since you have the higher perpective, I believe you are right, partially. As many people say there is problems with c++ full implementation.

bruno.godrabeli
Posts: 2
Joined: Sat Dec 30, 2017 12:27 pm

Re: SWV operation in TS 7.1.0

Postby bruno.godrabeli » Sat Dec 30, 2017 12:36 pm

SystemView integration is already there by 3 rd party eclipse plugin -> impulse Embedded http://toem.de. :shock:

# bruno


Return to “Atollic TrueSTUDIO tool discussions”

Who is online

Users browsing this forum: No registered users and 8 guests