Skip to content

mcallistertad/firmware-st-b-l475e-iot01a

 
 

Repository files navigation

Edge Impulse firmware for ST B-L475E-IOT01A

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.

Requirements

Hardware

Software

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

Building the device firmware

  1. Clone this repository:

    $ git clone https://github.com/edgeimpulse/firmware-st-b-l475e-iot01a
    
  2. Update dependencies:

    $ mbed deploy
    
  3. 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
    
  4. Build and flash this project:

    $ mbed compile -t GCC_ARM -m DISCO_L475VG_IOT01A --profile=debug -f
    
  5. 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:

    1. Find the handle for your board:

      $ ls /dev/tty.usbm*
      /dev/tty.usbmodem401203
      
    2. Then connect via:

      $ screen /dev/tty.usbmodem401203 115200
      
    3. To exit, press: CTRL+A then CTRL+\ then press y.

Debugging through Visual Studio Code

  1. Install STLink:

    $ brew install stlink
    
  2. Install mbed-vscode-generator:

    $ npm install mbed-vscode-generator -g
    
  3. 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
    
  4. Just press 'Run' in Visual Studio Code to build and debug.

If the debugger does not properly detach, run killall st-util.

Updating the TensorFlow Lite for Microcontrollers library

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.

About

Edge Impulse firmware for the ST B-L475E-IOT01A development board

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 82.5%
  • C++ 17.4%
  • Other 0.1%