AN 1011: TinyML Applications in Altera FPGAs Using LiteRT for Microcontrollers
ID
848984
Date
9/29/2025
Public
1. Overview
2. Preparing LiteRT Inference Model
3. Generating Nios® V Processor System
4. Generating Arm Processor System
5. Programming and Running
6. Nios® V Processor with TinyML Design Example
7. Appendix
8. Document Revision History for the AN 1011: TinyML Applications in Altera FPGAs Using LiteRT for Microcontrollers
4.2.2. Building LiteRT for Microcontrollers Static Library
You must build LiteRT for Microcontroller libraries in Linux environments. If you are using Windows OS, you can invoke Windows* Subsystem for Linux* (WSL). Run the following commands:
$ sudo apt update $ sudo apt install make git python3 unzip python3-pip $ pip3 install numpy Image $ cd $TOP_FOLDER $ git clone --depth 1 https://github.com/tensorflow/tflite-micro.git $ cd tflite-micro $ python3 tensorflow/lite/micro/tools/project_generation/create_tflm_tree.py\ -e hello_world tflite_app
Note: It is mandatory to change Directory command (cd) to tflite-micro. The execution of create_tflm_tree.py Python script fails when it is executed from different directory.
Figure 19. Content of the tflite_app Folder
Altera recommends to review the Hello World TinyML example in the examples folder. It is a prediction model on the sine function. For more information, please refer to LiteRT – Hello World Example and LiteRT - Get started with microcontrollers.