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!