Go Down

Topic: Arduino 1.0 upload issue (Read 6002 times) previous topic - next topic

mellis

There are lots of different (and unrelated problems) in this thread.  You might want to start separate ones for your own situation.

Vitor2: it sounds like you've installed a version of the SD library in your sketchbook folder (My Documents\Arduino\libraries) that's conflicting with the built-in SD card library in the Arduino software.  Try deleting it (or moving it elsewhere).

The bootloader on each board communicates at a fixed baud rate.  You want to use the proper rate for that board, which is the one specified for it in the boards.txt file.  Other baud rates won't work. 

Have you tried resetting the board just before the upload starts (i.e. as the status bar messages changes from "compiling" to "uploading")?

vandamme

I just built a Nanode and it worked with the usual sample code on Ubuntu 10.10 but not on 11.10, which pukes out the below complaint.
It blinks (LED on pin 6, opposite polarity) when I try to upload, then quits and disconnects the serial port (grayed out) until I re-plug it in again, then it finds the next USB port. Then the same happens again. That is, uploading seems to shut off the port and the next time I plug it in, it goes to the next USB port and tries again, uselessly. The serial loopback doesn't work any more either.



Binary sketch size: 998 bytes (of a 30720 byte maximum)
processing.app.SerialException: Error opening serial port '/dev/ttyUSB3'.
   at processing.app.Serial.<init>(Serial.java:146)
   at processing.app.Serial.<init>(Serial.java:76)
   at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:75)
   at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:93)
   at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:56)
   at processing.app.Sketch.upload(Sketch.java:1603)
   at processing.app.Sketch.exportApplet(Sketch.java:1568)
   at processing.app.Sketch.exportApplet(Sketch.java:1524)
   at processing.app.Editor$DefaultExportHandler.run(Editor.java:2293)
   at java.lang.Thread.run(Thread.java:679)
Caused by: gnu.io.UnsupportedCommOperationException: Invalid Parameter
   at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:213)
   at processing.app.Serial.<init>(Serial.java:136)
   ... 9 more
processing.app.debug.RunnerException: Error opening serial port '/dev/ttyUSB3'.
   at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:99)
   at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:93)
   at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:56)
   at processing.app.Sketch.upload(Sketch.java:1603)
   at processing.app.Sketch.exportApplet(Sketch.java:1568)
   at processing.app.Sketch.exportApplet(Sketch.java:1524)
   at processing.app.Editor$DefaultExportHandler.run(Editor.java:2293)
   at java.lang.Thread.run(Thread.java:679)

spycatcher2k

Vitor2 : goto >      Yourinstallpath\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino


Create a file caller Arduino.h

and in it type :

#include <WProgram.h>

See if this helps.
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

vandamme


I just built a Nanode and it worked with the usual sample code on Ubuntu 10.10 but not on 11.10, which pukes out the below complaint.
It blinks (LED on pin 6, opposite polarity) when I try to upload, then quits and disconnects the serial port (grayed out) until I re-plug it in again, then it finds the next USB port. Then the same happens again. That is, uploading seems to shut off the port and the next time I plug it in, it goes to the next USB port and tries again, uselessly. The serial loopback doesn't work any more either.


Binary sketch size: 998 bytes (of a 30720 byte maximum)
processing.app.SerialException: Error opening serial port '/dev/ttyUSB3'.




OK, when I go to see what's on my USB port, I get

dmesg | grep "ttyUSB*"
[   18.067339] usb 5-1: cp210x converter now attached to ttyUSB0
[  707.645009] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[  724.898860] usb 5-1: cp210x converter now attached to ttyUSB1
[ 1849.546332] cp210x ttyUSB1: cp210x converter now disconnected from ttyUSB1
[ 1856.855572] usb 4-1: cp210x converter now attached to ttyUSB2

Wait, what? It connects, it disconnects, it connects?? It won't sit still and let me connect. Works worse on Linux Mint Debian. (None of the drivers work on Windows 7.)

Seekins

