Skip to content

Commit d3a1a22

Browse files
authored
Merge pull request #127 from Burton2000/main
MLECO-3805: Unblocking Arm Ethos-U65 NPU builds
2 parents 59de650 + f495199 commit d3a1a22

File tree

7 files changed

+60
-26
lines changed

7 files changed

+60
-26
lines changed

cmsis-pack-examples/.vscode/tasks.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,23 @@
6262
"isDefault": false
6363
}
6464
},
65-
{
66-
"type": "cmsis-csolution.build",
67-
"project": "${command:cmsis-csolution.getCprjPath}",
68-
"problemMatcher": [],
69-
"label": "cmsis-csolution.build: Build"
70-
},
7165
{
7266
"type": "embedded-debug.flash",
7367
"serialNumber": "${command:device-manager.getSerialNumber}",
7468
"program": "${command:cmsis-csolution.getBinaryFile}",
7569
"cmsisPack": "${command:device-manager.getDevicePack}",
7670
"problemMatcher": [],
7771
"label": "embedded-debug.flash: Flash Device"
72+
},
73+
{
74+
"type": "cmsis-csolution.build",
75+
"solution": "${command:cmsis-csolution.getSolutionPath}",
76+
"project": "${command:cmsis-csolution.getProjectPath}",
77+
"buildType": "${command:cmsis-csolution.getBuildType}",
78+
"targetType": "${command:cmsis-csolution.getTargetType}",
79+
"rebuild": false,
80+
"problemMatcher": [],
81+
"label": "cmsis-csolution.build: Build"
7882
}
7983
],
8084

cmsis-pack-examples/README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ Target platforms supported:
3636

