Преглед изворни кода

Merge branch 'bugfix/add_esp_timer_required' into 'master'

bugfix: Add esp_timer to privately required components

See merge request espressif/esp-serial-flasher!41
Ivan Grokhotkov пре 3 година
родитељ
комит
b5e212622d
2 измењених фајлова са 9 додато и 2 уклоњено
  1. 8 1
      CMakeLists.txt
  2. 1 1
      idf_component.yml

+ 8 - 1
CMakeLists.txt

@@ -11,10 +11,17 @@ if (DEFINED ESP_PLATFORM)
     # Register component to esp-idf build system
     list(APPEND srcs port/esp32_port.c)
     if ("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER "4.0")
+        # esp_timer component was introduced in v4.2
+        set(priv_requires driver)
+        if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER "4.1")
+            list(APPEND priv_requires esp_timer)
+        endif()
+
         idf_component_register(SRCS ${srcs}
                                INCLUDE_DIRS include port
                                PRIV_INCLUDE_DIRS private_include
-                               PRIV_REQUIRES driver)
+                               PRIV_REQUIRES ${priv_requires})
+
         set(target ${COMPONENT_LIB})
         component_compile_options(-Wstrict-prototypes)
     else()

+ 1 - 1
idf_component.yml

@@ -1,3 +1,3 @@
-version: "0.0.2"
+version: "0.0.3"
 description: Serial flasher component provides portable library for flashing Espressif SoCs from other host microcontroller
 url: https://github.com/espressif/esp-serial-flasher