I’m in a robotics club in my university and have been given a 3pi robot to program.
I am using the USBtinyISP which says that no driver is required since avrdude 5.5 supports it out of the box. (I’m using avrdude 5.10-3.)
I am wanting to install it under Ubuntu 10.10 and am following the instructions given on this page (note: this is not the page for any course I am attending, I found it using a Google search for “3pi Linux”) and your page.
I have installed emacs, cvs, avrdude, gcc-avr, avr-libc, binutils-avr, and avra using Synaptic Package Manager.
Instead of installing the libpololu-avr-081209.zip suggested by the course page, I installed libpololu-avr-100607.zip, the latest release.
When I run
abram@abram-G51J:~/libpololu-avr/examples/atmega168/simple-test$ make program
I receive this output:
I think I’ve covered all the relevant information concerning this. If not, let me know.
This is my first experience programming a robot, so detailed instruction would be appreciated.
Well what it looks like is your port for your programmer is not specified correctly (/dev/ttyUSB0) you could try unplugging it and typing in as root “tail -f /var/log/messages” and then then plug in your programmer and it should show you what device to use.
Hopefully that helps :S Maybe someone with some more experience could give some input if I said anything incorrectly.
I do not know much about the USBtinyISP, but I think you need to update the definition of PORT in the Makefile to /dev/ttyACM0. This is what you would need to do to get the Pololu AVR Programmer to work, and I believe it is the same for that device.
Sorry, I was wrong about the way the USBtinyISP works. To use it with Ubuntu, you will have to modify the line in your makefile that runs avrdude according to the instructions here. If you still cannot get it to work, you should probably contact someone on the ladyada site about your problem.
it runs through some checks and then spits out this error:
configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also
http://gcc.gnu.org/install/prerequisites.html for additional info. If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files. They may be located in separate packages.
Why are you trying to build avr-gcc yourself? You already had avr-gcc working fine, since it ran without any errors according to your first post. All you need to do is get back to where you were before and figure out how to execute the correct avrdude command to make your USBtinyISP programmer work. Unfortunately, we cannot give you much help with that here, but I think the link I sent you explains how to run avrdude for that programmer.
Okay, I just ran through the instructions on the page you sent me and got this back:
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e950f
avrdude: Expected signature for ATMEGA8 is 1E 93 07
Double check chip, or use -F to override this check.
avrdude done. Thank you.
and the robot beeped.
Still, when I input
abram@abram-G51J:~/libpololu-avr/examples/atmega168/simple-test$ make program
it gives me
avrdude -p m168 -c avrisp2 -P /dev/ttyUSB0 -U flash:w:test.hex
avrdude: ser_open(): can't open device "/dev/ttyUSB0": No such file or directory
make: *** [program] Error 1
It looks like the page I sent you had a working avrdude command. But running that command is not going to fix the makefile! You sitll need to change the line of the makefile that runs avrdude to run it with the parameters that worked for you. I think this is the last line of the makefile - it starts with $(AVRDUDE). The dollar-sign expressions are variables that you should leave in the appropriate places, but I think $(PORT) will no longer be required.
There was a command that worked for you. You need to modify the last line of the makefile to run that command. If you are still confused, can you post the command that worked? Then I can tell you how to format it on the last line of the makefile.