mocleiri / tensorflow-micropython-examples

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

CI: Fixed build issues for Espressif Chipsets #124

Closed vikramdattu closed 1 year ago

vikramdattu commented 1 year ago
vikramdattu commented 1 year ago

@mocleiri can you please help to check why stm32 build is failing? Looks like, it's failing for long time!

mocleiri commented 1 year ago

@vikramdattu thanks for making these fixes for CI and for ESP32S3.

STM32 has never worked right. For a while it was building but its never worked properly on board. I was testing with a Nucleo H743 and I also have a STM32F4.

I think its related to Micropython for STM32 being a bare metal port but not sure. I have an experimental branch where I took out the single new command and put the inference logic back to how it was in OpenMV It didn't fix the esp32c3 issues but I haven't tried it for STM32 yet.

The current build problems are due to differences in CMSIS between what Micropython uses (a subset) and what customizations were added into tflm upstream for logging which depends on files not available in Micropython.

There is supposed to be a way to build Micropython using external CMSIS which I was going to try or to just changing the logging classes back to the non-optimized versions.

For RP2040 I literally just recompiled the code and microspeech worked on the first successful image build.

I was also considering porting to Zephyr and using that as a way to try to get at STM32 support.