Skip to content

Commit 09e6585

Browse files
committed
Add Generic CMSIS Network Interface
1 parent bd73238 commit 09e6585

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+70578
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ set(FREERTOS_PLUS_TCP_NETWORK_IF "" CACHE STRING "FreeRTOS Plus TCP Network Inte
5656
set(FREERTOS_PLUS_TCP_NETWORK_IF_LIST
5757
A_CUSTOM_NETWORK_IF
5858
ATSAM43 ATSAME5x # AT
59+
CMSIS
5960
DRIVER_SAM
6061
ESP32
6162
KSZ8851SNL
@@ -99,6 +100,7 @@ if(NOT FREERTOS_PLUS_TCP_NETWORK_IF IN_LIST FREERTOS_PLUS_TCP_NETWORK_IF_LIST )
99100
" A_CUSTOM_NETWORK_IF Target: User Defined\n"
100101
" ATSAM4E Target: ATSAM4E Tested: TODO\n"
101102
" ATSAME5x Target: ATSAME5x Tested: TODO\n"
103+
" CMSIS Target: Generic CMSIS Driver Tested: TODO\n"
102104
" DRIVER_SAM Target: Driver SAM Tested: TODO\n"
103105
" ESP32 Target: ESP-32 Tested: TODO\n"
104106
" KSZ8851SNL Target: ksz8851snl Tested: TODO\n"
@@ -175,4 +177,4 @@ add_subdirectory(test)
175177

176178
if(PROJECT_IS_TOP_LEVEL)
177179
FetchContent_MakeAvailable(freertos_kernel cmock)
178-
endif()
180+
endif()
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Copyright 2024 Arm Limited and/or its affiliates
2+
# <open-source-office@arm.com>
3+
# SPDX-License-Identifier: MIT
4+
5+
if (NOT (FREERTOS_PLUS_TCP_NETWORK_IF STREQUAL "CMSIS") )
6+
return()
7+
endif()
8+
9+
# Optional:
10+
# - FREERTOS_PLUS_TCP_CMSIS_DRIVER_SOURCES:
11+
# Semicolon-separated list of board-specific CMSIS MAC/PHY driver sources
12+
# (example: EMAC_STM32F7xx.c;PHY_LAN8742A.c)
13+
# - FREERTOS_PLUS_TCP_CMSIS_DRIVER_INCLUDE_DIRS:
14+
# Semicolon-separated include directories required by those drivers
15+
set(FREERTOS_PLUS_TCP_CMSIS_DRIVER_SOURCES "" CACHE STRING "Extra CMSIS MAC/PHY driver source files")
16+
set(FREERTOS_PLUS_TCP_CMSIS_DRIVER_INCLUDE_DIRS "" CACHE STRING "Extra include directories for CMSIS MAC/PHY drivers")
17+
18+
#------------------------------------------------------------------------------
19+
add_library( freertos_plus_tcp_network_if STATIC )
20+
21+
target_sources( freertos_plus_tcp_network_if
22+
PRIVATE
23+
NetworkInterface.c
24+
)
25+
26+
target_include_directories( freertos_plus_tcp_network_if
27+
PRIVATE
28+
Driver/Include
29+
)
30+
31+
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/Device/Include")
32+
target_include_directories( freertos_plus_tcp_network_if
33+
PRIVATE
34+
Device/Include
35+
)
36+
endif()
37+
38+
if(FREERTOS_PLUS_TCP_CMSIS_DRIVER_SOURCES)
39+
target_sources( freertos_plus_tcp_network_if
40+
PRIVATE
41+
${FREERTOS_PLUS_TCP_CMSIS_DRIVER_SOURCES}
42+
)
43+
endif()
44+
45+
if(FREERTOS_PLUS_TCP_CMSIS_DRIVER_INCLUDE_DIRS)
46+
target_include_directories( freertos_plus_tcp_network_if
47+
PRIVATE
48+
${FREERTOS_PLUS_TCP_CMSIS_DRIVER_INCLUDE_DIRS}
49+
)
50+
endif()
51+
52+
target_link_libraries( freertos_plus_tcp_network_if
53+
PUBLIC
54+
freertos_plus_tcp_port
55+
freertos_plus_tcp_network_if_common
56+
PRIVATE
57+
freertos_kernel
58+
freertos_plus_tcp
59+
)

0 commit comments

Comments
 (0)