Filter löschen
Filter löschen

Need to build simulink model and separate function autocode in same Visual Studio project

3 Ansichten (letzte 30 Tage)
I'm trying to incorporate autogenerated code from a Simulink model and a separate function both into a visual studio C++ project. The problem I think I'm running into is that the header files generated for the matlab coder project collide with the header files from the simulink model such as rtwtypes.h. What would the best way to go around this? The simulink model is complex and uses multirate and needs to be fully executed before the autogenerated function is run so putting the function inside the model doesn't seem possible. I don't see a way to have matlab (or simulink) coder build both the simulink model and the matlab function together.
So far, these are the only things I can think of, but I'm not sure how to do them:
1. Configure MATLAB coder to have the same configuration as the simulink model so that the shared headers are interchangeable and just get rid of one set.
2. Wrap the function's .lib, .h, .dll in another .dll outside of matlab and translate the inputs and outputs to not rely on any of the colliding headers so that the model library can be compiled alongside the wrapped function library.
3. Put function in simulink block and add to library with model and build library as .dll.
4. ???
Thanks, Ian

Antworten (0)

Kategorien

Mehr zu Simulink Coder finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by