From a7c7dc682f10cda879af25cff24bae81dd8686f6 Mon Sep 17 00:00:00 2001 From: Vadim Sychev Date: Mon, 19 Dec 2022 13:06:51 +0300 Subject: [PATCH] =?UTF-8?q?dev:=20=D0=90=D0=B2=D1=82=D0=BE=D0=BC=D0=B0?= =?UTF-8?q?=D1=82=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D1=8F=20=D1=81=D0=B1=D0=BE?= =?UTF-8?q?=D1=80=D0=BA=D0=B8=20=D0=BF=D0=BE=D0=B4=20=D1=80=D0=B0=D0=B7?= =?UTF-8?q?=D0=BD=D1=8B=D0=B5=20=D0=BF=D0=BB=D0=B0=D1=82=D1=84=D0=BE=D1=80?= =?UTF-8?q?=D0=BC=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- profinet_stack/osal/.vscode/settings.json | 5 +- profinet_stack/osal/CMakeLists.txt | 9 +- profinet_stack/osal/CMakePresets.json | 110 +++++++++++++++++++++ profinet_stack/p-net/.vscode/settings.json | 5 +- profinet_stack/p-net/CMakeLists.txt | 9 +- profinet_stack/p-net/CMakePresets.json | 110 +++++++++++++++++++++ 6 files changed, 228 insertions(+), 20 deletions(-) create mode 100644 profinet_stack/osal/CMakePresets.json create mode 100644 profinet_stack/p-net/CMakePresets.json diff --git a/profinet_stack/osal/.vscode/settings.json b/profinet_stack/osal/.vscode/settings.json index 0fdb918..e9d49bb 100644 --- a/profinet_stack/osal/.vscode/settings.json +++ b/profinet_stack/osal/.vscode/settings.json @@ -1,8 +1,5 @@ { - "cmake.configureArgs": [ - "-DBOARD=am5718-idk", - "-DCMAKE_TOOLCHAIN_FILE=${workspaceFolder}/../../sitara_depot/compile/toolchain_am571x_idk.cmake" - ], + "cmake.useCMakePresets": "always", "files.associations": { "typeinfo": "c", "cctype": "cpp", diff --git a/profinet_stack/osal/CMakeLists.txt b/profinet_stack/osal/CMakeLists.txt index 53c9cff..9b0bce4 100644 --- a/profinet_stack/osal/CMakeLists.txt +++ b/profinet_stack/osal/CMakeLists.txt @@ -18,12 +18,9 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/tools") project (OSAL VERSION 0.1.0) -if (NOT DEFINED BOARD) - message(FATAL_ERROR "Variable BOARD not defined!" - "Note: BOARD can take the following values:\n" - " -- am5718-idk\n" - " -- BeagleBoneAI") -else() +message("CMakeList.txt: Starting...") + +if (DEFINED BOARD) if ( (NOT (${BOARD} STREQUAL "am5718-idk")) AND (NOT (${BOARD} STREQUAL "BeagleBoneAI"))) message(FATAL_ERROR "BOARD ${BOARD} unsupported!\n" "BOARD can take the following values:\n" diff --git a/profinet_stack/osal/CMakePresets.json b/profinet_stack/osal/CMakePresets.json new file mode 100644 index 0000000..763c873 --- /dev/null +++ b/profinet_stack/osal/CMakePresets.json @@ -0,0 +1,110 @@ +{ + "version": 3, + "configurePresets": [ + { + "name": "default", + "displayName": "default", + "description": "Default build using Ninja generator", + "generator": "Ninja", + "binaryDir": "${sourceDir}/out/build/${presetName}", + "cacheVariables": { + "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}" + } + }, + { + "name": "x86_64_Debug", + "inherits": "default", + "displayName": "x86_64 Debug", + "description": "Degub build for x86_64", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_C_COMPILER": "gcc", + "CMAKE_CXX_COMPILER": "g++" + } + }, + { + "name": "x86_64_Release", + "inherits": "x86_64_Debug", + "displayName": "x86_64 Release", + "description": "Release build for x86_64", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "am571x_idk_Debug", + "inherits": "default", + "displayName": "am571x-idk Debug", + "description": "Degub build for AM571x-IDK board(arm cortex-a15)", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_TOOLCHAIN_FILE": "${workspaceFolder}/../../sitara_depot/compile/toolchain.cmake", + "BOARD": "am5718-idk" + }, + "environment": { + "ENV_TARGET_CROSS_COMPILE_PREFIX": "/home/svad/ti/ti-processor-sdk-linux-am57xx-evm-08_02_01_00/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-none-linux-gnueabihf-", + "ENV_TARGET_SYSTOOT_PATH": "/home/svad/ti/ti-processor-sdk-linux-am57xx-evm-08_02_01_00/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi" + } + }, + { + "name": "am571x_idk_Release", + "inherits": "am571x_idk_Debug", + "displayName": "am571x-idk Release", + "description": "Release build for AM571x-IDK board(arm cortex-a15)", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "BeagleBoneAI_Debug", + "inherits": "default", + "displayName": "BeagleBoneAI Debug", + "description": "Degub build for BeagleBoneAI board(arm cortex-a15)", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_TOOLCHAIN_FILE": "${workspaceFolder}/../../sitara_depot/compile/toolchain.cmake", + "BOARD": "BeagleBoneAI" + }, + "environment": { + "ENV_TARGET_CROSS_COMPILE_PREFIX": "/home/svad/ti/ti-processor-sdk-linux-am57xx-evm-08_02_01_00/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-none-linux-gnueabihf-", + "ENV_TARGET_SYSTOOT_PATH": "/home/svad/armdev/beagle_board/sysroot" + } + }, + { + "name": "BeagleBoneAI_Release", + "inherits": "BeagleBoneAI_Debug", + "displayName": "BeagleBoneAI Release", + "description": "Release build for BeagleBoneAI board(arm cortex-a15)", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + } + ], + + "buildPresets": [ + { + "name": "x86_64 Debug", + "configurePreset": "x86_64_Debug" + }, + { + "name": "x86_64 Release", + "configurePreset": "x86_64_Release" + }, + { + "name": "am571x-idk Debug", + "configurePreset": "am571x_idk_Debug" + }, + { + "name": "am571x-idk Release", + "configurePreset": "am571x_idk_Release" + }, + { + "name": "BeagleBoneAI Debug", + "configurePreset": "BeagleBoneAI_Debug" + }, + { + "name": "BeagleBoneAI Release", + "configurePreset": "BeagleBoneAI_Release" + } + ] +} \ No newline at end of file diff --git a/profinet_stack/p-net/.vscode/settings.json b/profinet_stack/p-net/.vscode/settings.json index 25755e9..e9d49bb 100644 --- a/profinet_stack/p-net/.vscode/settings.json +++ b/profinet_stack/p-net/.vscode/settings.json @@ -1,8 +1,5 @@ { - "cmake.configureArgs": [ - "-DBOARD=am5718-idk", - "-DCMAKE_TOOLCHAIN_FILE=${workspaceFolder}/../../sitara_depot/compile/toolchain_am5718_idk.cmake" - ], + "cmake.useCMakePresets": "always", "files.associations": { "typeinfo": "c", "cctype": "cpp", diff --git a/profinet_stack/p-net/CMakeLists.txt b/profinet_stack/p-net/CMakeLists.txt index 3fe0cf5..d9c35bd 100644 --- a/profinet_stack/p-net/CMakeLists.txt +++ b/profinet_stack/p-net/CMakeLists.txt @@ -18,12 +18,9 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/tools") project (PROFINET VERSION 0.2.0) -if (NOT DEFINED BOARD) - message(FATAL_ERROR "Variable BOARD not defined!" - "Note: BOARD can take the following values:\n" - " -- am5718-idk\n" - " -- BeagleBoneAI") -else() +message("CMakeList.txt: Starting...") + +if (DEFINED BOARD) if ( (NOT (${BOARD} STREQUAL "am5718-idk")) AND (NOT (${BOARD} STREQUAL "BeagleBoneAI"))) message(FATAL_ERROR "BOARD ${BOARD} unsupported!\n" "BOARD can take the following values:\n" diff --git a/profinet_stack/p-net/CMakePresets.json b/profinet_stack/p-net/CMakePresets.json new file mode 100644 index 0000000..763c873 --- /dev/null +++ b/profinet_stack/p-net/CMakePresets.json @@ -0,0 +1,110 @@ +{ + "version": 3, + "configurePresets": [ + { + "name": "default", + "displayName": "default", + "description": "Default build using Ninja generator", + "generator": "Ninja", + "binaryDir": "${sourceDir}/out/build/${presetName}", + "cacheVariables": { + "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}" + } + }, + { + "name": "x86_64_Debug", + "inherits": "default", + "displayName": "x86_64 Debug", + "description": "Degub build for x86_64", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_C_COMPILER": "gcc", + "CMAKE_CXX_COMPILER": "g++" + } + }, + { + "name": "x86_64_Release", + "inherits": "x86_64_Debug", + "displayName": "x86_64 Release", + "description": "Release build for x86_64", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "am571x_idk_Debug", + "inherits": "default", + "displayName": "am571x-idk Debug", + "description": "Degub build for AM571x-IDK board(arm cortex-a15)", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_TOOLCHAIN_FILE": "${workspaceFolder}/../../sitara_depot/compile/toolchain.cmake", + "BOARD": "am5718-idk" + }, + "environment": { + "ENV_TARGET_CROSS_COMPILE_PREFIX": "/home/svad/ti/ti-processor-sdk-linux-am57xx-evm-08_02_01_00/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-none-linux-gnueabihf-", + "ENV_TARGET_SYSTOOT_PATH": "/home/svad/ti/ti-processor-sdk-linux-am57xx-evm-08_02_01_00/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi" + } + }, + { + "name": "am571x_idk_Release", + "inherits": "am571x_idk_Debug", + "displayName": "am571x-idk Release", + "description": "Release build for AM571x-IDK board(arm cortex-a15)", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "BeagleBoneAI_Debug", + "inherits": "default", + "displayName": "BeagleBoneAI Debug", + "description": "Degub build for BeagleBoneAI board(arm cortex-a15)", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_TOOLCHAIN_FILE": "${workspaceFolder}/../../sitara_depot/compile/toolchain.cmake", + "BOARD": "BeagleBoneAI" + }, + "environment": { + "ENV_TARGET_CROSS_COMPILE_PREFIX": "/home/svad/ti/ti-processor-sdk-linux-am57xx-evm-08_02_01_00/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-none-linux-gnueabihf-", + "ENV_TARGET_SYSTOOT_PATH": "/home/svad/armdev/beagle_board/sysroot" + } + }, + { + "name": "BeagleBoneAI_Release", + "inherits": "BeagleBoneAI_Debug", + "displayName": "BeagleBoneAI Release", + "description": "Release build for BeagleBoneAI board(arm cortex-a15)", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + } + ], + + "buildPresets": [ + { + "name": "x86_64 Debug", + "configurePreset": "x86_64_Debug" + }, + { + "name": "x86_64 Release", + "configurePreset": "x86_64_Release" + }, + { + "name": "am571x-idk Debug", + "configurePreset": "am571x_idk_Debug" + }, + { + "name": "am571x-idk Release", + "configurePreset": "am571x_idk_Release" + }, + { + "name": "BeagleBoneAI Debug", + "configurePreset": "BeagleBoneAI_Debug" + }, + { + "name": "BeagleBoneAI Release", + "configurePreset": "BeagleBoneAI_Release" + } + ] +} \ No newline at end of file