Skip to content

Commit 01e97f2

Browse files
committed
refactor: Update driver dependency
From esp-idf v5.3, the GPIO, UART, SDMMC and SPI drivers was moved to separate components
1 parent ef7661e commit 01e97f2

File tree

4 files changed

+39
-4
lines changed

4 files changed

+39
-4
lines changed

components/debug_probe/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,18 @@ set(priv_include_dirs
2323

2424
set(dependencies
2525
"esp_timer"
26-
"driver"
2726
"hal"
2827
"util"
28+
"esp_ringbuf"
2929
)
3030

31+
# Starting from esp-idf v5.3, the GPIO driver is moved to a separate component
32+
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.3")
33+
list(APPEND dependencies "esp_driver_gpio")
34+
else()
35+
list(APPEND dependencies "driver")
36+
endif()
37+
3138
idf_component_register(
3239
SRCS
3340
${DAP_sources}
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
set(priv_requires esp-serial-flasher freertos esp_timer)
2+
3+
# Starting from esp-idf v5.3, the GPIO and UART drivers are moved to separate components
4+
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.3")
5+
list(APPEND priv_requires "esp_driver_gpio" "esp_driver_uart")
6+
else()
7+
list(APPEND priv_requires "driver")
8+
endif()
9+
110
idf_component_register(SRCS "serial_handler.c"
211
INCLUDE_DIRS "include"
3-
PRIV_REQUIRES esp-serial-flasher driver freertos esp_timer)
12+
PRIV_REQUIRES ${priv_requires})

components/util/CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
set(dependencies freertos esp_system)
2+
3+
# Starting from esp-idf v5.3, the GPIO driver is moved to a separate component
4+
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.3")
5+
list(APPEND dependencies "esp_driver_gpio")
6+
else()
7+
list(APPEND dependencies "driver")
8+
endif()
9+
110
idf_component_register(SRCS "util.c"
211
INCLUDE_DIRS "include"
3-
REQUIRES driver freertos esp_system)
12+
REQUIRES ${dependencies}
13+
)

main/CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1+
set(dependencies "tinyusb" "esp_timer" "usb" "util" "serial_handler" "debug_probe" "esp_ringbuf")
2+
3+
# Starting from esp-idf v5.3, the GPIO driver is moved to a separate component
4+
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.3")
5+
list(APPEND dependencies "esp_driver_gpio")
6+
else()
7+
list(APPEND dependencies "driver")
8+
endif()
9+
110
idf_component_register(SRCS "main.c"
211
"msc.c"
312
"eub_vendord.c"
413
"serial_bridge.c"
5-
REQUIRES "tinyusb" "driver" "esp_timer" "usb" "util" "serial_handler" "debug_probe"
14+
REQUIRES ${dependencies}
615
LDFRAGMENTS "noflash.lf"
716
INCLUDE_DIRS "." "public_include")
817

0 commit comments

Comments
 (0)