STM32CubeIDE project with embedded coder files

30 次查看(过去 30 天)
Hi everyone,
I am starting with embedded coder for an stm32 (the BG474EDPOW board) and my goal is to be able to use STM32CubeIDE as a debugging tool and also be able to compile the generated code from Simulink Embedded Coder.
I am able to do my simulink model and use build deploy and start, it works on the board but the issue I am having is having a working project in the STM32CubeIDE.
Before generating my code I created the .ioc with CubeMX and in the target hardware ressource i chose the wanted .ioc file.
After generating the code, i have many files generated, so an ert_main.c, a project.c etc etc, but I want to have files that can be used in a STM32CubeIDE project, which I feel is not the case right now as I would have to copy and paste certain files, and certain parts of the code into the main.c file in the STM32CubeIDE project.
My question is : is there a way to direclty create a project with embedded coder / simulink that can be opened in STM32CubeIDE and which can be buildable / debuggable etc ?
For instance, when using embedded coder for TI targets, so for example C2000 targets, when generating the code there is a project which can be opened direclty in CCS and which can be build/debugged etc in CCS.
Is that possible for STM32 targets ? Am I missing a step ?
Thank you very much for your answers.

回答(3 个)

Narvik
Narvik 2024-3-21
编辑:Narvik 2024-3-21
Hi
As per my understanding, you would like to integrate Simulink generated code with STM32CubeIDE for debuggging and deployment on STM32 hardware.
Refer to the steps provided in the following documentation to debug and deploy Simulink generated code on STM32 hardware:
Hope this helps!

Aditya
Aditya 2024-5-3
Hi Narvik,
Thanks for the documents. But the project import phase still throws error. CubeIDE doesn't actually the model based design project but just some other config files.
Looks like after following the steps, it just creates an empty file / default file with no configurations done in the .elf file.

Sarah
Sarah 2024-5-14
Hello,
Thank you for your answer.
This works partially, as the debugging is done but you can't see line per line what happens in your code.
Secondly, I would like to be able to open the generated project on stm32cubeIde, and be able to add code lines and modify the code and then build it using stm32cubeIDE but that does not seem to be possible. Am I missing something or is that feature just not doable ?
Thank you.

产品


版本

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by