Welcome! Log In Create A New Profile

Advanced

Firmware uploads - avrdude.conf issues

Posted by mattuwattu 
Firmware uploads - avrdude.conf issues
April 25, 2011 06:27PM
Continuing from my other recent post, I have lost enjoyed 2 days of my life trying to upload the latest firmware to my motherboard!

Any advice would be greatly appreciated.

The spec:

- Version 1.2 motherboard (version of firmware unknown)
- RepRap-Mendel-20091106 on Ubuntu
- Installed and tried Arduino versions 11, 18 and 22 on two different Mac's
- Installed and tried Arduino versions 18 and 21 on Ubuntu
- My brain is that of a mechanical engineer, not the electronics / IT breed

What works / doesn't

I can simulate a print in the x,y and z directions using the 20091106 version of the software, and probably in a few of the newer versions also. If I use more recent versions I come unstuck with the extruder.

I can do a test extrude (in the extrude tab) using version 20091106 of the software but if I try any of the more recent versions the extruder wont extrude using the button in the software.

So, I thinking that if I update my firmware this issue may disappear, plus it makes sense anyway.

Where i'm stuck

Simple really, I cannot for the life of me upload the latest firmware to my MB. I have following the wiki guide, reprap forum research and delved into google to find answers but no joy. To start with I copied the Sanguino stuff into the necessary area of the Arduino file structure. I've tried holding / releasing the reset button at 14 million different time periods .....

It compiles ok and I can select Sanguino and the appropriate USB tty port but I got the error:

avrdude: Can't find programmer id "stk500"

so I edited the boards.txt to read:

sanguino.upload.protocol=arduino instead of =stk500

Then the error changed to: avrdude: Can't find programmer id "arduino"

I've looked hard to understand avrdude and focused on the avrdude.conf file. I examined the file and although there is a brief reference to arduino in it, it appears to be light on code to define it. I therefore hunted down versions of the file online. Downloaded a load from here but still no joy.

Can anyone provide me with a good avrdude.conf file for me to try, or perhaps give me a few tips of what else to try?

Many thanks
Matt
Re: Firmware uploads - avrdude.conf issues
April 25, 2011 06:43PM
Correction to above,

"It compiles ok and I can select Sanguino and the appropriate USB tty port but I got the error:

avrdude: Can't find programmer id "stk500"

the error I get is actually:

avrdude: stk500_recv(): programmer is not responding
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 07:48AM
Unlikely it's an issue with avrdude.conf.

Sounds more like a not connected or not recognised USB to Serial converter, which is the FTDI chip on board the Gen3 Mainboard. With the board connected and powered up, check wether the device /dev/ttyUSB0 exists and wether file permissions allow you to read and write.

