Giter VIP home page Giter VIP logo

workshop-devsummit2021-portenta's Introduction

ARM DevSummit 2021 - Edge Impulse Portenta workshop

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 Arduino Portena H7 development board. This device supports all Edge Impulse device features, including ingestion, remote management and inferencing.

Requirements

Hardware

Tools

First, sign up for a free account on Edge Impulse. You can then rename or create a new project in the Studio.

Then, install the Edge Impulse CLI, Arduino CLI, and the Arduino IDE (required for Windows users only, optional for macOS/Linux users):

Edge Impulse CLI

Follow the instructions to install the Edge Impulse CLI according to your Operating System.

Arduino CLI

Use following link for download and installation procedure: Arduino CLI.

The Edge Impulse firmware depends on some libraries and the Mbed core for Arduino. These will be automatically installed if you don't have them yet.

Arduino IDE (required for Windows users)

Installing Arduino IDE is a requirement only for Windows users. macOS and Linux users can use either the Arduino CLI or IDE to build the application.

  1. Download and install the Arduino IDE for your Operating System.
  2. In Tools -> Board -> Boards Manager, search for portenta and install the Arduino Mbed OS Portenta Boards v2.5.2.
  3. In Arduino Menu -> Preferences, check the location of the preferences.txt file (ie: /Users/aureleq/Library/Arduino15/).
  4. Copy the boards.local.txt and platform.local.txt files into the Arduino Mbed Portenta directory, for instance: /Users/aureleq/Library/Arduino15/packages/arduino/hardware/mbed_portenta/2.5.2. The platform.local.txt should not be required in the next Arduino Mbed Core release (more details here).

Flashing the pre-compiled Arduino firmware

The precompiled firmware enable users to collect data directly from the Edge Impulse Studio and run a default image classification model.

First, clone or download this repository.

To flash the firmware, double-click on the flashing script for your Operating System in the flashing-scripts folder.

Once you have flashed the firmware, you can connect the board to your Edge Impulse project with:

$ edge-impulse-daemon

(use your Edge Impulse credentials and select your project and board when prompted)

Building the firmware from source code

Export the Arduino library

Extract the contents of the exported Arduino library from your Edge Impulse project, and replace src/edge-impulse-sdk/, src/tflite-model/ and src/model-parameters/ folders in the project accordingly. Next rebuild the application.

Building the firmware

With Arduino CLI

  1. Build the application:

    ./arduino-build.sh --build
    
  2. Flash the application:

    ./arduino-build.sh --flash
    

With Arduino IDE

  1. Open the workshop-devsummit2021-portenta.ino, select the Arduino Portenta H7 (M7 core) board and the Flash Split 2 MB M7 + M4 in SDRAM.
  2. Build and flash the application using the Upload button.

Running the model

Once the application has been flashed, you can run the inference on the target with:

edge-impulse-run-impulse

Troubleshooting

  • Not flashing? You can double tap the button on the board to put it in bootloader mode.

  • Invalid DFU suffix signature?

    dfu-util: Invalid DFU suffix signature
    dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
    dfu-util: Cannot open DFU device 2341:035b
    dfu-util: No DFU capable USB device available
    Upload error: Error: 2 UNKNOWN: uploading error: uploading error: exit status 74
    

    Having the above issues? Then copy 20-arduino.rules to /etc/udev/rules.d/ and try again.

workshop-devsummit2021-portenta's People

Contributors

aureleq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.