Simulink C caller block can't compile C code, but other blocks can

6 vues (au cours des 30 derniers jours)
I'm programming a TI C2000 processor (the F28379D Delfino) using Simulink and I can't get the C caller block to compile any code for my TI board. When I compile C code with the C caller I get the error "F28x_Project.h does not exist." However, I can compile and run the exact same code from a memory read block, so I've been using that as a workaround. Does anyone know why the C caller would have trouble working with the TI header files? Does it compile C differently from the memory copy block? I've tried declaring the header file various ways and making sure it's in the correct directory, and I know it is because the memory copy block compiles my code.
Thanks for any suggestions.

Réponse acceptée

Venkatesh Chilapur
Venkatesh Chilapur le 28 Juin 2019
Hi Matthew,
Attached is the model which now compiles with C caller block.
Please note changes made to Simulation target and custom code section as well as the source files.
The C caller block resolves the function it needs to call before the build starts.
Hence simulation target needs to have the relevant information.
We dont have all the paths yet in place at this time. Hence if we specify few headers like F28x_Project.h they will not be found. But when the actual build starts, we will have them found. Hence avoid having these device specific headers as part of your custom code.
This issue is not seen with memcopy as it does not need to resolve the C function.
It just puts the text(code)in the generated file.
Venkatesh C

Plus de réponses (1)

Venkatesh Chilapur
Venkatesh Chilapur le 25 Juin 2019
Hi Matthew,
Please can you attach the model to help us investigate further.
Venkatesh C
  2 commentaires
Matthew Gingerich
Matthew Gingerich le 27 Juin 2019
Here is an example model that demonstrates the problem.
Mukesh Ghosh
Mukesh Ghosh le 14 Déc 2021
I am facing the same problem. Is someone find the solution of this problem? When I run my C caller block from .slx, it shows me Matlab could not find header files which is link to microcontrolller. How to solve this problem?
Kind regards
Mukesh Ghosh

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by