Description of how to setup Eclipse on Ubuntu for AVR development, using GCC, GDB and AVeRICE.
Basic install instructions can be found here.
These are my special notes about the process, and should be merged with the basic instructions where appropriate.
sudo apt-get install avrdude avr-libc binutils-avr gcc-avr simulavr avarice
Install gdb-avr from sources, to get the newest version:
sudo apt-get source gdb cd gdb* sudo ./configure --prefix=/usr/local/avr --program-prefix="avr-" --target=avr --disable-werror sudo make sudo make install
I had to make a symlink to the avr-gdb program:
sudo ln -s /usr/local/avr/bin/avr-gdb /usr/bin/avr-gdb
The basic instructions for setting up avrdude is working. I found it impossible to debug a program if I didn't load it with avrdude before debugging. Simply build the project and pres the AVR Upload button to do so.
In order to use an already existing project with the avr plugin, I only found this solution:
If a project uses an external makefile, it might be necessary to change some environment variables for the project:
To use GDB an interface is required to use the mkII ICE debugger.
--mkII --jtag usb :4242
Now setup avr-gdb:
Now to debug simply run External Tools→AVeRICE. Then start the debugger.
My setup is not very stable. As I mentioned above the program crashes for good if I don't load it with avrdude before debugging.
Also I have problems catching a breakpoint after a longer time period. It seems like AVeRICE looses connection to the mkII. It might be a problem with the mkII firmware, AVeRICE or both. If there is a problem with the mkII it could explain why debugging with AVR Studio on Windows is such a pain also.