Can Platformio upload a firmware.hex file only? (uploading sketch to Arduino via Raspberry)


No luck with google and reading manuals, so here the question:

Platformio takes Sketch.ino and library files - all placed on the Rasberry, to compile the firmware.hex file, and then upload to an Arduino (platformio run --target upload). That works fine.
(and the the ‘clean’ command)

However I prefer to :
a. compile the large Arduino sketch (and a dozen large libraries) in my PC and create the firmware.hex file there,
b. then only send the hexfile to the remote Rasberry via Internet.
c. use SSH commands to let platformio upload the firmware.hex file, without local compiling.



you can upload HEX files to your arduino with AVRDude. You could install it on your PI and write some scripts to get your idea working.

Here’s an example how you cna install AVRdude on your Pi:

Regards, Alex


You need PlatformIO Remote. Just start Remote Agent on RPi and work with your project on PC or using Cloud IDE. No need to open SSH port or to be located in the same network. You can program your RPi from anywhere in the world.


Thanks for both suggestions, I will try out both.

The platformio plus option, is less attractive, as it requires internet as far as I understand.

In the countryside (in Chile) Internet is often a problem, relying on 3G modems, so one still has to go with PC to the field, connect to the router and upload arduino sketches via raspberries.

So a simple target /upload command on pio, that just takes the hex file and upload it, would still be nice.

Using avrdude requires more detailed knowhow and understanding of a load of parameters, which is an option, but Pio is suppossed to simplify these manual procedures. Maybe stuff for the pio team to consider.


Hi latin944,

I’m quite sure you can with Arduino, as I can do this for ESP8266.

You can build the project without uploading, and then copy the binaries (in my case it’s a .bin) and upload to device. Look at buildfs and uploadfs in


How to upload bin file, just upload to nodemcu
should I rename my file to fimware.bin?
and what code should i type?
i have compile the ino file on Arduino IDE and i need to upload the bin file separately
i have tried platformio run --target upload and it still do compiling
thanks before


What is your board? Could you share project platformio.ini?


I see the post I started is still of interest, but not solved…

For arduinos I create the .hex file with the standard arduino interface on my pc, then rename the fiile to firmware.hex, then upload it with another - non platformio - program to the arduino.

For the simple reason that I work in the field and work offline, and as far as I know, Platformio requires an active internet connection

@ivan Hope this can be solved one day!


You can connect via SSH to your local RPi and run PIO there via


here my platform.ini looks l

platform = espressif8266
board = nodemcu
framework = arduino
upload_port =


Do you mean?


Can PlatformIO upload bin/hex file to the board without rebuild from source code?
My PlatformIO on VSCode always re-build (or just re-link) the source code every time when I try to flash the firmware to the board.
I have the same problem like this on Arduino too.
The firmware has been compile completely into a bin file.
I just want to flash this bin firmware file to the board.
Can anybody give me some command line example?
The following are target board and firmware:
platform = espressif8266
framework = arduino
board = esp01_1m
board_flash_mode = dout
build_flags = -Wl,-Tesp8266.flash.1m0.ld -DMQTT_MAX_PACKET_SIZE=1000
lib_deps = PubSubClient, NeoPixelBus, IRremoteESP8266, ArduinoJSON
extra_scripts = pio/



PlatformIO should rebuild project only if you change source file or modify dependent library.


Hello Latin944,

could you solve your OTA ?

I’m as well in a chilean countryside with very slow internet. I’m working on ESP32/ESP8266 and I want to trigger the upload via a MQTT message.