Skip to content

Commit b9c9bf2

Browse files
Merge pull request #149 from kshitij-sisodia-arm/feature/mleco-5494
MLECO-5494: Updating to CMSIS-6 and other latest packs
2 parents bae03eb + 2566af6 commit b9c9bf2

File tree

7 files changed

+41
-85
lines changed

7 files changed

+41
-85
lines changed

cmsis-pack-examples/README.md

Lines changed: 18 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,17 @@ Python3.9 but this may change for future releases.
142142

143143
## Launch project in Visual Studio Code
144144

145-
Upon opening the project in Visual Studio Code, `vcpkg` will automatically install the required packages as specified in the manifest file [vcpkg-configuration.json](vcpkg-configuration.json).
145+
Upon opening the project in Visual Studio Code, `vcpkg` will automatically install the required packages as specified in
146+
the manifest file [vcpkg-configuration.json](vcpkg-configuration.json). These may include the FVP binaries.
146147

147148
## Download Software Packs
148149

149150
Once `vcpkg` has finished configuring the environment, a prompt will appear to install the required CMSIS packs for this project:
150151

151152
![](docs/01-install-cmsis-packs.png)
152153

154+
Recent versions of CMSIS toolbox will automatically install the missing packs when a project is built.
155+
153156
Alternatively, the packs can be installed manually be opening up a Terminal in Visual Studio Code (Ctrl + Shift + `) and running the following commands:
154157

155158
```
@@ -166,46 +169,21 @@ Use the CMSIS tab in the Activity Bar to build, run and debug the use case sampl
166169
Simply use the drop-down menus to specify your build, then click the Build button. The output should look similar to the following:
167170

168171
```log
169-
* Executing task: Workspace: cmsis-csolution.build: Build
170-
171-
info cbuild: Build Invocation 2.0.0 (C) 2023 Arm Ltd. and Contributors
172-
/home/armuser/Development/ML-examples/cmsis-pack-examples/object-detection/object-detection.Debug+AVH-SSE-300-U55.cprj - info csolution: file generated successfully
173-
/home/armuser/Development/ML-examples/cmsis-pack-examples/object-detection/object-detection.Debug+AVH-SSE-300-U55.cbuild.yml - info csolution: file is already up-to-date
174-
/home/armuser/Development/ML-examples/cmsis-pack-examples/mlek.cbuild-idx.yml - info csolution: file is already up-to-date
175-
info cbuild: Processing 1 context(s)
176-
===============================================================================
177-
info cbuild: (1/1) Processing context: "object-detection.Debug+AVH-SSE-300-U55"
178-
info cbuild: clean finished successfully!
179-
180-
M650: Command completed successfully.
181-
182-
M652: Generated file for project build: '/home/armuser/Development/ML-examples/cmsis-pack-examples/tmp/object-detection/AVH-SSE-300-U55/Debug/CMakeLists.txt'
183-
-- The C compiler identification is ARMClang 6.20.2
184-
-- The CXX compiler identification is ARMClang 6.20.2
185-
-- Detecting C compiler ABI info
186-
-- Detecting C compiler ABI info - done
187-
-- Check for working C compiler: /home/armuser/.config/Code/User/globalStorage/ms-vscode.vscode-embedded-tools/vcpkg/root/downloads/artifacts/vcpkg-artifacts-arm/compilers.arm.armclang/6.20.0/bin/armclang - skipped
188-
-- Detecting C compile features
189-
-- Detecting C compile features - done
190-
-- Detecting CXX compiler ABI info
191-
-- Detecting CXX compiler ABI info - done
192-
-- Check for working CXX compiler: /home/armuser/.config/Code/User/globalStorage/ms-vscode.vscode-embedded-tools/vcpkg/root/downloads/artifacts/vcpkg-artifacts-arm/compilers.arm.armclang/6.20.0/bin/armclang - skipped
193-
-- Detecting CXX compile features
194-
-- Detecting CXX compile features - done
195-
-- Registered toolchain version 6.20.0 does not match running version 6.20.2
196-
-- Configuring done
197-
-- Generating done
198-
-- Build files have been written to: /home/armuser/Development/ML-examples/cmsis-pack-examples/tmp/object-detection/AVH-SSE-300-U55/Debug
199-
[1/257] Building C object CMakeFiles/object-detection.dir/home/armuser/.cache/arm/packs/ARM/V2M_MPS3_SSE_300_BSP/1.3.0/Native_Driver/systimer_armv8-m_timeout.o
200-
...
172+
* Executing task: cmsis-csolution.build: Build
173+
> cbuild /home/kshsis01/eco-projects/oss/ML-examples/cmsis-pack-examples/mlek.csolution.yml --update-rte --packs --context object-detection.Release+AVH-SSE-300-U55
174+
/home/kshsis01/eco-projects/oss/ML-examples/cmsis-pack-examples/mlek.csolution.yml - warning csolution: cproject.yml files should be placed in separate sub-directories
175+
/home/kshsis01/eco-projects/oss/ML-examples/cmsis-pack-examples/mlek.csolution.yml - warning csolution: cproject.yml files should be placed in separate sub-directories
176+
+-----------------------------------------------------------------
177+
(1/1) Building context: "object-detection.Release+AVH-SSE-300-U55"
178+
Building CMake target 'object-detection.Release+AVH-SSE-300-U55'
179+
[1/306] Building CXX object CMakeFiles/Group_MainStatic.dir/home/kshsis01/eco-projects/oss/ML-examples/cmsis-pack-examples/object-detection/src/InputFiles.o
180+
[2/306] Building C object CMakeFiles/Group_Retarget.dir/home/kshsis01/eco-projects/oss/ML-examples/cmsis-pack-examples/device/corstone/src/retarget.o
201181
...
202-
[257/257] Linking CXX executable /home/armuser/Development/ML-examples/cmsis-pack-examples/out/object-detection/AVH-SSE-300-U55/Debug/object-detection.axf
203-
Warning: L6439W: Multiply defined Global Symbol flatbuffers::flatbuffer_version_string defined in .data._ZN11flatbuffers25flatbuffer_version_stringE(Model.o) rejected in favor of Symbol defined in .data._ZN11flatbuffers25flatbuffer_version_stringE(Classifier.o).
204182
...
205-
...
206-
"/home/armuser/Development/ML-examples/cmsis-pack-examples/object-detection/linker/mps3-sse-300.sct", line 104 (column 14): Warning: L6314W: No section matches pattern *.o(activation_buf_dram).
207-
Finished: 0 information, 129 warning and 0 error messages.
208-
info cbuild: build finished successfully!
183+
[306/306] Linking CXX executable /home/kshsis01/eco-projects/oss/ML-examples/cmsis-pack-examples/out/object-detection/AVH-SSE-300-U55/Release/object-detection.axf
184+
+------------------------------------------------------------
185+
Build summary: 1 succeeded, 0 failed - Time Elapsed: 00:00:23
186+
+============================================================
209187
Build complete
210188
* Terminal will be reused by tasks, press any key to close it.
211189
```
@@ -219,7 +197,7 @@ a physical hardware board.
219197

220198
- When using a Fixed Virtual Platform (FVP) installed locally:
221199
```shell
222-
$ <path_to_installed_FVP> -a ./out/kws/AVH-SSE-300-U55/Debug/kws.Debug+AVH-SSE-300-U55.axf -f ./FVP/FVP_Corstone_SSE-300/fvp_config.txt
200+
$ FVP_Corstone_SSE-300_Ethos-U55 -a out/object-detection/AVH-SSE-300-U55/Release/object-detection.axf -f ./FVP/FVP_Corstone_SSE-300/fvp_config.txt
223201
```
224202
> **NOTE**: The FVP defaults to running 128 MAC configuration for Arm® Ethos™-U55 NPU.
225203
> However, our default neural network model for the NPU is for 256 MAC configuration.
@@ -436,20 +414,3 @@ spot immediately. Please help us improve this section by reporting them via GitH
436414
virtual targets.
437415
You can build the project but will have to run it on your local machine on an
438416
installation of the equivalent Fixed Virtual Platform containing Arm® Ethos™-U65 NPU.
439-
440-
7. The newer versions of BSP packs for Arm® Corstone™-300 and Arm® Corstone™-310 require CMSIS 6.
441-
There are warnings about some unsatisfied requirements because of this. For example:
442-
```shell
443-
MISSING ARM::Device:[email protected]
444-
require CMSIS:[email protected]
445-
MISSING ARM::Device:Native Driver:[email protected]
446-
require CMSIS:[email protected]
447-
MISSING ARM::Device:Native Driver:[email protected]
448-
require CMSIS:[email protected]
449-
MISSING ARM::Device:Native Driver:[email protected]
450-
require CMSIS:[email protected]
451-
MISSING ARM::Device:Startup&C [email protected]
452-
require CMSIS:[email protected]
453-
```
454-
These are expected to be resolved once we bump up the version of CMSIS core pack. Currently,
455-
this is blocked by other dependencies.

cmsis-pack-examples/cdefault.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ default:
2323
misc:
2424
- for-compiler: AC6
2525
CPP:
26-
- -std=c++14
26+
- -std=c++17
2727
- -fno-exceptions
28-
- -Wno-license-management
2928
- -fno-rtti
29+
- -ffp-mode=full
30+
- -Wno-license-management
3031
C:
31-
- -std=c99
32+
- -std=c17
3233
- -Wno-license-management
3334
Link:
3435
- --entry=Reset_Handler

cmsis-pack-examples/common/common.clayer.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@ layer:
2727
- file: include/BufAttributes.hpp
2828
- file: include/ethosu_mem_config.h
2929

30-
# Workaround 4001: for TensorFlow's pack referring to
31-
# CMSIS_DEVICE_ARM_CORTEX_M_XX_HEADER_FILE.
32-
# Can be removed once the pack has been fixed.
33-
misc:
34-
- for-compiler: AC6
35-
CPP:
36-
- "-include \"RTE_Components.h\""
37-
3830
components:
3931
- component: ARM::CMSIS:CORE
4032
- component: ARM::CMSIS:DSP&Source
@@ -44,9 +36,6 @@ layer:
4436
- component: tensorflow::Data Processing:Math:kissfft
4537
- component: tensorflow::Data Processing:Math:ruy
4638
- component: tensorflow::Machine Learning:TensorFlow:Kernel Utils
47-
# Workaround 4001 (see description above)
48-
define:
49-
- CMSIS_DEVICE_ARM_CORTEX_M_XX_HEADER_FILE: CMSIS_device_header
5039
- component: tensorflow::Machine Learning:TensorFlow:Testing
5140
- component: ARM::ML Eval Kit:Common:API
5241
- component: ARM::ML Eval Kit:Common:Log

cmsis-pack-examples/device/alif-ensemble/alif-ensemble-E7-device.clayer.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ layer:
5858
- file: ./include/BoardInit.hpp
5959
- file: ./src/BoardInit.cpp
6060

61+
define:
62+
# For profiling under micro_time.cpp in TensorFlow Lite Micro pack
63+
- ARM_MODEL_USE_PMU_COUNTERS
64+
6165
components:
6266
- component: Arm::Machine Learning:NPU Support:Ethos-U Driver&Generic U55
6367
- component: tensorflow::Machine Learning:TensorFlow:Kernel&Ethos-U
@@ -67,7 +71,6 @@ layer:
6771
- component: AlifSemiconductor::Device:SOC Peripherals:PINCONF
6872
- component: AlifSemiconductor::Device:SOC Peripherals:MHU
6973
- component: AlifSemiconductor::Device:Startup
70-
- component: ARM::CMSIS Driver:USART:Custom
7174

7275
- component: AlifSemiconductor::Device:SOC Peripherals:DMA
7376
for-context: +Alif-E7-M55-HE
@@ -104,5 +107,3 @@ layer:
104107

105108
- component: AlifSemiconductor::Device:SE runtime Services:Initialization Helper
106109
for-context: +Alif-E7-M55-HP
107-
108-

cmsis-pack-examples/device/corstone/corstone-device.clayer.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ layer:
3939
- file: src/uart_stdout.h
4040
- file: include/BoardInit.hpp
4141

42+
define:
43+
# For profiling under micro_time.cpp in TensorFlow Lite Micro pack
44+
- ARM_MODEL_USE_PMU_COUNTERS
45+
4246
components:
4347
- component: ARM::Device:Definition
4448
- component: ARM::Device:Startup&C Startup
@@ -65,4 +69,4 @@ layer:
6569
for-context:
6670
- +AVH-SSE-300
6771
- +AVH-SSE-310
68-
- +AVH-SSE-315
72+
- +AVH-SSE-315
125 KB
Loading

cmsis-pack-examples/mlek.csolution.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ solution:
2222
cdefault: # use default setup of toolchain specific controls.
2323

2424
packs:
25-
- pack: ARM::CMSIS@5.9.0
26-
- pack: ARM::CMSIS-DSP@1.15.0
27-
- pack: ARM::CMSIS-NN@4.0.0
28-
- pack: Arm::ethos-u-core-driver@1.23.2
29-
- pack: ARM::ml-embedded-eval-kit-uc-api@23.2.0
30-
- pack: tensorflow::flatbuffers@1.23.2
31-
- pack: tensorflow::gemmlowp@1.23.2
32-
- pack: tensorflow::kissfft@1.23.2
33-
- pack: tensorflow::ruy@1.23.2
34-
- pack: tensorflow::tensorflow-lite-micro@1.23.2
25+
- pack: ARM::CMSIS@6.0.0
26+
- pack: ARM::CMSIS-DSP@1.16.0
27+
- pack: ARM::CMSIS-NN@6.0.0
28+
- pack: Arm::ethos-u-core-driver@1.24.8
29+
- pack: ARM::ml-embedded-eval-kit-uc-api@24.8.0
30+
- pack: tensorflow::flatbuffers@1.24.8
31+
- pack: tensorflow::gemmlowp@1.24.8
32+
- pack: tensorflow::kissfft@1.24.8
33+
- pack: tensorflow::ruy@1.24.8
34+
- pack: tensorflow::tensorflow-lite-micro@1.24.8
3535

3636
- pack: ARM::[email protected]
3737
- pack: ARM::[email protected]

0 commit comments

Comments
 (0)