Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2020-07

Linking not working anymore on latest trunk for target arm-freertos (plus fix)

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Ring

Hi, Linking on arm-freertos target did not work after the merge of some of Christo's fixes for esp32-freertos.

Here's the fix for the issue (also attached as diff), Florian, can you please check & apply this patch?

Thank you,

Michael

diff --git a/compiler/systems/t_freertos.pas
b/compiler/systems/t_freertos.pas
index e8f5f8507d..742c71d4c5 100644
--- a/compiler/systems/t_freertos.pas
+++ b/compiler/systems/t_freertos.pas
@@ -82,9 +82,9 @@ begin
          '-L $IDF_PATH/components/esp_rom/esp32/ld '+           '-T esp32.rom.ld -T esp32.rom.libgcc.ld -T esp32.rom.newlib-data.ld -T esp32.rom.syscalls.ld -T esp32.rom.newlib-funcs.ld '+
          '-L . -T esp32_out.ld -T esp32.project.ld '+ -         '-L $IDF_PATH/components/esp32/ld -T esp32.peripherals.ld' -     else
-       ExeCmd[1]:='ld -g '+platform_select+' $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP $MAP -L. -o $EXE -T $RES';
+         '-L $IDF_PATH/components/esp32/ld -T esp32.peripherals.ld'; +{$else}
+     ExeCmd[1]:='ld -g '+platform_select+' $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP $MAP -L. -o $EXE -T $RES';
 {$endif xtensa}
    end;
 end;
@@ -1160,7 +1160,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';

Reply by email

Michael Ring

Hi, Linking on arm-freertos target did not work after the merge of some of Christo's fixes for esp32-freertos.

Here's the fix for the issue (also attached as diff), Florian, can you please check & apply this patch?

Thank you,

Michael

diff --git a/compiler/systems/t_freertos.pas
b/compiler/systems/t_freertos.pas
index e8f5f8507d..742c71d4c5 100644
--- a/compiler/systems/t_freertos.pas
+++ b/compiler/systems/t_freertos.pas
@@ -82,9 +82,9 @@ begin
          '-L $IDF_PATH/components/esp_rom/esp32/ld '+           '-T esp32.rom.ld -T esp32.rom.libgcc.ld -T esp32.rom.newlib-data.ld -T esp32.rom.syscalls.ld -T esp32.rom.newlib-funcs.ld '+
          '-L . -T esp32_out.ld -T esp32.project.ld '+ -         '-L $IDF_PATH/components/esp32/ld -T esp32.peripherals.ld' -     else
-       ExeCmd[1]:='ld -g '+platform_select+' $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP $MAP -L. -o $EXE -T $RES';
+         '-L $IDF_PATH/components/esp32/ld -T esp32.peripherals.ld'; +{$else}
+     ExeCmd[1]:='ld -g '+platform_select+' $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP $MAP -L. -o $EXE -T $RES';
 {$endif xtensa}
    end;
 end;
@@ -1160,7 +1160,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';

Reply by email