mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-01 12:02:07 +01:00
* call esptool.py properly on Darwin
This commit is contained in:
parent
67864b662a
commit
d3ccd10674
@ -1324,16 +1324,20 @@ begin
|
||||
if success and not(cs_link_nolink in current_settings.globalswitches) then
|
||||
success:=PostProcessExecutable(FixedExeFileName,false);
|
||||
|
||||
{$if defined(XTENSA)}
|
||||
if success then
|
||||
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';
|
||||
cmdstr:='';
|
||||
{$else}
|
||||
binstr:='python';
|
||||
cmdstr:=idfpath+'/components/esptool_py/esptool/esptool.py ';
|
||||
{$endif UNIX}
|
||||
|
||||
{$if defined(XTENSA)}
|
||||
if source_info.exeext<>'' then
|
||||
binstr:=binstr+source_info.exeext;
|
||||
if (current_settings.controllertype = ct_esp32) then
|
||||
@ -1354,18 +1358,7 @@ begin
|
||||
FixedExeFileName,
|
||||
true,false);
|
||||
end
|
||||
end
|
||||
else
|
||||
{$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
|
||||
binstr:=binstr+source_info.exeext;
|
||||
if (current_settings.controllertype = ct_esp32c3) then
|
||||
@ -1377,9 +1370,9 @@ begin
|
||||
FixedExeFileName,
|
||||
true,false);
|
||||
end;
|
||||
{$endif defined(RISCV32)}
|
||||
end
|
||||
else
|
||||
{$endif defined(RISCV32)}
|
||||
if success then
|
||||
success:=DoExec(FindUtil(utilsprefix+'objcopy'),'-O binary '+
|
||||
FixedExeFileName+' '+
|
||||
|
||||
Loading…
Reference in New Issue
Block a user