aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/qbs/imports/qbs/Probes/IarProbe.qbs4
-rw-r--r--share/qbs/modules/cpp/iar.js27
-rw-r--r--share/qbs/modules/cpp/iar.qbs16
3 files changed, 42 insertions, 5 deletions
diff --git a/share/qbs/imports/qbs/Probes/IarProbe.qbs b/share/qbs/imports/qbs/Probes/IarProbe.qbs
index c57878058..4ac05551c 100644
--- a/share/qbs/imports/qbs/Probes/IarProbe.qbs
+++ b/share/qbs/imports/qbs/Probes/IarProbe.qbs
@@ -95,6 +95,10 @@ PathProbe {
versionMajor = parseInt(version / 100);
versionMinor = parseInt(version % 100);
versionPatch = 0;
+ } else if (architecture === "msp430") {
+ versionMajor = parseInt(version / 100);
+ versionMinor = parseInt(version % 100);
+ versionPatch = 0;
}
found = version && architecture && endianness;
diff --git a/share/qbs/modules/cpp/iar.js b/share/qbs/modules/cpp/iar.js
index 023866701..105b876cb 100644
--- a/share/qbs/modules/cpp/iar.js
+++ b/share/qbs/modules/cpp/iar.js
@@ -49,6 +49,8 @@ function guessArchitecture(macros)
return "avr";
else if (macros["__ICCSTM8__"] === "1")
return "stm8";
+ else if (macros["__ICC430__"] === "1")
+ return "msp430";
}
function guessEndianness(macros)
@@ -63,8 +65,10 @@ function cppLanguageOption(compilerFilePath)
var baseName = FileInfo.baseName(compilerFilePath);
if (baseName === "iccarm")
return "--c++";
- if (baseName === "icc8051" || baseName === "iccavr" || baseName === "iccstm8")
+ if (baseName === "icc8051" || baseName === "iccavr"
+ || baseName === "iccstm8" || baseName === "icc430") {
return "--ec++";
+ }
throw "Unable to deduce C++ language option for unsupported compiler: '"
+ FileInfo.toNativeSeparators(compilerFilePath) + "'";
}
@@ -252,6 +256,8 @@ function compilerFlags(project, product, input, output, explicitlyDependsOn) {
args.push("--ec++");
} else if (input.qbs.architecture === "stm8") {
args.push("--ec++");
+ } else if (input.qbs.architecture === "msp430") {
+ args.push("--ec++");
}
}
@@ -354,6 +360,8 @@ function linkerFlags(project, product, input, outputs) {
args.push("-l", outputs.map_file[0].filePath);
else if (product.qbs.architecture === "stm8")
args.push("--map", outputs.map_file[0].filePath);
+ else if (product.qbs.architecture === "msp430")
+ args.push("-l", outputs.map_file[0].filePath);
}
var allLibraryPaths = [];
@@ -374,6 +382,8 @@ function linkerFlags(project, product, input, outputs) {
args.push("-rt");
else if (product.qbs.architecture === "avr")
args.push("-rt");
+ else if (product.qbs.architecture === "msp430")
+ args.push("-rt");
}
var linkerScripts = inputs.linkerscript
@@ -387,6 +397,8 @@ function linkerFlags(project, product, input, outputs) {
args.push("-f", linkerScripts[i]);
else if (product.qbs.architecture === "stm8")
args.push("--config", linkerScripts[i]);
+ else if (product.qbs.architecture === "msp430")
+ args.push("-f", linkerScripts[i]);
}
if (product.cpp.entryPoint) {
@@ -398,16 +410,21 @@ function linkerFlags(project, product, input, outputs) {
args.push("-s", product.cpp.entryPoint);
else if (product.qbs.architecture === "stm8")
args.push("--entry", product.cpp.entryPoint);
+ else if (product.qbs.architecture === "msp430")
+ args.push("-s", product.cpp.entryPoint);
}
+ // Silent operation.
if (product.qbs.architecture === "arm")
- args.push("--silent"); // Silent operation.
+ args.push("--silent");
else if (product.qbs.architecture === "mcs51")
- args.push("-S"); // Silent operation.
+ args.push("-S");
else if (product.qbs.architecture === "avr")
- args.push("-S"); // Silent operation.
+ args.push("-S");
else if (product.qbs.architecture === "stm8")
- args.push("--silent"); // Silent operation.
+ args.push("--silent");
+ else if (product.qbs.architecture === "msp430")
+ args.push("-S");
args = args.concat(ModUtils.moduleProperty(product, "driverLinkerFlags"));
return args;
diff --git a/share/qbs/modules/cpp/iar.qbs b/share/qbs/modules/cpp/iar.qbs
index 8b8773f7c..b573a0964 100644
--- a/share/qbs/modules/cpp/iar.qbs
+++ b/share/qbs/modules/cpp/iar.qbs
@@ -88,6 +88,8 @@ CppModule {
return "iccavr" + compilerExtension;
case "stm8":
return "iccstm8" + compilerExtension;
+ case "msp430":
+ return "icc430" + compilerExtension;
}
}
compilerPath: FileInfo.joinPaths(toolchainInstallPath, compilerName)
@@ -102,6 +104,8 @@ CppModule {
return "aavr" + compilerExtension;
case "stm8":
return "iasmstm8" + compilerExtension;
+ case "msp430":
+ return "a430" + compilerExtension;
}
}
assemblerPath: FileInfo.joinPaths(toolchainInstallPath, assemblerName)
@@ -116,6 +120,8 @@ CppModule {
return "xlink" + compilerExtension;
case "stm8":
return "ilinkstm8" + compilerExtension;
+ case "msp430":
+ return "xlink" + compilerExtension;
}
}
linkerPath: FileInfo.joinPaths(toolchainInstallPath, linkerName)
@@ -130,6 +136,8 @@ CppModule {
return "xlib" + compilerExtension;
case "stm8":
return "iarchive" + compilerExtension;
+ case "msp430":
+ return "xlib" + compilerExtension;
}
}
property string archiverPath: FileInfo.joinPaths(toolchainInstallPath, archiverName)
@@ -146,6 +154,8 @@ CppModule {
return ".r90";
case "stm8":
return ".a";
+ case "msp430":
+ return ".r43";
}
}
@@ -159,6 +169,8 @@ CppModule {
return qbs.debugInformation ? ".d90" : ".a90";
case "stm8":
return ".out";
+ case "msp430":
+ return qbs.debugInformation ? ".d43" : ".a43";
}
}
@@ -172,6 +184,8 @@ CppModule {
return ".r90";
case "stm8":
return ".o";
+ case "msp430":
+ return ".r43";
}
}
@@ -185,6 +199,8 @@ CppModule {
return "ubrof";
case "stm8":
return "elf";
+ case "msp430":
+ return "ubrof";
}
}