cancel
Showing results for 
Search instead for 
Did you mean: 

AlgoBuilder: Create a new firmware template

AKato.1
Associate II

Hi,

my goal is to use custom template files in AlgoBuilder. For instance have an extra function or class in the main.c file. Therefore I would like to create a new firmware template for NUCLEO-L476RG as described in en.UM2689.

I am working with CubeMX, since in CubeIDE it is not possible to change the "application structure" to "Basic".

I am following the description in en.UM2689, setting the application to "IKS01A3_AlgoBuilder_Template", etc. After generating the code, I copy the whole project location to C:\Users\USER_NAME

\STMicroelectronics\AlgoBuilder\FirmwareTemplate\.

Then I restart Algobuilder and try to create a new design for the new target. However, the new target is not available in the dropdown list as shown on Figure 29.:

Is there anything, I am missing? If I go to C:\Program Files (x86)\STMicroelectronics\AlgoBuilder\ProjectTemplate, I see a target.xml file describing different targets.

1 ACCEPTED SOLUTION

Accepted Solutions
AKato.1
Associate II

Hi Miroslav,

I have definitely made some progress:

  • Set peripherals in CubeMX
  • KS01A3_AlgoBuilder_Template application created in CubeMX
  • Opened KS01A3_AlgoBuilder_Template application CubeIDE without changing anything, just building it. (There has been some problems with included .c files)
  • Copied to C:\Users\USER_NAME\STMicroelectronics\AlgoBuilder\FirmwareTemplate\.
  • Started Algobuilder and under Targets the following target has appeared: Nucleo_L476RG_Template_01 (STM32L476RGTx)
  • Created a very simple project: SensorHub + Accelerator + Graph
  • "Generate C code" and "Show C Code"

Here I have some problems. I am looking at the file "algo_builder.c" from the template and compare it to the C code which is shown. I would accept, that they are the same, but it is not the case. Should they be the same or do I misunderstand something at concept level.

I am going to send you:

  • New version of the KS01A3_AlgoBuilder_Template
  • Some screenshots from Algobuilder and different algo_builder.c

Thank you for your help!

Best regards,

Attila

View solution in original post

8 REPLIES 8
Miroslav BATEK
ST Employee

Hi,

did you select the Toolchain/IDE in the Firmware settings first?

If yes, can you please share with me your Project Template so I can test it?

AKato.1
Associate II

Hi Miroslav,

thanks for your reply. In attachment you find the generated project and some screenshots from CubeMX and Algobuilder.

I selected the Toolchain CubeIDE in CubeMX.

AKato.1
Associate II

... and the screenshots.

Miroslav BATEK
ST Employee

HI,

I have checked your project.

1) For STM32CubeIDE you have to uncheck the Generate Under Root option in Project Manager tab. The project files must be inside STM32CubeIDE directory.

2) I see peripherals (TIM, CRC, I2C) are not configured as it is described in the UM2689.

AKato.1
Associate II

Hi Miroslav,

I have definitely made some progress:

  • Set peripherals in CubeMX
  • KS01A3_AlgoBuilder_Template application created in CubeMX
  • Opened KS01A3_AlgoBuilder_Template application CubeIDE without changing anything, just building it. (There has been some problems with included .c files)
  • Copied to C:\Users\USER_NAME\STMicroelectronics\AlgoBuilder\FirmwareTemplate\.
  • Started Algobuilder and under Targets the following target has appeared: Nucleo_L476RG_Template_01 (STM32L476RGTx)
  • Created a very simple project: SensorHub + Accelerator + Graph
  • "Generate C code" and "Show C Code"

Here I have some problems. I am looking at the file "algo_builder.c" from the template and compare it to the C code which is shown. I would accept, that they are the same, but it is not the case. Should they be the same or do I misunderstand something at concept level.

I am going to send you:

  • New version of the KS01A3_AlgoBuilder_Template
  • Some screenshots from Algobuilder and different algo_builder.c

Thank you for your help!

Best regards,

Attila

AKato.1
Associate II

Screenshots to different algo_builder.c files:

Miroslav BATEK
ST Employee

Hi Attila

your latest template seems to be fine. I have tested it quickly and it works.

algo_builder.c is generated by the AlgoBuilder application according to your design, so it wont be the same as it is in the template.

AKato.1
Associate II

Hi Miroslav,

thank you for your support. Everything works fine. We are experimenting with our own blocks based on templates right now. It is super cool!

Best regards,

Attila