-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use west to fetch open-amp and libmetal library source code. Signed-off-by: Tanmay Shah <[email protected]>
- Loading branch information
Showing
2 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Zephyr Example Application | ||
|
||
This repository contains legacy applications and tests examples. | ||
|
||
|
||
## build legacy application | ||
|
||
|
||
### Initialization | ||
|
||
The first step is to initialize the workspace folder (``my-workspace``) where | ||
the examples and all Zephyr modules will be cloned. You can do | ||
that by running: | ||
|
||
```shell | ||
# initialize my-workspace for the example-application (main branch) | ||
west init -m https://github.com/OpenAMP/openamp-system-reference/examples/legacy_apps/ --mr main my-workspace | ||
# update modules | ||
cd my-workspace | ||
west update | ||
``` | ||
|
||
### Build and run on a board | ||
|
||
The application can be built by running: | ||
|
||
```shell | ||
west build -b $BOARD `$ZEPHYR_EXAMPLE` | ||
``` | ||
|
||
where `$BOARD` is the target board and `$ZEPHYR_EXAMPLE`. | ||
Note that Zephyr sample boards may be used if an appropriate overlay is provided (see `app/boards`). | ||
|
||
A sample debug configuration is also provided. You can apply it by running: | ||
|
||
```shell | ||
west build -b $BOARD $ZEPHYR_EXAMPLE -- -DOVERLAY_CONFIG=debug.conf | ||
``` | ||
|
||
Example to compile rpmsg_multi_services on stm32mp157 discovery board: | ||
|
||
```shell | ||
west build -b stm32mp157c_dk2 openamp-system-reference/examples/zephyr/rpmsg_multi_services | ||
``` | ||
|
||
### Running on a board | ||
|
||
We consider here board on which the Zephyr image is running on a coprocessor. | ||
|
||
1) Once you have built the application copy it on target filesystem. | ||
2) Load the Zephyr firmware and start the coprocessor depending on the board. | ||
|
||
Example of a Zephyr firmware image loading by the Linux kernel remoteproc framework. | ||
|
||
```shell | ||
cp $ZEPHYR_EXAMPLE.elf /lib/modules/ | ||
echo $ZEPHYR_EXAMPLE.elf > /sys/class/remoteproc/remoteproc0/firmware | ||
echo start >/sys/class/remoteproc/remoteproc0/state | ||
``` | ||
|
||
### Running in an Emulator | ||
|
||
To be described |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright (c) 2022 STMicroelectronics | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
manifest: | ||
remotes: | ||
- name: openamp | ||
url-base: https://github.com/OpenAMP | ||
defaults: | ||
remote: openamp | ||
|
||
self: | ||
path: openamp-system-reference | ||
|
||
projects: | ||
- name: libmetal | ||
revision: main | ||
|
||
- name: open-amp | ||
revision: main |