Skip to main content
Visitor II
April 19, 2021
Solved

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

  • April 19, 2021
  • 3 replies
  • 4297 views

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.

    This topic has been closed for replies.
    Best answer by EAvina

    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

    3 replies

    ST Employee
    April 20, 2021

    Hi Eli @EAvina​ ,

    I checked with out experts, and they told me that the firmware generated by AlgoBuilder use the proper communication protocol so the Unicleo-GUI doesn’t need to know the board.

    The problem could be in the so called firmware template generated in STM32CubeMX (using X-CUBE-ALGOBUILD and X-CUBE-MEMS1). Can you please share this firmware template for a check? Maybe some settings is not correct.

    -Eleon

    EAvinaAuthor
    Visitor II
    April 21, 2021

    Hi Eleon @Eleon BORLINI​ 

    Thank you for your reply. Here are the screenshots of the configurations that I use in CubeMX and the generated files as well. Please let me know if you need anything more.

     0693W00000AM58xQAD.png0693W00000AM58iQAD.pngEli A.

    ST Employee
    April 22, 2021

    Hi,

    thank you for sharing the files but I would need the complete directory or the ioc file to be able check your configuration.

    EAvinaAuthor
    Visitor II
    April 22, 2021

    Hi Miroslav,

    Yes, here you have it.

    Thank you.

    Eli A.

    ST Employee
    May 18, 2021

    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.

    EAvinaAuthor
    Visitor II
    July 12, 2021

    Hello Miroslav,

    Have you had any luck so far?

    Eli A.

    EAvinaAuthor
    Visitor II
    July 27, 2021

    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.