Skip to content

Commit 206a789

Browse files
committed
STM32: Fetch Latest Drivers
1 parent 2a12008 commit 206a789

15 files changed

+37
-23878
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ jobs:
126126
uses: FreeRTOS/CI-CD-Github-Actions/spellings@main
127127
with:
128128
path: ./
129-
exclude-dirs: source/portable/NetworkInterface/STM32
130129

131130
formatting:
132131
runs-on: ubuntu-latest
@@ -136,7 +135,6 @@ jobs:
136135
uses: FreeRTOS/CI-CD-Github-Actions/formatting@main
137136
with:
138137
path: ./
139-
exclude-dirs: source/portable/NetworkInterface/STM32
140138

141139
doxygen:
142140
runs-on: ubuntu-latest

source/portable/NetworkInterface/STM32/CMakeLists.txt

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,53 @@ add_library( freertos_plus_tcp_network_if STATIC )
77

88
set( 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+
1037
target_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

2754
target_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

3959
target_link_libraries( freertos_plus_tcp_network_if

0 commit comments

Comments
 (0)