Software Requirements
☞TMS320F28027F Flash API
☞TMS320F28027F C/C++ Header Files
☞CCSV4 Software
☞Matlab R2012a Software
Install the files from Texas Instruments using the following links. The Flash API file is downloaded from the following link http://www.ti.com/tool/sprc848 and the C/C++ Header Files are downloaded from the link http://www.ti.com/tool/sprc832.
Environment Variables Settings
☞Open Matlab and type checkEnvSetup(‘ccsv4′,’f28027′,’check’) in command window.
☞Following details are displayed in the command window as shown in the below screenshot.
☞If the directory path is not installed for DSP2802x_INSTALLDIR and FLASH_2802x_API_INSTALLDIR then configure the environment variables settings. To set the environment variable settings follow the steps below.
☞Click on Start Menu -> Right Click on My Computer -> Select properties -> Advanced System Settings -> Environment Variables.
☞In User Variable, Click on New -> add variable name (as selected from matlab command window) and add Variable value (C:tidcs\C28\ DSP2802z\v126). Click Ok.
☞In System Variable, Click on New -> add variable name (as selected from matlab command window) and add Variable value (C:\tidcs\c28\ Flash28_API\Flash2802x_API_V200_using_CCS4.0v). Click Ok.
☞Restart the Matlab.
xMakeFileSetup Configurations
☞Type xmakefilesetup in matlab command window and press enter.
☞XMakefile User Configuration windows appear, as shown in fig 3.5
Choose:
☞Template – gmake
☞Configuration – ticcs_c2000_ccsv4 and uncheck the Display operational configurations
☞Now click on tool directories.
☞If you couldn’t find out Tool Directories tab, click Apply and Ok. A small window appear, choose CCSv4 folder in Texas Instruments. C:/Program Files/Texas Instruments\CCSv4.
☞Type xmakefilesetup in command window. Now tool Directories appeared.
☞Click on Tool Directories, choose the CCS Installation, Code Generation Tools and DSP/BIOS Installation path.
☞Click on New, enter ticcs_c2000_ccsv4_clone and ok.
☞In configuration, select ticcs_c200_ccsv4_clone as shown in below Fig.
☞In Execute,
☞Arguments,
☞ARG1
Execute Tool -> C:\Program Files\Texas Instruments\ccsv4\ scripting\bin\dss.bat
“C:\Program Files\MATLAB\R2012a\toolbox\idelink\extensions\ticcs\ccsdemos\runProgram.js” ,This may vary based on your installation path.
☞ARG2
“C:\Users\Admin\user\CCSTargetConfigurations\NewTargetConfiguration.ccxml”, This may vary based on your installation path.
☞ARG3
“[|||MW_XMK_GENERATED_TARGET_REF[E]|||]”
☞The Arguments look -> “ARG1””ARG2””ARG3”
☞The ARG1 is selected from Matlab installing location. ARG3 is typed as shown in above .
The NewTargetConfiguration path in ARG2 is selected from Code Composer studio. Open Code Composer Studio, Click on Target -> New Target Configuration. Copy the location as shown in below Fig.
☞Click Finish.
Target Preference Configuration
☞ File – New – Model
☞ Open the Simulink and select Embedded Coder.
Choose:
☞Embedded Target – Right click the Target Preference and to the untitled model file.
☞Double Click the Target and set as the following figure.
☞Click yes.
☞Embedded Target – Processor – Texas Instruments C2000 – C281x – add the Digital Input and Digital Output block.
☞Double the individual block set as in the following respective figure and
☞Click ok.
Configuration Parameter Settings
☞Go to Simulation – Configuration parameter – IDE Link keep the setting as in below figure.
☞Click ok.
☞File – Save – filename.mdl [save it in matlab default path]. Click Incremental build icon .
In Matlab command window print the text as status about the make file generation for TMS320F28027F.
☞Close Matlab