platformio-vscode-ide icon indicating copy to clipboard operation
platformio-vscode-ide copied to clipboard

Upload Filesystem Image Always Defaults to Auto-Detect Port

Open GeorgeIoak opened this issue 1 year ago • 3 comments

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.

GeorgeIoak avatar Sep 23 '24 16:09 GeorgeIoak

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-blink project example from the espressif32 dev-platform
  • Create a new folder data and add an arbitrary file to this folder
  • Manually select an upload port via the toolbar
  • Run the Upload Filesystem Image task from the Project Tasks menu

valeros avatar Sep 24 '24 13:09 valeros

Thanks for confirming it. It's been around for a while, I'm surprised that no one else has reported it.

GeorgeIoak avatar Sep 24 '24 16:09 GeorgeIoak

BTW, This also happens for the Erase Flash command as well

GeorgeIoak avatar Sep 24 '24 21:09 GeorgeIoak

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...

robertlipe avatar Jan 14 '25 20:01 robertlipe

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.

stale[bot] avatar Apr 25 '25 22:04 stale[bot]

+1

JavanPoirier avatar Jul 22 '25 14:07 JavanPoirier