Agree, similar problems here.  Variously, it changed my default board "randomly" leading to the sync error.  It "lost" my COM port and produced a similar error.  Then it caused the blue screen of death (never had on this machine).  Suspect a comm driver problem.  Besides the other sync error (which I got with the "lost" COM port), I'm getting a new one "no info" below.  Ideas?

Binary sketch size: 14406 bytes (of a 32256 byte maximum)
C:\Program Files\Arduino\arduino-1.0\hardware/tools/avr/bin/avrdude -CC:\Program Files\Arduino\arduino-1.0\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -carduino -P\\.\COM36 -b115200 -D -Uflash:w:C:\Users\SEEKIN~1.DAN\AppData\Local\Temp\build5997569703067909922.tmp\Drive16.cpp.hex:i

avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Program Files\Arduino\arduino-1.0\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM36
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: Send: 0 [30]   [20]
avrdude: ser_send(): write error: sorry no info avail

RDH

to mellis

i have a board with a 2560 that i made, it has the bootloader for the arduio mega2560 on it, from the hardware directory on v22. I use a sparkfun ftdi adaptor to feed the tx0/rx0 on the board. Arduino 1.0 would not upload to it. Used your suggestion to replace the avrdude.exe and avrdude.conf files with the ones in v22. It does now upload. This may help others with this problem.

I have some other problem with my itead lcd not working anymore, but the program starts running. Using ITDB02_Graph16 to drive it, it was working fine under v22. The SD card works fine, just nothing on the lcd.

RD

kwankunghkg

Arduino Duemilanove ATMEGA328P-PU
with
FT232R1 datecode 1032 (2010 week 32)
CAN upload with Arduino 1.0


Arduino Duemilanove ATMEGA328P-PU
with
FT232RL datecode 1138 (2011 week 38)
CANNOT upload with Arduino 1.0
CAN upload with Arduino 0.22


The difference is in FT232R1 & FT232RL.

kwankunghkg

Arduino Duemilanove ATMEGA328P-PU
with
FT232R1 datecode 1032 (2010 week 32)
CAN upload with Arduino 1.0


Arduino Duemilanove ATMEGA328P-PU
with
FT232RL datecode 1138 (2011 week 38)
CANNOT upload with Arduino 1.0
CAN upload with Arduino 0.22


The difference is in FT232R1 & FT232RL.


The same problem occurred after I downloaded the driver from FTDI
Windows 2.08.17(Beta)
http://www.ftdichip.com/Drivers/VCP.htm

Arduino IDE version 0022 upload is working.

JimThree

Yes, I'm seeing this too.

I have an Old freeduino which works well with V1, but my newer 328 based clone doesn't work at all.  Both work in v.022

Is this a known bug by the team?  (not that I expect them to support clone boards, but I assume it happens on their hardware too)

Jim

JimThree

I found a workaround for this. 

Locate "boards.txt" in the "...\arduino\hardware\arduino\" folder and where it says:

atmega328.upload.protocol=arduino

change it to:

atmega328.upload.protocol=stk500

Effectively, this is asking AVRdude to use the older STK500 settings for uploading to the board, rather than the newer 'Arduino' support that the latest version of AVRDude has.  I don't know why, but using the AVRDude "Arduino" upload configuration on Arduino boards (probably only the clone boards to be fair) that use FTDI FT232RL chip doesn't work.  I think it's a problem with AVRDude's support for FT232RL, and nothing to do with the arduino team.

Jim

hotchk155

@Jim - Awesome thanks! I had same problem with a homebrew 328 board which would upload on Arduino-0022 but not 1.0. Quick change in boards.txt and issue was resolved

mellis

JimThree, hotchk155, and kwankunghkg, did you only see the problems on Windows?  It sounds like it's a slight change in the behavior of the FTDI drivers or hardware that we should be able to fix with a small patch to avrdude (e.g. to change the exact timing / delays in the "arduino" programmer type's reset of the board).  Would any of you be able to try out some alternative versions of avrdude (with the "arduino" programmer type) to see if we can figure out the problem?

I opened an issue for this on the Arduino Google Code site: http://code.google.com/p/arduino/issues/detail?id=869 .  Let's move discussion / testing there so it's easier to keep track of.

Go Up