bao-demos/demos/linux+zephyr
Yan-Jie Wang 40e843aa5d fix(demos/linux+zephyr): fix linux+zephyr demo on fvp-a
The addresses in config file of bao and the device tree for zephyr are
not consistent.  Change the config file of bao to match the addresses
in the device tree for zephyr.

Signed-off-by: Yan-Jie Wang <yanjiewtw@gmail.com>
Signed-off-by: Jose Martins <josemartins90@gmail.com>
2023-10-21 16:38:56 +01:00
..
configs fix(demos/linux+zephyr): fix linux+zephyr demo on fvp-a 2023-10-21 16:38:56 +01:00
devicetrees fix(fvp-r): modify overlapping addresses for linux+zephyr demo 2023-05-01 14:38:22 +01:00
zephyr/app feat: add zephyr demos 2023-04-21 17:30:42 +01:00
README.md fix(demos/linux+zephyr): fix address in step-by-step guide 2023-05-01 17:01:21 +01:00
make.mk feat(fvp-r): load vm image separately 2023-05-01 14:38:19 +01:00

README.md

Linux+Zephyr Demo

This demo duplicates the behavior of the Linux+FreeRTOS demo, with Zephyr taking the place of FreeRTOS. It features a dual guest configuration, i.e., Linux and Zephyr, connected through an inter-VM communication object. This object is implemented through a shared memory region and a doorbell mechanism in the form of hardware interrupts.

If Zephyr supports SMP for the target architecture, half of the cores are assigned to Zephyr and half to Linux. If not, one core is assigned to Zephyr and the remaining ones to Linux. The platform's first available UART is also assigned to Zephyr. Any additional UART device is assigned to Linux. The Linux guest is also accessible via ssh at the static address 192.168.42.15.

You can send messages to Zephyr by writing to /dev/baoipc0. For example:

echo "Hello, Bao!" > /dev/baoipc0

The Zephyr guest will also send a message to Linux each time it receives a character in its UART. However, the Linux inter-VM is not configured for Linux to asynchronously react to it and output this message. You can checkout the last Zephyr message by reading /dev/baoipc0:

cat /dev/baoipc0

If you are targetting an MPU platform (i.e. fvp-r), set:

export FVPR_VM_IMAGES="$BAO_DEMOS_WRKDIR_IMGS/zephyr.bin@0x24000000 \
    $BAO_DEMOS_WRKDIR_IMGS/linux.bin@0x28000000"

Follow the instructions to build Zephyr and Linux.