-
Notifications
You must be signed in to change notification settings - Fork 7
/
build_commands.txt
73 lines (54 loc) · 3.27 KB
/
build_commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
NOTE! Update submodules before building:
git submodule init
git submodule update
NOTE! Generate micronet/mobilenet models 1st with:
python3.10 set_up_default_resources.py --additional-ethos-u-config-name ethos-u55-256
NOTE! All should normally build as Release for full-speed operation. In particular,
this enables auto-vectorization for ARMCLANG. Images can still be debugged with
reasonable success, but CMAKE_BUILD_TYPE can be changed to Debug if necessary.
One build directory can be used to build multiple use cases for one target -
use separate build directories for the two subsystems.
The port supports either UART2 or UART4 for either RTSS, defaulting to UART2 always.
The instructions for the HP image classification select UART4 on the assumption that this
will be run in parallel with the HE keyword spotting using UART2.
Some demos use a basic 320x240 display emulating the ARM MPS3. Alif camera-based
demos use an LVGL-based UI. In both cases the display can be rotated with
-DROTATE_DISPLAY=90 or 180 or 270. The basic UI can be disabled with -DGLCD_UI=OFF -
this is done below for the HE keyword-spotting to leave the display for the other core.
The main SRAM is normally used for camera, display and NPU buffers. This allows the
larger models to be run. There is an alternative linker script for the HE core that
does not use the main SRAM. It also runs from a smaller region at the end of MRAM.
This allows the smallest models to be run faster from the DTCM, but no display is
possible. This is selected below for the secondary core, where it's necessary to
avoid RAM/MRAM conflicts with the primary core.
There are three supported Alif Evaluation Kits: Alif Development Kit (DevKit) and two
versions of the Alif AI/ML Application Kit (AppKit_Alpha1 and AppKit_Alpha2). The Alpha1
was built in limited quantity and should be removed when Alpha2 adoption rises. To
select between the boards, use one of the options TARGET_BOARD=DevKit (default),
TARGET_BOARD=AppKit_Alpha1 or TARGET_BOARD=AppKit_Alpha2
; ------------ Image classification on CM55-HP with ARMCLANG ---------------------
cmake -DTARGET_PLATFORM=ensemble \
-DTARGET_SUBSYSTEM=RTSS-HP \
-DCONSOLE_UART=4 \
-DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-armclang.cmake \
-DCMAKE_BUILD_TYPE=Release -DLOG_LEVEL=LOG_LEVEL_DEBUG ..
; ------------ Image classification on CM55-HP with GCC --------------------------
cmake -DTARGET_PLATFORM=ensemble \
-DTARGET_SUBSYSTEM=RTSS-HP \
-DCONSOLE_UART=4 \
-DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-gcc.cmake \
-DCMAKE_BUILD_TYPE=Release -DLOG_LEVEL=LOG_LEVEL_DEBUG ..
make ethos-u-alif_img_class -j
; ------------ Keyword spotting on CM55-HE ARMCLANG ----------------------
cmake -DTARGET_PLATFORM=ensemble \
-DTARGET_SUBSYSTEM=RTSS-HE \
-DGLCD_UI=NO -DLINKER_SCRIPT_NAME=ensemble-RTSS-HE-TCM \
-DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-armclang.cmake \
-DCMAKE_BUILD_TYPE=Release -DLOG_LEVEL=LOG_LEVEL_DEBUG ..
; ------------Keyword spotting on CM55-HE GCC ----------------------------
cmake -DTARGET_PLATFORM=ensemble \
-DTARGET_SUBSYSTEM=RTSS-HE \
-DGLCD_UI=NO -DLINKER_SCRIPT_NAME=ensemble-RTSS-HE-TCM \
-DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-gcc.cmake \
-DCMAKE_BUILD_TYPE=Release -DLOG_LEVEL=LOG_LEVEL_DEBUG ..
make ethos-u-alif_kws -j20