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

9 visualizaciones (últimos 30 días)
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.

Respuesta aceptada

Venkatesh Chilapur
Venkatesh Chilapur el 28 de Jun. de 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

Más respuestas (1)

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

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by