diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2021-05-05 14:39:53 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2021-05-28 12:55:24 +0000 |
commit | 61667f68bc91bd69e908e9bd0f68b143f37367fa (patch) | |
tree | bbe97faf420df75bf7979572cbb27449f916a9c1 /tests | |
parent | d57614e1f1d2ffc9ef0c22178f1be87a900387f2 (diff) | |
download | qbs-61667f68bc91bd69e908e9bd0f68b143f37367fa.tar.gz |
baremetal: Long live COSMIC toolchain for STM32 ARM 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.
Right now this patch implements support for ARM architecture for
STM32 microcontrollers. But in the future it is simple to extend
it and for other architectures (e.g. for STM8, HC08 and so on).
Also the COSMIC toolchain has been added to the Github CI.
Change-Id: Iabdfd61cc427155117730db46e067004ceb07102
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Diffstat (limited to 'tests')
6 files changed, 20 insertions, 2 deletions
diff --git a/tests/auto/blackbox/testdata-baremetal/BareMetalApplication.qbs b/tests/auto/blackbox/testdata-baremetal/BareMetalApplication.qbs index a52bb4c4e..f23cf1a39 100644 --- a/tests/auto/blackbox/testdata-baremetal/BareMetalApplication.qbs +++ b/tests/auto/blackbox/testdata-baremetal/BareMetalApplication.qbs @@ -1,3 +1,9 @@ BareMetalProduct { type: "application" + + Group { + condition: qbs.toolchain.contains("cosmic") + files: "cosmic.lkf" + fileTags: "linkerscript" + } } diff --git a/tests/auto/blackbox/testdata-baremetal/compiler-defines-by-language/compiler-defines-by-language.qbs b/tests/auto/blackbox/testdata-baremetal/compiler-defines-by-language/compiler-defines-by-language.qbs index 5e8bbd62d..bfd10106d 100644 --- a/tests/auto/blackbox/testdata-baremetal/compiler-defines-by-language/compiler-defines-by-language.qbs +++ b/tests/auto/blackbox/testdata-baremetal/compiler-defines-by-language/compiler-defines-by-language.qbs @@ -2,6 +2,8 @@ import "../BareMetalApplication.qbs" as BareMetalApplication Project { property bool supportsCpp: { + if (qbs.toolchain.contains("cosmic")) + return false; if (qbs.toolchain.contains("sdcc")) return false; if (qbs.toolchain.contains("keil")) { diff --git a/tests/auto/blackbox/testdata-baremetal/cosmic.lkf b/tests/auto/blackbox/testdata-baremetal/cosmic.lkf new file mode 100644 index 000000000..90c254d1e --- /dev/null +++ b/tests/auto/blackbox/testdata-baremetal/cosmic.lkf @@ -0,0 +1 @@ +@* diff --git a/tests/auto/blackbox/testdata-baremetal/one-object-asm-application/arm-cosmic.s b/tests/auto/blackbox/testdata-baremetal/one-object-asm-application/arm-cosmic.s new file mode 100644 index 000000000..4b45cc989 --- /dev/null +++ b/tests/auto/blackbox/testdata-baremetal/one-object-asm-application/arm-cosmic.s @@ -0,0 +1,5 @@ +_main: + movs r0, #0 + bx lr + xdef _main + end diff --git a/tests/auto/blackbox/testdata-baremetal/one-object-asm-application/one-object-asm-application.qbs b/tests/auto/blackbox/testdata-baremetal/one-object-asm-application/one-object-asm-application.qbs index ed38f79b6..3eba70cab 100644 --- a/tests/auto/blackbox/testdata-baremetal/one-object-asm-application/one-object-asm-application.qbs +++ b/tests/auto/blackbox/testdata-baremetal/one-object-asm-application/one-object-asm-application.qbs @@ -2,7 +2,10 @@ import "../BareMetalApplication.qbs" as BareMetalApplication BareMetalApplication { condition: { - if (qbs.toolchainType === "keil") { + if (qbs.toolchainType === "cosmic") { + if (qbs.architecture.startsWith("arm")) + return true; + } else if (qbs.toolchainType === "keil") { if (qbs.architecture.startsWith("arm")) return true; if (qbs.architecture === "mcs51") diff --git a/tests/auto/blackbox/testdata-baremetal/target-platform/target-platform.qbs b/tests/auto/blackbox/testdata-baremetal/target-platform/target-platform.qbs index 50be8e91a..d29e7e619 100644 --- a/tests/auto/blackbox/testdata-baremetal/target-platform/target-platform.qbs +++ b/tests/auto/blackbox/testdata-baremetal/target-platform/target-platform.qbs @@ -3,7 +3,8 @@ Product { condition: { if (qbs.toolchainType === "keil" || qbs.toolchainType === "iar" - || qbs.toolchainType === "sdcc") { + || qbs.toolchainType === "sdcc" + || qbs.toolchainType === "cosmic") { var hasNoPlatform = (qbs.targetPlatform === "none"); var hasNoOS = (qbs.targetOS.length === 1 && qbs.targetOS[0] === "none"); console.info("has no platform: " + hasNoPlatform); |