Call Graph Feature?

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MPLABX has a neat Call Graph feature.  Does Atmel Studio have anything similar?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What's a "Call Graph feature" and why do you need it?

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Codevision has a Call Graph display.

And it can analyse your stack usage.

 

To be honest,   I have never paid much attention to the Call Graph.    I generally have a pretty good idea of how my programs are structured in the first place.

Yes,   the memory and stack usage is very useful.

 

I would guess that anything from the ASF might need an extra wide screen to accomodate the depth and abstraction of its code.

 

Incidentally,   I think that ezharkov has written a program that can analyse GCC code.     I don't know how effective (or graphical) it displays the results.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jl-dev wrote:
MPLABX has a neat Call Graph feature.  Does Atmel Studio have anything similar?

Sadly not (and neither does Visual Studio - on which it's built)

 

sad

 

js wrote:
What's a "Call Graph feature" and why do you need it?

Shows the tree structure of what calls what; eg,

 

top_func
 |
 +--sub_func1
 |   |
 |   +--sub_sub_func1
 +--sub_func2
 |   |
 |   +--sub_sub_func1
 |   |
 |   +--sub_sub_func2

 

Eclipse can do this.

 

It can also do the converse: a caller tree - which shows what a particular function is called by

 

These are extremely useful features; I sorely miss them from AS/VS

 

david.prentice wrote:
I would guess that anything from the ASF might need an extra wide screen to accomodate the depth and abstraction of its code.

LOL!!

 

laugh

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Call graphs are great for studying code from a 3rd party (libraries like ASF, the Linux kernel etc) but as David says, for you own AVR project don't you have a clear picture already of what calls what in your own code?

 

I like SourceInsight for the way it does called/caller graphs but £300 is not everyone's cup of tea. For free, Red Hat originally wrote Source Navigator and this was taken on and developed as Source Navigator NG here: http://sourceforge.net/projects/...

 

I've used that both for Linux and when I've not had access to SourceInsight and found it to be quite reasonable.

 

I imagine both Eclipse and Code:Blocks (Netbeans too?) either do it natively or have plugins to do it.

I sorely miss them from AS/VS

By AS/VS do you mean "Atmel Studio that is based on Visual Studio" or  "Atmel Studio and/or Visual Studio"? The fact is that Visual Studio can do it:

 

http://msdn.microsoft.com/en-us/...

 

That is for VS2008 (and VS2005 if you select "Other versions"). Later it was renamed "Call Hierarchy":

 

http://msdn.microsoft.com/en-us/...

 

But this context menu option was casualty when VS2010 was pared down to become AS6.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm picking up Atmel Studio 6.2 code from somebody else.  So, this would be a very useful feature.  Is it possible to take advantage of the Visual Studio call graph feature somehow from AS6?  I don't the AS6 install lets me just open Visual Studio.  So, I think the only option I'm seeing is Source Navigator NG (any other options)?  I downloaded it, but it seems that I'm only getting the source files to contribute code to the project?  I can't seem to find an executable to install the actual application on a Windows machine?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

On this page:

 

http://sourceforge.net/projects/...

 

Download the top file (6.1MB) and in the .zip you should find a /bin/ directory. In that there is snavigator.exe

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

I sorely miss them from AS/VS

clawson wrote:
By AS/VS do you mean ...  "Atmel Studio and/or Visual Studio"?

 

Yes - that

 

Quote:
The fact is that Visual Studio can do it:

OK - goof to know. Thanks

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...