[meta-zephyr][PATCH 6/6] zephyr-bsp: add support for qemu-cortex-m0


Jon Mason
 

Signed-off-by: Jon Mason <jon.mason@...>
---
.gitlab-ci.yml | 3 +++
ci/qemu-cortex-m0.yml | 6 +++++
.../conf/machine/qemu-cortex-m0.conf | 24 +++++++++++++++++++
3 files changed, 33 insertions(+)
create mode 100644 ci/qemu-cortex-m0.yml
create mode 100644 meta-zephyr-bsp/conf/machine/qemu-cortex-m0.conf

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 90f5eb6..addd04c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -80,6 +80,9 @@ nrf52840dk-nrf52840:
qemu-cortex-a53:
extends: .build

+qemu-cortex-m0/testimage:
+ extends: .build
+
qemu-cortex-m3/testimage:
extends: .build

diff --git a/ci/qemu-cortex-m0.yml b/ci/qemu-cortex-m0.yml
new file mode 100644
index 0000000..759253d
--- /dev/null
+++ b/ci/qemu-cortex-m0.yml
@@ -0,0 +1,6 @@
+header:
+ version: 11
+ includes:
+ - ci/base.yml
+
+machine: qemu-cortex-m0
diff --git a/meta-zephyr-bsp/conf/machine/qemu-cortex-m0.conf b/meta-zephyr-bsp/conf/machine/qemu-cortex-m0.conf
new file mode 100644
index 0000000..1cf2bb0
--- /dev/null
+++ b/meta-zephyr-bsp/conf/machine/qemu-cortex-m0.conf
@@ -0,0 +1,24 @@
+#@TYPE: Machine
+#@NAME: qemu-cortex-m0
+#@DESCRIPTION: Machine for BBC Microbit v1, Zephyr BOARD qemu_cortex_m0
+
+require conf/machine/include/qemu.inc
+require conf/machine/include/arm/armv6m/tune-cortexm0.inc
+
+MACHINEOVERRIDES =. "nordic:"
+
+# GLIBC will not work with Cortex-M.
+TCLIBC = "newlib"
+
+# For runqemu
+QB_SYSTEM_NAME = "qemu-system-arm"
+QB_MACHINE = "-machine microbit"
+QB_CPU = "-cpu cortex-m0"
+QB_OPT_APPEND = "-nographic -vga none"
+QB_RNG = ""
+QB_OPT_APPEND = "-icount shift=6,align=off,sleep=on -rtc clock=vm"
+
+# Zephyr RTOS settings
+ZEPHYR_BOARD = "qemu_cortex_m0"
+ZEPHYR_INHERIT_CLASSES += "zephyr-qemuboot"
+ARCH:qemu-cortex-m0 = "arm"
--
2.17.1

Join {yocto@lists.yoctoproject.org to automatically receive all group messages.