Call Graph generator available?


Love the Arduino! Am building a sizeable pool/heating/consumptionwater/solarenergy combi system for our house in Spain whre the sun always shines! with 2 arduino boards, 13 thermometers, valves, flow sensors etc that has now reached about 1500 lines of code and some 70 procedures/functions. Try to keep the code as clean as possible. Would love to use a graphical call graph to check the design of the call flow.

Cannot find a proper tool though. I'd appreciate if anyone can help out and point me to one?

Thanks, Ton Veenhof

Hi, If you want to display information on a screen, the easiest way is to use a PC running a program like PROCESSING It can communicate with your arduino. Program the arduino to send data to the PC via the USB cable. Get PROCESSING to do the graph and data storage work.

google arduino processing

If you only want a small screen, then there are such devices that connect directly to the arduino, but you would have to program your own graph part of the code.

Hope it helps.. Tom. :)

Like this?

or this?

Both include free source code.

Hi, Kris Very nice. :sunglasses:

Tom.... :)

I think I confused you in the original question.... apologies. Am looking for a source code analyzer that makes a picture of the functions in the source code, and displays all the procedures in the source code and their hierarchy (which is a call graph).


Hi, There is probably not enough RAM to do that and run the program. If it is a monitoring program then I would say forget it. Example? |500x261 If you structure your code properly I don't see a need to monitor hierarchy of functions.

If you need micro second response times in your code fair enough, but I don't think its necessary.

Tom.... :)

TomGeorge: There is probably not enough RAM to do that and run the program.

AFAIK the analyzer will run on the PC, not on the Arduino. Its purpose is to analyze the text files that contain the code - not to monitor the Arduino in operation.

The need for this sort of tool is one of the things that makes me dislike C/C++


You are right, Robin. Runs on the PC and is helpful if the number of functions you split the code into becomes high. I wrote about 65 functions in my 1400 lines piece of SW for 2 Arduino boards so far, and it will grow to about 80 before I'm done. Does help to keep it maintainable if I see the code again after a year....

Anyways: no suggestions yet for a tool on Windows....

There is a generate-calling-graph-for-c-code entry on stackoverflow. Dunno if it helps on Windows (CygWin?), and on the Arduino libraries. Eventually AVR provides such a tool, with/for AVR Studio?