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

Unable to build tflite-micro apps in zephyr #7

Open
jdsalmonson opened this issue Oct 5, 2023 · 1 comment
Open

Unable to build tflite-micro apps in zephyr #7

jdsalmonson opened this issue Oct 5, 2023 · 1 comment

Comments

@jdsalmonson
Copy link

I've worked thru the Chapter 07 Zephyr OS project, but found that I can't build zephyr tflist-micro projects.

I have installed the zephyr sdk, zephyr-sdk-0.16.3_macos-aarch64.tar.xz, for my Mac as per the getting started guide: https://docs.zephyrproject.org/latest/develop/getting_started/index.html
and was able to successfully build and run the blinky example.

However, when I try to build the cifar10 project as per page 272:

cd ~/zephyrproject/zephyr/samples/modules/tflite-micro/cifar10
west build -b qemu_cortex_m3 .

I get an error that tensorflow isn't found. Further, when I try to run the tflite-micro hello_world example: https://docs.zephyrproject.org/latest/samples/modules/tflite-micro/hello_world/README.html
I get errors that tensorflow is not found. e.g.:

zephyrproject/zephyr/samples/modules/tflite-micro/hello_world/src/output_handler.hpp:20:10: fatal error: tensorflow/lite/c/common.h: No such file or directory
   20 | #include <tensorflow/lite/c/common.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Has something changed wrt to the zephyr SDK installation since this edition of TinyML-Cookbook was published? I.e. was tensorflow removed from the SDK? Or is this an issue with my being on a Mac?

Many thanks.

@jdsalmonson
Copy link
Author

Update: Benjamin Cabé responded to my inquiry on the Zephyr mailing list. tflite-micro is no longer installed in zephyr by default -- a change not currently reflected in the documentation. The following lines will add it, and then tflite is available for compilation as expected:

west config manifest.project-filter -- +tflite-micro
west update

(I will mention that I need to add the align(8) const unsigned char type to the model.h and input.h model arrays in order for this build to fit into RAM on the qemu_cortex_m3. This is the alteration that was employed to the model in Chapter 5.)

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

No branches or pull requests

1 participant