forked from qt-creator/qt-creator
McuSupport: Extract target description to separate file
Change-Id: Ia79d64b5b5a752bdacb404b49e8ac78c2d32ee4e Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -15,6 +15,7 @@ add_qtc_plugin(McuSupport
|
|||||||
mcusupportrunconfiguration.cpp mcusupportrunconfiguration.h
|
mcusupportrunconfiguration.cpp mcusupportrunconfiguration.h
|
||||||
mcusupportversiondetection.cpp mcusupportversiondetection.h
|
mcusupportversiondetection.cpp mcusupportversiondetection.h
|
||||||
mcusupportcmakemapper.cpp mcusupportcmakemapper.h
|
mcusupportcmakemapper.cpp mcusupportcmakemapper.h
|
||||||
|
mcutargetdescription.h
|
||||||
)
|
)
|
||||||
|
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
|
@@ -37,6 +37,7 @@ QtcPlugin {
|
|||||||
"mcusupportversiondetection.h",
|
"mcusupportversiondetection.h",
|
||||||
"mcusupportcmakemapper.h",
|
"mcusupportcmakemapper.h",
|
||||||
"mcusupportcmakemapper.cpp",
|
"mcusupportcmakemapper.cpp",
|
||||||
|
"mcutargetdescription.h",
|
||||||
"mcukitinformation.cpp",
|
"mcukitinformation.cpp",
|
||||||
"mcukitinformation.h"
|
"mcukitinformation.h"
|
||||||
]
|
]
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
#include "mcusupportoptions.h"
|
#include "mcusupportoptions.h"
|
||||||
#include "mcusupportsdk.h"
|
#include "mcusupportsdk.h"
|
||||||
#include "mcusupportversiondetection.h"
|
#include "mcusupportversiondetection.h"
|
||||||
|
#include "mcutargetdescription.h"
|
||||||
|
|
||||||
#include <baremetal/baremetalconstants.h>
|
#include <baremetal/baremetalconstants.h>
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
@@ -335,7 +336,6 @@ static McuPackage *createRenesasProgrammerPackage()
|
|||||||
envVar);
|
envVar);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static McuPackageVersionDetector *generatePackageVersionDetector(QString envVar)
|
static McuPackageVersionDetector *generatePackageVersionDetector(QString envVar)
|
||||||
{
|
{
|
||||||
if (envVar.startsWith("EVK"))
|
if (envVar.startsWith("EVK"))
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
namespace McuSupport {
|
namespace McuSupport {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
#define MAX_COMPATIBILITY_VERSION 1
|
constexpr int MAX_COMPATIBILITY_VERSION {1};
|
||||||
|
|
||||||
class McuSdkRepository;
|
class McuSdkRepository;
|
||||||
class McuAbstractPackage;
|
class McuAbstractPackage;
|
||||||
@@ -42,38 +42,7 @@ class McuTarget;
|
|||||||
|
|
||||||
namespace Sdk {
|
namespace Sdk {
|
||||||
|
|
||||||
struct McuTargetDescription
|
struct McuTargetDescription;
|
||||||
{
|
|
||||||
enum class TargetType { MCU, Desktop };
|
|
||||||
|
|
||||||
QString qulVersion;
|
|
||||||
QString compatVersion;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
QString id;
|
|
||||||
QString name;
|
|
||||||
QString vendor;
|
|
||||||
QVector<int> colorDepths;
|
|
||||||
TargetType type;
|
|
||||||
} platform;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
QString id;
|
|
||||||
QStringList versions;
|
|
||||||
} toolchain;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
QString name;
|
|
||||||
QString defaultPath;
|
|
||||||
QString envVar;
|
|
||||||
QStringList versions;
|
|
||||||
} boardSdk;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
QString envVar;
|
|
||||||
QString boardSdkSubDir;
|
|
||||||
} freeRTOS;
|
|
||||||
};
|
|
||||||
|
|
||||||
McuPackage *createQtForMCUsPackage();
|
McuPackage *createQtForMCUsPackage();
|
||||||
|
|
||||||
|
67
src/plugins/mcusupport/mcutargetdescription.h
Normal file
67
src/plugins/mcusupport/mcutargetdescription.h
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2022 The Qt Company Ltd.
|
||||||
|
** Contact: https://www.qt.io/licensing/
|
||||||
|
**
|
||||||
|
** This file is part of Qt Creator.
|
||||||
|
**
|
||||||
|
** 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.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
#include <QStringList>
|
||||||
|
#include <QVector>
|
||||||
|
|
||||||
|
namespace McuSupport::Internal::Sdk {
|
||||||
|
|
||||||
|
struct McuTargetDescription
|
||||||
|
{
|
||||||
|
enum class TargetType { MCU, Desktop };
|
||||||
|
|
||||||
|
QString qulVersion;
|
||||||
|
QString compatVersion;
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
QString id;
|
||||||
|
QString name;
|
||||||
|
QString vendor;
|
||||||
|
QVector<int> colorDepths;
|
||||||
|
TargetType type;
|
||||||
|
} platform;
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
QString id;
|
||||||
|
QStringList versions;
|
||||||
|
} toolchain;
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
QString name;
|
||||||
|
QString defaultPath;
|
||||||
|
QString envVar;
|
||||||
|
QStringList versions;
|
||||||
|
} boardSdk;
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
QString envVar;
|
||||||
|
QString boardSdkSubDir;
|
||||||
|
} freeRTOS;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace McuSupport::Internal::Sdk
|
@@ -23,6 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include "mcutargetdescription.h"
|
||||||
#include "nxp_1064_json.h"
|
#include "nxp_1064_json.h"
|
||||||
#include "unittest.h"
|
#include "unittest.h"
|
||||||
#include "utils/filepath.h"
|
#include "utils/filepath.h"
|
||||||
|
Reference in New Issue
Block a user