diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2021-05-28 18:58:23 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2021-05-29 17:19:25 +0000 |
commit | 63f245dc0e1442b7daade525dfa53e8f515230fc (patch) | |
tree | dc9a52922d758ca63268657b888345d3e659662f /share | |
parent | c5b663c4331f639e14ce9cff42afd08b6fcf7b21 (diff) |
baremetal: Long live COSMIC toolchain for HCS08 architecture
This patch adds support for Cosmic Software compiler for the
bare metal platforms:
* https://www.cosmicsoftware.com/download.php
Note that this compiler only works on Windows host platforms.
Also the COSMIC toolchain has been added to the Github CI.
Fixes: QBS-1641
Change-Id: I755fcd3b2a89d0d40fda8b7f9da3d72ee1918df5
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Diffstat (limited to 'share')
-rw-r--r-- | share/qbs/modules/cpp/cosmic.js | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/share/qbs/modules/cpp/cosmic.js b/share/qbs/modules/cpp/cosmic.js index c6a47535c..cfb581579 100644 --- a/share/qbs/modules/cpp/cosmic.js +++ b/share/qbs/modules/cpp/cosmic.js @@ -43,6 +43,8 @@ function compilerName(qbs) { return "cxcorm"; else if (architecture === "stm8") return "cxstm8"; + else if (architecture === "hcs8") + return "cx6808"; throw "Unable to deduce compiler name for unsupported architecture: '" + architecture + "'"; } @@ -53,30 +55,41 @@ function assemblerName(qbs) { return "cacorm"; if (architecture === "stm8") return "castm8"; + else if (architecture === "hcs8") + return "ca6808"; throw "Unable to deduce assembler name for unsupported architecture: '" + architecture + "'"; } function linkerName(qbs) { var architecture = qbs.architecture; - if (architecture.startsWith("arm") || architecture === "stm8") + if (architecture.startsWith("arm") + || architecture === "stm8" + || architecture === "hcs8") { return "clnk"; + } throw "Unable to deduce linker name for unsupported architecture: '" + architecture + "'"; } function listerName(qbs) { var architecture = qbs.architecture; - if (architecture.startsWith("arm") || architecture === "stm8") + if (architecture.startsWith("arm") + || architecture === "stm8" + || architecture === "hcs8") { return "clabs"; + } throw "Unable to deduce lister name for unsupported architecture: '" + architecture + "'"; } function archiverName(qbs) { var architecture = qbs.architecture; - if (architecture.startsWith("arm") || architecture === "stm8") + if (architecture.startsWith("arm") + || architecture === "stm8" + || architecture === "hcs8") { return "clib"; + } throw "Unable to deduce archiver name for unsupported architecture: '" + architecture + "'"; } @@ -87,6 +100,8 @@ function staticLibrarySuffix(qbs) { return ".cxm"; else if (architecture === "stm8") return ".sm8"; + else if (architecture === "hcs8") + return ".h08"; throw "Unable to deduce static library suffix for unsupported architecture: '" + architecture + "'"; } @@ -97,22 +112,30 @@ function executableSuffix(qbs) { return ".cxm"; else if (architecture === "stm8") return ".sm8"; + else if (architecture === "hcs8") + return ".h08"; throw "Unable to deduce executable suffix for unsupported architecture: '" + architecture + "'"; } function objectSuffix(qbs) { var architecture = qbs.architecture; - if (architecture.startsWith("arm") || architecture === "stm8") + if (architecture.startsWith("arm") + || architecture === "stm8" + || architecture === "hcs8") { return ".o"; + } throw "Unable to deduce object file suffix for unsupported architecture: '" + architecture + "'"; } function imageFormat(qbs) { var architecture = qbs.architecture; - if (architecture.startsWith("arm") || architecture === "stm8") + if (architecture.startsWith("arm") + || architecture === "stm8" + || architecture === "hcs8") { return "cosmic"; + } throw "Unable to deduce image format for unsupported architecture: '" + architecture + "'"; } @@ -123,6 +146,8 @@ function guessArchitecture(compilerFilePath) { return "arm"; else if (baseName === "cxstm8") return "stm8"; + else if (baseName === "cx6808") + return "hcs8"; throw "Unable to deduce architecture for unsupported compiler: '" + baseName + "'"; } @@ -181,8 +206,11 @@ function dumpVersion(compilerFilePath) { function guessEndianness(architecture) { // There is no mention of supported endianness in the cosmic compiler. - if (architecture.startsWith("arm") || architecture === "stm8") + if (architecture.startsWith("arm") + || architecture === "stm8" + || architecture === "hcs8") { return "big"; + } throw "Unable to deduce endianness for unsupported architecture: '" + architecture + "'"; } @@ -199,6 +227,10 @@ function dumpDefaultPaths(compilerFilePath, architecture) { includePath = FileInfo.joinPaths(rootPath, "hstm8"); if (File.exists(includePath)) includePaths.push(includePath); + } else if (architecture === "hcs8") { + includePath = FileInfo.joinPaths(rootPath, "h6808"); + if (File.exists(includePath)) + includePaths.push(includePath); } var libraryPaths = []; |