Unable to run external simulation TI F28069M Matlab r2017a
5 views (last 30 days)
I'm trying to program a TI Launchpad F28069m MCU using Embedded Coder. To debug and profile the program, I want to run an external simulation on the hardware board. I'm able to build, load and run the program on the board (I have an LED blinking to make sure) but when I try to do external mode simulation I always end up with an error. For my complete program, during the build procedure I get an error "failed to generate all binary outputs". When looking into the comments in the error window I see the comment
"fatal error: cannot open source file "code_profiling_utility_functions.h" 1 catastrophic error detected in the compilation of "C:/Users/.../ert_main.c". Compilation terminated."
I can indeed not find this file "code_profiling_utility_functions.h" anywhere in the Matlab program files. I then tried the external mode simulation on a very simple example (included). Here I did get past the compilation step and the program starts running on the board, the status saying "initializing", then after some time I get the following error:
"Error occurred while executing External Mode MEX-file 'ext_comm': Failed to connect to the target. A time-out occurred while waiting for the connection response from the target. Possible reasons for the time-out: a) The target is not switched on. b) The target is not connected to your host machine. c) The application for the model is not running on the target. You might have clicked the Stop button. If the Run button is not dimmed, click it. Otherwise, click the Build button, which downloads and runs your application on the target."
I find this strange since the program has clearly been loaded to the board so the connection is working... I followed all the steps in the documentation "https://nl.mathworks.com/help/supportpkg/texasinstrumentsc2000/ug/external-mode.html" and looked around on the forum for answers but I couldn't find anything that solves the problem.
Any help on solving both these problems would be greatly appreciated!
Kind regards, Jorrit
Antonin on 19 Jun 2017
F28069M is fully supported by Simulink, you just need to pick the right linker command file in the configuration parameters of the model. This is described at 5:50 in the video that you can find on this page where we spin 2 motors with the F28069M Launchpad.
To run external mode simulation, start with this shipping example: https://www.mathworks.com/help/supportpkg/texasinstrumentsc2000/examples/parameter-tuning-and-signal-logging-with-serial-external-mode.html
Make sure that the serial switch on the board is turned on and that you have set the right COM port in your model.
I hope it helps,
More Answers (1)
Gillian Rosen on 11 Apr 2017
I understand that you are trying to run a model in External mode on your TI F28069M board, but you are unable to initialize the model in External mode.
Unfortunately, it appears that the F28069M board is not currently supported for code generation with the TI C2000 Support Package. While the F28069 and F28069M boards are very similar, they do have some notable differences (for example, the location of the IQmath tables), which may be causing the errors that you are encountering with External mode. You can continue to use the F28069 target settings at your own risk, but please be aware that not all features of the supprot package are assured to work in this situation.
For more information on the differences between F28069 and F28069M boards, please see the following TI forum post: https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/298382