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
Best Answer