forked from qt-creator/qt-creator
McuSupport: Enable os-specific executable version detection
Currently version detection fails in either Linux or Windows based on
the content of versionDetection.filePattern in the json kit file.
This change enables os-specific filePattern fields:
"versionDetection": {
"filePattern": {
"windows": "bin/arm-none-eabi-g++.exe",
"linux": "bin/arm-none-eabi-g++"
}
"executableArgs": "--version",
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
}
Simply appending the binary extension with withExecutableSuffix()
is less portable and does not reflect the validationPath field.
For McuPackageDirectoryEntriesVersionDetector and
McuPackageXmlVersionDetector to work correctly, they rely on
filePattern not having os-specific fields.
Also make getOsSpecificValue and parseVersionDetection static.
Change-Id: Ieacf376126043d732eeb5d5a2f4125963022ae76
Reviewed-by: Sivert Krøvel <sivert.krovel@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -608,19 +608,7 @@ static FilePaths targetDescriptionFiles(const FilePath &dir)
|
|||||||
return kitsPath(dir).dirEntries(Utils::FileFilter({"*.json"}, QDir::Files));
|
return kitsPath(dir).dirEntries(Utils::FileFilter({"*.json"}, QDir::Files));
|
||||||
}
|
}
|
||||||
|
|
||||||
VersionDetection parseVersionDetection(const QJsonObject &packageEntry)
|
static QString getOsSpecificValue(const QJsonValue &entry)
|
||||||
{
|
|
||||||
const QJsonObject versioning = packageEntry.value("versionDetection").toObject();
|
|
||||||
return {
|
|
||||||
versioning["regex"].toString(),
|
|
||||||
versioning["filePattern"].toString(),
|
|
||||||
versioning["executableArgs"].toString(),
|
|
||||||
versioning["xmlElement"].toString(),
|
|
||||||
versioning["xmlAttribute"].toString(),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
QString getOsSpecificValue(const QJsonValue &entry)
|
|
||||||
{
|
{
|
||||||
if (entry.isObject()) {
|
if (entry.isObject()) {
|
||||||
//The json entry has os-specific values
|
//The json entry has os-specific values
|
||||||
@@ -630,6 +618,19 @@ QString getOsSpecificValue(const QJsonValue &entry)
|
|||||||
return entry.toString();
|
return entry.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static VersionDetection parseVersionDetection(const QJsonObject &packageEntry)
|
||||||
|
{
|
||||||
|
const QJsonObject versioning = packageEntry.value("versionDetection").toObject();
|
||||||
|
return {
|
||||||
|
versioning["regex"].toString(),
|
||||||
|
getOsSpecificValue(versioning["filePattern"]),
|
||||||
|
versioning["executableArgs"].toString(),
|
||||||
|
versioning["xmlElement"].toString(),
|
||||||
|
versioning["xmlAttribute"].toString(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static PackageDescription parsePackage(const QJsonObject &cmakeEntry)
|
static PackageDescription parsePackage(const QJsonObject &cmakeEntry)
|
||||||
{
|
{
|
||||||
const QVariantList versionsVariantList = cmakeEntry["versions"].toArray().toVariantList();
|
const QVariantList versionsVariantList = cmakeEntry["versions"].toArray().toVariantList();
|
||||||
|
|||||||
@@ -43,7 +43,10 @@ constexpr auto armgcc_ek_ra6m3g_baremetal_json = R"(
|
|||||||
"type": "path",
|
"type": "path",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/arm-none-eabi-g++",
|
"filePattern": {
|
||||||
|
"windows": "bin/arm-none-eabi-g++.exe",
|
||||||
|
"linux": "bin/arm-none-eabi-g++"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -43,7 +43,10 @@ constexpr auto armgcc_ek_ra6m3g_freertos_json = R"(
|
|||||||
"type": "path",
|
"type": "path",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/arm-none-eabi-g++",
|
"filePattern": {
|
||||||
|
"windows": "bin/arm-none-eabi-g++.exe",
|
||||||
|
"linux": "bin/arm-none-eabi-g++"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -28,7 +28,10 @@ constexpr auto armgcc_example_baremetal_json = R"(
|
|||||||
"type": "path",
|
"type": "path",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/arm-none-eabi-g++",
|
"filePattern": {
|
||||||
|
"windows": "bin/arm-none-eabi-g++.exe",
|
||||||
|
"linux": "bin/arm-none-eabi-g++"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -47,7 +47,10 @@ constexpr auto armgcc_mimxrt1050_evk_baremetal_json = R"(
|
|||||||
"type": "path",
|
"type": "path",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/arm-none-eabi-g++",
|
"filePattern": {
|
||||||
|
"windows": "bin/arm-none-eabi-g++.exe",
|
||||||
|
"linux": "bin/arm-none-eabi-g++"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -47,7 +47,10 @@ constexpr auto armgcc_mimxrt1050_evk_freertos_json = R"(
|
|||||||
"type": "path",
|
"type": "path",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/arm-none-eabi-g++",
|
"filePattern": {
|
||||||
|
"windows": "bin/arm-none-eabi-g++.exe",
|
||||||
|
"linux": "bin/arm-none-eabi-g++"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -47,7 +47,10 @@ constexpr auto armgcc_mimxrt1060_evk_baremetal_json = R"(
|
|||||||
"type": "path",
|
"type": "path",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/arm-none-eabi-g++",
|
"filePattern": {
|
||||||
|
"windows": "bin/arm-none-eabi-g++.exe",
|
||||||
|
"linux": "bin/arm-none-eabi-g++"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -47,7 +47,10 @@ constexpr auto armgcc_mimxrt1064_evk_baremetal_json = R"(
|
|||||||
"type": "path",
|
"type": "path",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/arm-none-eabi-g++",
|
"filePattern": {
|
||||||
|
"windows": "bin/arm-none-eabi-g++.exe",
|
||||||
|
"linux": "bin/arm-none-eabi-g++"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -47,7 +47,10 @@ constexpr auto armgcc_mimxrt1064_evk_freertos_json = R"(
|
|||||||
"type": "path",
|
"type": "path",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/arm-none-eabi-g++",
|
"filePattern": {
|
||||||
|
"windows": "bin/arm-none-eabi-g++.exe",
|
||||||
|
"linux": "bin/arm-none-eabi-g++"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -47,7 +47,10 @@ constexpr auto armgcc_mimxrt1170_evk_freertos_json = R"(
|
|||||||
"type": "path",
|
"type": "path",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/arm-none-eabi-g++",
|
"filePattern": {
|
||||||
|
"windows": "bin/arm-none-eabi-g++.exe",
|
||||||
|
"linux": "bin/arm-none-eabi-g++"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,7 +46,10 @@ constexpr auto armgcc_stm32f469i_discovery_baremetal_json = R"(
|
|||||||
"type": "path",
|
"type": "path",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/arm-none-eabi-g++",
|
"filePattern": {
|
||||||
|
"windows": "bin/arm-none-eabi-g++.exe",
|
||||||
|
"linux": "bin/arm-none-eabi-g++"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,7 +46,10 @@ constexpr auto armgcc_stm32f769i_discovery_baremetal_json = R"(
|
|||||||
"type": "path",
|
"type": "path",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/arm-none-eabi-g++",
|
"filePattern": {
|
||||||
|
"windows": "bin/arm-none-eabi-g++.exe",
|
||||||
|
"linux": "bin/arm-none-eabi-g++"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,7 +46,10 @@ constexpr auto armgcc_stm32f769i_discovery_freertos_json = R"(
|
|||||||
"type": "path",
|
"type": "path",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/arm-none-eabi-g++",
|
"filePattern": {
|
||||||
|
"windows": "bin/arm-none-eabi-g++.exe",
|
||||||
|
"linux": "bin/arm-none-eabi-g++"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,7 +46,10 @@ constexpr auto armgcc_stm32h750b_discovery_baremetal_json = R"(
|
|||||||
"type": "path",
|
"type": "path",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/arm-none-eabi-g++",
|
"filePattern": {
|
||||||
|
"windows": "bin/arm-none-eabi-g++.exe",
|
||||||
|
"linux": "bin/arm-none-eabi-g++"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
"regex": "\\b(\\d+\\.\\d+\\.\\d+)\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -47,7 +47,10 @@ constexpr auto ghs_rh850_d1m1a_baremetal_json = R"(
|
|||||||
"type": "path",
|
"type": "path",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "gversion",
|
"filePattern": {
|
||||||
|
"windows": "gversion.exe",
|
||||||
|
"linux": "gversion"
|
||||||
|
},
|
||||||
"executableArgs": "-help",
|
"executableArgs": "-help",
|
||||||
"regex": "\\bv(\\d+\\.\\d+\\.\\d+)\\b"
|
"regex": "\\bv(\\d+\\.\\d+\\.\\d+)\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -42,7 +42,10 @@ constexpr auto iar_ek_ra6m3g_baremetal_json = R"(
|
|||||||
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/iccarm",
|
"filePattern": {
|
||||||
|
"windows": "bin/iccarm.exe",
|
||||||
|
"linux": "bin/iccarm"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -42,7 +42,10 @@ constexpr auto iar_ek_ra6m3g_freertos_json = R"(
|
|||||||
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/iccarm",
|
"filePattern": {
|
||||||
|
"windows": "bin/iccarm.exe",
|
||||||
|
"linux": "bin/iccarm"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -27,7 +27,10 @@ constexpr auto iar_example_baremetal_json = R"(
|
|||||||
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/iccarm",
|
"filePattern": {
|
||||||
|
"windows": "bin/iccarm.exe",
|
||||||
|
"linux": "bin/iccarm"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,7 +46,10 @@ constexpr auto iar_mimxrt1050_evk_baremetal_json = R"(
|
|||||||
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/iccarm",
|
"filePattern": {
|
||||||
|
"windows": "bin/iccarm.exe",
|
||||||
|
"linux": "bin/iccarm"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,7 +46,10 @@ constexpr auto iar_mimxrt1050_evk_freertos_json = R"(
|
|||||||
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/iccarm",
|
"filePattern": {
|
||||||
|
"windows": "bin/iccarm.exe",
|
||||||
|
"linux": "bin/iccarm"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,7 +46,10 @@ constexpr auto iar_mimxrt1060_evk_baremetal_json = R"(
|
|||||||
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/iccarm",
|
"filePattern": {
|
||||||
|
"windows": "bin/iccarm.exe",
|
||||||
|
"linux": "bin/iccarm"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,7 +46,10 @@ constexpr auto iar_mimxrt1064_evk_baremetal_json = R"(
|
|||||||
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/iccarm",
|
"filePattern": {
|
||||||
|
"windows": "bin/iccarm.exe",
|
||||||
|
"linux": "bin/iccarm"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,7 +46,10 @@ constexpr auto iar_mimxrt1064_evk_freertos_json = R"(
|
|||||||
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/iccarm",
|
"filePattern": {
|
||||||
|
"windows": "bin/iccarm.exe",
|
||||||
|
"linux": "bin/iccarm"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,7 +46,10 @@ constexpr auto iar_mimxrt1170_evk_freertos_json = R"(
|
|||||||
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/iccarm",
|
"filePattern": {
|
||||||
|
"windows": "bin/iccarm.exe",
|
||||||
|
"linux": "bin/iccarm"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -45,7 +45,10 @@ constexpr auto iar_stm32f469i_discovery_baremetal_json = R"(
|
|||||||
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/iccarm",
|
"filePattern": {
|
||||||
|
"windows": "bin/iccarm.exe",
|
||||||
|
"linux": "bin/iccarm"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -45,7 +45,10 @@ constexpr auto iar_stm32f769i_discovery_baremetal_json = R"(
|
|||||||
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/iccarm",
|
"filePattern": {
|
||||||
|
"windows": "bin/iccarm.exe",
|
||||||
|
"linux": "bin/iccarm"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -45,7 +45,10 @@ constexpr auto iar_stm32f769i_discovery_freertos_json = R"(
|
|||||||
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/iccarm",
|
"filePattern": {
|
||||||
|
"windows": "bin/iccarm.exe",
|
||||||
|
"linux": "bin/iccarm"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -45,7 +45,10 @@ constexpr auto iar_stm32h750b_discovery_baremetal_json = R"(
|
|||||||
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/iccarm",
|
"filePattern": {
|
||||||
|
"windows": "bin/iccarm.exe",
|
||||||
|
"linux": "bin/iccarm"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -38,7 +38,10 @@ constexpr auto iar_tviic2d6m_baremetal_json = R"(
|
|||||||
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
"cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"versionDetection": {
|
"versionDetection": {
|
||||||
"filePattern": "bin/iccarm",
|
"filePattern": {
|
||||||
|
"windows": "bin/iccarm.exe",
|
||||||
|
"linux": "bin/iccarm"
|
||||||
|
},
|
||||||
"executableArgs": "--version",
|
"executableArgs": "--version",
|
||||||
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
"regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ const char armGccDir[]{"/opt/armgcc"};
|
|||||||
const char armGccDirectorySetting[]{"GNUArmEmbeddedToolchain"};
|
const char armGccDirectorySetting[]{"GNUArmEmbeddedToolchain"};
|
||||||
const char armGccEnvVar[]{"ARMGCC_DIR"};
|
const char armGccEnvVar[]{"ARMGCC_DIR"};
|
||||||
const char armGccLabel[]{"GNU Arm Embedded Toolchain"};
|
const char armGccLabel[]{"GNU Arm Embedded Toolchain"};
|
||||||
const char armGccSuffix[]{"bin/arm-none-eabi-g++"};
|
const QString armGccSuffix{HostOsInfo::withExecutableSuffix("bin/arm-none-eabi-g++")};
|
||||||
const char armGccToolchainFilePath[]{"/opt/qtformcu/2.2/lib/cmake/Qul/toolchain/armgcc.cmake"};
|
const char armGccToolchainFilePath[]{"/opt/qtformcu/2.2/lib/cmake/Qul/toolchain/armgcc.cmake"};
|
||||||
const char armGccToolchainFileUnexpandedPath[]{"%{Qul_ROOT}/lib/cmake/Qul/toolchain/armgcc.cmake"};
|
const char armGccToolchainFileUnexpandedPath[]{"%{Qul_ROOT}/lib/cmake/Qul/toolchain/armgcc.cmake"};
|
||||||
const char armGccVersion[]{"10.3.1"};
|
const char armGccVersion[]{"10.3.1"};
|
||||||
@@ -1245,7 +1245,7 @@ void McuSupportTest::test_passExecutableVersionDetectorToToolchainPackage_data()
|
|||||||
<< armGccVersionDetectionRegex;
|
<< armGccVersionDetectionRegex;
|
||||||
|
|
||||||
QTest::newRow("iar_stm32f469i_discovery_baremetal_json")
|
QTest::newRow("iar_stm32f469i_discovery_baremetal_json")
|
||||||
<< iar_stm32f469i_discovery_baremetal_json << QString{"bin/iccarm"} << version
|
<< iar_stm32f469i_discovery_baremetal_json << HostOsInfo::withExecutableSuffix("bin/iccarm") << version
|
||||||
<< iarVersionDetectionRegex;
|
<< iarVersionDetectionRegex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user