Clear Filters
Clear Filters

Activate Application Deployment Feature

6 views (last 30 days)
Asim
Asim on 9 Jan 2024
Answered: Asim on 11 Jan 2024
Hello, I am trying create target connectivity for TI AWR1642 Boost. I followed the steps from this documentaton Preliminary Steps - MATLAB & Simulink - MathWorks India.
At step 5 where I have to activate the application deployer feature it showed passed in MATLAB, but while deploying using Simulink I am getting this error.
Error:The following error occurred during deployment to your hardware board:
Unable to load a message catalog 'AWR1642:build'. Please check the file location and format.
Top model targets built: Model Action Rebuild Reason ========================================================================== test_dep_09_01 Failed Code generation information file does not exist. 0 of 1 models built (0 models already up to date)
%% 1. Create the Framework
targetRootFolder = fullfile('C:', 'Project_Directory');
target_obj = createTarget('TImmWave','ARM Cortex-R',targetRootFolder);
saveTarget(target_obj);
testTarget(target_obj,'framework');
show(target_obj);
%% 2. Specify the Hardware
hware = createHardware('TIAWR1642 Boost');
hware.DeviceID = 'ARM Cortex-R4F';
map(target_obj,hware,'TIAWR1642 Boost');
saveTarget(target_obj);
testTarget(target_obj);
%% 3. Deployer Function
deployerName = 'TI mmWave Deployer';
deployerObj = addNewDeployer(target_obj,deployerName);
map(target_obj,hware,deployerObj);
%% 4. Toolchain
toolchainName = 'TI ARM Code Generation Tools | gmake';
toolchainObj = addNewToolchain(deployerObj,toolchainName);
buildConfigurationObj = addNewBuildConfiguration(toolchainObj,'Build Configuration TI mmWave');
%% 5. Flags
% Specify the hardware specific compiler, assembler and linker flags
compflags = [...
'-mv7R4 ', ... processor architecture
'--code_state=16 ', ...arm compilation mode (16bit)
'--float_support=VFPv3D16 ', ... vector floating-point (VFP) coprocessor instructions
'--abi=eabi ', ... use ELF object format and the DWARF debug format (EABI)
'-me ', ... little endian
'--enum_type=packed ', ... optional optimization
'--diag_wrap=off ', ... optional diagnostic
'--display_error_number ',... optional diagnostic
'--diag_warning=225 ',... make 225 diagnostics into warnings
];
buildConfigurationObj.CompilerFlags = compflags;
buildConfigurationObj.AssemblerFlags = compflags;
buildConfigurationObj.LinkerFlags = [...
'-mv7R4 ', ... processor architecture
'-me ', ... little endian
'-m"awr16xx_mss.map" ', ... linker map file name ($(PRODUCT_NAME) is a macro that is used in all Mathworks generated makefiles.
'--warn_sections ', ... optional diagnostic
'--reread_libs ', ... resolve back references
'--diag_wrap=off ', ... optional diagnostic
'--display_error_number ', ... optional diagnostic
'--diag_warning=225 ', ... optional diagnostic
'--xml_link_info="awr16xx_mmw_mss_linkInfo.xml" ', ... optional diagnostic: link info xml for debugging
'--rom_model ', ... optional auto initialize variables at run time
'--heap_size=0x5000 ', ... heap size: make sure that this matches what is set in HALCOGEN
'--stack_size=0x5000', ... size size: make sure that this matches what is set in HALCOGEN
];
saveTarget(target_obj);
%%
% Create a new Loader object, and add it to the Deployer object
loader = addNewLoader(deployerObj,'TImmWave loader');
% Specify the load command that downloads and executes generated code on
% hardware board by setting the LoadCommand property of the Loader object
loader.LoadCommand = 'matlab:matlabshared.target.timmwave.loadAndRunds';
%%
saveTarget(target_obj);
%%
% copyfile(fullfile(codertarget.arm_cortex_r.internal.getSpPkgRootDir()),...
% fullfile(target_obj.Folder),'f');
%%
testTarget(target_obj,'deployer');
%%
This is the loadAndRunds file
function loadAndRun(~, executableFile, ~, varargin)
%LOADANDRUN Load and run the executable on the TI-AWR1642 board using DSLite
% Check if the TCONF variable is provided, otherwise use the default
if isempty(varargin)
TCONF = fullfile('C:\Project_Directory\src', 'AWR1642.ccxml');
else
TCONF = varargin{1};
end
% Get the file parts of the executable file
[path, filename, exeExt] = fileparts(executableFile);
% If the path is relative, convert it to an absolute path
if ~isempty(regexp(path, '^\.', 'once'))
fullExePath = RTW.reduceRelativePath(fullfile(pwd, path));
else
fullExePath = RTW.reduceRelativePath(path);
end
% Get the file parts of the executable file
% [~, filename, exeExt] = fileparts(executableFile);
%
% % If the path is relative, convert it to an absolute path
% if ~isempty(regexp(executableFile, '^\.', 'once'))
% executableFile = fullfile(pwd, executableFile);
% end
% Get the full path to the executable file
executableFile = fullfile(pwd, strcat(filename, exeExt));
% Define the path to the DSLite executble
% DSLITEPATH = fullfile('C:\ti\uniflash_8.4.0\dslite', 'bin');
%
% % Get the COM port from the input arguments if provided
% COMPort = 'COM13';
% if length(varargin) >= 2
% COMPort = varargin{2};
% end
%
% % Construct the command string for DSLite
% commandString = fullfile(DSLITEPATH, 'dslite');
%
% % Construct the argument string for DSLite
% argString = sprintf('--config=%s --mode=flash --reset=true --flash_verify=true --flashloader=%s', ...
% TCONF, executableFile);
%
% % If a COM port was specified, add it to the arguments
% if ~isempty(COMPort)
% argString = strcat(argString, sprintf(' -s COMPort=%s', COMPort));
% end
%
% % Print the command and argument strings to the MATLAB Command Window
% fprintf('DSLITE command string: %s\n', commandString);
% fprintf('DSLITE command arguments: %s\n', argString);
%
% Execute the command and check if it failed
[status, log] = system('"C:\ti\uniflash_8.4.0\dslite.bat" --mode flash --config="C:\ti\mmwave_sdk_03_06_01_00-LTS\packages\ti\drivers\gpio\test\xwr16xx\AWR1642.ccxml" -s COMPort=COM13 "C:\ti\mmwave_sdk_03_06_01_00-LTS\packages\ti\drivers\gpio\test\xwr16xx\xwr16xx_gpio_mss.bin",1');
% If the command failed, throw an error with the message
if status
DAStudio.error('AWR1642:build:LoadError', executableFile, log);
end
end

Accepted Answer

Asim
Asim on 11 Jan 2024
The issue was resolved and the code was successfully generated after removing the print status section, which was erroneously accessing an incorrect file.

More Answers (0)

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!