AVRDUDE V6.4 problem

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,

 

I am using AVRDUDE version 6.4, compiled right from the source on http://download.savannah.gnu.org... It works fine (runs both my AVRISP MKII (a real one, not a clone) and also runs an FT232RL USB to Serial board in bitbang mode.

I am running Debian Linux, BTW (although that should not matter).

This is the config I use for the FTDI bitbang:

 


programmer
    id              = "ftdi_ft232rl";
    desc            = "FTDI FT232RL";
    type            = "ftdi_syncbb";
    usbvid          = 0x0403;
    usbpid          = 0x6001;
    connection_type = usb;
    baudrate        = 115200;
    miso            = 0; #TXD
    sck             = 1; #RXD
    mosi            = 2; #RTS
    reset           = 3; #CTS

}


 

The above works. However, I tried to add status LEDs to the definition like this:

 


    errled          = 4; #DTR
    rdyled          = 5; #DSR
    pgmled          = 6; #DCD
    vfyled          = 7; #RI


 

(of course, INSIDE the main "programmer" defines).

 

This does not work. I get this error from AVRDUDE:

 


avrdude: ERRLED: Following pins are not valid pins for this function: 4
avrdude: RDYLED: Following pins are not valid pins for this function: 5
avrdude: PGMLED: Following pins are not valid pins for this function: 6
avrdude: VFYLED: Following pins are not valid pins for this function: 7
         Pin assignment  : 0..7 = DBUS0..7
           VCC     =  (not used)
           BUFF    =  (not used)
           RESET   =  3
           SCK     =  1
           MOSI    =  2
           MISO    =  0
           ERR LED =  4
           RDY LED =  5
           PGM LED =  6
           VFY LED =  7


 

This is the number to pin function table that I'm using:

 

#########################################################
##  FT232R bitbang bit identification
#########################################################
## (bit)(pin)
##   0   TXD
##   1   RXD
##   2   RTS
##   3   CTS
##   4   DTR
##   5   DSR
##   6   DCD
##   7   RI
#########################################################

 

Strange thing is, pin defines 4 thru 7 are valid in that if I re-wire the 6 pin ICSP cable to use 4, 5, 6 and 7, I can still program an AVR device.

The four status LED names are documented in the "avrdude.conf" file, so I know I have them spelled correctly.

Anyone know why I can't use those other 4 pins in the manner documented?

 

Thanks!

Gentlemen may prefer Blondes, but Real Men prefer Redheads!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wow. Still nothing?

Gentlemen may prefer Blondes, but Real Men prefer Redheads!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You might want to try the Avrdude mailing list: https://savannah.nongnu.org/mail...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Seek out my recent post - the official support of avrdude is moving from Savannha to Github - don't know if they will therefore use a different mechanism for issue tracking/support.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Could probably ask a question here: https://github.com/avrdudes/avrd...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would guess that most people use proper programmers nowadays.

 

I have distant memories of bit-bashed RS232,  bit-bashed LPT ports,   home made programmers, ...

The distant memory was that the programming all "worked" but the LEDs did not always play cricket.

 

I presume that you have used FTDI for many years.

Did v6.0, 6.1, 6.2, 6.3 control the LEDs correctly ?

 

If LEDs worked in v6.3 but are broken in v6.4 just raise an Issue.   Or debug the source code yourself and offer a Pull Request.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have some old ARM-JTAG debuggers that use FTDI to bit-bash JTAG.

I have not used them for years.   Especially when there are proper intelligent JTAG debuggers that do a better job.

 

Is this what you use for FTDI ?

Surely any FTDI chip costs more than a $3 USBASP.

But it is worth recycling an ARM-JTAG.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:

I would guess that most people use proper programmers nowadays.

 

I have distant memories of bit-bashed RS232,  bit-bashed LPT ports,   home made programmers, ...

The distant memory was that the programming all "worked" but the LEDs did not always play cricket.

 

I presume that you have used FTDI for many years.

Did v6.0, 6.1, 6.2, 6.3 control the LEDs correctly ?

 

If LEDs worked in v6.3 but are broken in v6.4 just raise an Issue.   Or debug the source code yourself and offer a Pull Request.

 

David.

 

I do have a proper programmer (an AVR-ISP-MKII) a real Atmel programmer, not a clone. :)

 

Anyway, the reason I'm doing this is that I'm fascinated with the possibilities of bit-bang mode. I've already used the FT232RL to drive a VFD display. The program reads stdin and sends the data to the display module (the VFD interface is synchronous serial only needing SCK, data in/out and strobe (and Vcc/Gnd of course).

 

So, I wanted to see it the FTDI would work as an AVR ICSP (it does), but the documented LED indicator pins don't work. I think now is the time to go through the source and see how it's supposed to work, then fix it if necessary. BTW, I don't know if it previously worked (on older versions of AVRDUDE) because I started experimenting on the new version 6.4. It may be worthwhile to try older ones. Thanks for the idea.

 

