Error when trying to simulate Matlabfunction
3 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
Srija Kethiri
2022-8-22
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!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Communications Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!