Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change esp32 to build on top of the tflite-micro-esp-examples idf component #127

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mocleiri
Copy link
Owner

@mocleiri mocleiri commented Sep 5, 2023

This is work in progress to change how tensorflow is built and linked into the microlite firmware. Instead of enumerating all of the source files I build the tensorflow part with esp_nn for accelerated ops directly as an esp-idf component.

It also upgrades the microlite module to work with latest micropython master (>1.20.0).

The submodules are deleted. Instead a new scripts/build.sh has been created. It has two functions:

  1. prepare_dependencies - this will create a dependencies subdirectory and setup a shallow clone of: ulab, micropython, tflite-micro-esp-examples, esp32-camera, micropython-camera-driver, tflite-micro
  2. build_esp32 - this will build the esp32 boards. At the moment it works for the boards/esp32/build/MICROLITE board.

I've run through the steps manually and was able to build firmware for the MICROLITE board and flash it an run the microspeech demo.

The second commit contains changes from @uraich for upgrading microlite to use the new module registration macros.

The next steps are to change the ci builds to use the new build script, upgrade the other board configurations and ensure the unix and rp2 builds still work properly.

Michael O'Cleirigh added 3 commits September 4, 2023 12:17
Instead of using submodules create a script that will make a shallow git clone of the dependency repos:
1. ulab
2. micropython
3. tflite-micro-esp-examples
4. tflite-micro (for non esp32 boards)

Pin the versions to the latest releases of each dependency.

ulab: 6.0.12
micropython: master
esp32-tflite: v1.0.0
tflite-micro: <undefined>

tflite-micro doesn't tag releases so its undefined to be the latest commit on the tip of the main branch.

use latest micropython to get upgrade to idf 5.0.2
I copied the micropython board ESP32_GENERIC and replaced MICROLITE with minor adjustments
to enable the microlite module and the name of the board.
@mocleiri mocleiri self-assigned this Sep 5, 2023
@mocleiri mocleiri force-pushed the feature/126-microlite-on-tflite-micro-esp-examples branch 26 times, most recently from 7dbb3d9 to 7e6e0ac Compare September 9, 2023 00:14
@mocleiri mocleiri force-pushed the feature/126-microlite-on-tflite-micro-esp-examples branch 21 times, most recently from 0e7e152 to 9662651 Compare September 14, 2023 02:49
Michael O'Cleirigh added 2 commits September 13, 2023 22:49
Also update ci for building esp32 MICROLITE using the new build scripts.
@cnadler86
Copy link

Perhaps you might want also to update to the new camera API for Micropython. This works with the actual Micropython version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants