/**************************************************************************** ** ** Copyright (C) 2024 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the release tools of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3 as published by the Free Software ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will ** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** ****************************************************************************/ function Component() { } Component.prototype.createOperations = function() { component.createOperations(); var hostSysroot = "x86_64-w64-mingw32"; var targetSysroot = "cortexa55-poky-linux"; var machine = "imx8mp-lpddr4-evk"; var machineDescription = "IMX93-EVK-LINUX (ARMGCC)"; var targetTriplet = "aarch64-poky-linux"; var abi = "arm-linux-poky-elf-64bit"; var toolchainPath = installer.value("TargetDir") + "/" + "QtMCUs/2.9.1/lib/cmake/Qul/toolchain/boot2qt.cmake" var path = installer.value("TargetDir") + "/" + "6.6.3" + "/Boot2Qt/" + "imx93-11x11-lpddr4x-evk" + "/toolchain"; var toolchainId = "ProjectExplorer.ToolChain.Gcc:" + component.name; var executableExt = ""; if (systemInfo.kernelType === "winnt") { executableExt = ".exe"; toolchainId = "ProjectExplorer.ToolChain.Mingw:" + component.name; } component.addOperation("Execute", "{0,2}", ["@SDKToolBinary@", "addAbiFlavor", "--flavor", "poky", "--oses", "linux"]); component.addOperation("Execute", ["@SDKToolBinary@", "addTC", "--id", toolchainId + ".gcc", "--name", "GCC (MCU 2.9.1 " + machineDescription + ")", "--path", path + "/sysroots/" + hostSysroot + "/usr/bin/" + targetTriplet + "/" + targetTriplet + "-gcc" + executableExt, "--abi", abi, "--language", "C", "UNDOEXECUTE", "{0,2}", "@SDKToolBinary@", "rmTC", "--id", toolchainId + ".gcc"]); component.addOperation("Execute", ["@SDKToolBinary@", "addTC", "--id", toolchainId + ".g++", "--name", "G++ (MCU 2.9.1 " + machineDescription + ")", "--path", path + "/sysroots/" + hostSysroot + "/usr/bin/" + targetTriplet + "/" + targetTriplet + "-g++" + executableExt, "--abi", abi, "--language", "Cxx", "UNDOEXECUTE", "{0,2}", "@SDKToolBinary@", "rmTC", "--id", toolchainId + ".g++"]); component.addOperation("Execute", ["@SDKToolBinary@", "addCMake", "--id", component.name, "--name", "CMake (MCU 2.9.1 " + machineDescription + ")", "--path", path + "/sysroots/" + hostSysroot + "/usr/bin/cmake" + executableExt, "UNDOEXECUTE", "{0,2}", "@SDKToolBinary@", "rmCMake", "--id", component.name]); component.addOperation("Execute", ["@SDKToolBinary@", "addKit", "--id", component.name, "--name", "Qt for MCU 2.9.1 " + machineDescription, "--mkspec", "linux-oe-g++", "--qt", "embedded.b2qt.663.imx9311x11lpddr4xevk.toolchain", "--debuggerid", "embedded.b2qt.663.imx9311x11lpddr4xevk.toolchain", "--sysroot", path + "/sysroots/" + targetSysroot, "--devicetype", "QdbLinuxOsType", "--Ctoolchain", toolchainId + ".gcc", "--Cxxtoolchain", toolchainId + ".g++", "--cmake", component.name, "--cmake-generator", "Ninja", "--cmake-config", "CMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx}", "--cmake-config", "CMAKE_C_COMPILER:STRING=%{Compiler:Executable:C}", "--cmake-config", "CMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}", "--cmake-config", "QT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}", "--cmake-config", "QT_TOOLCHAIN_INCLUDE_FILE:FILEPATH=" + toolchainPath, "--cmake-config", "QUL_PLATFORM:STRING=imx93-evk-linux", "--cmake-config", "CMAKE_TOOLCHAIN_FILE:FILEPATH=" + path + "/sysroots/" + hostSysroot + "/usr/lib/cmake/Qt6/qt.toolchain.cmake", "--cmake-config", "CMAKE_MAKE_PROGRAM:FILEPATH=" + path + "/sysroots/" + hostSysroot + "/usr/bin/ninja" + executableExt, "UNDOEXECUTE", "{0,2}", "@SDKToolBinary@", "rmKit", "--id", component.name]); }