Deedone / aos_core_zephyr

Aos core application for Zephyr RTOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AosCore zephyr application

Overview

This project contains code of the Aos core application for zephyr OS.

Prerequisites

Zephyr SDK is required to fetch and build this project. Follow Getting Started Guide to install mentioned dependencies and SDK.

Install protobuf compiler from pre-compiled binaries: https://grpc.io/docs/protoc-installation/#install-pre-compiled-binaries-any-os. The verified protobuf compiler version is v22.3: https://github.com/protocolbuffers/protobuf/releases/tag/v22.3.

Fetch

Use zephyr west tool to fetch required repos:

west init -m  https://github.com/aoscloud/aos_core_zephyr --mr main aos_zephyr_sdk
cd aos_zephyr_sdk
west update
west zephyr-export

Build

cd aos_core_zephyr

west build -b ${BOARD} -p auto
west build -t fix_dtb
west build -t run

For test and debug purpose native_posix_64 or native_posix board can be used. For simulation qemu_x86 or qemu_x86_64 board can be used. For xen based system xenvm-qemu board can be used.

Run

west build -t run

Unit tests

Unit tests are implemented using zephyr Test Framework.

Use the following commands to run the application unit tests:

../zephyr/scripts/twister -c -v -T tests

All test reports will be saved in twister-out folder.

Code coverage

Use the following command to calculate unit tests code coverage:

../zephyr/scripts/twister -c -v --coverage --coverage-basedir src/ --coverage-tool gcovr -p unit_testing -T tests

Open twister-out/coverage/index.html with your browser to see the code coverage result.

To see summary:

gcovr twister-out/unit_testing -f src/

About

Aos core application for Zephyr RTOS

License:Apache License 2.0


Languages

Language:C++ 77.2%Language:C 13.1%Language:CMake 9.0%Language:Assembly 0.5%Language:Shell 0.2%