Integrating C Code with Simulink while running LaunchXL F28379D

1 Ansicht (letzte 30 Tage)
cody
cody am 4 Feb. 2021
Beantwortet: cody am 4 Feb. 2021
I have been trying to add a C Code to a model which runs on LaunchXL F28379D. To test it, I created two files Source and Header. I called inside 'Simulation Target'. I have two functions running in the C Code. These are 'onee' and 'twoo'. I use a C Caller block to call the function 'onee' and When I try to run the model in external mode. I get the following error.
undefined first referenced
symbol in file
--------- ----------------
_onee Test_3.obj
I think the function 'onee' is called inside the generated file C files, but the source and header files of my C Code are not propery mentioned. i.e I could not find #include "myfcn.h" in any of the generated C file.
I there any way to fix it?

Akzeptierte Antwort

cody
cody am 4 Feb. 2021
I Solved my problem. Basically I had to add add .c and .h file to 'code generation' section as well. When I hit Run, Simulink generates code for LaunchXL thus it takes .c and .h files along with it.

Weitere Antworten (0)

Kategorien

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

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by