mocleiri / tensorflow-micropython-examples

A custom micropython firmware integrating tensorflow lite for microcontrollers and ulab to implement the tensorflow micro examples.
MIT License
170 stars 79 forks source link

Migrate to Micropython 1.15 #3

Closed mocleiri closed 3 years ago

mocleiri commented 3 years ago

Micropython 1.15 changes the build system for esp32 from GNU Make to CMake but also opens up the ability to build with the latest espressif idf versions.

I need to update the code so that the microlite and audio_frontend modules build using the new way.

ulab upstream also supports the new way so I will need to upgrade that aswell.

mocleiri commented 3 years ago

Also need to cherry pick the latest i2s work from https://github.com/miketeachman/micropython/tree/esp32-i2s for esp32

mocleiri commented 3 years ago

Instead of cherry picking I just need to follow the instructions here: https://github.com/micropython/micropython/pull/4471#discussion_r581447887

mocleiri commented 3 years ago

There is a single commit on i2s-PR-master-rebase that I can setup and/or cherry pick instead. It has more advanced features like an internal ringbuffer implementation and a way to register a callback function to run when a buffer is available to process.

mocleiri commented 3 years ago

A new pull request was filed using the i2s branch. I moved micropython to be based on that commit. Because this also changes the project to be built using CMake I also had to add new CMake compatible module build files and to make a new boards directory to contain the flags needed for this firmware:

  1. run the cores at 240 mhz
  2. use the altered partition table to have 3MB for apps and 1MB for the filesystem.

All of this works and we can build and run using the updated i2s api.