Problem with Connect to Target in external mode
Show older comments
I have added external mode related code with our build process by modifying tlc and I tried building the model in external mode; Model builds fine in EXT mode but when i try to connect to targte i am getting following error
-------------------------------------
Could not execute target data map file '\test_PIL_targ_data_map' or it does not exist. Stop the target, delete the test_PIL executable, rebuild the code, and try again. Note that execution of external mode requires the build directory to be present -------------------------------------
1. Can any one suggest why this is happening? Note - Map file is created in generated code
2. Can i get some example code to implement external mode code with custom target
3. How do set parameter in simulink when i use serial communication driver/mex file for external communication
2 Comments
Jon Boerner
on 16 Oct 2014
What version on MATLAB/Simulink are you using? The process for creating custom targets can be different from version to version.
And just to be clear, for point (1), you mean that there is a folder in the generated code folder called 'test_PIL_targ_data_map.m'?
For point 3, you can just change the parameter in a block. For example, while the model is running in external mode, you could open a gain block and change the value. Once you press 'Ok' on the dialog, the target will run using the new value instead of the old one.
I was not able to find a full-walkthrough example for (2). This page describes how to set up external mode from the host-side, but for a custom target you will need to include code to set up the communication for the target side. This page describes that process.
You have probably already seen those pages, but they seem to be the best information available.
If you were able to post an example that reproduces the error, I could definitely take a closer look.
Victor Bayer
on 17 Dec 2021
Edited: Victor Bayer
on 17 Dec 2021
For an example, please try uploading and then monitoring the following model to an arduino micro. The version I am using is R2021b but I have also tried with R2021a and R2020b with the same result.
Note: \xxx_targ_data_map is not created. The approach in https://se.mathworks.com/matlabcentral/answers/505329-why-do-i-get-an-error-about-a-missing-target-data-map-file-although-i-am-using-xcp-external-mode?s_tid=srchtitle
did not help.
Answers (0)
Categories
Find more on Embedded Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!