Error while parsing custom code: import problems in C caller block for generated Autosar C code
显示 更早的评论
I would like to import some generated Autosar code into my model to simulate with the other model (MBD) using the C caller block. I was fixing the include issues step-by-step and at the end came across with the problem that Matlab asks me to fix the code itself due to some detected problems (see below):
Error while parsing custom code. Fix the errors in your custom code or disable 'Import custom code' if your custom code has incompatibilities.
Caused by:
- In line 2387 of c:\work\cpm_sw\fctn_cpm_vhctl\integration_tests\../SWC/src/stub/Rte_CtApVehCtrl.h, expected a ";":
- extern FUNC(void, CtApVehCtrl_CODE) Run_CtApVehCtrl_Init(void); | ^
- In line 2388 of c:\work\cpm_sw\fctn_cpm_vhctl\integration_tests\../SWC/src/stub/Rte_CtApVehCtrl.h, expected a ";":
- extern FUNC(void, CtApVehCtrl_CODE) Run_CtApVehCtrl_CyclicMain(void); | ^
Component:Simulink | Category:Model error
I have a feeling that the Matlab cannot resolve the complexity of the Autosar C code structure and ask me to correct the "extern FUNC(void, CtApVehCtrl_CODE);" as a separate function declaration although this is not the case. The "FUNC(void, CtApVehCtrl_CODE)" belongs to the Run_CtApVehCtrl_Init(void) function declaration.
This "FUNC" macro is defined by the Autosar for its function declaration.
I would highly appreciate the input in which direction I should be searching for the mistake or how to fix this problem.
Regards,
Renat.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 AUTOSAR Blockset 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!