Skip to content

Commit d4e57f6

Browse files
authored
Added CI to README (#18)
1 parent f0ba130 commit d4e57f6

1 file changed

Lines changed: 27 additions & 9 deletions

File tree

README.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This repository contains two basic Zephyr examples configured in the [`zephyr.cs
66

77
The [Arm CMSIS Debugger](https://marketplace.visualstudio.com/items?itemName=Arm.vscode-cmsis-debugger) provides kernel-aware debugging and views for device peripherals, including the interrupt system. It is used to download and run the application on target hardware.
88

9-
pyOCD supports with RTT and SystemView the analysis of the run-time behavior in CI workflows.
9+
pyOCD supports runtime behavior analysis in CI workflows using RTT and SystemView.
1010

1111
Overall, Zephyr development is simplified by managing different build configurations, using an intuitive project tree, supporting multi-core configurations, and providing smart editor features such as code completion.
1212

@@ -41,10 +41,10 @@ If you use a different board, extend the [`zephyr.csolution.yml`](zephyr.csoluti
4141
target-types:
4242
- type: SpecifyName
4343
board: Vendor::Board_name # Vendor is optional
44-
device: Vendor::Device_name # Vendor and Devicename is optional
44+
device: Vendor::Device_name # Vendor and device name are optional
4545
```
4646
47-
To find the packs open [https://www.keil.arm.com/boards/](https://www.keil.arm.com/boards/) and search for your board.
47+
To find the packs, open [https://www.keil.arm.com/boards/](https://www.keil.arm.com/boards/) and search for your board.
4848
4949
- `pack: Vendor::BSP` is listed under CMSIS Pack on the [Board](https://www.keil.arm.com/boards/) page.
5050
- `pack: Vendor::DFP` is listed under CMSIS Pack on the related [Device](https://www.keil.arm.com/devices/) page.
@@ -53,7 +53,7 @@ To find the packs open [https://www.keil.arm.com/boards/](https://www.keil.arm.c
5353

5454
Frequently the [Zephyr board name](https://docs.zephyrproject.org/latest/boards/index.html#) does not match. In this case add the variable `west-board:` as shown below.
5555

56-
Use [Zephyr - Supported Boards and Shields](https://docs.zephyrproject.org/latest/boards/index) and find your board. Under **Supported Features** the `board_name`, `board_name/soc_name` or `board_name/soc_name/core_name` is listed that is the specified with `west-board:` .
56+
Use [Zephyr - Supported Boards and Shields](https://docs.zephyrproject.org/latest/boards/index) and find your board. Under **Supported Features** the `board_name`, `board_name/soc_name` or `board_name/soc_name/core_name` is listed; this is what you specify with `west-board:`.
5757

5858
```yml
5959
target-types:
@@ -68,7 +68,7 @@ Use [Zephyr - Supported Boards and Shields](https://docs.zephyrproject.org/lates
6868

6969
![ZephyrTerminal](./images/ZephyrTerminal.png)
7070

71-
Keil Studio includes a built-in **Zephyr Terminal** for running `west` commands in the IDE. When you open it, it configures for the selected project with the working directory and Zephyr environment.
71+
Keil Studio includes a built-in **Zephyr Terminal** for running `west` commands in the IDE. When you open it, it configures the working directory and Zephyr environment for the selected project.
7272

7373
**Example `west` commands:**
7474

@@ -85,15 +85,33 @@ west build -t ram_report
8585

8686
## RTT and SEGGER SystemView
8787

88-
SEGGER Real-Time Transfer (RTT) enables real-time data exchange between a target device and a host debugger without requiring an additional UART interface. RTT also is the transport mechanism used for SystemView.
88+
SEGGER Real-Time Transfer (RTT) enables real-time data exchange between a target device and a host debugger without requiring an additional UART interface. RTT is also the transport mechanism used for SystemView.
8989

90-
RTT and SystemView is integrated in Zephyr and enabled in the [`zephyr.csolution.yml`](zephyr.csolution.yml) file with the `west-defs` under the `build-type: Debug-RTT`. RTT and SystemView are currently implemented for CI testing and can be used with pyOCD as shown below.
90+
RTT and SystemView are integrated in Zephyr and enabled in the [`zephyr.csolution.yml`](zephyr.csolution.yml) file with the `west-defs` under the `build-type: Debug-RTT`. RTT and SystemView are currently used for CI testing and can be used with pyOCD as shown below.
9191

92-
**Example invocation for `target-type: STM32H7B3I-DK`:
92+
**Example invocation for `target-type: STM32H7B3I-DK`:**
9393

9494
```bash
9595
pyocd load --cbuild-run <path>\out\zephyr+STM32H7B3I-DK.cbuild-run.yml
9696
pyocd run --cbuild-run <path>\out\zephyr+STM32H7B3I-DK.cbuild-run.yml
9797
```
9898

99-
The pyOCD `run command` outputs now test messages to the debug console and collects the file `out\zephyr+STM32H7B3I-DK.SVdat` that can be analyzed with [SEGGER SystemView](https://www.segger.com/products/development-tools/systemview/).
99+
The pyOCD `run` command now outputs test messages to the debug console and collects the file `out\zephyr+STM32H7B3I-DK.SVdat`, which can be analyzed with [SEGGER SystemView](https://www.segger.com/products/development-tools/systemview/).
100+
101+
## CI Test Automation
102+
103+
This repository demonstrates a hybrid CI approach: build steps run on GitHub-hosted runners, while hardware execution runs on a self-hosted Raspberry Pi 5 (RPi5) runner connected to a NUCLEO board.
104+
105+
The [CI workflow](./.github/workflows) is split into two parts:
106+
107+
- [Build_NUCLEO-H563ZI.yaml](./.github/workflows/Build_NUCLEO-H563ZI.yaml) compiles the selected Zephyr application and produces build outputs that can be consumed by the run workflow.
108+
- [Run_NUCLEO-H563ZI.yaml](./.github/workflows/Run_NUCLEO-H563ZI.yaml) executes on the self-hosted RPi5 runner and uses an attached debug probe to download and execute the image on the target board.
109+
110+
The run workflow uses pyOCD to flash and run the application. To avoid duplicating board configuration in multiple places, the workflow relies on the generated `*.cbuild-run.yml` file for target information and uses the ID of the connected debug adapter to select the correct probe. Refer to the [CMSIS-Toolbox - Run and Debug Configuration](https://open-cmsis-pack.github.io/cmsis-toolbox/build-overview/#run-and-debug-configuration) for more information.
111+
112+
In the [GitHub Actions view of Run_NUCLEO-H563ZI.yaml](https://github.com/Arm-Examples/CMSIS-Zephyr/actions/workflows/Run_NUCLEO-H563ZI.yaml), you can review the test results:
113+
114+
- The application output is visible in the action log (for example via RTT-based console output).
115+
- The workflow uploads a SEGGER SystemView trace (`*.SVdat`) as an artifact. This execution trace can be downloaded and analyzed offline.
116+
117+
See [Setup Self-Hosted GitHub Runner on Raspberry Pi 5](https://github.com/Arm-Examples/.github/blob/main/profile/RPI_GH_Runner.md) for details on configuring the self-hosted runner. It explains installing pyOCD and the required DFP and BSP packs for connecting to the target hardware.

0 commit comments

Comments
 (0)