From 4cde2c189e20f0820e8a80229f8bbb100083a725 Mon Sep 17 00:00:00 2001 From: Jon Mason Date: Wed, 30 Sep 2020 08:54:12 -0400 Subject: [PATCH] arm-bsp: musca-b1: Add Zephyr support 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 --- 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 diff --git a/meta-arm-bsp/conf/machine/musca-b1.conf b/meta-arm-bsp/conf/machine/musca-b1.conf index 3ff3acf3..40964be1 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 00000000..9fde10a6 --- /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```