To upload firmware.hex to an Uno attached to “SERIALPORT” I can:
$ avrdude -DV -p atmega328p -P /dev/SERIALPORT -c arduino -b115200 -U flash:w:firmware.hex:i
For a while, I have been using an esp01 module at “IPADDRESS” flashed with the JeeLabs esp-link firmware to wirelessly program arduino mounted on my robot.
Avrdude very easily adapts to this workflow:
$ avrdude -DV -p atmega328p -P net:*IPADDRESS*:23 -c arduino -b115200 -U flash:w:firmware.hex:i
This works flawlessly.
As you can see all that has changed is the -P (port) parameter.
PLATFORMIO is so cool and I love the community around it, it’s the tool I want to be using for my projects, so I am sure it can incorporate the same thing (without complicated workarounds like pseudo ttys, socat etc), yet I can’t find any docs about it:
on a simple arduino platformio project why can’t I just set the upload_port to “net:IPADDRESS:port” to obtain the same result? It seems to me that PIO uses avrdude anyway, so why can’t the upload_port parameter be passed as is? I have been messing around for hours trying to hack this out myself, but I don’t seem to be very good at reading Python yet, the way PIO runs all of its scripts is still very obscure to me…
Thanks for reading, please help