MATLAB Answers

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

1 view (last 30 days)
Sumit Patil
Sumit Patil on 10 Jul 2019
Edited: Sumit Patil on 22 Jul 2019
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 - 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 -
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
While building the model following error is showing up -
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?

Accepted Answer

Sumit Patil
Sumit Patil on 22 Jul 2019
Edited: Sumit Patil on 22 Jul 2019
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!


Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!