@@ -7,33 +7,53 @@ add_library( freertos_plus_tcp_network_if STATIC )
77
88set ( FREERTOS_PLUS_TCP_STM32_IF_DRIVER "None" CACHE STRING "The driver sources to use with STM32 Network interface" )
99
10+ if (FREERTOS_PLUS_TCP_STM32_IF_DRIVER STREQUAL "F4" )
11+ FetchContent_Declare(stm32-eth-driver
12+ GIT_REPOSITORY https://github.com/STMicroelectronics/stm32f4xx-hal-driver.git
13+ GIT_TAG v1.8.4
14+ GIT_SHALLOW TRUE
15+ )
16+ elseif (FREERTOS_PLUS_TCP_STM32_IF_DRIVER STREQUAL "F7" )
17+ FetchContent_Declare(stm32-eth-driver
18+ GIT_REPOSITORY https://github.com/STMicroelectronics/stm32f7xx-hal-driver.git
19+ GIT_TAG v1.3.2
20+ GIT_SHALLOW TRUE
21+ )
22+ elseif (FREERTOS_PLUS_TCP_STM32_IF_DRIVER STREQUAL "H5" )
23+ FetchContent_Declare(stm32-eth-driver
24+ GIT_REPOSITORY https://github.com/STMicroelectronics/stm32h5xx-hal-driver.git
25+ GIT_TAG v1.5.0
26+ GIT_SHALLOW TRUE
27+ )
28+ elseif (FREERTOS_PLUS_TCP_STM32_IF_DRIVER STREQUAL "H7" )
29+ FetchContent_Declare(stm32-eth-driver
30+ GIT_REPOSITORY https://github.com/STMicroelectronics/stm32h7xx-hal-driver.git
31+ GIT_TAG v1.11.5
32+ GIT_SHALLOW TRUE
33+ )
34+ endif ()
35+ FetchContent_MakeAvailable(stm32-eth-driver)
36+
1037target_sources ( freertos_plus_tcp_network_if
1138 PRIVATE
1239 NetworkInterface.c
1340 $<$<STREQUAL :${FREERTOS_PLUS_TCP_STM32_IF_DRIVER} ,F4>:
14- Drivers/F4 /stm32f4xx_hal_eth.c>
41+ stm32-eth-driver_SOURCE_DIR/Src /stm32f4xx_hal_eth.c>
1542 $<$<STREQUAL :${FREERTOS_PLUS_TCP_STM32_IF_DRIVER} ,F7>:
16- Drivers/F7 /stm32f7xx_hal_eth.c>
43+ stm32-eth-driver_SOURCE_DIR/Src /stm32f7xx_hal_eth.c>
1744 $<$<STREQUAL :${FREERTOS_PLUS_TCP_STM32_IF_DRIVER} ,H5>:
18- Drivers/H5 /stm32h5xx_hal_eth_ex.c>
45+ stm32-eth-driver_SOURCE_DIR/Src /stm32h5xx_hal_eth_ex.c>
1946 $<$<STREQUAL :${FREERTOS_PLUS_TCP_STM32_IF_DRIVER} ,H5>:
20- Drivers/H5 /stm32h5xx_hal_eth.c>
47+ stm32-eth-driver_SOURCE_DIR/Src /stm32h5xx_hal_eth.c>
2148 $<$<STREQUAL :${FREERTOS_PLUS_TCP_STM32_IF_DRIVER} ,H7>:
22- Drivers/H7 /stm32h7xx_hal_eth_ex.c>
49+ stm32-eth-driver_SOURCE_DIR/Src /stm32h7xx_hal_eth_ex.c>
2350 $<$<STREQUAL :${FREERTOS_PLUS_TCP_STM32_IF_DRIVER} ,H7>:
24- Drivers/H7 /stm32h7xx_hal_eth.c>
51+ stm32-eth-driver_SOURCE_DIR/Src /stm32h7xx_hal_eth.c>
2552)
2653
2754target_include_directories ( freertos_plus_tcp_network_if
2855 PUBLIC
29- $<$<STREQUAL :${FREERTOS_PLUS_TCP_STM32_IF_DRIVER} ,F4>:
30- Drivers/F4>
31- $<$<STREQUAL :${FREERTOS_PLUS_TCP_STM32_IF_DRIVER} ,F7>:
32- Drivers/F7>
33- $<$<STREQUAL :${FREERTOS_PLUS_TCP_STM32_IF_DRIVER} ,H5>:
34- Drivers/H5>
35- $<$<STREQUAL :${FREERTOS_PLUS_TCP_STM32_IF_DRIVER} ,H7>:
36- Drivers/H7>
56+ stm32-eth-driver_SOURCE_DIR/Inc
3757)
3858
3959target_link_libraries ( freertos_plus_tcp_network_if
0 commit comments