Custom upload protocol not working

Hi all,

I just installed the windows_x86 platform and built my first windows program with platformio.

Sidenote: since there are no boards defined for the platform, you cannot create the project in the gui. Not good for a beginner. Maybe you want to add a dummy “Generic Intel PC” board?

Now that this worked, I wanted to (ab?)use the upload target to “install” the program in a search path directory.
Unfortunately I get this error and cannot figure out why:

Compiling .pioenvs\windows_x86\src\main.o
Linking .pioenvs\windows_x86\program.exe
Checking size .pioenvs\windows_x86\program.exe
*** Do not know how to make File target `upload' (C:\Users\joba1\Documents\PlatformIO\Projects\Present\upload).  Stop.

I use PlatformIO, version 3.6.4 on Windows 10


platform = windows_x86
extra_scripts =
upload_protocol = custom

environ = env['ENV']
target='%s\\Microsoft\\WindowsApps' % environ['LOCALAPPDATA']
env.Replace(UPLOADCMD='copy /y $SOURCE %s' % target)

Can you please help me spot the error?


There is no upload target for desktop dev/platforms. See platform-windows_x86/ at develop · platformio/platform-windows_x86 · GitHub

You implement own as

from SCons.Script import AlwaysBuild

AlwaysBuild(env.Alias("upload", "$BUILD_DIR/${PROGNAME}", "copy /y ......"))

Please read: