Go Down

Topic: AVR include directory (Read 14 times) previous topic - next topic

georgelstuart

Folks,
I am having trouble including libraries too, but with (i think) a different problem.
Specifically, I am trying to experiment with sleep modes, but the examples specify
#include <avr/sleep.h> without any link to the actual library to include.
the link from the arduino.cc sleep example (http://www.arduino.cc/playground/Learning/ArduinoSleepCode)
takes one to:
http://www.nongnu.org/avr-libc/user-manual/group__avr__sleep.html
which links to:
http://www.nongnu.org/avr-libc/user-manual/sleep_8h.html
which is an HTML page with explanations of various details about AVRs and sleep modes, but for the life of me, I can't find a link to or a copy of an actual library that I can put in my libraries folder and use.
In a larger sense, I am having this problem with other libraries too, I see some code or example code that someone has posted, and they use #include statements for libraries that are not part of the default Arduino IDE, and no link to the library, no library enclosure linked for download, etc. Is it just me? Is there some repository of libraries that everyone else somehow knows about, or am I missing something?

any help is appreciated.
thanks

Quijonsith

zzpza:
Is your code "#include avr/io.h" or "#include io.h"?  I would think that if the environment sets the avr directory as a default location, then telling to check the avr directory would return as the file not being there.  I don't know if this is the case, but worth a try.

-Jon

Tim Stamp

Hi all,

I've just encountered a problem similar to this (on my fresh install of Debian 5/Lenny) and fixed it by installing the following:

gcc
gcc-avr
avr-libc
avrprog
avrdude

Some of those probably don't need to be installed but I just installed the lot and it seems to work.

Regards,
Tim

wayoda

Quote

I've just encountered a problem similar to this (on my fresh install of Debian 5/Lenny) and fixed it by installing the following:

gcc
gcc-avr
avr-libc
avrprog
avrdude

Some of those probably don't need to be installed but I just installed the lot and it seems to work.

You don't need avrprog, but all the others must be installed to run the IDE on Linux
Eberhard

danno

I had the same problem and it was drivin me crazy. Then, for some reason I removed the spaces before and after the pathnames, ie instead of #include < avr/io.h > I tried #include <avr.io.h> and the problem went away! I hope this helps  ;)
danno

Go Up