Where is the function implementation

Hello All:

I have a very dumb question, sorry about it.

I am trying to look into the function implementation and understand how some of the functions are written.
For e.g in the following location: C:\libpololu-avr\examples\atmega328p\buzzer1, I have opened file test.c, I want to see how play_note(note[currentIdx], duration[currentIdx], 15); is implemented.
When I right click and try to go to implementation, it takes me to header file OrangutanBuzzer.h.
Can someone please tell me how I can see the function definition?

Thank you,

Look in the source directory: C:\libpololu-avr\src
You’ll find the folder OrangutanBuzzer with source.


I am still having problems finding certain function/variables/MARCOs definitions and declarations.
for e.g in OrangutanLCD.cpp
When I right click on function busyWait(); I cannot see the option definition and declaration like we see in Visual Studio. Neither do I see “go to implementation” like I do in test.c for project buzzer1. Why is this the case? It is very difficult to follow the source code if this is not there.
Same thing with OrangutanLCD.h, for e.g, if I want to look at LCD_RS_DDR (#define LCD_RS_DDR DDRD) there is no option using the right click. I just want to see how implementation is done.

Is there something I have to do in my project settings? Add other dependencies?

Thank you,

All the sources are available in the libpololu-avr directory. What development system are you using?

Atmet studio 6, Windows 7.

[quote]It is very difficult to follow the source code if this is not there

This is why I don’t like IDEs. They are convenient when they work, but as soon as I have some other situation, I end up hitting a brick wall.
This is why most seasoned software developers gravitate towards separate systems for text editors, tools, debuggers, programmers, etc.

I would recommend that you install some useful command-line tools on your machine, and make sure they are in the path. Then go looking for the symbols you need from the command-line window.
For example, cygwin, or mingw, contain a number of good tools. Note that you don’t have to use the “bash” shell that comes with Cygwin; the plain command.com shell/window works fine as long as the cygwin bin directory is in the path.

For example, you can find all mention of busyWait by doing:

cd \libpololu-avr\src grep -r busyWait .

Now, you will be told about the files that match, and you can open these files in your text editor of choice (on Windows, Notepad++ is great; on other systems, I prefer GVim; there are tons of others, like Sublime Text; SciTE; gedit; Programmer’s Notepad; XEmacs; etc.)

Your editor may also have a “find in files” feature, where you can point it at a directory (like libpololu-avr\src) and search all the files in that directory, just like grep -r does from the command line.