Skip to content

edgeimpulse/firmware-synaptics-ka10000

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Edge Impulse firmware for Synaptics Katana KA10000

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 Synaptics Katana KA10000 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

How to build

Command Line build (Linux)

  1. Get the TENSAI Flow compiler

Download, save the compiler (in /opt/tensaicc) and make executable as follows:

wget https://cdn.edgeimpulse.com/build-system/tensaicc -O /opt/tensaicc && \
    chmod +x /opt/tensaicc

Set up the environment variable TENSAI_COMPILER_DIR to /opt.

  1. Get GNU Arm Embedded Toolchain

Download GNU Arm Embedded Toolchain 7-2017-q4-major. Set up the PATHenvironment variable to the toolchain, e.g:

wget https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/7-2017q4/gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2 && \
    tar xjf gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2 -C /opt/ && rm gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2
export PATH="/opt/gcc-arm-none-eabi-7-2017-q4-major/bin:${PATH}"
  1. Clone this repo and build
    git clone [email protected]:edgeimpulse/firmware-synaptics-ka10000.git
    cd firmware-synaptics-ka10000/SDK
    make mcusdk image

Using Docker

  1. Build docker container
    docker build -t synaptics .
  1. Clean the project
    docker run --rm -u $UID -v $PWD:/app synaptics /bin/bash -c "cd SDK && make clean-mcusdk"
  1. Build the application
    docker run --rm -u $UID -v $PWD:/app synaptics /bin/bash -c "cd SDK && make mcusdk image"

Upload image using your local machine

Flashing the firmware image to the KA10000 platform is done using an I2C connection. The CX31993 bridge board converts USB to I2C and is controlled by the i2c_flash_f3 uploader tool.

Linux (Unix)

Make sure to have installed following packages: g++, libudev-dev and libusb-1.0.0-dev. And always run the tool using sudo From the main folder you can use this one-liner:

    cd SDK/fcp/build/ ; sudo ./i2c_flash_f3_linux partition_flash.img ; cd ../../../

Windows

For Windows you can use the executable from the fcp/build folder to upload the image:

    i2c_flash_f3.exe partition_flash.img

Update your NN Classifier Model

In the Studio, navigate to Deployment, choose TENSAI Flow library, choose Quantized (int8) optimization and click Build. Extract the contents into SDK/mcusdk/platform/tahiti/m33/app/firmware/edge_impulse. Be sure to remove the previous model folders (edge-impulse-sdk, model-parameters and tensaiflow-model).

NOTE: only Quantized (int8) Grayscale image models are supported.

Troubleshooting

Lost serial connection

It may occur after a power-off/on cycle (e.g with SW1) or after flashing new firmware that you may no longer have a working serial connection. Try the following steps to repair the serial connection:

  1. power-on the board.
  2. remove all cables between the board and the host pc.
  3. re-connect all cables.
  4. power-off/on the board.

Image/Pixel (Color) Distortion

If the image pixels seems distorted/inversed try power cycling the device (e.g. with SW1) to fix the issue.