Upload Filesystem Image Always Defaults to Auto-Detect Port
If you select a port rather than using Auto-Detect the flashing operation correctly uses the selected port. If you choose Upload Filesystem Image from the PIO menu it always uses Auto-Detect instead of using the selected port like the flashing operation does.
Hi @GeorgeIoak, thanks for the report. I've reproduced the issue and it seems that the problem is related to the IDE so I moved it to an appropriate repository.
Steps to reproduce:
- Open the
arduino-blinkproject example from theespressif32dev-platform - Create a new folder
dataand add an arbitrary file to this folder - Manually select an upload port via the toolbar
- Run the
Upload Filesystem Imagetask from theProject Tasksmenu
Thanks for confirming it. It's been around for a while, I'm surprised that no one else has reported it.
BTW, This also happens for the Erase Flash command as well
My macos installations don't do that. Run a filesystem upload with the -v added so you can see the shell commands being issued. Then write a little shell/batch file that does that. Alternately, coerce platfromIO into doing the easy thing.
In your favorite programming language, find/hardcode the desired pathname, then set the environmental variable that tells PIO to use a specific one, then do the upload.
An excerpt of my script that does this looks like:
#!/bin/sh
set -e
if [ ! -c $PLATFORMIO_UPLOAD_PORT ] then export PLATFORMIO_UPLOAD_PORT=$(ioreg -l | awk -F" '/IOCalloutDevice.*usbserial/ {P=$4}; END{print P}') fi
... E=projectname ~/.platformio/penv/bin/pio run --target upload -e $E
...only upload might be buildfs or whatever is appropriate. That ioreg is Mac-ese, but substitute in Linux-ese or Windows-ese or just hardcode an export PLATFORM_UPLOAD_PORT=/dev/whateveritis
Maybe that'll get you going until someone can actually investigate and fix the real problem. That person might like to know what OS you observed this on as it might be in some OS-specific path of code.
Just trying to help from the audience...
This issue has been automatically marked as stale because it has not had recent activity. Please provide more details or it will be closed if no further activity occurs. Thank you for your contributions.
+1