Browse Source

Add link unit for esp-idf v4.1. Version checks to allow for different patch levels in idf_version.

ccrause 3 years ago
parent
commit
a9d883ada1
4 changed files with 49 additions and 4 deletions
  1. 4 2
      compiler/pmodules.pas
  2. 1 1
      rtl/freertos/Makefile
  3. 1 1
      rtl/freertos/Makefile.fpc
  4. 43 0
      rtl/freertos/xtensa/espidf_40100.pp

+ 4 - 2
compiler/pmodules.pas

@@ -417,14 +417,16 @@ implementation
         if not(current_module.is_unit) and (target_info.system=system_xtensa_freertos) then
           if (current_settings.controllertype=ct_esp32) then
             begin
-              if idf_version>=40200 then
+              if (idf_version>=40100) and (idf_version<40200) then
+                AddUnit('espidf_40100')
+              else if idf_version>=40200 then
                 AddUnit('espidf_40200')
               else
                 Comment(V_Warning, 'Unsupported esp-idf version');
             end
           else if (current_settings.controllertype=ct_esp8266) then
             begin
-              if idf_version=30300 then
+              if (idf_version>=30300) and (idf_version<30400) then
                 AddUnit('esp8266rtos_30300')
               else if idf_version>=30400 then
                 AddUnit('esp8266rtos_30400')

+ 1 - 1
rtl/freertos/Makefile

@@ -517,7 +517,7 @@ endif
 ifeq ($(ARCH),xtensa)
 CPU_SPECIFIC_COMMON_UNITS=sysutils math classes fgl macpas typinfo types rtlconsts getopts lineinfo
 ifeq ($(SUBARCH),lx6)
-CPU_UNITS=esp32 espidf_40200
+CPU_UNITS=esp32 espidf_40100 espidf_40200
 CPU_UNITS_DEFINED=1
 endif
 ifeq ($(SUBARCH),lx106)

+ 1 - 1
rtl/freertos/Makefile.fpc

@@ -227,7 +227,7 @@ endif
 ifeq ($(ARCH),xtensa)
 CPU_SPECIFIC_COMMON_UNITS=sysutils math classes fgl macpas typinfo types rtlconsts getopts lineinfo
 ifeq ($(SUBARCH),lx6)
-CPU_UNITS=esp32 espidf_40200
+CPU_UNITS=esp32 espidf_40100 espidf_40200
 CPU_UNITS_DEFINED=1
 endif
 ifeq ($(SUBARCH),lx106)

+ 43 - 0
rtl/freertos/xtensa/espidf_40100.pp

@@ -0,0 +1,43 @@
+{
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2021 by Florian Klaempfl
+    member of the Free Pascal development team.
+
+    System unit for FreeRTOS systems
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+unit espidf_40100;
+
+interface
+
+{$linklib esp32,static}
+{$linklib soc,static}
+{$linklib driver,static}
+{$linklib freertos,static}
+{$linklib log,static}
+{$linklib esp_common,static}
+{$linklib heap,static}
+{$linklib newlib,static}
+{$linklib vfs,static}
+{$linklib esp_ringbuf,static}
+{$linklib spi_flash,static}
+{$linklib app_update,static}
+{$linklib xtensa,static}
+{$linklib bootloader_support,static}
+{$linklib pthread,static}
+{$linklib hal,static}
+{$linklib libm,static}
+{$linklib libg,static}
+{$linklib c,static}
+{$linklib esp_event,static}
+
+implementation
+
+end.