mirror of
https://github.com/platformio/platformio-core.git
synced 2025-08-02 11:24:27 +02:00
Fix issue with code builder when build path contains spaces // Resolve #387
This commit is contained in:
@@ -18,6 +18,8 @@ PlatformIO 2.0
|
|||||||
(`issue #379 <https://github.com/platformio/platformio/issues/379>`_)
|
(`issue #379 <https://github.com/platformio/platformio/issues/379>`_)
|
||||||
* Fixed reset method for Espressif NodeMCU (ESP-12E Module)
|
* Fixed reset method for Espressif NodeMCU (ESP-12E Module)
|
||||||
(`issue #380 <https://github.com/platformio/platformio/issues/380>`_)
|
(`issue #380 <https://github.com/platformio/platformio/issues/380>`_)
|
||||||
|
* Fixed issue with code builder when build path contains spaces
|
||||||
|
(`issue #387 <https://github.com/platformio/platformio/issues/387>`_)
|
||||||
|
|
||||||
|
|
||||||
2.6.0 (2015-12-15)
|
2.6.0 (2015-12-15)
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
VERSION = (2, 6, "1.dev2")
|
VERSION = (2, 6, "1.dev3")
|
||||||
__version__ = ".".join([str(s) for s in VERSION])
|
__version__ = ".".join([str(s) for s in VERSION])
|
||||||
|
|
||||||
__title__ = "platformio"
|
__title__ = "platformio"
|
||||||
|
@@ -92,7 +92,7 @@ env.Replace(
|
|||||||
"-cp", "$UPLOAD_PORT",
|
"-cp", "$UPLOAD_PORT",
|
||||||
"-cf", "$SOURCE"
|
"-cf", "$SOURCE"
|
||||||
],
|
],
|
||||||
UPLOADCMD='$UPLOADER $UPLOADERFLAGS',
|
UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS',
|
||||||
|
|
||||||
PROGNAME="firmware",
|
PROGNAME="firmware",
|
||||||
PROGSUFFIX=".elf"
|
PROGSUFFIX=".elf"
|
||||||
@@ -104,8 +104,9 @@ env.Append(
|
|||||||
BUILDERS=dict(
|
BUILDERS=dict(
|
||||||
ElfToBin=Builder(
|
ElfToBin=Builder(
|
||||||
action=" ".join([
|
action=" ".join([
|
||||||
"$UPLOADER",
|
'"$UPLOADER"',
|
||||||
"-eo", join("$PLATFORMFW_DIR", "bootloaders",
|
"-eo",
|
||||||
|
'"%s"' % join("$PLATFORMFW_DIR", "bootloaders",
|
||||||
"eboot", "eboot.elf"),
|
"eboot", "eboot.elf"),
|
||||||
"-bo", "$TARGET",
|
"-bo", "$TARGET",
|
||||||
"-bm", "dio",
|
"-bm", "dio",
|
||||||
@@ -147,7 +148,7 @@ if "FRAMEWORK" in env:
|
|||||||
"-i", "$UPLOAD_PORT",
|
"-i", "$UPLOAD_PORT",
|
||||||
"-f", "$SOURCE"
|
"-f", "$SOURCE"
|
||||||
],
|
],
|
||||||
UPLOADCMD='$UPLOADEROTA $UPLOADERFLAGS'
|
UPLOADCMD='"$UPLOADEROTA" $UPLOADERFLAGS'
|
||||||
)
|
)
|
||||||
except socket.error:
|
except socket.error:
|
||||||
pass
|
pass
|
||||||
@@ -163,7 +164,7 @@ else:
|
|||||||
BUILDERS=dict(
|
BUILDERS=dict(
|
||||||
ElfToBin=Builder(
|
ElfToBin=Builder(
|
||||||
action=" ".join([
|
action=" ".join([
|
||||||
"$UPLOADER",
|
'"$UPLOADER"',
|
||||||
"-eo", "$SOURCES",
|
"-eo", "$SOURCES",
|
||||||
"-bo", "${TARGETS[0]}",
|
"-bo", "${TARGETS[0]}",
|
||||||
"-bm", "qio",
|
"-bm", "qio",
|
||||||
|
@@ -61,7 +61,7 @@ if not isfile(join(env.subst("$PIOPACKAGES_DIR"), "ldscripts", ldscript)):
|
|||||||
if "mbed" in env.get("BOARD_OPTIONS", {}).get("frameworks", {}):
|
if "mbed" in env.get("BOARD_OPTIONS", {}).get("frameworks", {}):
|
||||||
env.Append(
|
env.Append(
|
||||||
LINKFLAGS=[
|
LINKFLAGS=[
|
||||||
"-Wl,-T",
|
'-Wl,-T"%s"' %
|
||||||
join(
|
join(
|
||||||
"$PIOPACKAGES_DIR", "framework-mbed", "variant",
|
"$PIOPACKAGES_DIR", "framework-mbed", "variant",
|
||||||
env.subst("$BOARD").upper(), "mbed",
|
env.subst("$BOARD").upper(), "mbed",
|
||||||
|
@@ -41,10 +41,11 @@ if env.subst("$UPLOAD_PROTOCOL") == "gdb":
|
|||||||
UPLOADERFLAGS=[
|
UPLOADERFLAGS=[
|
||||||
join("$BUILD_DIR", "firmware.elf"),
|
join("$BUILD_DIR", "firmware.elf"),
|
||||||
"-batch",
|
"-batch",
|
||||||
"-x", join("$PROJECT_DIR", "upload.gdb")
|
"-x",
|
||||||
|
'"%s"' % join("$PROJECT_DIR", "upload.gdb")
|
||||||
],
|
],
|
||||||
|
|
||||||
UPLOADCMD="$UPLOADER $UPLOADERFLAGS"
|
UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS'
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
env.Replace(
|
env.Replace(
|
||||||
@@ -55,7 +56,7 @@ else:
|
|||||||
"0x08000000" # flash start adress
|
"0x08000000" # flash start adress
|
||||||
],
|
],
|
||||||
|
|
||||||
UPLOADCMD="$UPLOADER $UPLOADERFLAGS"
|
UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py")))
|
|||||||
|
|
||||||
env.Replace(
|
env.Replace(
|
||||||
UPLOADER=join("$PIOPACKAGES_DIR", "tool-lm4flash", "lm4flash"),
|
UPLOADER=join("$PIOPACKAGES_DIR", "tool-lm4flash", "lm4flash"),
|
||||||
UPLOADCMD="$UPLOADER $SOURCES"
|
UPLOADCMD='"$UPLOADER" $SOURCES'
|
||||||
)
|
)
|
||||||
|
|
||||||
env.Append(
|
env.Append(
|
||||||
|
@@ -26,9 +26,13 @@ def _huge_sources_hook(sources):
|
|||||||
|
|
||||||
tmp_file = join(gettempdir(), "pioarargs-%s" % md5(_sources).hexdigest())
|
tmp_file = join(gettempdir(), "pioarargs-%s" % md5(_sources).hexdigest())
|
||||||
with open(tmp_file, "w") as f:
|
with open(tmp_file, "w") as f:
|
||||||
f.write(_sources)
|
# fix space in paths
|
||||||
|
for line in _sources.split(".o "):
|
||||||
|
if not line.endswith(".o"):
|
||||||
|
line += ".o"
|
||||||
|
f.write('"%s" ' % line)
|
||||||
|
|
||||||
return "@%s" % tmp_file
|
return '@"%s"' % tmp_file
|
||||||
|
|
||||||
|
|
||||||
def exists(_):
|
def exists(_):
|
||||||
|
@@ -58,7 +58,7 @@ def BuildProgram(env):
|
|||||||
if ("LDSCRIPT_PATH" in env and
|
if ("LDSCRIPT_PATH" in env and
|
||||||
not any(["-Wl,-T" in f for f in env['LINKFLAGS']])):
|
not any(["-Wl,-T" in f for f in env['LINKFLAGS']])):
|
||||||
env.Append(
|
env.Append(
|
||||||
LINKFLAGS=["-Wl,-T", "$LDSCRIPT_PATH"]
|
LINKFLAGS=['-Wl,-T"$LDSCRIPT_PATH"']
|
||||||
)
|
)
|
||||||
|
|
||||||
# enable "cyclic reference" for linker
|
# enable "cyclic reference" for linker
|
||||||
|
Reference in New Issue
Block a user