Fix firmware uploading using serial port with spaces in the path
This commit is contained in:
@@ -47,7 +47,7 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
|
||||
return
|
||||
|
||||
env.AutodetectUploadPort()
|
||||
env.Append(UPLOADERFLAGS=["-P", "$UPLOAD_PORT"])
|
||||
env.Append(UPLOADERFLAGS=["-P", '"$UPLOAD_PORT"'])
|
||||
|
||||
if env.subst("$BOARD") == "raspduino":
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ else:
|
||||
UPLOADER=join("$PIOPACKAGES_DIR", "$PIOPACKAGE_UPLOADER", "bossac"),
|
||||
UPLOADERFLAGS=[
|
||||
"--info",
|
||||
"--port", "$UPLOAD_PORT",
|
||||
"--port", '"$UPLOAD_PORT"',
|
||||
"--erase",
|
||||
"--write",
|
||||
"--verify",
|
||||
|
||||
@@ -118,7 +118,7 @@ env.Replace(
|
||||
"-vv",
|
||||
"-cd", "$UPLOAD_RESETMETHOD",
|
||||
"-cb", "$UPLOAD_SPEED",
|
||||
"-cp", "$UPLOAD_PORT"
|
||||
"-cp", '"$UPLOAD_PORT"'
|
||||
],
|
||||
UPLOADEROTAFLAGS=[
|
||||
"--debug",
|
||||
@@ -292,7 +292,7 @@ else:
|
||||
"-vv",
|
||||
"-cd", "$UPLOAD_RESETMETHOD",
|
||||
"-cb", "$UPLOAD_SPEED",
|
||||
"-cp", "$UPLOAD_PORT",
|
||||
"-cp", '"$UPLOAD_PORT"',
|
||||
"-ca", "0x00000",
|
||||
"-cf", "${SOURCES[0]}",
|
||||
"-ca", "0x40000",
|
||||
|
||||
@@ -32,7 +32,7 @@ if env.subst("$BOARD") == "rfduino":
|
||||
)
|
||||
env.Replace(
|
||||
UPLOADER=join("$PIOPACKAGES_DIR", "tool-rfdloader", "rfdloader"),
|
||||
UPLOADERFLAGS=["-q", "$UPLOAD_PORT"],
|
||||
UPLOADERFLAGS=["-q", '"$UPLOAD_PORT"'],
|
||||
UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS $SOURCES'
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user