From 90ada2ea5681b2a2722a10d2898eac34c2510791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Sv=C3=A4rd?= Date: Tue, 24 May 2022 17:01:57 +0200 Subject: Clarify README regarding CPU choice Currently TARGET_CPU should be used to set CPU+features, if using core_platform provided toolchain files. Change-Id: I053cc25de12501a2773238820daa150f9ea20fa7 --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5338e8f..d5e68bb 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,16 @@ The source code comes with a CMake based build system. The driver is expected to be cross compiled for any of the supported Arm Cortex(R)-M CPUs, which requires the user to configure the build to match their system configuration. -One such requirement is to define `CMAKE_SYSTEM_PROCESSOR` for the target CPU, -for example "cortex-m55+nodsp+nofp". Similarly the target NPU configuration is + +One such requirement is to define the target CPU, normally by setting +`CMAKE_SYSTEM_PROCESSOR`. **Note** that when using the toolchain files provided +in [core_platform](https://git.mlplatform.org/ml/ethos-u/ethos-u-core-platform.git), +the variable `TARGET_CPU` must be used instead of `CMAKE_SYSTEM_PROCESSOR`. + +Target CPU is specified on the form "cortex-m", for example: +"cortex-m55+nodsp+nofp". + +Similarly the target NPU configuration is controlled by setting `ETHOSU_TARGET_NPU_CONFIG`, for example "ethos-u55-128". The build configuration can be defined either in the toolchain file or @@ -23,6 +31,16 @@ $ cmake -B build \ $ cmake --build build ``` +or when using toolchain files from [core_platform](https://git.mlplatform.org/ml/ethos-u/ethos-u-core-platform.git) + +```[bash] +$ cmake -B build \ + -DCMAKE_TOOLCHAIN_FILE= \ + -DTARGET_CPU=cortex-m \ + -DETHOSU_TARGET_NPU_CONFIG=ethos-u- +$ cmake --build build +``` + ## Driver APIs The driver APIs are defined in `include/ethosu_driver.h` and the related types -- cgit v1.2.1