Skip to content

Commit 06084b4

Browse files
authored
Hotfix linking failure for paths containing spaces (ESP32S2)
1 parent ef9997a commit 06084b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/platformio-build-esp32s2.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
# Extends: https://github.com/platformio/platform-espressif32/blob/develop/builder/main.py
2626

27-
from os.path import abspath, isdir, isfile, join, basename
27+
from os.path import abspath, isdir, isfile, join, basename, relpath
2828

2929
from SCons.Script import DefaultEnvironment
3030

@@ -107,7 +107,7 @@
107107
"-u", "newlib_include_pthread_impl",
108108
"-u", "newlib_include_assert_impl",
109109
"-u", "__cxa_guard_dummy",
110-
'-Wl,-Map="%s"' % join("$BUILD_DIR", basename(env.subst("${PROJECT_DIR}.map")))
110+
'-Wl,-Map="%s"' % relpath(join(env.subst("$PROJECT_BUILD_DIR"), env.subst("$PIOENV") , basename(env.subst("${PROJECT_DIR}.map")))).replace(" ", "_")
111111
],
112112

113113
CPPPATH=[

0 commit comments

Comments
 (0)