Select right remote agent for upload

Being new to platformIO, excuse me for a maybe obvious question.
I have setup 3 remote agents DEV, TEST, PROD. Each with a device on /dev/ttyUSB0
I can monitor each device with “pio remote -a {DEV} device monitor -p /dev/ttyACM0 -b115200” (or TEST or PROD)
Now I want to upload my code to the DEV agent. Or maybe TEST or PROD

How can I set this in platformio.ini?
Or can I set a flag somewhere to indicate ‘want to upload to DEV’?
Tnx

If you’re working on the commandline, something like

pio remote -a DEV run -t upload

should suffice to remote-upload the firmware to the device connected to DEV.

Thank you.
If I try that command it appears to do more than simply upload the locally complied code. On my local side I used a new board definition “freenove_esp32_s3_wroom.json” that I stored in .platformio\platforms\espressif32\boards. This one is NOT present on the remote agent. Should each agent also ‘know’ about this board? And if so, is this enough and where do I store it?
EDIT:
I ask this because after “Uploading firmware remotely” I get an error " Unknown board ID ‘freenove_esp32_s3_wroom’"
Tnx

Your project will be me more portable if you do not modify the .platformio directory. Simply create a new folder in the root of your project called boards and put the JSON file in there, then it will also be recognized (as is documented) and is portable.

The docs say that the default mode (no --force-remote switch given) will compile locally and upload remotely. It may however be the case that the remote side still needs the board JSON file to deduce the upload arguments. (Which would be fixed per paragraph above).

Thank you for your advice. That helped a lot. I’ll try to read the fine manuals a bit more often. I must say though, that the manuals do give the right answer, but due to the spares examples I don’t always get the relationship between all the options. Specially being a novice at platformIO. I must say that it compiles (close to) a hundred times faster than the Arduino IDE and after getting grip to it’s principles I don’t think I will return to the Arduino.

1 Like