Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
matlab arduino toolkit for linux is broken for the can read block
조회 수: 1 (최근 30일)
이전 댓글 표시
Build 1 1
08:26 PM Elapsed: 2 sec
Top Model Build 1
Elapsed: 1 sec
### Starting build procedure for: broken_can_example
### Generating code and artifacts to 'Model specific' folder structure
### Generating code into build folder: /home/siegeljb/esp/esp-idf/broken_can_example_ert_rtw
### Build procedure for broken_can_example aborted due to an error.
MATLAB System block 'broken_can_example/CAN Receive' error occurred when invoking 'getOutputDataTypeImpl' method of 'codertarget.arduinobase.internal.arduinoCANReceive'. The error was thrown from '
'/usr/local/MATLAB/R2020a/toolbox/rtw/rtw/tlc_c.p' at line 0
'/usr/local/MATLAB/R2020a/toolbox/coder/simulinkcoder_core/+coder/+internal/ModelBuilder.m' at line 840
'/usr/local/MATLAB/R2020a/toolbox/coder/simulinkcoder_core/+coder/+internal/ModelBuilder.m' at line 173
'/usr/local/MATLAB/R2020a/toolbox/coder/simulinkcoder_core/+coder/+internal/@ModelCodegenMgr/make_rtw.m' at line 8
'/usr/local/MATLAB/R2020a/toolbox/coder/simulinkcoder_core/make_rtw.m' at line 20
'/usr/local/MATLAB/R2020a/toolbox/simulink/simulink/private/build_target.p' at line 0
'/usr/local/MATLAB/R2020a/toolbox/simulink/simulink/private/build_target.p' at line 0
'/usr/local/MATLAB/R2020a/toolbox/simulink/simulink/private/build_standalone_rtw_target.p' at line 0
'/usr/local/MATLAB/R2020a/toolbox/simulink/simulink/private/slbuild_private.p' at line 0
'/usr/local/MATLAB/R2020a/toolbox/simulink/simulink/private/slbuild_private.p' at line 0
'/usr/local/MATLAB/R2020a/toolbox/simulink/simulink/sl.m' at line 15
'/usr/local/MATLAB/R2020a/toolbox/simulink/simulink/slbuild.m' at line 98
'/usr/local/MATLAB/R2020a/toolbox/simulink/simulink/slprivate.m' at line 11
'/usr/local/MATLAB/R2020a/toolbox/coder/sltoolstrip_base_hw/m/+coder/+internal/+toolstrip/HardwareBoardHandler.m' at line 105
'/usr/local/MATLAB/R2020a/toolbox/target/codertarget/sltoolstrip/m/+codertarget/+sltoolstrip/EmbeddedHardwareBoardContext.m' at line 147
'/usr/local/MATLAB/R2020a/toolbox/target/codertarget/sltoolstrip/m/+codertarget/+sltoolstrip/EmbeddedHardwareBoardContext.m' at line 130
'/usr/local/MATLAB/R2020a/toolbox/coder/sltoolstrip_base_hw/m/+coder/+internal/+toolstrip/HardwareBoardContext.m' at line 330'.
Caused by:
Reported by broken_can_example/CAN Receive: 'getOutputDataTypeImpl' method of the System object 'codertarget.arduinobase.internal.arduinoCANReceive' for 'broken_can_example/CAN Receive' returned invalid data type 'arduinoCANMsg' for output port 1. The return value must be a character vector of: built-in data type, name of embedded.numerictype object, name of Simulink.enumeration class, name of Simulink.Bus object, name of Simulink.NumericType object or name of Simulink.AliasType object.
Component:Simulink | Category:Block diagram error
댓글 수: 0
답변 (1개)
Arun Kumar
2020년 6월 11일
Hi Jason,
Please execute the following code in MATLAB command line and then try to build the model:
sppkgroot = codertarget.arduinobase.internal.getSpPkgRootDir;
srcFolder = fullfile(sppkgroot,'arduinoutilities');
srcFile = fullfile(sppkgroot,'arduinoutilities','arduinoCANMsg.m');
parentFolder = fullfile(matlabroot, 'toolbox', 'target');
destFolder = fullfile(matlabroot, 'toolbox', 'target', 'arduinoutilities');
destFile = fullfile(destFolder, 'arduinoCANMsg.m');
if ~exist(destFolder,'dir')
[success, ~, ~] = mkdir(parentFolder, 'arduinoutilities');
if ~success
error(message('arduino:build:CANMsgFolderCopyError',sppkgroot,parentFolder));
end
end
if ~exist(destFile,'file')
[success,~,~] = copyfile(srcFile, destFolder, 'f');
if ~success
error(message('arduino:build:CANMsgFileCopyError',srcFolder, destFolder));
end
addpath(destFolder);
else
addpath(destFolder);
end
This should solve the problem.
In case of any error, please run MATLAB as administrator and try again.
If you still run into any issues, please contact Mathworks Technical Support.
Hope this helps!
댓글 수: 1
이 질문은 마감되었습니다.
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!