diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2019-01-10 18:56:42 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2019-01-23 16:52:03 +0000 |
commit | 133901f4658caaa2bce042e33e38914682fa4043 (patch) | |
tree | 6b2b1cbc3d30c4a4da71f18b841f021e91f5cce2 /share/qbs/imports/qbs/Probes | |
parent | c2833b1a009bc7c382b30d94109b9b7a25a404a6 (diff) |
bare-metal: Add IAR 8051 toolchain support
This commit adds a basic support of the IAR Embedded Workbench
toolchain for the 8051 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 8051 v10.10.1 on Windows using the simple
projects samples which are comes with the default IAR installer.
Change-Id: I5ef1cc047c27a7fce4a6841331a67e8dd0f0453e
Reviewed-by: Richard Weickelt <richard@weickelt.de>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share/qbs/imports/qbs/Probes')
-rw-r--r-- | share/qbs/imports/qbs/Probes/IarProbe.qbs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/share/qbs/imports/qbs/Probes/IarProbe.qbs b/share/qbs/imports/qbs/Probes/IarProbe.qbs index 9d22f5d2a..20cbf3492 100644 --- a/share/qbs/imports/qbs/Probes/IarProbe.qbs +++ b/share/qbs/imports/qbs/Probes/IarProbe.qbs @@ -56,9 +56,16 @@ PathProbe { endianness = IAR.guessEndianness(macros); var version = parseInt(macros["__VER__"], 10); - versionMajor = parseInt(version / 1000000); - versionMinor = parseInt(version / 1000) % 1000; - versionPatch = parseInt(version) % 1000; + + if (architecture === "arm") { + versionMajor = parseInt(version / 1000000); + versionMinor = parseInt(version / 1000) % 1000; + versionPatch = parseInt(version) % 1000; + } else if (architecture === "mcs51") { + versionMajor = parseInt(version / 100); + versionMinor = parseInt(version % 100); + versionPatch = 0; + } found = version && architecture && endianness; } |