diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2020-05-21 16:38:38 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2020-05-25 09:54:32 +0000 |
commit | c2fb3251062fca72a72ea291d9ee944936872cb3 (patch) | |
tree | 49c856d9ddc652e0b199052c4d93234f16dab0b7 | |
parent | 8943c0693f5bdaa5ab938b77720690cff9894cec (diff) |
baremetal: Add IAR Renesas M16C/R8C toolchain support
This commit adds a basic support of the IAR Embedded Workbench
toolchain for the Renesas M16C/R8C processors family:
* https://www.renesas.com/us/en/products/microcontrollers-microprocessors/m16c.html
Change-Id: I1985d16bd74434d78b2f571a209d314f5c147361
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | share/qbs/modules/cpp/iar.js | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/share/qbs/modules/cpp/iar.js b/share/qbs/modules/cpp/iar.js index 02cd29044..77b51ec86 100644 --- a/share/qbs/modules/cpp/iar.js +++ b/share/qbs/modules/cpp/iar.js @@ -42,7 +42,7 @@ function supportXLinker(architecture) { || architecture === "avr32" || architecture === "mcs51" || architecture === "msp430" || architecture === "v850" || architecture === "m68k" || architecture === "m32c" - || architecture === "r32c"; + || architecture === "r32c" || architecture === "m16c"; } function supportILinker(architecture) { @@ -73,6 +73,8 @@ function architectureCode(architecture) { return "48"; case "r32c": return "53"; + case "m16c": + return "34"; case "arm": case "rh850": case "rl78": case "rx": case "stm8": case "sh": case "riscv": return ""; } @@ -112,6 +114,8 @@ function compilerName(qbs) { return "iccm32c"; else if (architecture === "r32c") return "iccr32c"; + else if (architecture === "m16c") + return "iccm16c"; throw "Unable to deduce compiler name for unsupported architecture: '" + architecture + "'"; } @@ -150,6 +154,8 @@ function assemblerName(qbs) { return "am32c"; else if (architecture === "r32c") return "ar32c"; + else if (architecture === "m16c") + return "am16c"; throw "Unable to deduce assembler name for unsupported architecture: '" + architecture + "'"; } @@ -175,7 +181,7 @@ function archiverName(qbs) { || architecture === "msp430" || architecture === "v850" || architecture === "78k" || architecture === "avr32" || architecture === "m68k" || architecture === "m32c" - || architecture === "r32c") { + || architecture === "r32c" || architecture === "m16c") { return "xlib"; } throw "Unable to deduce archiver name for unsupported architecture: '" @@ -278,6 +284,8 @@ function guessArchitecture(macros) { return "m32c"; else if (macros["__ICCR32C__"] === "1") return "r32c"; + else if (macros["__ICCM16C__"] === "1") + return "m16c"; } function guessEndianness(macros) { @@ -298,7 +306,8 @@ function guessVersion(macros, architecture) || architecture === "msp430" || architecture === "rl78" || architecture === "rx" || architecture === "rh850" || architecture === "v850" || architecture === "78k" || architecture === "avr32" || architecture === "sh" || architecture === "riscv" - || architecture === "m68k" || architecture === "m32c" || architecture === "r32c") { + || architecture === "m68k" || architecture === "m32c" || architecture === "r32c" + || architecture === "m16c") { return { major: parseInt(version / 100), minor: parseInt(version % 100), patch: 0, @@ -326,6 +335,7 @@ function cppLanguageOption(compilerFilePath) { case "icccf": case "iccm32c": case "iccr32c": + case "iccm16c": return "--ec++"; } throw "Unable to deduce C++ language option for unsupported compiler: '" @@ -608,7 +618,7 @@ function compilerFlags(project, product, input, outputs, explicitlyDependsOn) { || architecture === "v850" || architecture === "78k" || architecture === "avr32" || architecture === "sh" || architecture === "m68k" || architecture === "m32c" - || architecture === "r32c") { + || architecture === "r32c" || architecture === "m16c") { args.push("--ec++"); } } |