* call esptool.py properly on Darwin

This commit is contained in:
florian 2023-02-11 21:06:40 +01:00
parent 67864b662a
commit d3ccd10674

View File

@ -1324,16 +1324,20 @@ begin
if success and not(cs_link_nolink in current_settings.globalswitches) then if success and not(cs_link_nolink in current_settings.globalswitches) then
success:=PostProcessExecutable(FixedExeFileName,false); success:=PostProcessExecutable(FixedExeFileName,false);
{$if defined(XTENSA)}
if success then if success then
begin begin
{$ifdef UNIX} {$if defined(DARWIN)}
success:=FindFileInExeLocations('python',true,binstr);
cmdstr:=idfpath+'/components/esptool_py/esptool/esptool.py ';
{$elseif defined(UNIX)}
binstr:=TargetFixPath(idfpath,false)+'/components/esptool_py/esptool/esptool.py'; binstr:=TargetFixPath(idfpath,false)+'/components/esptool_py/esptool/esptool.py';
cmdstr:=''; cmdstr:='';
{$else} {$else}
binstr:='python'; binstr:='python';
cmdstr:=idfpath+'/components/esptool_py/esptool/esptool.py '; cmdstr:=idfpath+'/components/esptool_py/esptool/esptool.py ';
{$endif UNIX} {$endif UNIX}
{$if defined(XTENSA)}
if source_info.exeext<>'' then if source_info.exeext<>'' then
binstr:=binstr+source_info.exeext; binstr:=binstr+source_info.exeext;
if (current_settings.controllertype = ct_esp32) then if (current_settings.controllertype = ct_esp32) then
@ -1354,18 +1358,7 @@ begin
FixedExeFileName, FixedExeFileName,
true,false); true,false);
end end
end
else
{$elseif defined(RISCV32)} {$elseif defined(RISCV32)}
if success then
begin
{$ifdef UNIX}
binstr:=TargetFixPath(idfpath,false)+'/components/esptool_py/esptool/esptool.py';
cmdstr:='';
{$else}
binstr:='python';
cmdstr:=idfpath+'/components/esptool_py/esptool/esptool.py ';
{$endif UNIX}
if source_info.exeext<>'' then if source_info.exeext<>'' then
binstr:=binstr+source_info.exeext; binstr:=binstr+source_info.exeext;
if (current_settings.controllertype = ct_esp32c3) then if (current_settings.controllertype = ct_esp32c3) then
@ -1377,9 +1370,9 @@ begin
FixedExeFileName, FixedExeFileName,
true,false); true,false);
end; end;
{$endif defined(RISCV32)}
end end
else else
{$endif defined(RISCV32)}
if success then if success then
success:=DoExec(FindUtil(utilsprefix+'objcopy'),'-O binary '+ success:=DoExec(FindUtil(utilsprefix+'objcopy'),'-O binary '+
FixedExeFileName+' '+ FixedExeFileName+' '+