(Embedded) C++ code geeration: Code generation assertion 'aggElem' failed

조회 수: 5 (최근 30일)
Marek Wocka
Marek Wocka 2022년 4월 12일
답변: Marek Wocka 2022년 4월 12일
Hello everyone!
I have got a model which consists of three blocks: two are instances of the same referenced subsystem and the third one is an another referenced subsystem. All three are threated as atomic units, and for code generation are set to be reusable function (with user specified name). In this top model they are connected with ports from whose some data types are buses and their outputs are set as nonvirtual buses. Internally, the subsystems consist of other subsystems (some are also atomic) and blocks from self-developed library.
I want to run this model on an arm microcontroller. I have already succeeded in C code generation and then running the model in different ways on embedded. Now I want to generate a C++ code. Using Quick Start I had set to generate C++ code for ARM Cortex-M. In the result I have got an error:
Code generation assertion 'aggElem' failed in 'B:\matlab\src\slcg_impl\codedescriptor\RTWSubsystemInterfaceBuilder.cpp:3338'.
The same error I get when the device vendor and type are set to intel x86-32. But I don't get it when I generate code for interior of one of the subsystems.
What can be the source of the error and how to solve it?

답변 (1개)

Marek Wocka
Marek Wocka 2022년 4월 12일
Ok, I have found the reason: I have forgotten to add the folder with all needed files into path.
However, I have an another question: why the Nucleo board doesn't support C++ code in simulink (using Nucleo hardware support package)?

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by