aboutsummaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2019-07-24 15:30:52 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2019-07-26 14:00:47 +0000
commit1a9e852d7d6ea753f20d7e1f374c9f20a87d7f1e (patch)
tree7345cc2076dbc84993825392d7de58f520e76f6a /src/app
parent7fb811f6cb51d752af551eb0739daafd4ae7560b (diff)
bare-metal: Add IAR STM8 toolchain support
This commit adds a basic support of the IAR Embedded Workbench toolchain for the STM8 processors family. To use it with Qt Creator, it is enough to add there a desired Kit with a custom IAR C/C++ compiler, and then set the following in the Kit's Qbs profile settings: * Key: qbs.toolchainType * Value: iar Tested with EW for STM8 v3.11.1 on Windows using the simple projects samples which come with the default IAR installer. Change-Id: Ibc116ceb33b7df49c3241d26fa97136255ba06dd Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/app')
-rw-r--r--src/app/qbs-setup-toolchains/iarewprobe.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/app/qbs-setup-toolchains/iarewprobe.cpp b/src/app/qbs-setup-toolchains/iarewprobe.cpp
index 7ac786b98..4a8ed499b 100644
--- a/src/app/qbs-setup-toolchains/iarewprobe.cpp
+++ b/src/app/qbs-setup-toolchains/iarewprobe.cpp
@@ -57,7 +57,8 @@ using Internal::HostOsInfo;
static QStringList knownIarCompilerNames()
{
- return {QStringLiteral("icc8051"), QStringLiteral("iccarm"), QStringLiteral("iccavr")};
+ return {QStringLiteral("icc8051"), QStringLiteral("iccarm"),
+ QStringLiteral("iccavr"), QStringLiteral("iccstm8")};
}
static QString guessIarArchitecture(const QFileInfo &compiler)
@@ -69,6 +70,8 @@ static QString guessIarArchitecture(const QFileInfo &compiler)
return QStringLiteral("arm");
if (baseName == QLatin1String("iccavr"))
return QStringLiteral("avr");
+ if (baseName == QLatin1String("iccstm8"))
+ return QStringLiteral("stm8");
return {};
}
@@ -137,7 +140,8 @@ static Version dumpIarCompilerVersion(const QFileInfo &compiler)
if (arch == QLatin1String("arm")) {
return Version{verCode / 1000000, (verCode / 1000) % 1000, verCode % 1000};
} else if (arch == QLatin1String("avr")
- || arch == QLatin1String("mcs51")) {
+ || arch == QLatin1String("mcs51")
+ || arch == QLatin1String("stm8")) {
return Version{verCode / 100, verCode % 100};
}
@@ -181,6 +185,7 @@ static std::vector<ToolchainInstallInfo> installedIarsFromRegistry()
{QStringLiteral("EWARM"), QStringLiteral("\\arm\\bin\\iccarm.exe")},
{QStringLiteral("EWAVR"), QStringLiteral("\\avr\\bin\\iccavr.exe")},
{QStringLiteral("EW8051"), QStringLiteral("\\8051\\bin\\icc8051.exe")},
+ {QStringLiteral("EWSTM8"), QStringLiteral("\\stm8\\bin\\iccstm8.exe")},
};
QSettings registry(QLatin1String(kRegistryNode), QSettings::NativeFormat);