Also no need to try that many different IDE versions. Some versions have issues with compiling, but not with uploading.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 08:11AM
I have also just replied in that other thread.
Also:
- done modification to the MB here [www.reprap.org] (havent really looked at it as i etched it that way but i guess it might be needed
- the "programming" jumper on MB might need to be on?
- what programmer are you using? e.g. is it a stk500 compatible device or is it just the usb cable (ftl232)?

Imo change the preferences to upload.using=bootloader (i think its something like that at least) and try the usb cable programming as both mb12 and ec22 have the coresponding connector. And to upload directly from arduino ui without tampering with another avrdude, its how it should work at least.
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 08:12AM
not connected or not recognised usb to serial converter - can this be the case as i am able to operate my machine using the same connection?
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 09:28AM
The ftdi chip has to be on your cable, or as a separate module, as the Gen 3 motherboard doesnt have it onboard.
Imo put a picture of what cable / module / programmer are you trying to use - and what drivers.
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 01:47PM
If you use a cable or a module with a chip like ft232 there might be a jumper somewhere that selects if the target board is powered via usb or has its own power. Dunno if it works when ftdi chip is set to usb power and the target board is in fact with its own supply.
I think by default the jumper is set to power via usb, you might need that modification (e.g. with that link modification from the cable header to the icsp header - pcb modifications wiki page). If the mb is powered from atx during programming, locate the jumper near ftdi chip and select it to program a board that is not powered via usb. If it has that as option. If you can locate the jumper. If there is a jumper at all. Or if there is a FTDI chip even. hot smiley
If you cant put a picture of what u got at least check out if its a module like the bottom of this page [www.reprap.org] or a cable like [store.makerbot.com] or otherwise browse this [www.ftdichip.com] and point to what you use for programming.
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 03:21PM
I'm back on the case ..... couple of photos attached whilst I look at the other suggestions / gather info




Re: Firmware uploads - avrdude.conf issues
April 26, 2011 03:42PM
I tried to dig out the receipt / spec for the USB TTL board but I cannot find it. The details shown on the chip are:

101
B92
FT232

I've been on the FTDI site before to download drivers. I am wondering if I may have downloaded drivers FT232H, B or R ..... I cannot be certain.
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 04:02PM
I located the preference.txt file on my Mac located /contents/resources/java/lib.

It contains this which I have never edited:

# ARDUINO PREFERENCES
board = uno
target = arduino

upload.using = bootloader

serial.port=COM1
serial.databits=8
serial.stopbits=1
serial.parity=N
serial.debug_rate=9600
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 04:32PM
To rule out the cable between the MB and the USB/TTL, i've just made another just in case. Didn't work either.
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 04:41PM
This shows the available ports in Arduino along with the error message I get :


Re: Firmware uploads - avrdude.conf issues
April 26, 2011 04:48PM
Traumflug Wrote:
-------------------------------------------------------
> Unlikely it's an issue with avrdude.conf.
>
> Sounds more like a not connected or not recognised
> USB to Serial converter, which is the FTDI chip on
> board the Gen3 Mainboard. With the board connected
> and powered up, check wether the device
> /dev/ttyUSB0 exists and wether file permissions
> allow you to read and write.
>
> Also no need to try that many different IDE
> versions. Some versions have issues with
> compiling, but not with uploading.

When I connect the board, /dev/tty.USBserial-A900fXrN appears in Arduino ...... how to i check the file permissions and what of?

Thanks for the tip on not needing to try different IDE versions .... rules that variable out!
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 04:53PM
The VCP serial drivers from the FTDI site i installed on the Mac contains the following notes:


FTDIUSBSerialDriver ReadMe

FTDIUSBSerialDriver is an implementation of a serial driver for FTDI USB devices on Mac OS X. It supports FT8U232AM, FT8U245AM, FT232BM, FT245BM, FT2232, FT232R, FT245R, FT2232H, FT4232H and FT232H devices.

Revision History

v2.2.16 (28th February 2011)
Added support for FT232H.
Force FT232R/FT245R endpoint size to 64 bytes.
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 05:01PM
In preferences should be sanguino as target and board, if its selected from menu i guess, and i think could try with rate 19200 instead of 9600. Maybe the port name COM1 might be wrong, but i guess it should look now like in the picture.
Besides the obvious i am afraid i cant help much with the OS specific. I would think that the issue is probably with the ftdi part / module (i meant "cable" = basically the chip, not the wires themselives). It cant find the right port, cant talk to the chip, cant get replies from chip, or drivers are wrong, or something like that. Maybe just a configuration catch somewhere. The ftdi module looks like its hand soldered from a kit or smth like that, imo doesnt hurt checking it over either. Maybe has a short or cold joint or something, but that would be too easy.

Edited 1 time(s). Last edit at 04/26/2011 05:06PM by NoobMan.
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 05:10PM
An alternative cable / chip feels like a favorite at the moment.

I'll tweak the settings you suggest to see if that has any effect.

I have just fired up ReplicatorG (which I've never had much sucess with) and although I can connect to the Mendel, if i jog an axis, it moves but then the software freezes withe the following error:

[21:59:56] DEBUG:LineNr set
[21:59:56] Unknown: DEBUG:LineNr set
[21:59:56] ok
[21:59:56] ok
[21:59:56] Serial Error: LineNr is not the last lineNr+1
[21:59:56] Unknown: Serial Error: LineNr is not the last lineNr+1
[21:59:56] Resend:1
[21:59:56] Resend:1

Don't know if that sheds anymore light?!

I'm off to hunt down another 'compatible' cable!

Thanks again NoobMan for your help and time
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 05:18PM
I think the line error is not really an error, i think it just means one of the parts reseted and expected a different line number. I think it adjusts and takes the new line nr instead so it somewhat fixes itself. If you shut down host software and mb and unplug the usb, and then restart it all clean, the error would be gone. If you only close and restart the host you will see the error again, as the mcu talked to it previously and expects a line number like 600 or anything where it was closed, where the host software just started and expects 1 - i guess is something around those lines. It should be normal.
Anyway, these replies also means the chip is on correct port and can talk to the sanguino mcu at least on the normal lines, even if it fails as programmer for some reason.
What does avrdude say exactly: - "cannot find usb device" (cant find the programmer / ftdi chip) ; or - "initialization error rc=-1" (can talk to the ftdi chip, but cant talk to sanguino)?

Edited 1 time(s). Last edit at 04/26/2011 05:23PM by NoobMan.
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 05:31PM
when trying to upload I get:

avrdude: stk500_recv(): programmer is not responding

I too find it strange that I can fully operate my machine (i.e. send a gcode and it uses it) and could in theory print if the extruder was improved, but i can't upload the darn firmware!!
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 05:31PM
The "cable" is "compatible" for its purpose, e.g. talk to the mcu. I dont really have a clue of what the ftdi ppls had in mind with it, but i am under impression it was never meant to be a real programmer, even if it got more or less hacked into one.
Again sorry i cant help with os specific. Another "cable" might not help as it might run into same issues - if its about configuration, port permissions etc. Imho, ask someone with a mac smiling smiley
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 05:41PM
Check out the web like [www.arduino.cc] maybe some other tips come from there.
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 05:41PM
point taken with the Mac, that is why i try everything twice, once on the Mac and the second time on Ubuntu.

For the sake of £15 I think I will order another cable ..... given the amount of time I (and you!) have put into this problem. At least that way I can eliminate that as a source of the problem before I find a machine from somewhere with Windows installed.
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 05:42PM
NoobMan Wrote:
-------------------------------------------------------
> Check out the web like
> [www.arduino.cc]
> 68940083/0 maybe some other tips come from there.


Was looking at that exact page this morning! I'll take a look into that. Cheers
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 05:43PM
Dont worry about my time - i just need to spend some time and sometimes i do it on the reprap forum grinning smiley
Sorry i cant help you more though.
Re: Firmware uploads - avrdude.conf issues
April 26, 2011 05:54PM
you have been a big help so far!
Re: Firmware uploads - avrdude.conf issues
May 14, 2011 08:53AM
mattuwattu Wrote:
-------------------------------------------------------
> when trying to upload I get:
>
> avrdude: stk500_recv(): programmer is not
> responding
>
> I too find it strange that I can fully operate my
> machine (i.e. send a gcode and it uses it) and
> could in theory print if the extruder was
> improved, but i can't upload the darn firmware!!


What I can tell you about this is that the STK500 is a sort of standard for serial communications with AVR:s microcontrollers.
The fact that you can send a line of GCode to the printer and it does the work means that you have contact with the firmware,
that means the code to run the printer.

You can't upload the upgrade because the firmware in the AVR chip does not go into the Bootstrap mode and that sounds like an error
in instruction. Lot's of machines I have designed I usualy use an ordinary Xmodem found in most computers and terminal programs.
So if you have a file with an upgrade just upload it. So in my eyes you have a software problem making your motherboard go into
bootstrap upload mode, this also says that there is at 99.9% no problems with wirings...

Best of luck!
Sorry, only registered users may post in this forum.

Click here to login