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

[chg] Copied lwip-netif-xilinx-config-headers to intperf config

parent 5e135d17
......@@ -15,6 +15,11 @@ find_package(
REQUIRED
)
find_package(
lwip-netif-xilinx-config-headers
REQUIRED
)
add_library(
lwip-netif-xilinx-config
......@@ -27,11 +32,16 @@ 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:
......
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_ */
......@@ -15,6 +15,11 @@ find_package(
REQUIRED
)
find_package(
lwip-netif-xilinx-config-headers
REQUIRED
)
add_library(
lwip-netif-xilinx-config
......@@ -27,11 +32,16 @@ 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:
......
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_ */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment