Why is the "echo" command not recognized when I Build and Execute a Simulink Model for a Texas Instruments Code Composer Studio v4 and v5.1 Target Configuration?

3 views (last 30 days)
When I use Embedded Coder to Build and Execute code for my development board, an error pops up as soon as the code is being executed on the target.
When the code has been built, a DOS window appears which should load the .out file into the DSP. The content of the cmd window shows the following error:
'"echo"' is not recognized as an internal or external command, operable program or batch file.
The generated ".out" file works as it is supposed to. If I load the generated ".out" file into the DSP using Texas Instruments Code Composer Studio v4 (TI CCSv4), the generated code from my model runs as expected.
If I create a 'Standard Make Project' with TI CCSv4, include all the generated files and replace the CCs4 build command with "gmake -f toolbox_test.mk" to specify the make file, I get the same error
If I I choose "Build" instead of "Build and Execute" there is no error.
This leads me to believe that there is an issue in the makefile generated. How do I resolve this?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 3 Dec 2012
The "echo" command is not recognized by TI CCSv4 or CCSv5.1. In order to make a Build and Execute work with this IDE, the appropriate CCSv4 or CCSv5.1 configuration can be cloned using the XMAKEFILESETUP command
This procedure is outlined in the steps below:
1. Type "xmakefilesetup" at the MATLAB Command Window and uncheck the "Display operational configurations only" checkbox.
2. Select the appropriate CCS configuration for your target from the Configuration drop-down menu.
3. To the right of this drop-down menu, click on the "New..." button and make a name for the cloned configuration. This configuration will be a MATLAB file that will be saved in the "User Configurations" directory as shown in the XMAKEFILESETUP GUI.
You may be asked to point to your install directory for CCS.
3. Select this new configuration. You will see an "Execute" tab. Under "Execute tool" you will see "echo". This is the configuration that is causing the issue.
Select the "Browse..." button next to "Execute Tool" and look for the file "$CCSINSTALL\ccsv4\scripting\bin\dss.bat". Here, $CSSINSTALL is the installation directory for your CCSv4 IDE.
4. The "Arguments" box needs to be populated with three arguments in quotation marks separated by spaces. The box should be filled out as follows:
"ARG1" "ARG2" "ARG3"
The three arguments are:
ARG1: $MATLABROOT\toolbox\idelink\extensions\ticcs\ccsdemos\runProgram.js
Here, $MATLABROOT refers to your MATLAB installation directory (for example, C:\Program Files\MATLAB\R2011a). This is a JavaScript file that is shipped with the product.
ARG2: This should be the path to a ".ccxml" configuration file generated from CCSv4.
In order to get this, you can open CCSv4 and go to "File > New > Target Configuration File". You can then specify the name, location and fill in the appropriate hardware information.
ARG3: [|||MW_XMK_GENERATED_TARGET_REF[E]|||]
So, the contents of the "Arguments" text box should at the end look like this, for example:
"C:\Program Files\MATLAB\R2011a\toolbox\idelink\extensions\ticcs\ccsdemos\runProgram.js" "C:\Users\johnsmith\user\CCSTargetConfigurations\myconfigname.ccxml" "[|||MW_XMK_GENERATED_TARGET_REF[E]|||]"
After taking these steps, you should be able to use this xmakefile configuration to directly do a "Build and Execute" from the Simulink model.
This process has to be done only once, and the configuration will be saved when running XMAKEFILESETUP in the future. That is, it will show up under the Configuration drop down menu.
  1 Comment
Dani Tormo
Dani Tormo on 21 May 2014
Excuse me, but you haven't mentioned what to do when using CCSv5.
This is just incredible. How many things you have to do and bugs you have to solve in order to compile a model for a specific board.
I don't know how can be that so complicated and badly explained, picking information from here and there to make this work. And even after a week struggling with this, as soon as you change something, more bugs appear. Good lord...

Sign in to comment.

More Answers (0)

Products


Release

R2011a

Community Treasure Hunt

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

Start Hunting!