How to install X-CUBE-AI through STM32CubeMX

Revision as of 16:38, 30 September 2023 by Registered User

This article describes how to install the X-CUBE-AI expansion package through STM32CubeMX.

Info white.png Information
  • X-CUBE-AI is a software that generates optimized C code for STM32 microcontrollers and Neural Network inference. It is delivered under the Mix Ultimate Liberty+OSS+3rd-party V1 software license agreement (SLA0048).

X-CUBE-AI is an STM32Cube expansion package that expands the capabilities of STM32CubeMX and is a part of the STM32Cube.AI ecosystem. It offers automatic conversion of pretrained artificial intelligence algorithms, which include neural network and classical machine learning models. Additionally, it integrates a generated optimized library into the user's project.

1. Prerequisites

  1. Latest version of STM32CubeMX installed on your computer
  2. myST account
  3. Internet access to download X-CUBE-AI package
  4. Configure proxy (optional)

2. Configure proxy (optional)

If the PC on which STM32CubeMX runs is connected to a computer network using a proxy server, STM32CubeMX needs to connect to that server. When the connection is established, it can access the internet, get self-updates and download firmware packages. Proxy configuration is typically (but not always) required on enterprise networks.

  1. Launch CubeMX and click [Help] > [Updater Settings].
CubeMX Proxy
  1. Under the Connection Parameters tab, choose the appropriate Proxy Server Type. Fill in the proxy information, if needed.

To ensure that CubeMX can access the internet through the configured proxy, press [Check Connection]. Once the connection has been verified, press [OK]. If needed, contact your IT administrator for proxy information (proxy type, http address, port). For detailed information about Connection Parameters, see Section 3.4.2 in UM1718: STM32CubeMX for STM32 configuration and initialization C code generation.

AMEMCUSupportCenterAD_1-1693951057612.png

3. X-CUBE-AI installation

Once STM32CubeMX installation is complete and CubeMX can access the internet, follow these steps to install the X-CUBE-AI package:

  • 1. Launch CubeMX and press [myST] -> [Login].==
 AMEMCUSupportCenterAD_4-1693960172543.png

Enter your myST account email address and password, and press [Login]. If you do not have a myST account, press [Create Account] to make one. AMEMCUSupportCenterAD_5-1693960208871.png


Once you are logged in successfully, press [Help] -> [Manage Embedded Software Packages].AMEMCUSupportCenterAD_0-1693598083578.png From the Embedded Software Packages Manager window, press the [Refresh] button to get an updated list of add-on packs. Go to [STMicroelectronics] Tab, press [X-CUBE-AI] and select the [Artificial Intelligence] package version you wish to install and click the [Install] button.AMEMCUSupportCenterAD_1-1693598317859.png

Follow the installation steps on the screen and click [Finish].AMEMCUSupportCenterAD_2-1693598686285.png

Once installation is successful, the X-CUBE-AI Artificial Intelligence package is marked with a green box. Click [Close] before proceeding.AMEMCUSupportCenterAD_3-1693270154103.png

In CubeMX, click [File] > [New Project] and select your preferred MCU from the [MCU/MPU Selector] tab, or select your preferred Board from the [Board Selector] tab. Then, under the [Pinout & Configuration] tab, press [Middleware and Software packages], and then select [X-CUBE-AI].AMEMCUSupportCenterAD_0-1694034807120.png



In the Software Packs Component Selector window, select STMicroelectronics.X-CUBE-AI. Then enable Core: Artificial Intelligence X-CUBE-AI -> Core -> Enable Finally, select the application type: Device Application -> Application -> Select "SystemPerformance". Click on [Ok] when done in the Software Packs Component Selector window.

Note that X-CUBE-AI currently supports three application types, namely SystemPerformance, Validation, and ApplicationTemplate. See section 9, 10 & 11 in UM2526: Getting started with X-CUBE-AI Expansion Package for Artificial Intelligence for more details. AMEMCUSupportCenterAD_5-1693270154134.png

Since this is the first use of the X-CUBE-AI Expansion Package, an OS-specific part of the package is downloaded and installed automatically.

AMEMCUSupportCenterAD_1-1693958716534.png

9. Once the download is complete, X-CUBE-AI is ready for use in your project.AMEMCUSupportCenterAD_2-1693958738703.png


For more information on how to use X-CUBE-AI in your project, refer to section 3 in UM2526: Getting started with X-CUBE-AI Expansion Package for Artificial Intelligence.

No categories assignedEdit