Wiki

Clone wiki

OOArduino / Installing

Installing OOArduino

Get the tools.

BuildGen

OOArduino is build using BuildGen. BuildGen is built install using cmake. The following commands can download and install BuildGen.

$ git clone git@bitbucket.org:kevincox/buildgen.git buildgen/ # Download the sources.
$ cd buildgen/
$ mkdir build/ # Make the build directory.
$ cd build/
$ cmake ..     # Generate the build scripts.
$ make         # Build.
# make install # Install.

Notice the last command is being run as root.

buildgen-avr and buildgen-doxygen

OOArduino requires two BuildGen libraries for compiling for the AVR and generating documentation. The build is similar to installing BuildGen.

$ git clone git@bitbucket.org:kevincox/buildgen-avr.git buildgen-avr/ # Download the sources.
$ cd buildgen-avr/
$ mkdir build/ # Make the build directory.
$ cd build/
$ gen ..       # Generate the build scripts.
$ make         # Build.
# make install # Install.
$ git clone git@bitbucket.org:kevincox/buildgen-doxygen.git buildgen-doxygen/ # Download the sources.
$ cd buildgen-doxygen/
$ mkdir build/ # Make the build directory.
$ cd build/
$ gen ..       # Generate the build scripts.
$ make         # Build.
# make install # Install.

avr-gcc

For obvious reasons you must have avr-gcc installed. You I can't help you here, on my system (Arch Linux) I can run the following commands to get it working.

# pacman -S avr-gcc

Building and Installing

Once you have installed all the dependencies you are ready for the final step which you should be familiar with by now.

$ git clone git@bitbucket.org:kevincox/ooarduino.git ooarduino/ # Download the sources.
$ cd ooarduino/
$ mkdir build/ # Make the build directory.
$ cd build/
$ gen ${args} .. # Generate the build scripts.
$ make           # Build.
# make install   # Install.

Now for the args part. Basicaly all you need to do is tell avr-gcc about your chip. All you have to do is define a couple of variables with the -D argument to BuildGen. Here are the things you need to define.

avr.mmcuThe thing you would pass in the -mmcu of avr-gcc
avr.f_cupYour CPU clock frequency

Mine BuildGen command line looks like this:

gen -Davr.mmcu=atmega328p -Davr.f_cpu=16000000 ..

After you run make install you should find the headers in /usr/avr/include/ooarduino/ and the library at /usr/avr/lib/libooarduino.a

Updated