Commit 3e359c0f authored by Oliver Horst's avatar Oliver Horst
Browse files

[add] Missing package configs to the baremetal/intperf config and new freertos/lwip config

parent c72d07b7
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
#
VERSION 0.1
LANGUAGES C ASM
)
find_package(
lwip-config-headers 0.1 REQUIRED
)
find_package(
lwip-netif-xilinx 0.1 REQUIRED
)
add_library(
lwip-config
#
INTERFACE
)
target_compile_definitions(
lwip-config
#
INTERFACE LWIP_SYS_PORT=freertos
)
target_link_libraries(
lwip-config
#
INTERFACE lwip-config-headers
lwip-netif-xilinx
)
if (WITH_HEADERS)
add_subdirectory(include)
endif()
if (WITH_PORTS)
add_subdirectory(ports)
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-config-headers
#
VERSION 0.1
LANGUAGES C ASM
)
find_package(
toki-syslog-config-headers 0.1
REQUIRED
)
add_library(
lwip-config-headers
#
INTERFACE
)
target_include_directories(
lwip-config-headers
#
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>
$<INSTALL_INTERFACE:include>
)
target_link_libraries(
lwip-config-headers
#
INTERFACE toki-syslog-config-headers
)
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)
find_dependency(toki-syslog-config-headers)
# Import targets
include(${CMAKE_CURRENT_LIST_DIR}/lwip-config-headers-targets.cmake)
check_required_components(lwip-config-headers)
#ifndef __XLWIPCONFIG_H_
#define __XLWIPCONFIG_H_
#define XLWIP_SEMANTIC 0
#define XLWIP_CONFIG_XIICPS_RESET 1
#endif /* __XLWIPCONFIG_H_ */
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(lwip-config-headers)
find_dependency(lwip-netif-xilinx)
# Import targets
include(${CMAKE_CURRENT_LIST_DIR}/lwip-config-targets.cmake)
check_required_components(lwip-config)
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;
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(
sfmt-config
#
VERSION 0.1
LANGUAGES C ASM
)
find_package(
sfmt-config-headers 0.1 REQUIRED
)
add_library(
sfmt-config
#
INTERFACE
)
target_include_directories(
sfmt-config
#
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
$<INSTALL_INTERFACE:include>
)