aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2020-05-18 13:09:43 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2020-05-19 11:13:28 +0000
commit63277596843d53e200b44c3b04326e768c1a685a (patch)
tree03ea8e78bdbb5014936044c2cff85cfc33040671 /share
parent60825da5e919be672a471a6a70adaa85a914eb2b (diff)
baremetal: Add IAR Renesas M32C toolchain support
This commit adds a basic support of the IAR Embedded Workbench toolchain for the Renesas M32C processors family: * https://www.renesas.com/us/en/products/microcontrollers-microprocessors/m16c.html Change-Id: I87026acbf83a204ceb9821271038582f8f6e7ae5 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share')
-rw-r--r--share/qbs/modules/cpp/iar.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/share/qbs/modules/cpp/iar.js b/share/qbs/modules/cpp/iar.js
index 227cdeb1f..891f0cafe 100644
--- a/share/qbs/modules/cpp/iar.js
+++ b/share/qbs/modules/cpp/iar.js
@@ -41,7 +41,7 @@ function supportXLinker(architecture) {
return architecture === "78k" || architecture === "avr"
|| architecture === "avr32" || architecture === "mcs51"
|| architecture === "msp430" || architecture === "v850"
- || architecture === "m68k";
+ || architecture === "m68k" || architecture === "m32c";
}
function supportILinker(architecture) {
@@ -68,6 +68,8 @@ function architectureCode(architecture) {
return "85";
case "m68k":
return "68";
+ case "m32c":
+ return "48";
case "arm": case "rh850": case "rl78": case "rx": case "stm8": case "sh": case "riscv":
return "";
}
@@ -103,6 +105,8 @@ function compilerName(qbs) {
return "iccriscv";
else if (architecture === "m68k")
return "icccf";
+ else if (architecture === "m32c")
+ return "iccm32c";
throw "Unable to deduce compiler name for unsupported architecture: '"
+ architecture + "'";
}
@@ -137,6 +141,8 @@ function assemblerName(qbs) {
return "iasmriscv";
else if (architecture === "m68k")
return "acf";
+ else if (architecture === "m32c")
+ return "am32c";
throw "Unable to deduce assembler name for unsupported architecture: '"
+ architecture + "'";
}
@@ -161,7 +167,7 @@ function archiverName(qbs) {
} else if (architecture === "mcs51" || architecture === "avr"
|| architecture === "msp430" || architecture === "v850"
|| architecture === "78k" || architecture === "avr32"
- || architecture === "m68k") {
+ || architecture === "m68k" || architecture === "m32c") {
return "xlib";
}
throw "Unable to deduce archiver name for unsupported architecture: '"
@@ -260,6 +266,8 @@ function guessArchitecture(macros) {
return "riscv";
else if (macros["__ICCCF__"] === "1")
return "m68k";
+ else if (macros["__ICCM32C__"] === "1")
+ return "m32c";
}
function guessEndianness(macros) {
@@ -280,7 +288,7 @@ 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 === "m68k" || architecture === "m32c") {
return { major: parseInt(version / 100),
minor: parseInt(version % 100),
patch: 0,
@@ -306,6 +314,7 @@ function cppLanguageOption(compilerFilePath) {
case "iccavr32":
case "iccsh":
case "icccf":
+ case "iccm32c":
return "--ec++";
}
throw "Unable to deduce C++ language option for unsupported compiler: '"
@@ -587,7 +596,7 @@ function compilerFlags(project, product, input, outputs, explicitlyDependsOn) {
|| architecture === "avr" || architecture === "msp430"
|| architecture === "v850" || architecture === "78k"
|| architecture === "avr32" || architecture === "sh"
- || architecture === "m68k") {
+ || architecture === "m68k" || architecture === "m32c") {
args.push("--ec++");
}
}