summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorKshitij Sisodia <kshitij.sisodia@arm.com>2021-05-07 16:08:14 +0100
committerKshitij Sisodia <kshitij.sisodia@arm.com>2021-05-07 17:28:51 +0100
commitf9c19eaa9ab11e4409679fc6d2862c89410493a7 (patch)
treeb791a4c03f1fe986a2ac32593a3dc817ae3f247a /docs
parent2181d0ac35f30202985a877950c88325ff665f6b (diff)
downloadml-embedded-evaluation-kit-f9c19eaa9ab11e4409679fc6d2862c89410493a7.tar.gz
MLECO-1860: Support for Arm GNU Embedded Toolchain
This patch enables compilation of ML use cases bare-metal applications using Arm GNU Embedded Toolchain. The GNU toolchain can be used instead of the Arm Compiler that was already supported. The GNU toolchain is also set as the default toolchain when building applications for the MPS3 target. Note: The version of GNU toolchain must be 10.2.1 or higher. Change-Id: I5fff242f0f52d2db6c75d292f9fa990df1aec978 Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/documentation.md7
-rw-r--r--docs/quick_start.md3
-rw-r--r--docs/sections/building.md160
-rw-r--r--docs/sections/customizing.md34
-rw-r--r--docs/sections/deployment.md18
-rw-r--r--docs/use_cases/ad.md86
-rw-r--r--docs/use_cases/asr.md109
-rw-r--r--docs/use_cases/img_class.md105
-rw-r--r--docs/use_cases/inference_runner.md97
-rw-r--r--docs/use_cases/kws.md108
-rw-r--r--docs/use_cases/kws_asr.md112
11 files changed, 291 insertions, 548 deletions
diff --git a/docs/documentation.md b/docs/documentation.md
index ece2f56..050ca60 100644
--- a/docs/documentation.md
+++ b/docs/documentation.md
@@ -38,10 +38,9 @@ Before starting the setup process, please make sure that you have:
- Linux x86_64 based machine or Windows Subsystem for Linux is preferable.
Unfortunately, Windows is not supported as a build environment yet.
-- Arm Compiler license (version 6.14 or above).
-
- - [Arm Compiler Download
- Page](https://developer.arm.com/tools-and-software/embedded/arm-compiler/downloads/)
+- At least one of the following toolchains:
+ - GNU Arm Embedded Toolchain (version 10.2.1 or above) - [GNU Arm Embedded Toolchain Downloads](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads)
+ - Arm Compiler (version 6.14 or above) with a valid license - [Arm Compiler Download Page](https://developer.arm.com/tools-and-software/embedded/arm-compiler/downloads/)
- An Arm® MPS3 FPGA prototyping board and components for FPGA evaluation or a `Fixed Virtual Platform` binary:
- An MPS3 board loaded with Arm® Corstone™-300 reference package (`AN547`) from:
diff --git a/docs/quick_start.md b/docs/quick_start.md
index 5595152..f3565e8 100644
--- a/docs/quick_start.md
+++ b/docs/quick_start.md
@@ -71,9 +71,6 @@ functionality or performance. All use cases in the evaluation kit follow the ste
```commandline
cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
-DUSE_CASE_BUILD=kws \
-Dkws_MODEL_TFLITE_PATH=output/ds_cnn_clustered_int8_vela.tflite \
..
diff --git a/docs/sections/building.md b/docs/sections/building.md
index c8eef7c..4b1514b 100644
--- a/docs/sections/building.md
+++ b/docs/sections/building.md
@@ -8,8 +8,15 @@
- [Build options](#build-options)
- [Build process](#build-process)
- [Preparing build environment](#preparing-build-environment)
+ - [Fetching submodules](#fetching-submodules)
+ - [Fetching resource files](#fetching-resource-files)
- [Create a build directory](#create-a-build-directory)
- [Configuring the build for MPS3: SSE-300](#configuring-the-build-for-mps3-sse-300)
+ - [Using GNU Arm Embedded Toolchain](#using-gnu-arm-embedded-toolchain)
+ - [Using Arm Compiler](#using-arm-compiler)
+ - [Generating project for Arm Development Studio](#generating-project-for-arm-development-studio)
+ - [Working with model debugger from Arm FastModel Tools](#working-with-model-debugger-from-arm-fastmodel-tools)
+ - [Configuring with custom TPIP dependencies](#configuring-with-custom-tpip-dependencies)
- [Configuring native unit-test build](#configuring-native-unit-test-build)
- [Configuring the build for simple_platform](#configuring-the-build-for-simple_platform)
- [Building the configured project](#building-the-configured-project)
@@ -26,8 +33,8 @@ This section assumes the use of an **x86 Linux** build machine.
Before proceeding, please, make sure that the following prerequisites
are fulfilled:
-- Arm Compiler version 6.14 or above is installed and available on the
- path.
+- GNU Arm embedded toolchain 10.2.1 (or higher) or the Arm Compiler version 6.14 (or higher)
+ is installed and available on the path.
Test the compiler by running:
@@ -40,11 +47,25 @@ are fulfilled:
Component: ARM Compiler 6.14
```
+ Alternatively,
+
+ ```commandline
+ arm-none-eabi-gcc --version
+ ```
+ ```log
+ arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)
+ Copyright (C) 2020 Free Software Foundation, Inc.
+ This is free software; see the source for copying conditions. There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ ```
+
> **Note:** Add compiler to the path, if needed:
>
> `export PATH=/path/to/armclang/bin:$PATH`
+ > OR
+ > `export PATH=/path/to/gcc-arm-none-eabi-toolchain/bin:$PATH`
-- Compiler license is configured correctly
+- Compiler license, if using the proprietary Arm Compiler, is configured correctly.
- CMake version 3.15 or above is installed and available on the path.
Test CMake by running:
@@ -93,26 +114,24 @@ are fulfilled:
> **Note:** Add it to the path environment variable, if needed.
-- Access to the Internet to download the third party dependencies, specifically: TensorFlow Lite Micro, Arm Ethos-U55 NPU
+- Access to the Internet to download the third party dependencies, specifically: TensorFlow Lite Micro, Arm® Ethos™-U55 NPU
driver and CMSIS. Instructions for downloading these are listed under [preparing build environment](#preparing-build-environment).
## Build options
-The project build system allows user to specify custom NN
-model (in `.tflite` format) or images and compile application binary from
-sources.
-
-The build system uses pre-built TensorFlow Lite for Microcontrollers
-library and Arm® Ethos™-U55 driver libraries from the delivery package.
+The project build system allows user to specify custom neural network
+models (in `.tflite` format) for each use case along with the network
+inputs. It also builds TensorFlow Lite for Microcontrollers library,
+Arm® Ethos™-U55 driver library, and CMSIS-DSP library from sources.
The build script is parameterized to support different options. Default
-values for build parameters will build the executable compatible with
-the Ethos-U55 NPU Fast Model.
+values for build parameters will build the applications for all use cases
+for Arm® Corstone™-300 design that can execute on an MPS3 FPGA or the FVP.
The build parameters are:
- `TARGET_PLATFORM`: Target platform to execute application:
- - `mps3`
+ - `mps3` (default)
- `native`
- `simple_platform`
@@ -122,6 +141,10 @@ The build parameters are:
SSE-300:
- `sse-300` (default - [Arm® Corstone™-300](https://developer.arm.com/ip-products/subsystem/corstone/corstone-300))
+- `CMAKE_TOOLCHAIN_FILE`: This built-in CMake parameter can be used to override the
+ default toolchain file used for the build. All the valid toolchain files are in the
+ scripts directory. For example, see [bare-metal-gcc.cmake](../../scripts/cmake/toolchains/bare-metal-gcc.cmake).
+
- `TENSORFLOW_SRC_PATH`: Path to the root of the TensorFlow directory.
The default value points to the TensorFlow submodule in the
[ethos-u](https://git.mlplatform.org/ml/ethos-u/ethos-u.git/about/) `dependencies` folder.
@@ -221,6 +244,8 @@ During this stage application and third party libraries are built see [Building
### Preparing build environment
+#### Fetching submodules
+
Certain third party sources are required to be present on the development machine to allow the example sources in this
repository to link against.
@@ -252,6 +277,21 @@ dependencies
>paths can be overridden by CMake configuration arguments `TENSORFLOW_SRC_PATH`, `ETHOS_U55_DRIVER_SRC_PATH`,
>and `CMSIS_SRC_PATH`.
+
+#### Fetching resource files
+
+All the ML use case examples in this repository also depend on external neural
+network models. To download these, run the following command from the root of
+the repository:
+
+```sh
+python3 ./set_up_default_resources.py
+```
+
+This will fetch all the models into `resources_downloaded` directory. It will
+also optimize the models using the Vela compiler for default 128 MAC configuration
+of Arm® Ethos™-U55 NPU.
+
### Create a build directory
Create a build directory in the root of the project and navigate inside:
@@ -262,68 +302,88 @@ mkdir build && cd build
### Configuring the build for MPS3: SSE-300
-On Linux, execute the following command to build the application to run
-on the Ethos-U55 NPU when providing only the mandatory arguments for CMake configuration:
+#### Using GNU Arm Embedded Toolchain
+
+On Linux, if using `Arm GNU embedded toolchain`, execute the following command
+to build the application to run on the Arm® Ethos™-U55 NPU when providing only
+the mandatory arguments for CMake configuration:
+
```commandline
-cmake \
+cmake ../
+```
+
+The above command will build for the default target platform `mps3`, the default subsystem
+`sse-300`, and using the default toolchain file for the target as `bare-metal-gcc.` This is
+equivalent to:
+
+
+```commandline
+cmake .. \
+ -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-gcc.cmake
-DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake ..
+ -DTARGET_SUBSYSTEM=sse-300
```
-Toolchain option `CMAKE_TOOLCHAIN_FILE` points to the toolchain specific
-file to set the compiler and platform specific parameters.
+#### Using Arm Compiler
+
+If using `Arm Compiler` instead, the toolchain option `CMAKE_TOOLCHAIN_FILE` can be used to
+point to the ARMClang CMake file instead to set the compiler and platform specific parameters.
+
+```commandline
+cmake ../ -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-armclang.cmake
+```
To configure a build that can be debugged using Arm Development Studio, we can just specify
the build type as `Debug`:
```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DCMAKE_BUILD_TYPE=Debug ..
+cmake .. \
+ -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-armclang.cmake \
+ -DCMAKE_BUILD_TYPE=Debug
```
+#### Generating project for Arm Development Studio
+
To be able to import the project in Arm Development Studio, add the Eclipse project generator and CMAKE_ECLIPSE_VERSION in the CMake command. It is advisable that the build directory is one level up relative to the source directory. When the build has been generated, you need to follow the Import wizard in Arm Development Studio and import the existing project into the workspace. You can then compile and debug the project using Arm Development Studio. Note that the below command is executed one level up from the source directory.
```commandline
cmake \
-DTARGET_PLATFORM=mps3 \
-DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
+ -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-armclang.cmake \
-DCMAKE_BUILD_TYPE=Debug \
-G "Eclipse CDT4 - Unix Makefiles" \
-DCMAKE_ECLIPSE_VERSION=4.15 \
ml-embedded-evaluation-kit
```
+#### Working with model debugger from Arm FastModel Tools
+
To configure a build that can be debugged using a tool that only supports
DWARF format 3 (Modeldebugger for example), we can use:
```commandline
-cmake \
+cmake .. \
-DTARGET_PLATFORM=mps3 \
-DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
+ -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-armclang.cmake \
-DCMAKE_BUILD_TYPE=Debug \
- -DARMCLANG_DEBUG_DWARF_LEVEL=3 ..
+ -DARMCLANG_DEBUG_DWARF_LEVEL=3
```
-If the TensorFlow source tree is not in its default expected location,
-set the path using `TENSORFLOW_SRC_PATH`.
-Similarly, if the Ethos-U55 NPU driver and CMSIS are not in the default location,
-`ETHOS_U55_DRIVER_SRC_PATH` and `CMSIS_SRC_PATH` can be used to configure their location. For example:
+#### Configuring with custom TPIP dependencies
+
+If the TensorFlow source tree is not in its default expected location, set the path
+using `TENSORFLOW_SRC_PATH`. Similarly, if the Ethos-U55 NPU driver and CMSIS are
+not in the default location, `ETHOS_U55_DRIVER_SRC_PATH` and `CMSIS_SRC_PATH` can be
+used to configure their location. For example:
```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
+cmake .. \
-DTENSORFLOW_SRC_PATH=/my/custom/location/tensorflow \
-DETHOS_U55_DRIVER_SRC_PATH=/my/custom/location/core_driver \
- -DCMSIS_SRC_PATH=/my/custom/location/cmsis ..
+ -DCMSIS_SRC_PATH=/my/custom/location/cmsis
```
> **Note:** If re-building with changed parameters values, it is
@@ -332,9 +392,7 @@ highly advised to clean the build directory and re-run the CMake command.
### Configuring native unit-test build
```commandline
-cmake \
- -DTARGET_PLATFORM=native \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/native-toolchain.cmake ..
+cmake ../ -DTARGET_PLATFORM=native
```
Results of the build will be placed under `build/bin/` folder:
@@ -348,9 +406,15 @@ Results of the build will be placed under `build/bin/` folder:
### Configuring the build for simple_platform
```commandline
-cmake \
+cmake ../ -DTARGET_PLATFORM=simple_platform
+```
+
+Again, if using `Arm Compiler`, use:
+
+```commandline
+cmake .. \
-DTARGET_PLATFORM=simple_platform \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake ..
+ -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-armclang.cmake
```
### Building the configured project
@@ -531,11 +595,7 @@ set(TA0_BWCAP "4000")
An example of the build with custom timing adapter configuration:
```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DTA_CONFIG_FILE=scripts/cmake/my_ta_config.cmake ..
+cmake .. -DTA_CONFIG_FILE=scripts/cmake/my_ta_config.cmake
```
## Add custom inputs
@@ -563,12 +623,12 @@ the Vela processed model file and `<use_case>_LABELS_TXT_FILE` to the
location of the associated labels file:
```commandline
-cmake \
+cmake .. \
-D<use_case>_MODEL_TFLITE_PATH=<path/to/custom_model_after_vela.tflite> \
-D<use_case>_LABELS_TXT_FILE=<path/to/labels_custom_model.txt> \
-DTARGET_PLATFORM=mps3 \
-DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake ..
+ -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-armclang.cmake
```
> **Note:** For the specific use case command see the relative section in the use case documentation.
diff --git a/docs/sections/customizing.md b/docs/sections/customizing.md
index b4b5bba..adf7749 100644
--- a/docs/sections/customizing.md
+++ b/docs/sections/customizing.md
@@ -2,20 +2,22 @@
## Contents
-- [Software project description](#software-project-description)
-- [HAL API](#hal-api)
-- [Main loop function](#main-loop-function)
-- [Application context](#application-context)
-- [Profiler](#profiler)
-- [NN Model API](#nn-model-api)
-- [Adding custom ML use case](#adding-custom-ml-use-case)
-- [Implementing main loop](#implementing-main-loop)
-- [Implementing custom NN model](#implementing-custom-nn-model)
-- [Executing inference](#executing-inference)
-- [Printing to console](#printing-to-console)
-- [Reading user input from console](#reading-user-input-from-console)
-- [Output to MPS3 LCD](#output-to-mps3-lcd)
-- [Building custom use case](#building-custom-use-case)
+- [Implementing custom ML application](#implementing-custom-ml-application)
+ - [Contents](#contents)
+ - [Software project description](#software-project-description)
+ - [HAL API](#hal-api)
+ - [Main loop function](#main-loop-function)
+ - [Application context](#application-context)
+ - [Profiler](#profiler)
+ - [NN Model API](#nn-model-api)
+ - [Adding custom ML use case](#adding-custom-ml-use-case)
+ - [Implementing main loop](#implementing-main-loop)
+ - [Implementing custom NN model](#implementing-custom-nn-model)
+ - [Executing inference](#executing-inference)
+ - [Printing to console](#printing-to-console)
+ - [Reading user input from console](#reading-user-input-from-console)
+ - [Output to MPS3 LCD](#output-to-mps3-lcd)
+ - [Building custom use case](#building-custom-use-case)
This section describes how to implement a custom Machine Learning
application running on `Arm® Corstone™-300` based FVP or on the Arm® MPS3 FPGA prototyping board.
@@ -731,11 +733,11 @@ To build you application follow the general instructions from
build command:
```commandline
-cmake \
+cmake .. \
-DTARGET_PLATFORM=mps3 \
-DTARGET_SUBSYSTEM=sse-300 \
-DUSE_CASE_BUILD=hello_world \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake ..
+ -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-armclang.cmake
```
As a result, `ethos-u-hello_world.axf` should be created, MPS3 build
diff --git a/docs/sections/deployment.md b/docs/sections/deployment.md
index a6e9c3c..10acbcf 100644
--- a/docs/sections/deployment.md
+++ b/docs/sections/deployment.md
@@ -150,9 +150,9 @@ For details, on platform set up, please see the relevant documentation. For `Arm
For MPS3 board, instead of loading the axf file directly, the executable blobs
generated under the *sectors/<use_case>* subdirectory need to be
-copied over to the MP3 board's micro SD card. Also, every use case build
-generates a corresponding images.txt file which is used by the MPS3 to
-understand which memory regions the blobs are to be loaded into.
+copied over to the MP3 board's micro SD card. Also, *sectors/images.txt* file is
+used by the MPS3 to understand which memory regions the blobs are to be loaded
+into.
Once the USB A <--> B cable between the MPS3 and the development machine
is connected and the MPS3 board powered on, the board should enumerate
@@ -160,10 +160,10 @@ as a mass storage device over this USB connection.
There might be two devices also, depending on the version of the board
you are using. The device named `V2M-MPS3` or `V2MMPS3` is the `SD card`.
-If the axf/elf file is within 1MiB, it can be flashed into the FPGA
-memory directly without having to break it down into separate load
-region specific blobs. However, with neural network models exceeding
-this size, it becomes necessary to follow this approach.
+If the axf/elf file is within the ITCM load size limit, it can be copied into
+the FPGA memory directly without having to break it down into separate load
+region specific blobs. However, with neural network models exceeding this size,
+it becomes necessary to follow this approach.
1. For example, the image classification use case will produce:
@@ -181,7 +181,7 @@ this size, it becomes necessary to follow this approach.
cp -av ./bin/sectors/img_class/* /media/user/V2M-MPS3/SOFTWARE/
```
-2. The generated `\<use-case\>_images.txt` file needs to be copied
+2. The `./bin/sectors/images.txt` file needs to be copied
over to the MPS3. The exact location for the destination will depend
on the MPS3 board's version and the application note for the bit
file in use.
@@ -190,7 +190,7 @@ application note directory named "ETHOSU", to replace the images.txt
file:
```commandline
- cp ./bin/images-img_class.txt /media/user/V2M-MPS3/MB/HBI0309C/ETHOSU/images.txt
+ cp ./bin/sectors/images.txt /media/user/V2M-MPS3/MB/HBI0309C/ETHOSU/images.txt
```
3. Open the first serial port available from MPS3, for example,
diff --git a/docs/use_cases/ad.md b/docs/use_cases/ad.md
index 5a37a0a..5f210b1 100644
--- a/docs/use_cases/ad.md
+++ b/docs/use_cases/ad.md
@@ -108,74 +108,26 @@ mkdir build_ad && cd build_ad
On Linux, execute the following command to build **only** Anomaly Detection application to run on the Ethos-U55 Fast Model when providing only the mandatory arguments for CMake configuration:
```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=./scripts/cmake/bare-metal-toolchain.cmake \
- -DUSE_CASE_BUILD=ad ..
+cmake ../ -DUSE_CASE_BUILD=ad
```
-
-Toolchain option `CMAKE_TOOLCHAIN_FILE` points to the toolchain specific file to set the compiler and platform specific
-parameters.
-
To configure a build that can be debugged using Arm-DS, we can just specify
-the build type as `Debug`:
-
-```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DCMAKE_BUILD_TYPE=Debug \
- -DUSE_CASE_BUILD=ad ..
-```
-
-To configure a build that can be debugged using a tool that only supports
-DWARF format 3 (Modeldebugger for example), we can use:
+the build type as `Debug` and use the `Arm Compiler` toolchain file:
```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
+cmake .. \
+ -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-armclang.cmake \
-DCMAKE_BUILD_TYPE=Debug \
- -DARMCLANG_DEBUG_DWARF_LEVEL=3 \
- -DUSE_CASE_BUILD=ad ..
+ -DUSE_CASE_BUILD=ad
```
-> **Note:** If building for different Ethos-U55 configurations, see
-[Configuring build for different Arm Ethos-U55 configurations](../sections/building.md#Configuring-build-for-different-Arm-Ethos-U55-configurations):
-
-If the TensorFlow source tree is not in its default expected location,
-set the path using `TENSORFLOW_SRC_PATH`.
-Similarly, if the Ethos-U55 driver is not in the default location,
-`ETHOS_U55_DRIVER_SRC_PATH` can be used to configure the location. For example:
-
-```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DTENSORFLOW_SRC_PATH=/my/custom/location/tensorflow \
- -DETHOS_U55_DRIVER_SRC_PATH=/my/custom/location/core_driver \
- -DUSE_CASE_BUILD=ad ..
-```
-
-Also, `CMSIS_SRC_PATH` parameter can be used to override the CMSIS sources used for compilation used by TensorFlow by
-default. For example, to use the CMSIS sources fetched by the ethos-u helper script, we can use:
-
-```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DTENSORFLOW_SRC_PATH=../ethos-u/core_software/tensorflow \
- -DETHOS_U55_DRIVER_SRC_PATH=../ethos-u/core_software/core_driver \
- -DCMSIS_SRC_PATH=../ethos-u/core_software/cmsis \
- -DUSE_CASE_BUILD=ad ..
-```
+Also see:
+- [Configuring with custom TPIP dependencies](../sections/building.md#Configuring-with-custom-TPIP-dependencies)
+- [Using Arm Compiler](../sections/building.md#using-arm-compiler)
+- [Configuring the build for simple_platform](../sections/building.md#Configuring-the-build-for-simple_platform)
+- [Working with model debugger from Arm FastModel Tools](../sections/building.md#Working-with-model-debugger-from-Arm-FastModel-Tools)
-> **Note:** If re-building with changed parameters values, it is highly advised to clean the build directory and re-run the CMake command.
+> **Note:** If re-building with changed parameters values, it is highly advised to clean the build directory and re-run
+>the CMake command.
If the CMake command succeeded, build the application as follows:
@@ -239,12 +191,9 @@ or `<any>_<text>_02_<here>.wav` if it was from machine ID 02 etc.
Next set ad_FILE_PATH to the location of this folder when building:
```commandline
-cmake \
+cmake .. \
-Dad_FILE_PATH=/tmp/custom_files/ \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DUSE_CASE_BUILD=ad ..
+ -DUSE_CASE_BUILD=ad
```
The audio flies found in the `ad_FILE_PATH` folder will be picked up and automatically converted to C++ files during the CMake
@@ -268,12 +217,9 @@ The application performs inference using the model pointed to by the CMake param
An example:
```commandline
-cmake \
+cmake .. \
-Dad_MODEL_TFLITE_PATH=<path/to/custom_ad_model_after_vela.tflite> \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DUSE_CASE_BUILD=ad ..
+ -DUSE_CASE_BUILD=ad
```
> **Note:** Clean the build directory before re-running the CMake command.
diff --git a/docs/use_cases/asr.md b/docs/use_cases/asr.md
index d20dc5a..ec10fdb 100644
--- a/docs/use_cases/asr.md
+++ b/docs/use_cases/asr.md
@@ -1,19 +1,19 @@
# Automatic Speech Recognition Code Sample
-- [Introduction](#introduction)
- - [Prerequisites](#prerequisites)
-- [Building the code sample application from sources](#building-the-code-sample-application-from-sources)
- - [Build options](#build-options)
- - [Build process](#build-process)
- - [Add custom input](#add-custom-input)
- - [Add custom model](#add-custom-model)
-- [Setting-up and running Ethos-U55 Code Sample](#setting-up-and-running-ethos-u55-code-sample)
- - [Setting up the Ethos-U55 Fast Model](#setting-up-the-ethos-u55-fast-model)
- - [Starting Fast Model simulation](#starting-fast-model-simulation)
- - [Running Automatic Speech Recognition](#running-automatic-speech-recognition)
-- [Automatic Speech Recognition processing information](#automatic-speech-recognition-processing-information)
- - [Preprocessing and feature extraction](#preprocessing-and-feature-extraction)
- - [Postprocessing](#postprocessing)
+- [Automatic Speech Recognition Code Sample](#automatic-speech-recognition-code-sample)
+ - [Introduction](#introduction)
+ - [Preprocessing and feature extraction](#preprocessing-and-feature-extraction)
+ - [Postprocessing](#postprocessing)
+ - [Prerequisites](#prerequisites)
+ - [Building the code sample application from sources](#building-the-code-sample-application-from-sources)
+ - [Build options](#build-options)
+ - [Build process](#build-process)
+ - [Add custom input](#add-custom-input)
+ - [Add custom model](#add-custom-model)
+ - [Setting-up and running Ethos-U55 Code Sample](#setting-up-and-running-ethos-u55-code-sample)
+ - [Setting up the Ethos-U55 Fast Model](#setting-up-the-ethos-u55-fast-model)
+ - [Starting Fast Model simulation](#starting-fast-model-simulation)
+ - [Running Automatic Speech Recognition](#running-automatic-speech-recognition)
## Introduction
@@ -148,72 +148,24 @@ On Linux, execute the following command to build **only** Automatic Speech Recog
Ethos-U55 Fast Model when providing only the mandatory arguments for CMake configuration:
```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=./scripts/cmake/bare-metal-toolchain.cmake \
- -DUSE_CASE_BUILD=asr ..
+cmake ../ -DUSE_CASE_BUILD=asr
```
-Toolchain option `CMAKE_TOOLCHAIN_FILE` points to the toolchain specific file to set the compiler and platform specific
-parameters.
-
To configure a build that can be debugged using Arm-DS, we can just specify
-the build type as `Debug`:
+the build type as `Debug` and use the `Arm Compiler` toolchain file:
```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
+cmake .. \
+ -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-armclang.cmake \
-DCMAKE_BUILD_TYPE=Debug \
- -DUSE_CASE_BUILD=asr ..
-```
-
-To configure a build that can be debugged using a tool that only supports
-DWARF format 3 (Modeldebugger for example), we can use:
-
-```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DCMAKE_BUILD_TYPE=Debug \
- -DARMCLANG_DEBUG_DWARF_LEVEL=3 \
- -DUSE_CASE_BUILD=asr ..
-```
-
-> **Note:** If building for different Ethos-U55 configurations, see
->[Configuring build for different Arm Ethos-U55 configurations](../sections/building.md#Configuring-build-for-different-Arm-Ethos-U55-configurations):
-
-If the TensorFlow source tree is not in its default expected location,
-set the path using `TENSORFLOW_SRC_PATH`.
-Similarly, if the Ethos-U55 driver is not in the default location,
-`ETHOS_U55_DRIVER_SRC_PATH` can be used to configure the location. For example:
-
-```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DTENSORFLOW_SRC_PATH=/my/custom/location/tensorflow \
- -DETHOS_U55_DRIVER_SRC_PATH=/my/custom/location/core_driver \
- -DUSE_CASE_BUILD=asr ..
+ -DUSE_CASE_BUILD=asr
```
-Also, `CMSIS_SRC_PATH` parameter can be used to override the CMSIS sources used for compilation used by TensorFlow by
-default. For example, to use the CMSIS sources fetched by the ethos-u helper script, we can use:
-
-```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DTENSORFLOW_SRC_PATH=../ethos-u/core_software/tensorflow \
- -DETHOS_U55_DRIVER_SRC_PATH=../ethos-u/core_software/core_driver \
- -DCMSIS_SRC_PATH=../ethos-u/core_software/cmsis \
- -DUSE_CASE_BUILD=asr ..
-```
+Also see:
+- [Configuring with custom TPIP dependencies](../sections/building.md#Configuring-with-custom-TPIP-dependencies)
+- [Using Arm Compiler](../sections/building.md#using-arm-compiler)
+- [Configuring the build for simple_platform](../sections/building.md#Configuring-the-build-for-simple_platform)
+- [Working with model debugger from Arm FastModel Tools](../sections/building.md#Working-with-model-debugger-from-Arm-FastModel-Tools)
> **Note:** If re-building with changed parameters values, it is highly advised to clean the build directory and re-run
>the CMake command.
@@ -272,12 +224,9 @@ cp my_clip.wav /tmp/custom_wavs/
Next set `asr_FILE_PATH` to the location of this folder when building:
```commandline
-cmake \
+cmake .. \
-Dasr_FILE_PATH=/tmp/custom_wavs/ \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DUSE_CASE_BUILD=asr \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake ..
+ -DUSE_CASE_BUILD=asr
```
The audio clips found in the `asr_FILE_PATH` folder will be picked up and automatically converted to C++ files during the
@@ -317,12 +266,10 @@ the location of the associated labels file.
An example:
```commandline
-cmake \
+cmake .. \
-Dasr_MODEL_TFLITE_PATH=<path/to/custom_model_after_vela.tflite> \
-Dasr_LABELS_TXT_FILE=<path/to/labels_custom_model.txt> \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake ..
+ -DUSE_CASE_BUILD=asr
```
> **Note:** Clean the build directory before re-running the CMake command.
diff --git a/docs/use_cases/img_class.md b/docs/use_cases/img_class.md
index 0102409..68a5285 100644
--- a/docs/use_cases/img_class.md
+++ b/docs/use_cases/img_class.md
@@ -1,16 +1,17 @@
# Image Classification Code Sample
-- [Introduction](#introduction)
- - [Prerequisites](#prerequisites)
-- [Building the code sample application from sources](#building-the-code-sample-application-from-sources)
- - [Build options](#build-options)
- - [Build process](#build-process)
- - [Add custom input](#add-custom-input)
- - [Add custom model](#add-custom-model)
-- [Setting-up and running Ethos-U55 code sample](#setting-up-and-running-ethos-u55-code-sample)
- - [Setting up the Ethos-U55 Fast Model](#setting-up-the-ethos-u55-fast-model)
- - [Starting Fast Model simulation](#starting-fast-model-simulation)
- - [Running Image Classification](#running-image-classification)
+- [Image Classification Code Sample](#image-classification-code-sample)
+ - [Introduction](#introduction)
+ - [Prerequisites](#prerequisites)
+ - [Building the code sample application from sources](#building-the-code-sample-application-from-sources)
+ - [Build options](#build-options)
+ - [Build process](#build-process)
+ - [Add custom input](#add-custom-input)
+ - [Add custom model](#add-custom-model)
+ - [Setting-up and running Ethos-U55 code sample](#setting-up-and-running-ethos-u55-code-sample)
+ - [Setting up the Ethos-U55 Fast Model](#setting-up-the-ethos-u55-fast-model)
+ - [Starting Fast Model simulation](#starting-fast-model-simulation)
+ - [Running Image Classification](#running-image-classification)
## Introduction
@@ -76,72 +77,24 @@ On Linux, execute the following command to build **only** Image Classification a
Model when providing only the mandatory arguments for CMake configuration:
```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=./scripts/cmake/bare-metal-toolchain.cmake \
- -DUSE_CASE_BUILD=img_class ..
+cmake ../ -DUSE_CASE_BUILD=img_class
```
-Toolchain option `CMAKE_TOOLCHAIN_FILE` points to the toolchain specific file to set the compiler and platform specific
-parameters.
-
To configure a build that can be debugged using Arm-DS, we can just specify
-the build type as `Debug`:
+the build type as `Debug` and use the `Arm Compiler` toolchain file:
```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
+cmake .. \
+ -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-armclang.cmake \
-DCMAKE_BUILD_TYPE=Debug \
- -DUSE_CASE_BUILD=img_class ..
-```
-
-To configure a build that can be debugged using a tool that only supports
-DWARF format 3 (Modeldebugger for example), we can use:
-
-```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DCMAKE_BUILD_TYPE=Debug \
- -DARMCLANG_DEBUG_DWARF_LEVEL=3 \
- -DUSE_CASE_BUILD=img_class ..
-```
-
-> **Note:** If building for different Ethos-U55 configurations, see
->[Configuring build for different Arm Ethos-U55 configurations](../sections/building.md#Configuring-build-for-different-Arm-Ethos-U55-configurations):
-
-If the TensorFlow source tree is not in its default expected location,
-set the path using `TENSORFLOW_SRC_PATH`.
-Similarly, if the Ethos-U55 driver is not in the default location,
-`ETHOS_U55_DRIVER_SRC_PATH` can be used to configure the location. For example:
-
-```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DTENSORFLOW_SRC_PATH=/my/custom/location/tensorflow \
- -DETHOS_U55_DRIVER_SRC_PATH=/my/custom/location/core_driver \
- -DUSE_CASE_BUILD=img_class ..
+ -DUSE_CASE_BUILD=img_class
```
-Also, `CMSIS_SRC_PATH` parameter can be used to override the CMSIS sources used for compilation used by TensorFlow by
-default. For example, to use the CMSIS sources fetched by the ethos-u helper script, we can use:
-
-```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DTENSORFLOW_SRC_PATH=../ethos-u/core_software/tensorflow \
- -DETHOS_U55_DRIVER_SRC_PATH=../ethos-u/core_software/core_driver \
- -DCMSIS_SRC_PATH=../ethos-u/core_software/cmsis \
- -DUSE_CASE_BUILD=img_class ..
-```
+Also see:
+- [Configuring with custom TPIP dependencies](../sections/building.md#Configuring-with-custom-TPIP-dependencies)
+- [Using Arm Compiler](../sections/building.md#using-arm-compiler)
+- [Configuring the build for simple_platform](../sections/building.md#Configuring-the-build-for-simple_platform)
+- [Working with model debugger from Arm FastModel Tools](../sections/building.md#Working-with-model-debugger-from-Arm-FastModel-Tools)
> **Note:** If re-building with changed parameters values, it is highly advised to clean the build directory and re-run
>the CMake command.
@@ -200,12 +153,9 @@ cp custom_image1.bmp /tmp/custom_images/
Next set `img_class_FILE_PATH` to the location of this folder when building:
```commandline
-cmake \
+cmake .. \
-Dimg_class_FILE_PATH=/tmp/custom_images/ \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DUSE_CASE_BUILD=img_class ..
+ -DUSE_CASE_BUILD=img_class
```
The images found in the `img_class_FILE_PATH` folder will be picked up and automatically converted to C++ files during
@@ -249,13 +199,10 @@ Then, you must set `img_class_MODEL_TFLITE_PATH` to the location of the Vela pro
An example:
```commandline
-cmake \
+cmake .. \
-Dimg_class_MODEL_TFLITE_PATH=<path/to/custom_model_after_vela.tflite> \
-Dimg_class_LABELS_TXT_FILE=<path/to/labels_custom_model.txt> \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DUSE_CASE_BUILD=img_class ..
+ -DUSE_CASE_BUILD=img_class
```
> **Note:** Clean the build directory before re-running the CMake command.
diff --git a/docs/use_cases/inference_runner.md b/docs/use_cases/inference_runner.md
index ad47e7e..ebc4677 100644
--- a/docs/use_cases/inference_runner.md
+++ b/docs/use_cases/inference_runner.md
@@ -1,16 +1,16 @@
# Inference Runner Code Sample
-- [Introduction](#introduction)
- - [Prerequisites](#prerequisites)
-- [Building the Code Samples application from sources](#building-the-code-samples-application-from-sources)
- - [Build options](#build-options)
- - [Build process](#build-process)
- - [Add custom model](#add-custom-model)
-- [Setting-up and running Ethos-U55 code sample](#setting-up-and-running-ethos-u55-code-sample)
- - [Setting up the Ethos-U55 Fast Model](#setting-up-the-ethos-u55-fast-model)
- - [Starting Fast Model simulation](#starting-fast-model-simulation)
- - [Running Inference Runner](#running-inference-runner)
-- [Inference Runner processing information](#inference-runner-processing-information)
+- [Inference Runner Code Sample](#inference-runner-code-sample)
+ - [Introduction](#introduction)
+ - [Prerequisites](#prerequisites)
+ - [Building the Code Samples application from sources](#building-the-code-samples-application-from-sources)
+ - [Build options](#build-options)
+ - [Build process](#build-process)
+ - [Add custom model](#add-custom-model)
+ - [Setting-up and running Ethos-U55 code sample](#setting-up-and-running-ethos-u55-code-sample)
+ - [Setting up the Ethos-U55 Fast Model](#setting-up-the-ethos-u55-fast-model)
+ - [Starting Fast Model simulation](#starting-fast-model-simulation)
+ - [Running Inference Runner](#running-inference-runner)
## Introduction
@@ -68,72 +68,23 @@ On Linux, execute the following command to build **only** Inference Runner appli
Model when providing only the mandatory arguments for CMake configuration:
```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=./scripts/cmake/bare-metal-toolchain.cmake \
- -DUSE_CASE_BUILD=inference_runner ..
+cmake ../ -DUSE_CASE_BUILD=inference_runner
```
-
-Toolchain option `CMAKE_TOOLCHAIN_FILE` points to the toolchain specific file to set the compiler and platform specific
-parameters.
-
To configure a build that can be debugged using Arm-DS, we can just specify
-the build type as `Debug`:
-
-```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DCMAKE_BUILD_TYPE=Debug \
- -DUSE_CASE_BUILD=inference_runner ..
-```
-
-To configure a build that can be debugged using a tool that only supports
-DWARF format 3 (Modeldebugger for example), we can use:
+the build type as `Debug` and use the `Arm Compiler` toolchain file:
```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
+cmake .. \
+ -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-armclang.cmake \
-DCMAKE_BUILD_TYPE=Debug \
- -DARMCLANG_DEBUG_DWARF_LEVEL=3 \
- -DUSE_CASE_BUILD=inference_runner ..
+ -DUSE_CASE_BUILD=inference_runner
```
-> **Note:** If building for different Ethos-U55 configurations, see
->[Configuring build for different Arm Ethos-U55 configurations](../sections/building.md#Configuring-build-for-different-Arm-Ethos-U55-configurations):
-
-If the TensorFlow source tree is not in its default expected location,
-set the path using `TENSORFLOW_SRC_PATH`.
-Similarly, if the Ethos-U55 driver is not in the default location,
-`ETHOS_U55_DRIVER_SRC_PATH` can be used to configure the location. For example:
-
-```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DTENSORFLOW_SRC_PATH=/my/custom/location/tensorflow \
- -DETHOS_U55_DRIVER_SRC_PATH=/my/custom/location/core_driver \
- -DUSE_CASE_BUILD=inference_runner ..
-```
-
-Also, `CMSIS_SRC_PATH` parameter can be used to override the CMSIS sources used for compilation used by TensorFlow by
-default. For example, to use the CMSIS sources fetched by the ethos-u helper script, we can use:
-
-```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DTENSORFLOW_SRC_PATH=../ethos-u/core_software/tensorflow \
- -DETHOS_U55_DRIVER_SRC_PATH=../ethos-u/core_software/core_driver \
- -DCMSIS_SRC_PATH=../ethos-u/core_software/cmsis \
- -DUSE_CASE_BUILD=inference_runner ..
-```
+Also see:
+- [Configuring with custom TPIP dependencies](../sections/building.md#Configuring-with-custom-TPIP-dependencies)
+- [Using Arm Compiler](../sections/building.md#using-arm-compiler)
+- [Configuring the build for simple_platform](../sections/building.md#Configuring-the-build-for-simple_platform)
+- [Working with model debugger from Arm FastModel Tools](../sections/building.md#Working-with-model-debugger-from-Arm-FastModel-Tools)
> **Note:** If re-building with changed parameters values, it is highly advised to clean the build directory and re-run
>the CMake command.
@@ -188,11 +139,9 @@ Then, you must set `inference_runner_MODEL_TFLITE_PATH` to the location of the V
An example:
```commandline
-cmake \
+cmake .. \
-Dinference_runner_MODEL_TFLITE_PATH=<path/to/custom_model_after_vela.tflite> \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake ..
+ -DUSE_CASE_BUILD=inference_runner
```
> **Note:** Clean the build directory before re-running the CMake command.
diff --git a/docs/use_cases/kws.md b/docs/use_cases/kws.md
index baf813a..8811efb 100644
--- a/docs/use_cases/kws.md
+++ b/docs/use_cases/kws.md
@@ -1,19 +1,19 @@
# Keyword Spotting Code Sample
-- [Introduction](#introduction)
- - [Prerequisites](#prerequisites)
-- [Building the code sample application from sources](#building-the-code-sample-application-from-sources)
- - [Build options](#build-options)
- - [Build process](#build-process)
- - [Add custom input](#add-custom-input)
- - [Add custom model](#add-custom-model)
-- [Setting-up and running Ethos-U55 code sample](#setting-up-and-running-ethos-u55-code-sample)
- - [Setting up the Ethos-U55 Fast Model](#setting-up-the-ethos-u55-fast-model)
- - [Starting Fast Model simulation](#starting-fast-model-simulation)
- - [Running Keyword Spotting](#running-keyword-spotting)
-- [Keyword Spotting processing information](#keyword-spotting-processing-information)
- - [Preprocessing and feature extraction](#preprocessing-and-feature-extraction)
- - [Postprocessing](#postprocessing)
+- [Keyword Spotting Code Sample](#keyword-spotting-code-sample)
+ - [Introduction](#introduction)
+ - [Preprocessing and feature extraction](#preprocessing-and-feature-extraction)
+ - [Postprocessing](#postprocessing)
+ - [Prerequisites](#prerequisites)
+ - [Building the code sample application from sources](#building-the-code-sample-application-from-sources)
+ - [Build options](#build-options)
+ - [Build process](#build-process)
+ - [Add custom input](#add-custom-input)
+ - [Add custom model](#add-custom-model)
+ - [Setting-up and running Ethos-U55 code sample](#setting-up-and-running-ethos-u55-code-sample)
+ - [Setting up the Ethos-U55 Fast Model](#setting-up-the-ethos-u55-fast-model)
+ - [Starting Fast Model simulation](#starting-fast-model-simulation)
+ - [Running Keyword Spotting](#running-keyword-spotting)
## Introduction
@@ -117,70 +117,24 @@ mkdir build_kws && cd build_kws
On Linux, execute the following command to build Keyword Spotting application to run on the Ethos-U55 Fast Model when providing only the mandatory arguments for CMake configuration:
```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=./scripts/cmake/bare-metal-toolchain.cmake \
- -DUSE_CASE_BUILD=kws ..
+cmake ../ -DUSE_CASE_BUILD=kws
```
-Toolchain option `CMAKE_TOOLCHAIN_FILE` points to the toolchain specific file to set the compiler and platform specific
-parameters.
-
To configure a build that can be debugged using Arm-DS, we can just specify
-the build type as `Debug`:
+the build type as `Debug` and use the `Arm Compiler` toolchain file:
```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
+cmake .. \
+ -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-armclang.cmake \
-DCMAKE_BUILD_TYPE=Debug \
- -DUSE_CASE_BUILD=kws ..
-```
-
-To configure a build that can be debugged using a tool that only supports
-DWARF format 3 (Modeldebugger for example), we can use:
-
-```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DCMAKE_BUILD_TYPE=Debug \
- -DARMCLANG_DEBUG_DWARF_LEVEL=3 \
- -DUSE_CASE_BUILD=kws ..
-```
-
-> **Note:** If building for different Ethos-U55 configurations, see [Configuring build for different Arm Ethos-U55 configurations](../sections/building.md#Configuring-build-for-different-Arm-Ethos-U55-configurations):
-
-If the TensorFlow source tree is not in its default expected location,
-set the path using `TENSORFLOW_SRC_PATH`.
-Similarly, if the Ethos-U55 driver is not in the default location,
-`ETHOS_U55_DRIVER_SRC_PATH` can be used to configure the location. For example:
-
-```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DTENSORFLOW_SRC_PATH=/my/custom/location/tensorflow \
- -DETHOS_U55_DRIVER_SRC_PATH=/my/custom/location/core_driver \
- -DUSE_CASE_BUILD=kws ..
+ -DUSE_CASE_BUILD=kws
```
-Also, `CMSIS_SRC_PATH` parameter can be used to override the CMSIS sources used for compilation used by TensorFlow by default. For example, to use the CMSIS sources fetched by the ethos-u helper script, we can use:
-
-```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DTENSORFLOW_SRC_PATH=../ethos-u/core_software/tensorflow \
- -DETHOS_U55_DRIVER_SRC_PATH=../ethos-u/core_software/core_driver \
- -DCMSIS_SRC_PATH=../ethos-u/core_software/cmsis \
- -DUSE_CASE_BUILD=kws ..
-```
+Also see:
+- [Configuring with custom TPIP dependencies](../sections/building.md#Configuring-with-custom-TPIP-dependencies)
+- [Using Arm Compiler](../sections/building.md#using-arm-compiler)
+- [Configuring the build for simple_platform](../sections/building.md#Configuring-the-build-for-simple_platform)
+- [Working with model debugger from Arm FastModel Tools](../sections/building.md#Working-with-model-debugger-from-Arm-FastModel-Tools)
> **Note:** If re-building with changed parameters values, it is highly advised to clean the build directory and re-run the CMake command.
@@ -237,12 +191,9 @@ cp my_clip.wav /tmp/custom_wavs/
Next set `kws_FILE_PATH` to the location of this folder when building:
```commandline
-cmake \
+cmake .. \
-Dkws_FILE_PATH=/tmp/custom_wavs/ \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DUSE_CASE_BUILD=kws \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake..
+ -DUSE_CASE_BUILD=kws
```
The audio clips found in the `kws_FILE_PATH` folder will be picked up and automatically converted to C++ files during the
@@ -281,13 +232,10 @@ to the location of the associated labels file.
An example:
```commandline
-cmake \
+cmake .. \
-Dkws_MODEL_TFLITE_PATH=<path/to/custom_model_after_vela.tflite> \
-Dkws_LABELS_TXT_FILE=<path/to/labels_custom_model.txt> \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DUSE_CASE_BUILD=kws \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake ..
+ -DUSE_CASE_BUILD=kws
```
> **Note:** Clean the build directory before re-running the CMake command.
diff --git a/docs/use_cases/kws_asr.md b/docs/use_cases/kws_asr.md
index a347b16..b63ee3a 100644
--- a/docs/use_cases/kws_asr.md
+++ b/docs/use_cases/kws_asr.md
@@ -1,21 +1,21 @@
# Keyword Spotting and Automatic Speech Recognition Code Sample
-- [Introduction](#introduction)
- - [Prerequisites](#prerequisites)
-- [Building the code sample application from sources](#building-the-code-sample-application-from-sources)
- - [Build options](#build-options)
- - [Build process](#build-process)
- - [Add custom input](#add-custom-input)
- - [Add custom model](#add-custom-model)
-- [Setting-up and running Ethos-U55 Code Samples](#setting-up-and-running-ethos-u55-code-samples)
- - [Setting up the Ethos-U55 Fast Model](#setting-up-the-ethos-u55-fast-model)
- - [Starting Fast Model simulation](#starting-fast-model-simulation)
- - [Running Keyword Spotting and Automatic Speech Recognition](#running-keyword-spotting-and-automatic-speech-recognition)
-- [Keyword Spotting and Automatic Speech Recognition processing information](#keyword-spotting-and-automatic-speech-recognition-processing-information)
- - [Preprocessing and feature extraction](#preprocessing-and-feature-extraction)
- - [Keyword Spotting Preprocessing](#keyword-spotting-preprocessing)
- - [Automatic Speech Recognition Preprocessing](#automatic-speech-recognition-preprocessing)
- - [Postprocessing](#postprocessing)
+- [Keyword Spotting and Automatic Speech Recognition Code Sample](#keyword-spotting-and-automatic-speech-recognition-code-sample)
+ - [Introduction](#introduction)
+ - [Preprocessing and feature extraction](#preprocessing-and-feature-extraction)
+ - [Keyword Spotting Preprocessing](#keyword-spotting-preprocessing)
+ - [Automatic Speech Recognition Preprocessing](#automatic-speech-recognition-preprocessing)
+ - [Postprocessing](#postprocessing)
+ - [Prerequisites](#prerequisites)
+ - [Building the code sample application from sources](#building-the-code-sample-application-from-sources)
+ - [Build options](#build-options)
+ - [Build process](#build-process)
+ - [Add custom input](#add-custom-input)
+ - [Add custom model](#add-custom-model)
+ - [Setting-up and running Ethos-U55 Code Samples](#setting-up-and-running-ethos-u55-code-samples)
+ - [Setting up the Ethos-U55 Fast Model](#setting-up-the-ethos-u55-fast-model)
+ - [Starting Fast Model simulation](#starting-fast-model-simulation)
+ - [Running Keyword Spotting and Automatic Speech Recognition](#running-keyword-spotting-and-automatic-speech-recognition)
## Introduction
@@ -188,70 +188,24 @@ mkdir build_kws_asr && cd build_kws_asr
On Linux, execute the following command to build the application to run on the Ethos-U55 Fast Model when providing only the mandatory arguments for CMake configuration:
```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=./scripts/cmake/bare-metal-toolchain.cmake \
- -DUSE_CASE_BUILD=kws_asr ..
+cmake ../ -DUSE_CASE_BUILD=kws_asr
```
-Toolchain option `CMAKE_TOOLCHAIN_FILE` points to the toolchain specific file to set the compiler and platform specific
-parameters.
-
To configure a build that can be debugged using Arm-DS, we can just specify
-the build type as `Debug`:
+the build type as `Debug` and use the `Arm Compiler` toolchain file:
```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
+cmake .. \
+ -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-armclang.cmake \
-DCMAKE_BUILD_TYPE=Debug \
- -DUSE_CASE_BUILD=kws_asr ..
-```
-
-To configure a build that can be debugged using a tool that only supports
-DWARF format 3 (Modeldebugger for example), we can use:
-
-```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DCMAKE_BUILD_TYPE=Debug \
- -DARMCLANG_DEBUG_DWARF_LEVEL=3 \
- -DUSE_CASE_BUILD=kws_asr ..
-```
-
-> **Note:** If building for different Ethos-U55 configurations, see [Configuring build for different Arm Ethos-U55 configurations](../sections/building.md#Configuring-build-for-different-Arm-Ethos-U55-configurations):
-
-If the TensorFlow source tree is not in its default expected location,
-set the path using `TENSORFLOW_SRC_PATH`.
-Similarly, if the Ethos-U55 driver is not in the default location,
-`ETHOS_U55_DRIVER_SRC_PATH` can be used to configure the location. For example:
-
-```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DTENSORFLOW_SRC_PATH=/my/custom/location/tensorflow \
- -DETHOS_U55_DRIVER_SRC_PATH=/my/custom/location/core_driver \
- -DUSE_CASE_BUILD=kws_asr ..
+ -DUSE_CASE_BUILD=kws_asr
```
-Also, `CMSIS_SRC_PATH` parameter can be used to override the CMSIS sources used for compilation used by TensorFlow by default. For example, to use the CMSIS sources fetched by the ethos-u helper script, we can use:
-
-```commandline
-cmake \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DTENSORFLOW_SRC_PATH=../ethos-u/core_software/tensorflow \
- -DETHOS_U55_DRIVER_SRC_PATH=../ethos-u/core_software/core_driver \
- -DCMSIS_SRC_PATH=../ethos-u/core_software/cmsis \
- -DUSE_CASE_BUILD=kws_asr ..
-```
+Also see:
+- [Configuring with custom TPIP dependencies](../sections/building.md#Configuring-with-custom-TPIP-dependencies)
+- [Using Arm Compiler](../sections/building.md#using-arm-compiler)
+- [Configuring the build for simple_platform](../sections/building.md#Configuring-the-build-for-simple_platform)
+- [Working with model debugger from Arm FastModel Tools](../sections/building.md#Working-with-model-debugger-from-Arm-FastModel-Tools)
> **Note:** If re-building with changed parameters values, it is highly advised to clean the build directory and re-run the CMake command.
@@ -309,12 +263,9 @@ cp custom_audio1.wav /tmp/custom_files/
Next set `kws_asr_FILE_PATH` to the location of this folder when building:
```commandline
-cmake \
+cmake .. \
-Dkws_asr_FILE_PATH=/tmp/custom_files/ \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DUSE_CASE_BUILD=kws_asr- ..
+ -DUSE_CASE_BUILD=kws_asr
```
The files found in the `kws_asr_FILE_PATH` folder will be picked up and automatically converted to C++ files during the
@@ -348,13 +299,10 @@ Then, you must set `kws_asr_MODEL_TFLITE_PATH_ASR` to the location of the Vela p
An example:
```commandline
-cmake \
+cmake .. \
-Dkws_asr_MODEL_TFLITE_PATH_ASR=<path/to/custom_asr_model_after_vela.tflite> \
-Dkws_asr_LABELS_TXT_FILE_ASR=<path/to/labels_custom_model.txt> \
- -DTARGET_PLATFORM=mps3 \
- -DTARGET_SUBSYSTEM=sse-300 \
- -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/bare-metal-toolchain.cmake \
- -DUSE_CASE_BUILD=kws_asr ..
+ -DUSE_CASE_BUILD=kws_asr
```
> **Note:** Clean the build directory before re-running the CMake command.