The artificial intelligence expansion package contains Linux AI frameworks to enable AI application examples that can be run on STM32MP1 Series devices.
This package consists in an OpenEmbedded meta layer, named meta-st-stm32mpu-ai, to be added on top of the STM32MP1 Distribution Package. It brings a complete and coherent easy-to-build / install environment to take advantage of AI on the STM32MP1 Series.
The meta layer contains frameworks, tools and applications to run AI examples. Different image flavors are to be made available targeting different use cases such as computer vision (CV).
1. Prerequisite[edit source]
Install the STM32MP1 Distribution Package v1.1.0, but do not initialize the OpenEmbedded environment (sourcing the envsetup.sh) before having installed the meta-st-stm32mpu-ai meta layer (see next chapter).
2. Installation of the meta layer[edit source]
2.1. STM32MP1 DK2 or EV1 boards[edit source]
The software package is provided AS IS, and by downloading it, you agree to be bound to the terms of the software license agreement (SLA). The detailed content licenses can be found here.
- Clone following git repositories into <Distribution Package installation directory>/layers/meta-st
cd <Distribution Package installation directory>/layers git clone https://github.com/kraj/meta-clang -b thud cd <Distribution Package installation directory>/layers/meta-st git clone https://github.com/STMicroelectronics/meta-st-stm32mpu-ai.git -b v1.1.0
- Set up the build environment
cd ../.. DISTRO=openstlinux-weston MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
- Add the new layers in that order
bitbake-layers add-layer ../layers/meta-clang bitbake-layers add-layer ../layers/meta-st/meta-st-stm32mpu-ai
2.2. STM32MP1 Avenger96 board[edit source]
The software package is provided AS IS, and by downloading it, you agree to be bound to the terms of the software license agreement (SLA). The detailed content licenses can be found here.
- Clone following git repositories into <Distribution Package installation directory>/layers/meta-st
cd <Distribution Package installation directory>/layers git clone https://github.com/kraj/meta-clang -b thud git clone https://github.com/vinceab/meta-av96.git -b thud cd <Distribution Package installation directory>/layers/meta-st git clone https://github.com/STMicroelectronics/meta-st-stm32mpu-ai.git -b v1.1.0
- Set up the build environment
cd ../.. META_LAYER_ROOT=layers DISTRO=openstlinux-weston MACHINE=stm32mp1-av96 source layers/meta-st/scripts/envsetup.sh
- Add the new layers in that order
bitbake-layers add-layer ../layers/meta-av96 bitbake-layers add-layer ../layers/meta-clang bitbake-layers add-layer ../layers/meta-st/meta-st-stm32mpu-ai
3. Build the software image[edit source]
Different OpenSTLinux expansion packages are available to target different use cases. The following commands need to be executed in the build environment.
- X-LINUX-AI-CV for computer vision use case
- For further information about this OpenSTLinux expansion package, read this article X-LINUX-AI-CV OpenSTLinux expansion package
- To build it, execute the following command:
bitbake st-image-ai-cv
4. Flash the built image[edit source]
Follow this link to know how to flash the built image.
5. Launch the AI software[edit source]
- Power up the board
- The AI demo launcher is displayed at the end of the boot sequence (it replaces the original GTK demo launcher application)
5.1. The AI demo launcher[edit source]
The AI demo launcher is a derivative of the GTK demo launcher application.
It is written in python3[1] and uses GTK[2] to display the user interface.
It allows easy launching of the AI application examples.
A "single tap" on the touch screen or a "single click" with a mouse connected to the board is sufficient to launch the AI application.
The AI demo launcher is updated with the available examples according the built image.
If a computer vision package is built, the AI demo launcher then contains the supported computer vision application examples.
6. References[edit source]