|
| 1 | +[](https://github.com/Arm-Examples/ModelNova/actions/workflows/Test_RPS_SSE-320-U85.yml) |
| 2 | +[](https://github.com/Arm-Examples/ModelNova/actions/workflows/Build_RPS_AppKit-E8.yml) |
| 3 | +[](https://github.com/Arm-Examples/ModelNova/actions/workflows/Run_RPS_AppKit-E8.yml) |
| 4 | +[](https://github.com/Arm-Examples/ModelNova/actions/workflows/Build_RPS_Variants.yml) |
| 5 | + |
1 | 6 | **Work in Progress** |
2 | 7 |
|
3 | 8 |  |
@@ -68,21 +73,94 @@ The diagram below illustrates the RPS application architecture. During algorithm |
68 | 73 |
|
69 | 74 | While Fusion Studio supports multiple workspace creation methods (Scratch, Starter Pack, AI Assist), the **ML workflow remains identical for all workspaces**. |
70 | 75 |
|
71 | | -## Test with SystemView |
| 76 | +## Analyze Timing with SystemView |
| 77 | + |
| 78 | +[SEGGER SystemView](https://www.segger.com/products/development-tools/systemview/) can be used for timing analysis. The application includes annotations that let you measure the timing of different compute blocks, as shown below. |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | +### Capture SystemView Data with J-Link |
| 83 | + |
| 84 | +> [!NOTE] |
| 85 | +> This configuration is used for interactive debugging with the on-board J-Link adapter of the AppKit-E8. |
| 86 | +
|
| 87 | +- Open `Manage Solution Settings`, select `Target Set: J-Link` and download the application to the AppKit-E8. |
| 88 | +- Start the [SystemView tool](https://www.segger.com/downloads/systemview/) on the host computer and: |
| 89 | + - Select Target - Recorder Configuration and use the following settings: |
| 90 | + - SystemView Recorder: J-Link |
| 91 | + - J-Link Connection: USB |
| 92 | + - Target Connection: AE822FA0E5597BS0_M55_HP |
| 93 | + - RTT Control Block Detection: Address of .bss._SEGGER_RTT in linker map file (i.e. 0x02002200) |
| 94 | + |
| 95 | +### Capture SystemView Data with PyOCD |
72 | 96 |
|
73 | | -## Contiguous Integration (CI) |
| 97 | +> [!NOTE] |
| 98 | +> This configuration is used for CI testing with [Run_RPS_AppKit-E8](./.github/workflows/Run_RPS_AppKit-E8.yml). The relevant RTT and SystemView settings are part of [`AppKit-E8_USB/SDS.csolution.yml`](./RockPaperScissors/AppKit-E8_USB/SDS.csolution.yml). It requires a CMSIS-DAP debug adapter that is connected to the JTAG port of the AppKit-E8. |
74 | 99 |
|
75 | | -This repository uses [CI Workflows](https://github.com/Arm-Examples/.github/blob/main/profile/CICD.md) listed below to build artifacts and verify projects. Examples are verified with the build system of Keil Studio that uses the CMSIS-Toolbox and CMake. Using this toolchain supports CI with: |
| 100 | +- Open `Manage Solution Settings`, select `Target Set: HIL` and download the application to the AppKit-E8. |
| 101 | +- Start the pyOCD Run task (Terminal - Run Task... - pyOCD Run). You may terminate pyOCD using the keyboard. This should generate the following output: |
76 | 102 |
|
77 | | -Tool installation based on a single vcpkg-configuration.json file for desktop and CI environments. |
78 | | -CMSIS solution files (*.csolution.yml) that enable seamless builds in CI, for example using GitHub actions. |
| 103 | +```txt |
| 104 | + 0002041 W Skipping CoreSight discovery for AHB5-AP@0x40000 because it is disabled [ap] |
| 105 | + 0002223 I RTT channel 1 configuration for core 0: mode=systemview-server, port=19021 [rtt_manager] |
| 106 | + 0002223 W RTT for core 1: no channels configured; RTT disabled [rtt_manager] |
| 107 | + 0002226 I Run server started for M55_HP (core 0); STDIO mode: console; RTT: enabled [run_cmd] |
| 108 | + 0002227 I Run server started for M55_HE (core 1); STDIO mode: off; RTT: disabled [run_cmd] |
| 109 | + 0002231 E Error writing RTT down channel 1: SWD/JTAG communication failure (WAIT ACK) [rtt_server] |
| 110 | + 0002245 W Target core 1 unexpectedly halted at pc=0x00000ed2 [run_cmd] |
| 111 | + 0043783 I KeyboardInterrupt received; shutting down Run servers [run_cmd] |
| 112 | +``` |
79 | 113 |
|
80 | | -CI Workflow | Description |
| 114 | +The `pyOCD run` command captures the file `./out/SDS+AppKit-E8-U85.SVDat`. Open that file with the SystemView application on the host computer to view the recording. |
| 115 | + |
| 116 | +## Continuous Integration (CI) |
| 117 | + |
| 118 | +This repository uses the [CI workflows](https://github.com/Arm-Examples/.github/blob/main/profile/CICD.md) listed below to build artifacts and verify projects. Examples are verified with the Keil Studio build system, which uses CMSIS-Toolbox and CMake. This toolchain supports CI by: |
| 119 | + |
| 120 | +- Installing tools from a single [vcpkg-configuration.json](./vcpkg-configuration.json) file for desktop and CI environments. |
| 121 | +- Using CMSIS solution files (`*.csolution.yml`) to enable seamless builds in CI, for example with GitHub Actions. |
| 122 | + |
| 123 | +[GitHub Action](./actions) | Description |
81 | 124 | :--------------------------------------------------------------------|:--------------------------------------- |
82 | | -[Test_RPS_SSE-320-U85](./.github/workflows/Test_RPS_SSE-320-U85.yml) | Build and run image with SDS data input on FVP simulation model |
83 | | -[Build_RPS_AppKit-E8](./.github/workflows/Build_RPS_AppKit-E8.yml) | Build image with SystemView enabled for testing on hardware |
84 | | -[Run_RPS_AppKit-E8](./.github/workflows/Run_RPS_AppKit-E8.yml) | Run image on hardware with SDSIO-Server and SystemView for timing analysis |
85 | | -[Build_Variants](./.github/workflows/Build_Variants.yml) | Ensure that everything builds; Build the different context variants: `project.build-type+target-type` |
| 125 | +[Test_RPS_SSE-320-U85.yml](./.github/workflows/Test_RPS_SSE-320-U85.yml) | Build and run image with SDS data input on FVP simulation model |
| 126 | +[Build_RPS_AppKit-E8.yml](./.github/workflows/Build_RPS_AppKit-E8.yml) | Build image with SystemView enabled for testing on [target hardware](./Documentation/README.md#target-hardware). |
| 127 | +[Run_RPS_AppKit-E8.yml](./.github/workflows/Run_RPS_AppKit-E8.yml) | Run image on hardware with SDSIO-Server and SystemView for timing analysis |
| 128 | +[Build_Variants.yml](./.github/workflows/Build_Variants.yml) | Ensure that everything builds; Build the different context variants: `project.build-type+target-type` |
| 129 | + |
| 130 | +### Build and Run Image on FVP Simulation Model |
| 131 | + |
| 132 | +The action [Test_RPS_SSE-320-U85.yml](./.github/workflows/Test_RPS_SSE-320-U85.yml) builds and executes the application on the FVP simulation model. The same commands can be executed in the IDE by selecting the target type `SSE-320-U85` in the Manage Solution dialog (which uses a simulation model compatible with the AppKit-E8). |
| 133 | + |
| 134 | +The action executes the following commands to build and test the application. |
| 135 | + |
| 136 | +```cmd |
| 137 | +>cbuild SDS.csolution.yml --active SSE-320-U85 --packs |
| 138 | +> |
| 139 | +>FVP_Corstone_SSE-320 -f ./Board/Corstone-320/fvp_config.txt -a ./out/AlgorithmTest/SSE-320-U85/Debug/AlgorithmTest.axf --simlimit 120 |
| 140 | +``` |
| 141 | + |
| 142 | +> [!TIP] |
| 143 | +> You can clone the repository and run the workflow and examine the test results in detail. |
| 144 | +
|
| 145 | +The picture below shows the output of the [Test_RPS_SSE-320-U85.yml action](./actions/workflows/Test_RPS_SSE-320-U85.yml). The artifacts file `RPS_SSE-320-U85_FVP` contains the `out` directory with the generated image and new `SDS recordings` captured during playback (`*.p.sds` files) along with the simulation log file (`sdsio.log`). |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | +### Build and Run Image on Target Hardware |
| 150 | + |
| 151 | +The [Build_RPS_AppKit-E8.yml](./.github/workflows/Build_RPS_AppKit-E8.yml) workflow executes on a GitHub-hosted runner and generates the image with SystemView enabled for testing on [target hardware](./Documentation/README.md#target-hardware). Once generated, the image is stored as the artifact `RPS_AppKit-E8-U85_HIL`, which is then downloaded by [Run_RPS_AppKit-E8.yml](./.github/workflows/Run_RPS_AppKit-E8.yml). |
| 152 | + |
| 153 | +The [Run_RPS_AppKit-E8.yml](./.github/workflows/Run_RPS_AppKit-E8.yml) workflow executes on a Raspberry Pi (RPi). It therefore requires [setting up and configuring a self-hosted GitHub Runner on Raspberry Pi 5](https://github.com/Arm-Examples/.github/blob/main/profile/RPI_GH_Runner.md). The AppKit-E8 is connected to the RPi as shown below. |
| 154 | + |
| 155 | + |
| 156 | + |
| 157 | +The [Run_RPS_AppKit-E8.yml](./.github/workflows/Run_RPS_AppKit-E8.yml) workflow is triggered when [Build_RPS_AppKit-E8.yml](./.github/workflows/Build_RPS_AppKit-E8.yml) stores a new `RPS_AppKit-E8-U85_HIL` artifact. pyOCD connects through a CMSIS-DAP debug unit to download and execute the image on the AppKit-E8. During execution, pyOCD captures RTT `printf` output and the SystemView data file. The SDSIO-Server (also running on the RPi) uses the configuration file `SDS.sdsio.yml`. The `play:` node defines the SDS data files that are streamed for playback and recording. |
| 158 | + |
| 159 | +Once the test completes, the RTT output and SystemView data file (captured with pyOCD), and the recorded SDS data files with extension `.p.sds` (captured with SDSIO-Server), are uploaded as artifacts. |
| 160 | + |
| 161 | +The picture below shows the output of the [Run_RPS_AppKit-E8.yml action](./.actions/workflows/Run_RPS_AppKit-E8.yml). The artifact `RPS_AppKit-E8-U85_HIL` contains the generated image, and the run uploads the log file `sdsio-server.log` together with new `SDS recordings` captured during playback (`*.p.sds` files). |
| 162 | + |
| 163 | + |
86 | 164 |
|
87 | 165 | ## Issues or Questions |
88 | 166 |
|
|
0 commit comments