Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 13 additions & 25 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ set(FREERTOS_PLUS_TCP_COMPILER "" CACHE STRING "FreeRTOS Plus TCP Compiler Selec
set(FREERTOS_PLUS_TCP_NETWORK_IF "" CACHE STRING "FreeRTOS Plus TCP Network Interface selection")
set(FREERTOS_PLUS_TCP_NETWORK_IF_LIST
A_CUSTOM_NETWORK_IF
ATSAM43 ATSAME5x # AT
ATSAM4E ATSAME5x # AT
DRIVER_SAM
ESP32
KSZ8851SNL
Expand All @@ -71,7 +71,7 @@ set(FREERTOS_PLUS_TCP_NETWORK_IF_LIST
POSIX WIN_PCAP # Native Linux & Windows respectively
RX
SH2A
STM32 # ST Micro
STM32 STM32FXX STM32HXX # ST Micro
MSP432
TM4C
XILINX_ULTRASCALE ZYNQ # AMD/Xilinx
Expand Down Expand Up @@ -110,40 +110,28 @@ if(NOT FREERTOS_PLUS_TCP_NETWORK_IF IN_LIST FREERTOS_PLUS_TCP_NETWORK_IF_LIST )
" LPC54018 Target: LPC54018 Tested: TODO\n"
" M487 Target: M487 Tested: TODO\n"
" MPS2_AN385 Target: MPS2_AN385 Tested: TODO\n"
" MPS3_AN552 Target: MPS3_AN552"
" MPS3_AN552 Target: MPS3_AN552 Tested: TODO\n"
" MW300_RD Target: mw300_rd Tested: TODO\n"
" NXP1060 Target: NXP1060 Tested: TODO\n"
" PIC32MZEF_ETH Target: pic32mzef ethernet Tested: TODO\n"
" PIC32MZEF_WIFI Target: pic32mzef Wifi Tested: TODO\n"
" RX Target: RX Tested: TODO\n"
" SH2A Target: SH2A Tested: TODO\n"
" STM32 Target: STM32 Tested: TODO\n"
" STM32FXX Target: STM32Fxx legacy Tested: TODO\n"
" STM32HXX Target: STM32Hxx legacy Tested: TODO\n"
" MSP432 Target: MSP432 Tested: TODO\n"
" TM4C Target: TM4C Tested: TODO\n"
" WIN_PCAP Target: Windows Tested: TODO\n"
" XILINX_ULTRASCALE Target: Xilinx Ultrascale Tested: TODO\n"
" ZYNQ Target: Xilinx Zynq")
elseif((FREERTOS_PORT STREQUAL "A_CUSTOM_PORT") AND (NOT TARGET freertos_kernel_port) )
message(FATAL_ERROR " FREERTOS_PLUS_TCP_NETWORK_IF is set to A_CUSTOM_NETWORK_IF.\n"
" Please specify the custom network interface target with all necessary files.\n"
" For example, assuming a directory of:\n"
" FreeRTOSCustomNetworkInterface/\n"
" CMakeLists.txt\n"
" NetworkInterface.c\n\n"
" Where FreeRTOSCustomNetworkInterface/CMakeLists.txt is a modified version of:\n"
" add_library(freertos_plus_tcp_network_if STATIC)\n\n"
" target_sources(freertos_plus_tcp_network_if\n"
" PRIVATE\n"
" NetworkInterface.c)\n\n"
" target_include_directories(freertos_plus_tcp_network_if\n"
" PUBLIC\n"
" .)\n\n"
" target_link_libraries(freertos_plus_tcp_network_if\n"
" PUBLIC\n"
" freertos_plus_tcp_port\n"
" freertos_plus_tcp_network_if_common\n"
" PRIVATE\n"
" freertos_kernel)")
elseif((FREERTOS_PLUS_TCP_NETWORK_IF STREQUAL "A_CUSTOM_NETWORK_IF") AND
(NOT TARGET freertos_plus_tcp_network_if))
message(FATAL_ERROR
"FREERTOS_PLUS_TCP_NETWORK_IF is set to A_CUSTOM_NETWORK_IF, but the "
"freertos_plus_tcp_network_if target does not exist. Define it before "
"making FreeRTOS-Plus-TCP available, for example:\n"
" add_library(freertos_plus_tcp_network_if STATIC NetworkInterface.c)")
endif()

# There is also the need to add a target - typically an interface library that describes the
Expand Down Expand Up @@ -185,4 +173,4 @@ endif()

if(PROJECT_IS_TOP_LEVEL)
FetchContent_MakeAvailable(freertos_kernel cmock)
endif()
endif()
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,32 @@ FetchContent_Declare( freertos_plus_tcp
set( FREERTOS_PLUS_TCP_NETWORK_IF "POSIX" CACHE STRING "" FORCE)
# Or: select a cross-compile PORT
if (CMAKE_CROSSCOMPILING)
# Eg. STM32Hxx version of port
set(FREERTOS_PLUS_TCP_NETWORK_IF "STM32HXX" CACHE STRING "" FORCE)
# Eg. STM32H7 version of port
set(FREERTOS_PLUS_TCP_NETWORK_IF "STM32" CACHE STRING "" FORCE)
set(FREERTOS_PLUS_TCP_STM32_IF_DRIVER "H7" CACHE STRING "" FORCE)
endif()

FetchContent_MakeAvailable(freertos_plus_tcp)
```

- To provide a project-specific network interface, create the
`freertos_plus_tcp_network_if` target before making FreeRTOS-Plus-TCP
available. FreeRTOS-Plus-TCP attaches its internal dependencies to this
target; the application only needs to attach platform-specific dependencies.

```cmake
add_library(freertos_plus_tcp_network_if STATIC
path/to/NetworkInterface.c
)
target_link_libraries(freertos_plus_tcp_network_if
PRIVATE
board_support
)

set(FREERTOS_PLUS_TCP_NETWORK_IF "A_CUSTOM_NETWORK_IF" CACHE STRING "" FORCE)
FetchContent_MakeAvailable(freertos_plus_tcp)
```

### Consuming stand-alone

This repository uses [Git Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) to bring in dependent components.
Expand Down
9 changes: 0 additions & 9 deletions source/portable/NetworkInterface/ATSAM4E/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,3 @@ target_sources( freertos_plus_tcp_network_if
gmac.h
NetworkInterface.c
)

target_link_libraries( freertos_plus_tcp_network_if
PUBLIC
freertos_plus_tcp_port
freertos_plus_tcp_network_if_common
PRIVATE
freertos_kernel
freertos_plus_tcp
)
9 changes: 0 additions & 9 deletions source/portable/NetworkInterface/ATSAME5x/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,3 @@ target_sources( freertos_plus_tcp_network_if
PRIVATE
NetworkInterface.c
)

target_link_libraries( freertos_plus_tcp_network_if
PUBLIC
freertos_plus_tcp_port
freertos_plus_tcp_network_if_common
PRIVATE
freertos_kernel
freertos_plus_tcp
)
14 changes: 12 additions & 2 deletions source/portable/NetworkInterface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ target_link_libraries( freertos_plus_tcp_network_if_common
)

#------------------------------------------------------------------------------
# add_subdirectory(board_family) - This is only an example.

add_subdirectory(ATSAM4E)
add_subdirectory(ATSAME5x)
#add_subdirectory(board_family) - This is only an example.
add_subdirectory(DriverSAM)
add_subdirectory(esp32)
add_subdirectory(ksz8851snl)
Expand All @@ -50,8 +51,17 @@ add_subdirectory(pic32mzef)
add_subdirectory(RX)
add_subdirectory(SH2A)
add_subdirectory(STM32)
add_subdirectory(ThirdParty/MSP432)
add_subdirectory(ThirdParty)
add_subdirectory(TM4C)
add_subdirectory(WinPCap)
add_subdirectory(xilinx_ultrascale)
add_subdirectory(Zynq)

target_link_libraries( freertos_plus_tcp_network_if
PUBLIC
freertos_plus_tcp_port
freertos_plus_tcp_network_if_common
PRIVATE
freertos_kernel
freertos_plus_tcp
)
9 changes: 0 additions & 9 deletions source/portable/NetworkInterface/DriverSAM/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,3 @@ target_sources( freertos_plus_tcp_network_if
gmac_SAM.h
NetworkInterface.c
)

target_link_libraries( freertos_plus_tcp_network_if
PUBLIC
freertos_plus_tcp_port
freertos_plus_tcp_network_if_common
PRIVATE
freertos_kernel
freertos_plus_tcp
)
9 changes: 0 additions & 9 deletions source/portable/NetworkInterface/LPC17xx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,3 @@ target_link_libraries(freertos_plus_tcp_network_if
PRIVATE
lpc17xx_driver
)

target_link_libraries( freertos_plus_tcp_network_if
PUBLIC
freertos_plus_tcp_port
freertos_plus_tcp_network_if_common
PRIVATE
freertos_kernel
freertos_plus_tcp
)
9 changes: 0 additions & 9 deletions source/portable/NetworkInterface/LPC18xx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,3 @@ target_link_libraries(freertos_plus_tcp_network_if
PRIVATE
lpc18xx_driver
)

target_link_libraries( freertos_plus_tcp_network_if
PUBLIC
freertos_plus_tcp_port
freertos_plus_tcp_network_if_common
PRIVATE
freertos_kernel
freertos_plus_tcp
)
9 changes: 0 additions & 9 deletions source/portable/NetworkInterface/LPC54018/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,3 @@ target_link_libraries(freertos_plus_tcp_network_if
PRIVATE
lpc54018_driver
)

target_link_libraries( freertos_plus_tcp_network_if
PUBLIC
freertos_plus_tcp_port
freertos_plus_tcp_network_if_common
PRIVATE
freertos_kernel
freertos_plus_tcp
)
9 changes: 0 additions & 9 deletions source/portable/NetworkInterface/M487/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,3 @@ target_sources( freertos_plus_tcp_network_if
m480_eth.h
NetworkInterface.c
)

target_link_libraries( freertos_plus_tcp_network_if
PUBLIC
freertos_plus_tcp_port
freertos_plus_tcp_network_if_common
PRIVATE
freertos_kernel
freertos_plus_tcp
)
9 changes: 0 additions & 9 deletions source/portable/NetworkInterface/MPS2_AN385/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,3 @@ target_include_directories( freertos_plus_tcp_network_if
PRIVATE
ether_lan9118
)

target_link_libraries( freertos_plus_tcp_network_if
PUBLIC
freertos_plus_tcp_port
freertos_plus_tcp_network_if_common
PRIVATE
freertos_kernel
freertos_plus_tcp
)
9 changes: 0 additions & 9 deletions source/portable/NetworkInterface/MPS3_AN552/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,3 @@ target_include_directories( freertos_plus_tcp_network_if
PRIVATE
Device/Include
)

target_link_libraries( freertos_plus_tcp_network_if
PUBLIC
freertos_plus_tcp_port
freertos_plus_tcp_network_if_common
PRIVATE
freertos_kernel
freertos_plus_tcp
)
9 changes: 0 additions & 9 deletions source/portable/NetworkInterface/MPS4_CS315/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,3 @@ target_include_directories( freertos_plus_tcp_network_if
PRIVATE
Device/Include
)

target_link_libraries( freertos_plus_tcp_network_if
PUBLIC
freertos_plus_tcp_port
freertos_plus_tcp_network_if_common
PRIVATE
freertos_kernel
freertos_plus_tcp
)
9 changes: 0 additions & 9 deletions source/portable/NetworkInterface/NXP1060/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,3 @@ target_sources( freertos_plus_tcp_network_if
PRIVATE
NetworkInterface.c
)

target_link_libraries( freertos_plus_tcp_network_if
PUBLIC
freertos_plus_tcp_port
freertos_plus_tcp_network_if_common
PRIVATE
freertos_kernel
freertos_plus_tcp
)
9 changes: 0 additions & 9 deletions source/portable/NetworkInterface/RX/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,3 @@ target_sources( freertos_plus_tcp_network_if
ether_callback.c
NetworkInterface.c
)

target_link_libraries( freertos_plus_tcp_network_if
PUBLIC
freertos_plus_tcp_port
freertos_plus_tcp_network_if_common
PRIVATE
freertos_kernel
freertos_plus_tcp
)
9 changes: 0 additions & 9 deletions source/portable/NetworkInterface/SH2A/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,3 @@ target_sources( freertos_plus_tcp_network_if
# PRIVATE
# hwEthernetLib # Where is hwEthernet.h?
# )

target_link_libraries( freertos_plus_tcp_network_if
PUBLIC
freertos_plus_tcp_port
freertos_plus_tcp_network_if_common
PRIVATE
freertos_kernel
freertos_plus_tcp
)
15 changes: 5 additions & 10 deletions source/portable/NetworkInterface/STM32/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
if (NOT ( (FREERTOS_PLUS_TCP_NETWORK_IF STREQUAL "STM32") ) )
if ( (FREERTOS_PLUS_TCP_NETWORK_IF STREQUAL "STM32FXX") OR
(FREERTOS_PLUS_TCP_NETWORK_IF STREQUAL "STM32HXX") )
add_subdirectory(Legacy)
return()
elseif (NOT (FREERTOS_PLUS_TCP_NETWORK_IF STREQUAL "STM32") )
return()
endif()

Expand Down Expand Up @@ -35,12 +39,3 @@ target_include_directories( freertos_plus_tcp_network_if
$<$<STREQUAL:${FREERTOS_PLUS_TCP_STM32_IF_DRIVER},H7>:
Drivers/H7>
)

target_link_libraries( freertos_plus_tcp_network_if
PUBLIC
freertos_plus_tcp_port
freertos_plus_tcp_network_if_common
PRIVATE
freertos_kernel
freertos_plus_tcp
)
2 changes: 2 additions & 0 deletions source/portable/NetworkInterface/STM32/Legacy/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
add_subdirectory(STM32Fxx)
add_subdirectory(STM32Hxx)
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,3 @@ target_sources( freertos_plus_tcp_network_if
stm32fxx_hal_eth.c
stm32fxx_hal_eth.h
)

target_link_libraries( freertos_plus_tcp_network_if
PUBLIC
freertos_plus_tcp_port
freertos_plus_tcp_network_if_common
PRIVATE
freertos_kernel
freertos_plus_tcp
)
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,3 @@ target_sources( freertos_plus_tcp_network_if
stm32hxx_hal_eth.c
stm32hxx_hal_eth.h
)

target_link_libraries( freertos_plus_tcp_network_if
PUBLIC
freertos_plus_tcp_port
freertos_plus_tcp_network_if_common
PRIVATE
freertos_kernel
freertos_plus_tcp
)
9 changes: 0 additions & 9 deletions source/portable/NetworkInterface/TM4C/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,3 @@ target_sources( freertos_plus_tcp_network_if
PRIVATE
NetworkInterface.c
)

target_link_libraries( freertos_plus_tcp_network_if
PUBLIC
freertos_plus_tcp_port
freertos_plus_tcp_network_if_common
PRIVATE
freertos_kernel
freertos_plus_tcp
)
1 change: 1 addition & 0 deletions source/portable/NetworkInterface/ThirdParty/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add_subdirectory(MSP432)
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,3 @@ target_sources( freertos_plus_tcp_network_if
NetworkMiddleware.c
NetworkMiddleware.h
)

target_link_libraries( freertos_plus_tcp_network_if
PUBLIC
freertos_plus_tcp_port
freertos_plus_tcp_network_if_common
PRIVATE
freertos_kernel
freertos_plus_tcp
)
Loading
Loading