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

8 Ansichten (letzte 30 Tage)
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.

Akzeptierte Antwort

Venkatesh Chilapur
Venkatesh Chilapur am 28 Jun. 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.
HTH,
Regards,
Venkatesh C

Weitere Antworten (1)

Venkatesh Chilapur
Venkatesh Chilapur am 25 Jun. 2019
Hi Matthew,
Please can you attach the model to help us investigate further.
Regards,
Venkatesh C
  2 Kommentare
Matthew Gingerich
Matthew Gingerich am 27 Jun. 2019
Here is an example model that demonstrates the problem.
Mukesh Ghosh
Mukesh Ghosh am 14 Dez. 2021
Hello,
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

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by