diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2019-07-25 12:44:47 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2019-07-26 13:24:07 +0000 |
commit | 1635126722f94174563575d69a337bd07032908c (patch) | |
tree | 16fd395de7f11ea9819744005359ab53a314672b /share/qbs/modules/cpp/sdcc.js | |
parent | 08ee82112c4bb16d5401a7e748b5dbf336211f3e (diff) |
bare-metal: Add STM8 architecture for SDCC toolchain
Previous implementation of SDCC toolchain based on an assumption,
that the default target architecture always is MCS51.
But, the SDCC compiler support multiple architectures:
* http://sdcc.sourceforge.net/
So, it is makes sense to add support and for STM8 architecture
to the SDCC toolchain.
Change-Id: Ibbd32764fe2fac3e45fda93ac3d903c3619efb18
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Diffstat (limited to 'share/qbs/modules/cpp/sdcc.js')
-rw-r--r-- | share/qbs/modules/cpp/sdcc.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/share/qbs/modules/cpp/sdcc.js b/share/qbs/modules/cpp/sdcc.js index 2f148d2c2..38783aa1a 100644 --- a/share/qbs/modules/cpp/sdcc.js +++ b/share/qbs/modules/cpp/sdcc.js @@ -42,12 +42,16 @@ var WindowsUtils = require("qbs.WindowsUtils"); function targetArchitectureFlag(architecture) { if (architecture === "mcs51") return "-mmcs51"; + if (architecture === "stm8") + return "-mstm8"; } function guessArchitecture(macros) { if (macros["__SDCC_mcs51"] === "1") return "mcs51"; + if (macros["__SDCC_stm8"] === "1") + return "stm8"; } function guessEndianness(macros) |