1

I'm trying to generate C code from a Matlab-Simulink simple model (eg.: sine wave generator with a DAC at the output). This code must be executed with Code Composer Studio for TMS320C6748 DSP (Texas Instrument C6748). Specifically, for the development board OMAP-L138 ZOOM ™EVM DEVELOPMENT KIT.

For this, I am using the following versions: Simulink (Version 7.7 - R2011a) Embedded Coder (Version 6.0 - R2011a) Code Composer Studio v3.3

I tried several options (with generic modules in Simulink and programming the C6748 timers, configuring a module "Target Preferences" with "OMAP_L138/C6748 EVM"...) but it isn't working.

Is it possible to implement this idea? Is there an example working?

Thanks

Juanma
  • 21
  • 1
  • 5
  • 1
    "Isnt working" is not a good starting point for help. You should say what you actually tried, what is the actual error. – flolo Jun 20 '11 at 15:56
  • Thanks @flolo! I tried several options, the two most productive: 1.- A demo titled "Parametric Audio Equalizer", but I get this error: "No suitable replacement found for processor 'OMAPL138' set currently in the Target Preferences block. Delete the current Target Preferences block and add a new one". – Juanma Jun 21 '11 at 07:28
  • 2.- A simple model with a sine wave generator and a generic DAC at the output. I compiled with a "Generic Real-Time Target", generating ert_main.c with the functions rt_OneStep(), Model_initialize(), Model_terminate(). I created a new project with Code Composer Studio and dded these files following section 2 (Stand-Alone Program Execution) of "Real-Time Workshop Embedded Coder User's Guide". The compiled program is executed, but it does not work correctly when I associate rt_OneStep() with a C6748 real-time clock or C6748 interrupt service routine for making the generated code "real-time". – Juanma Jun 21 '11 at 07:29

2 Answers2

1

Code generation for OMAP-L138 EVM and C6748 EVM is not supported for older versions than Matlab 2011a.

For the release 2011a, the setup process is not trivial and it is not well documented. But Matlab has a patch for this version supports and works with certain specific requirements.

The release 2011b has improvements (hyperlinks required for products of thirds work with CCStudio v4 for this processor) and supports code generation for OMAP-L138 EVM and C6748 EVM.

For the release 2012a, Matlab has considered adding specific sections in the documentation for configuration and automatic code generation with these processors.

Juanma
  • 21
  • 1
  • 5
1

Code generation for OMAP-L138 EVM / C6748EVM is supported in Simulink in R2011a. Before opening the Target Preferences block, import the processor definitions from DSP/BIOS. On the MATLAB command line, type the following:

getDspBiosFolder % This returns which DSP/BIOS MATLAB is seeing. If the value returned matches your installation of MATLAB, then you are OK. Otherwise, you need to use setDspBiosFolder to set the installation folder for DSP/BIOS (i.e. setDspbiosFolder('C:\CCStudio_v3.3\bios_5_33_06') on MATLAB command line). importDspbiosConfig('proc', 'all') importDspbiosConfig('board', 'all')

After these steps, you should be able to open the Target Preferences block and examine the settings. Before proceeding with code generation, run checkEnvSetup() utility to make sure that you installed all TI software required for code generation:

checkEnvSetup('ccs', 'omapl138evm', 'list')

The command above gives you a list of what you need to install. After making sure you have all of the software installed above with correct version numbers, execute the following:

checkEnvSetup('ccs', 'omapl138evm')

This sets all environment variables needed for code generation. MATLAB sees the location of the tools through environment variables created this way.

After these steps you should be able to generate code.

  • Thanks @MuratBelge. I set the installation folder for DSP/BIOS with the MATLAB command line: >> setDspbiosFolder('C:\CCStudio_v3.3\bios_5_33_06') And I read: >> getDspbiosFolder ans = C:\CCStudio_v3.3\bios_5_33_06 I import the processor definitions from DSP/BIOS before opening the Target Preferences block with the MATLAB command line: >> importDspbiosConfig('proc', 'all') >> importDspbiosConfig('board', 'all') I get 'evm6748' and 'evmOMAPL138' with: >> listDspbiosConfig('board') 'evm6748' 'evmOMAPL138' I get 'TMS320C6748' with: >> listDspbiosConfig('proc') 'TMS320C6748' – Juanma Jun 29 '11 at 10:29
  • I Checked and configured environment for IDE Link and Target Support Package components with >> checkEnvSetup('ccs', 'c6748evm') 1. Checking CCS (Code Composer Studio) version Required version: 3.3.82.13 Required for : Automation and Code Generation Your Version : 3.3.83.19 Incompatible version detected. CCS version does not satisfy product requirements! – Juanma Jun 29 '11 at 10:30
  • 2. Checking CGT (Code Generation Tools) version Required version: 6.1.10 Required for : Code generation Your Version : 6.1.10 3. Checking DSP/BIOS (Real Time Operating System) version Required version: 5.33.06 Required for : Code generation Your Version : 5.33.06 4. Checking Texas Instruments IMGLIB (C64x+) version Required version: 2.0.1 Required for : TFL block replacement Your Version : 2.1.0.0 Incompatible version detected. Texas Instruments IMGLIB version does not satisfy product requirements! – Juanma Jun 29 '11 at 10:35
  • 5. Checking C674x DSP/BIOS PSP Drivers version Required version: 1.30.00.05 Required for : Code generation / device drivers Your Version : 1.30.00.06 Incompatible version detected. C674x DSP/BIOS PSP Drivers version does not satisfy product requirements! Following environment variables required for code generation could not be set: ### "PSP_EVMC6748_INSTALLDIR" 6. Checking EDMA3 LLD (EDMA3 Low Level Driver) version Required version: 1.10.00 or later Required for : Device drivers Your Version : 01.10.00 – Juanma Jun 29 '11 at 10:36
  • After these steps, I can open the Target Preferences block, I can selec the 'OMAP-L138/C6748 EVM' board, but I can't select any processor. – Juanma Jun 29 '11 at 10:38