[meta-arm,7/7] arm-bsp: musca-b1: Add Zephyr support

Submitted by Jon Mason on Oct. 2, 2020, 2:04 p.m. | Patch ID: 176944

Details

Message ID 20201002140405.7896-7-jon.mason@arm.com
State New
Headers show

Commit Message

Jon Mason Oct. 2, 2020, 2:04 p.m.
Zephyr supports Musca B1, and QEMU has an emulated Musca B1 board.  Add
the relevant parts to get this compiling with meta-zephyr and (in
theory) run QEMU.

Change-Id: I9af4aea03e31e96f8eee17f44913e747b1241891
Signed-off-by: Jon Mason <jon.mason@arm.com>
---
 meta-arm-bsp/conf/machine/musca-b1.conf | 13 +++++++++++++
 meta-arm-bsp/documentation/musca-b1.md  | 26 +++++++++++++++++++++++++
 2 files changed, 39 insertions(+)
 create mode 100644 meta-arm-bsp/documentation/musca-b1.md

Patch hide | download patch | download mbox

diff --git a/meta-arm-bsp/conf/machine/musca-b1.conf b/meta-arm-bsp/conf/machine/musca-b1.conf
index e7320ba..c7b818a 100644
--- a/meta-arm-bsp/conf/machine/musca-b1.conf
+++ b/meta-arm-bsp/conf/machine/musca-b1.conf
@@ -11,3 +11,16 @@  require conf/machine/include/tune-cortexm33.inc
 
 # GLIBC will not work with Cortex-M.
 TCLIBC ?= "baremetal"
+
+# For runqemu
+require conf/machine/include/qemu.inc
+QB_SYSTEM_NAME = "qemu-system-arm"
+QB_MACHINE = "-machine musca-b1"
+QB_CPU = "-cpu cortex-m33"
+QB_OPT_APPEND = "-nographic -vga none"
+QB_MEM = "512k"
+
+# Zephyr RTOS settings
+ZEPHYR_BOARD = "v2m_musca_b1"
+ZEPHYR_INHERIT_CLASSES += "zephyr-qemuboot"
+ARCH_musca-b1 = "arm"
diff --git a/meta-arm-bsp/documentation/musca-b1.md b/meta-arm-bsp/documentation/musca-b1.md
new file mode 100644
index 0000000..9fde10a
--- /dev/null
+++ b/meta-arm-bsp/documentation/musca-b1.md
@@ -0,0 +1,26 @@ 
+# Musca B1
+
+## Overview
+For a description of the hardware, go to
+https://developer.arm.com/tools-and-software/development-boards/iot-test-chips-and-boards/musca-b-test-chip-board
+
+For current supported hardware by Zephyr, go to
+https://docs.zephyrproject.org/2.3.0/boards/arm/v2m_musca/doc/index.html
+
+For emulated hardware, go to
+https://www.qemu.org/docs/master/system/arm/musca.html
+
+## Building
+In the local.conf file, MACHINE should be set as follows:
+MACHINE ?= "musca-b1"
+
+To build for Zephyr:
+```bash$ bitbake-layers layerindex-fetch meta-zephyr```
+```bash$ bitbake zephyr-philosophers```
+
+To build the trusted firmware-m (and not Zephyr):
+```bash$ bitbake trusted-frimware-m```
+
+## Running
+To run Zephyr on the QEMU based machine, execute the following command
+```bash$ runqemu qemu-musca-b1```