Tensorflow Lite C Libraries Fail on Arduino Uno Q

Hello,

I’m reaching out regarding an issue when building a TensorFlow Lite Micro (C) project on the Zephyr-based Arduino Uno Q. When trying to include any TF Lite C Library the compile times exceed +5 Minutes with corresponding error messages.

The linker fails with several undefined references — particularly to standard math functions (frexp, round, floor, logf, expf) and assertions (__assert_no_args).

I am using an extracted TFLM Byte-Array with a "model. cc" file, which I have working on other Arduino Boards in the same manner. I got it also running on the MPU Side with ONNX Interpreter and TF2ONNX. However I am wondering, if there is a workaround for integrating the C-Libraries on the MCU side.

I am grateful for any tips and workarounds.

Friendly greetings
David

Hi @davidkg97.

Were you using Arduino App Lab or Arduino IDE?

I ask because, when using App Lab (whether using UNO Q is in SBC or hosted mode), the compilation is performed by the UNO Q's Linux machine. The computing specs of the microprocessor are less than the average standard PC, so you can expect an extended compilation duration for complex sketch programs such as those using TensorFlow.

The good news is that the compilation output is cached, so once you have one successful compilation you will find that subsequent compilations of sketches will be significantly shorter.

I believe the developers have already made a fix for this:

That was done after the time of the last release of the "UNO Q Board" platform (machine identifier arduino:zephyr), so the math functions are still missing when compiling sketches for the UNO Q board, but should no longer occur after the next release of the platform comes out.

@ptillisch

Thank you very much for the feedback, I am using App Lab, which would explain the computation time.

If I understand correctly, I will wait for the next update to be released to check again if it works then.

Friendly greetings
David

I guess you already noticed, but for the benefit of interested parties, I'll add a note that the change I mentioned in my previous reply is in the version 0.52.0 of the "Arduino UNO Q Board" platform that was released yesterday. Arduino App Lab will automatically offer an update to the new version of the platform.

Hopefully the error compiling the TensorFlow Lite code will no longer occur when using the new version of the platform.