Generating C code from a Matlab-Simulink model for DSP C6748
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). Spec开发者_开发百科ifically, 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
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.
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.
精彩评论