📄 remex.m
字号:
% Recompile the communication module 'ext_comm'
%
% (FW-01-03)
function ReMex
clear all;
current_path = cd;
install_path = which('ReComp.m');
install_path = [install_path(1:max(find(install_path == '\'))-4)];
mex_path = [install_path 'rtw\ext_mode'];
include_path = ['"' install_path 'rtw\c\src' '"'];
instDLL_path = [install_path 'bin'];
cd (mex_path);
% compile 'ext_comm'
disp (['Compiling file ''ext_comm.c'' into a DLL.']);
eval(['mex ext_comm.c -v ext_convert.c ext_transport232.c -I' include_path])
% install 'ext_comm.dll'
olddll = [instDLL_path '\ext_comm_mc9S12.dll'];
if(size(dir(olddll), 1))
disp (['Removing outdated file ' olddll]);
eval(['!del ' '"' olddll '"']);
end
disp (['Copying file ''ext_comm.dll'' to the required system folder...']);
eval(['!copy ext_comm.dll ' '"' instDLL_path '\ext_comm_mc9S12.dll' '"'])
cd(current_path);
disp ('Done !');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -