Skip to content

Commit 639ede3

Browse files
Added Zephyr example for the new Zephyr runtime
1 parent 7a09de6 commit 639ede3

40 files changed

Lines changed: 1691 additions & 4 deletions

.vscode/settings.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,11 @@
107107
"shared_mutex": "cpp"
108108
},
109109
"debug.hideSlowPreLaunchWarning": true,
110-
"debug.showInStatusBar": "never"
110+
"debug.showInStatusBar": "never",
111+
"cmsis-csolution.environmentVariables": {
112+
"ZEPHYR_BASE": "$HOME/benchresults/sdk-alif/zephyr",
113+
"VIRTUAL_ENV": "$HOME/benchresults/PythonWrapperTests/devenv",
114+
"PATH":"$HOME/benchresults/PythonWrapperTests/devenv/Scripts"
115+
},
116+
"cmsis-csolution.autoDebugLaunch": true
111117
}

.vscode/tasks.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"type": "shell",
88
"command": "FVP_Corstone_SSE-300_Ethos-U55",
99
"options": {
10-
"cwd": "${workspaceFolder}/Examples/hello_example",
10+
"cwd": "${workspaceFolder}/Examples/CMSISStreamHelloZephyr",
1111
"shell": {
1212
"executable": "cmd.exe",
1313
"args": [
@@ -18,9 +18,9 @@
1818
},
1919
"args": [
2020
"-f",
21-
"fvp_config.txt",
21+
"boards/fvp_config.txt",
2222
"-a",
23-
"out/Hello/SSE-300-MPS3/Debug/Hello.elf",
23+
"out/CMSISStreamHello/AVH-SSE-300/Debug/zephyr/zephyr.elf",
2424
""
2525
]
2626
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright (c) 2024 Arm Limited. All rights reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
// <<< Use Configuration Wizard in Context Menu >>>
5+
6+
// <e> Fixed Debug Authentication
7+
// <i> Use a fixed value for Debug Authentication. Only secure debug authentication configurable.
8+
DAuthFixed = 0x1;
9+
10+
// <q.2> Secure Invasive Debug
11+
// <q.3> Secure Non-Invasive Debug
12+
DAuthConfig = 0xF;
13+
14+
// </e>
15+
16+
// <<< end of configuration section >>>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright (c) 2024 Arm Limited. All rights reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
// <<< Use Configuration Wizard in Context Menu >>>
5+
6+
// <e> Fixed Debug Authentication
7+
// <i> Use a fixed value for Debug Authentication. Only secure debug authentication configurable.
8+
DAuthFixed = 0x1;
9+
10+
// <q.2> Secure Invasive Debug
11+
// <q.3> Secure Non-Invasive Debug
12+
DAuthConfig = 0xF;
13+
14+
// </e>
15+
16+
// <<< end of configuration section >>>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
tmp/
2+
out/
3+
.clangd
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"debug.hideSlowPreLaunchWarning": true,
3+
"debug.showInStatusBar": "never",
4+
"cmake.ignoreCMakeListsMissing": true,
5+
"files.associations": {
6+
"stdio.h": "c",
7+
"vector": "cpp",
8+
"type_traits": "cpp",
9+
"variant": "cpp",
10+
"stream.h": "c",
11+
"xtr1common": "cpp",
12+
"kconfig": "cpp",
13+
"utility": "cpp",
14+
"xiosbase": "cpp"
15+
},
16+
"cmsis-csolution.autoDebugLaunch": false,
17+
"cmsis-csolution.environmentVariables": {
18+
"ZEPHYR_BASE": "$HOME/benchresults/sdk-alif/zephyr",
19+
"VIRTUAL_ENV": "$HOME/benchresults/PythonWrapperTests/devenv",
20+
"PATH": "$HOME/benchresults/PythonWrapperTests/devenv/Scripts"
21+
}
22+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "CMSIS Load+Run",
6+
"type": "shell",
7+
"command": "FVP_Corstone_SSE-300_Ethos-U55",
8+
"options": {
9+
"cwd": "${workspaceFolder}/",
10+
"shell": {
11+
"executable": "cmd.exe",
12+
"args": [
13+
"/d",
14+
"/c"
15+
]
16+
}
17+
},
18+
"args": [
19+
"-f",
20+
"boards/fvp_config.txt",
21+
"-a",
22+
"out/CMSISStreamHello/AVH-SSE-300/Debug/zephyr/zephyr.elf",
23+
""
24+
],
25+
"problemMatcher": []
26+
}
27+
]
28+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
cmake_minimum_required(VERSION 3.20.0)
4+
5+
6+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
7+
project(cmsis_stream_hello)
8+
9+
target_sources(app PRIVATE
10+
src/main.cpp
11+
src/stream_init.cpp
12+
src/hello_graph/scheduler_hello.cpp
13+
src/hello_graph/hello_params.c
14+
)
15+
16+
target_include_directories(app PRIVATE
17+
src
18+
src/config
19+
src/hello_graph
20+
)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# CMSIS-Stream Hello on Zephyr
2+
3+
This example is the Zephyr equivalent of `Examples/hello_example` from the
4+
CMSIS-Stream repository. It builds the same generated `hello` graph, but uses
5+
the CMSIS-Stream Zephyr runtime and runs on the Arm Corstone-300 FVP.
6+
7+
The CMSIS solution uses the `west` project mechanism, following the pattern used
8+
by `MyApps/ZephyrAudio/Zephyr.csolution.yml`.
9+
10+
Build with CMSIS Toolbox:
11+
12+
```bat
13+
cbuild Zephyr.csolution.yml --context CMSISStreamHello.Debug+AVH-SSE-300
14+
```
15+
16+
Or build directly with west from this directory:
17+
18+
```bat
19+
west build -p auto -b mps3/corstone300/fvp .
20+
west build -t run
21+
```
22+
23+
The project expects the CMSIS-Stream Zephyr module to be available in the SDK
24+
west workspace at `modules/lib/cmsisstream`. Add it to the west manifest with:
25+
26+
```yaml
27+
- name: cmsisstream
28+
url: https://github.com/ARM-software/CMSIS-Stream
29+
revision: main
30+
path: modules/lib/cmsisstream
31+
```

0 commit comments

Comments
 (0)