Can the Arduino ISP board be used with PlatformIO?

Greetings all!
I was wondering if there was support for the Arduino ISP board with PlatformIO? I’ve tried different options that are listed with the documentation, but all seem to either require a serial port to push the code onto the device. The ISP does not provide a serial device. Please let me know if I’m missing something. Thanks in advance!

–Chris

Hi @cslamar
Have you read Upload using Programmer in our docs?

I have indeed looked at the examples show in the documentation, and tried each with a combination of options. I can use an Arduino as a programmer, but since the ISP doesn’t generate a serial port to connect to, I’m at a loss what options to use. Any thoughts would be gratefully accepted!

Thanks

Use “Upload using Programmer” or pio run -t program with this conf

[env:myenv]
platform = atmelavr
framework = arduino
board = ***
upload_protocol = usbtiny

Greetings,

I tried your suggested configuration and here’s the output I received:

Using Port : usb Using Programmer : usbtiny avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)
Here’s the platformio.ini entry
[env:megaatmega2560] platform = atmelavr framework = arduino board = megaatmega2560 upload_protocol = usbtiny lib_install = 1, 54

As always, any input would be great!

Thanks

Sorry, looks like this information is missed in our docs. I’ve just fixed it. Please use this conf

[env:megaatmega2560]
platform = atmelavr
framework = arduino
board = megaatmega2560
upload_protocol = arduinoisp
lib_install = 1, 54

That did it!! Thank you very much!!!

1 Like

Great! Do you use PlatformIO IDE or CLI?

I usually use the IDE

Happy Coding with PlatformIO! :blush:

Where should I enter with this conf parameters? I’m trying to upload my code to an Arduino loaded with the ArduinoISP code and one ISP shield.

In platformio.ini set the following line inside desired environment block, and change board to whatever matches your platform:

upload_protocol = arduinoisp

Hope this helps. It worked well for me!

1 Like

I will test it and give you a feedback later. Thanks!

I use the following configuration in my platformio.ini and it works:
[env:unoAsIsp]
platform = atmelavr
framework = arduino
board = uno
upload_protocol = arduinoisp
upload_flags = -P$UPLOAD_PORT -b$UPLOAD_SPEED

upload_port = COM4
upload_speed = 19200

Thank you.

You should only need:

[env:unoAsIsp] platform = atmelavr framework = arduino board = uno upload_protocol = arduinoisp

That’s all I needed at least. Hope it helps.

Thank you for a good start for setting it up.
It is not working for me yet.
Any idea with what i do with this?

Looking for upload port...
Auto-detected: COM17
Uploading .pioenvs\unoAsIsp\firmware.hex
avrdude: Error: Invalid -P value: 'COM17'
Use -P usb:bus:device

Witch I understand is that Auto-detected is wrongly formated for the -P.

I see that @Fernando_Fontana used this:
upload_flags = -P$UPLOAD_PORT -b$UPLOAD_SPEED
upload_port = COM4
upload_speed = 19200

But there is no so to say “:device” there. How is that formated?
Thx for your help

Could open Arduino IDE settings and enable a verbose log for build/upload? After that, please program board with Arduino IDE and copy here the full output from console.

When I use

[env:nano328]
platform = atmelavr
board = nanoatmega328
framework = arduino
upload_protocol = arduinoisp

It bitches about not specifying a com port. The problem is my USBtiny is a device.

Dunce cap award today. I needed ty use usbtiny for the protocol.

1 Like

http://docs.platformio.org/en/latest/platforms/atmelavr.html#upload-using-programmer