Commit d5210d4b authored by Ulrich Huber's avatar Ulrich Huber Committed by Oliver Horst
Browse files

[chg] Copied missing configs from freertos baseline master to slave

parent 18c458d5
......@@ -3,6 +3,7 @@ add_subdirectory(elfloader)
add_subdirectory(freertos)
add_subdirectory(wolfssl)
add_subdirectory(lwip)
add_subdirectory(sfmt)
add_subdirectory(libxil)
add_subdirectory(xilpm)
add_subdirectory(taclebench)
......
......@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.7 FATAL_ERROR)
option(ENABLE_INSTALL "Enable target installation possibility" ON)
option(WITH_HEADERS "Enable build of separate header library" ON)
option(WITH_PORTS "Enable building the lwIP config ports" ON)
project(
lwip-config
......@@ -15,7 +16,7 @@ find_package(
)
find_package(
lwip-netif-xilinx-headers 0.1 REQUIRED
lwip-netif-xilinx 0.1 REQUIRED
)
......@@ -28,24 +29,25 @@ add_library(
target_compile_definitions(
lwip-config
#
INTERFACE LWIP_SYS_PORT=freertos
LWIP_NETIF_PORT=xilinx
INTERFACE LWIP_SYS_PORT=freertos
)
target_link_libraries(
lwip-config
#
INTERFACE lwip-config-headers
lwip-netif-xilinx-headers
lwip-netif-xilinx
)
add_subdirectory(src-gen)
if (WITH_HEADERS)
add_subdirectory(include)
endif()
if (WITH_PORTS)
add_subdirectory(ports)
endif()
if (ENABLE_INSTALL)
# Configure and install the following files:
......@@ -89,40 +91,4 @@ if (ENABLE_INSTALL)
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
DESTINATION ${ConfigPackageLocation}
)
# If desired install all header files of the current project
if (WITH_HEADERS)
get_target_property(PROJECT_INCLUDE_DIRECTORIES ${PROJECT_NAME} INTERFACE_INCLUDE_DIRECTORIES)
foreach(DIR ${PROJECT_INCLUDE_DIRECTORIES})
string(REGEX MATCH "^.<BUILD_INTERFACE:(.*)>$" EXTRACTED_DIR ${DIR})
if (CMAKE_MATCH_1)
set(EXTRACTED_DIR "${CMAKE_MATCH_1}")
file(
GLOB_RECURSE
#
HEADER_FILES
#
FOLLOW_SYMLINKS
LIST_DIRECTORIES FALSE
RELATIVE "${EXTRACTED_DIR}"
#
"${EXTRACTED_DIR}/*.h"
"${EXTRACTED_DIR}/*.hpp"
)
foreach(FILE ${HEADER_FILES})
get_filename_component(INSTALL_PATH ${FILE} DIRECTORY)
install(
FILES ${EXTRACTED_DIR}/${FILE}
DESTINATION include/${INSTALL_PATH}
)
endforeach()
endif()
endforeach()
endif()
endif()
......@@ -9,6 +9,11 @@ project(
LANGUAGES C ASM
)
find_package(
toki-syslog-config-headers 0.1
REQUIRED
)
add_library(
lwip-config-headers
#
......@@ -22,6 +27,12 @@ target_include_directories(
$<INSTALL_INTERFACE:include>
)
target_link_libraries(
lwip-config-headers
#
INTERFACE toki-syslog-config-headers
)
if (ENABLE_INSTALL)
# Configure and install the following files:
......
......@@ -2,6 +2,8 @@
include(CMakeFindDependencyMacro)
find_dependency(toki-syslog-config-headers)
# Import targets
include(${CMAKE_CURRENT_LIST_DIR}/lwip-config-headers-targets.cmake)
......
......@@ -3,8 +3,10 @@
#include "lwip/xlwipconfig.h"
#ifndef __ASSEMBLER__
#include <limits.h>
#include <string.h>
#endif
/**
......@@ -57,10 +59,18 @@
/**
* If LWIP_PROVIDE_ERRNO is undefined, sockets.c will utilize <errno.h>
* included by the platform. If LWIP_PROVIDE_ERRNO is set to 1, "lwip/arch.h"
* included by the platform. If LWIP_PROVIDE_ERRNO is defined, "lwip/arch.h"
* defines the same things as <errno.h> does.
*/
#define LWIP_PROVIDE_ERRNO 1
//#define LWIP_PROVIDE_ERRNO 1
#undef LWIP_PROVIDE_ERRNO
/**
* Use newlib error codes so applications are not confused when comparing error
* codes.
*/
#undef errno
#define LWIP_ERRNO_INCLUDE <sys/errno.h>
/**
* LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided
......@@ -138,7 +148,7 @@
* MEM_SIZE: the size of the heap memory. If the application will send
* a lot of data that needs to be copied, this should be set high.
*/
#define MEM_SIZE 0x10000000
#define MEM_SIZE 0x100000
/**
* MEMP_SEPARATE_POOLS: if defined to 1, each pool is placed in its own array.
......@@ -295,6 +305,10 @@
---------- IP options ----------
--------------------------------
*/
#define LWIP_IPV4 1
#define LWIP_IPV6 0
/**
* IP_OPTIONS_ALLOWED: Defines the behavior for IP options.
* IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped.
......@@ -355,7 +369,7 @@
/**
* LWIP_DHCP==1: Enable DHCP module.
*/
#define LWIP_DHCP 1
#define LWIP_DHCP 0
/**
* DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address.
......@@ -481,6 +495,12 @@
*/
#define LWIP_NETIF_STATUS_CALLBACK 1
/**
* LWIP_NETIF_EXT_STATUS_CALLBACK==1: Support a callback function whenever an interface
* changes various states including DHCP,...
*/
#define LWIP_NETIF_EXT_STATUS_CALLBACK 1
/*
------------------------------------
---------- Thread options ----------
......@@ -491,7 +511,7 @@
* The stack size value itself is platform-dependent, but is passed to
* sys_thread_new() when the thread is created.
*/
#define TCPIP_THREAD_STACKSIZE 1024
#define TCPIP_THREAD_STACKSIZE 5120
/**
* TCPIP_THREAD_PRIO: The priority assigned to the main tcpip thread.
......@@ -581,6 +601,27 @@
*/
#define SO_REUSE 1
/**
* LWIP_SO_TIMESTAMPING==1: Enable timestamping feature
*/
#define LWIP_SO_TIMESTAMPING 0
/*
--------------------------------------
------------ CMSG options ------------
--------------------------------------
*/
/**
* LWIP_CMSG_FRAMEWORK==1: Enable CMSG framework for delivering control messages
*/
#define LWIP_CMSG_FRAMEWORK 1
/**
* Size of the buffer used to store control messages
*/
#define LWIP_CMSG_BUF_SIZE 256
/*
--------------------------------------
---------- Checksum options ----------
......@@ -621,4 +662,12 @@
*/
#define CHECKSUM_CHECK_TCP 0
/*
--------------------------------------
---------- Logging options -----------
--------------------------------------
*/
#include <toki/syslog/configs/components/lwip.h>
#endif /* __LWIPOPTS_H_ */
#ifndef __XLWIPCONFIG_H_
#define __XLWIPCONFIG_H_
#define XLWIP 1
#define XLWIP_SEMANTIC 0
#define XLWIP_CONFIG_INCLUDE_GEM 1
#define XLWIP_CONFIG_INCLUDE_EMACPS 1
#define XLWIP_CONFIG_XIICPS_RESET 1
#define XLWIP_CONFIG_EMAC_NUMBER 0
#define XLWIP_CONFIG_N_TX_DESC 64
#define XLWIP_CONFIG_N_RX_DESC 64
#define XLWIP_CONFIG_N_TX_COALESCE 1
#define XLWIP_CONFIG_N_RX_COALESCE 1
#define CONFIG_LINKSPEED_AUTODETECT 1
#endif /* __XLWIPCONFIG_H_ */
......@@ -3,7 +3,7 @@
include(CMakeFindDependencyMacro)
find_dependency(lwip-config-headers)
find_dependency(lwip-netif-xilinx-headers)
find_dependency(lwip-netif-xilinx)
# Import targets
include(${CMAKE_CURRENT_LIST_DIR}/lwip-config-targets.cmake)
......
add_subdirectory(netif)
\ No newline at end of file
add_subdirectory(xilinx)
\ No newline at end of file
cmake_minimum_required(VERSION 3.7 FATAL_ERROR)
option(ENABLE_INSTALL "Enable target installation possibility" ON)
option(WITH_HEADERS "Enable build of separate header library" ON)
project(
lwip-netif-xilinx-config
#
VERSION 0.1
LANGUAGES C ASM
)
find_package(
lwip-netif-xilinx-headers
REQUIRED
)
find_package(
lwip-netif-xilinx-config-headers
REQUIRED
)
add_library(
lwip-netif-xilinx-config
#
STATIC
""
)
target_link_libraries(
lwip-netif-xilinx-config
#
PRIVATE lwip-netif-xilinx-headers
PUBLIC lwip-netif-xilinx-config-headers
)
add_subdirectory(src-gen)
if (WITH_HEADERS)
add_subdirectory(include)
endif()
if (ENABLE_INSTALL)
# Configure and install the following files:
# - ${PROJECT_NAME}-config.cmake,
# - ${PROJECT_NAME}-config-version.cmake,
include(CMakePackageConfigHelpers)
set(ConfigPackageLocation lib/cmake/${PROJECT_NAME}-${PROJECT_VERSION})
# ${PROJECT_NAME}-config.cmake
configure_package_config_file(
${PROJECT_NAME}-config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
INSTALL_DESTINATION ${ConfigPackageLocation}
)
# ${PROJECT_NAME}-config-config-version.cmake
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
COMPATIBILITY SameMajorVersion
)
# Install exported CMake target files
install(
TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
ARCHIVE DESTINATION lib
)
install(
EXPORT ${PROJECT_NAME}-targets
DESTINATION ${ConfigPackageLocation}
EXPORT_LINK_INTERFACE_LIBRARIES
)
# Install package/module configuration files
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
DESTINATION ${ConfigPackageLocation}
)
endif()
cmake_minimum_required(VERSION 3.7 FATAL_ERROR)
option(ENABLE_INSTALL "Enable target installation possibility" ON)
project(
lwip-netif-xilinx-config-headers
#
VERSION 0.1
LANGUAGES C ASM
)
add_library(
lwip-netif-xilinx-config-headers
#
INTERFACE
)
target_include_directories(
lwip-netif-xilinx-config-headers
#
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>
$<INSTALL_INTERFACE:include>
)
if (ENABLE_INSTALL)
# Configure and install the following files:
# - ${PROJECT_NAME}-config.cmake,
# - ${PROJECT_NAME}-config-version.cmake,
include(CMakePackageConfigHelpers)
set(ConfigPackageLocation lib/cmake/${PROJECT_NAME}-${PROJECT_VERSION})
# ${PROJECT_NAME}-config.cmake
configure_package_config_file(
${PROJECT_NAME}-config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
INSTALL_DESTINATION ${ConfigPackageLocation}
)
# ${PROJECT_NAME}-config-config-version.cmake
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
COMPATIBILITY SameMajorVersion
)
# Install exported CMake target files
install(
TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
ARCHIVE DESTINATION lib
)
install(
EXPORT ${PROJECT_NAME}-targets
DESTINATION ${ConfigPackageLocation}
EXPORT_LINK_INTERFACE_LIBRARIES
)
# Install package/module configuration files
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
DESTINATION ${ConfigPackageLocation}
)
# If desired install all header files of the current project
if (NOT WITHOUT_HEADERS)
get_target_property(PROJECT_INCLUDE_DIRECTORIES ${PROJECT_NAME} INTERFACE_INCLUDE_DIRECTORIES)
foreach(DIR ${PROJECT_INCLUDE_DIRECTORIES})
string(REGEX MATCH "^.<BUILD_INTERFACE:(.*)>$" EXTRACTED_DIR ${DIR})
if (CMAKE_MATCH_1)
set(EXTRACTED_DIR "${CMAKE_MATCH_1}")
file(
GLOB_RECURSE
#
HEADER_FILES
#
FOLLOW_SYMLINKS
LIST_DIRECTORIES FALSE
RELATIVE "${EXTRACTED_DIR}"
#
"${EXTRACTED_DIR}/*.h"
"${EXTRACTED_DIR}/*.hpp"
)
foreach(FILE ${HEADER_FILES})
get_filename_component(INSTALL_PATH ${FILE} DIRECTORY)
install(
FILES ${EXTRACTED_DIR}/${FILE}
DESTINATION include/${INSTALL_PATH}
)
endforeach()
endif()
endforeach()
endif()
endif()
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
# Import targets
include(${CMAKE_CURRENT_LIST_DIR}/lwip-netif-xilinx-config-headers-targets.cmake)
check_required_components(lwip-netif-xilinx-config-headers)
#ifndef __XLWIPCONFIG_NETIF_XILINX_H_
#define __XLWIPCONFIG_NETIF_XILINX_H_
#define XLWIP_CONFIG_INCLUDE_GEM 1
#define XLWIP_CONFIG_INCLUDE_EMACPS 1
#define XLWIP_CONFIG_EMAC_NUMBER 0
#define XLWIP_CONFIG_N_TX_DESC 64
#define XLWIP_CONFIG_N_RX_DESC 64
#define XLWIP_CONFIG_N_TX_COALESCE 1
#define XLWIP_CONFIG_N_RX_COALESCE 1
#define XLWIP_CONFIG_GEM_ENABLE_ERRQ 1
#define XLWIP_CONFIG_GEM_ENABLE_IEEE1588 1
#define CONFIG_LINKSPEED_AUTODETECT 1
/**
* The size of the stack of the thread transferring incoming packets from the Xilinx driver to lwIP
*/
#define XLWIP_CONFIG_THREAD_STACKSIZE 2048
/**
* The priority of the thread transferring incoming packets from the Xilinx driver to lwIP
*/
#define XLWIP_CONFIG_THREAD_PRIO (8 - 1)
/**
* The size of the stack of the thread checking for an established link on the emacps interface
*/
#define XLWIP_LINK_DETECT_THREAD_STACKSIZE 1536
/**
* The interval in ms by which change of link connection is determined by the emacps driver
*/
#define XLWIP_LINK_DETECT_THREAD_INTERVAL 1000 /* one second */
/**
* Name assigned ot the GEM interface
*/
#define XLWIP_GEM_NAME1 'e'
#define XLWIP_GEM_NAME2 '0'
/**
* IP address assigned to the GEM interface separated into the four octets
*/
#define XLWIP_GEM_IP1 192
#define XLWIP_GEM_IP2 168
#define XLWIP_GEM_IP3 0
#define XLWIP_GEM_IP4 2
/**
* Netmask assigned to the GEM interface separated into the four octets
*/
#define XLWIP_GEM_NM1 255
#define XLWIP_GEM_NM2 255
#define XLWIP_GEM_NM3 255
#define XLWIP_GEM_NM4 0
/**
* Gateway assigned to the GEM interface separated into the four octets
*/
#define XLWIP_GEM_GW1 192
#define XLWIP_GEM_GW2 168
#define XLWIP_GEM_GW3 0
#define XLWIP_GEM_GW4 1
#endif /* __XLWIPCONFIG_NETIF_XILINX_H_ */
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(lwip-netif-xilinx-headers)
# Import targets
include(${CMAKE_CURRENT_LIST_DIR}/lwip-netif-xilinx-config-targets.cmake)
check_required_components(lwip-netif-xilinx-config)
cmake_minimum_required(VERSION 3.7 FATAL_ERROR)
target_sources(
lwip-netif-xilinx-config
#
PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/xtopology_g.c"
)
#include "netif/xtopology.h"
#include "xil/xparameters.h"
struct xtopology_t xtopology[] = {
{
0xFF0E0000,
xemac_type_emacps,
0x0,
0x0,
0xF8F00100,
XPAR_XEMACPS_3_INTR,
},
};
int xtopology_n_emacs = 1;