Get ready for the STM32 Summit 2026 | Online, November 3
Ask questions and find answers on how to deploy, debug, and optimize AI models on ST microcontrollers, microprocessors, and smart sensors.
Most recent activity
Hi TeamI want to know the difference between X-CUBE-AI and NanoEdge AI Studio for ML and AI development environment.Can I do the same thing with either dev environment?Are there any restrictions on the devices used?
I have created a project which uses the Nucleo-H7A3ZI-Q. When I build the project is completed successfully.I then add the software package CUBE-AI version 7.2.0 9 (validation selected) to the project. If I do not upload a network model, then I a warning then errors: So I added an ONNX model, which uploads correctly, and I can analyze as expected:When I come to build the code, the .elf file has disappeared, and the compiler can't find it. If I go to Run>Debug configurations, the .elf file is not there and is no longer created.If I repeat the steps above but do not build and run with no network, then the elf file does not disappear, and the code works fine. So I'm unsure if this is a bug or something to do with eclipse that I do not know about, but I thought it was worth asking in case anyone else runs into the same problem.I think if you compile without a network, it does not allow you to ever build the code correctly. So care must be taken and always compile CubeAI with a network c
It's weird. I successfully connected COM3 (UART) with ST-Links between Window10 PC and ST IoT board (B-L475E-IOT01A1). However, I got the unexpected situation as follows. How can I fix this issue? Welcome to any comments and hints. It would be helpful to me at least.
........... Omission. ..............................=cortex-m4 -std=c99 -g3 -DSTM32L475xx -DUSE_HAL_DRIVER -DUSE_STM32L475E_IOT01 -DPRIORITY_RTOS -DARM_MATH_CM4 -D__FPU_PRESENT=1 -c -O2 -ffunction-sections -Wall -fstack-usage -MMD -MP -MF"Drivers/BSP/B-L475E-IOT01/stm32l475e_iot01_env_sensors.d" -MT"Drivers/BSP/B-L475E-IOT01/stm32l475e_iot01_env_sensors.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/BSP/B-L475E-IOT01/stm32l475e_iot01_env_sensors.o" @"Drivers/BSP/B-L475E-IOT01/stm32l475e_iot01_env_sensors.c_includes.args"arm-none-eabi-gcc "C:/Users/invain/Desktop/e4ds-stm-cube-ai/quest01/en.fp-ai-sensing1/STM32CubeFunctionPack_SENSING1_V4.0.3/Drivers/BSP/B-L475E-IOT01/stm32l475e_iot01_motion_sensors.c" -mcpu=cortex-m4 -std=c99 -g3 -DSTM32L475xx -DUSE_HAL_DRIVER -DUSE_STM32L475E_IOT01 -DPRIORITY_RTOS -DARM_MATH_CM4 -D__FPU_PRESENT=1 -c -O2 -ffunction-sections -Wall -fstack-usage -MMD -MP -MF"Drivers/BSP/B-L475E-IOT01/stm32l475e_iot01_motion_sensors.d" -MT"Dr
Starting AI validation on target with random data... C:/Users/Ashu/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/7.2.0/Utilities/windows/stm32ai validate --name model -m C:/Users/Ashu/Downloads/converted_tflite_quantized (1)/model.tflite --type tflite --compression none --verbosity 1 --workspace C:\Users\Ashu\AppData\Local\Temp\mxAI_workspace25267435787879004881601825887577521 --output C:\Users\Ashu\.stm32cubemx\model_output --allocate-inputs --allocate-outputs --mode stm32 --desc COM3:115200 Neural Network Tools for STM32AI v1.6.0 (STM.ai v7.2.0-RC5) Setting validation data... generating random data, size=10, seed=42, range=(0, 1) I[1]: (10, 224, 224, 3)/uint8, min/max=[0, 255], mea
Hi,the code is successfully generated and built on cubeide,download to the board and it passed the validation on desktop.However it says fatal error Stm32f4xx_hal.h No such file or dictionary when I click the validation on target.What may lead to this happen , please help me.
..
Hello,I seem to not be able to run model analysis on CubeAI. I use a Mac mini with M1 Apple Silicon but I also have Rosetta already installed, since I have other intel apps I run. I tried installing Rosetta 2 again via Terminal but still doesn't work.I heard some developers have had issues with M1 Macs. Is there a fix for this?This is the output message on Cube.Thanks a lot for any help
Hi, I'm testing running a relocatable binary model. But when I use ai_rel_network_run(), I get into HardFault. The detailed error information is as follows, with my current test code attached. Does anyone know how to fix this please? Thanks in advance. /* USER CODE BEGIN PV */ float aiInData[AI_NETWORK_IN_1_SIZE]; float aiOutData[AI_NETWORK_OUT_1_SIZE]; const char* activities[AI_NETWORK_OUT_1_SIZE] = { "stationary", "walking", "running" }; ai_i32 batch; ai_handle net = AI_HANDLE_NULL; ai_handle weights_addr; ai_bool res; ai_network_report net_info; AI_ALIGNED(4) ai_u8 rt_ai_ram[2596*4]; AI_ALIGNED(4) ai_u8 act[1708*4]; /* USER CODE END PV */ Main: int main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock *
I'm using the STM32 IDE, making a project for my Nucleo-G474RE. I've loaded the X-Cube AI software but when trying to analyze my model, it just refuses. I don't get any errors, it goes to about 16% then immediately to 100 and says anaylsis failed. I can run the analysis on STMCubeMX just fine but it won't run on STM32CubeIDE... Is there a setting I'm not seeing or can I transfer the project from cubeMX to IDE so I can write my code? [AI:network_1664382959327] C:/Users/veteran/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/7.2.0/Utilities/windows/stm32ai analyze --name network_1664382959327 -m C:/Users/veteran/Downloads/sine_model.tflite --type tflite --compression none --verbosity 1 --workspace C:\Users\veteran\AppData\Local\Temp\mxAI_workspace6205587743940016258273181889693732 --output C:\Users\veteran\.stm32cubemx\network_output --allocate-inputs --allocate-outputs [AI:network_1664382959327] Getting Flash and Ram size used by the library [AI:ne
As shown in the picture, when I send the generate command, a compilation error occurs. The problem appears to be that std=c99 needs to be adjusted. Does anyone know how to fix this please?Thanks in advance.
Hello, everyone.I had a problem with version 7.2.0 of X-CUBE-AI.I load a keras 1D-CNN model and generate the code. I want transmit my inputdata to ai_input ,but the do-while() enter a endless loop. my code:ai_input = ai_network_inputs_get(network, (ai_u16 *) &voltage); Has anyone else encountered the same problem? How can it be solved?Thank you,LIU.
I'm trying to Implement basic MNIST Handwritten Digit recognition Model on STM32F769 DISC1 kit using STM Cube AI.Here are the steps I followed.Took a standard MNIST Digit recognition model from here https://colab.research.google.com/github/trekhleb/machine-learning-experiments/blob/master/experiments/digits_recognition_cnn/digits_recognition_cnn.ipynb It is provided by google colab.2. downloaded the .h5 file3 Created the project using STM32CUBE MX, in that included the STM32 CUBE AI Software pack. Included the core and selected application as 'application template'4 Using keeping other initializations default and selecting clock frequency 216 MHz, I generated the code.5 kept main program untouched (where MX_X_CUBE_AI_Process(); is called in while(1) loop.6 in app_x-cube-ai.c file made the modifications as told in 'Embedded Interface Client API' in documentation.Here I have no device to actually record the handwritten digit, therefore I copied one of the training dataset sample manually
Hi,I want to set up data logging from some of the sensors (accelerometer and ultrasonic microphone) of the STEVAL-STWINKT1B to the SD card using the FP-SNS-DATALOG1.However, I also want to add more externally connected sensors to the STM32 via SPI (in particular thermocouple sensors, but the exact type doesn't matter, of course).I thus wanted to ask (1) if that is possible and (2) how simple it will be. Will I run into issues disrupting the high sampling rates for the onboard sensors?
Hello,In the annex video it is mentioned that the project archive is available for the Nucleo board project with X-NUCLEO-IKA01A1, however when I download the materials archive it appears to be missing.Could you confirm this is the case, if so would it be possible to make this project available for download also?Many thanks,Anthony
Hi Guys,first time poster here and kinda a noob in deployment of Models, so sorry if i forget to mention something.My Projekt:Currently i developed a ML model in python, which is working and takes as Input float numbers. Now i wanted to deploy it on an STM32H747I-DISCO Development-Board as training with the STM32Cube-AI component. The validation per "validation application" was fine, so i wanted to write an manuel code so i could do pre- and postprocess the data. Therefor i used a dummy dataset, where i know the results of the inferenz and wanted to do an inferenz with the following code. It gives me no error, but the results of the inferenz are wrong/ not defined. The result of the inferenz should be ~1, but it gaves me the following:The Definiton of the input is for one float four ai_i8, which together gives an float number 1 (which mantisse, exp and sign) and in the code it looks like that: It would be great if someone can explain me, how i should give my Input to the ai_network_run
Hello,Are there plans to fully support the STEVAL-PROTEUS1 board in NanoEdge AI Studio? Currently only the STEVAL-STWINKT1B has full support (with datalogging).Many thanks,Anthony
Dear support-team:I've created a model which consists of only a LSTM layer and a linear layer with Pytorch, and convert it into ONNX model. But when I tried to verify it with STM32Cube.AI, it just print "Not IMPLEMENTED: Squeeze: Selected axis has shape entry not equal to 1". As I've checked the model, the shape entry which I try to squeeze is 1, what may the cause the problem? Sincerely for your help.Pytorch version: 1.8.2ONNX version: 1.10.0 (With Opset 10)STM32Cube.AI version: 7.2.0
I am implementing a program that retrieves sound from MEMS microphone and process it with XCUBE-AI. The sound is retrieved with DMA, and the related data is written inside RAM. When I use this data, the program goes into Memory Management handler. However, if I fill a memory with loop and use it as sound data, the program works well.My question is that I couldn't find anything about Memory Management exception, the reasons, etc. How can I solve it?
Hi,I'm interested in working with ML and AI on STM32, after spending some time looking through ST documentation I think using NanoEdge AI Studio + ST board is the quickest way to help me understand things.From what I can see, the latest available function pack from ST is FP_AI_MONITOR1 which currently supports the STEVAL-STWINKT1B, sadly this board is out of stock with a very long lead time... are there plans by ST to have other boards supported by this function pack?I do have the STM32L4-IOT node (B-L475E-IOT01A) so can follow along with this guide:https://wiki.st.com/stm32mcu/wiki/AI:How_to_perform_motion_sensing_on_STM32L4_IoTnodeI see various other boards are supported in NanoEdge AI, so this might be another route in, rather than rely on the function pack.Maybe I'm missing something, or is the current way of things?Many thanks.Anthony
I've followed this tinyML for stm32 from Digikey "TinyML: Getting Started with STM32 X-CUBE-AI | Digi-Key Electronics" reference,and got no Errors in STM32CubeMX when I clicked "Analyze" button after I've uploaded the tfLitemodel.Later I've tried this import tensorflow as tffrom tensorflow.keras.layers import *from tensorflow.keras.models import Sequential, Modelfrom tensorflow.keras.optimizers import Adam, RMSpropimport numpy as npinput1 = Input(shape=(1,))input2 = Input(shape=(1,))input = Concatenate()([input1, input2])x = Dense(2)(input)x = Dense(1)(x)model = Model(inputs=[input1, input2], outputs=x)model.summary()model.compile( optimizer = RMSprop(lr=0.02,rho=0.9,epsilon=None,decay=0), loss = 'mean_squared_error')x1=np.array([2600, 3000, 3200, 3
Hey. I’m quite new to microcontrollers and also have this question. I’ve checked all the solutions but didn’t work. I need help.I am using STM32F4291-DISC1 board and validating an LSTM model on target. I got the following error: E200(ValidationError): stm32: Unable to bind the STM AI runtime with "prediction_model" c-model: connection to "serial:COM4:115200"/"COM4:115200" run-time fails E801(HwIOError): Invalid firmware - COM4:115200I believe it is a single core I don’t have Cortex-M7 option to switch.Also, I’m using STM32CubeIDE. After compiling and running the code, the RAM and FLASH usage are: Is it normal? I am wondering if it is because the model is not download into the board.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.