I've been bit-BANGING my head against the wall trying to get that to work, plus getting a Canon CP1300 photo printer working off the WI-FI in Linux. Can't get it to work so far, and people tell me it can't be done which is baloney since a little stand-alone program ("selphy.go") prints to it as a network printer just fine.

 

If a little utility tossed together years ago works, why doesn't CUPS and Gutenprint work? Something is fishy here...

 

Oh well, too much to do, not enough time to do it. Typical.

 

Thanks for your reply!

Gentlemen may prefer Blondes, but Real Men prefer Redheads!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:

I have some old ARM-JTAG debuggers that use FTDI to bit-bash JTAG.

I have not used them for years.   Especially when there are proper intelligent JTAG debuggers that do a better job.

 

Is this what you use for FTDI ?

Surely any FTDI chip costs more than a $3 USBASP.

But it is worth recycling an ARM-JTAG.

 

David.

 

Anything with an FTDI chip that only costs $3.00 is a Chinese knockoff. A real FT232RL by itself costs $4.70 and a finished board with a real chip will be at least $10.00 to $15.00 USD. Supposedly, the fakes can't write their EEPROMs, and maybe other rarely used functions don't work either. It's too bad the 232RL chips are out of stock everywhere. I can't find any available right now.  :(

 

Gentlemen may prefer Blondes, but Real Men prefer Redheads!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Any FTDI RS232-USB or ARM-JTAG-USB boards that I own will be genuine.   i.e. I bought them years before any clones appeared.

 

However I would expect clones to "work".   After all,  the principal idea behind FTDI is to wiggle external pins according to USB commands.

And you use an FTDI utility to configure the behaviour.

 

Are you re-purposing an ARM-JTAG debugger ?

Or using some FTDI development kit ?

Or just using a bare FTDI chip ?

 

If you are using an ARM-JTAG board,  say so.   Describe your pins, wiring etc.   I might dig out a redundant ARM-JTAG and try for myself.

 

Mind you,   programming an AVR via ISP is pretty straightforward. 5-15 seconds and the job is done.   Some programmers show an "activity" LED.   I don't think that I have ever worried about it.   On the other hand,   if something is supposed to work I would like it to behave 100%.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:

Any FTDI RS232-USB or ARM-JTAG-USB boards that I own will be genuine.   i.e. I bought them years before any clones appeared.

 

However I would expect clones to "work".   After all,  the principal idea behind FTDI is to wiggle external pins according to USB commands.

And you use an FTDI utility to configure the behaviour.

 

Are you re-purposing an ARM-JTAG debugger ?

Or using some FTDI development kit ?

Or just using a bare FTDI chip ?

 

If you are using an ARM-JTAG board,  say so.   Describe your pins, wiring etc.   I might dig out a redundant ARM-JTAG and try for myself.

 

Mind you,   programming an AVR via ISP is pretty straightforward. 5-15 seconds and the job is done.   Some programmers show an "activity" LED.   I don't think that I have ever worried about it.   On the other hand,   if something is supposed to work I would like it to behave 100%.

 

David.

 

I don't have an FTDI "development kit". I just buy USB to serial breakout boards from Amazon, making sure the ones I get have all the pins broken out as well as using a real 232 and not a clone. The libftdi source also has utilities for reading, writing and configuring the internal EEPROM which configures things like max pin drive current, int or ext oscillator, what the GPIO pins do, etc...

 

Concerning indicator LEDs, my AVR-ISP-MKII has a power on led as well as a red/green dual led that blinks red on error, pulses yellow (red+green) while programming and steady green when connected properly and ready. I wanted to emulate that as part of my FTDI-ICSP project. I have neat little light pipes and RGB LEDs which would put all indicator functions on one display. Not necessary, but fun!

 

As far as the FTDI itself, for the VFD project, I use "libftdi" and GCC in Linux. It has functions like "ftdi_open_usb", "ftdi_set_bitbang_mode", "ftdi_close_usb", etc.. as well as setting the DDR registers for the 8 output pins, reading and writing the bits, etc..

 

For the ICSP, I just let AVRDUDE do it's thing. In the source code there are individual functions to drive each pin (including the rdy, pgm, vfy and err LEDs), but I have yet to figure out why it rejects using free pins to do the LED stuff. 

 

The FTDI bitbang mode has lots of potential. The ability to control up to 8 individual TTL lines over USB. There are all kinds of cool things that can be done with that capability, and libftdi makes accessing the pins super easy. I could spend lots of time just dreaming up things to control with an FT232R and a few dozen lines of code.

 

 

Gentlemen may prefer Blondes, but Real Men prefer Redheads!