forked from qt-creator/qt-creator
McuSupport: Read *_FREERTOS_DIR values from .json
Instead of from a hard-coded list. Task-number: QTCREATORBUG-24296 Change-Id: Ib74fd854f035d561b8a568987984a2a2cb730175 Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
This commit is contained in:
@@ -324,24 +324,13 @@ static QFileInfoList targetDescriptionFiles(const Utils::FilePath &dir)
|
||||
return kitsDir.entryInfoList();
|
||||
}
|
||||
|
||||
static QString freeRTOSEnvVarForPlatform(const QString &platform)
|
||||
{
|
||||
if (platform == "STM32F769I-DISCOVERY" || platform == "STM32F7508-DISCOVERY")
|
||||
return {"STM32F7_FREERTOS_DIR"};
|
||||
else if (platform == "MIMXRT1050-EVK")
|
||||
return {"IMXRT1050_FREERTOS_DIR"};
|
||||
else if (platform == "MIMXRT1064-EVK")
|
||||
return {"IMXRT1064_FREERTOS_DIR"};
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
static McuTargetDescription parseDescriptionJson(const QByteArray &data)
|
||||
{
|
||||
const QJsonDocument document = QJsonDocument::fromJson(data);
|
||||
const QJsonObject target = document.object();
|
||||
const QJsonObject toolchain = target.value("toolchain").toObject();
|
||||
const QJsonObject boardSdk = target.value("boardSdk").toObject();
|
||||
const QJsonObject freeRTOS = target.value("freeRTOS").toObject();
|
||||
|
||||
const QString platform = target.value("platform").toString();
|
||||
|
||||
@@ -356,7 +345,7 @@ static McuTargetDescription parseDescriptionJson(const QByteArray &data)
|
||||
colorDepthsVector,
|
||||
toolchain.value("id").toString(),
|
||||
boardSdk.value("envVar").toString(),
|
||||
freeRTOSEnvVarForPlatform(platform) // Workaround for UL-2514: Missing FreeRTOS information
|
||||
freeRTOS.value("envVar").toString(),
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user