@@ -7,33 +7,53 @@ add_library( freertos_plus_tcp_network_if STATIC )
7
7
8
8
set ( FREERTOS_PLUS_TCP_STM32_IF_DRIVER "None" CACHE STRING "The driver sources to use with STM32 Network interface" )
9
9
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
+
10
37
target_sources ( freertos_plus_tcp_network_if
11
38
PRIVATE
12
39
NetworkInterface.c
13
40
$<$<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>
15
42
$<$<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>
17
44
$<$<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>
19
46
$<$<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>
21
48
$<$<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>
23
50
$<$<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>
25
52
)
26
53
27
54
target_include_directories ( freertos_plus_tcp_network_if
28
55
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
37
57
)
38
58
39
59
target_link_libraries ( freertos_plus_tcp_network_if
0 commit comments