Society of Robots - Robot Forum
Software => Software => Topic started by: epicbattle on November 10, 2008, 11:25:42 PM
-
Ok, I'm using KontrollerLab through Ubuntu and I have avrdude. I cannot figure out how to tell the computer where the programmer is in the computer. Wine AVR Studio keeps crashing. Is anyone familiar with Linux I can start a dialog with to help me get everything to work? I am new to Linux and robot building so I am trying to get adjusted to both. Thanks guys.
-
You need to answer this question first - is the programmer a USB, Serial, or Parallel programmer?
If it is USB, the programmer is at /dev/ttyUSB#, where # is the USB port (starts at 0).
If it is Serial, then it is /dev/ttyS# (once again, starts at 0)
Parallel - not too sure. Never had a computer with a parallel port in the past.... bajlilion years. I'm sure it's something like ttyP#.
-
I am on Ubuntu as well and use avrdude. I have not used kontrollerlab but with avrdude you can use something like
avrdude -c avrispmkII -P usb -p m644 -U prog.hex
to program prog.hex into a ATmega644 with an AVRISP mkII.
If you are having problems try
sudo avrdude -c avrispmkII -P usb -p m644 -U prog.hex
if that works then go to this thread and fix the permissions of the AVRISP mkII so you can use it as a regular user.
http://ubuntuforums.org/showthread.php?t=901891 (http://ubuntuforums.org/showthread.php?t=901891)
You will need to make a the file 45-avr.rules in /etc/udev/rules.d. Then add this to it.
# Atmel AVRISP mkII rules
ACTION=="add", SUBSYSTEM=="usb", SYSFS{idVendor}=="03eb", SYSFS{idProduct}=="2104", GROUP="flip", MODE="0660"
You can also add
# Atmel JTAGICE mkII rules
ACTION=="add", SUBSYSTEM=="usb", SYSFS{idVendor}=="03eb", SYSFS{idProduct}=="2103", GROUP="flip", MODE="0660"
If you have a JTAGICE mkII.
This took me a long time to figure out so feel free to ask questions.
I use make to compile and burn the code onto the AVR. If you want an example makefile I can post it. They are set up so I can type
make
to compile the code and
make install
to flash the code onto the AVR
Justin