make
set up in your environment. If you’re unfamiliar with these tools you can build binaries directly for your development board from the Deployment page in the studio..zip
file.
To add the impulse to your firmware project, paste the edge-impulse-sdk/
, model-parameters
and tflite-model
directories from the downloaded ‘.zip’ file into the source/
directory of the example-standalone-inferencing-alif repository. Make sure to overwrite any existing files in the source/
directory.
Edge Impulse libraries copied into standalone example directory
ei_main.cpp
. In this minimal code example, inference is run from a static buffer of input feature data. To verify that our embedded model achieves the exact same results as the model trained in Studio, we want to copy the same input features from Studio into the static buffer in ei_main.cpp
.
To do this, first head back to the studio and click on the Live classification tab. Then load a validation sample, and click on a row under ‘Detailed result’.
Selecting the row with timestamp '320' under 'Detailed result'.
Copying the raw features.
ei_main.cpp
paste the raw features inside the static const float features[]
definition, for example:
ei_main.cpp
to run classification on live data.
-DTARGET_SUBSYSTEM
parameter when building. The commands below all default to the high performance core, but you can easily switch cores by swapping any -DTARGET_SUBSYSTEM=HP
parameter to -DTARGET_SUBSYSTEM=HE
app.axf
will now be available in the build/bin
directory.
app.axf
will now be available in the build/bin
directory, and you can flash the board
If you see errors when building, first check that your ARMCLANG compiler is properly set up and authenticated, and then read through the Troubleshooting and optimization section below.
app.axf
will now be available in build/bin
, and you can flash the board
app.axf
from the build/bin
directory, and note whether you built the application for the high performance or high efficiency coreapp.axf
Secure Enclave
to manage secure firmware storage and bootup in production environments. Alif provides documentation on converting .axf files for use with their secure enclave, and then programming the resulting binary regions to the secure enclave in AUGD0002.
ei_read_timer_us
and _ms
.EI_CORE_CLOCK_HZ
.armclang
the linker file attempts to place as much as possible in DTCM, and overflows into SRAM if needed.gcc
, the linker is unable to auto place based on size. If you get an error during link, see ensemble.ld and un-comment the line that places the model in SRAM (instead of DTCM). This will only slow down DSP, as the U55 has to use the SRAM bus to access the model regardless of placement.