You are currently viewing Matlab Embedded Target C2000 with TMS320F2812 Development board

Matlab Embedded Target C2000 with TMS320F2812 Development board

Spread the love

The objective of this blog is to generate the coding and output file for required [TMS320F2812] processor from C2000 generation of Texas Instrument.

This blog describes how to use the Embedded Target [TMS320F2812] for TI C2000 to create an application on Texas Instruments DSP development boards.

Software

  • MATLAB R2011b 32-bit with Embedded Coder
  • Code Composer Studio V4.2.1.00004 and later

Install the MATLAB and Code Composer Studio in the default directories don’t change it during installation.

Note: A minimum system requirement is Windows 7 OS 32-bit with 2GB RAM and 5GB free space in installation driver to run smoothly.

Hardware

Hardware used in this tutorial is TMS320F2812 DSP Development board from the Pantech Prolabs India Pvt Ltd.

This same tutorial can also support for the below kits,

TMS320F2812 DSP starter kit

TMS320F2812 USB Stick

About Code generation

Matlab R2010a and CCSv3.3 can also use to generate the code for CCS project (.pjt) but the problem is CCSv3.3 can be installed properly only in Windows XP 32 bit machines. If you have Windows XP 32 bit machine then you can go ahead with Matlab R2010a and CCSv3.3 setup.  We already have a solution for that setup.
Few examples Video Tutorial Link:

Programming Switch & LED in TMS320F2812 Using MATLAB

 

Generation of Six Fixed PWM Using MATLAB for TMS320F2812 DSP

 

This blog example shows how to use the XMakefile functionality to generate and build code from a simple model using a makefile. You will configure your model to generate code for a Texas Instruments (TI) processor and to build with a Texas Instruments Code Composer Studio (CCS) tool chain.

 

Tutorial

Before precede this makefilegeneration tutorial watch this video tutorial link:

 

MATLABR2011b

  • Open Matlabr2011b
  • Type xmakefilesetup in matlab command window and enter.
  • XMakefile User Configuration windows appear,

Choose:

  • Template – gmake
  • Configuration – ticcs_c2000_ccsv4 and uncheck the Display operational configurations only

XMakefileUserConfiguration

 

In Tool Directives choose the CCS Installation, Code Generation Tools and DSP/BIOS Installation path.

Tool directives

 

  • Click ok
  •  File – New – Model
  •  Open the Simulink and go to the 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.

 

target preferences in ccs

 

  • 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
  • Click ok.

 

Note: Digital Input choose A11,A12,A13,A14 and Digital Output  choose F11,F12,F13,F14 because switches and led’s are connected respectively in TMS320F2812 DSP Development board

Digital Input and Output Block

  • Go to Simulation – Configuration parameter – IDE Link keep the setting as in below figure
  • Click ok.

 

configuration parameter

  •   File – Save – filename.mdl [save it in matlab default path].
  •   Click Incremental build.

incremental build

In Matlab command window print the text as status about the make file generation for TMS32OF2812.

matlab command window

  •  Minimize the MATLAB or we may close it.

 

Code Composer Studio

  •   Open Code Composer Studiov4 and any default workspace path.
  •   View – Target configuration file.
  •   Right click user defined – NewTargetConfiguration – finish.

Choose:

  • Connection – Texas Instruments XDS100v1 USB Emulator.
  • Device – TMS320F2812.
  •  Click Save.
  •   Right click NewTargetConfiguration.ccxml – Launch selected Configuration.
  •   Right click Thread [main] (Disconnected (Suspended)) – Connect Target.

 

CCS Ready for MATLAB

 

  •   Target – Load program – Browse the default MATLAB path and you have the folder name of filename_ticcs open it – go to the CustomMW folder [because inside this folder out file is generated] and choose filename.out – open – then click ok.

https://www.pantechsolutions.net/dsp-dsc-boards/tms320f2812-dsp-development-board

This Post Has 2 Comments

  1. Satish Pandya

    I am interested to attend the course and the kit.
    Can you please let me know the schedule for the course and price including kit please?
    Thanks
    Satish

    1. Pantech

      Please whatsapp 91-9003113840

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.