3737
| Name | Type | IP | Examples |
3838
|---------------------|---------------------|-----------------------------------------------|----------|
39-
| Arm® Corstone™-300 | Virtual or physical | Arm® Cortex®-M55 CPU with Arm® Ethos™-U55 NPU | All |
40-
| Arm® Corstone™-310 | Virtual or physical | Arm® Cortex®-M85 CPU with Arm® Ethos™-U55 NPU | All |
39+
| Arm® Corstone™-300 | Virtual or physical | Arm® Cortex®-M55 CPU with Arm® Ethos™-U55 or Arm® Ethos™-U65 NPU | All |
40+
| Arm® Corstone™-310 | Virtual or physical | Arm® Cortex®-M85 CPU with Arm® Ethos™-U55 or Arm® Ethos™-U65 NPU | All |
4141
| Alif Ensemble E7 | Physical board | Arm® Cortex®-M55 CPU with Arm® Ethos™-U55 NPU | All |
4242
| STM32F746G-Discovery| Physical board | Arm® Cortex®-M7 CPU | KWS |
4343
| NXP FRDM-K64F | Physical board | Arm® Cortex®-M4 CPU | KWS |
@@ -173,34 +173,50 @@ downloaded using the following command:
173173
warning csolution: specified device 'MK64FN1M0VLL12' and board mounted device 'MK64FN1M0xxx12' are different
174174
warning csolution: specified device 'MK64FN1M0VLL12' and board mounted device 'MK64FN1M0xxx12' are different
175175
/home/user/cmsis-pack-examples/object-detection/object-detection.Debug+AVH-SSE-300-U55.cprj - info csolution: file generated successfully
176+
/home/user/cmsis-pack-examples/object-detection/object-detection.Debug+AVH-SSE-300-U65.cprj - info csolution: file generated successfully
176177
/home/user/cmsis-pack-examples/object-detection/object-detection.Debug+AVH-SSE-310-U55.cprj - info csolution: file generated successfully
178+
/home/user/cmsis-pack-examples/object-detection/object-detection.Debug+AVH-SSE-310-U65.cprj - info csolution: file generated successfully
177179
/home/user/cmsis-pack-examples/object-detection/object-detection.Debug+Alif-E7-M55-HP.cprj - info csolution: file generated successfully
178180
/home/user/cmsis-pack-examples/object-detection/object-detection.Release+AVH-SSE-300-U55.cprj - info csolution: file generated successfully
181+
/home/user/cmsis-pack-examples/object-detection/object-detection.Release+AVH-SSE-300-U65.cprj - info csolution: file generated successfully
179182
/home/user/cmsis-pack-examples/object-detection/object-detection.Release+AVH-SSE-310-U55.cprj - info csolution: file generated successfully
183+
/home/user/cmsis-pack-examples/object-detection/object-detection.Release+AVH-SSE-310-U65.cprj - info csolution: file generated successfully
180184
/home/user/cmsis-pack-examples/object-detection/object-detection.Release+Alif-E7-M55-HP.cprj - info csolution: file generated successfully
181185
/home/user/cmsis-pack-examples/kws/kws.Debug+AVH-SSE-300-U55.cprj - info csolution: file generated successfully
186+
/home/user/cmsis-pack-examples/kws/kws.Debug+AVH-SSE-300-U65.cprj - info csolution: file generated successfully
182187
/home/user/cmsis-pack-examples/kws/kws.Debug+AVH-SSE-310-U55.cprj - info csolution: file generated successfully
188+
/home/user/cmsis-pack-examples/kws/kws.Debug+AVH-SSE-310-U65.cprj - info csolution: file generated successfully
183189
/home/user/cmsis-pack-examples/kws/kws.Debug+Alif-E7-M55-HE.cprj - info csolution: file generated successfully
184190
/home/user/cmsis-pack-examples/kws/kws.Debug+FRDM-K64F.cprj - info csolution: file generated successfully
185191
/home/user/cmsis-pack-examples/kws/kws.Debug+STM32F746-DISCO.cprj - info csolution: file generated successfully
186192
/home/user/cmsis-pack-examples/kws/kws.Release+AVH-SSE-300-U55.cprj - info csolution: file generated successfully
193+
/home/user/cmsis-pack-examples/kws/kws.Release+AVH-SSE-300-U65.cprj - info csolution: file generated successfully
187194
/home/user/cmsis-pack-examples/kws/kws.Release+AVH-SSE-310-U55.cprj - info csolution: file generated successfully
195+
/home/user/cmsis-pack-examples/kws/kws.Release+AVH-SSE-310-U65.cprj - info csolution: file generated successfully
188196
/home/user/cmsis-pack-examples/kws/kws.Release+Alif-E7-M55-HE.cprj - info csolution: file generated successfully
189197
/home/user/cmsis-pack-examples/kws/kws.Release+FRDM-K64F.cprj - info csolution: file generated successfully
190198
/home/user/cmsis-pack-examples/kws/kws.Release+STM32F746-DISCO.cprj - info csolution: file generated successfully
191199
/home/user/cmsis-pack-examples/object-detection/object-detection.Debug+AVH-SSE-300-U55.cbuild.yml - info csolution: file generated successfully
200+
/home/user/cmsis-pack-examples/object-detection/object-detection.Debug+AVH-SSE-300-U65.cbuild.yml - info csolution: file generated successfully
192201
/home/user/cmsis-pack-examples/object-detection/object-detection.Debug+AVH-SSE-310-U55.cbuild.yml - info csolution: file generated successfully
202+
/home/user/cmsis-pack-examples/object-detection/object-detection.Debug+AVH-SSE-310-U65.cbuild.yml - info csolution: file generated successfully
193203
/home/user/cmsis-pack-examples/object-detection/object-detection.Debug+Alif-E7-M55-HP.cbuild.yml - info csolution: file generated successfully
194204
/home/user/cmsis-pack-examples/object-detection/object-detection.Release+AVH-SSE-300-U55.cbuild.yml - info csolution: file generated successfully
205+
/home/user/cmsis-pack-examples/object-detection/object-detection.Release+AVH-SSE-300-U65.cbuild.yml - info csolution: file generated successfully
195206
/home/user/cmsis-pack-examples/object-detection/object-detection.Release+AVH-SSE-310-U55.cbuild.yml - info csolution: file generated successfully
207+
/home/user/cmsis-pack-examples/object-detection/object-detection.Release+AVH-SSE-310-U65.cbuild.yml - info csolution: file generated successfully
196208
/home/user/cmsis-pack-examples/object-detection/object-detection.Release+Alif-E7-M55-HP.cbuild.yml - info csolution: file generated successfully
197209
/home/user/cmsis-pack-examples/kws/kws.Debug+AVH-SSE-300-U55.cbuild.yml - info csolution: file generated successfully
210+
/home/user/cmsis-pack-examples/kws/kws.Debug+AVH-SSE-300-U65.cbuild.yml - info csolution: file generated successfully
198211
/home/user/cmsis-pack-examples/kws/kws.Debug+AVH-SSE-310-U55.cbuild.yml - info csolution: file generated successfully
212+
/home/user/cmsis-pack-examples/kws/kws.Debug+AVH-SSE-310-U65.cbuild.yml - info csolution: file generated successfully
199213
/home/user/cmsis-pack-examples/kws/kws.Debug+Alif-E7-M55-HE.cbuild.yml - info csolution: file generated successfully
200214
/home/user/cmsis-pack-examples/kws/kws.Debug+FRDM-K64F.cbuild.yml - info csolution: file generated successfully
201215
/home/user/cmsis-pack-examples/kws/kws.Debug+STM32F746-DISCO.cbuild.yml - info csolution: file generated successfully
202216
/home/user/cmsis-pack-examples/kws/kws.Release+AVH-SSE-300-U55.cbuild.yml - info csolution: file generated successfully
217+
/home/user/cmsis-pack-examples/kws/kws.Release+AVH-SSE-300-U65.cbuild.yml - info csolution: file generated successfully
203218
/home/user/cmsis-pack-examples/kws/kws.Release+AVH-SSE-310-U55.cbuild.yml - info csolution: file generated successfully
219+
/home/user/cmsis-pack-examples/kws/kws.Release+AVH-SSE-310-U65.cbuild.yml - info csolution: file generated successfully
204220
/home/user/cmsis-pack-examples/kws/kws.Release+Alif-E7-M55-HE.cbuild.yml - info csolution: file generated successfully
205221
/home/user/cmsis-pack-examples/kws/kws.Release+FRDM-K64F.cbuild.yml - info csolution: file generated successfully
206222
/home/user/cmsis-pack-examples/kws/kws.Release+STM32F746-DISCO.cbuild.yml - info csolution: file generated successfully
@@ -431,3 +447,10 @@ spot immediately. Please help us improve this section by reporting them via GitH
431447
test against. While we try to develop using the latest versions of the CMSIS toolbox, Keil
432448
Studio Cloud can be using older versions. If you find an issue, please report it via
433449
[GitHub](https://github.com/Arm-Examples/mlek-cmsis-pack-examples/issues).
450+
451+
6. Issues running with Arm® Ethos™-U65 NPU on Keil Studio Cloud
452+
453+
Currently Keil Studio Cloud only supports running with the Arm® Ethos™-U55 on AVH
454+
virtual targets.
455+
You can build the project but will have to run it on your local machine on an
456+
installation of the equivalent Fixed Virtual Platform containing Arm® Ethos™-U65 NPU.

cmsis-pack-examples/device/corstone/src/BoardInit.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ extern "C" {
3030
#include CMSIS_device_header /* Gives us IRQ num, base addresses. */
3131

3232
#if defined(ETHOSU_ARCH)
33-
#include "ethosu_driver.h" /* Arm Ethos-U driver header */
33+
#include "ethosu_driver.h" /* Arm Ethos-U NPU driver header */
34+
#include "ethosu_mem_config.h" /* Arm Ethos-U NPU memory config */
3435

3536
#if defined(ETHOS_U_CACHE_BUF_SZ) && (ETHOS_U_CACHE_BUF_SZ > 0)
3637
static uint8_t cache_arena[ETHOS_U_CACHE_BUF_SZ] CACHE_BUF_ATTRIBUTE;
@@ -88,6 +89,8 @@ static int arm_ethosu_npu_init(void)
8889
/* Initialise Ethos-U device */
8990
const void* ethosu_base_address = (void*)(ETHOS_U55_APB_BASE_S);
9091

92+
debug("Cache arena: 0x%p\n", get_cache_arena());
93+
9194
if (0 != (err = ethosu_init(&ethosu_drv, /* Ethos-U driver device pointer */
9295
ethosu_base_address, /* Ethos-U NPU's base address. */
9396
get_cache_arena(), /* Pointer to fast mem area - NULL for U55. */

cmsis-pack-examples/kws/kws.cproject.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ project:
8282
- file: linker/alif-e7-m55-he.sct
8383
for-type: +Alif-E7-M55-HE
8484

85-
defines:
85+
define:
8686
- ACTIVATION_BUF_SZ=131072
8787

8888
layers:

cmsis-pack-examples/kws/src/main_wav.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ int main()
130130
preProcess.m_audioDataWindowSize,
131131
preProcess.m_audioDataStride);
132132

133+
debug("Using audio data from %s\n", get_filename(0));
134+
133135
while (audioDataSlider.HasNext()) {
134136
const int16_t* inferenceWindow = audioDataSlider.Next();
135137

cmsis-pack-examples/mlek.csolution.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ solution:
5151
target-types:
5252
- type: AVH-SSE-300-U55
5353
device: ARM::SSE-300-MPS3
54-
defines:
54+
define:
5555
- ETHOSU55
5656

5757
- type: AVH-SSE-310-U55
5858
device: ARM::SSE-310-MPS3
59-
defines:
59+
define:
6060
- ETHOSU55
6161

6262
- type: FRDM-K64F
@@ -69,27 +69,27 @@ solution:
6969

7070
- type: Alif-E7-M55-HP
7171
device: AE722F80F55D5TE:M55_HP
72-
defines:
72+
define:
7373
- ETHOSU55
7474
- USART_DRV_NUM=2
7575

7676
- type: Alif-E7-M55-HE
7777
device: AE722F80F55D5TE:M55_HE
78-
defines:
78+
define:
7979
- ETHOSU55
8080
- USART_DRV_NUM=4
8181

82-
# Currently Keil Studio doesn't allow switching between different NPU configurations.
83-
# Uncomment when this is fixed.
84-
# - type: AVH-SSE-300-U65
85-
# device: ARM::SSE-300-MPS3
86-
# defines:
87-
# - "ETHOSU65"
88-
#
89-
# - type: AVH-SSE-310-U65
90-
# device: ARM::SSE-310-MPS3
91-
# define:
92-
# - "ETHOSU65"
82+
# NOTE: Currently Keil Studio Cloud doesn't allow switching between different NPU configurations.
83+
# Applicatons produced by this build will only work if the FVP is run manually.
84+
- type: AVH-SSE-300-U65
85+
device: ARM::SSE-300-MPS3
86+
define:
87+
- ETHOSU65
88+
89+
- type: AVH-SSE-310-U65
90+
device: ARM::SSE-310-MPS3
91+
define:
92+
- ETHOSU65
9393

9494
output-dirs:
9595
rtedir: ./$Project$/RTE

cmsis-pack-examples/object-detection/object-detection.cproject.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ project:
3636
- file: src/main_static.cpp
3737
for-type:
3838
- +AVH-SSE-300-U55
39+
- +AVH-SSE-300-U65
3940
- +AVH-SSE-310-U55
41+
- +AVH-SSE-310-U65
4042
- file: src/main_live.cpp
4143
for-type:
4244
- +Alif-E7-M55-HP
@@ -55,7 +57,7 @@ project:
5557
for-type: +Alif-E7-M55-HP
5658

5759

58-
defines:
60+
define:
5961
- "ACTIVATION_BUF_SZ=532480"
6062

6163
layers:

0 commit comments

Comments
 (0)