Why "Failed to generate all binary outputs" error occuring while creating model reference from subsystem for Embeddded Coder for C2000?

1 回表示 (過去 30 日間)
I am implemnting sensorless FOC of PMSM using Texas Instrument's F28379D launchpad + DRV8305 + PMSM Dyno using Embedded Coder with help of an example shown in the following link - https://www.mathworks.com/help/supportpkg/texasinstrumentsc2000/examples/permanent-magnet-synchronous-motor-field-oriented-control.html or type command "c28379Dpmsmfocdual_cpu1_ert" to open the example. This original model is working fine and I verified all the funcitonality.
In the given model, I wanted to convert "Torque Control Algorithm" subsytem (inside function call of ADC interrupt subroutine) into the reference model. I have used Model Reference Conversion Advisor with its default settings and procedure shown in following link - https://www.mathworks.com/help/simulink/ug/convert-a-subsystem-to-a-referenced-model-1.html
During that conversion, I followed advisor's recommended changes as follows 1. setting "subsystem as an atomic unit". Also, In configuration parameter pane like 2. setting "Total number of instances allowed per top model --> multiple" 3. Data Validity --> Signal Resolution -->Explicit. Changes are applied to both parent and daughter model. Conversion complete message is shown for your reference
model_reference_advisor_snap.PNG
While building the model following error is showing up -
error_msg.PNG
I edited F2837xD_Ipc_drivers.h by #inlcude <stdint.h> and #include "F2837xD_device.h", then it is building it and running the motor correctly with no issue.
The question is, why this issue doesn't showup when there is a subsytem and why I have to manually edit F2837xD_Ipc_drivers.h when I am using model referencing feature?

採用された回答

Sumit Patil
Sumit Patil 2019 年 7 月 22 日
編集済み: Sumit Patil 2019 年 7 月 22 日
Solution I got from mathworks technical support -
Get rid of these errors by removing the included header file in the Configuration Parameters. Perform forllowing Steps -
Open Configuration Parameters:
Open Code Generation tab -> Custom Code -> Insert custom C code in generated -> Header File:
There is an entry for #"include F2837xD_IPC_drivers.h" which you can delete.
This should get rid of the build error!

その他の回答 (0 件)

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by