This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

F28027 Embedded Coder example doesn't work - Flash API, External mode

Other Parts Discussed in Thread: CONTROLSUITE


First of all I need to say that I want to create a project where I can program the F28027 Launchpad using Simulink and Embedded Coder to run a control algorithm, read inputs from the system and plot the feedback signals on the scopes. I guess this is called the External mode in Simulink. I am running Matlab 2013b and CCS v3.3.

So I found an example project from Mathworks dedicated to motor control ( Actually, this is not exactly what I need for my project but this file supposedly utilizes live signal acquisition and Scope plotting so I was hoping I could reuse the model's configuration for my later use.

However, I've been having A LOT of problems trying to run this example so far. I eventually reached the point where I get no errors during compilation in CCS but then Simulink opens up a link ( in a new window and gives me the following error message:

The call to idelink_ert_make_rtw_hook, during the exit hook generated the following error:
Error while loading and running the program.

The build process will terminate as a result.

Caused by:
Error while loading and running the program.
The TI flash API library does not exist on your machine. Specify the right path or download the appropriate flash APIs from TI's website or TI's controlSUITE installer.

I do not understand why this error message appears. Of course, I have run checkEnvSetup and I get the following, which I reckon is correct and means the Flash API is installed and its path configured

5. Flash Tools (TMS320F2802x Piccolo(TM) Flash API)
Your version : 2.01
Required version: 2.01
Required for : Flash Programming

Also, when in Simulink I go to Model Configuration Parameters -> Coder Target -> Target Hardware Resources -> Flash_API, the "Specify API location" field is set to "C:\tidcs\c28\Flash28_API\Flash2802x_API_V100\lib\Flash2802x_API_V100a.lib". Even if I change it to "D:\programy\controlSUITE\libs\utilities\flash_api\2802x\v201", it always resets to the previous one after a failed "build & run". So I downloaded the Flash API v2.00 from the suggested link ( and installed it into the default path (C:\tidcs\...), then set it using checkEnvSetup (this time I got: your version: 2.00, required version: 2.01 which I guess is not OK, by the way). Same story.

Also, entering any path into the "Specify API location" field and clicking Execute pops up a window saying: "The first input to exist must be a string". I wonder why this happens, even with the default path.

I have absolutely no idea how to get it to work. If there's any other way of connecting to the F28027 target through Simulink and reading "live" signals on scopes, please help me, this is all I need.