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

Support for Wio Terminal and Xiao #102

Open gigwegbe opened 1 year ago

gigwegbe commented 1 year ago

Hello @mocleiri, Thanks for the fantastic work. Could you please guide me on how to port tensorflow-micropython-example for both SAMD boards(Wio Terminal and Xiao)? Here is Ardupy which is supported by both boards, I think it might help. Thanks.

mocleiri commented 1 year ago

This project is a micropython C user module. You need to get a board configuration and then build micropython for that board incorporating the microlite module.

The main issue is the build environment's support of C/C++'s standard libraries. The ESP32 and RP2040 builds work nicely because the standard libraries are included in their respective SDK's.

The STM32 port doesn't work right because of difficulties in integrating the standard libraries into the bare metal micropython port.

I know its possible because openmv is primarially using stm32 based boards fine; but I haven't been able to figure out how to build properly linking the C++ libraries.

Really you want to do a SAMD micropython build and include the microlite module as part of the build. Then you want to flash and see what happens when running inference.