Simulink C caller block can't compile C code, but other blocks can
9 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Matthew Gingerich
il 24 Giu 2019
Commentato: Mukesh Ghosh
il 14 Dic 2021
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.
0 Commenti
Risposta accettata
Venkatesh Chilapur
il 28 Giu 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
0 Commenti
Più risposte (1)
Venkatesh Chilapur
il 25 Giu 2019
Hi Matthew,
Please can you attach the model to help us investigate further.
Regards,
Venkatesh C
2 Commenti
Mukesh Ghosh
il 14 Dic 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
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!