Edge Impulse enables developers to create the next generation of intelligent device solutions with embedded Machine Learning. This repository contains the Edge Impulse firmware for the ST B-L475E-IOT01A development board. This device supports all Edge Impulse device features, including ingestion, remote management and inferencing.
Note: Do you just want to use this development board with Edge Impulse? No need to build this firmware. See the instructions here for a prebuilt image and instructions. Or, you can use the data forwarder to capture data from any sensor.
Hardware
- DISCO-L475VG-IOT01A development board.
Software
-
Node.js 10.16 or higher.
-
Git - make sure
git
is in your PATH. -
Mercurial - make sure
hg
is in your PATH. -
STLink tools.
Installation via Homebrew is the easiest:
$ brew install stlink
-
Installation via pip is the easiest:
$ pip install mbed-cli
Unpack the GNU ARM Embedded Toolchain, and configure Mbed CLI to use it via:
$ mbed config -G GCC_ARM_PATH ~/toolchains/gcc-arm-none-eabi-9-2019-q4-major/bin/
$ mbed config -G TOOLCHAIN GCC_ARM
$ mbed config -G PROTOCOL SSH
-
Clone this repository:
$ git clone https://github.com/edgeimpulse/firmware-st-b-l475e-iot01a
-
Update dependencies:
$ mbed deploy
-
Fix an outdated file in the
mbed-os
dependency:cp source/edge-impulse-sdk/CMSIS/Core/Include/cmsis_gcc.h mbed-os/cmsis/TARGET_CORTEX_M/cmsis_gcc.h
-
Build and flash this project:
$ mbed compile -t GCC_ARM -m DISCO_L475VG_IOT01A --profile=debug -f
-
Attach a serial monitor to the board on baud rate 115,200 to see the output.
On macOS you can use Serial.app (recommended!) or connect via
screen
:-
Find the handle for your board:
$ ls /dev/tty.usbm* /dev/tty.usbmodem401203
-
Then connect via:
$ screen /dev/tty.usbmodem401203 115200
-
To exit, press:
CTRL+A
thenCTRL+\
then pressy
.
-
-
Install STLink:
$ brew install stlink
-
Install mbed-vscode-generator:
$ npm install mbed-vscode-generator -g
-
Generate the debugger files (run from the root folder of this project, not from the firmware folder):
$ mbed-vscode-generator -i firmware/ -o .vscode/ --debugger stlink
-
Just press 'Run' in Visual Studio Code to build and debug.
If the debugger does not properly detach, run killall st-util
.
To update to a different commit of the TensorFlow Lite for Microcontrollers library, edit the script update_tflite.sh
and include the new commit hash. Run the script from the parent directory of the firmware.
This script also ensures the CMSIS libraries are the same version used by the TensorFlow Lite project.