Error when trying to simulate Matlabfunction

1 Ansicht (letzte 30 Tage)
leon chen
leon chen am 31 Jan. 2021
Beantwortet: Srija Kethiri am 22 Aug. 2022
Hello everyone,
For a project I wanted to implement some C-code into simulink and let it simulate using the simulink functions. This is how the blocks look like. and I put the code of the matlab function below. But I get some errors from it and I am not sure how to solve it or what the error means. I already looked on the forum and found this who had similiar No rule to make target error1 and this one No rule to make target error 2, but I still could not solve it. Also to make it more clear this
This is the error I am getting:
I would be really happy if someone can guide me to the right directions.
function uartWriteMessage = wifiModule(uartReadMessage, uartBufferSize, uartStatus)
uartWriteMessage = zeros(1, 200, 'uint8');
%initialisatie van uartWriteMessage array met 200 keer (uint8_t)0
%coder.cinclude('MAIN.h')
coder.updateBuildInfo('addIncludePaths','C:\Users\leon-\Documents\Laatste jaar school\BasysESP32_V2\BasysESP32V2.X');
coder.updateBuildInfo('addSourceFiles','MAIN.c');
coder.cinclude('MAIN.h');
%hier wordt MAIN.c geincluded
%coder.ceval('main');
%coder.ceval('matlabLoop', coder.ref(uartReadMessage), uartBufferSize, uartStatus, coder.ref(uartWriteMessage));
%matlabLoop en main zijn functies die aangeroepen worden, dingend die naast
%matlabLoop staan zijn argumenten
%coder.ref(x) betekent x is een pointer of array
end

Antworten (1)

Srija Kethiri
Srija Kethiri am 22 Aug. 2022
Hi Leon,
This is an error message that is thrown by the "make" (make/gmake) command. The common cause for this error message is: It could mean that the indicated file is missing i.e., here the file "Main.obj" does not exist.
In the above case, the indicated file was missing as a result of a faulty Support Package installation. A clean re-installation of the support package resolves the issue.
Another possible reason could be that the model location was changed. Make sure to delete all artifacts and code generation folders (slprj, model_xxx) before you attempt a rebuild.
Hope this helps!

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by