Browse Source

* (modified) patch by Michael Ring from the mailing list to fix linking for arm-freertos

git-svn-id: trunk@45730 -
florian 5 years ago
parent
commit
58dcbab10e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      compiler/systems/t_freertos.pas

+ 3 - 1
compiler/systems/t_freertos.pas

@@ -84,6 +84,7 @@ begin
          '-L . -T esp32_out.ld -T esp32.project.ld '+
          '-L $IDF_PATH/components/esp32/ld -T esp32.peripherals.ld'
      else
+{$else}
        ExeCmd[1]:='ld -g '+platform_select+' $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP $MAP -L. -o $EXE -T $RES';
 {$endif xtensa}
    end;
@@ -1160,7 +1161,8 @@ begin
         success:=DoExec(binstr,cmdstr,true,false);
     end;
 
-  Replace(Info.ExeCmd[1],'$'+IDF_PATH,maybequoted(GetEnvironmentVariable(IDF_PATH)));
+  if IDF_PATH <> '' then
+    Replace(Info.ExeCmd[1],'$'+IDF_PATH,maybequoted(GetEnvironmentVariable(IDF_PATH)));
   FixedExeFileName:=maybequoted(ScriptFixFileName(ChangeFileExt(current_module.exefilename,'.elf')));
 
   GCSectionsStr:='--gc-sections';