diff options
-rw-r--r-- | share/qbs/modules/cpp/sdcc.js | 4 | ||||
-rw-r--r-- | share/qbs/modules/cpp/sdcc.qbs | 31 |
2 files changed, 32 insertions, 3 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) diff --git a/share/qbs/modules/cpp/sdcc.qbs b/share/qbs/modules/cpp/sdcc.qbs index a0d795b40..3349e9158 100644 --- a/share/qbs/modules/cpp/sdcc.qbs +++ b/share/qbs/modules/cpp/sdcc.qbs @@ -87,6 +87,8 @@ CppModule { switch (qbs.architecture) { case "mcs51": return "sdas8051" + compilerExtension; + case "stm8": + return "sdasstm8" + compilerExtension; } } assemblerPath: FileInfo.joinPaths(toolchainInstallPath, assemblerName) @@ -95,6 +97,8 @@ CppModule { switch (qbs.architecture) { case "mcs51": return "sdld" + compilerExtension; + case "stm8": + return "sdldstm8" + compilerExtension; } } linkerPath: FileInfo.joinPaths(toolchainInstallPath, linkerName) @@ -104,12 +108,33 @@ CppModule { runtimeLibrary: "static" - staticLibrarySuffix: ".lib" + staticLibrarySuffix: { + switch (qbs.architecture) { + case "mcs51": + return ".lib"; + case "stm8": + return ".a"; + } + } executableSuffix: ".ihx" - property string objectSuffix: ".rel" + property string objectSuffix: { + switch (qbs.architecture) { + case "mcs51": + return ".rel"; + case "stm8": + return ".o"; + } + } - imageFormat: "ihx" + imageFormat: { + switch (qbs.architecture) { + case "mcs51": + return "ihx"; + case "stm8": + return "elf"; + } + } enableExceptions: false enableRtti: false |