mirror of
https://github.com/platformio/platformio-core.git
synced 2025-08-01 19:04:29 +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>`_)
|
||||
* Fixed reset method for Espressif NodeMCU (ESP-12E Module)
|
||||
(`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)
|
||||
|
@@ -12,7 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
VERSION = (2, 6, "1.dev2")
|
||||
VERSION = (2, 6, "1.dev3")
|
||||
__version__ = ".".join([str(s) for s in VERSION])
|
||||
|
||||
__title__ = "platformio"
|
||||
|
@@ -92,7 +92,7 @@ env.Replace(
|
||||
"-cp", "$UPLOAD_PORT",
|
||||
"-cf", "$SOURCE"
|
||||
],
|
||||
UPLOADCMD='$UPLOADER $UPLOADERFLAGS',
|
||||
UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS',
|
||||
|
||||
PROGNAME="firmware",
|
||||
PROGSUFFIX=".elf"
|
||||
@@ -104,8 +104,9 @@ env.Append(
|
||||
BUILDERS=dict(
|
||||
ElfToBin=Builder(
|
||||
action=" ".join([
|
||||
"$UPLOADER",
|
||||
"-eo", join("$PLATFORMFW_DIR", "bootloaders",
|
||||
'"$UPLOADER"',
|
||||
"-eo",
|
||||
'"%s"' % join("$PLATFORMFW_DIR", "bootloaders",
|
||||
"eboot", "eboot.elf"),
|
||||
"-bo", "$TARGET",
|
||||
"-bm", "dio",
|
||||
@@ -147,7 +148,7 @@ if "FRAMEWORK" in env:
|
||||
"-i", "$UPLOAD_PORT",
|
||||
"-f", "$SOURCE"
|
||||
],
|
||||
UPLOADCMD='$UPLOADEROTA $UPLOADERFLAGS'
|
||||
UPLOADCMD='"$UPLOADEROTA" $UPLOADERFLAGS'
|
||||
)
|
||||
except socket.error:
|
||||
pass
|
||||
@@ -163,7 +164,7 @@ else:
|
||||
BUILDERS=dict(
|
||||
ElfToBin=Builder(
|
||||
action=" ".join([
|
||||
"$UPLOADER",
|
||||
'"$UPLOADER"',
|
||||
"-eo", "$SOURCES",
|
||||
"-bo", "${TARGETS[0]}",
|
||||
"-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", {}):
|
||||
env.Append(
|
||||
LINKFLAGS=[
|
||||
"-Wl,-T",
|
||||
'-Wl,-T"%s"' %
|
||||
join(
|
||||
"$PIOPACKAGES_DIR", "framework-mbed", "variant",
|
||||
env.subst("$BOARD").upper(), "mbed",
|
||||
|
@@ -41,10 +41,11 @@ if env.subst("$UPLOAD_PROTOCOL") == "gdb":
|
||||
UPLOADERFLAGS=[
|
||||
join("$BUILD_DIR", "firmware.elf"),
|
||||
"-batch",
|
||||
"-x", join("$PROJECT_DIR", "upload.gdb")
|
||||
"-x",
|
||||
'"%s"' % join("$PROJECT_DIR", "upload.gdb")
|
||||
],
|
||||
|
||||
UPLOADCMD="$UPLOADER $UPLOADERFLAGS"
|
||||
UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS'
|
||||
)
|
||||
else:
|
||||
env.Replace(
|
||||
@@ -55,7 +56,7 @@ else:
|
||||
"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(
|
||||
UPLOADER=join("$PIOPACKAGES_DIR", "tool-lm4flash", "lm4flash"),
|
||||
UPLOADCMD="$UPLOADER $SOURCES"
|
||||
UPLOADCMD='"$UPLOADER" $SOURCES'
|
||||
)
|
||||
|
||||
env.Append(
|
||||
|
@@ -26,9 +26,13 @@ def _huge_sources_hook(sources):
|
||||
|
||||
tmp_file = join(gettempdir(), "pioarargs-%s" % md5(_sources).hexdigest())
|
||||
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(_):
|
||||
|
@@ -58,7 +58,7 @@ def BuildProgram(env):
|
||||
if ("LDSCRIPT_PATH" in env and
|
||||
not any(["-Wl,-T" in f for f in env['LINKFLAGS']])):
|
||||
env.Append(
|
||||
LINKFLAGS=["-Wl,-T", "$LDSCRIPT_PATH"]
|
||||
LINKFLAGS=['-Wl,-T"$LDSCRIPT_PATH"']
|
||||
)
|
||||
|
||||
# enable "cyclic reference" for linker
|
||||
|
Reference in New Issue
Block a user