built for am64xx-evm
This commit is contained in:
parent
a04c562201
commit
a932d3b29e
@ -21,9 +21,10 @@ project (OSAL VERSION 0.1.0)
|
|||||||
message("CMakeList.txt: Starting...")
|
message("CMakeList.txt: Starting...")
|
||||||
|
|
||||||
if (DEFINED BOARD)
|
if (DEFINED BOARD)
|
||||||
if ( (NOT (${BOARD} STREQUAL "am5718-idk")) AND (NOT (${BOARD} STREQUAL "BeagleBoneAI")))
|
if ( (NOT (${BOARD} STREQUAL "am64xx-evm")) AND (NOT (${BOARD} STREQUAL "am5718-idk")) AND (NOT (${BOARD} STREQUAL "BeagleBoneAI")))
|
||||||
message(FATAL_ERROR "BOARD ${BOARD} unsupported!\n"
|
message(FATAL_ERROR "BOARD ${BOARD} unsupported!\n"
|
||||||
"BOARD can take the following values:\n"
|
"BOARD can take the following values:\n"
|
||||||
|
" -- am64xx-evm\n"
|
||||||
" -- am5718-idk\n"
|
" -- am5718-idk\n"
|
||||||
" -- BeagleBoneAI")
|
" -- BeagleBoneAI")
|
||||||
else()
|
else()
|
||||||
@ -65,12 +66,12 @@ configure_file (
|
|||||||
${OSAL_BINARY_DIR}/src/version.h
|
${OSAL_BINARY_DIR}/src/version.h
|
||||||
)
|
)
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
# Путь к папке с библиотеками
|
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
set(INSTALL_PATH ${CMAKE_SOURCE_DIR}/../../libs)
|
set(INSTALL_PATH ${CMAKE_SOURCE_DIR}/../../libs)
|
||||||
# Путь куда будут копироваться собранная библиотека
|
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
set(INSTALL_PATH_LIB ${INSTALL_PATH}/lib)
|
set(INSTALL_PATH_LIB ${INSTALL_PATH}/lib)
|
||||||
|
|
||||||
#BOARD задается в параметрах запуска cmake, прописано в .vscode/settings.json
|
#BOARD <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> cmake, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> .vscode/settings.json
|
||||||
if (DEFINED BOARD)
|
if (DEFINED BOARD)
|
||||||
set(SITARA_DEPOT ${CMAKE_SOURCE_DIR}/../../sitara_depot)
|
set(SITARA_DEPOT ${CMAKE_SOURCE_DIR}/../../sitara_depot)
|
||||||
set(INSTALL_PATH_LIB ${INSTALL_PATH_LIB}/arm_a15/${BOARD})
|
set(INSTALL_PATH_LIB ${INSTALL_PATH_LIB}/arm_a15/${BOARD})
|
||||||
@ -80,7 +81,7 @@ else()
|
|||||||
set(INSTALL_PATH_LIB ${INSTALL_PATH_LIB}/x86_64)
|
set(INSTALL_PATH_LIB ${INSTALL_PATH_LIB}/x86_64)
|
||||||
message(STATUS "Building for x86")
|
message(STATUS "Building for x86")
|
||||||
endif()
|
endif()
|
||||||
# Путь куда будут копироваться h-файлы
|
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> h-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
set(INSTALL_PATH_INC ${INSTALL_PATH}/include)
|
set(INSTALL_PATH_INC ${INSTALL_PATH}/include)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
@ -88,9 +89,9 @@ set(INSTALL_PATH_INC ${INSTALL_PATH}/include)
|
|||||||
# Add platform-dependent targets early, so they can be configured by
|
# Add platform-dependent targets early, so they can be configured by
|
||||||
# platform
|
# platform
|
||||||
|
|
||||||
# Имя библиотеки
|
# <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
set(LIB_NAME osal)
|
set(LIB_NAME osal)
|
||||||
# Для отладочной версии в конце добавляем d: osald
|
# <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> d: osald
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL Debug)
|
if (CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||||
set(LIB_NAME ${LIB_NAME}d)
|
set(LIB_NAME ${LIB_NAME}d)
|
||||||
endif()
|
endif()
|
||||||
|
@ -78,7 +78,32 @@
|
|||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Release"
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "am64xx_Debug",
|
||||||
|
"inherits": "default",
|
||||||
|
"displayName": "am64xx Debug",
|
||||||
|
"description": "Degub build for am64xx-evm board(arm cortex-a53)",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"CMAKE_TOOLCHAIN_FILE": "${workspaceFolder}/../../sitara_depot/compile/toolchain.cmake",
|
||||||
|
"BOARD": "am64xx-evm"
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"ENV_TARGET_CROSS_COMPILE_PREFIX": "/opt/ti-processor-sdk-linux-am64xx-evm-09.02.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-oe-linux/aarch64-oe-linux-",
|
||||||
|
"ENV_TARGET_SYSTOOT_PATH": "/opt/ti-processor-sdk-linux-am64xx-evm-09.02.00.08/linux-devkit/sysroots/aarch64-oe-linux"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "am64xx_Release",
|
||||||
|
"inherits": "am64xx_Debug",
|
||||||
|
"displayName": "am64xx Release",
|
||||||
|
"description": "Release build for am64xx-evm board(arm cortex-a53)",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
"buildPresets": [
|
"buildPresets": [
|
||||||
@ -105,6 +130,14 @@
|
|||||||
{
|
{
|
||||||
"name": "BeagleBoneAI Release",
|
"name": "BeagleBoneAI Release",
|
||||||
"configurePreset": "BeagleBoneAI_Release"
|
"configurePreset": "BeagleBoneAI_Release"
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"name": "am64xx Release",
|
||||||
|
"configurePreset": "am64xx_Release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "am64xx Debug",
|
||||||
|
"configurePreset": "am64xx_Debug"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -21,9 +21,10 @@ project (PROFINET VERSION 0.2.0)
|
|||||||
message("CMakeList.txt: Starting...")
|
message("CMakeList.txt: Starting...")
|
||||||
|
|
||||||
if (DEFINED BOARD)
|
if (DEFINED BOARD)
|
||||||
if ( (NOT (${BOARD} STREQUAL "am5718-idk")) AND (NOT (${BOARD} STREQUAL "BeagleBoneAI")))
|
if ( (NOT (${BOARD} STREQUAL "am64xx-evm")) AND (NOT (${BOARD} STREQUAL "am5718-idk")) AND (NOT (${BOARD} STREQUAL "BeagleBoneAI")))
|
||||||
message(FATAL_ERROR "BOARD ${BOARD} unsupported!\n"
|
message(FATAL_ERROR "BOARD ${BOARD} unsupported!\n"
|
||||||
"BOARD can take the following values:\n"
|
"BOARD can take the following values:\n"
|
||||||
|
" -- am64xx-evm\n"
|
||||||
" -- am5718-idk\n"
|
" -- am5718-idk\n"
|
||||||
" -- BeagleBoneAI")
|
" -- BeagleBoneAI")
|
||||||
else()
|
else()
|
||||||
@ -179,12 +180,12 @@ configure_file (
|
|||||||
)
|
)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
# Путь к папке с библиотеками
|
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
set(INSTALL_PATH ${CMAKE_SOURCE_DIR}/../../libs)
|
set(INSTALL_PATH ${CMAKE_SOURCE_DIR}/../../libs)
|
||||||
# Путь куда будут копиороваться собранная библиотека
|
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
set(INSTALL_PATH_LIB ${INSTALL_PATH}/lib)
|
set(INSTALL_PATH_LIB ${INSTALL_PATH}/lib)
|
||||||
|
|
||||||
#BOARD задается в параметрах запуска cmake, прописано в .vscode/settings.json
|
#BOARD <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> cmake, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> .vscode/settings.json
|
||||||
if (DEFINED BOARD)
|
if (DEFINED BOARD)
|
||||||
set(SITARA_DEPOT ${CMAKE_SOURCE_DIR}/../../sitara_depot)
|
set(SITARA_DEPOT ${CMAKE_SOURCE_DIR}/../../sitara_depot)
|
||||||
set(INSTALL_PATH_LIB ${INSTALL_PATH_LIB}/arm_a15/${BOARD})
|
set(INSTALL_PATH_LIB ${INSTALL_PATH_LIB}/arm_a15/${BOARD})
|
||||||
@ -195,7 +196,7 @@ else()
|
|||||||
message(STATUS "Building for x86")
|
message(STATUS "Building for x86")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Путь куда будут копироваться h-файлы
|
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> h-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
set(INSTALL_PATH_INC ${INSTALL_PATH}/include)
|
set(INSTALL_PATH_INC ${INSTALL_PATH}/include)
|
||||||
|
|
||||||
set(OSAL_NAME osal)
|
set(OSAL_NAME osal)
|
||||||
@ -210,9 +211,9 @@ endif()
|
|||||||
# Add platform-dependent targets early, so they can be configured by
|
# Add platform-dependent targets early, so they can be configured by
|
||||||
# platform
|
# platform
|
||||||
|
|
||||||
# Имя библиотеки
|
# <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
set(LIB_NAME profinet)
|
set(LIB_NAME profinet)
|
||||||
# Для отладочной версии в конце добавляем d: osald
|
# <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> d: osald
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL Debug)
|
if (CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||||
set(LIB_NAME ${LIB_NAME}d)
|
set(LIB_NAME ${LIB_NAME}d)
|
||||||
endif()
|
endif()
|
||||||
|
@ -78,7 +78,31 @@
|
|||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Release"
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"name": "am64xx_Debug",
|
||||||
|
"inherits": "default",
|
||||||
|
"displayName": "am64xx Debug",
|
||||||
|
"description": "Degub build for am64xx-evm board(arm cortex-a53)",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"CMAKE_TOOLCHAIN_FILE": "${workspaceFolder}/../../sitara_depot/compile/toolchain.cmake",
|
||||||
|
"BOARD": "am64xx-evm"
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"ENV_TARGET_CROSS_COMPILE_PREFIX": "/opt/ti-processor-sdk-linux-am64xx-evm-09.02.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-oe-linux/aarch64-oe-linux-",
|
||||||
|
"ENV_TARGET_SYSTOOT_PATH": "/opt/ti-processor-sdk-linux-am64xx-evm-09.02.00.08/linux-devkit/sysroots/aarch64-oe-linux"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "am64xx_Release",
|
||||||
|
"inherits": "am64xx_Debug",
|
||||||
|
"displayName": "am64xx Release",
|
||||||
|
"description": "Release build for am64xx-evm board(arm cortex-a53)",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
"buildPresets": [
|
"buildPresets": [
|
||||||
@ -105,6 +129,14 @@
|
|||||||
{
|
{
|
||||||
"name": "BeagleBoneAI Release",
|
"name": "BeagleBoneAI Release",
|
||||||
"configurePreset": "BeagleBoneAI_Release"
|
"configurePreset": "BeagleBoneAI_Release"
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"name": "am64xx Debug",
|
||||||
|
"configurePreset": "am64xx_Debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "am64xx Release",
|
||||||
|
"configurePreset": "am64xx_Release"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -5,9 +5,10 @@ project (PROFINET_IO_DEV VERSION 0.0.1)
|
|||||||
message("CMakeList.txt: Starting...")
|
message("CMakeList.txt: Starting...")
|
||||||
|
|
||||||
if (DEFINED BOARD)
|
if (DEFINED BOARD)
|
||||||
if ( (NOT (${BOARD} STREQUAL "am5718-idk")) AND (NOT (${BOARD} STREQUAL "BeagleBoneAI")))
|
if ( (NOT (${BOARD} STREQUAL "am64xx-evm")) AND (NOT (${BOARD} STREQUAL "am5718-idk")) AND (NOT (${BOARD} STREQUAL "BeagleBoneAI")))
|
||||||
message(FATAL_ERROR "BOARD ${BOARD} unsupported!\n"
|
message(FATAL_ERROR "BOARD ${BOARD} unsupported!\n"
|
||||||
"BOARD can take the following values:\n"
|
"BOARD can take the following values:\n"
|
||||||
|
" -- am64xx-evm\n"
|
||||||
" -- am5718-idk\n"
|
" -- am5718-idk\n"
|
||||||
" -- BeagleBoneAI")
|
" -- BeagleBoneAI")
|
||||||
else()
|
else()
|
||||||
@ -39,10 +40,10 @@ if(DEFINED BOARD)
|
|||||||
include(${SITARA_DEPOT}/compile/sitara_compile_flags.cmake)
|
include(${SITARA_DEPOT}/compile/sitara_compile_flags.cmake)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# убирает предупреждения nlohman json о GCC7.1
|
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> nlohman json <EFBFBD> GCC7.1
|
||||||
add_compile_options(-Wno-psabi)
|
add_compile_options(-Wno-psabi)
|
||||||
|
|
||||||
#Если не собирается с ошибкой линкера undefined reference pthread, то добавить флаг линкера:
|
#<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> undefined reference pthread, <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||||
#add_link_options(-lrt)
|
#add_link_options(-lrt)
|
||||||
add_executable(${TARGET_NAME} ./main.cpp ${SRC_FILES})
|
add_executable(${TARGET_NAME} ./main.cpp ${SRC_FILES})
|
||||||
|
|
||||||
@ -60,13 +61,17 @@ elseif(CMAKE_BUILD_TYPE STREQUAL Release)
|
|||||||
set(LIB_LIST profinet osal ${Boost_LIBRARIES})
|
set(LIB_LIST profinet osal ${Boost_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# убирает предупреждения nlohman json о GCC7.1
|
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> nlohman json <EFBFBD> GCC7.1
|
||||||
add_compile_options(-Wno-psabi)
|
add_compile_options(-Wno-psabi)
|
||||||
|
|
||||||
set(LIB_ARCH_DIR x86_64)
|
set(LIB_ARCH_DIR x86_64)
|
||||||
|
|
||||||
if(DEFINED BOARD)
|
if(DEFINED BOARD)
|
||||||
set(LIB_ARCH_DIR arm_a15)
|
if(${BOARD} STREQUAL "am64xx-evm")
|
||||||
|
set(LIB_ARCH_DIR arm_a57)
|
||||||
|
elseif()
|
||||||
|
set(LIB_ARCH_DIR arm_a15)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(LINK_PATH ${LIBS_INSTALL_PATH}/lib/${LIB_ARCH_DIR})
|
set(LINK_PATH ${LIBS_INSTALL_PATH}/lib/${LIB_ARCH_DIR})
|
||||||
@ -77,10 +82,10 @@ endif()
|
|||||||
|
|
||||||
target_link_directories(${TARGET_NAME} PUBLIC ${LINK_PATH})
|
target_link_directories(${TARGET_NAME} PUBLIC ${LINK_PATH})
|
||||||
|
|
||||||
#Если не собирается с ошибкой линкера undefined reference pthread, то после ${Boost_LIBRARIES} добавить pthread или -lpthread:
|
#<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> undefined reference pthread, <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ${Boost_LIBRARIES} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> pthread <EFBFBD><EFBFBD><EFBFBD> -lpthread:
|
||||||
#target_link_libraries (${TARGET_NAME} PUBLIC profinet osal ${Boost_LIBRARIES} pthread)
|
#target_link_libraries (${TARGET_NAME} PUBLIC profinet osal ${Boost_LIBRARIES} pthread)
|
||||||
|
|
||||||
# Для BeagleBoneAI: версия GCC8 нужно указывать stdc++fs(библиотека <filesystem>)
|
# <EFBFBD><EFBFBD><EFBFBD> BeagleBoneAI: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> GCC8 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> stdc++fs(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <filesystem>)
|
||||||
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)
|
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)
|
||||||
set(LIB_LIST ${LIB_LIST} stdc++fs)
|
set(LIB_LIST ${LIB_LIST} stdc++fs)
|
||||||
endif()
|
endif()
|
||||||
@ -93,13 +98,13 @@ install(
|
|||||||
)
|
)
|
||||||
|
|
||||||
install(FILES
|
install(FILES
|
||||||
# Копирование заглушки скрипта установки параметров сети.
|
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||||
# Если не копировать, то в недрах pnet после fork вызовется exit и
|
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> pnet <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> fork <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> exit <EFBFBD>
|
||||||
# вызовутся деструкторы объектов, что может привести к непредвиденным последствиям.
|
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/set_network_parameters
|
${CMAKE_CURRENT_SOURCE_DIR}/set_network_parameters
|
||||||
#Копирование файла конфигурации
|
#<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/program_configure.json
|
${CMAKE_CURRENT_SOURCE_DIR}/program_configure.json
|
||||||
#Копирование тестового файла конфигурации устройства Profinet
|
#<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Profinet
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/profinet_device_configure.json
|
${CMAKE_CURRENT_SOURCE_DIR}/profinet_device_configure.json
|
||||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/bin
|
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/bin
|
||||||
)
|
)
|
@ -78,6 +78,30 @@
|
|||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Release"
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "am64xx_Debug",
|
||||||
|
"inherits": "default",
|
||||||
|
"displayName": "am64xx Debug",
|
||||||
|
"description": "Degub build for am64xx-evm board(arm cortex-a53)",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"CMAKE_TOOLCHAIN_FILE": "${workspaceFolder}/../sitara_depot/compile/toolchain.cmake",
|
||||||
|
"BOARD": "am64xx-evm"
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"ENV_TARGET_CROSS_COMPILE_PREFIX": "/opt/ti-processor-sdk-linux-am64xx-evm-09.02.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-oe-linux/aarch64-oe-linux-",
|
||||||
|
"ENV_TARGET_SYSTOOT_PATH": "/opt/ti-processor-sdk-linux-am64xx-evm-09.02.00.08/linux-devkit/sysroots/aarch64-oe-linux"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "am64xx_Release",
|
||||||
|
"inherits": "am64xx_Debug",
|
||||||
|
"displayName": "am64xx Release",
|
||||||
|
"description": "Release build for am64xx-evm board(arm cortex-a53)",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
@ -105,6 +129,14 @@
|
|||||||
{
|
{
|
||||||
"name": "BeagleBoneAI Release",
|
"name": "BeagleBoneAI Release",
|
||||||
"configurePreset": "BeagleBoneAI_Release"
|
"configurePreset": "BeagleBoneAI_Release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "am64xx Release",
|
||||||
|
"configurePreset": "am64xx_Release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "am64xx Debug",
|
||||||
|
"configurePreset": "am64xx_Debug"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user