Embedded IDE Link™CC 3User’s Guide
Core Support (ccslinklib_core) ... 8-3Target Preferences (ccslinklib_tgtpref)... 8-3Blocks — Alphabetical List9Embedded
3 Project GeneratorThe Target Preferences library appears in the next figure.3-10
About the CCSLinkLib Blockset3-11
3 Project GeneratorSchedulers and TimingIn this section...“Configuring Models for Asynchronous Scheduling” on page 3-12“Using Asynchronous Scheduling”
Schedulers and TimingNote Models in this section are for example purposes only. You cannot buildand run them without additional blocks.Also, you can s
3 Project GeneratorAlgorithm Inside the Function Call Subsystem BlockHere’s the model inside the function call subsystem in the previous figure. Itis t
Schedulers and TimingThe function generated for this task normally runs in free-runningmode—repetitively and inde finitely. Sub sy stem execu tion of t
3 Project GeneratorIn this model, the Hardware Interrupt block installs a task that runs whenit detects an external interrupt. This task performs the
Schedulers and Timing• Generated code that incorporates DSP /B IO S real-time operating sy stem(RTOS)• Generated code that does not include DSP/BIOS R
3 Project GeneratorWhen you p lan your project or algorithm, select your scheduling techniquebased on your application needs.• If your application pro
Schedulers and TimingTimer PeriodCPU Clock Rate Base Sample TimeLow Resolu_(_ _)*(_ _)_=ttion Clock DividerPrescaler__*Thesoftwareconfiguresthetimersot
Supported HardwareASupported Platforms for Embedded IDE Link CC ... A-2Supported Hardware and Simulators... A-2Product Features Suppor
3 Project Generator• C onnecting the ISRs to the corresponding interrupt service vector tableentriesNote You are responsible for m apping and enabling
Schedulers and TimingOne way to add the custom code to your generated code is to add a SystemOutputs block to your model. In the System Outputs block,
3 Project GeneratorTo enable and map the interrupts, add the code to the dialog box as shown inthe following figure.3-22
Schedulers and TimingGenerating code from your m o del that includes the System Outputs b lockadds the enabling and mapping code to your project so th
3 Project GeneratorThe following figure shows a top-level model c6000_hwi_interrupts thatincludes the System Outputs block in the Function-Call Subsyst
Schedulers and TimingMultitasking scheduling also means that overruns, where a task runs beyondits intended tim e, can occur during execution.To under
3 Project Generator• Sub-Rate 1.Thefirst subrate task. Sub-Rate 1 task runs more slowly thanthe Base-Rate task. Sub-Rate 1 task rate is 2ms in the exam
Schedulers and TimingThree Odd-Rate Tasks Without Preemption and OverrunsIn this three task scenario, all of the tasks run as scheduled. No overrunsor
3 Project GeneratorTwo Tasks with the Base-Rate Task Overrunning, NoPreemptionInthistworatescenario,theBase-Rateoverrunsthe1mstimeintendedandprevents
Schedulers and TimingTask IdentificationIntended ExecutionScheduleActual ExecutionScheduleBase-Rate1ms2ms (overrunning)Sub-Rate 12ms4ms (overrunning)3
Using Mapped Drives ... B-14Indexxii Contents
3 Project GeneratorTwo Tasks with Sub-Rate 1 Overrunning Without PreemptionIn this example, two rates running simultaneously—the Base-Rate task andone
Schedulers and TimingTask IdentificationIntended ExecutionScheduleActual ExecutionScheduleBase-Rate1ms2ms (overrunning)Sub-Rate 12ms8ms (overrunning)T
3 Project Generator• Both the Base-Rate and Sub-Rate 1 tasks preempt Sub-Rate 2 taskexecution.• Preempting the subrate tasks does not prevent the subr
Schedulers and TimingThree Odd-Rate Tasks Without Preemption and the Base andSub-Rate1 Tasks OverrunThree tasks running simultaneously—the Base-Rate t
3 Project GeneratorTask IdentificationIntended ExecutionScheduleActual ExecutionScheduleBase-Rate1ms2ms (overrunning)Sub-Rate 12ms4ms (overrunning)Sub
Schedulers and TimingThree Odd-Rate Tasks with Preemption and Sub-Rate 1 TaskOverrunsIn this three task scenario, the B as e-R ate preempts Sub-Rate 1
3 Project GeneratorTask IdentificationIntended ExecutionScheduleActual ExecutionScheduleBase-Rate1ms2ms (overrunning)Sub-Rate 12ms4ms (overrunning)Sub
Schedulers and TimingThree Even-Rate Tasks with Preemption and the Base-Rateand Sub-Rate 1 Tasks OverrunIn this three-task scenario, two of the tasks
3 Project GeneratorTask IdentificationIntended ExecutionScheduleActual ExecutionScheduleBase-Rate1ms2ms (overrunning)Sub-Rate 12ms8ms (overrunning)Sub
Project Generator TutorialProject Generator TutorialIn this section...“Creating the M odel” on page 3-40“Adding the Target Preferences Block to Your M
1Getting Started• “Product Overview” on page 1-2• “Configuration Information” on page 1-6• “Requirements for Embedded IDE Link CC Software” on page 1-1
3 Project GeneratorCreating the M odelTo create the model for audio reverberation, follow these steps:1 Start Simulink software.2 Create a new model b
Project Generator TutorialAdding a Target Preferences block to a model triggers a dialog box that asksabout your model configuration settings. The mess
3 Project Generatorccslink_grt.stf system target file from the System Target File list in theReal-Time Workshop pane options.To add the Target Preferen
Project Generator Tutorial5 In the Block dialog box, select your processor f rom the P rocessor list.6 Verify the CPU clock value and, if you are usin
3 Project Generator7 Verify the settings on the Memory and Sections tabs to be sure they arecorrect for the processor you selected.8 Click OK to close
Project Generator TutorialIgnore the Data Import/Export, Diagnostics,andOptimization categoriesin the Configuration Parameters dialog box. The default
3 Project Generator3 Under Code Generation, select Inline run-time library functions.Cleartheotheroptions.4 Under Link Automation,verifythatExport IDE
Project Generator TutorialWhen you click Build with Create_project sele cte d for Build action,theautomaticbuildprocessstartsCCSIDEandpopulatesannewpr
3 Project GeneratorSetting Code Generation Parameters for T I ProcessorsBefore y ou generate code w ith Real-Time Workshop software, set thefixed-step
Setting C od e Gen e rati on Para meters for TI ProcessorsIn the Select tree, the categories provide access to the options you use tocontrol how Real-
1 Getting StartedProduct OverviewIn this section...“Components of E mbedded IDE Link CC Software” on page 1-3“Automation Interface” on page 1-3“Projec
3 Project GeneratorThe following sections present each configuration parameters Select treecategory and the relevant options available in each.3-50
Setting Model Configuration ParametersSetting Model Configuration ParametersIn this section...“Target File Selection” on p age 3-52“Build Pro cess” on
3 Project GeneratorTarget File SelectionSystem target fileClicking Browse opens the proce ssor File Brow ser whe re you selectccslink_grt.tlc as your
Setting Model Configuration ParametersBuild ProcessEmbedded IDE Link CC software does not use makefiles or the build processto generate code. Code gene
3 Project GeneratorCreate Code Generation reportAfter you generate code, this option tells the software whether to generatean H TM L report that docum
Setting Model Configuration ParametersFor details about using the options in Debug, refer to “About the TL CDebugger” in your Real-Time Workshop proce
3 Project GeneratorThesearetheoptionstypicallyselected for Real-Time W orkshop:• Conditional input branch execution• Signal storage reuse• Enable loca
Setting Model Configuration ParametersEmbedded IDE Link CC Pane P arametersOn the select tree, the Embedded IDE Link CC entry provides options inthese
3 Project Generatorworking directory. This file set contains many of th e same files thatReal-Time Workshop software generates to populate a CCS project
Setting Model Configuration Parameters• Print_message — When the DSP encounters an overrun condition, itprints a message to the standard output device
Product OverviewEmbedded IDE Link CC consists of these components:• Project Generator— ge nerate C code from Simulink models• Au tomation Interface—us
3 Project GeneratorCompiler options stringTo determine the degree of optimization provided by the TI optimiz ingcompiler, enter the optimization level
Setting Model Configuration ParametersTo enable the real-time execution profi le capability, select Profile rea l-timetask execution. With this selected
3 Project GeneratorWhen you inline a block function, the compiler replaces each call to a blockfunction with the equivalent function code from the sta
Setting Model Configuration ParametersIf you have used Embedded IDE Link CC, you are familiar w ith functionticcs, which creates objects the reference
3 Project Generatorcode replacement files. Us e none when the replacement process is correct andyou do not want to see multiple messages during your bu
Using Custom Source Files in Generated ProjectsUsing Custom Source Files in Generated ProjectsIn this section...“Preparing to Replace G enerated Files
3 Project Generator• Modify a library file, such a s a chip support library (.csl file)• Add commands to a header file• Modify data in a data file• Add co
Using Custom Source Files in Generated ProjectsThe build process stores the project files in the directorymodelname_multilink in your MATLAB working d
3 Project GeneratorFollow these steps to configure the build process to use a replacement file.1 Double-click Target Preferences in your model. The bloc
Using Custom Source Files in Generated Projects2 In the Board custom code options, select the type of file to replace—Sourcefilesor Libraries.3 Enter t
1 Getting Started• Automate project creation, including adding source files, include paths, andpreprocessor defines.• Configure batch building of p rojec
3 Project GeneratorOptimizing Embedded Code with Target Function LibrariesIn this section...“About Target Function Libraries and Optimization” on page
Optimizing Embedded Code with Target Function LibrariesCode Generation Using the Target Function LibraryThe build process begins by converting your mo
3 Project GeneratorFor more information about target function libraries in the build process, referto “Introduction to T arget Function Libraries” in
Optimizing Embedded Code with Target Function LibrariesWith the target function library s elected, your generate d code us es the specificfunctions in
3 Project GeneratorReviewing P rocessor-Specific Target Function LibraryChanges in Generated CodeUse one of the following techniques or tools to see t
Optimizing Embedded Code with Target Function Libraries4 Press Ctrl+B to generate code from your model.The Real-Time Workshop Repo rt window opens on
3 Project Generator5 Save the project with a new name—newproject26 Compare the contents of the modelname.c files from newproject1 andnewproject2. The d
Model Reference and Embedded IDE Link™ CCModel Reference and Embedded IDE Link CCModel reference lets your mo de l include other m odels as modular co
3 Project Generatoran executable (a MEX file , .mex) for each reference model that is used tosimulate the top model.When you rebuild reference models f
Model Reference and Embedded IDE Link™ CCThe Configuration Parameters dialog box opens.3 From the Select tree, choose Embedded IDE Link CC.4 In the rig
Product Overview• Highly customized code generation with the system target fileccslink_ert.tlc and ccslink_grt.tlc that enable you to use theConfigurati
3 Project Generator• No blocks from the C62x DSP Librar y (in c6000lib) (because these arenoninlined S-functions)• No blocks from the C64x DSP Librar
Model Reference and Embedded IDE Link™ CCModels that you develop with versions 2.4 and later of Embedded IDE LinkCC automatically include the model re
3 Project Generator3-82
4Verification• “What Is Verification?” on page 4-2• “Using Pro cessor in the L oop” on page 4-3• “Real-Time Execution Profiling” on page 4-11• “System St
4 VerificationWhat Is Verification?Verification consists broadly of running generated code on a processor andverifying that the code does what you inte
Using Proc essor in the LoopUsing Processor in the LoopProcessor in the loo p provides one pow erful verification capability in yourdevelopment process
4 VerificationYour starting point in developing a plant/controller system is to modelthe system a s two subsystems in closed-loop s imulation. As your
Using Proc essor in the LoopPIL AlgorithmThe algorithmic code, such as the control algorithm, to be tested d uring thePIL cosimulation. The PIL algori
4 VerificationPIL tests do not run in real time. After each sample period, the simulationhalts to ensure that all data has been exchanged between the
Using Proc essor in the Loop• “PIL with DSP/BIOS Enabled Does Not Support System Stack Profiling”on page 4-7• “Real-Time Workshop grt.tlc-BasedTargetsN
1 Getting StartedConfiguration InformationTo determine whether Embedded IDE Link CC is installed on y our sy stem,type this command at the MATLAB soft
4 Verification• The code g enerated by a model referred to by the PIL algorithm changesafter you generate code for the PIL algorithm. T o update the P
Using Proc essor in the Loopa From the model menu bar, go to Simulation > ConfigurationParam ete rs in your mo del to open the Con figuration Paramet
4 Verification8 Click Simu lation > Start to run the PIL simulation and view the results.4-10
Real-Time Execution ProfilingReal-Time Execution ProfilingIn this section...“Overview” on page 4-11“Profiling Execution by Tasks” on page 4-12“Profiling
4 Verification• An HTML report that provides statistical data about the execution of eachtask or atomic subsystem in the running process.These reports
Real-Time Execution Profiling3 Select Enable real-time profiling.4 On the Profile by list, select Task to enable real-time task profiling.5 Select Export
4 Verificationprofile(handlename, execution , report )to view the MATL AB software graphic of the execution report and theHTML execution report.Refer
Real-Time Execution Profiling2 Select Embedded IDE Link CC from the Select tree. The pane appears asshowninthefollowingfigure.3 Select Enable real-time
4 Verification2 To stop the running program, select Debug > Halt in CCS, or usehalt(objectname) from the MATLAB command prompt. Gathering profiledat
Real-Time Execution ProfilingThe following figure presents the model that contains the subsystems re portedin the profiling plot.4-17
Configuration I nformationccsdebug/display - Display properties of a TICCS object.ccsdebug/halt - Immediately terminate execution of the processor.ccs
4 VerificationAtomic Subsystem ProfilingTo WorkspacesimoutRate Transition 3Rate Transition 2Rate Transition 1Rate TransitionIdleTaskSubsystemfunction
System Stack ProfilingSystem Stack ProfilingIn this section...“Overview” on page 4-19“Profiling System Stack Use” on page 4-21OverviewEmbedded IDE Link
4 VerificationSystem Stack: 532/1024 (51.95%) MAUs used.name: System StackstartAddress: [512 0]endAddress: [1535 0]stackSize: 1024 MAUsgrowthDirection
System Stack ProfilingProfiling System Stack UseTo profile the system stack operation, perform these tasks i n order:1 Load an application.2 Set up the
4 Verification5 Use the profile method to capture a nd view the results of profiling thestack.profile(cc,'stack','report')The follo
5Exporting FilterCoefficients from FDATool• “About FDATool” on page 5-2• “Preparing to Export Filter Coefficients to Code Compose r Studio Projects”on p
5 Exporting F ilter Coefficients from FDAToolAbout FDAToolSignal Processing Toolbox™ software provides the Filter Design and Analysistool (FD ATo ol)
About FDATool• ticcs — Create a connection between MATLAB software and CCS IDE soyou can w ork with the project in CCS from the MATLAB Command window.
5 Exporting F ilter Coefficients from FDAToolPreparing to E xport Filter Coefficients to Code ComposerStudio ProjectsIn this section...“Features of a
Preparing to E xport F ilter Coefficients to Code Co mposer Studio™ ProjectsSelecting the Export ModeYou can export a filter by generating an ANSI C he
How to Contact The MathWorkswww.mathworks.comWebcomp.soft-sys.matlab Newsgroupwww.mathworks.com/contact_TS.html Technical [email protected]
1 Getting StartedIfyoudonotseethelisting,orMATLABsoftwaredoesnotrecognizethecommand, you need to install E mbedded IDE Link CC. Without the software,y
5 Exporting F ilter Coefficients from FDAToolChoosing the Export Data TypeThe export processprovidestwowaysyoucanspecifythedatatypetouseto represent t
Preparing to E xport F ilter Coefficients to Code Co mposer Studio™ Projectstype to suggest, refer to “How FDATool Determine s the Export SuggestedDat
5 Exporting F ilter Coefficients from FDAToolIf you set custom word and fraction lengths to represent your filter coefficients,theexportprocesssuggestsa
Exporting Filter Coefficients to Your Code Composer Studio ProjectExpor ting Filter Coefficients to Your Code Composer StudioProjectIn this section...
5 Exporting F ilter Coefficients from FDATool4 To export the filter coefficients, select Targets > Code Composer StudioIDE from the FDATool menu bar.
Exporting Filter Coefficients to Your Code Composer Studio ProjectNote You cannot use reserved ANSI C programming keywords, such asif or int as variab
5 Exporting F ilter Coefficients from FDATool• Click Select target to open the Selection Utility: Embedded IDE LinkCC dialog box.• From the list of bo
Exporting Filter Coefficients to Your Code Composer Studio Project/** Filter Coefficients (C Source) generated by the Filter Design and Analysis Tool*
5 Exporting F ilter Coefficients from FDATool{0.2436793028081, 0.4873586056161, 0.2436793028081},{1, 0, 0},{0.3768793219093, 0.7537586438185, 0.37687
Preventing Memory Corruption When You Export C oefficients to Processor MemoryPreventing Memor y Corruption When You ExportCoefficients toProcessor Me
Configuration I nformation• Connections to the RTDX™ (RTDX) interface. This object is a subset of theobject that refers to the CCS IDE.Concepts to kno
5 Exporting F ilter Coefficients from FDATooltoreal64_T NUM[256] = {...}allocates enough m emory for NUM tostoreupto256numeratorfiltercoefficients rathe
Preventing Memory Corruption When You Export C oefficients to Processor MemoryCaution Identify changes that require additional memory to store thecoef
5 Exporting F ilter Coefficients from FDAToolFor important guidelines on writing directly to processor memory, refer to“Preventing Memory Corruption W
Preventing Memory Corruption When You Export C oefficients to Processor MemoryIf you did not store your filter from a previous session, design the filte
5 Exporting F ilter Coefficients from FDAToolFor m ore information about how FDATooldeterminesthedatatypetosuggest, refe r to “How FD ATo ol Determine
Preventing Memory Corruption When You Export C oefficients to Processor MemoryYou can continue to export the filter, or cancel the export process. Topr
5 Exporting F ilter Coefficients from FDATool5-22
6Function ReferenceOperations on Objects for CC S IDE(p. 6-2)Work with links for CCS IDEOperations on Obje cts for RTDX(p. 6-4)Work with links to RTDX
6 Function ReferenceOperations on Objects for CCS IDEactivateMake specified project, file, or buildconfiguration active in CCS IDEaddAdd files or n ew typ
Operations on Objects for CCS IDEisreadableDetermine whether MATLA Bsoftware can read specified memoryblockisrtdxcapableDetermine whether processorsupp
1 Getting StartedRequirements for Embedded IDE Link CC SoftwareFor detailed information about the software and hardware required touse Embedded IDE Li
6 Function ReferencerunExecute prog ram loaded on processorsymbolProgram symbol table from CCS IDEticcsCreate object that refers to CCS IDEvisibleSet
Operations on Objects for RTDX™openOpen channel to proces sor or loadfile into CCS I DEreadmatMatrix of data from RTDX channelreadmsgRead mes sages fro
6 Function Reference6-6
7Functions — AlphabeticalList
activatePurpose Make specified project, file, or build configuration active in CCS IDESyntax activate(cc,'objectname','type')Descript
activatevisible(cc,1)Now make two projects in CCS IDE.new(cc,'myproject1.pjt','project')new(cc,'myproject2.pjt')In CCS I
addPurpose Add files or new typedef to active project in CCSSyntax add(cc,'filename')info = add(cc.type,'typedefname','datatyp
addFile Types and Extensions Supported by add and CCS IDE(Continued)File TypeExtensionsSupported CCS Project FolderObject and libraryfiles.o*, .lib Lib
addBoard number : 0Processor number : 0Default timeout : 10.00 secsRTDX channels : 0cc.visible(1) % Optional. Makes CCS IDE visible on your desktop.ne
addressPurpose Address and page for entry in symbol table in C CS IDESyntax a = address(cc,'symbolstring')Description a = address(cc,'s
2Automation Interface• “Getting Started with Automation Interface” on page 2-2• “Getting Started with RTDX ” on page 2-21• “Constructing ticcs Objects
addressExamples After you load a program to your processor, address lets you readand write to specific entries in the symbol table for the program. For
animatePurpose Run application on proc es sor to breakpo intSyntax animate(cc)Description animate(cc) starts the processor application, which runs unt
buildPurpose Build active p roject in CCS IDESyntax build(cc,timeout)build(cc)build(cc,'all',timeout)build(cc,'all')[result,numwar
buildNote C CS IDE opens a Save As dialog box when the requested projectbuild overwrites any files in the project. You must respond to the dialogbox be
buildpassed. If you omit the timeout option in the syntax, build defaults tothe global timeout defined incc.build(cc,'all') isthesameasbuild(
buildRTDX channels : 0build(cc,'all',20)You just completed a full build of the proje ct in CCS IDE. On the BuildpaneinCCSIDE,youseetherecord
ccsboardinfoPurpose Information about boards and simulators known to CCS IDESyntax ccsboardinfoboards = ccsboardinfoDescription ccsboardinfo returns c
ccsboardinfoInstalled BoardConfiguration DataConfigurationItem Name DescriptionProcessor numberprocnumThe number assigned by CCS to theprocessor on th
ccsboardinforeturnsboards =name: 'C6xxx Simulator (Texas Instruments)'number: 0proc: [1x1 struct]where the structure proc contains the proce
ccsboardinfoboards(1).proc(2).name);Examples On a PC with both a simulator and a DSP Starter K it (DSK) boardinstalled,ccsboardinforeturns something s
2 Automation InterfaceGetting Started with Automation InterfaceIn this section...“Introducing the Automation Interface Tutorial” on page 2-2“Selecting
ccsboardinfoat the MATLAB desktop prompt. You getBoard Board Proc Processor ProcessorNum Name Num Name Type--- ---------------------------------- ---
ccsboardinfo1). Board 0 has three CPUs defi ned for it. To determine the type of thesecond process or on board 0 (the b oard whoseboardnum = 0), enterb
cdPurpose Change CCS IDE working directorySyntax cd(cc,'directory’)wd = cd(c,'directory')cd(cc,pwd)Description cd(cc,'directory’)
cdwhere the drive letter D may be different based on wh ere you installedCCS IDE.Now check your MATLAB environment working dire ctory:pwdans =J:\bin\w
clearPurpose Remove links to CCS IDE and RTDX interface, or clear type entriesin type objectsSyntax clear(cc)clear('all')clear(cc.type,&apos
closePurpose Close CCS IDE files or RTDX channelNote close(cc,filename,'text') produces an error.Support forclose(rx,...) on C5000 and C6000
closeclose(rx,'channel1','channel2',...) closes the channels specifiedby the stringschannel1, channel2,andsoonasdefined in rx.close(
closerx=cc.rtdx % Create an alias to the RTDX portion of this link.open(rx,'ichan','w') % Open a channel for write access.enable(r
configurePurpose Define size and number of RTDX channel buffersNote configure produces a warning on C5000 and C6000 processorsand will be remov ed in a
configurerx=cc.rtdx % Create an alias to the rtdx portion.RTDX channels : 0configure(rx,4096,6) % Use the alias rx to configure the length% and number
Getting Started with Automation Interface1 Select your processor.2 Create and query objects to CCS IDE.3 UseMATLABsoftwaretoloadfiles into CCS IDE.4 Wo
datatypemanagerPurpose Open Data Type Managerdatatypemanager produces a warning and will be removed in a futureversion.Syntax datatypemanager(cc)cc2 =
datatypemanager• Refresh list —updatesthelistinTypedef name (Equivalentdata type). Refreshing the list ensures the contents are current. Ifyou changed
datatypemanagerindependent objects. When you change a property of either cc or cc2,the corre sponding property in the other o bject changes as well.Da
datatypemanagerBefore you add a type definition, the Typedef name (E quivalent d atatype) lis t shows a num ber of data types already defined:•Void(void
datatypemanager• Short(short) — short data type used in a function input or returnargument•Char(char) — character data type used in a function input o
datatypemanagerAdd Typedef Dialog BoxClicking Add typedef in the DTM opens the List o f K nown DataTypes dialog box. As shown in this fig ure, you add
datatypemanagerOptions in this dialog box let you review the data types you are usingor that are available in your projects. By selecting different da
datatypemanagerData Type Descriptionuint32Unsigned 32-bit integer dataint6464-bit integer datauint64Unsigned 64-bit integer datasingle32-bit IEEE®float
datatypemanagerData Type Description (For C6000 Compiler)double64-bit numeric datalong doubleOn the C2000 a nd C5000 processors –32-bit IEEE floating-p
datatypemanagerappear in the Loaded program option. MATLAB software cannotdetermine what program you have loaded.•Others such as pointers and typedefs
2 Automation InterfaceFunction DescriptionclearRemove a specific object to CCS IDE or removeall existing objects.ticcsConstruct an object to communicat
datatypemanagerFirst ExampleCreate a typedef (typedef1) that uses a MATLAB software data type.typedef1 uses the equivalent data type uint32.7-38
datatypemanagerSecond ExampleCreate a second typedef ( typedef2) that uses one of the TI C datatypes. Definetypedef2 to use the signed long data type.7
datatypemanagerThird ExampleCreate a typedef (typedef3) that refers to another typedef (typedef2).Call this a nested typedef.Notice that the reference
datatypemanagerThe next figure shows typedef4 created to use typedef2 rather thantypedef2* for a nested typedef. Under Equivalent type, typedef4has an
datatypemanager7-42
deletePurpose Remove debug points in addresses or source files in CCSSyntax delete(cc,addr,'type')delete(cc,addr,'type',timeout)del
deletereturns an error reporting that it could not find the specified debuggingpoint.delete(cc,addr,'type',timeout) adds the optional input pa
deletedelete(cc,'all','break',timeout) removes all of the validbreakpoints in the project source files. T his command d oes not rem
dirPurpose List files in current CCS IDE w orking directorySyntax dir(cc)Description dir(cc) lists the files and directories in the current CCS IDE work
disablePurpose Disable R TDX interface, specified channel, or all RTDX channelsNote Support for disable on C5000 and C6000 processors will beremoved in
Getting Started with Automation InterfaceMethodDescriptionrunExecute the program loaded on theprocessor.visibleSet whether CCS IDE w indow isvisible o
disableSee Also close, enable, open7-48
displayPurpose Display properties of object that refers to CCS IDE or RTDX linkNote display(rx) produces a warning on C5000 and C6000 processorsand wi
displayTICCS Object:API version : 1.0Processor type : C67Processor name : CPURunning? : NoBoard number : 0Processor number : 0Default timeout : 10.00
enablePurpose Enable RTDX interface, specified channel, or all RTDX channelsNote Support for enable on C5000 and C6000 processors will beremoved in a f
enableExamples To use channels to RTDX, you must both open and enable the channels:cc = ticcs; % Create a new connection to the IDE.enable(cc.rtdx) %
flushPurpose Flush data or messages from specified RTDX channelsNote flush support C 5000 and C6000 processors will be remove d in afuture version.Synt
flushflush(rx,channel) removesallpendingdatamessagesfromtheRTDX channel queue specified bychannel in rx.Unliketheprecedingsyntax o ptions, you use this
getPurpose Access object propertiesSyntax get(cc,'propertyname')v = get(cc,'propertyname')get(rx,'propertyname')get(rx)v
getProcessor type : C67Processor name : CPURunning? : NoBoard number : 0Processor number : 0Default timeout : 10.00 secsRTDX channels : 0RTDX channels
haltPurpose Terminate execution of pro cess running on processorSyntax halt(cc,timeout)halt(cc)Description halt(cc,timeout) immediately stops program
2 Automation InterfaceRunning Code Composer Studio Software on Your Desktop— VisibilityWhen you create a ticcs object , Embedded IDE Link CC starts CC
haltans =1cc.isrunning % Alternate syntax for checking the run status.ans =1halt(cc) % Stop the running application on the processor.isrunning(cc)ans
infoPurpose Information about processorNote Support for info(rx) on C5000 and C6000 processors will beremoved in a future version.Syntax info = info(c
infoStructure Element Data Type Descriptioninfo.subfamilyDecimalDecimal representation of the hexadecimalidentification value that TI assigns to the pr
infofamily: 320subfamily: 103timeout: 10This example simulates the TMS320C6211 processor running inlittle-endian mode. When you use CCS Setup Utility
insertPurpose Add debug point to source file or address in CCSSyntax insert(cc,addr,'type')insert(cc,addr,'type',timeout)insert(cc,
insertWhen you use the line input a rgument to insert a breakpoint on aspecified line,line must represent a valid line. If line does not s pe cifya val
insertinsert(cc,filename,line) defaults to type 'break' to insert abreakpoint.Example Open a project in CCS IDE, such as volume.pjt in the t
insertSee Also address, remove, run7-65
isenabledPurpose Determine w hether RTDX link is enabled for communicationsNote Support for isenabled on C5000 and C6000 processors will beremoved in
isenabledNote For isenabled to return reliable results, your processor mustbe running a loaded program. When the processor is not running,isenabled re
Getting Started with Automation InterfaceTo run the tutorial in MA TLAB software, click run ccstutorial.Thiscommand opens the tutorial in an interacti
isreadablePurpose Determine whether MATLAB software can read specified memory blockNote Support for isreadable(rx,'channel') on C5000 and C60
isreadableExamples of Address Property ValuesPropertyValue Address Type Interpretation’1F’ StringLocation is 31 decimal on thepage referred to by cc.p
isreadabledatatypeStringNumberofBytes/Value Description'int8' 1Signed 8-bit integers'int16'2Signed 16-bit integers'int32&apos
isreadablefamily and 216for the C5xxx series. W h en the function identi fies anillegal address, it returns an error message stating that the addressva
isrtdxcapablePurpose Determine whether processor supports R TDXNote Support for isrtdxcapable on C5000 and C6000 processors willbe removed in a future
isrunningPurpose Determine whether processor is executing processSyntax isrunning(cc)Description isrunning(cc) returns 1 when the processor is executi
isrunning1halt(cc)isrunning(cc)ans =0See Also halt, restart, run7-74
isvisiblePurpose Determine whether CCS IDE is runningSyntax isvisible(cc)Description isvisible(cc) determines whether CCS ID E is running on the deskt
isvisiblevisible(cc,0)isvisible(cc)ans =0Notice that CCS IDE is not visible on your d es kto p. Recall thatMATLAB software did not open CCS IDE. When
iswritablePurpose Determine whether MATLAB softw are can write to specified memoryblockNote Support for iswritable(rx,'channel') on C5000 and
Revision HistoryJuly 2002 Online only New for Version 1.0 (Release 13)October 2002 Online only Revised for Version 1.1May 2003 Online only Revised for
2 Automation Interface3 Select a b oard name and processor name from the lists.You are selecting a board and processor number that identifies yourparti
iswritableFor processors that have one memory page, setting thepagevalueto0lets you specify all memory locations in the processor using the memo ryloc
iswritableiswritable w rites 30 values to the processor.datatype — a string that represents a MATLAB data type. The totalmemory block size i s derived
iswritableLike the isreadable, read,andwrite functions, iswritable checksfor valid address values. Illegal address values would be any addressspace la
listPurpose Information listings from CCSSyntax list(ff,varname)infolist = list(cc,'type')infolist = list(cc,'type',typename)Note
lista function declaration to MATLAB software and the declarationstring does not match the declaration forff as determined whenyou createdff.In an exa
list• When varname is an input to a library function. list always fails inthis case. It does not matter whether you use declare to provide thedeclarat
listAlso, list may report incorrect information when you make changesto variables from MATLAB software. To report variable information,list uses the C
listinfolist = list(cc,'project') returns a vector of structurescontaining project information in the format shown here when youspecify opti
listinfolist = list(cc,'variable’,varname) returns information aboutthe specified variablevarname.infolist = list(cc,’variable’,varnamelist) retur
listreturned information follows the same format a s the syntaxinfolist = list(cc,'variable',...).infolist = list(cc,'function') r
Getting Started with Automation Interface1 Create an object that refers to your selected board and processor. Enter thefollowing command at the p romp
listinfolist Structure Element Descriptioninfolist.functionname(1).lineposStart and end linepositions of functioninfolist.functionname(1).funcinfoMisc
listinfolist Structure Element Descriptioninfolist.typename(2)... ...infolist.typename(n)... ...For the field name, list uses the type n ame to refer
listuclass: 'numeric'type: 'int'bitsize: 16To demonstrate using list with a defined C type, variable typename1includes the type arg
loadPurpose Transfer program fi le (*.out,*.obj) to processor in active projectSyntax load(cc,'filename',timeout)load(cc,'filename'
loadGEL files folder in CCS. To remove GEL files, use remove.Youcanload any GEL file — you must be sure the GEL file is the correct one.load does not atte
msgcountPurpose Number of m essages in read-enabled channel queueNote Support for msgcount on C5000 and C6000 processors will beremoved in a future ve
newPurpose Create and open text file, project, or build configuration in CCS IDENote new(cc,objectname,'text') produces an error.Syntax new(cc
newtype String Description'project'Create a new project.'projext'Create a new CCS external make project.Using this option indicate
newCaution After you create an object in CCS IDE, save the file in CCSIDE.new does not automatically save the file, and you lose your changeswhen you cl
openPurpose Open channel to processor or load file into CCS IDENote Support for open(rx,...) on C5000 and C6000 processors willbe removed in a future v
2 Automation Interface4 Type linkinfo = info(cc).Thecc link status information provides information about the hardware asfollows:linkinfo =boardname:
openCCS IDE w orking d irectory, you can use a relative path, such as thename of the file.Note Program files (.out extension) and project files (.mak ext
openperiod MATLAB software w aits for the load. If MATLAB software w aitsmore thantimeout seconds, load returns immediately with a timeouterror. Retur
openenable(rx,'ichannel');When you are working with CCS ID E, open adopts a differentoperational form based on your input arguments forfilen
profilePurpose Code execution and stack usage profile reportNote The tic and raw profile report options that depend on DSP/BIOSwill be removed in a futu
profileobjects and DSP/BIOS, refer to your Texas Instruments documentationthat came with C CS IDE .Note Profiling works with and without en a bling DSP
profileformatStringProfiling byParameterDSP/BIOSProjectNon-DSP/BIOSProjectTaskNo NorawAtomicSubsystemYes NoTaskNo YesreportAtomicSubsystemYes YesTaskN
profile2name: 'processing_SWI'units: 'Hi Time'max: 1528total: 3052avg: 1526pdfactor: 0.0075count: 23name: 'TSK_idle'unit
profilecpuload: 0obj: [3x1 struct]ps.obj(1)ans =name: 'KNL_swi'units: 'Hi Time'max: 1.1759e-005avg: 2.7597e-006count: 29for k=1:le
profileWhen you choose raw, returned variable ps contains an undocumentedlist of the information provided by CCS IDE. Thetic option providesthe same i
profileinstrumentation in the project. You enable the DSP/BIOS reportcapability with the Profile performance at atomic subsystemboundaries option on th
Getting Started with Automation InterfaceIn this part of the tutorial, you load the executable code for the processor CPUin CCS IDE. Em bedded IDE Lin
profileReport EntryUnits Descrip tionendAddressDecimal address andpageListstheaddressoftheend of the stack andthe memory page.stackSizeAddresses Repor
profileUsing ProfilingThe following items affect your ability to profile project execution andstack usage:Execution profiling works on code you generate
profileunits: 'Hi Time'max: 1.1759e-005avg: 2.7597e-006count: 29for k=1:length(ps.obj),disp(k),disp(ps.obj(k)),end;1name: 'KNL_swi&apos
profilecpuload: 0error: 0avgperiod: 1000rate: 1000obj: [4x1 struct]for k=1:length(ps.obj),disp(k),disp(ps.obj(k)),end;1name: 'KNL_swi'units:
profile4name: 'IDL_busyObj'units: 'User Def'max: -2.1475e+009total: 0avg: 0pdfactor: 0count: 0Your results can differ from this ex
profileprofile(cc,'stack','report') % Request stack use report.Maximum stack usage:System Stack: 356/1024 (34.77%) MAUs used.name:
readPurpose Data from memory on processor or in CCSSyntax mem = read(cc,address,'datatype',count,timeout)mem = read(cc,address,'datatyp
readdecimal value. When the processor has only one memory page, as istrue for many digital signal processors, the value of the page portionof the memo
readInput ResponsenRead n values into a column vector. Return t hevector inmem.[m,n]Read (m* n) values from memory into an m-by-nmatrix in column majo
readWorking with Negative ValuesWriting a negative value causes the data written to be saturatedbecausechar is unsigned on the process or. Hence, a 0
2 Automation InterfaceC:\Temp\LinkForCCSDemos_v3.2\ccstutorial\c6x\c67x\ccstut.pjtdemoPjt.DemoDirans =C:\Temp\LinkForCCSDemos_v3.2\ccstutorial\c6x\c67
readdefaults to a value of 1. This syntax reads one memory location ofdatatype.Note To ensure seamless read operatio n, use address to extractaddress
read14 15 16 17 18 19 20 21 22 23 24 25outdata now contains the values in indata, returned from theprocessor.As a further demonstration ofread, try th
readmatPurpose Matrix of data from RTDX channelNote Support for readmat on C5000 and C6000 processors will beremoved in a future version.Syntax data =
readmatCaution If the timeout period expires before the output data matrix isfully populated, you lose all the messages read from the channel tothat p
readmatopen(rx,'ochannel','r');enable(rx,'ochannel');indata = 1:25; % Set up some data.write(cc,0,indata,30);outdata=rea
readmsgPurpose Read messages from specified RTDX channelNote Support for readmsg on C5000 and C6000 processors will beremoved in a future version.Synta
readmsgdatatype String Specified Data Type'single'Floating-point data, 32-bits(single -precision).'uint8'Unsigned 8-bit integers.W
readmsgdata = readmsg(rx,channelname,datatype,nummsgs) reads thenumber of messages defined bynummsgs. data becomes a cell array ofrow matrices,data = {
readmsgColumns 1 through 1312345678910111213Columns 14 through 2514 15 16 17 18 19 20 21 22 23 24 25Now use RTDX to read the messages into a 4-by-5 ar
regreadPurpose Value from processor registerSyntax reg = regread(cc,'regname','represent',timeout)reg = regread(cc,'regname&a
Getting Started with Automation Interface4 To determine the memory address of the global symbol ddat,enterthefollowing command at the p rompt:ddata =
regreadThe represent inputargumentdefines the format of the data stored inregname. Input argument represent takes one of three input strings:represent
regreadlater. Therefore, getting the values of register variables during programexecution may return unexpected answers.Values that you write to regis
regreadFor processors in the C6xxx family, regread lets you a ccess processorregisters directly . To read the value in general p urpose register A0,ty
regwritePurpose Write data values to registers on processorSyntax regwrite(cc,'regname',value,'represent',timeout)regwrite(cc,&apo
regwriteprocessor family prov ides the following register names that are validentries forregname:Register Names Register ContentsA0, A1, A2,..., A15Ge
regwriteReading and Writing Register ValuesRegister variables can be difficult to read and write because theregisters which hold their value are n ot d
regwriteregwrite(cc,'b1:b0',hex2dec('1010'),'ieee')Registers B1:B0 now contain the value 4112 in double-precision format
reloadPurpose Reload most recent program file to processor signal proce ssorSyntax s = reload(cc,timeout)s = reload(cc)Description s = reload(cc,timeou
reloadcc=ticcs;s=reload(cc,23)Warning: No action taken - load a valid Program file beforeyou reload...s=''open(cc,'D:\ti\tutorial\sim62
removePurpose Remove file from active CCS IDE projectSyntax remove(cc,'filename')remove(cc,'gelfilename')Description remove(cc,&apo
2 Automation Interfaceccstut.c has two global data arrays — ddat an d idat — that you declare andinitialize in the source code. You use the functionsr
resetPurpose Reset processorSyntax reset(cc,timeout)reset(cc)Description reset(cc,timeout) stops program execution on the processor andasynchronously
restar tPurpose Restore program counter to entry point for current programSyntax restart(cc,timeout)restart(cc)Description restart(cc,timeout) halts t
restartWhen your process gets lost or halts, restart is a quick way to restoreyour program.See Also halt, isrunning, run7-140
runPurpose Execute program loaded on processorSyntax run(cc,'state',timeout)run(cc,'main')run(cc,'tofunc','function
runstate String Run Action'tofunc'Run the program from the current position ofthe program counter to the start of a specifiedfunctionfunction
runExamples After y ou build and load a program to your processor, use run to startexecution.cc = ticcs('boardnum',0,'procnum',0);
runconfigure(rx,1024,4);See Also halt, isrunning, restart7-144
savePurpose Save files and projects in CCS IDENote save(cc,filename,'text') produces an error.Syntax save(cc,'filename','type&
saveCommand Resultsave(cc,'all','text')Save all open text files.Includes source files, li braries,command files, and others.save(cc,&
symbolPurpose Program symbol table from CCS IDESyntax s = symbol(cc)Description s = symbol(cc) returns the symbol table for the prog ram loaded inCCS
Getting Started with Automation Interfacea Enter ddatv = read(cc,address(cc,'ddat'),'double',4).MATLAB software responds withddatv
symbolc6711dskafxr;Now set the simulation parameters for the model and build the m odel toyour process or. With the model loaded on your processor, us
ticcsPurpose Create object that refers to CCS IDESyntax cc = ticcscc = ticcs('propertyname’,'propertyvalue’,...)Description cc = ticcs retur
ticcsObject Property Name Property Default Description'status'RunningNoStatus of the programcurrently loaded on theprocessor'boardnum&a
ticcsObject Property Name Property Default Description'timeout'Timeout10.0 sSpecifies how long CCSwaits for a responsefrom the processor afte
ticcsGiven these two properties, the most comm on forms of the ticcsmethod arecc = ticcs('boardnum',value)cc = ticcs('boardnum',va
ticcsUsing ticcs with Multiple Processor BoardsWhen you create ticcs objects that access boards that contain morethan one processor, such as the O MAP
ticcsYou can include both the board number and the processor number intheticcs syntax, as shown here:cc = ticcs('boardnum',2,'procnum&a
ticcsAPI version : 1.2Board name : OMAP 3.0 Platform Simulator [TexasInstruments]Board number : 2Processor 0 (element 1) : TMS470R2127 (MPU, Not Runni
ticcswhich sets the default property value procnum= 0 to connect to theprocessor on the third board.cc = ticcsTICCS Object:API version : 1.2Processor
visiblePurpose Set whether CCS IDE window is vi sib le w h ile CCS runsSyntax visible(cc,state)Description visible(cc,state) sets CCS IDE to be visibl
2 Automa tion InterfaceThe Stdout tab in CCS IDE reveals that ddat and idat contain newvalues. Next, read those new values back into MATLAB software.f
visibleFor more information about visibility and CCS, refer to “Running CodeComposer Studio Software on Your Desktop — Visibility” on page 2-6.Example
writePurpose Write data to m emory on processorSyntax write(cc,address,data,timeout)write(cc,address,data)Description ticcs Object Syntaxeswrite(cc,ad
writeWhen the processor has only one memory page, as is true for manydigital signal processors, the value of the page portion of the memoryaddressis0.
writeDatatypes Descriptionint16Signed 16-bit integersint32Signed 32-bit integerssingleSingle-precision floating point d atauint8Unsigned 8-bit integers
writeWriting Negative ValuesWriting a negative value causes the data written to be saturatedbecausechar is unsigned on the process or. Hence, a 0 (a N
writeIt may be more conv enient to return the data in an array. If you entera vector forcount, mem contains a matrix of d imensions the same asvectorc
writemsgPurpose Writemessagestospecified RTDX channelNote Support for writemsg on C5000 and C6000 processors will beremoved in a future version.Syntax
writemsgenable(rx,'ichannel');inputdata(1:25);writemsg(rx,'ichannel',int16(inputdata));As a further illustration, the following co
writemsg7-166
8Block Reference
Getting Started with Automation Interface-1 508 647 7000If you used 8-bit integers (int8), the returned values would be incorrect.idatv=read(cc,addres
8 Block ReferenceC280x/C28x3x DSP Chip Support (ccslinklib_c280x)C280x/C28x3x Hardware Interrupt Interrupt Service Routine tohandle hardware interrupt
Core Suppo rt (ccslinklib_core)Core Support (ccslinklib_core)Idle TaskCreate free-running taskMemory A llocate Allocate memory sectionMemory Copy Copy
8 Block Reference8-4
9Blocks — Alphabetical List
C280x/C28x3x Hardware InterruptPurpose Interrupt Service Routine to handle hardware interrupt onC280x/C28x3x processorsLibrary ccslinklib_c280x in Emb
C280x/C28x3x Hardware InterruptEach interrupt is described by:• CPU interrupt numbers• PIE interrupt numbers• Task priorities• Preemption flagsSo one i
C280x/C28x3x Hardware InterruptC280x Peripheral Interrupt Vector ValuesRow numbers = CPU values/Column numbers = PIE values876543211WAKEINT(LPM/WD)TIN
C280x/C28x3x Hardware InterruptThe task priority indicates the relative importance tasks associated withthe asynchronous interrupts. If an interrupt t
C280x/C28x3x Hardware InterruptSeethetableofC280xPeripheral Interrupt Vector Values for amapping of CPU interrupt number to interrupt names.PIE interr
C280x/C28x3x Hardware InterruptSee Also The following links refer to block reference pages that require theTarget Support Package TC2 software.C280x/C
2 Automa tion InterfaceMATLAB software returns the new values for idatv.idatv =1234h Use restart to reset the program counter for your program to theb
C281x Hardware InterruptPurpose Interrupt Service Routine to handle hardware interruptLibrary ccslinklib_c281x in Embedded IDE Link CCDescription For
C281x Hardware InterruptEach interrupt is represented b y one element from each parameter (fourelements total), one from the same position in each of
C281x Hardware InterruptC281x Peripheral Interrupt Vector ValuesRow numbers = CPU values / Column numbers = PIE values876543211WAKEINT(LPM/WD)TINT0(TI
C281x Hardware InterruptThe task priority indicates the relative importance tasks associated withthe asynchronous interrupts. If an interrupt triggers
C281x Hardware InterruptCPU interrupt numbersEnter a vector of CPU interrupt numbers for the interrupts youwant to process asynchronously.Seethetableo
C281x Hardware InterruptReferences Detailed information interrupt processing i s in TMS320x281x DSPSystem Control and Interrupts Reference G uide, Lit
Hardware InterruptPurpose Interrupt Service Routine to handle hardware interrupt on C5000 andC6000 processorsLibrary C5000 DSP Chip Support in Embedde
Hardware InterruptProcessor Family Valid Interrupt NumbersC5xxx2, 3, 5-21, 23C6xxx4-15The width of the block output signal corresponds to the number o
Hardware Interruptthe interrupts in Interrupt numbers.IfInterrupt numberscontains more than one interrupt, and you enter only one flagvalue in this fiel
Idle TaskPurpose Create free-running taskLibrary Cxxxx DSP Chip Support in Embedded IDE Link CCDescription TheIdleTaskblock,andthesubsystem connected
Getting Started with Automation Interfacec Verify that the PC register contains the value you wrote.cc.regread('PC','binary')C6xxx
Idle TaskDialogBoxTask numbersIdentifies the created ta sk s b y n u m b er. Enter a s many tasks asyou need by entering a vector of integers. The defa
Idle TaskFor example, en t erin g [2,3, 1] in this field indicates that therearethreefunctionstobeexecuted,andthatthethirdfunctionis executed first, the
Memory AllocatePurpose Allocate memory sectionLibrary Cxxxx DSP Chip Support in Embedded IDE Link CCDescription On C2xxx, C5xxx, or C6xxx processors,
Memory AllocateThefollowingsectionsdescribethecontentsofeachpaneinthedialogbox.9-21
Memory AllocateMemory ParametersYou fi nd the following memory parameters on this tab.Variable nameSpecify the name of the variable to allocate. The va
Memory AllocateSpecify variable alignmentSelect this option to direct the compiler to align the variable inVariable name to an alignment b oundary. Wh
Memory AllocateSection ParametersParameters on this pane specify thesectioninmemorytostorethevariable.SpecifymemorysectionSelecting this parameter ena
Memory Allocatestandard memory sections or a custom section that you declareelsewhere in your code.Memory sectionIdentify a specific memory s ection to
Memory CopyPurpose Copy to and from memory sectionLibrary Cxxx DSP Chip Support in Embedded IDE Link CCDescription In generated code, this block copie
Memor y Copycontrol when and how the block initializes memory, copies to andfrom memory, and terminates mem ory operations. The parametersenable you t
2 Automa tion Interfaceduring the tutorial, the tutorial program executes the following comm and atthe prompt:clear cvar cfield uintcvarThis tutorial
Memory CopySections that follow describe the parameters on each tab in the dialogbox.9-28
Memor y CopySource ParametersCopy fromSelect the source of the data to copy. Choose one of the entrieson the list:•Input port — This source reads the
Memory Copy• Specified address — This source reads the data at thespecified location in Specify address s ou rce and A ddress .•Specified source code s
Memor y CopyAddressWhen you select Specify via d ialog for the address source, youenter the variable address here. Addresses should be in decimalform.
Memory CopyOffsetOffset tells the block whether to copy the first element of thedata at the input address or value, or skip one or more valuesbefore st
Memor y Copy9-33
Memory Copy9-34
Memor y CopyDestination ParametersCopy toSelect the destina tion for the data. Choose one of the e ntries onthe list:•Outputport— Copies the data to t
Memory Copy• Specified source code symbol — Tells the block to copy thevariable or sy mbol (variable) to the symbol you enter in Sourcecode symbol. Wh
Memor y CopyFor this example, you could enter either 8192 or hex2dec('2000')as the address.Data typeUse this parameter to specify the type o
Getting Star ted with RTDX™Getting Started with RTDXIn this section...“Introducing the Tutorial for Using RTDX” on page 2-22“Creating the ticcs O b je
Memory Copythe figure, you can use both an input stride and output stride atthesametimetoenableyoutomanipulateyourmemorymorefully.Sample timeSample tim
Memor y Copyor the Simulink software model (when there are no input ports onthe block). Enter the sample timeinsecondsasyouneed.9-39
Memory CopyOptions Parameters9-40
Memor y CopySet memory value at initializationWhen you check this optio n , you direct the block to initializethe memory location to a specific value w
Memory CopyChecking this parameter enables the Bitwise operatorparameter for you to define how to apply the mask value.To use your initialization value
Memor y CopyApplying a mask to the copy process lets you select individualbits in the result, for example, to read the value of the fi fth bit byapplyi
Memory CopyUse QDMA for copy (if available)For p rocessors that support quick direct memory access (Q D M A),select th is parameter to enab le the QDM
Targ et PreferencesPurpose Configure model for Texas Instruments processorLibrary Target Preferences in Em bedded IDE Link CCDescription Options on the
Tar get Preferencesmemory map for your processor. Both steps are essential for generatingcode for any board that is custom or explicitly supported, su
Targ et PreferencesTargetPreferences b lock dialog boxes provide tabbed access to thefollowing panes with options you set for the processor and board:
2 Automa tion Interfacehardware simulator in CCS IDE to run this tutorial. The tutorial uses theTMS320C6 7 11 DSK as the board, with the C6711 DSP as
Tar get Preferences• Sections — Determine the arrangement and location of the sectionson the processor such a s where to put the DSP/BIOS and compiler
Targ et PreferencesAdding the ne w processor puts the processor on the Processorlist for all Target Preferences blocks, not just this one.The new proc
Tar get PreferencesCorrectly generating interrupts for yo ur model depends on theclock rate of the CPU on your processor. You can change therate w ith
Targ et PreferencesEnable High-Speed RTDXSelect this option to tell the code generation p rocess to enablehigh-speed R TDX for this m odel.Operating S
Tar get PreferencesNote When you enter a file path, library, or function, the blockdoes not verify that the path or function exists or is valid. Invali
Targ et PreferencesThe Memory pane contains memory options for three k inds of memory:• Physical Memo ry —Specifies the processor and board memory map•
Tar get PreferencesBe aware that these options may affect the options on the Sectionspane. You can make selections here that change how you configureop
Targ et PreferencesAfter you add the segment, you can configure the starting address,length, and contents for the new segment. New segments startwith c
Tar get PreferencesAddClick Add to add a new memory segment to the processor memorymap. When you click Add, a new segment name appears, forexampleNEWM
Targ et PreferencesHeap SizeAfter you select Create heap,thisoptionletsyouspecifythesize of the heap in words. Enter the number of words in decimalfor
Getting Star ted with RTDX™Functions From Objects for CCS IDEFunction DescriptionticcsCreate connections to CCS IDE andRTDX.cdChange your CCS IDE w or
Tar get PreferencesCache level lets you select one of the available cache l evels toconfigure by selecting one of its configurations. For example, youca
Targ et PreferencesWithinthis pane, you configure the allocatio n of sections f or Compiler,DSP/BIOS,andCustom needs.This table provides brief definitio
Tar get PreferencesStringSectionList Description of t h e Section Contents.argsDSP/BIOS Argument buffers.bssCompiler Static and global C variables in
Targ et PreferencesStringSectionList Description of th e Se c tion Contents.sysinitDSP/BIOS DSP/BIOS initialization startup code.sysmemCompilerDynamic
Tar get PreferencesCustom sections list contains no fixed entries, but instead, onlya placeholder for a section for you to define.NameYou enter the name
Targ et PreferencesWhen you set the Operating system option to None,youdisabletheoptions in this pane.For more information about tasks, refer to the C
Tar get PreferencesDSP/BIOS sections/objectsDuring program compilation, DSP/BIOS produces bothuninitialized and initialized blocks of data and code. T
Targ et Preferencesuse m ore memory than you allo cate. While any task can use morememory than the stack includes, exceeding the stack memory sizemigh
Tar get PreferencesPeripheralNameDescriptionADC Report the settings for the Analog-to-Digital ConvertereCAN_A Report or set the enhanced Controlle r A
Targ et PreferencesPeripheralNameDescriptionGPIO[pin#] Configure inpu t qualification types for GeneralPurpose Input Output pinsFlash_loaderEnable and c
2 Automa tion InterfaceFunction DescriptionisreadableDetermine whether MATLA Bsoftware can read the specifiedmemory location.iswritableDetermine whethe
Tar get PreferencesADCThe internal timing of the ADC module is controlled by thehigh-speed peripheral clock (HSPCLK). The A DC operating clockspeedis
Targ et PreferencesYou can set the following parameters for the AD C clock prescaler:ACQ_PSThis value does not actually have a dire ct effect on the A
Tar get PreferencesEnhanced CAN modeWhether to use the CAN m odule in extended mode, whichprovides additional mailboxes and time stamping. Thedefault
Targ et PreferenceseCAN_BThe parameters you can se t for theeCAN_B module include all theparameters for theeCAN_A module plus the following parameters
Tar get PreferencesSYNCO pin assignmentAssigns the ePWM external sync pulse output (SYNCO)to a GPIO pin. Choices areNone (the default), GPIO6,andGPIO3
Targ et PreferencesThe Mode parameter corresponds to bit 10 (M ST) of theI2C M ode Reg ister (I2CMDR).Addressing form atIf Mode isSlave, determine the
Tar get PreferencesNumber: SPRU721, available on the Texas InstrumentsWeb site.Module clock prescalerIf Mode isMaster,configure the m odule clock frequ
Targ et PreferencesMaster clock H igh -time dividerWhen Mode isMaster, this divider determines the durationof the high state on the serial clock pin (
Tar get PreferencesEnable Rx interruptThis parameter corresponds to bit 5 (RXFFIENA) of the I2CReceive FIFO Register (I2CFFRX).Rx FIFO interrupt level
Targ et PreferencesThis parameter corresponds to bit 6 (AAS ) of the InterruptEnable Register (I2CIER).Enable SCD interru ptEnable stop condition dete
Getting Star ted with RTDX™Creating the links in Task 1 did not o pen com munications to t he processor.With the links in place, you open as manychann
Tar get PreferencesThis parameter corresponds to bit 1 (NACK) of the InterruptEnable Register (I2CIER).Enable AL interruptEnable arbitra t ion-lost in
Targ et PreferencesNo deadlock condition can occur because there is no waitstate. Data transmission is asynchronous. W ith this mode,it is possible th
Tar get Preferencesis enabled, a C28x DSP’s Tx pin is internally connected toits R x pin and can transmit data from its output port to itsinputporttoc
Targ et Preferencesread. If data is present, it reads and outputs the contents.If no data is present, the system outputs the last value andcontinues.C
Tar get PreferencesNote Deadlocks can occur i f one SC I Transmit block triesto communicate with more than one SCI Receive block ondifferent COM po rt
Targ et PreferencesSuspension mo deType of suspension to use when debugging your programwith Code Composer Studio. When your program encountersa break
Tar get Preferencesto its Rx pin and can transmit data from its o utput port toits input port to check the integrity of the transmission.Enable FIFOSe
Targ et PreferencesClock phaseSelectNo_delay or Delay_half_cycle.Clock polaritySelectRising_edge or Falling_edge.Data bitsLength in bits from1 to 16 o
Tar get PreferencesSOMI pin assignmentAssigns the SPI something (SOMI) to a GPIO pin. ChoicesareNone (default), GPI013,orGPI025.STE pin assignmentAssi
Targ et PreferencesEQEP1I pin assignmentSelect an option from the list—GPIO23 or GPIO53.WatchdogWhen enabled, the watchdog rese ts the processor or ge
2 Automa tion InterfaceNote To be able to open and enable channels over a link to RTDX, theprogram loaded on your processor m ust include functions or
Tar get Preferences• Select Chip reset to generate a signal that resets theprocessor (WDRST signal) and disable the watchdoginterrupt signal (W DIN T
Targ et Preferencesoutput from the qua lifier change s to 0 immediately after thethird consecutive value is rece iv ed .• Qualification using 6 samples
Tar get PreferencesSYSCLKOUTescaler2*Prwith the exception of zero. When Qualification samplingperiod prescaler=0, a sample is taken every SYSCLKOUTcloc
Targ et PreferencesFlash_loaderYou can use Flash_loader to:• Automatically program generated code to flashmemoryonthetarget wh en you build the code.•
Tar get PreferencesSpecify API locationSpecify the directory path of the TI flash API executable youdownloaded and installed on your computer.ExecuteCl
Targ et PreferencesIf your model includes an C280x/C28x3x ADC block with theUse DMA (with C28x3x) parameter enabled, disable thesame DMA channel here
Tar get PreferencesInterrupt sourceSelect the peripheral interrupt that triggers a DMA burstfor the specified channel.Selecting SEQ1INT or SEQ2IN T gen
Targ et PreferencesNote When you select Use DMA (with C28x3x) theC280x/C28x3x ADC block:• If the AD C block Module isA or A and B, Interrup tsource is
Tar get PreferencesSpecify the number of 16-bit words in a burst, from 1 to32. The DMA module must complete a burst before itcan service the next chan
Targ et PreferencesSpecify the number of bursts in a transfer, from 1 to65536.This parameter corresponds to bits 15-0(TRANSFERSIZE) in the Transfer Si
Getting Star ted with RTDX™rx = cc.rtdx;Creating the ticcs ObjectsWith your processing model converted to an executable suitable for yourdesired proce
Tar get PreferencesThis parameter corresponds to bits 15-0(DST_WRAP_SIZE) in the Destination WrapSize Register (DST_WRAP_SIZE ).Note When you select U
Targ et Preferencesburst. Enter a value from –4096 (decrement) to 4095(increment).To disable incrementing or decrementing the addresspointer, set Burs
Tar get PreferencesIf DM A is configured to perform memory wrapping(if SRC wrap is enabled) the corresponding sourceTransfer step has no effect.Note Th
Targ et PreferencesDestinationThe following parameters configure the D MA channeloutputs.• Begin addressSet the starting address for the current destin
Tar get PreferencesTo disable incrementing or decrementing the addresspointer, set Burst step to 0. For example, becauseMcBSP does no t u se FIFO, you
Targ et PreferencesIf DMA is confi gured to perform memory wrapping (ifDST wrap is enabled) the corresponding destinationTransfer step has no effect.No
Tar get PreferencesModeThe follow ing parameters configure the DMA channel.• Enable one shot modeEnable this parameter to have the DMA channel complete
Targ et PreferencesSelect this parameter to leave the D MA channel enabledupon completing a transfer. The channel w ill wait for thenext interrupt eve
Tar get Preferencesand the other DM A channels are configured to handlelower-priority data.When e nable d, the DMA module s ervices each enabledchannel
Targ et PreferencesNote When you select Use DMA (with C28x3x) theC280x/C28x3x ADC block, this parameter is disabled.New Processor Dialog BoxWhen you c
ContentsGetting Started1Product Overview ... 1-2Components of Embedded IDE Link CC Software... 1-3Auto mation Inter
2 Automa tion Interfacecc=ticcs('boardnum',0);boardnumdefines which board the new link accesses. In this example,boardnum is 0. Embedded IDE
Tar get PreferencesSetting CPU clock to the actual b oard rate allows the code yougenerate to run correctly according to the actual clock rate of theh
Targ et Preferences9-109
Tar get PreferencesGeneralNameProvide a name to identify your new processor. You can use a nyvalid C string value in this field. The name you enter in
Targ et PreferencesProcessor Family Processor Class StringDM64x and DM64xx 64xx where xx designates theprocessor, such as DM6433 orDM643.C55xx55xx whe
Tar get PreferencesProcessor Family Compiler Switch StringC62xxNoneC64xxNoneC67xxNoneDM64x and DM64xxNoneC55xx-mlC28xx, F28xx, R28xx, F28xxx-mlCode ge
Targ et PreferencesDefine internal memory banks (one or more memory banks)Parameters in this group configure the mem ory map for the newprocessor.Define
Tar get Preferencesaddressable data units (MADUs). For the C6000 p rocessor family,for example, the MADU is 8 bytes, one word.ContentsContents details
Targ et PreferencesDefine cache configurationOptionsEnter the label for each option of the selected cache configuration,one label on each line, such as
Tar get Preferencesblock changes, the kinds of information you store in listed sectionsmay change. Generally, the Contents list contains these strings
Targ et PreferencesCustom Code Entr yDescriptionInclude pathsIf you require additional header files onyour path, add them by typing the path intothe te
Getting Star ted with RTDX™% Go to processor directorycd(cc,processor_dir);cd(cc,tgt_dir); % Or cc.cd(tgt_dir)dir(cc); % Or cc.dirTo load the appropri
Tar get Preferences9-118
10Embedded IDE Link CCConfiguration Parameters
10 Embedded IDE Link™ CC Configuration ParametersEmbedded IDE Link CC PaneIn this section...“Embedded IDE Link C C Overview” on page 10-4“Export IDE l
Embedded IDE Link CC PaneIn this section...“System stack size (MAUs)” on p age 10-22“Build action” on page 10-23“Interrupt overrun notification method”
10 Embedded IDE Link™ CC Configuration ParametersEmbedded IDE LinkCCOverviewOptionsonthispane configu re the generated projects and code for TexasInstr
Embedded IDE Link CC PaneExport IDE link handle to base workspaceDirects the software to export theticcs object to your MATLAB workspace.SettingsDefau
10 Embedded IDE Link™ CC Configuration ParametersSee AlsoFor more informatio n, refer to “Embedded IDE Link CC Pane P arameters”on page 3-57.10-6
Embedded IDE Link CC PaneIDE link handle namespecifies the nameoftheticcs object that the build process creates.SettingsDefault: CCS_Obj• Enter any val
10 Embedded IDE Link™ CC Configuration ParametersProfile real-time executionenables real-time ex ecutio n profiling in the generated code by addinginst
Embedded IDE Link CC PaneApplicat ionSettingEfficiencyNo impactSafety precautionNo impactSee AlsoFor more informatio n, refer to “Embedded IDE Link CC
2 Automa tion InterfaceNotice where the demo files are stored on your machine. In ge ne ral,Embedded IDE Link CC software stores the demo project files
10 Embedded IDE Link™ CC Configuration ParametersProfile byDefines which execution profiling technique to use.SettingsDefault: TaskTaskProfiles model exe
Embedded IDE Link CC PaneFor more information about PIL, refer to “Using Processor in the L oop” onpage 4-3.For more information about en abling profil
10 Embedded IDE Link™ CC Configuration ParametersNumber of profiling samples to collectSpecifies the number of profiling samples to collect. Collection
Embedded IDE Link CC PaneSee AlsoFor more informatio n, refer to “Embedded IDE Link CC Pane P arameters”on page 3-57.10-13
10 Embedded IDE Link™ CC Configuration ParametersInline run-time library functionsMarks run-time library functions generated by the Signal Processing
Embedded IDE Link CC PaneRecommended SettingsApplicat ionSettingDebuggingOffTraceabilityOnEfficiency OnSafety precautionNo impactSee AlsoFor more infor
10 Embedded IDE Link™ CC Configuration ParametersProject optionsSets the proje ct options for building y our project from the model.SettingsDefault: C
Embedded IDE Link CC PaneValue: Custom | Debug | ReleaseDefault: CustomRecommended SettingsApplicat ionSettingDebuggingCustom or DebugTraceabilityCust
10 Embedded IDE Link™ CC Configuration ParametersCompiler optionsstringLets you enter a string of compiler options to define your project configura tion
Embedded IDE Link CC PaneApplicat ionSettingTraceabilityCustomEfficiencyNo impactSafety precautionNo impactSee AlsoFor more informatio n, refer to “Emb
Getting Star ted with RTDX™a string that does not identify an existing channel in the executable, theopen operation fails.In this tutorial, two channe
10 Embedded IDE Link™ CC Configuration ParametersLinker options stringEnables you to specify linker command options that determine how to linkyour pro
Embedded IDE Link CC PaneSee AlsoFor more informatio n, refer to “Embedded IDE Link CC Pane P arameters”on page 3-57.10-21
10 Embedded IDE Link™ CC Configuration ParametersSystem stack size(MAUs)Allocates memory for the system stack on the processor.SettingsDefault: 8192Mi
Embedded IDE Link CC PaneBuild actionDefines how Real-Time W orkshop software resp onds when you press Ctrl+Bto build your model.SettingsDefault: Build
10 Embedded IDE Link™ CC Configuration Parameters• Reset• Export IDE link han dle to base workspaceSelectingCreate_processor_in_the_loop_project remov
Embedded IDE Link CC PaneSee AlsoFor more informatio n, refer to “Embedded IDE Link CC Pane P arameters”on page 3-57.For more information about PIL, r
10 Embedded IDE Link™ CC Configuration ParametersInterrupt overrun notification methodSpecifies how your program responds to overrun conditions during
Embedded IDE Link CC PaneRecommended SettingsApplicat ionSettingDebuggingPrint_message or Call_custom_functionTraceabilityPrint_messageEfficiencyNoneSa
10 Embedded IDE Link™ CC Configuration ParametersInterrupt overrun notification functionSpecifies the name of a custom function your code runs when it
Embedded IDE Link CC PanePIL block actionSpecifies wh ether Real-Time Workshop software builds the PIL block anddownloads the block to the proc esso rS
2 Automa tion Interfacecc.rtdx.enable;You could do this step before you confi gure the channels — the order doesnot matter.6 Reset the global time-out
10 Embedded IDE Link™ CC Configuration Parameters• When you select None or Create_PIL_block, t he generated project willnot compile in the ID E. To us
Embedded IDE Link CC PaneMaximum time allowed to build project (s)Specifies how long, in seconds, the software waits for the project build processto re
10 Embedded IDE Link™ CC Configuration ParametersApplicat ionSettingEfficiencyNo impactSafety precautionNo impactSee AlsoFor more informatio n, refer t
Embedded IDE Link CC PaneMaximum time to complete IDE operations (s)specifies how long the so ftw are wa its for IDE function s, such asread orwrite,to
10 Embedded IDE Link™ CC Configuration ParametersSee AlsoFor more informatio n, refer to “Embedded IDE Link CC Pane P arameters”on page 3-57.10-34
Embedded IDE Link CC PaneSource file replacementSelects the diagnostic action to take if Embed d ed IDE Link CC softwaredetects conflicts that you are
10 Embedded IDE Link™ CC Configuration ParametersRecommended SettingsApplicat ionSettingDebuggingerrorTraceabilityerrorEfficiencywarningSafety precauti
ASupported HardwareThis appendix provides the details about the hardware, simulators, andsoftware that work with Embedded IDE Link CC.• “Supported Pla
A Supported HardwareSupported Platforms for Embedded IDE Link CCIn this section...“Supported Hardware and Simulators” on page A-2“Product Features Sup
Supported Platforms for Embedded IDE Link™ CCSupportedHardware Supported Simulators DescriptionC5000Simulators (C54x, C5x) Simulators for the C5000 DS
Getting Star ted with RTDX™Restarting the processor doe s not start the program executing. Y ou use runto start program execution.2 Type cc.run('
A Supported HardwareSupportedHardware Supported Simulators DescriptionOMAP5910Boards and simulators basedon the OMAP5910.TMS470TMS470R1xBoards and sim
Supported Platforms for Embedded IDE Link™ CCComponentUseDebug FunctionUse objects to create referenceconnections between CCS IDEand MATLAB . From the
A Supported HardwareProcessor Family Supporting Embedded IDE Link CC Components and SubcomponentsAutomation Inter face Compo nentProject GeneratorComp
Supported Platforms for Embedded IDE Link™ CCOMAP Coemulation SupportAn added featurefor O MAP processors is coemulation for the two proces sorsthat c
A Supported HardwareSupported Versions of Code Composer StudioThe following table lists versions of Embedded IDE Link CC and the versionsof Code Compo
Supported Versions of Code Composer StudioEmbedd edIDE Link CCVersionMATLABReleaseSupported Version of Code ComposerStudio1.3.2R14SP1 • CCS 2.2 for C2
A Supported HardwareA-10
BReported Limitations andTips
B Reported Limitations and TipsRepor ted Issues Using Embedded IDE Link CC SoftwareIn this section...“Demonstration Programs Do Not Run Properly Witho
Reported Issues Using Embedded IDE Link™ CC SoftwareThe latest issues in the list appear at the bottom. HIL refers to “hardw are intheloop,”alsocalled
2 Automa tion Interfaceand exit the program, or respond in s ome way. When you are writing orreading data to your processor in a script or M-file, chec
B Reported Limitations and TipsIssues Using USB-Based RTDX Emulators a nd theC6416 DSK and C6713 DSKYou may encounter a few problems when you try to u
Reported Issues Using Embedded IDE Link™ CC Software• Section 5.0 Some Basics on How it Works• Quick Start Installation Guide , “Debu g Hints an d Tro
B Reported Limitations and Tips• add(cc.type,'mytypedef','int')To access type without the error, reference the individual elements
Reported Issues Using Embedded IDE Link™ CC Software4.6255e+018Take care when you change the value of the represent property to float.Only change this
B Reported Limitations and Tipsfind the source code for debug. You can either find the source code to debug itor select the Don’t show this message agai
Reported Issues Using Embedded IDE Link™ CC SoftwareIf two fi les have the same name and are located in different directories,the file located in the di
B Reported Limitations and Tipscc = ticcsEmbedded IDE Link CC starts the CCS version you last used. If you last usedyour C5000 version, thecc object a
Reported Issues Using Embedded IDE Link™ CC SoftwareFour options let you decide how to respond to the failure:• Abort — Closes CCS and suspend s contr
B Reported Limitations and TipsCCS is not connected to a processor, you cannot use the object to performprocessor operations from MATLAB, such as load
Reported Issues Using Embedded IDE Link™ CC Software1.0000000e+020andresult2 = read(ptr1)returns1.000000020040877e+020The results appear to differ aft
Getting Star ted with RTDX™num_of_msgs should be zero. Using this process to check the amount ofdata can m ake your reads more reliable by letting you
B Reported Limitations and TipsUsing Mapped DrivesLimitations in Code Composer Studio do not allow you to load programs afteryou set your CCS working
IndexIndexAactivate 7-2add 7-4address 7-7address, read 7-114animate 7-9apiversion 2-52Archive_library 3-78asynchronous scheduling 3-12Bblock limitatio
Indexmanaging 2-58datatypemanager 7-28debug point, insert 7-62default build configuration 3-64default compiler options 3-64delete 7-43breakpoint 7-43so
IndexLlink propertiesabout 2-50 2-52apiversion 2-52boardnum 2-53ccsappexe 2-53numchannels 2-53page 2-54procnum 2-54quick reference table 2-50rtdx 2-55
IndexPpage 2-54PIL block 4-6PIL cosimulationdefinitions 4-4how cosimulation works 4-5overview 4-3PIL issues 4-6process, halt 7-57processorgeneral code
IndexSsave 7-145selecting boards 3-3set stack size 3-60set visibility 7-157solver option settings 3-48source code replacement 3-65stack size, set stac
2 Automa tion Interface234567891011Notice the ’int16’ represent o ption. When you read data from yourprocessor you need to tell MATL AB software the d
Getting Star ted with RTDX™To specify the number of messages to read and the data format in yourworkspace, you used thesiz and nummsgs options set to
Constructing ticcs Objects ... 2-46Example — Constructor for ticcs Objects... 2-46ticcs Properties and Property Valu
2 Automa tion Interface12 1713 18Because a 5-by-2 matrix requires ten elements, MATLAB software readsone message intooutdata to fill th e matrix.17 To
Getting Star ted with RTDX™15 16 14 18 1916 17 18 19 2017 18 19 20 2118 19 20 21 2219 20 21 22 2320 21 22 23 2421 22 23 24 2521 Recheck the number of
2 Automa tion InterfaceWe use four functions in this section; each has a purpose — the operationaldetails in the following list explain how and why we
Getting Star ted with RTDX™Your processor may already be stopped at this point. In a script, you mightput the function in anif-statement as we have d
2 Automa tion InterfaceThe following if statement checks the CCS IDE visibility and changesit if needed.if cc.isvisible,cc.visible(1);endVisibility ca
Getting Star ted with RTDX™Instruments processors. While the processor may change, the essentials ofthe p rocess remain the same.Listing the Functions
2 Automa tion Interfaceboardnum. On boards with more than one processor, usethis value to specify the processor on the board. Onboards with one proces
Getting Star ted with RTDX™PROFILE Return execution and stack profile reportREAD Return a block of data from the memory of the processorREGREAD Return
2 Automa tion InterfaceConstructing ticcs ObjectsWhen you create a connection to CCS IDE using the ticcs command, you arecreating a “ticcs object for
Constructing ticc s ObjectsRTDX channels : 0Inspecting the output reveals tw o objects listed—a CCS IDE object and anRTDX object. CCS IDE and RTDX obj
Setting Code Generation Parameters for TIProcessors... 3-48Setting Model Configuration Parameters... 3-51Ta
2 Automa tion Interfaceticcs Properties and Property Va luesObjects in Embedded IDE Link CC software have properties associated withthem. Each propert
Overloaded FunctionsforticcsObjectsOverloaded Functions for ticcs ObjectsSeveral functions in this Embedded IDE Link CC have the same name asfunctions
2 Automa tion Interfaceticcs Object PropertiesIn this section...“Quick Reference to ticcs Object Properties ” on page 2-50“Details About ticcs Object
ticcs Object PropertiesPropertyNameAppliesto WhichConnection?UserSettable? DescriptionapiversionCCS IDENoReports the versionnumber of your CCSAPI.boar
2 Automa tion InterfaceDetails About ticcs Object PropertiesTo use the links for CCS IDE and RTDX interface you set values for:•boardnum —specify the
ticcs Object PropertiesNote th at the API version is not the same as the CCS IDE version.boardnumProperty boardnum iden tifies the board referenced by
2 Automa tion Interfacerx=cc.rtdxRTDX channels : 0open(rx,'ichan','r','ochan','w');get(cc.rtdx)ans =numChannel
ticcs Object PropertiesrtdxProperty rtdx is a subclass of the ticcs link and represents the RTDX portionof a link for CCS IDE. As shown in the example
2 Automa tion InterfacertdxchannelProperty rtdxchannel,alongwithnumchannels and proctype,isaread-onlyproperty for the RTDX portion of a link for CCS I
ticcs Object Propertiesget(rx) % rx is an alias for cc.rtdx.ans =version: 1numChannels: 0Rtdx: [1x1 COM ]RtdxChannel: {'' [] ''}pr
Verification4What Is Verification?...4-2Using Processor intheLoop...4-3Processor-in-the-Loop Overview..
2 Automa tion InterfaceManaging Custom Data Types with the Data Type ManagerUsing custom data types, called typedefs (using the C keyword typedef), is
Managing Custom Data Ty pes with the Data Type Managerat the MATLAB command line opens the DTM, with the Data Type Managerdialog box shown here:When t
2 Automa tion Interfacewhen you pass the cc object to the DTM, and then add a typedef,thecommandcc.typereturns the list of data types in the type prop
Managing Custom Data Ty pes with the Data Type ManagerEach custom type definition added in the DTM becomes part o f the ticcsobject passed to the DTM i
2 Automa tion Interface• Typedefs that use pointers or typedefs in the type definitio nTo define custom data types that use structs, enums, or unions fr
Managing Custom Data Ty pes with the Data Type Manager2-63
2 Automa tion Interface4 Click Add typedef to add your first custom data type. The List of KnownData Types dialog box appears as shown.Add a MATLAB t y
Managing Custom Data Ty pes with the Data Type Manager6 Select an appropriate M ATLAB data type from the MATLAB Types inKnown Types.uint16 isthechoice
2 Automa tion Interface11 From the Struct, Enum, Union Types list, s ele ct the appropriateenumerated data type to use withtypedef_enum.Theenum_TAG_my
Managing Custom Data Ty pes with the Data Type ManagerAfter you close the dialog box, the Typedef name list in the Data TypeManager looks like this.To
Preventing Memory Corruption When You ExportCoefficients to Processor Memory... 5-15Allocating Sufficient or Extra M emory for FilterCoeffi
2 Automa tion InterfaceClicking Close in the DTM prompts you to save your session. Saving thesession creates an M-file that contains operations that cr
3Project Generator• “Introducing Project Generator” on page 3-2• “Project Generation and Boa rd Selection” on page 3-3• “About the CCSLinkLib Blockset
3 Project GeneratorIntroducing Project GeneratorProject generator provides the following features for de veloping p roje ct andgenerating code:• Suppo
Project G eneration and Board SelectionProject Generation and Board SelectionProject Generator uses ticcs objects to connect to the IDE. Each time you
3 Project GeneratorCCS Board Configuration State Response by SoftwareCode Compos er Studio has morethan one board configured. Theboard name specified in
About the CCSLinkLib BlocksetAbout the CCSLinkLib BlocksetEmbeddedIDELinkCCblocklibraryccslinklib comprises block librariesthat contain blocks designe
3 Project Generator• Memory Allocate block• Memory Copy blockBlocksfortheprocessorfamiliesare almost identical. The followingdescriptions about each b
About the CCSLinkLib BlocksetThe following figure shows the C280x/C28x3x DSP Chip Support library.The C281x D SP Chip Support library contains the bloc
3 Project GeneratorFor the C5000 processor family, the C5000 DSP C hip Support library appearsin the following figure.3-8
About the CCSLinkLib BlocksetThe C6000 DSP Chip Support library appear in the next figure.The Core Support library appears in the next figure.3-9
Komentarze do niniejszej Instrukcji