cancel
Showing results for 
Search instead for 
Did you mean: 

AlgoBuild and MEMS1 for a custom board (B-L4S5I-IOT01A)

EAvina
Associate II

Hello,

I'm having trouble setting correctly AlgoBuild and MEMS1 in STM32CubeIDE, in order to use Algobuilder, Unicleo, and Unico to recover data via the accelerometer and create IA algos.

Here are my Algobuild and MEMS1 settings.

0693W000008zyObQAI.png0693W000008zyOgQAI.png0693W000008zyPKQAY.png0693W000008zyORQAY.png 

When I compile the project, there are some minor errors, that can be easily resolved by manually including the missing files.

Then, I copy the repertory where my project is, in Users\user\STMicroelectronics\AlgoBuilder\FirmwareTemplate so my firmware is recognized by AlgoBuilder.

0693W000008zyR6QAI.png0693W000008zyR1QAI.png 

Generating and compiling the Firmware gives no error, neither when I program the MCU. My main problem arrives when I try to use Unicleo, it tells me that it can't recognize any boards connected to my computer. I have checked the setting option to list all COM ports, but that doesn't resolve anything; I can now see the COM port where my board is, but when I select connect, the option to Start doesn't become available.

0693W000008zyUjQAI.png0693W000008zyUZQAY.png 

Does anyone have an idea where I made a mistake? Or if I'm missing a step somewhere?

Thank you in advance,

Best Regards.

Eli A.

17 REPLIES 17

Hi Miroslav,

Yes, I indeed tried it.

I saw that the XML file indeed modifies what appears when you select your target. Now I understand how it works, thank you.

But after compiling a simple design and programming the board, the Unicleo still doesn't recognize it.

Maybe I need to add some files for the Unicleo to be able to recognize the board. I saw that in User\STMicroelectronics\Unicleo-GUI there is a folder called Firmwares, maybe I need to put something in it. Do you think that this may be the solution?

Eli A.

0693W00000AOepMQAT.png0693W00000AOemIQAT.png

Miroslav BATEK
ST Employee

Hi Eli,

you don't need to add files to Unicleo, Unicleo should work as it is.

I suppose there is still some issue in the firmware. I will try to get the board a check it directly with this particular hardware, but it will take me about a week.

Hello Miroslav,

Have you had any luck so far?

Eli A.

Hello Eli,

I'm sorry for late reply, It took much longer to get the board than I expected.

In attachment is the AlgoBuilder firmware template for the B-L4S5I-IOT01A board.

I started to build the template from scratch, I have enabled all motion and environmental sensors. It seems to be working well.

I hope it will work on your side as well.

Hello Miroslav,

No worries, I understand.

I downloaded your firmware and it indeed works, I can use it with AlgoBuilder and Unicleo.

I mimicked the same configuration that you had on my project, but Unicleo still don't recognize the board. I noticed on your main while a function called MX_ALGOBUILD_Process, I assume that it is the one that makes the connection with the Unicleo possible. Nevertheless, I have included it in one of my top priority tasks, but with still not luck. My hypothesis is that that function needs to be called all the time, and with the RTOS it is not possible, or at least I'm not doing it properly, do you have any idea? And could you please confirm me that the IA environment (AlgoBuilder, Unicleo and Unico) is compatible with RTOS? If it is not, I'm in trouble because my environment depends on the RTOS.

Thank you in advance, have a nice day.

Eli A.

Hello Eli,

yes, function MX_ALGOBUILD_Process(); must be called regularly. If you are able to make it in RTOS the communication should work with Unicleo. We don't support direct generation of AlgoBuilder Firmware template with RTOS, so it is up to you to modify it. But I believe it can work.

Unicleo requires proper communication with the running firmware so it this case the MX_ALGOBUILD_Process(); must be executer regularly, the communication use buffer and DMA so there is also time for other functions which can be executed.

Unico is used, in this context, only for MLC/FSM configuration generation so if it completely independent on firmware in the target.

Hi Miroslav,

Thank you for your quick reply.

I finally did it work. I indeed put it on a high priority task, one that is called each 200 ms, but since AlgoBuilder uses the UART that I was using to send debug info to my computer, it didn't work. I think that they can't coexist since the resources must be available to be used by Unicleo that is why it couldn't recognize my "custom" board. But after commenting all my prints, it worked.

Another thing that I noticed is that when you include your firmware into the AlgoBuilder path

(C:\Users\user\STMicroelectronics\AlgoBuilder\FirmwareTemplate) with also a folder called METADATA (originating from the STM32CubeIDE build), AlgoBuilder will not rebuild your Firmware and take into account your design (.xml/algo_builder.c), it will still use the "design" (algo_builder.c) generated by the STM32CubeMX.

Thank you so much again for the help you gave me. I will continue now to recover data and process it on Unico, hoping that everything goes well.

If you need me to give you more details about how I make it work, let me know.

Have a nice day.

Eli A

Hi Ali,

perfect, I'm glad to hear that you were able to make it functional.