I am trying to use a AVR-JATG-USB-A (AVR-JTAG-USB-A) to program a AT90CAN128 board with AVRDUDE in platform IO. I have installed the recommended FT232 driver(VCP Drivers - FTDI) and used it with a libusb-win32 filter. I have also tried to install the libusb-win32 driver on the device. When I try to upload to the board I get the following error message:
“avrdude: jtag3_open_common(): Did not find any device matching VID 0x03eb and PID list: 0x2141”
when using this platformio.ini:
[env:AT90CAN128]
platform = atmelavr
board = AT90CAN128
framework = arduino
upload_flags = -e
upload_port = usb
upload_protocol = atmelice_isp
I suspect this is because that the ID:s for my device is VID:0x0403 and PID:6001. I assumed it was possible to use it as a ATMELICE since it was advertised as a copy=)
On the link above it says “Confirmed working with AVRDUDE” but I can´t find any examples and I´m kind of a noob so I appreciate any advice: Thanks!=)
If you have this device then per Utilities - FTDI it might be a “FT232B or FT232R” chip. Per avrdude.conf configuration file there are few programmers available that use this chip. arduino-ft232r would be one (also ft232r, or uncompatino, or ttl232r). Have you thus tried setting upload_protocol = arduino-ft232r and see if it recognizes a device?
Thanks!
Seems like it shuld work if i install libFTDI and libusb-1.0 in my project.
avrdude: error: no libftdi or libusb support. Install libftdi1/libusb-1.0 or libftdi/libusb and run configure/make again.
Is there a good way to do this in a platform IO project on a Windows PC?
Don’t know if I am doing something weird atm or if this is an normal problem nobody ever needed help with it before =)
The repo GitHub - mariusgreuel/avrdude: AVRDUDE for Windows claims to have libftdi support on Windows. You can try and download the release and then replace ony the avrdude.exe in C:\Users\<user>\.platformio\packages\tool-avrdude with the new release and then see what happens when you upload. (If it doesn’t work or breaks anything, remove the whole tool-avrdude folder, it will be redownloaded upon the next upload.)
Thanks!
Seems to get me closer to finally upload some code. Avrdue seems to find the device but the device dose not seem to respond.
avrdude: Device is not responding to program enable. Check connection.
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
Not sure if this is because I am using the wrong port or protocol of if the programmer is not compatible with avrdude. The programmer has a FT232R chip and I get the same error message for all the above suggested protocols.
The programmer is connected via the USB port on my PC so usb should be the correct port? If I dose not specify the port it detects the device on COM4 but then I get this error message:
avrdude: invalid portname ‘COM4’: use ‘ft[0-9]+’ or serial number
Hmm it could also be the case that I was entirely wrong all the time. Looking at the user manual again it seems that a “JTAG ICE” (possibly ‘mk I’ instead of ‘mk II’) is more fitting here.
Could you please try
upload_protocol = jtagmkI
?
If it works, you can also revert back to the normal avrdude as written above.
Edit: Per comments below, also adding the flag to erase flash contents before upload was needed by adding upload_flags = -e to the platformio.ini.
Ok, it’s a little late for the party. But thanks, you made my day. I just played with an naked attiny84 µC within platformio/visual-studio-code. Everything looks good, but then I got troubles with the upload. I just had ftdi232 usb board laying arround, and after pimping the avrdude.exe and choosing the suitable programmer ttl232r and using ft0 as portname everything works like a charm and the attiny “blinks” hello. It’s easy if one knows how to