Recently I have been trying to learn how to program Arduino in Code::Blocks. I used the AVR project wizard to create my project. The program compiles flawlessly into a .hex file that I want to upload using avrdude. I've already looked for about an hour for a solution, but none of them that I find actually work. I am running on Ubuntu, if that is important. Here is what I get in the command line:
me@mePC:~/Desktop/C++/AVRTest$ sudo avrdude -c avrisp -p m168 -P /dev/ttyUSB0/ -U flash:w:AVRTest.hex
avrdude: ser_open(): can't open device "/dev/ttyUSB0/": Not a directory
ioctl("TIOCMGET"): Invalid argument
avrdude done. Thank you.
I am running avrdude in the directory that the .hex file is located. I looked in the Arduino IDE and the programmer is AVR ISP, the chip is ATmega168, and the port used is /dev/ttyUSB0/
. I've already tried the arduino programmer option in avrdude. This is the Duemilanove board that I am using and it has an FTDI chip on it.
I am quite puzzled by this and any help would be appreciated. Thanks.
sudo
for this. If you add your user to thedialout
group, which owns/dev/ttyUSB0
, logout and log back in, you can do this withoutsudo
(and you always try to usesudo
as little as possible). \$\endgroup\$