@@ -926,7 +926,7 @@ def compile(): # NOQA
926
926
927
927
espressif_path = os .path .expanduser ('~/.espressif' )
928
928
python_path = f'{ espressif_path } /python_env/idf5.2_py3.10_env/bin'
929
- esptool_path = f'{ python_path } /esptool'
929
+ esptool_path = f'" { python_path } /esptool" '
930
930
python_path += '/python'
931
931
932
932
output = output .split ('python ' , 1 )[- 1 ]
@@ -940,10 +940,12 @@ def compile(): # NOQA
940
940
full_file_path = (
941
941
f'{ SCRIPT_DIR } /lib/micropython/ports/esp32/{ build_name } '
942
942
)
943
- bin_files = [
944
- '0x' + item .replace (build_name , full_file_path ).strip ()
945
- for item in output .split ('0x' )[1 :]
946
- ]
943
+ bin_files = []
944
+ for item in output .split ('0x' )[1 :]:
945
+ item , bf = item .split (build_name , 1 )
946
+ bf = f'"{ full_file_path } { bf .strip ()} "'
947
+ bin_files .append (f'0x{ item .strip ()} { bf } ' )
948
+
947
949
bin_files = ' ' .join (bin_files )
948
950
949
951
old_bin_files = ['0x' + item .strip () for item in output .split ('0x' )[1 :]]
@@ -965,7 +967,7 @@ def compile(): # NOQA
965
967
build_bin_file += '_OCTFLASH'
966
968
967
969
build_bin_file += '.bin'
968
- build_bin_file = os .path .abspath (build_bin_file )
970
+ build_bin_file = f'" { os .path .abspath (build_bin_file )} "'
969
971
970
972
cmds = ['' .join ([
971
973
f'{ python_path } -m { esptool_path } ' ,
@@ -981,7 +983,7 @@ def compile(): # NOQA
981
983
output = python_path + output
982
984
983
985
if deploy :
984
- tool_path = os .path .split (esptool_path )[0 ]
986
+ tool_path = os .path .split (esptool_path [ 1 : - 1 ] )[0 ]
985
987
sys .path .insert (0 , tool_path )
986
988
987
989
from esptool .targets import CHIP_DEFS # NOQA
0 commit comments