Embedded Target for Texas Instruments C6000 DSPs | ![]() ![]() |
Before you run your model as an executable on either the C6701 EVM or the C6711 DSK, you must configure the run-time options for the model on the board. When you select TI C6000 runtime
from the Category list, you see the pane shown in this figure.
By selecting values for the options available, you configure the operation of your target.
Build action. To specify to Real-Time Workshop what to do when you click Build, select one of the following options. The actions are cumulative--each listed action adds features to the previous action on the list and includes all the previous features:
Generate_code_only
--directs Real-Time Workshop to generate C code only from the model. It does not use the TI software tools, such as the compiler and linker, and you do not need to have CCS installed. Also, MATLAB does not create the handle to CCS that results from the other options.
model.bat
--an MS-DOS batch file that contains the TI C6000 compiler command line (cl6x
) you use to compile and link your generated code. In this file you find information you need, such as the include paths, library locations, and default compiler options, to compile the code and that are not stored in any other file generated by the Generate_code_only
build action. Learn more about the batch file by reading the comments included in the file.
The build process for a model also generates the files modelname
.c
, modelname.cmd
, modelname.bld
, and many others. It puts the files in a build directory named modelname_c6000_rtw
in your MATLAB working directory. This file set contains many of the same files that Real-Time Workshop generates to populate a CCS project when you choose Create_CCS_Project
for the build action.
Create_CCS_Project
--directs Real-Time Workshop to launch CCS and populate a new project with the files from the build process. Selecting this setting enables the CCS board number option so you can select which installed board to target. This option offers a convenient way to build projects in CCS.
Build
--builds the executable COFF file, but does not download the file to the target.
Build_and_execute
--directs Real-Time Workshop to download and run your generated code as an executable on your target.
Your selection for Build action determines what happens when you click Build or press CTRL+B. Your selection tells RTW when to stop the code generation and build process.
To run your model on the target, select Build_and_execute
. This is the default build action; Real-Time Workshop automatically downloads and runs the model on your target board.
Note When you build and execute a model on your target, the Real-Time Workshop build process resets the target automatically. You do not need to reset the board before building models. |
Current C6701 EVM CPU clock rate. When you generate code for C6000 targets from Simulink models, you may encounter the software timer. If your model does not include ADC or DAC blocks, or when the processing rates in your model change (the model is multirate), you automatically invoke the timer to handle and create interrupts to drive your model.
Correctly generating interrupts for your model depends on the clock rate of the CPU on your target, either the C6701 EVM or the C6711 DSK. While the default clock rate is 100 MHz on the C6701 EVM, you can change the rate with the DIP switches on the board or from one of the software utilities provided by TI. C6711 DSK hardware uses a fixed clock rate of 150 MHz; you can not change the clock rate. While this option appears on the dialog, it is grayed out and does not apply to the C6711 DSK.
For the timer software to calculate the interrupts correctly, Embedded Target for TI C6000 DSP needs to know the actual clock rate of your C6701 EVM as you configured it. This option lets you report the current clock rate--one of 25
, 33.25
, 100
or 133
MHz. Select the appropriate rate from the list. You are not changing the clock rate with this option. You are telling the software timer what rate to use to match the C6701 EVM clock rate.
The timer uses the CPU clock rate you select in Current C6701 EVM CPU clock rate to calculate the time for each interrupt. For example, if your model includes a sine wave generator block running at 1 KHz feeding a signal into an FIR filter block, the timer needs to create interrupts to genrate the sine wave samples at the proper rate. Using the clock rate you choose, perhaps 100 MHz
, the timer calculates the sine generator interrupt period as follows for the sine block:
Sine block rate = 1 KHz, or 0.001 secs/sample
CPU clock rate = 100 MHz, or 0.000000001 secs/sample
To create sine block interrupts at 0.001 sec/sample requires
100000000/1000 = 1 Sine block interrupt per 1000000 clock ticks
You see you must report the correct clock rate or the interrupts come at the wrong times and the results are incorrect.
Overrun Action. To enable the overrun indicator, choose one of three ways for the target processor to respond to an overrun condition in your model:
None
--ignores overruns encountered while running the model.
Continue
--when the DSP encounters an overrun condition, it turns on the external LED and continues running the executable. If you use an C6701 EVM LED block in your model, you cannot determine whether the C6701 EVM LED block enabled the external LED or if an overrun condition caused the LED to light.
Halt
--respond to overrun conditions by stopping program execution and turning on the external LED. If you use an LED block in your model, you cannot determine whether the LED block enabled the external LED or user defined LEDs, or if an overrun condition caused the LEDs to light.
Overrun Indicator and Software-based Timer
Embedded Target for TI C6000 DSP includes software that generates interrupts in models that do not have ADC or DAC blocks, or use multiple clock rates. In two cases, the overrun indicator does not work:
![]() | TI C6000 Linker Options | Embedded Target for TI C6000 DSP Default Project Configuration--custom_MW | ![]() |