Home » Language IDEs » C / C++ IDE (CDT) » Arduino upload problem from Eclipse CDT / Ubuntu(Can't get rid of AVRDude error, while I can upload from Arduino IDE)
Arduino upload problem from Eclipse CDT / Ubuntu [message #1760689] |
Mon, 01 May 2017 22:02 |
|
Franc Zijderveld Messages: 5 Registered: May 2017 Location: Netherlands |
Junior Member |
|
|
Hi,
I recently saved an old laptop (Core2) by removing Windows Vista and installing Ubuntu 16.04 LTS (32 bit). I installed Arduino IDE: with this I can compile and upload sketches into my Arduino Uno.
Then I installed Eclipse Neon CDT and the Arduino Plugin. I can compile, I see that a HEX file is created, but I cannot upload.
When I created a connection, I could not select any COM ports. Instead I typed /dev/ttyACM0 into the field. This does not seem to work. Instead of a port ID, AVRDude uses a Baud rate setting as the target address.
My build console show this message:
Quote:
avrdude: Version 6.3, compiled on Jan 17 2017 at 06:01:25
Copyright (c) 2000-2005 Brian Dean, http : //www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/home/franc/.arduinocdt/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf"
User configuration file is "/home/franc/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : -b115200
Using Programmer : arduino
avrdude: ser_open(): can't open device "-b115200": No such file or directory
avrdude done. Thank you.
It appears I need to find a way to configure how Eclipse calls on AVRDude. I haven't been able to find this.
BTW: I also installed Arduino IDE, Eclipse CDT and the Arduino Plugin on the Windows10 laptop I use at work. In this case I could select the right COM port during creation of the connection and upload works fine.
I'd like to get the Ubuntu configuration working as well (so I can have a permanent set-up at home.) Can anybody push me in the right direction?
|
|
| | | |
Re: Arduino upload problem from Eclipse CDT / Ubuntu [message #1761417 is a reply to message #1761393] |
Wed, 10 May 2017 19:50 |
|
Franc Zijderveld Messages: 5 Registered: May 2017 Location: Netherlands |
Junior Member |
|
|
Tauno Voipio wrote on Wed, 10 May 2017 15:35You have to climb some learning and setup ladder to use Eclipse for Arduino.
Sorry, I cannot give direct instructions, as I have programmed my AVR's and ARM's on bare metal only, without the Arduino libraries in between.
It is possible that the Arduino USB hardware creates a port /dev/ttyACM0.
Please check it:
1. Before connecting Arduino
lsusb
ls -l /dev/ttyA*
2. After connecting Arduino
lsusb
ls -l /dev/ttyA*
Please post the results.
--
-Tauno
Thanks again for trying to help me out. I understand I have to learn how to use the tool. In Windows, it took me about 20 minutes to get things working. I'm a bit disappointed in Linux at this stage.
Anyway, here are the results that you asked me to post. Before connecting Arduino:
Quote:franc@Jarvis:~$ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 064e:a103 Suyin Corp. Acer/HP Integrated Webcam [CN0314]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
franc@Jarvis:~$ ls -l /dev/ttyA*
ls: cannot access '/dev/ttyA*': No such file or directory
franc@Jarvis:~$
After connecting Arduino:
Quote:franc@Jarvis:~$ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 003: ID 2341:0043 Arduino SA Uno R3 (CDC ACM)
Bus 005 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 064e:a103 Suyin Corp. Acer/HP Integrated Webcam [CN0314]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
franc@Jarvis:~$ ls -l /dev/ttyA*
crw-rw---- 1 root dialout 166, 0 May 10 21:06 /dev/ttyACM0
So you are right: Arduino USB hardware creates a port ttyACM0. It's not clear to me what this means for using Eclipse in stead of Arduino IDE. I always have my UNO connected, so the port was available during installation of Eclipse and the plug-in.
Apart from these results, I also attached three screendumps, showing that the Arduino IDE nicely detects and uses the ttyACM0 port that is created by the Arduino USB hardware, and that Eclipse CDT with the Arduino plug-in does not. Btw I typed the /dev/ttyACM0 in that screenshot by hand. After saving and reopening the properties, the field is empty once more.
Your help is surely appreciated.
|
|
| |
Re: Arduino upload problem from Eclipse CDT / Ubuntu [message #1763336 is a reply to message #1761611] |
Fri, 12 May 2017 19:59 |
|
Franc Zijderveld Messages: 5 Registered: May 2017 Location: Netherlands |
Junior Member |
|
|
Hi Tauno,
thanks again for your efforts.
Before your latest hints and tips, I didn't try to generate a .avrduderc file, or type the command in a terminal.
While figuring out what exactly to type in a command line, I accidentally hovered above a part of the Eclipse build console and it popped-up the entire command line that it uses to upload the hex file. You can find a picture of the screen in the attachment.
The command line says:
sh -c "/home/franc/.arduinocdt/packages/arduino/tools/avrdude/6.3.0-arduino9/bin/avrdude" "-C/home/franc/.arduinocdt/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf" -v -patmega328p -carduino -P -b115200 -D "-Uflash:w:./LeegProject.hex:i"
I ran this from a command line and got the same error message I got when trying to upload from Eclipse.
I then changed the command line by adding /dev/ttyACM0 directly behind the -P, and adjusting the paths to a call from my home directory :
"./.arduinocdt/packages/arduino/tools/avrdude/6.3.0-arduino9/bin/avrdude" "-C./.arduinocdt/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf" -v -patmega328p -carduino -P/dev/ttyACM0 -b115200 -D "-Uflash:w:./WorkspaceEclipse/LeegProject/build/UNO_ttyACM0/LeegProject.hex:i"
This works: so your conclusion that the command line that Eclipse uses is incorrect is confirmed. I now also know what the command line should be.
Still, I like to use the Eclipse IDE to compile and upload my code by the press of a button, as it does from Windows.
It seems that the Arduino plugin is constructing the command line from my project settings, but as it doesn't allow me to enter /dev/ttyACM0 as the port address, it has nothing to fill in after -P.
Can I override the missing port address from .avrduderc? Or is there a way to let the Arduino plug-in in Eclipse detect the /dev/ttyACM0 port so I can select it in the connection dialog?
Thanks again,
Franc
|
|
| | | |
Goto Forum:
Current Time: Thu Oct 10 18:18:34 GMT 2024
Powered by FUDForum. Page generated in 0.03828 seconds
|