Home
DSP/BIOS TextConf User's Guide
Contents
1. The clockOscillator property of an object holds the value of the clock oscillator on the board in MHz This property is typically set only in the platform file In addition the plllndex property of the Board object is used when calculating the speed of the CPU Define clock oscillator value for CPU in MHz config board dsk5402 cpu cpu_0 clockOscillator 20 0000 The endian property contains big little or undefined to indicate the byte addressing model used by the board and CPU DSP BIOS TextConf Reference 2 15 Target Content Object Model Reference id Property mem Array Property name Property attrs cpuCore Property attrs cpuFamily Property attrs cpuNumber Property attrs cpuCoreRevision Property 2 16 The id property specifies a unique id for this particular CPU on the board This property is intended for future use The men array is used to access an array of Memory objects contained by this Cpu object For more information see Section 2 1 6 Memory Class page 2 25 The name property of an object holds the name of that object This property is gettable only It is set when the object is created Names of Cpu objects must be unique within the Board object that contains them The attrs cpuCore property contains the two digit Cpu platform followed by two zeros Currently it may be set to one of the following 2800 5400 5500 6200 6400 or 6700 This property is gettable
2. Fails if config contains a board config destroy So destroy the previously created board board destroy Succeeds if config is now empty and unreferenced config destroy Two ways to destroy a board named EVM62 boards EVM62 destroy boards EVM62 destroy boardFamily Property Example boardRevision Property config Property mem Array Property name Property plllndex Property Target Content Object Model Reference The boardFamily property contains a string that identifies the type of board Example strings are evm62 dsk54 and sim55 This property is gettable only It is set if the board_type argument to the config create method matches a constructor function and that constructor function sets the boardFamily property load platform dependent configuration info try utils importFile dss_ prog cpu board boardFamily catch e throw new Error e nDSS doesn t support the prog cpu board boardFamily board The boardRevision property contains an optionally defined string that identifies the board revision number Example strings are 1 0 and 2 1 This property is gettable only It is set if the board type argument to the config create method matches a constructor function and that constructor function sets the boardRevision property The config property holds the Config object that contains the Board Since the
3. create instance instances destroy references Properties See Page board Page 2 13 clockOscillator endian id men name attrs cpuCore attrs cpuFamily attrs couNumber attrs cpuCoreRevision attrs dataWordSize attrs minDataUnitSize attrs minProgUnitSize CPU Page 2 18 name prog build target model codeModel prog build target model dataModel prog build target model endian comment Page 2 25 name space base len language Page 2 27 name defined in CDB Page 2 28 name program defined in CDB Page 2 31 module name Note that the create and destroy methods act on different objects While the create methods create a child object for the specified object the destroy methods destroy the specified object itself DSP BIOS TextConf Reference 2 3 Target Content Object Model Reference 2 1 2 Config Class Table 2 2 Config Class Summary board Method Syntax Parameters Returns Description boards Method Syntax Parameters Returns Description 2 4 Object Type Contains Methods Properties Config Board board hasReportedError boards name create destroy warn The Config object is the top level container for an entire system configuration Each configuration has one and only one Config object The Config object has methods and properties for debugging error handling and host configuration memory management A default Config object and a global
4. CSL Module and Instance Property Names Table 2 58 C6000 HEDMA Pre Created Instance Names EDMA Channel0 DSPINT EDMA Channel1 TINTO EDMA Channel2 TINT1 EDMA Channel3 SDINT EDMA Channel4 EXTINT4 GPINT4 EDMA_Channel5_EXTINT5_GPINT5 EDMA_Channel6_EXTINT6_GPINT6 EDMA Channel7 EXTINT7 GPINT7 EDMA Channel8 TCC8 GPINTO EDMA Channel9 TCC9 GPINT1 EDMA Channel10 TCC10 GPINT2 EDMA Channel11 TCC11 GPINT3 EDMA Channel12 XEVTO EDMA Channel13 REVTO EDMA Channel14 XEVT1 EDMA Channel15 REVT1 EDMA Channel16 EDMA Channel17 XEVT2 EDMA Channel18 REVT2 EDMA Channel19 TINT2 EDMA Channel20 SDINTB EDMA Channel21 PCI EDMA Channel22 EDMA Channel23 EDMA Channel24 EDMA Channel25 EDMA Channel26 EDMA Channel27 EDMA Channel28 VCPREVT EDMA Channel29 VCPXEVT EDMA Channel30 TCPREVT EDMA Channel31 TCPXEVT EDMA Channel32 UREVT EDMA Channel33 EDMA Channel34 EDMA Channel35 EDMA Channel36 EDMA Channel37 EDMA Channel38 EDMA Channel39 EDMA Channel40 UXEVT EDMA Channel41 EDMA Channel42 DSP BIOS TextConf Reference 2 53 CSL Module and Instance Property Names Table 2 58 C6000 HEDMA Pre Created Instance Names EDMA Channel43 EDMA Channel44 EDMA Channel45 EDMA Channel46 EDMA Channel47 EDMA Channel48 GPINT8 EDMA Channel49 GPINT9 EDMA Channel50 GPINT10 EDMA Channel51 GPINT11 EDMA Channel52 GPINT12 EDMA Channel53 GPINT13 EDMA Channel54 GPINT14 EDMA Channel55 GPINT15 EDMA Channel56 EDMA Channel57 EDMA Channel58
5. name Property Target Content Object Model Reference warn true or false Previous warning setting true or false The warn method enables and disables warnings Warnings are disabled by default but can be enabled with the warn method or the w command line switch See Section 1 5 6 Error Handling page 1 27 for information about warnings errors and exceptions If you enable warnings you will notice that the Rhino interpreter provides a warning if the var keyword is omitted from a variable declaration You can ignore these messages Omitting the var keyword is permitted by the standard and is common practice in JavaScript In command line mode warnings are written to the stderr location In the interactive debugging shell warnings are shown as separate lines without the js gt command prompt In the GUI debugger warnings are shown in the JavaScript Console window config warn true The hasReportedError property contains a Boolean value that indicates whether any error or exception has occurred during the current session This property is gettable only It is initially set to false and becomes true if an error or exception occurs This property is never reset to false during a session Warnings do not affect the value of this property if config hasReportedError true print Error has occurred The name property of an object holds the name of that object This property is gettable only It is
6. run script with Template B utils loadPlatform template PI tconf utility add objects change properties more tconf prog gen filename We Utility Linker Configuration Configuration Configuration Configuration A A A CDB File de C Source Seely C Header Sen File Source Header cfg cmd Coone cfg s Catan cfg hittt generated or provided file edited file Use the procedures described in the following sections to write test and run DSP BIOS TextConf scripts If you have existing CDB files that you want to convert to scripts see Section 1 4 Migrating Applications to DSP BIOS TextConf page 1 15 utils getProgObjs pro g Using DSP BIOS TextConf for New Applications 1 3 1 Creating a Script for a New Application To write a DSP BIOS TextConf script from scratch follow these steps 1 5 Create a text file with an extension of tcf If you follow certain optional conventions when naming this file properties that define your board and CPU type are set automatically See Section 1 5 7 Configuration Coding Guidelines page 1 29 for details about these conventions Type the following line as the first statement in the file where Platform matches the name of a tcp file that defines objects for your hardware platform TCP scripts are provided with DSP BIOS TextConf for a number of common platforms You can create a custo
7. For example if the demo tcf file contains the prog gen demo statement the following line generates a demo cdb file and its associated generated files tconf demo tcf The tconf utility provides three operation modes 2 Command line mode If a script is listed on the command line tconf 3 processes the script without entering a debugging environment If the script uses the prog save or prog gen method configuration files are generated as a result of running the script This mode is used for automated program build processes The full command line syntax for this mode is tconf p lt dir gt Dname value js lt jsshell opts gt script args Interactive debugging shell If no script is listed on the command line tconf enters interactive mode and reads and executes statements you type at the js gt prompt It echoes the results of print statements and expressions to your terminal window tconf p lt dir gt Dname value js lt jsshell opts gt See Section 1 3 3 Using the Interactive Debugging Shell page 1 12 for information about using the interactive debugging shell 1 GUI debugger If the g option is used on the command line tconf opens the Rhino GUI debugger Rhino is an open source implementation of JavaScript written entirely in Java http www mozilla org rhino The full command line syntax for the GUI debugger is tconf g p lt dir gt Dname value js lt jsshell opts
8. prog load evm62 cdb module name name Name of Module object to get Required object or null if error occurs The module method returns the object specified by the name parameter If there is no object with the specified name in the Program object module returns null The get method can return any object in the namespace of the Program object for which it is called For example you can use the get method for a Program object to get any Module such as LOG or Instance object such as LOG_system In contrast the module method can return only Module objects For more information about namespaces see Section 1 5 3 3 Namespace Management page 1 22 modules Method Syntax Parameters Returns Description Example save Method Syntax Parameters Returns Description Example Target Content Object Model Reference modules none Array of all Module objects contained in the specified Program object The modules method gets an array of all the Module objects contained within the specified Program object list modules prog modules for i 0 i lt modules length i list modules i name save prog name prog name Optional name of output CDB file True if successful false if not successful The save method saves a CDB file that corresponds to the current object model settings In contrast to the gen method the save method saves only the
9. 1 30 Module object 2 28 CDB properties 1 20 module property Instance object 2 32 module method Program object 2 22 modules method Program object 2 23 multiple boards 1 8 creating objects 2 5 multiple CPUs 1 8 creating objects 2 9 multiple programs 1 8 creating objects 2 13 N name property Board object 2 11 Config object 2 7 Cpu object 2 16 Extern object 2 27 Memory object 2 26 Module object 2 30 Program object 2 24 names namespace 1 22 TCF file 1 29 TCI file 1 29 variables 1 17 Index 4 namespace 1 22 get Method 2 21 naming conventions files 1 29 1 36 properties 1 20 near model 2 24 number of CPU 2 16 Numeric data type 1 21 O object as return value or parameter 1 19 hierarchy 1 7 model initialization 1 36 object orientation 1 18 operation modes 1 12 1 40 order dependencies 1 15 order of objects in array 1 20 P Parameter RAM Table properties C6000 2 54 path 1 23 adding directory to 1 39 separators 1 24 PATH variable running cdbcmp 1 41 running tconf 1 39 platform file 1 8 platform specification 1 30 platform dependent scripts 1 30 platform independent scripts 1 30 PLL properties C54x 2 39 C55x 2 46 plllndex property Board object 2 11 pointers 1 17 portable scripts 1 30 porting 1 4 1 15 print method 1 13 1 27 Rhino GUI 1 14 Program object 2 18 defined by startup script 1 35 initializing 1 36 program method Cpu object 2 14 programs method Cpu obje
10. 20 0000 Define PLL index value used to compute speed of CPU config board dsk5402 pllIndex 2 1 5 11 JavaScript and Java References This document does not provide details on the syntax of the JavaScript language or on the Java packages that can be used For reference information we recommend the following sources 4 JavaScript The Definitive Guide 3rd Edition David Flanagan O Reilly 1998 4 ECMA 262 standard http www ecma ch ecma1 STAND ECMA 262 HTM 4 Rhino JavaScript interpreter http www mozilla org rhino L Java 2 SDK http ljava sun com j2se 1 3 docs 14 java io package http java sun com j2se 1 3 docs api java io package summary html Command Line Utility Reference 1 6 Command Line Utility Reference Syntax Options Description The following command line utilities manipulate DSP BIOS TextConf and CDB files These utilities are supported on UNIX and Windows 1 6 1 tconf Utility tconf g p lt dir gt Dname value js lt js options gt script args g Invoke the graphical script debugging interface p lt dir gt Add the specified directory to the search path used to Dname value script args h find files The search path looks first in the current directory then in the directory containing the tconf executable file and then in any directory named using the p option See Section 1 5 4 1 Environment Array Variables page 1 22 for information
11. EDMA Channel59 EDMA Channel60 EDMA Channel61 EDMA Channel62 EDMA Channel63 Table 2 59 C6000 Parameter RAM Table Entry Instance EdmaTable Description TextConf Name Type Allocate Parameter RAM Table edmaAllocPramTable Bool Allocate Table Number edmaTableNumber Numeric Enable Pre Initialization edmaEnablePrelnit Bool Pre Initialize with edmaPrelnit Reference Table 2 60 C6000 EMIF Configuration Instance EMIF Description TextConf Name Type Global Control Reg GBLCTL emifGblctl Numeric CEO Space Control Reg Cectl0 emifCectlO Numeric CE1 Space Control Reg Cectl1 emifCectl1 Numeric CE2 Space Control Reg Cectl2 emifCectl2 Numeric 2 54 CSL Module and Instance Property Names Table 2 60 C6000 EMIF Configuration Instance EMIF Continued Description TextConf Name Type CE3 Space Control Reg Cectl3 emifCectl3 Numeric SDRAM Control Reg SDCTL emifSdctl Numeric SDRAM Timing Reg SDTIM emifSdtim Numeric SDRAM Extended Reg SDEXT emifSdext Numeric Table 2 61 C6000 EMIF Resource Instance HEMIF Description TextConf Name Type Enable Pre Initialization emifEnablePrelnit Bool Pre Initialize with emifPrelnit Reference Table 2 62 C6000 EMIFA Configuration Instance EMIFA Description TextConf Name Type Global Control Reg GBLCTL emifaGbletl Numeric CEO Space Control Reg Cectl0 emifaCectlO Numeric CE1 Space Control Reg Cectl1 emifaCectl1 Numeric CE2 Space Control Reg Cectl2 emifaCe
12. WDTCR2 TextConf Name wdtimWdtcrAdv wdtimWdprdAdv wdtimWdtcr2Adv Table 2 50 C55x WDTIMER Resource Instance HWDTIM Description Enable Configuration of Watchdog Timer Pre initialize TextConf Name wdtimEnablePrelnit wdtimPrelnit 2 3 3 TMS320C6000 Properties Table 2 51 C6000 DMA Global Register Module GDMA Description Pre allocation Global Address Reload Register A Pre allocation Global Address Reload Register B Pre allocation Global Address Reload Register C Pre allocation Global Address Reload Register D Pre allocation Global Index Register A Pre allocation Global Index Register B Pre allocation Global Count Reload Register A Pre allocation Global Count Reload Register B TextConf Name DMA_PRE_ALLOC_GBLADDRA DMA_PRE_ALLOC_GBLADDRB DMA_PRE_ALLOC_GBLADDRC DMA_PRE_ALLOC_GBLADDRD DMA_PRE_ALLOC_GBLIDXA DMA_PRE_ALLOC_GBLIDXB DMA_PRE_ALLOC_GBLCNTA DMA_PRE_ALLOC_GBLCNTB Type Numeric Numeric Numeric Type Bool Reference Type Bool Bool Bool Bool Bool Bool Bool Bool DSP BIOS TextConf Reference 2 49 CSL Module and Instance Property Names Table 2 51 C6000 DMA Global Register Module GDMA Continued Description TextConf Name Type DMA Global Register ID Enable Pre Initialization Pre Initialize with DMA_HANDLE_NAME DMA_ENABLE_PRE_INIT DMA_PRE_INIT Table 2 52 C6000 DMA Global Register Instance GDMA Description TextConf Name dmaGbladdrAForm
13. order to provide a function label use an Extern object for external declaration in JavaScript All Extern objects within a Program object must have unique names Extern objects may be defined as asm C or C language symbols The default language is C For example the following statements create Extern objects for program functions or get the specified object if it already exists They assign the object to the specified property task0 fxn prog extern audioFxn C SYS ABORTFXN prog extern error 4 Int32 Long integer properties hold 32 bit unsigned integer values The value range accepted for a property may have additional limits 4 Numeric Numeric properties hold either 32 bit signed or unsigned values or decimal values as appropriate to the property When comparing non integer values use sufficient digits after the decimal point to match the actual value stored as a Numeric value For example if the value of myFloat is 3 456789 the following comparison would evaluate as false if myFloat 3 4568 FALSE Reference Properties that reference other objects contain an object reference For example properties that specify a MEM segment reference an Instance object contained by the MEM Module object The following statement gets a reference to a MEM Instance and assigns it to the SWI Object Memory property SWI OBUMEMSEG MEM instance EDATA 1 String String properties hold text str
14. 2 13 Target Content Object Model Reference Example destroy Method Syntax Parameters Returns Description Examples program Method 2 14 Syntax Parameters Returns Description The parameter is the name to give the new Program object The name must be unique among the Program objects for this Board and within the Program object s namespace This parameter is required The order of objects created within a container array is undefined You may use JavaScript s array sorting methods to get sorted lists of objects create a C54 Cpu object for the board utils importFile C54 config boards 0 create cpu 0 C54 create a Program object for the default Cpu config boards 0 cpus 0 create myApp create short cut for program config scripts var prog config boards 0 cpus 0 programs 0 destroy none true if successful false if failed The destroy method destroys the specified object This method fails and returns false if the object is either referenced by another object or contains objects Notice that while the create method creates an object one layer lower in the hierarchy than the object whose method is used the destroy method deletes the actual object whose method is used While you will probably not need to use the destroy method when writing configuration scripts from scratch the destroy method is often needed in scrip
15. 2 34 2 35 2 36 2 37 2 38 2 39 2 40 2 41 2 42 2 43 2 44 2 45 2 46 2 47 2 48 2 49 2 50 2 51 2 52 2 53 2 54 2 55 2 56 2 57 2 58 2 59 2 60 2 61 2 62 2 63 2 64 2 65 2 66 2 67 2 68 C55x HDMA Pre Created Instance Names rrrrnnnnvrrrrrrarnrnnnnnnnnnnnnnnnnnnnannvnnnnnnnnnenvnvnner 2 42 C55x EMIF Configuration Instance EMIF rvnrennvrrrnnnvrnvvrrnnnrrnnnrrnnrrrnrrnnnrennnrresrennnnn 2 42 C55x EMIF Resource Instance HEMIF rnnnnnnnnnnnnnnnnnnonnnnnovenenenvrrnrnrnrernnnnnnnnsnsnnnnnnenen 2 43 C55x HEMIF Pre Created Instance Names ccccesssseeseeeeeeeceeeeecceeeeeeseeessesesesaeaeaea 2 43 C55x GPIO Configuration Instance GPI1O mursnnnrrnnnnrnvrrrnnnennnrrennnensrrennerrnnsrrenssennnnn 2 44 C55x MCBSP Configuration Instance MCBSP murnnnnnrrvnnnennrrrnnnrennrrrnnrennrrrenrennnrnen 2 44 C55x MCBSP Resource Instance HMCBSP rrnnnnnnnnonnonnvnnnnnnnenenenrrrnrnnnnnnnnsnnnnnnnnener 2 45 C55x HMCBSP Pre Created Instance Names rrrnrnnnnnraverrrrrrrrnrernnnnennnnnnanannrnsnsnnnnnenr 2 45 C55x PLL Configuration Instance PLL nrannnnnnnrrrvnnnonnrrnnnrennrrrenrnrnnrrennrnnnrrressennnnnen 2 46 C55x PLL Resource Instance HPLL reroararannnnnnnnnnnnnnnnnnnnvenenenvnrnrnrernrnnnnnnnnsnsnsnsnnenen 2 46 C55x HPLL Pre Created Instance Names rrrnrnnnannnnanovenrrrnrerernnnnnnnnnnnnnnnnnnnnrnsnsnsnnnenr 2 46 C55x PWR Configuration Instance PWR resrnnrrr
16. 5 8 1 Specifying the Platform in the Script The most direct way to specify the execution platform is to explicitly create the hardware related objects within the configuration script itself For example one can use statements like the following hellocfg tcf example to create the Config Board and Cpu objects within a configuration script create platform specific objects utils loadPlatform Dsk6211 load platform independent software config utils importFile hello tci generate configuration files for the program prog gen To port this configuration to a new execution platform you would modify the board name literals that appear in this script More sophisticated DSP BIOS TextConf Overview 1 31 JavaScript Language Highlights 1 32 platforms such as multi processor platforms may require more extensive changes 1 5 8 2 Specifying the Platform on the Command Line While it is natural to expect to modify the configuration script when porting to alternative execution platforms as described in Section 1 5 8 1 Specifying the Platform in the Script page 1 31 it may be inconvenient if you change platforms frequently Suppose for example that you have more developers than physical boards To use a simulator as a alternative test platform you would need to create two configuration scripts or repeatedly edit the configuration script to move between the simulator and real hardware Creating two nearly
17. C54x 2 37 C55x 2 44 graphical configuration 1 2 GUI debugger 1 14 command line 1 40 guidelines coding 1 29 object model initialization 1 36 Index H hardware specification 1 30 hasReportedError property Config object 2 7 header files 1 9 hierarchy of objects 1 7 id property Cpu object 2 16 importFile method 1 25 importPath 1 23 include file 1 8 initializing the object model 1 36 Instance object 2 31 CDB properties 1 20 instance method Module object 2 29 instanceof operator 1 22 instances method Module object 2 29 Int16 data type 1 21 Int32 data type 1 21 interactive debugging shell 1 12 command line 1 40 J Java 1 18 documentation 1 38 Rhino written in 1 14 java io package 1 27 JavaScript 1 4 documentation 1 38 language issues 1 17 misconceptions 1 17 overview 1 17 Rhino interpreter 1 14 L large model 2 24 len property Memory object 2 26 linker command file 1 9 litte endian 2 15 2 24 LiveConnect 1 27 load method 1 13 1 24 Program object 2 22 Index 3 Index loadArch method 1 25 loadPlatform method 1 11 1 25 long integer 1 21 looping 1 5 loosely typed language 1 17 MCBSP properties C54x 2 37 2 38 C55x 2 44 2 45 C6000 2 57 Memory object 2 25 merging configurations 1 16 methods 1 18 Microsoft Windows configuration methods 1 2 migration 1 4 1 15 minDataUnitSize property Cpu object 2 17 minProgUnitSize property Cpu object 2 17 modularization 1 5
18. Line page 1 33 is preferable 1 5 9 Platform Specification and the Startup Script The platform specification methods listed in Table 1 1 are all supported by the sample tconflocal tci file provided with DSP BIOS TextConf That is the tconflocal tci file can initialize the TCOM hardware related objects if the platform is specified using any of these methods When the tconf utility starts it runs the tconfini tcf startup script prior to the first line of any configuration script This script performs necessary startup activities and should not be modified The script uses the JavaScript Language Highlights utils importFile function to search for a tconflocal tci file If a file with this name is found this script is also run The startup script runs whenever you start the tconf utility It runs in all three tconf operation modes command line interactive debugging and GUI debugging Note Effects of utils loadPlatform on Startup Actions The sample tconflocal tci script does not load the CDB template for the specified platform You can use the utils loadPlatform method to both initialize the TCOM object hierarchy and load the appropriate CDB template for the specified platform If you use the utils loadPlatform the objects created by the startup script are overwritten L 1 5 9 1 Startup Script Actions The tconfini tcf startup script performs the following actions 1 Loads the Target Content Object Model classes
19. Module class returns an Instance object Because of the potential for confusion this document refers to individual objects that are not of the Instance class as objects not as object instances or instances log LOG instance LOG system instances none Array of all objects contained within this object The instances method returns an array of all the Instance objects contained in the Module object whose method is used This allows scripts to loop through all the instances Note that while individual objects within any container object may be referred to as instances there is also a specific object class called Instance which is the child of the Module class Thus the instances method of the Module class returns an array of Instance objects Because of the potential for confusion this document refers to individual DSP BIOS TextConf Reference 2 29 Target Content Object Model Reference Example name Property Example program Property CDB Properties 2 30 Example objects that are not of the Instance class as objects not as object instances or instances loop through all MEM objects and remove any heaps var memObjs MEM instances for var i 0 i lt memObjs length i can t remove MEM NULL heap if memObjs i MEM NULL amp amp memObjs i createHeap 1 memObjs i createHeap 0 The name property of an object holds the name of th
20. Space Control Register 1 CE2 Space Control Register 2 CE2 Space Control Register 3 CE3 Space Control Register 1 CE3 Space Control Register 2 CE3 Space Control Register 3 SDRAM Control Register 1 SDRAM Period Register SDRAM Initialization Register SDRAM Control Register 2 emifCeOscr2 emifCeOscr3 emifCe1scr1 emifCe1scr2 emifCe1scr3 emifCe2scr1 emifCe2scr2 emifCe2scr3 emifCe3scr1 emifCe3scr2 emifCe3scr3 emifSdcr1 emifSdperiodAdv emifSdinitAdv emifSdcr2 Table 2 32 C55x EMIF Resource Instance HEMIF Description TextConf Name emifEnablePrelnit Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Type Bool Enable pre initialization Pre initialize emifPrelnit Table 2 33 C55x HEMIF Pre Created Instance Names hEMIFO DSP BIOS TextConf Reference Reference 2 43 CSL Module and Instance Property Names Table 2 34 C55x GPIO Configuration Instance GPIO Description Configure Non multiplexed GPIO Select IODIRO as 100 Select IODIR1 as 101 Select IODIR2 as 102 Select IODIR3 as 103 Select IODIR4 as 104 Select IODIR5 as 105 Select IODIR6 as 106 Select IODIR7 as 107 TextConf Name gpioConfigure gpioloOdir gpiolo1dir gpiolo2dir gpiolo3dir gpiolo4dir gpiolo5dir gpiolo6dir gpiolo7dir Table 2 35 55x MCBSP Configuration Instance MCBSP Description Set Manually TextConf Name
21. Syntax Parameters Returns Description Target Content Object Model Reference Cpu Class Summary 2 1 4 Cpu Class Object Type Contains Methods Properties Cpu Program create board Memory destroy clockOscillator program endian programs id men name attrs cpuCore attrs cpuFamily attrs cpuNumber attrs cpuCoreRevision attrs dataWordSize attrs minDataUnitSize attrs minProgUnitSize A Board object may contain one or more Cpu objects Cpu objects may contain one or more Program and one or more Memory objects Cpu objects have properties for storing information about the Cpu type and memory handling behavior Configurations for multi core DSPs should have a single Cpu object Configurations for boards with multiple DSPs should have multiple Cpu objects A default Cpu object is created by the startup script see Section 1 5 9 1 Startup Script Actions page 1 35 Additional Cpu objects can be created with the create method of a Board object create prog_name prog_name Required name for new Program object new Program object or null if error occurs The create method for a Cpu object creates a new Program object within the Cpu object The sample tconflocal tci script attempts to determine the program name and creates a single Program object See Section 1 5 9 1 Startup Script Actions page 1 35 for details You can use the create method to create additional Program objects DSP BIOS TextConf Reference
22. TMS320C55x TMS320C62x TMS320C64x TMS320C67x TMS320C5000 and TMS320C6000 MS DOS Windows and Windows NT are trademarks of Microsoft Corporation UNIX is a registered trademark of The Open Group in the United States and other countries Solaris and SunOS are trademarks or registered trademarks of Sun Microsystems Inc All other brand product names and service names are trademarks or registered trademarks of their respective companies or organizations The tconf command line utility uses the Rhino open source implementation of JavaScript This is available at http www mozilla org rhino The source code used by the tconf utility is available in the js jar Java archive included with the utility For licensing information about this JavaScript implementation please see http www mozilla org MPL 1 Contents DSP BIOS TextConf Overview nanannnrnrnne eee 1 1 This chapter compares the two methods for configuring DSP BIOS programs and provides details about using DSP BIOS TextConf 1 1 DSP BIOS Configuration Methods aavuuvvar arva r nr eae 1 2 1 2 An Overview of DSP BIOS TextConf aauauuuaanrnaa ee 1 6 1 3 Using DSP BIOS TextConf for New Applications 0 22200 nn 1 10 1 4 Migrating Applications to DSP BIOS TextConf 0 00 0 eee 1 15 1 5 JavaScript Language Highlights 0 0 0 cee eee 1 17 1 6 Command Line Utility Reference 0 0 0 ae 1 39 1 7 Example Scripts a
23. Timer Secondary Control Register TSCR Table 2 21 Description Open Handle to Timer Specify Handle Name Enable pre initialization Pre initialize C54x Timer Configuration Instance TIMER TextConf Name timerTer timerPrdAdv timerTscr C54x Timer Resource Instance HTIMER TextConf Name timerHandleEnable timerHandleName timerEnablePrelnit timerPrelnit DSP BIOS TextConf Reference Int16 EnumString Enumint EnumString Type Bool Reference Type Numeric Numeric Numeric Type Bool String Bool Reference 2 39 CSL Module and Instance Property Names Table 2 22 C54x HTIMER Pre Created Instance Names TimerO Timer1 Table 2 23 C54x WDTIMER Configuration Instance WDTIM Description TextConf Name Timer Control Register wdtimerTcr Timer Period Register wdtimerPrdAdv Timer Secondary Control Register TSCR wdtimerTscr Table 2 24 C54x WDTIMER Resource Instance HWDTIM Description TextConf Name Enable Configuration of Watchdog Timer wdtimerHandleEnable Pre initialize wdtimerPrelnit Table 2 25 C54x HWDTIM Pre Created Instance Names WDTimO 2 3 2 TMS320C55x Properties Table 2 26 C55x CHIP Configuration Instance CHIP Description TextConf Name Parallel Port Mode chipXbsrPPMode Serial Port1 Mode chipXbsrSp1Mode Serial Port 2 Mode chipXbsrSp2Mode 2 40 Type Numeric Numeric Numeric Type Bool Reference Type EnumString EnumString EnumS
24. a CDB file was loaded create instance_name instance_name Required name for new Instance object new Instance object or null if error occurs The create method for a Module creates a new Instance object within the Module object The parameter is the name to give the new Instance object The name must be unique among the Module Instance and Extern objects for this program This parameter is required The order of objects created within a container array is undefined You may use JavaScript s array sorting methods to get sorted lists of objects Examples instance Method Syntax Parameters Returns Description Example instances Method Syntax Parameters Returns Description Target Content Object Model Reference inputPipe PIP create input inputPipe notifyWriterFxn prog extern writerFxn inputPipe notifyWriterArg0O 0 inputPipe bufAlign 32 traceLog LOG create trace trace buflen 32 instance name name Name of object to get Required object or null if error occurs The instance method returns the Instance object specified by the name parameter If there is no object with the specified name in the Module instance returns null Note that while individual objects within any container object may be referred to as instances there is also a specific object class called Instance which is the child of the Module class Thus the instance method of the
25. about how the search path is used Define variables that can be examined in the script via the global environment array You can define multiple variables by using the D option multiple times See Section 1 5 4 1 Environment Array Variables page 1 22 for details about the environment array Separate run time options from JavaScript shell options JavaScript shell options include W Enable warning reporting f file Run script in the specified file Specify a script to run Specify arguments to pass to the script via the global arguments array See Section 1 5 4 2 Argument Array Variables page 1 24 for details about the arguments array Display command line syntax tconf is a JavaScript execution utility It can be used both for debugging and to output a CDB file and configuration files used to build applications On Solaris the tconf file is in lt ccs_base_dir gt bin utilities tconf On Windows tconf exe is in lt ccs_base_dir gt bin utilities tconf You may want to add this directory to your PATH variable so that you can run tconf without specifying the full path to the utility each time DSP BIOS TextConf Overview 1 39 Command Line Utility Reference For example if the script or statement calls prog gen myApp tconf outputs a CDB file that corresponds to the script file or statements It also generates the configuration files normally generated when you save a CDB file in the DSP BIOS Configuration Tool
26. all other platforms the default is near This property is set automatically if you use the utils loadPlatform method To set this property to far you may use the following D option on the tconf command line tconf Dconfig compilerOpts mf GBL CALLMODEL prog build target model codeModel The prog build target model dataModel property contains small or large to indicate the data addressing model used by the program The default is small on all platforms This property is set automatically if you use the utils loadPlatform method To set this property to large you may use the following D option on the tconf command line tconf Dconfig compilerOpts ml GBL MEMORYMODEL prog build target model dataModel The prog build target model endian property contains little or big to indicate the byte addressing model used by the program The default is little on all platforms This property is set automatically if you use the utils loadPlatform method To set this property to big you may use the following D option on the tconf command line tconf Dconfig compilerOpts me GBL ENDIANMODE prog build target model endian Target Content Object Model Reference 2 1 6 Memory Class Table 2 6 Memory Class Summary base Property comment Property Object Type Contains Methods Properties Memory NONE base comment len name space A Board or Cpu object may contain one or more Memory o
27. and constructors 2 Defines a special load function used to load scripts from within the tconfini tcf file 3 Loads the utils tcf file which contains a package of utility functions 4 Loads the tconflocal tci file if it exists on the search path This file may be customized to define the specific Config Board Cpu and Program objects needed by your application 5 Ifitdoes not find a tconflocal tci file tconfini tcf defines Config Board Cpu and Program objects with the names config 0 board 0 cpu 0 and prog 0 A sample version of the tconflocal tci file is provided in the include subdirectory of the directory containing the tconf executable file This file performs the following actions You can customize this file to meet your needs 1 Defines a Config object called config_0 and defines the global variable config to reference this object 2 Attempts to determine the board type using the optional convention described in Section 1 5 9 2 Optional Conventions for Initializing the Object Model page 1 36 and creates a Board object of that type If it cannot determine the type it creates a generic Board object In either case the Board object is called board 0 DSP BIOS TextConf Overview 1 35 JavaScript Language Highlights 1 36 3 Attempts to determine the CPU type and creates a Cpu object of that type If it cannot determine the type it creates a generic Cpu object In either case
28. be used on either platform without modification 1 5 8 4 Specifying the Platform in the Script File Name The technique of specifying the platform with a command line parameter works well when all programs can run on the full set of platforms If however you maintain a collection of programs that can each be executed on different a subset of platforms it is natural to create scripts with names that include both the program name and the platform name This makes it easy to identify which configuration files relate to a specific platform and identify which platform can execute each generated program More importantly it also provides a simple way to specify which combinations of program and platform are valid The sample tconflocal tci startup file examines the name of the configuration script If it is of the form program_platformcfg tcf where the program name is program and the execution platform is specified as platform Thus the following tconf command lines generate the files necessary for the Dsk6211 and the C62x simulator platforms tconf hello dsk621lcfg tcf DSP BIOS TextConf Overview 1 33 JavaScript Language Highlights 1 34 tconf hello sim62xxcfg tcf Note that as with the command line method of determining the platform the configuration script does not need any hardware specific settings To port to a new platform you simply copy hellocfg tcf to an appropriately named file such as hello_sim62xx tcf Note Ef
29. identical scripts results in a code maintenance problem one must ensure that changes to one file are duplicated in the other To avoid this problem you need to parameterize the configuration script to support either platform This allows all developers to use the same script The tconf utility allows you to specify the platform on the command line by defining the config platform environment variable This variable is available to the script executed in the environment array For example to make the script in the previous section platform independent the configuration script can be re written as follows utils loadPlatform environment config platform utils importFile hello tci prog gen Then the following command line would generate the configuration for the hello example for the Dsk6211 platform tconf Dconfig platform Dsk6211 hellocfg tcf Because the hellocfg tcf file no longer contains any hardware specific information you only need to change the tconf command line to port the example to an alternative platform This method makes it easy for multiple developers to use common sources to build for different platforms This method also works well when a large number of programs need to run on a single platform For example suppose a regression test suite consists of a large number of programs that need to be re targeted to a single execution platform If the build system for this test suite is parameterized to pas
30. minDataUnitSize is two 8 bit units On C6000 platforms the attrs minDataUnitSize is one 8 bit unit This property is gettable only It is set if the cpu type argument to the Board object s create method matches a constructor function and that constructor function sets the attrs minDataUnitSize property The attrs minProgUnitSize property contains the size of the smallest addressable program value in 8 bit units On C54x platforms the attrs minProgUnitSize is two 8 bit units On C55x platforms the attrs minProgUnitSize is one 8 bit unit On C6000 platforms the attrs minProgUnitSize is one 8 bit unit This property is gettable only It is set if the cpu type argument to the Board object s create method matches a constructor function and that constructor function sets the attrs minProgUnitSize property DSP BIOS TextConf Reference 2 17 Target Content Object Model Reference Table 2 5 2 1 5 Program Class Program Class Summary create Method 2 18 Description Object Type Contains Methods Properties Program Module extern CPU Extern externs name destroy prog build target model codeModel gen prog build target model dataModel get prog build target model endian load module modules save A Cpu object may contain one or more Program objects Program objects may contain one or more Module objects Program objects may also contain an array of Extern external declaration objects Program ob
31. only It is set if the cpu_type argument to the Board object s create method matches a constructor function and that constructor function sets the attrs cpuCore property The attrs cpuFamily property contains the single digit prefix for the Cpu platform followed by three zeros Currently it may be set to 2000 5000 or 6000 This property is gettable only It is set if the cpu_type argument to the Board object s create method matches a constructor function and that constructor function sets the attrs cpuFamily property The attrs couNumber property contains the full four digit number for the Cpu platform The attrs couNumber is the cpu core number it identifies the core and a set of peripherals Example values are 5416 6201 and 6711 Together the attrs couNumber and attrs couCoreRevision uniquely identify a specific part number This property is gettable only It is set if the cpu_type argument to the Board object s create method matches a constructor function and that constructor function sets the attrs couNumber property The attrs cpuCoreRevision property contains an optional revision number of a particular Cpu part Example values are 1 0 2 1 and R2 Together the attrs cpuNumber and attrs cpuCoreRevision uniquely identify a specific part number This property is gettable only It is set if the cpu_type argument to the Board object s create method matches a constructor function and that constructor function sets the att
32. properties 1 19 assembly header file assembly source file B base property Memory object 2 25 big endian 2 15 2 24 Board object 2 8 defined by startup script 1 35 initializing 1 36 board property Cpu object 2 15 board method Config object 2 4 boardFamily property Board object 2 11 boardRevision property Board object 2 11 boards method Config object 2 4 Boolean values 1 20 bracket notation 1 18 branching 1 5 build mechanisms 1 31 C C header file 1 9 C source file 1 9 C54x properties for CSL 2 35 C55x properties for CSL 2 40 1 9 1 9 Index C6000 properties for CSL 2 49 catch keyword 1 29 catching exceptions 1 29 CDB file 1 3 1 8 comparing 1 41 generating project files 1 41 2 20 loading 1 25 2 22 migrating to TCF 1 15 saving 2 23 size 1 6 CDB properties Instance object 2 33 Module object 2 30 cdbcmp utility 1 15 1 41 CHIP properties C55x 2 40 Chip Support Library properties 2 34 clkmode pins 2 11 clockOscillator property Cpu object 2 15 CMD file 1 9 code size minimizing 1 43 codeModel property Program object 2 24 command line mode 1 40 command line utilities 1 9 1 39 comment property Memory object 2 25 comparing configurations 1 16 comparison on floats 1 21 compilerOpts 1 23 2 24 Config object 2 4 defined by startup script 1 35 config property Board object 2 11 config rootDir variable 1 23 config scriptName variable 1 23 config tiRoot variable 1 23 configur
33. sate ser ae e eh Se fi ea sen be ee ee n 1 43 DSP BIOS TextConf Reference 2 0 cece eee eee eee eee eee 2 1 This chapter provides reference information about the Target Content Object Model 2 1 Target Content Object Model Reference 00 0 c cece eee 2 2 2 2 DSP BIOS Module and Instance Property Names 0000 eee eee eee 2 34 2 3 CSL Module and Instance Property Names 0 0 c eee eee eee 2 34 1 1 1 2 1 3 1 4 1 5 1 6 2 1 vi DSP BIOS Configuration Methods rxrnrnnnnnnvvrnnnnnnvvrnnnnnrsnvrnnnnnernnrnnnnesnnrnsnssennnrressrennnnnne 1 3 Target Content Object Model TCOM rrnnnrannnrrnnnnennrrrrnnnrnnnrrnnnvennrrrnnnennnrrensrensrrnnnseenenn 1 7 File Flow for DSP BIOS TextConf rrrrnnnnannrrnnnnennrrrnnnnennrrennrennrrrensnnnnrnnnsrrnnrrressennnnnene 1 10 File Flow for DSP BIOS TextConf Debugging rrrrrrrrnrrannrrvnnnrnnrrrvnnrennrrrnnrennrrrenrennnnnen 1 12 Rhino GUI Debugger Window rnnnnnnnnvvvnnnonnrrvnnrennrrrennrennrrennnennrrrenseennrnenssennrrnessennnnnen 1 14 File Flow for cdbcmp UHI mearrrr iora T 1 15 Target Content Object Model TCOM rrnnnrannnrrnnnnonnrrrrnnnennnrrnnnrennrrrnnsennnrrnnsernnrrnnnsnenenn 2 2 Tables 1 1 Comparison of Portable Configuration Methods rrrrnnrnnnrrnnrnvnnrrnnnnennnrrnnnvennrrnnnsennnnn 1 31 2 1 Target Content Object Model Summary rurnnnnvvnnnnnnnrrrnnnnnnnrrnnnnennrrrennennnrrenssrnnrrressrnnnnne 2 2 2 2 Contig
34. that constitutes a complete expression complete statement or complete statement block the debugging shell displays the result on the next line For example a portion of a debugging session might look like the following In this example the target platform is the DSK6211 tconf js gt utils loadPlatform Dsk6211 js gt board 0 config boards 0 object Board board 0 js gt board 0 cpus 0 attrs cpuCore 6200 js gt prog instanceof Program true You can also print the value of an expression using the print method js gt textvar hello world js gt print textvar To load the contents of a script file into the JavaScript environment use a command like the following load filename tci Any statements in the loaded file that are not contained within a function run when the file is loaded Functions in the loaded file become available for execution by other statements To exit from the interactive shell type quit or press CTRL C The quit command cannot be executed in a DSP BIOS TextConf script it is only available in the interactive shell The keywords quit and exit are reserved for future use in DSP BIOS TextConf DSP BIOS TextConf Overview 1 13 Using DSP BIOS TextConf for New Applications 1 3 4 Using the GUI Debugger Rhino is an open source implementation of JavaScript written entirely in Java http Awww mozilla org rhino It is installed on your workstation or PC along with the DSP
35. the Cpu object is called cpu 0 Attempts to determine the program name using the optional convention described in Section 1 5 9 2 Optional Conventions for Initializing the Object Model page 1 36 and creates a Program object with the program name If it cannot determine the name it creates a generic Program object called prog 0 It also sets program properties based on the properties of the Cpu object 1 5 9 2 Optional Conventions for Initializing the Object Model If you follow the optional conventions described in this section when naming your main tcf script file and using the tconf command line properties that define your board and CPU are set automatically These optional conventions simplify property definition if your application contains a single board single CPU and single program They facilitate easy application migration to another board and CPU Board type You may use a D option similar to the following on the tconf command to specify the board type tconf Dconfig platform Dsk6211 hellocfg tcf If you do not use the D option to define config platform you can give your main script file a name with the following form where board is the board type and program matches the target executable filename created by Code Composer Studio directory program boardcfg tcf For example the following command line specifies a DSK62 board tconf demo_dsk 2cfg tcf The following board types are supported for this con
36. the object is either referenced by another object or contains objects Notice that while the create method creates an object one layer lower in the hierarchy than the object whose method is used the destroy method deletes the actual object whose method is used While you will probably not need to use the destroy method when writing configuration scripts from scratch the destroy method is often needed in scripts created by the cdbcmp utility to compare two configuration files extern name language name Name of Extern object to create or get Required language Optional language for which to declare this symbol Extern object created or specified In order to specify a function name as the value of a Module or Instance property you must create an Extern object for external declaration All Extern objects within a Program object must have unique names If no Extern object exists with the specified name the extern method creates and returns a new Extern object If an Extern object already exists with the specified name the extern method returns the object The optional language parameter allows you to specify whether the symbol should be defined as an asm C or C symbol If no language is specified the default is C You do not need to use an underscore prefix for the names of any Extern objects you create myTask fxn prog extern myTaskFxn C mySwi fxn prog extern mySwiFxn asm SYS ABORTF
37. variable called config are automatically created by the startup script Should you ever need to create a Config object explicitly use a statement similar to the following create global context for configuration scripts var config new Config config 0 board name name Name of object to get Required object or null if error occurs The board method returns the Board object specified by the name parameter If there is no Board object with the specified name board returns null boards none Array of all Board objects contained in the Config object The boards method gets an array of all the Boards contained within the Config object Example create Method Syntax Parameters Returns Description Target Content Object Model Reference get an array of all boards in config boards config boards print a list of the names of all boards in config for i 0 i lt boards length i print board i board i name create board name board_type board name Required name for new Board object board_type Optional sub type of board new Board object or null if error occurs The config create method creates a new Board object within the Config object The sample tconflocal tci script attempts to determine the board type and creates a single Board object called board_0 See Section 1 5 9 1 Startup Script Actions page 1 35 for details You
38. 20 The order of objects created within a container array is undefined You may use JavaScript s array sorting methods such as join sort and reverse to sort lists of objects For example this statement sets a variable to an array of Instance objects with their names in ASCII order alphatasks TSK instances sort 1 5 3 1 Module and Instance Property Names Normally all objects in a class have the same set of properties However each type of Module and Instance object has a different set of properties Therefore DSP BIOS TextConf handles the properties of Module and Instance objects differently than those of other object classes In the DSP BIOS Configuration Tool the Property dialogs display these properties Each field in these dialogs is mapped to a property name for use in DSP BIOS TextConf scripts The names are listed in Section 2 2 DSP BIOS Module and Instance Property Names page 2 34 You can set and get these property values as you would with properties of other object classes For example the following statement sets the size of the LOG_system buffer The following examples assume the utils getProgObjs method was used to create global variables for all Module and Instance objects LOG system bufLen 16 In general property names of Module objects are in all uppercase letters For example MEM STACKSIZE Property names of Instance objects begin with a lowercase word Subsequent words have their first
39. 262 HTM The basic syntax and semantics of the language are stable and standardized 11 When you use JavaScript in a web page the objects you use are defined by the Document Object Model DOM These objects DSP BIOS TextConf Overview 1 17 JavaScript Language Highlights include window document form and image The DOM is not part of the JavaScript standard nor is the DOM part of DSP BIOS TextConf 4 Other object models can be defined for use with JavaScript Instead of the DOM DSP BIOS provides the Target Content Object Model TCOM with object classes that include Board Cpu and Module 1 JavaScript is not a part of Java These are two different languages that have similar names for historical marketing reasons However DSP BIOS TextConf does allow scripts to call Java functions to provide file services JavaScript itself does not provide file services for security reasons on web browsers 1 DSP BIOS runs JavaScript only on the host PC or UNIX machine JavaScript code is never run on the target DSP 1 5 3 Objects and Properties in JavaScript JavaScript is object oriented The object model is separate from the JavaScript language but object handling syntax is part of the language Objects have properties to define their characteristics Such properties are actually variables local to the object You access properties using the dot notation For example use config hasReportedError to refer to the hasReportedError pro
40. 54x MCBSP Configuration Instance MCBSP Description Serial Port Control Register 1 Serial Port Control Register 2 Receive Control Register 1 Receive Control Register 2 Transmit Control Register 1 Transmit Control Register 2 Sample Rate Generator Register 1 Sample Rate Generator Register 2 Multichannel Control Register 1 Multichannel Control Register 2 Pin Control Register Receive Channel Enable Register Partition A Receive Channel Enable Register Partition B Receive Channel Enable Register Partition C Receive Channel Enable Register Partition D Receive Channel Enable Register Partition E Receive Channel Enable Register Partition F Receive Channel Enable Register Partition G TextConf Name mcbspSpcr1 mcbspSpcr2 mcbspRer1 mcbspRer2 mcbspXcr1 mcbspXcr2 mcbspSrgr1 mcbspSrgr2 mcbspMcr1 mcbspMcr2 mcbspPcr mcbspRceraAdv mcbspRcerbAdv mcbspRcercAdv mcbspRcerdAdv mcbspRcereAdv mcbspRcerfAdv mcbspRcergAdv DSP BIOS TextConf Reference Type EnumString EnumString EnumString EnumString Type Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric 2 37 CSL Module and Instance Property Names Table 2 14 C54x MCBSP Configuration Instance MCBSP Continued Description TextConf Name Type Receive Channel Enable Register Partition H mcbspRcerhAdv Numeric Transmit Channel Enable Register Partition A m
41. BIOS TextConf software Then you can enter the Rhino debugger using the following command tconf g In the Rhino environment you can use File gt Run to run a script file Output from the print statement is displayed in the JavaScript Console window You can Step Into and Step Over script functions This debugger also allows you to watch variables evaluate arbitrary expressions and view the current context for the this variable and local variables Figure 1 5 Rhino GUI Debugger Window E Rhino JavaScript Debugger ioj Xx File Edit Debug Window demo_ewn62cfg tcf configuration files necessary to b for the EVM62 platform Revision History printiprog loading CDB file utils loadSeed ewm62 cdb 14 gt gt print prog loaded SWI instances object Instance KNL swi object I mstance PRD sui function C62 name SWI instance PRD swi priority function C6201 na 5 2 object Module CLK Thread Thread main 5 main Migrating Applications to DSP BIOS TextConf 1 4 Migrating Applications to DSP BIOS TextConf If you have existing CDB files that you want to convert to scripts use the procedures in this section Use the procedures described in Section 1 3 Using DSP BIOS TextConf for New Applications page 1 10 to write test and run DSP BIOS TextConf scripts 1 4 1 Creating a DSP BIOS TextConf Script from a CDB File If you have an existing CDB file you can convert t
42. CDB file It does not generate the other associated files Itis generally recommended but not required that the prog name match the output filename of your target program For example if your target program executable is hello exe use the following statement prog save hello If you omit the prog name parameter the default prog name is the name of the Program object If you specify a prog name parameter the CDB file uses that filename Including the CDB file extension in the prog name parameter is optional The save method stores the CDB file in your current directory prog save myAppl DSP BIOS TextConf Reference 2 23 Target Content Object Model Reference cpu Property Example name Property codeModel Property Example dataModel Property Example endian Property Example 2 24 The cpu property holds the Cpu object that contains the Program object This property is gettable only Itis set when the Program object is created if prog cpu attrs cpuFamily 5000 C5000 specific statements The name property of an object holds the name of that object This property is gettable only It is set when the object is created Names of Program objects must be unique within the Cpu object that contains them The prog build target model codeModel property contains near or far to indicate the code addressing model used by the program On C6000 platforms the value is always far On
43. Class Summary Lav kent ms aka festa TEE AEAT 2 4 2 3 Board Glass Summary eetere stira inie kand eide nedre dedii a reia dekade 2 8 2 4 Cpu Class Summary r a E E ban dream updated 2 13 2 5 Program Class Summary ieren na a EAT E E A GR 2 18 2 6 Memory Class SUmMMAY aerar e A A N IE R A 2 25 2 7 Extern Class SUMITA sicaire inas atiera iiaia ia ART EN ATEETAN RaR 2 27 2 8 Module Class Summary rennnnonnrrrnnnennnrrnnnrnrnnrrrenrnennrrnnnrennrrresssennrrenssennrnsessennnrreesesnnnnne 2 28 2 9 Instance Class Summary errnnnnrrrnnnennnrrnnnrennrrrnnrennnrrennernnrrrnssennnranssnennrnneserennnrneessennnnne 2 31 2 10 C54x DMA Configuration Instance DMA rerverennnvrrnnnnnrnvrrnnnnnrnnrrnnnrernrnrenrennnrrersrennnnnn 2 35 2 11 C54x DMA Resource Instance HDMA nrvrnnnennnvrnnnnnrnnrrrnnnnennrrennrennrrrrsrennnrrenerennnnne 2 36 2 12 C54x HDMA Pre Created Instance Names rwrsrnnrnnnnnnvnvrnnnnnvrnvrnnnnrnnnrnnenrennrrensrrnnnnnr 2 36 2 13 C54x GPIO Configuration Instance GPIO urannnrrnnnnannrrnnnrennnrrenrnennrrennrennnnrrenerennrnen 2 37 2 14 C54x MCBSP Configuration Instance MCBSP rarararvrnnnennrnvrrnnnnennrrrenrennnrrensrrnnnnne 2 37 2 15 C54x MCBSP Resource Instance HMCBSP rnrnnnnnonnrrnnnnennnrrnnrnennrrrrnnrennnrresrnennrnnn 2 38 2 16 C54x HMCBSP Pre Created Instance Names rrrnnnnannrrnnnnonnnrrnnnnnnnnrrrnnnrnnnrrenrnrnnrnnn 2 38 2 17 C54x PLL Configuration Instance PLL rrornnnnnnnv
44. Command Line Utilities The following command line utilities are used with DSP BIOS TextConf For details about the command line syntax for these utilities see Section 1 6 Command Line Utility Reference page 1 39 1 tconf Runs DSP BIOS TextConf scripts in one of three execution modes 4 cdbcmp Compares one CDB file to the CDB template used to create it or compares two CDB files Generates a DSP BIOS TextConf script as output 4 gconfgen Generates source header and linker command files from a CDB file On Solaris the tconf and cdbcmp utilities are installed in the lt ccs_base_dir gt bin utilities tconf directory On Windows they are installed in the lt ccs_base_dir gt bin utilities tconf folder You may want to add this folder to your PATH variable so that you can run command line utilities without specifying the full path to the utility each time The gconfgen utility is installed in lt ccs_base_dir gt plugins bios on Solaris and in lt ccs_base_dir gt plugins bios on Windows DSP BIOS TextConf Overview 1 9 Using DSP BIOS TextConf for New Applications 1 3 Using DSP BIOS TextConf for New Applications As the following diagram shows typical DSP BIOS TextConf scripts begin by loading a CDB template contain statements that add objects and change properties and then generate files to be used in building the application Figure 1 3 File Flow for DSP BIOS TextConf Text Editor CDB DSP BIOS TextConf Script
45. DSP BIOS TextConf User s Guide Literature Number SPRU007C November 2002 9 TEXAS INSTRUMENTS IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries Tl reserve the right to make corrections modifications enhancements improvements and other changes to its products and services at any time and to discontinue any product or service without notice Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete All products are sold subject to TI s terms and conditions of sale supplied at the time of order acknowledgment TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI s standard warranty Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty Except where mandated by government requirements testing of all parameters of each product is not necessarily performed TI assumes no liability for applications assistance or customer product design Customers are responsible for their products and applications using TI components To minimize the risks associated with customer products and applications customers should provide adequate design and operating safeguards TI does not warrant or represent that any license either express or implied is granted under any TI patent right copyright mask work right or other TI i
46. IOS TextConf generate a CDB Configuration Data Base file and source header and linker command files The generated files in these processes are shown in gray See Section 1 2 3 Configuration File Types page 1 8 for a description of these generated files DSP BIOS Configuration Methods eee fA System Instrumentation save file CDB Template gt Scheduling Synchronization Input Output Chip Support Library BABE EE run script Text Editor with tconf CDB DSP BIOS TextConf Script utility gt prog load CDB template Template add objects change properties MOre CDB File prog gen filename Configuration Configuration Assembly Assembly Source Header cfg s cfg h Configuration Configuration C Header C Source cfg h cfg c c Both configuration methods use the same CDB template files DSP BIOS TextConf scripts are typically very short because they define only the differences between the template objects and the objects used by the application In contrast CDB files define every object and property even those defined in the template Both configuration methods allow you to set properties for both DSP BIOS and Chip Support Library CSL modules For information about DSP BIOS module properties see the TMS320 DSP BIOS API Reference Guide for your platform For information about CSL module properties see the appropriat
47. Pre Initialize with tcpPrelnit Table 2 74 C6000 TIMER Configuration Instance TIMER Description TextConf Name Control Register CTL timerCtlAdv Period Register PRD timerPrdAdv Counter Register CNT timerCntAdv Table 2 75 C6000 TIMER Resource Instance HTIMER Description TextConf Name Open Timer Device timerHandleEnable Handle timerHandleName Enable Pre Initialization timerEnablePrelnit Pre Initialize with timerPrelnit Table 2 76 C6000 HTIMER Pre Created Instance Names Timer DeviceO Timer Device1 Timer Device2 Type Bool Reference EnumString Bool Bool Reference Type Numeric Numeric Numeric Type Bool String Bool Reference DSP BIOS TextConf Reference 2 59 CSL Module and Instance Property Names Table 2 77 C6000 VCP Base Parameters VCPBP Description TextConf Name Type Code Rate vcpBaseParamRate EnumString Constraints Length vcpBaseParamConstrLen EnumString Frame length F vcpBaseParamFrameLen Int16 Yamamoto Threshold YAMTH vcpBaseParamYamth Int16 Max State Index Iteration IMAXI vepBaseParamindexMaxlter Int16 Output Hard Decision SDHD vcpBaseParamDecisionType EnumString Output Paramters Read Flag OUTF vcpBaseParamOutFlag EnumString Table 2 78 C6000 VCP Configuration Instance VCPBP Description TextConf Name Type Input control register 0 ICO vcpIcO Numeric Input control register 1 IC1 vopic1 Numeric Input control register 2 IC2 veplc2 Numeric Input contro
48. RtcmonthAdv rtcRtcyearAdv rtcRtcpintrAdv rtcRtcintenAdv Type Bool Bool Bool Bool Bool Bool Type Bool Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric DSP BIOS TextConf Reference 2 47 CSL Module and Instance Property Names Table 2 43 C55x Real Time Clock Resource Instance RTCRES Description TextConf Name Enable RTC Configuration rtcCfgEnable Pre initialize rtcPrelnit Table 2 44 C55x RTCRES Pre Created Instance Names RTCO Table 2 45 C55x Timer Configuration Instance TIMER Description TextConf Name Set Manually timerSetManually Timer Control Register TCR timerTcr Timer Period Register PRD timerPrdAdv Timer Prescalar Register PRSC timerPrsc Table 2 46 C55x Timer Resource Instance HTIMER Description TextConf Name Open Handle to Timer timerHandleEnable Specify Handle Name timerHandleName Enable pre initialization timerEnablePrelnit Pre initialize timerPrelnit Table 2 47 C55x HTIMER Pre Created Instance Names TIMERO TIMER1 2 48 Type Bool Reference Type Bool Numeric Numeric Numeric Type Bool String Bool Reference CSL Module and Instance Property Names Table 2 48 C55x USBRES Pre Created Instance Names USBO Table 2 49 C55x WDTIMER Configuration Instance WDTIM Description WD Timer Control Register WDTCR WD Timer Period Register WDPRD WD Timer Secondary Control Register
49. Type Bool EnumString EnumString EnumString EnumString EnumString EnumString EnumString EnumString Type Bool mcbspManualSet Serial Port Control Register 1 Serial Port Control Register 2 Receive Control Register 1 Receive Control Register 2 Transmit Control Register 1 Transmit Control Register 2 Sample Rate Generator Register 1 Sample Rate Generator Register 2 Multichannel Control Register 1 Multichannel Control Register 2 Pin Control Register Receive Channel Enable Register Partition A 2 44 mcbspSpcr1 mcbspSpcr2 mcbspRer1 mcbspRer2 mcbspXcr1 mcbspXcr2 mcbspSrgr1 mcbspSrgr2 mcbspMcr1 mcbspMcr2 mcbspPcr mcbspRceraAdv Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Table 2 35 C55x MCBSP Configuration Instance MCBSP Continued CSL Module and Instance Property Names Description TextConf Name Type Receive Channel Enable Register Partition B mcbspRcerbAdv Numeric Receive Channel Enable Register Partition C mcbspRcercAdv Numeric Receive Channel Enable Register Partition D mcbspRcerdAdv Numeric Receive Channel Enable Register Partition E mcbspRcereAdv Numeric Receive Channel Enable Register Partition F mcbspRcerfAdv Numeric Receive Channel Enable Register Partition G mcbspRcergAdv Numeric Receive Channel Enable Register Partition H mcbspRcerhAdv Numeric Transmit Channel Enable Register Partition A mcbspXceraAdv Numeric Transmit Channel Enable R
50. XN prog extern error DSP BIOS TextConf Reference 2 19 Target Content Object Model Reference externs Method Syntax Parameters Returns Description Example gen Method 2 20 Syntax Parameters Returns Description externs none Array of all Extern objects contained in the Program object The externs method gets an array of all the Extern objects contained within the specified Program object The following statements print a list of the Extern objects contained by a Program externs prog externs for var i 0 i lt externs length i print externs i name gen prog name prog name Optional name of output application True if successful false if not successful After you have created a DSP BIOS TextConf script you must create a CDB file and its generated files On Windows you must also add the CDB file to your Code Composer Studio project Then you can build your DSP BIOS application with Code Composer Studio The CDB file also makes configuration information available to the DSP BIOS Real Time Analysis Tools The gen methods generates a CDB file and all of the files normally generated when you save a CDB file with the DSP BIOS Configuration Tool or when you use the gconfgen utility See Section 1 2 3 Configuration File Types page 1 8 for descriptions of the generated files It is generally recommended but not required that the prog_name match the output filena
51. a platform tcp file 1 tconfini tcf DSP BIOS TextConf startup file See Section 1 5 9 1 Startup Script Actions page 1 35 for more information 1 tconflocal tci Optional customizable startup file See Section 1 5 9 1 Startup Script Actions page 1 35 for more information An Overview of DSP BIOS TextConf The following files are generated by the DSP BIOS Configuration Tool the DSP BIOS TextConf prog gen method and the gconfgen command line utility In these filenames is a 2 digit target instruction set architecture ISA such as 55 or 64 It is generally recommended but not required that program should match the target program output filename in a Code Composer Studio project 1 program cdb Configuration Data Base CDB file Stores configuration settings for use by the DSP BIOS Configuration Tool graphical interface and by the DSP BIOS Real Time Analysis Tools 4 programcfg c c Source file to define DSP BIOS and Chip Support Library CSL structures and properties 4 programcfg h Includes DSP BIOS module header files and declares external variables for objects in the configuration file 4 programcfg s Assembly language source file for DSP BIOS settings 4 programcfg h Assembly language header file included by hellocfg s 4 programcfg cmd Linker command file In Code Composer Studio for Windows you only need to add the generated CDB file and linker command file to your project 1 2 4
52. ard containing this cpu var cpu config boards 0 cpus 0 var board cpu board get all cpus on this board var cpus board cpus create cpu name cpu_type cpu name Required name for new Cpu object cpu type Optional sub type of cpu new Cpu object or null if error occurs The create method for a Board creates a new Cpu object within the Board object The sample tconflocal tci script attempts to determine the Cpu type and creates a single Cpu object called cpu 0 See Section 1 5 9 1 Startup Script Actions page 1 35 for details You can use the create method to create additional Cpu objects The first parameter is the name to give the new Cpu object The name must be unique among the Cpu objects for this Board This parameter is required The second parameter defines the sub type of cpu to create This parameter is optional If you provide a cpu type that matches an existing JavaScript constructor function that has been loaded that constructor runs to define properties for the Cpu object Constructor files are currently provided in the lt ccs_base_dir gt bin utilities tconf include directory Solaris or lt ccs_base_dir gt bin utilities tconf include folder Windows for the following cpu types C54 C5401 C5402 C5416 C55 C62 C6201 C6211 C64 C67 and C6711 You must load the appropriate constructor file before using the create method in order for JavaScript to find the function co
53. aste between program configurations and perform repetitive tasks such as creating several similar objects Supports branching looping and other programming constructs within a configuration procedure Allows you to ensure that symbol definitions in the configuration and program sources always match You can do this by defining variables for use in scripts and generating a C header file from the script to be included by the program source code DSP BIOS TextConf Overview 1 5 An Overview of DSP BIOS TextConf 1 2 An Overview of DSP BIOS TextConf DSP BIOS TextConf scripts contain statements in the JavaScript language These statements are executed to perform design time application configuration 1 2 1 An Example TextConf Script The CDB file for the hello application is about 500 KB Examining this configuration with the DSP BIOS Configuration Tool would involve browsing through each individual module and object In contrast the equivalent TextConf script contains only a few lines because it defines only differences between template objects and the objects used by the application For example the following statements are the TextConf script for a DSK6211 version of the Hello World example utils loadPlatform Dsk6211 utils getProgObjs prog var trace LOG create trace trace bufLen 32 LOG system bufLen 128 if config hasReportedError false prog gen myApp else print An error has occur
54. at contains them The space property specifies the type of memory space as a string It may be code data code data or any other value appropriate for the platform Target Content Object Model Reference 2 1 7 Extern Class Table 2 7 Extern Class Summary language Property name Property Object Type Contains Methods Properties Extern NONE language name A Program object may contain one or more Extern objects Extern objects do not contain any objects Extern objects represent external declarations made in program code that need to be referenced in the configuration The following example statements create Extern objects myTask fxn prog extern myTaskFxn C mySwi fxn prog extern mySwiFxn asm SYS ABORTFXN prog extern error The extern method of the Program object see Section 2 1 5 Program Class page 2 18 creates a new Extern object only if none exists with the specified name If an Extern object already exists with the specified name the extern method returns the object The externs method of the Program object gets an array of all Extern objects contained within the specified Program object The language property of an object identifies the language in which the name is declared It may be C C or asm This property is gettable only It is set when the object is created The default is C The name property of an object holds the name of that object An underscore p
55. at object This property is gettable only It is set when the object is created Names of Module objects must be unique within the namespace of the Program object that contains them Program objects define a namespace that includes all Extern Module and Instance objects contained by the Program object Extern Module and Instance objects within two different Program objects can have duplicate names The names of Extern Module and Instance objects are the same as their C identifiers assemble a list of the module names in prog list modules prog modules for i 0 i lt modules length i list modules i name The program property holds the Program object that contains the Module object This property is gettable only It is set when the Module object is created Normally all objects in a class have the same set of properties However in a CDB file each module and each instance type has a different set of properties Therefore properties for Module and Instance objects are handled differently than those of other object classes For more details see Section 1 5 3 1 Module and Instance Property Names page 1 20 Each CDB field name is mapped to a property name In general the properties of Module objects are in all uppercase letters For example MEM STACKSIZE The names are listed in Section 2 2 DSP BIOS Module and Instance Property Names page 2 34 You can set and get these property values a
56. atAdv String Bool Reference Type Global Address Reload Register A Format Reload Register A Numeric Reload Register A Symbolic Global Address Reload Register B Format Reload Register B Numeric Reload Register B Symbolic Global Address Reload Register C Format Reload Register C Numeric Reload Register C Symbolic Global Address Reload Register D Format Reload Register D Numeric Reload Register D Symbolic Global Index Register A Global Index Register B Global Count Reload Register A Global Count Reload Register B 2 50 dmaGbladdrANumericAdv dmaGbladdrASymbolicAdv dmaGbladdrBFormatAdv dmaGbladdrBNumericAdv dmaGbladdrBSymbolicAdv dmaGbladdrCFormatAdv dmaGbladdrCNumericAdv dmaGbladdrCSymbolicAdv dmaGbladdrDFormatAdv dmaGbladdrDNumericAdv dmaGbladdrDSymbolicAdv dmaGblidxAAdv dmaGblidxBAdv dmaGblentAAdv dmaGblcntBAdv EnumString Numeric String EnumString Numeric String EnumString Numeric String EnumString Numeric String Numeric Numeric Numeric Numeric CSL Module and Instance Property Names Table 2 53 C6000 DMA Configuration Instance DMA Description TextConf Name Type Primary Control Register dmaPrictl Numeric Secondary Control Register dmaSecctl Numeric Source Address Format dmaSrcAddrFormatAdv EnumString Source Address Numeric dmaSrcAddrNumericAdv Numeric Destination Address Format dmaDstAddrFormatAdv EnumString Destination Address Numeric dmaDstAddrNumericAdv Nu
57. ation methods 1 2 configurations comparing 1 16 merging 1 16 containers 1 18 Index 1 Index conventions coding 1 29 object model initialization 1 36 Cpu object 2 13 defined by startup script 1 35 cpu property Program object 2 24 CPU speed 2 11 cpu method Board object 2 8 cpuCore property Cpu object 2 16 cpuCoreRevision property Cpu object 2 16 cpuFamily property Cpu object 2 16 cpuNumber property Cpu object 2 16 cpus method Board object 2 8 create method Board object 2 9 Config object 2 5 Cpu object 2 13 Instance object 2 31 Module object 2 28 Program object 2 18 creating scripts 1 11 CSL Extern Declaration properties C6000 2 57 CSL properties 2 34 D D option 1 39 1 40 datatypes 1 17 1 20 Arg 1 20 Boolean 1 20 Enumint 1 21 EnumString 1 21 Extern 1 21 Int16 1 21 Int32 1 21 Numeric 1 21 Reference 1 21 String 1 21 word size 2 17 dataModel property Program object 2 24 dataWordSize property Cpu object 2 17 debugging 1 12 GUI debugger 1 14 interactive shell 1 12 decimal values 1 21 Index 2 dependencies on objects 2 32 statement order 1 15 design time configuration 1 2 destroy method Board object 2 10 Config object 2 6 Cpu object 2 14 Instance object 2 31 Program object 2 19 differences between configurations 1 16 directory path 1 24 1 39 DMA Global Register properties C6000 2 49 2 50 DMA properties C54x 2 35 2 36 C55x 2 41 2 42 C6000 2 51 Document O
58. bject Model DOM 1 7 1 17 documentation other 1 38 dot notation 1 18 DSP BIOS 1 2 DSP BIOS Configuration Tool 1 2 advantages 1 4 DSP BIOS TextConf 1 3 advantages 1 4 for new applications 1 10 migrating existing applications 1 15 dynamic objects 1 2 E ECMA 262 1 4 1 17 EDMA properties C6000 2 52 EMIF properties C55x 2 42 2 43 C6000 2 54 2 55 2 56 endian property Cpu object 2 15 Program object 2 24 enumerated data type 1 21 Enumlint data type 1 21 EnumString data type 1 21 environment array 1 22 1 39 1 40 error handling 1 27 errors 1 28 examples 1 43 hello world 1 6 minimizing code size 1 43 exceptions 1 28 catching 1 29 throwing 1 28 exit keyword 1 13 exit status 1 28 exiting from tconf 1 13 Extern data type 1 21 Extern Declaration properties C6000 2 57 Extern object 1 21 2 27 creating 2 19 extern method Program object 2 19 externs method Program object 2 20 F family of CPU 2 16 far model 2 24 file services 1 18 1 26 files assembly header 1 9 assembly source 1 9 C header 1 9 C source 1 9 CDB 1 8 1 15 CMD 1 9 naming 1 29 startup 1 8 TCF 1 8 TCI 1 8 TCP 1 8 template 1 8 findSeed method 1 26 floating values 1 21 function names 1 21 G gconfgen utility 1 41 gen method 1 41 Program object 2 20 when to use 1 11 get method Program object 2 21 getProgObjs method 1 8 1 11 1 26 global variables 1 18 on command line 1 39 1 40 GPIO properties
59. bjects Memory objects do not contain any objects Memory objects represent memory on the board or CPU There is no method to create a Memory object Instead Memory objects are defined as elements in a mem array For example Define external memory on board config board dsk5402 mem config board dsk5402 mem 0 comment External Program Memory name EPROG space code base 0x8000 len 0x7 80 1 config board dsk5402 mem 1 comment External Data Memory name EDATA space data base 0x8000 len 0x8000 There are also no methods to get the name or names of the Memory objects contained by a Board or Cpu Instead a script should access the memf array within a Board or Cpu object Memory objects are typically created only in a platform file tcp The base property holds the location of the base of the memory segment It is typically specified using a hex value The comment property holds a text description about the memory segment DSP BIOS TextConf Reference 2 25 Target Content Object Model Reference len Property name Property space Property 2 26 The len property holds the length of the memory segment It is typically specified using a hex value The name property of an object holds the name of that object This property is gettable only It is set when the object is created Names of Memory objects must be unique within the Board or Cpu object th
60. brary CSL objects J The name shown after the dash in each table title is the name to use for the Module object in DSP BIOS TextConf scripts For example to create a MCBSP Configuration instance var mcbspCfg 0 MCBSP create mcbspCfg0 The Description column shows the property field labels displayed in the DSP BIOS Configuration Tool for CSL objects The TextConf Name column shows the property names to use in DSP BIOS TextConf scripts to refer to these properties You can set and get these property values as you would properties of other object classes For example the following statement sets the Open Handle to McBSP property of a McBSP resource instance myMcBSP 0 mcbspHandleEnable 1 The Type column shows how the value is stored For information about the data types see Section 1 5 3 1 Module and Instance Property Names page 1 20 The names of any Instance objects that are pre defined for a module by the configuration templates are listed in a table after the properties of that Instance type Refer to the CSL documentation for descriptions of these properties 2 3 1 Table 2 10 Description Channel Priority 0x0000 or 0x0001 Global Reload Register Usage in Autoinit Mode AUTOIX 0x0000 or 0x0001 Transfer Mode Control Register DMMCR Sync Event and Frame Count Register DMSFC Source Address Format Source Address Register DMSRC Numeric Source Address Register DMSRC Symbolic Dest
61. bxtest tutorial example One advantage to using this script instead of the DSP BIOS Configuration Tool is that the NWRITERS variable makes it easy to run a number of tests with different numbers of writer tasks utils loadPlatform Platform utils getProgObjs prog var NWRITERS 3 number of writers to test var PRIORITY 1 task priority in this test SYS ABORTFXN prog decl UTL doAbort SYS ERRORFXN prog decl UTL doError SYS EXITFXN prog decl UTL halt SYS PUTCFXN prog decl UTL doPutc var trace LOG create trace trace bufLen 256 trace logType circular LOG system bufLen 512 LOG system logType fixed var reader0 TSK create reader0 reader0 priority PRIORITY reader0 fxn prog extern reader for i 0 i lt NWRITERS i var writer TSK create writer i writer priority PRIORITY writer fxn prog extern writer writer argO i prog gen Chapter 2 DSP BIOS TextConf Reference This chapter provides reference information about the Target Content Object Model Topic Page 2 1 Target Content Object Model Reference 2 055 2 2 2 2 DSP BIOS Module and Instance Property Names 2 34 2 3 CSL Module and Instance Property Names 2 34 2 1 Target Content Object Model Reference 2 1 Target Content Object Model Reference The Target Content Object Model TCOM is a hierarchy of contai
62. can use the create method to create additional Board objects The first parameter is the name to give the new Board object The name must be unique among the boards This parameter is required The second parameter defines the sub type of board to create This parameter is optional If you provide a board_type that matches an JavaScript constructor function that has been loaded that constructor runs to define properties for the Board object and to create the standard Cpu object for the board Constructor files are currently provided in the lt ccs_base_dir gt bin utilities tconf include directory Solaris or lt ccs_base_dir gt bin utilities tconf include folder Windows for the following board_types Dsk54 Dsk5416 Dsk62 Dsk67 Evm54 Evm55 Evm62 Sim54 Sim55 Sim62 and Sim64 You must load the appropriate constructor file before using the create method in order for JavaScript to find the function contained by the constructor file Note Platforms supported on Solaris Code Composer Studio for Solaris supports only the C55x and C64x platforms l DSP BIOS TextConf Reference 2 5 Target Content Object Model Reference Examples destroy Method Syntax Parameters Returns Description Examples For example you can create an Evm62 Board object with the following statement utils importFile Evm62 board config create board 0 Evm62 The order of objects created within a container arra
63. cations 1 10 migrating existing applications 1 15 throw keyword 1 29 throwing exceptions 1 28 TIMER properties C54x 2 39 C55x 2 48 C6000 2 58 2 59 2 60 tiRoot variable 1 23 TMS320C54x properties for CSL 2 35 TMS320C55x properties for CSL 2 40 TMS320C6000 properties for CSL 2 49 true false values 1 20 try keyword 1 29 U UNIX configuration methods 1 2 USBRES properties C55x 2 49 utilities 1 9 cdbcmp 1 41 gconfgen 1 41 tconf 1 39 utils findSeed method 1 26 utils getProgObjs method 1 8 1 26 Index 5 Index utils importFile method 1 25 utils loadArch method 1 25 utils loadPlatform method 1 25 utils tcf file 1 35 methods provided 1 25 1 26 V variable names 1 17 environment array 1 22 variable types 1 17 1 20 W warn method 2 7 Index 6 warnings 1 27 enabling 1 39 WDTIMER properties C54x 2 40 C55x 2 49 Windows configuration methods 1 2 word size 2 17 writing scripts 1 11 X XBUS properties C6000 2 61
64. cbspXceraAdv Numeric Transmit Channel Enable Register Partition B mcbspXcerbAdv Numeric Transmit Channel Enable Register Partition C mcbspXcercAdv Numeric Transmit Channel Enable Register Partition D mcbspXcerdAdv Numeric Transmit Channel Enable Register Partition E mcbspXcereAdv Numeric Transmit Channel Enable Register Partition F mcbspXcerfAdv Numeric Transmit Channel Enable Register Partition G mcbspXcergAdv Numeric Transmit Channel Enable Register Partition H mcbspXcerhAdv Numeric Table 2 15 C54x MCBSP Resource Instance HMCBSP Description TextConf Name Type Open Handle to McBSP mcbspHandleEnable Bool Specify Handle Name mcbspHandleName String Enable pre initialization mcbspEnablePrelnit Bool Pre initialize mcbspPrelnit Reference Table 2 16 C54x HMCBSP Pre Created Instance Names McBSPO McBSP1 McBSP2 2 38 Table 2 17 Description C54x PLL Configuration Instance PLL CSL Module and Instance Property Names TextConf Name Type PLL Counter Value PLLCOUNT 0 255 PLL Multiplier PLL Multiplier PLLMUL CLKOUT Output Divide Factor Table 2 18 Description C54x PLL Resource Instance HPLL Enable Configuration of PLL Pre initialize Table 2 19 PLLO Table 2 20 Description pllClkmdPllcount pllPllmulRatio pliClkmdPllmul pllDivideFactor TextConf Name pllEnablePreinit pllPrelnit C54x HPLL Pre Created Instance Names Timer Control Register Timer Period Register
65. ct 2 15 project adding files to 1 9 properties 1 18 naming conventions 1 20 of Modules and Instances 1 20 PWR properties C55x 2 46 Q quit command 1 13 R Reference data type 1 21 references to objects 1 19 references method Instance object 2 32 reserved keywords 1 13 revision number of CPU 2 16 Rhino 1 14 1 40 rootDir variable 1 23 RTC properties C55x 2 47 RTCRES properties C55x 2 48 running a script 1 39 S save method Program object 2 23 script creating 1 11 file 1 8 generating from CDB files 1 41 running 1 39 scripting languages 1 7 scriptName variable 1 23 scripts portable 1 30 search path 1 39 seed file 1 8 small model 2 24 source files 1 9 space property Memory object 2 26 speed of CPU 2 11 startup file 1 8 startup script 1 3 static objects 1 2 stderr location 1 28 stdout location 1 27 String data type 1 21 4 Index T Target Content Object Model TCOM 1 7 1 18 class containers 1 18 diagram 1 7 quick reference 2 2 TCF file 1 8 creating from CDB 1 15 creating from scratch 1 11 generating from CDB file 1 41 naming 1 29 1 36 TCI file 1 8 loading 1 24 naming 1 29 tconf utility 1 39 exit status 1 28 operation modes 1 12 tconfini tcf file 1 8 1 34 tconflocal tci file 1 8 1 35 TCP file 1 8 template file differences from 1 15 1 41 template files 1 8 testing 1 12 text based configuration 1 2 TextConf 1 3 advantages 1 4 for new appli
66. ctl2 Numeric CE3 Space Control Reg Cectl3 emifaCectl3 Numeric SDRAM Control Reg SDCTL emifaSdctl Numeric SDRAM Timing Reg SDTIM emifaSdtim Numeric SDRAM Extended Reg SDEXT emifaSdext Numeric CEO Space Secondary Control Reg Cesec0 emifaCesecO Numeric CE1 Space Secondary Control Reg Cesec1 emifaCesec1 Numeric CE2 Space Secondary Control Reg Cesec2 emifaCesec2 Numeric CE3 Space Secondary Control Reg Cesec3 emifaCesec3 Numeric DSP BIOS TextConf Reference 2 55 CSL Module and Instance Property Names Table 2 63 C6000 EMIFA Resource Instance HEMIFA Description Enable Pre Initialization Pre Initialize with TextConf Name emifaEnablePrelnit emifaPrelnit Table 2 64 C6000 EMIFB Configuration Instance EMIFB Description Global Control Reg GBLCTL CEO Space Control Reg Cectl0 CE1 Space Control Reg Cectl1 CE2 Space Control Reg Cectl2 CE3 Space Control Reg Cectl3 SDRAM Control Reg SDCTL SDRAM Timing Reg SDTIM SDRAM Extended Reg SDEXT CEO Space Secondary Control Reg CesecO0 CE1 Space Secondary Control Reg Cesec1 CE2 Space Secondary Control Reg Cesec2 CE3 Space Secondary Control Reg Cesec3 TextConf Name emifbGblcti emifbCectlO emifbCectl1 emifbCectl2 emifbCectl3 emifbSdectl emifbSdtim emifbSdext emifbCesecO emifbCesec1 emifbCesec2 emifbCesec3 Table 2 65 C6000 EMIFB Resource Instance HEMIFB Description Enable Pre Initial
67. cument refers to individual objects that are not of the Instance class as objects not as object instances or instances The examples in this section assume that the utils getProgObjs method was called with the second parameter omitted after a CDB file was loaded Instance objects cannot contain other objects therefore the create method of an Instance object fails and returns an error destroy none true if successful false if failed The destroy method destroys the specified object DSP BIOS TextConf Reference 2 31 Target Content Object Model Reference references Method Syntax Parameters Returns Description Example module Property Example name Property 2 32 This method fails and returns false if the object is either referenced by another object or contains objects Notice that while the create method creates an object one layer lower in the hierarchy than the object whose method is used the destroy method deletes the actual object whose method is used While you will probably not need to use the destroy method when writing configuration scripts from scratch the destroy method is often needed in scripts created by the cdbcmp utility to compare two configuration files references none Array of all objects that directly reference this object The references method returns an array of objects that directly reference the object whose method is used Scripts can use the
68. d ECMAScript language also known as JavaScript and can be edited and manipulated as you would ordinary source code The utilities are supported for Microsoft Windows and UNIX This type of configuration is described in this document Both configuration methods generate source header and linker command files to be compiled and linked with your application The DSP BIOS API also supports dynamic creation of objects at run time Such objects are more flexible but increase performance overhead and code size Design time configuration provides the following benefits over run time configuration 4 Improves run time performance by reducing the time your program spends performing system setup 4 Reduces program size by eliminating run time code required to dynamically create and configure objects For a typical module the functions to create and delete objects make up 50 of the code in the module 1 Optimizes internal data structures 4 Detects errors earlier by validating object properties before program compilation 4 Automatically sets a variety of properties that are dependent on other properties This helps ensure that your configuration is valid 4 Provides object names the DSP BIOS Analysis Tools can show at run time Objects created at run time are either not shown or have generated names Figure 1 1 DSP BIOS Configuration Methods As the following diagram shows both the DSP BIOS Configuration Tool and DSP B
69. e CSL documentation Both configuration methods have advantages in certain development environments You can use either configuration method alone or you can switch between these methods to perform tasks in the environment best suited to each task DSP BIOS TextConf Overview 1 3 DSP BIOS Configuration Methods 1 1 1 Why Use Graphical Configuration Using the DSP BIOS Configuration Tool provides the following advantages over DSP BIOS TextConf 4 The Windows Explorer like interface makes it easy to see a list of the available properties for each module and its objects 4 You are prevented from making a number of errors through drop down lists of valid values and through disabled commands and fields 4 Syntax errors cannot occur when generating configuration files 14 You do not need to learn an additional scripting language 1 1 2 Why Use DSP BIOS TextConf Using DSP BIOS TextConf provides the following advantages over the DSP BIOS Configuration Tool graphical interface 4 Supported on both UNIX and Windows Graphical configuration is not supported on UNIX 4 Supports a single configuration for systems containing multiple boards processors or programs 1 Uses the standard ECMA 262 JavaScript language which is C like in syntax As a result design time and run time object creation statements are similar 1 DSP BIOS uses scripts as source files These are much smaller and easier to examine and maintain than t
70. e and Instance objects are handled differently than those of other object classes For more details see Section 1 5 3 1 Module and Instance Property Names page 1 20 Each CDB field name is mapped to a property name In general properties of Instance objects begin with a lowercase word Subsequent words have their first letter capitalized For example TSK_idle stackSize See the list in Section 2 2 DSP BIOS Module and Instance Property Names page 2 34 of JavaScript names defined for the properties shown in CDB files You can set and get these property values as you would properties of other object classes trace LOG create trace trace bufLen 32 trace logType circular DSP BIOS TextConf Reference 2 33 DSP BIOS Module and Instance Property Names 2 2 2 3 2 34 DSP BIOS Module and Instance Property Names Refer to the following reference guides for lists of property names used in DSP BIOS TextConf scripts for DSP BIOS Module and Instance objects 4 4 4 TMS320C5000 DSP BIOS Application Programming Interface Reference Guide literature number SPRU404E TMS320C6000 DSP BIOS Application Programming Interface Reference Guide literature number SPRU403E TMS320C28x DSP BIOS Application Programming Interface Reference Guide literature number SPRU625 CSL Module and Instance Property Names The tables in this section list the property names used in DSP BIOS TextConf scripts for Chip Support Li
71. egister Partition B mcbspXcerbAdv Numeric Transmit Channel Enable Register Partition C mcbspXcercAdv Numeric Transmit Channel Enable Register Partition D mcbspXcerdAdv Numeric Transmit Channel Enable Register Partition E mcbspXcereAdv Numeric Transmit Channel Enable Register Partition F mcbspXcerfAdv Numeric Transmit Channel Enable Register Partition G mcbspXcergAdv Numeric Transmit Channel Enable Register Partition H mcbspXcerhAdv Numeric Table 2 36 C55x MCBSP Resource Instance HMCBSP Description TextConf Name Type Open Handle to McBSP mcbspHandleEnable Bool Specify Handle Name mcbspHandleName String Enable pre initialization mcbspEnablePrelnit Bool Pre initialize mcbspPrelnit Reference Table 2 37 C55x HMCBSP Pre Created Instance Names hMCBSPO hMCBSP1 hMCBSP2 DSP BIOS TextConf Reference 2 45 CSL Module and Instance Property Names Table 2 38 C55x PLL Configuration Instance PLL Description PLL Response After Idle IAI Response to Loss of PLL Core Lock IOB PLL Multiply Value PLL_MULT PLL Divide Value PLL_DIV Table 2 39 C55x PLL Resource Instance HPLL Description Enable Configuration of PLL Pre initialize TextConf Name plICIkmdlai plICIkmdlob plICIkmdPIImult pliClkmdPlldiv TextConf Name pllEnablePrelnit pllPrelnit Table 2 40 C55x HPLL Pre Created Instance Names PLLO Table 2 41 C55x PWR Configuration Instance PWR Description Enable Pre initialization Clock Generator D
72. emo cdb v2 demo cdb This command compares the two CDB file and creates a script with statements that would convert the first configuration to the second 1 4 3 Merging Configurations To merge changes to CDB files made by two developers use commands like the following cdbcmp a demo cdb gt demo_a tcf cdbecmp b demo cdb gt demo_b tcf sdiff o demo tcf demo a tcf demo b tcf These commands create two script files that define differences between the configurations and their templates The sdiff UNIX command and similar commands on UNIX and other platforms allows you to merge the statements in the two DSP BIOS TextConf script files without including duplications For example configurations may need to be merged if one developer is working on a driver while another is working on thread scheduling JavaScript Language Highlights 1 5 JavaScript Language Highlights This document does not provide details on the syntax of the JavaScript language However several concepts are important when using JavaScript for DSP BIOS TextConf This section provides an overview of such concepts See Section 1 5 11 JavaScript and Java References page 1 38 for JavaScript reference sources 1 5 1 JavaScript Language Overview JavaScript syntax operators and flow control statements are similar to those in the C language C programmers can easily read JavaScript It includes if else switch break for while do and return statements JavaScri
73. ent config importPath This variable may be defined as a search path using the D option on the tconf command line If it is defined the utils importFile function uses the specified search path to use to locate files If this variable is not defined utils importFile looks in the current directory In either case utils importFile looks in the environment rootDir include directory after using the search path or the current directory For example tconf Dconfig importPath d myproject include environment config compilerOpts This variable may define the compiler options used to build the program The options that may be specified are me big endian ml large data model and mf far code model If this variable is defined it sets a corresponding property of the Program object For example the following specifies that the program is compiled in big endian mode tconf Dconfig compilerOpts me environment config arch A variable of this format may be defined using the D option on the tconf command line where arch may be 28 54 55 62 64 or 67 If such a variable is defined it specifies the CPU architecture Since the CPU is specified by the variable name the variable need not be set to a value For example tconf Dconfig 54 environment config platform variable of this format may be defined using the D option on the tconf command line The variable should be set to one of the valid board types f
74. er scripts as necessary This enables rapid porting to new boards by minimizing configuration script changes 1 Split module level scripts into platform dependent and platform independent parts This minimizes code duplication and simplifies porting to new platforms The platform independent part should include the appropriate platform dependent part If no appropriate platform dependent part exists throw a meaningful exception 1 Name platform dependent scripts mod_boardcfg tci This prevents file name collisions with other modules 1 5 8 Specifying the Hardware Platform To configure programs with DSP BIOS TextConf you define both the hardware execution platform and the software components used in the program This section describes methods for binding the program and the platform within DSP BIOS TextConf scripts in portable ways For information on creating a platform definition file tcp see Section 1 5 10 Creating a Platform File page 1 37 In all but the simplest development environments it is important to write portable configuration scripts Such scripts can be used without modification to re target a program for a different platform For example an algorithm test may need to be run on both a simulator and a hardware development board Portability is especially valuable when maintaining hundreds of tests in a regression test suite In order to create portable configuration scripts you must separate the platform spec
75. fects of utils loadPlatform on Startup Actions The sample tconflocal tci script does not load the CDB template for the specified platform You can use the utils loadPlatform method to both initialize the TCOM object hierarchy and load the appropriate CDB template for the specified platform If you use the utils loadPlatform the objects created by the startup script are overwritten L By using different file names to specify the platform instead of using tconf command line options program build tools such as make can automatically run tconf and build distinct executables for each valid combination of program and platform Thus adding support for a new platform requires no modifications to the makefiles for instance This method works well when one must simultaneously support specific combinations of programs and platforms However in the regression test suite example above this technique can be cumbersome Adding a new platform for a test suite means creating a new configuration script file for every test Moreover even if it were possible to run the test suite for each platform in parallel the time to build all tests for all platforms and the disk space required might be prohibitively high Thus for pragmatic reasons one often sequentially builds runs and deletes the executables one platform at a time In this case using the command line parameter method in Section 1 5 8 3 Specifying Platform and Directory on the Command
76. gt script args See Section 1 3 4 Using the GUI Debugger page 1 14 for information about using the Rhino debugger Examples This command line defines three global variables for use within tconf The third variable is defined as an empty string tconf Dvarl valuel Dvar2 value2 Dvar3 1 40 Syntax Description Syntax Description Command Line Utility Reference To access these variables within tconf use the following expressions environment var1 environment var2 environment var3 1 6 2 cdbcmp Utility cdbcmp projname cdb gt projname tcf cdbcmp projl cdb proj2 cdb gt proj diffs tcf The cdbcmp utility either compares one CDB file to the CDB template used to create it or compares two CDB files On Solaris the cdbcmp exe file is installed in the lt ccs_base_dir gt bin utilities tconf directory On Windows it is installed in the lt ccs_base_dir gt bin utilities tconf folder You may want to add this directory to your PATH variable so that you can run cdbcmp without specifying the full path to the utility each time When used to compare a CDB file to its template you do not need to specify the template cdbcmp finds the template automatically The cdbcmp utility generates a DSP BIOS TextConf script that loads the template file modifies the configuration to match the CDB file and saves the resulting configuration as a CDB file When used to compare two CDB files cdbcmp genera
77. hat file to a DSP BIOS TextConf script using a command like the following cdbcmp demo cdb gt demo tcf This command finds the original CDB template used to create the demo cdb file It compares the demo cdb file to the template and creates a script with statements to load the template file and to define objects and properties that are different from those in the template Figure 1 6 File Flow for cdbcmp Utility CDB Template CDB File cdbcmp add instances oan change property values tcf File gt N m gt prog load CDB template Utility DSP BIOS Configuration prog save file cdb Tool ae ae Note Order Dependencies in Generated Scripts Some object classes have order dependencies and you may need to modify the sequence of statements in the output script to get the script to run without errors For example an object may be referenced in a statement before it is created Such errors are usually fairly easy to diagnose based on the JavaScript error and a visual inspection of the script To correct such errors move the statement that creates the object before the statement that references the object DSP BIOS TextConf Overview 1 15 Migrating Applications to DSP BIOS TextConf 1 42 Comparing Configurations To view changes made between two versions of a CDB file or to compare CDB files for two applications use a command like the following cdbemp vi d
78. he CDB files created by the DSP BIOS Configuration Tool With DSP BIOS TextConf the CDB files are still created but they are not the original source files 4 Makes it easy to see which target specific template was used as a starting point 4 Separates application specific settings from other configuration settings such as target specific settings and ROM application settings This makes it easy to port applications and modules to other target boards and platforms It also makes it easier to maintain applications because you can quickly see which settings are made for target specific reasons and which are made for application specific reasons 1 Separates application specific settings from DSP BIOS configuration settings This simplifies moving to a newer or older version of Code Composer Studio In some cases customers had to re configure applications manually in order to upgrade when only the graphical configuration method was available DSP BIOS Configuration Methods Allows you to modularize settings you use in all applications from application specific settings For example if your applications all run on a target with minimal memory all applications can include a single file that minimizes the DSP BIOS memory footprint Enables use of standard code editing tools For example text based configuration makes it easier to merge changes from multiple developers compare configurations used by multiple applications cut and p
79. ification that is initialization of hardware objects from the program s software configuration Fortunately DSP BIOS TextConf supports a number of common mechanisms for creating re usable configuration scripts Such mechanisms include the ability to dynamically JavaScript Language Highlights load configuration scripts from other scripts subroutines environment variables and user modifiable startup scripts Several methods of creating portable scripts are presented in this section Table 1 1 compares the advantages and disadvantages of each method To choose a method determine how many programs need to be maintained how many platforms need to be supported and whether platforms must be supported simultaneously by the same program Also consider your build environment Mature development environments with regression test suites support for multiple hardware generations and multiple DSP programs often use a combination of these methods Table 1 1 Comparison of Portable Configuration Methods Resulting For For Large For Selected Script is Simultaneous Suites of Platforms and Platform Specification Method Portable Multi Platform Programs Programs Specifying the Platform in the Script no yes no yes page 1 31 Specifying the Platform on the Command yes no yes no Line page 1 32 Specifying Platform and Directory onthe yes yes yes no Command Line page 1 33 Specifying the Platform in the Script File yes yes no yes Name page 1 33 1
80. ination Address Format Destination Address Register DMDST Numeric Destination Address Register DMDST Symbolic Element Count Register DMCTR Global Source Address Format Global Source Address Reload Register DMGSA Numeric Global Source Address Reload Register DMGSA Symbolic Global Destination Address Format Global Destination Address Reload Register DMGDA Numeric Global Destination Address Reload Register DMGDA Symbolic Global Element Count Reload Register DMGCR Global Frame Count Reload Register DMGFR Extended Source Data Page Register DMSRCDP Numeric Extended Source Data Page Register DMSRCDP Symbolic Extended Destination Data Page Register DMDSTDP Numeric Extended Destination Data Page Register DMDSTDP Symbolic DSP BIOS TextConf Reference C54x DMA Configuration Instance DMA CSL Module and Instance Property Names TMS320C54x Properties TextConf Name dmaDmprecDprcAdv dmaAutoixAdv dmaDmmer dmaDmsfc dmaDmsrcFormatAdv dmaDmsrcNumericAdv dmaDmsrcSymbolicAdv dmaDmdstFormatAdv dmaDmdstNumericAdv dmaDmdstSymbolicAdv dmaDmctrAdv dmaDmgsaFormatAdv dmaDmgsaNumericAdv dmaDmgsaSymbolicAdv dmaDmgdaFormatAdv dmaDmgdaNumericAdv dmaDmgdaSymbolicAdv dmaDmgcrAdv dmaDmgfrAdv dmaDmsrcdpNumeric dmadmsrcdpSymbolic dmaDmdstdpNumeric dmaDmdstdpSymbolic Type Numeric Numeric Numeric Numeric EnumString Numeric String EnumString Numeric String Numeric EnumString Nu
81. ings DSP BIOS TextConf Overview 1 21 JavaScript Language Highlights 1 22 1 5 3 3 Namespace Management A namespace is the context within which all variables must have unique names Program objects define a global namespace for all objects contained within the Program object As a result all Module Instance and Extern objects within a Program object must have unique names For example if the first statement is performed the second statement fails because the name audio is already used prog module SWI create audio OK prog module PIP create audio fails Any object in a namespace can be retrieved by name This simplifies object lookup in scripts For example these statements look for an object named audio and check to see whether it is an Instance object before modifying a property In the following example instanceof is a JavaScript operator that returns true if the object is of the specified class Instance is the name of aclass audio prog get audio if audio instanceof Instance audio priority 1 1 5 4 Built in Variable Arrays DSP BIOS TextConf provides several built in arrays of variables that are set automatically or based on options in the tconf command line These arrays are the environment array and the arguments array 1 5 4 1 Environment Array Variables DSP BIOS TextConf creates an array called environment and automatically defines a nu
82. irst Program object prog module LOG instance LOG system 1 Reference path set up using a second parameter with the utils getProgObjs method gvars utils getProgObjs prog gvars gvars LOG system Reference path set up using the utils getProgObjs method with no second parameter utils getProgObjs prog LOG system Most code examples in this document assume that the utils getProgObjs method was used with no second parameter to create global variables for all Module and Instance objects Many methods expect an object as a parameter or return an object When an object is assigned to a variable that variable internally contains a reference to the object Objects are not copied when they are assigned they are stored in one place and referenced by variables Thus if multiple variables reference an object changes to the object made via one variable affect the same object when referenced by another variable Some methods return an array of objects Standard array properties such as length can be used with arrays of objects For example this statement gets the number of objects in the TSK instances array numtasks TSK instances length These statements create a string listing the names of all Module objects list modules prog modules for i 0 i lt modules length i list modules i name DSP BIOS TextConf Overview 1 19 JavaScript Language Highlights 1
83. isable CACHE Disable CPU Disable DMA Disable EMIF Disable McBsp 0 Disable McBsp 1 Disable McBsp 2 Disable 2 46 TextConf Name pwrConfigPwr pwrClockgenPwrDwnMode pwrCachePwrDwnMode pwrCpuPwrDwnMode pwrDmaPwrDwnMode pwrEmifPwrDwnMode pwrMcbspoPwrDwnMode pwrMcbsp1PwrDwnMode pwrMcbsp2PwrDwnMode Type EnumString EnumString Numeric EnumString Type Bool Reference Type Bool Bool Bool Bool Bool Bool Bool Bool Bool CSL Module and Instance Property Names Table 2 41 C55x PWR Configuration Instance PWR Continued Description Timer 0 Disable Timer 1 Disable I2C Disable Clockout Pin Disable Disable CLKMEM Oscillator Disable TextConf Name pwrTimerOPwrDwnMode pwrTimer1 PwrDwnMode pwrl2cPwrDwnMode pwrClockoutPwrDwnMode pwrClkmemPwrDwnMode pwrOscPwrDwnMode Table 2 42 C55x Real Time Clock Configuration Instance RTC Description Set Manually Seconds Register RTCSEC Seconds Alarm Register RTCSECA Minutes Register RTCMIN Minutes Alarm Register RTCMINA Hour Register RTCHOUR Hour Alarm Register RTCHOURA Day of the Week Register RTCDAYW Day of the Month Register RTCDAYM Month Register RTCMONTH Year Register RTCYEAR Periodic Interrupt Selection Register RTCPINTR Interrupt Enable Register RTCINTEN TextConf Name rtcSetManually rtcRtcsecAdv rtcRtcsecaAdv rtcRtcminAdv rtcRtcminaAdv rtcRtchourAdv rtcRtchouraAdv rtcRtcdaywAdv rtcRtcdaymAdv rtc
84. it status is non zero 1 5 6 1 More About Errors If an error occurs the config hasReportedError property is set to true A script can check this property to determine whether one or more errors has occurred Error messages are always written to the stderr location The following example uses the config hasReportedError property to determine whether an output configuration file should be generated if config hasReportedError false prog gen myApp else print An error has occurred 1 5 6 2 More About Exceptions To throw an exception scripts use the throw keyword This example throws an exception if the lowest priority task is not the TSK_idle task The exception goes to stderr JavaScript Language Highlights function increasingPri a b tasklist prog module TSK instances tasklist sort increasingPri return a priority b priority if tasklist 0 name TSK_idle throw new Error Idle task should be lowest priority To catch an exception a script can use a try catch block The syntax for such a block is as follows try something that might throw an exception catch e e is the error object thrown For example the following statements attempt to load a JavaScript file If the file does not exist an exception is thrown When the exception is caught a message is sent to stderr and the script continues executing If this script did
85. ization Pre Initialize with 2 56 TextConf Name emifbEnablePrelnit emifbPrelnit Type Bool Reference Type Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Type Bool Reference CSL Module and Instance Property Names Table 2 66 C6000 CSL Extern Declaration Module ExternDecl Description Enter header filename between quotes TextConf Name HEADER_FILENAME Table 2 67 C6000 CSL Extern Declaration Instance ExternDecl Description CSL Symbol Type ex Uint32 Symbol Name ex BuffA Symbol Specification TextConf Name bufType bufName bufSpec Table 2 68 C6000 MCBSP Configuration Instance MCBSP Description Serial Port Control Reg SPCR Receiver Control Reg RCR Transmitter Control Reg XCR Sample Rate Generator Reg SRGR Multichannel Control Reg MCR Receiver Channel Enable RCER Transmitter Channel Enable XCER Pin Control Reg PCR TextConf Name mcbspSpcr mcbspRcr mcbspXcr mcbspSrgr mcbspMcr mcbspRcer mcbspXcer mcbspPcr Table 2 69 C6000 MCBSP Resource Instance HMCBSP Description Open MCBSP Port Handle Enable Pre Initialization Pre Initialize with TextConf Name mcbspHandleEnable mcbspHandleName mcbspEnablePrelnit mcbspPrelnit DSP BIOS TextConf Reference Type String Type String String EnumString Type Numeric Numeric Numeric Numeric Numeric Nume
86. jects have properties for storing information about the program compilation model Program objects also have methods for saving and loading CDB files Loading a CDB file defines Module and Instance objects in the JavaScript environment The create method of a Program object cannot be used to create Module objects Saving a CDB file and its generated file allows the settings made via DSP BIOS TextConf to be linked with the program and used with the DSP BIOS Real Time Analysis Tools A default Program object is created by the startup script see Section 1 5 9 1 Startup Script Actions page 1 35 This startup script also creates a global variable called prog that references this object Additional Program objects can be created with the create method of a Cpu object Program objects define a namespace within which all objects must have unique names See Section 1 5 3 3 Namespace Management page 1 22 for details The only way to create a Module object is to load a CDB file with the prog load or utils loadPlatform method Do not use the create method of the Program object to create Module objects destroy Method Syntax Parameters Returns Description extern Method Syntax Parameters Returns Description Examples Target Content Object Model Reference destroy none true if successful false if failed The destroy method destroys the specified object This method fails and returns false if
87. l register 3 IC3 veplic3 Numeric Input control register 4 IC4 veplc4 Numeric Input control register 5 IC5 veplic5 Numeric Table 2 79 C6000 VCP Resource Instance HVCP Description TextConf Name Type Enable Parameters Setting vcpEnableParams Bool Pre Initialize with vcpBaseParamInit Reference Output VCP Params ConfigName ex vcpParam vcpParamConfigName EnumString Set VCP Params Values to the IC Config Obj vcpSetParamEnable Bool Enable Pre Initialization vcpEnablePrelnit Bool Pre Initialize with vopPrelnit Reference 2 60 CSL Module and Instance Property Names Table 2 80 C6000 XBUS Configuration Instance XBUS Description TextConf Name Type Global Control Register XBGC xbusXbgc Numeric XCEO Space Control Register XCectl0 xbusXcectlO Numeric XCE1 Space Control Register XCectl1 xbusXcectl1 Numeric XCE2 Space Control Register XCectl2 xbusXcectl2 Numeric XCE3 Space Control Register XCectl3 xbusXcectl3 Numeric XBUS HPI Control Register XBHC xbusXbhc Numeric XBUS Internal Master Address Register XBIMA xbusXbimaAdv Numeric XBUS External Address Register XBEA xbusXbeaAdv Numeric Table 2 81 C6000 XBUS Resource Instance HXBUS Description TextConf Name Type Enable Pre Initialization xbusEnablePrelnit Bool Pre Initialize with xbusPrelnit Reference DSP BIOS TextConf Reference 2 61 2 62 A Arg datatype 1 20 arguments array 1 24 array arguments 1 24 environment 1 22 methods 1 20 of objects 1 18 1 19
88. le services In a web browser the lack of file services prevents most forms of file access on your computer In DSP BIOS TextConf file services are provided 1 26 JavaScript Language Highlights through the Rhino JavaScript interpreter via LiveConnect The implementation provides unrestricted use of the java io package Calls to the java io library from a script look just like JavaScript function calls Only the function called is written in Java For example these statements return the path to a file if it exists var file new java io File fileName if file exists return file getPath For documentation of the java io package see version 1 3 1 of the Java 2 SDK documentation at http java sun com j2se 1 3 docs In particular see the java io page at http java sun com j2se 1 3 docs api java io package summary html 1 5 5 4 print Method The print method is an extension to JavaScript that sends the result of the expression passed to the method to the stdout location Within the Rhino environment output from the print statement is displayed in the JavaScript Console window In this example if any array of objects has been assigned to obj these statements print a list of the objects in the array for var i in obj I print obj i obj i l This example uses the print method to get an array of Board objects and print a list of all the Board objects boards config boards f
89. letter capitalized For example TSK_idle stackSize 1 5 3 2 Property Types Section 2 2 DSP BIOS Module and Instance Property Names page 2 34 lists the type of value expected for each property and identifies properties used only for certain DSP platforms Most types are automatically converted to and from the corresponding JavaScript type 4 Arg Arg properties hold arguments to pass to program functions 4 Bool CDB files store Boolean true false values as 1 for true and 0 for false JavaScript handles both Boolean and integer values You may use JavaScript to assign either a true value or an integer 1 value to a Boolean Module or Instance property in order to set it to true Do not set a Boolean value to the quoted string true or false For example both of these statements disable use of the CLK manager to drive the PRD tick JavaScript Language Highlights PRD USECLK 0 PRD USECLK false 2 Enumint Enumerated integer properties accept a set of valid integer values These values are displayed in a drop down list in the DSP BIOS Configuration Tool 2 EnumString Enumerated string properties accept a set of valid string values These values are displayed in a drop down list in the DSP BIOS Configuration Tool 4 Int16 Integer properties hold 16 bit unsigned integer values The value range accepted for a property may have additional limits 4 Extern Properties that hold function names use the Extern type In
90. m TCP file if you are using custom hardware TI supplies platform files for most boards supported in Code Composer Studio These are located in tconflinclude See Section 1 5 10 Creating a Platform File page 1 37 for creating platform files utils loadPlatform Platform If your application will contain only one Board Cpu and Program type the following statement This method creates global variables that simplify references to Module and Instance objects Type the following line as the last statement in the file It is generally recommended but not required that program should match the filename of your target output file The prog gen method generates the appropriate CDB source header and linker command files for use in building your application prog gen program Add additional script statements to the file between the statements you typed in steps 3 and 4 The method used to specifying the platform in this script is best for simple situations in which you are not testing programs on multiple platforms or expecting to port programs to other platforms For more sophisticated ways to connect programs and platforms see Section 1 5 8 Specifying the Hardware Platform page 1 30 DSP BIOS TextConf Overview 1 11 Using DSP BIOS TextConf for New Applications 1 3 2 Debugging DSP BIOS TextConf Scripts As with other types of program development creating a DSP BIOS TextConf script is an iterative process You edit the scri
91. mber of variables within that array Additional variables may be added to the array using the D option on the tconf command line See Section 1 6 1 tconf Utility page 1 39 for information about command line options These variables can be used by scripts to obtain information about file names file locations and the hardware platform For example the following statement gets the name of the script file passed to the tconf utility on the command line myScript environment config scriptName JavaScript Language Highlights environment config tiRoot Contains the top level directory location of the Code Composer Studio installation If the installation directory can not be determined this variable is not defined environment config rootDir Contains the directory location of the executable file for the tconf utility This location is typically lt ccs_base_dir gt bin utilities tconf This variable is always defined environment config scriptName Contains the name of the script passed to the tconf utility on the command line This variable is always defined If no script was passed this variable is set to an empty string environment config path Contains the set of directories used to locate DSP BIOS TextConf components including the tconf executable the necessary import files and DLLs This variable is always defined This path may be added to using the p option on the tconf command line environm
92. me of your target program For example if your target program executable is hello exe use the following statement prog gen hello The prog name parameter can also specify a directory location to contain the generated files Example get Method Syntax Parameters Returns Description Example Target Content Object Model Reference If you omit the prog_name parameter the default prog_name is the name of the Program object If you specify a prog_name parameter all generated files begin with that prefix The cfg suffix is appended to the filename for all generated files and the appropriate file extensions all are added to all files Including the CDB file extension in the prog_name parameter is optional The gen method stores the files it creates in your current directory In contrast to the gen method the save method saves only the CDB file It does not generate the other associated files prog gen myAppl get name name Name of object to get Required object or null if error occurs The get method returns the object specified by the name parameter The get method can return any object in the namespace of the object for which it is called For example you can use the get method for a Program object to get any Module such as LOG Instance object such as LOG system or Extern object In contrast the module method can return only Module objects and the instance method can return
93. meric String EnumString Numeric String Numeric Numeric Numeric String Numeric String 2 35 CSL Module and Instance Property Names Table 2 10 C54x DMA Configuration Instance DMA Continued Description TextConf Name Source Program Page Address Register DMSRCP Numeric dmaDmsrcpNumeric Source Program Page Address Register DMSRCP Symbolic dmaDmsrcpSymbolic Destination Program Page Address Register DMDSTP Numeric dmaDmdstpNumeric Destination Program Page Address Register DMDSTP dmaDmdstpSymbolic Symbolic Element Address Index Register 0 DMIDX0 dmaDmidx0Adv Frame Address Index Register 0 DMFRIO dmaDmfri0Adv Element Address Index Register 1 DMIDX1 dmaDmidx1Adv Frame Address Index Register 1 DMFRI1 dmaDmfri1Adv Table 2 11 C54x DMA Resource Instance HDMA Description TextConf Name Open Handle to DMA dmaEnableHandle Specify Handle Name dmaHandleName Enable pre initialization dmaEnablePrelnit Pre initialize dmaPrelnit Table 2 12 C54x HDMA Pre Created Instance Names DMAO DMA1 DMA2 DMA3 DMA4 DMA5 2 36 Type Numeric String Numeric String Int16 Int16 Int16 Int16 Type Bool String Bool Reference CSL Module and Instance Property Names Table 2 13 C54x GPIO Configuration Instance GPIO Description Select IODIRO as 100 Select IODIR1 as 101 Select IODIR2 as 102 Select IODIR3 as 103 TextConf Name gpioloOdir gpiolo1dir gpiolo2dir gpiolo3dir Table 2 14 C
94. meric Transfer Counter Format dmaxXfrcntFormatAdv EnumsString Transfer Counter Numeric dmaxXfrent Numeric Table 2 54 C6000 DMA Resource Instance HDMA Description TextConf Name Type Open DMA Channel dmaHandleEnable Bool Handle dmaHandleName String Enable Pre Initialization dmaEnablePrelnit Bool Pre Initialize with dmaPrelnit Reference Table 2 55 C6000 HDMA Pre Created Instance Names DMA ChannelO DMA Channel1 DMA Channel2 DMA Channel3 DSP BIOS TextConf Reference 2 51 CSL Module and Instance Property Names Table 2 56 C6000 EDMA Configuration Instance EDMA Description TextConf Name Type Option edmaOptions Numeric Source Address Format edmaSrcAddrFormatAdv EnumsString Source Address Numeric edmaSrcAddrNumericAdv Numeric Transfer Counter Format edmaTransferCounterFormatAdv EnumString Transfer Counter Numeric edmaTransferCounterNumeric Numeric Destination Address Format edmaDstAddrFormatAdv EnumString Destination Address Numeric edmaDstAddrNumericAdv Numeric Index Format edmalndexFormatAdv EnumString Index register Numeric edmalndexNumeric Numeric Element Count Reload and Link Address edmaEcrldLinkAddr Numeric Table 2 57 C6000 EDMA Resource Instance HEDMA Description TextConf Name Type Open EDMA Channel edmaHandleEnable Bool Handle edmaHandleName String Enable Pre Initialization edmaEnablePrelnit Bool Pre Initialize with edmaPrelnit Reference Enable Selected Channel edmaEnableChannel Bool 2 52
95. mple location utils findSeed sim55 cdb utils getProgObjs A utility method that creates a global variable for every Module and Instance object in the specified Program object Using this method simplifies the syntax required to reference Module and Instance objects For example the standard syntax to reference the bufLen property of the LOG_system object is prog module LOG instance LOG system bufLen The first parameter for this method is the Program object for which you want to create variables The second parameter is an optional variable name to act as a container for the set of global variables If you omit the second parameter the global variables are standalone variables with no container For example these statements show the simple case in which there is one program object and the second parameter is omitted utils getProgObjs prog LOG system bufLen 128 If two Program objects are referenced by the prog 0 and prog 1 variables you can use statements like the following varso varsi utils getProgObjs prog_0 vars0 utils getProgObjs prog_1 varsl vars0 LOG system bufLen varsl LOG system bufLen 512 128 Most code examples in this document assume that the utils getProgObjs method was used with no second parameter to create global variables for all Module and Instance objects 1 5 5 3 Methods for File Manipulation For security reasons JavaScript does not provide any fi
96. ner objects These container objects may contain zero or more child objects For example within each Module object there is a container that contains a set of Instance objects The TCOM is shown in the following diagram Figure 2 1 Target Content Object Model TCOM Config object Board represents Memory v Memor Cpu y p object represents Memory Program software Extern Module Instance 2 1 1 Target Content Object Model Quick Reference This table summarizes the methods and properties of the objects in the Target Content Object Model For details see the sections on each class Table 2 1 Target Content Object Model Summary Object Objects Type Contained Methods Properties See Page Config Board board hasReportedError Page 2 4 boards name create destroy warn Board Cpu cpu boardFamily Page 2 8 Memory cpus boardRevision create config destroy men name plilndex 2 2 Table 2 1 Target Content Object Model Reference Target Content Object Model Summary Continued Object Type Cpu Program Memory Extern Module Instance Objects Contained Program Memory Module Extern none none Instance none Methods create destroy program programs extern externs destroy gen get load module modules save none none
97. nnnnonnrrvnnnennrrrnnrnrnnrrnnnrennrrrenrennnnnen 2 46 C55x Real Time Clock Configuration Instance RTCO rrrnnnnnnnrrrvnnnennrrennrennrrrenrennnrnnn 2 47 C55x Real Time Clock Resource Instance RTCRES rraanrnenenrrrnrorsrernnrnnnnnsnnnnnnnnnner 2 48 C55x RTCRES Pre Created Instance Names rrrrnrnnnnnvarerrrrrrrrnnnnnnnnennnnnnnnannnnnnnnnnnnenr 2 48 C55x Timer Configuration Instance TIMER annrrrrnnnonnvrvnnnennrrrennnrnnrrennrrnnrrresrennnrnen 2 48 C55x Timer Resource Instance HTIMER rarnnnnnnnnnnnnnnnnonovenenenrrrnrnrernrnnnnnnnnsnsnsnsnnnnen 2 48 C55x HTIMER Pre Created Instance Names rrrrnrnnnnnvorerrrrrrnrnnnnnnnnennnnnnnnnnnrnsnnnnnenenr 2 48 C55x USBRES Pre Created Instance Names rrrnrrrrrrrrrrrrarerernnnnnnnnnnnnnnnnsnnnensvenvnnener 2 49 C55x WDTIMER Configuration Instance VWDTIM srnnrrrnnnonnrrrvnnnennrrnnnrennrrrensrnnnrnen 2 49 C55x WDTIMER Resource Instance HWDTIM rrnrnvnononovonenenvrrnrnrerernnnnnnnnnnnnsnsnnnner 2 49 C6000 DMA Global Register Module GDMA rsrrrnnnnnnnvvvnnnnnnrvrrnnnnnrnnrrrnrrrnrrrerrennnrnen 2 49 C6000 DMA Global Register Instance GDMA rrrnnnnnnnvrvnnnnennrrrenrnrnnrrennrrnnrrrerrennnrnen 2 50 C6000 DMA Configuration Instance DMA rurannnvrnnnnennrrrnnnennnrrnnenennrrennrennnrrnnerennnne 2 51 C6000 DMA Resource Instance HDMA rnnnnnnnnnnnnnnnnvnnnnnnvenenenrnrnrernrernnnnnnnnnnsnsnnnnenen 2 51 C6000 HDMA Pre Crea
98. not catch the exception the script would terminate execution when the exception occurred try fileName prog name test tci load fileName catch e throw new Error e nNo fileName file 1 5 7 Configuration Coding Guidelines When using DSP BIOS TextConf we recommend using the following coding conventions 1 Name program level scripts program _boardcfg tcf where program is the name of the program and board is the name of the target board This allows the tconfini tcf startup script to initialize the Board Cpu and Program objects correctly For other ways to define the platform see Section 1 5 8 Specifying the Hardware Platform page 1 30 4 Use a file extension of tci for scripts included by the main script DSP BIOS TextConf Overview 1 29 JavaScript Language Highlights 1 30 A different file extension is recommended for included files to support different handling of the main script and included scripts by program build utilities such as gmake 4 Split configuration scripts into pieces that match the modules This allows re use of scripts wherever a module can be reused Conceptually each module now includes configuration script s 1 Name module level scripts mod tci where mod is the module name This enables one module s script to import another s with the load method 1 Treat the main program as a module Create a module level script called program tci that imports oth
99. nrnnnnnnnvrnnnnnnrnnrnnnnrennrnrenrennnrreesrennnnnn 2 39 2 18 C54x PLL Resource Instance HPLL srrnnrrnnnnonnnrrvnnrennrrnnennennnrrenrrennrrressennnrresrsennnnen 2 39 2 19 C54x HPLL Pre Created Instance Names nnnnnnnnnnnnnnnanvrnnnnnnnnnrnnnnrennrrrenrennnrrersernnnnne 2 39 2 20 C54x Timer Configuration Instance TIMER urnnonnnnnnnvvrnnvnnnrnvrrnnnrennrrrenrennnrrensrrnnnnne 2 39 2 21 C54x Timer Resource Instance HTIMER rrrnnnrrrnnnnnnnnrrnnnrnnnnrrnnrnennrrnnnrennrrresrrennrnnene 2 39 2 22 C54x HTIMER Pre Created Instance Names rrnnnnnnnnnnnrnnnnnannnnrnnnnrennrnrenrrnnnrrrrsrrnnnnn 2 40 2 23 C54x WDTIMER Configuration Instance VWDTIM wssnvrrnnanvanvrrvnnnennrrrnnrennnrrernrennnnne 2 40 2 24 C54x WDTIMER Resource Instance HWDTIM ornrvnnnnnrnnnnnnnnnrrnnnnennrrrenrennnrrensrrnnnnne 2 40 2 25 C54x HWDTIM Pre Created Instance Names rrrnnnnnnnnrnnnnnnnnnrrrnnnnennrrnenrnnnnrrenrnennrnen 2 40 2 26 C55x CHIP Configuration Instance CHIP eraunvvnnnnnnnnrvrnnennnrnnrnnnnrennrrrenrrnnnrreesernnnnne 2 40 2 27 C55x DMA Configuration Instance DMA ernrrarnnvvrnnnnnnnvrrnnnrnrnvrrnnsrennrrresrennnrrressrnnnnnr 2 41 2 28 C55x DMA Resource Module HDMA rrrrurvrnnnnnnvvvrnnnnnrenvrnnerrrrnnrrnnsrennrrresrennnrreesernnnnne 2 42 2 29 C55x DMA Resource Instance HDMA rrvnnasvnrvvrnnnnrsrvrnnenrrrnnrnnnrrrnnrrrenrennnrreeerrnnnnne 2 42 Tables 2 30 2 31 2 32 2 33
100. nrrnnrrrenrennnrnen 2 57 2 69 2 70 2 71 2 72 2 73 2 74 2 75 2 76 2 77 2 78 2 79 2 80 2 81 Tables C6000 MCBSP Resource Instance HMCBSP mrrarnnnrarvonenenrrrnrnnrnrnrnnnnnnnnnnennnnnnnnnnr 2 57 C6000 HMCBSP Pre Created Instance Names rrrrrrrrrrararernnnnnnnnnnnarornnnnnsnrnenvennsener 2 58 C6000 TCP Base Parameters TCPBP ccccccccceceeeeseeeceeeseessseeeeseseseceeeeeseseseeeeeeeess 2 58 C6000 TCP Configuration Instance TCPBP rnnrnnnnnennrrrnnnnnnnrrnnnnennrrrenrrnnnrressrennnnen 2 58 C6000 TCP Resource Instance HTCP rrnnnnnnnnnnnnnnnnnnnnnnenenenvrrnrnrernrnnnnnnnnsnsnsnssnsnnnen 2 59 C6000 TIMER Configuration Instance TIMER rrrrennennrrrnnnrennrrennrennrrrnnrennnrrnnnrennnnnr 2 59 C6000 TIMER Resource Instance HTIMER cccccccceceeceeeeeeeseseeeseseseceeeeeseseeeeeeeeeess 2 59 C6000 HTIMER Pre Created Instance Names rrrrrnrrrrrrrererernnnnnnnnnnnnnnnnrnsnnnrnsnvenenener 2 59 C6000 VCP Base ParameterS VCPBP ccccccccceceeaeseeeceeeeesseseesesesesececeeeseseseeseeeeees 2 60 C6000 VCP Configuration Instance VCPBP rrnnnrrrnnnnnnnrrnnnnnnnrrnnnrennnrrnnsnensrreneserennn 2 60 C6000 VCP Resource Instance HVCP rrrrnnnanannanannannnenvnrnrnrnrnrnnnnnnnnnnnnsnsnnnnnnnnnnnner 2 60 C6000 XBUS Configuration Instance XBUS rrrnnrrrnnrennnrrnnrnrnnrrnnnrennnrrnnsrensrrennrernnnn 2 61 C6000 XBUS Resource Instance HXBUS r
101. nt Object Model Reference page 2 2 for a list of the properties and methods of each of these object classes 1 2 3 Configuration File Types The following file types are source files for DSP BIOS TextConf 1 filename tcf TextConf File TCF containing a DSP BIOS TextConf script If you follow certain optional conventions when naming this file properties that define your board and CPU type are set automatically See Section 1 5 7 Configuration Coding Guidelines page 1 29 for details about these conventions tci TextConf Include TCI file A script file included by the main tcf file or by another tci file A different file extension is used for included files to support different handling of the main script and included scripts by program build utilities such as gmake tep TextConf Platform TCP file A script file that acts as a starting point for applications by setting up target specific objects It defines the hardware related TCOM objects and loads a configuration template Typical TCF scripts begin by using the utils loadPlatform method to load a TCP script TCP scripts are provided with DSP BIOS TextConf for a number of common platforms 1 target cdb Configuration template files also called a seed files For example evm62 cdb These files are provided with DSP BIOS as starting points for configuring applications for various targets They can be loaded into a script with the prod load method or by loading
102. ntained by the constructor file Note Platforms supported on Solaris Code Composer Studio for Solaris supports only the C55x and C64x platforms L DSP BIOS TextConf Reference 2 9 Target Content Object Model Reference Example destroy Method 2 10 Syntax Parameters Returns Description Examples For example you can create an C54 Cpu object with the following statement utils importFile C54 config boards 0 create cpu 0 C54 The order of objects created within a container array is undefined You may use JavaScript s array sorting methods to get sorted lists of objects create initial Board object under config board config create board 0 create a C54 Cpu object under board utils importFile C54 board create cpu 0 C54 destroy none true if successful false if failed The destroy method destroys the specified object This method fails and returns false if the object is either referenced by another object or contains objects Notice that while the create method creates an object one layer lower in the hierarchy than the object whose method is used the destroy method deletes the actual object whose method is used While you will probably not need to use the destroy method when writing configuration scripts from scratch the destroy method is often needed in scripts created by the cdbcmp utility to compare two configuration files
103. ntellectual property right relating to any combination machine or process in which TI products or services are used Information published by TI regarding third party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof Use of such information may require a license from a third party under the patents or other intellectual property of that third party or a license from Tl under the patents or other intellectual property of TI Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties conditions limitations and notices Reproduction of this information with alteration is an unfair and deceptive business practice TI is not responsible or liable for such altered documentation Resale of Tl products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice TI is not responsible or liable for any such statements Mailing Address Texas Instruments Post Office Box 655303 Dallas Texas 75265 Copyright 2002 Texas Instruments Incorporated Preface Read This First About This Manual DSP BIOS gives developers of mainstream applications on Texas Instruments TMS320 DSP device
104. only Instance objects For more information about namespaces see Section 1 5 3 3 Namespace Management page 1 22 If there is no object with the specified name in the namespace of the container whose get method is used get returns null In this example instanceof is a JavaScript operator that returns true if the object is of the specified class Instance is the name of a class lookup existing object named audio audio prog get audio if audio is an Instance object if audio instanceof Instance audio priority 1 set its priority DSP BIOS TextConf Reference 2 21 Target Content Object Model Reference load Method Syntax Parameters Returns Description Example module Method 2 22 Syntax Parameters Returns Description load cdb file cdb file Filename of CDB file to load objects from void The load method reads a CDB file and populates the Target Content Object Model with the Module Instance and Extern objects named in the CDB file This method assumes that Config Board Cpu and Program objects have been created and that prog is a global variable that references the Program object The load method does not create global variables to reference each Module and Instance object If you want such global variables to be created use the utils getProgObjs method which is described in Section 1 5 5 2 Methods for Working with CDB Files page 1 25
105. or i 0 i lt boards length i print board i board i name 1 5 6 Error Handling Three levels of errors are reported by the host configuration objects From least to most significant the levels are 1 Warning Probable but unconfirmed error action completed Warnings are disabled by default but can be enabled with the config warn method or the w command line switch Warnings are written to the stderr location if they are enabled DSP BIOS TextConf Overview 1 27 JavaScript Language Highlights 1 28 4 Error Confirmed error action failed The error status of a script is tracked by the config hasReportedError property Error messages are always written to the stderr location 2 Exception Confirmed error action failed non local return Scripts can throw exceptions Exceptions thrown by a script or TCOM object can be caught in a script Uncaught exceptions cause a script to terminate execution Exceptions are always written to the stderr location even if they are caught by a script In the interactive debugging shell stderr messages are shown as separate lines without the js gt command prompt In the GUI debugger stderr messages are shown in the JavaScript Console window The exit status from the tconf utility is 0 success unless a script specified on the command line could not be run for example because the file was not found If the script runs and results in errors the tconf ex
106. or the create method of the config object If this variable is defined it may be used DSP BIOS TextConf Overview 1 23 JavaScript Language Highlights 1 24 by the startup procedure to populate the hardware related portion of the object model For example tconf Dconfig platform Dsk6211 1 5 4 2 Argument Array Variables DSP BIOS TextConf creates an array called arguments and automatically stores in it arguments passed to the script on the tconf command line These variables can be used to modify the behavior of a script depending on the command line used to run it For example suppose a command line like the following is used tconf myscript tcf 4 2 1 The following statements could then be used in myscript tcf to set variables used when creating various DSP BIOS objects numOfTasksToCreate arguments 0 numOfReaders arguments 1 numOfWriters arguments 2 1 5 5 File Interaction and I O Methods DSP BIOS TextConf provides the methods described in the following sub sections for working with script files configuration files other files and output to stdout Directory paths specified in JavaScript statements can use either or as a directory separator 1 5 5 1 Methods for Loading Scripts A DSP BIOS TextConf script can load another script file When a script file is loaded any statements outside functions run and the functions defined in the loaded script are available to be called by the script
107. ot be used in a web page As with the DOM the TCOM is a hierarchy of container objects These container objects may contain zero or more child objects For example within each Program object there is a Module container that contains an array of Module objects The TCOM object hierarchy is shown in the following diagram Figure 1 2 Target Content Object Model TCOM Config object represents hardware object represents Memory Program Se Extern Module Instance The top level Config object contains the entire configuration Each object class has methods and properties The entire object tree can be navigated by JavaScript statements DSP BIOS TextConf Overview 1 7 An Overview of DSP BIOS TextConf Notice that a configuration can contain multiple Board objects Boards can contain multiple Cpu objects and Cpu objects can contain multiple Program objects This extends the graphical configuration object tree which supports only one board cpu and program per configuration Several methods are provides for populating the hardware and software portions of the object model If you have a single Board Cpu and Program you can also use the utils getProgObjs method to define global variables for all objects which allows you to reference individual objects by name without using the full object hierarchy notation See Section 2 1 Target Conte
108. perty of the Config object Objects also have methods that define actions the object can perform Methods are also accessed using the dot notation For example config destroy deletes the Config object Such methods are actually functions that are local to the object The Target Content Object Model TCOM defines object classes that contain an array of zero or more objects For example within each Board object there is a cpu container that contains an array of Cpu objects You can use the bracket notation or the name of an object to reference an individual object For example these notations all reference the endian property of a Cpu object config boards 0 cpus 0 endian config boards board_0 cpus cpu_0 endian If global variables have been declared for board 0 and cpu 0 then the following additional expressions reference the same property board_0 cpus 0 endian board_0 cpus cpu_0 endian cpu_0 endian JavaScript Language Highlights You can use the utils getProgObjs method to create global variables that reference all Module and Instance objects after you load a configuration from a CDB file This simplifies object references as shown by the following references to the LOG_system instance 4 Full reference path config boards 0 cpus 0 programs 0 module LOG instance LOG system 4 Reference path using the prog variable automatically created to reference the f
109. pt is a loosely typed language Variables in JavaScript are more flexible than variables in C or Java Variables do not need to be explicitly declared and the same variable can alternately store any data type These types are number string Boolean value array object function which is actually an object itself and null Operators automatically convert values between data types as necessary Variables can be local to a function or global to the entire JavaScript environment Variable and object names may not contain spaces or punctuation other than or In addition variable and object names can include numbers but must not begin with a number JavaScript does not have pointers and does not deal with memory addresses 1 5 2 Common Misconceptions About JavaScript If you ve used JavaScript before you have probably added scripts to a web page It s important to clear up misconceptions some programmers may have about JavaScript when used outside the context of web pages 4 JavaScript is a general purpose cross platform programming language While it was developed for use in web browsers it has a number of features that make it useful for application configuration It is easy to learn and use the syntax is similar to C it is object oriented and it is widely documented JavaScript is standardized The language is also called ECMAScript and the ECMA 262 standard defines the language see http Awww ecma ch ecma1 STAND ECMA
110. pt with a text editor and test it with the tconf utility As a result of testing you may edit the script again Figure 1 4 File Flow for DSP BIOS TextConf Debugging w generated or provided file L edited file Y Text Editor program tcf File tconf Utility CDB Template The tconf utility provides three operation modes the interactive debugging shell Section 1 3 3 Using the Interactive Debugging Shell page 1 12 the GUI debugger Section 1 3 4 Using the GUI Debugger page 1 14 and command line mode Section 1 6 1 tconf Utility page 1 39 In any mode if the script uses the prog gen method the CDB source header and linker command files are generated for use in building your application files If the script uses the prog save method only the CDB file is generated 1 3 3 Using the Interactive Debugging Shell The tconf utility provides an interactive JavaScript debugging shell You enter the interactive shell if you use the tconf command without specifying a script or using the g option The command line syntax for the interactive debugging shell is as follows tconf Dname value js lt jsshell opts gt Using DSP BIOS TextConf for New Applications You can run a script from the interactive shell using the built in load method For example tconf js gt load foo tcf For each line or group of lines
111. re is only one Config object this Config object contains all Boards in the configuration This property is gettable only It is set when the Board object is created The men array is used to access an array of Memory objects contained by this Board object For more information see Section 2 1 6 Memory Class page 2 25 The name property of an object holds the name of that object This property is gettable only It is set when the object is created Names of Board objects must be unique The plllndex lowercase PLL Index specifies the bit patterns of the clkmode pins on the board This value is used to determine factors used to calculate the speed of the CPU which is important for several other configuration properties In addition the clockOscillator property of the Cpu object is used when calculating the speed of the CPU For example the C5402 DSK has three clkmode pins If they are set from left to right as off on off the bitmask would be 010 and the resulting plllndex value is 2 decimal DSP BIOS TextConf Reference 2 11 Target Content Object Model Reference Define PLL index value used to compute CPU speed config board dsk5402 pllIndex 2 This property is typically set only in the platform file The range of valid values for the plllndex is as follows for different targets 4 For C28 0 to 31 4 For C54x 0 to 7 4 For C55 0 or 1 4 For C6000 0 to3 2 12 Table 2 4 create Method
112. reate a Cpu object by loading the CPU architecture definition for example 5402 This brings in the Cpu attributes including the on chip memory definitions and the DSP BIOS hardware settings 5 Define the external memory populated on the board 6 Set the value for the clock oscillator on the board 7 Set the PLL index This is an index into an enumerated list of chip specific hardware software PLL multiplication factors The following example shows a typical platform file The step numbers correspond to the items in the previous list D8SK5402 top DESCRIPTION 54XX Dsk5402 with 64K SRAM and 256K FLASH Create new config object config new Config config 0 Create new board object config create dsk5402 Create new cpu object config board dsk5402 create cpu 0 utils loadArch 5402 DSP BIOS TextConf Overview 1 37 JavaScript Language Highlights 1 38 Step 5 Step 6 Step 7 Define external memory on board config board dsk5402 mem config board dsk5402 mem 0 comment External Program Memory name EPROG space code base 0x8000 len 0x7 80 yi config board dsk5402 mem 1 comment External Data Memory name EDATA space data base 0x8000 len 0x8000 Define clock oscillator value on board for specified cpu in Mhz config board dsk5402 cpu cpu 0 clockOscillator
113. red This script loads a target specific CDB file containing the target type MEM objects and HWI objects and more Loading this file is equivalent to choosing a template with the DSP BIOS Configuration Tool Since this is a separate statement it is easy to make later changes to the target for the application The script also creates a LOG object called trace and sets the buffer length of two LOG objects After creating objects and setting properties the script calls the prog gen method to generate both a CDB file and source header and linker command files to be used when compiling and linking the application An Overview of DSP BIOS TextConf 1 2 2 The Target Content Object Model TCOM Modern scripting languages separate the language syntax from the object model This division is true of such languages as VBScript JavaScript and TCL The major benefit of this division is that the script language can be standardized independently from its application domain Object models typically define a single top level object designed to allow navigation via an object hierarchy to all other objects For example in a web browser the object model is called the Document Object Model DOM and the top level object is the window For DSP BIOS TextConf the object model is called the Target Content Object Model TCOM and the top level object is the Config object The DOM model cannot be used with DSP BIOS TextConf and the TCOM cann
114. refix is not needed for the names of any Extern objects This property is gettable only It is set when the object is created Names of Extern objects must be unique within the Program object that contains them DSP BIOS TextConf Reference 2 27 Target Content Object Model Reference Table 2 8 2 1 8 Module Class Module Class Summary create Method 2 28 Syntax Parameters Returns Description Object Type Contains Methods Properties Module Instance create defined in CDB instance name instances program A Program object may contain one or more Module objects Module objects may contain one or more Instance objects Module objects represent a target module within a single program The only way to create a Module object is to load a CDB file with the prog load or utils loadPlatform method Do not use the create method of the Program object to create Module objects If the utils getProgObjs method has been called a global variable is defined for each Module object For example DSP BIOS contains modules named LOG TSK and MEM These correspond to Module objects named LOG TSK and MEM The corresponding global JavaScript variables are LOG TSK and MEM Module objects have properties that are specific to the type of module and are defined within the CDB file that has been loaded The examples in this section assume that the utils getProgObjs method was called with the second parameter omitted after
115. returned array to attempt to delete referring objects or to display meaningful errors display list of all objects that reference IDATA refs IDATA references for i 0 i lt refs length i print IDATA name is referenced by refs i name The module property holds the Module object that contains the Instance object This property is gettable only It is set when the Instance object is created thread_type myThread module name The name property of an object holds the name of that object This property is gettable only It is set when the object is created Names of Instance objects must be unique within the namespace of the Program object that contains them Program objects define a namespace that includes all Extern Module and Instance objects contained by the Program object Extern Module and Instance objects within two different Program objects can have duplicate names The names of Extern Module and Instance objects are the same as their C identifiers Example CDB Properties Example Target Content Object Model Reference assemble a list of the module names in prog list modules prog modules for i 0 i lt modules length i list modules i name Normally all objects in a class have the same set of properties However in a CDB file each DSP BIOS module and each instance type has a different set of properties Therefore properties for Modul
116. ric Numeric Numeric Type Bool String Bool Reference 2 57 CSL Module and Instance Property Names Table 2 70 C6000 HMCBSP Pre Created Instance Names Mcbsp PortO Mcbsp Port1 Mcbsp Port2 Table 2 71 C6000 TCP Base Parameters TCPBP Description TextConf Name Type Decoder Standard 3GPP IS2000 tcpBaseParamStandard EnumsString Code Rate RATE tcpBaseParamRate EnumString Frame length FL tcpBaseParamFrameLen Int16 Prolog Size P tcpBaseParamProlSize Int16 Maximum Iteration MAXIT tcpBaseParamMaxlt Int16 Snr Threshold SNR tcpBaseParamSnrTh Int16 Output Paramters Read Flag OUTF tcpBaseParamOutFlag EnumString Interleaver Write Flag INTER tcpBaseParamInterFlag EnumString Table 2 72 C6000 TCP Configuration Instance TCPBP Description TextConf Name Type Input control register 0 ICO tcplcO Numeric Input control register 1 IC1 tcplc1 Numeric Input control register 2 IC2 tcplc2 Numeric Input control register 3 IC3 tcplc3 Numeric Input control register 4 IC4 tcplc4 Numeric Input control register 5 IC5 tcplc5 Numeric 2 58 CSL Module and Instance Property Names Table 2 73 C6000 TCP Resource Instance HTCP Description TextConf Name Enable Parameters Setting tcpEnableParams Pre Initialize with tcpBaseParamInit Output TCP Params ConfigName ex tcpParam tcpParamConfigName Set TCP Params Values to the IC Config Obj tcpSetParamEnable Enable Pre Initialization tcpEnablePrelnit
117. rnrarnsnraovrnenenvrrnrererernnnnrnnnnnsnsnsnnennnnnnnnnnn 2 61 Chapter 1 DSP BIOS TextConf Overview This chapter compares the two methods for configuring DSP BIOS programs and provides details about using DSP BIOS TextConf Topic Page 1 1 DSP BIOS Configuration Methods 2 200 eee eens 1 2 1 2 An Overview of DSP BIOS TextConf eee e eee 1 6 1 3 Using DSP BIOS TextConf for New Applications 1 10 1 4 Migrating Applications to DSP BIOS TextConf 1 15 1 5 JavaScript Language Highlights 0 eeeeeeee 1 17 1 6 Command Line Utility Reference auauumaunn vanns 1 39 1474JExample Senpts FLLRRA EEE 1 43 DSP BIOS Configuration Methods 1 1 DSP BIOS Configuration Methods DSP BIOS allows you to create and configure static objects for use by the DSP BIOS API as part of your application design DSP BIOS provides the following methods of configuring your applications at design time 2 DSP BIOS Configuration Tool graphical configuration The DSP BIOS Configuration Tool is supported in Code Composer Studio only for Microsoft Windows Graphical configuration is described in the DSP BIOS User s Guide and in the online help for the DSP BIOS Configuration Tool 1 DSP BIOS TextConf text based configuration For this method you use a text editor to write DSP BIOS TextConf scripts Command line utilities run and generate these scripts The scripts use the standar
118. rs couCoreRevision property attrs dataWordSize Property Example attrs minDataUnitSize Property attrs minProgUnitSize Property Target Content Object Model Reference The attrs dataWordSize property contains the size of a word int on this Cpu in 8 bit units On C5000 platforms attrs dataWordSize is two 8 bit units On C6000 platforms attrs dataWordSize is four 8 bit units This property is gettable only It is set if the cpu_type argument to the Board object s create method matches a constructor function and that constructor function sets the attrs dataWordSize property In this example the application s data frame size FRAME_SIZE is measured in 16 bit samples However DSP BIOS pipe objects DSS_rxPipe have frame sizes measured in the platform dependent word size So the attrs dataWordSize property in 8 bit units is used to convert from the application s frame size to the DSP BIOS frame size var FRAME SIZE 64 in 16 bit units var WORD SIZE prog cpu attrs dataWordSize in 8 bit units convert appl frame size to platform word size DSS rxPipe framesize 2 FRAME SIZE WORD SIZE DSS rxPipe numframes 2 So on C5000 platforms DSS rxPipe framesize equals 2 64 2 or 64 On C6000 platforms DSS rxPipe framesize equals 2 64 4 or 32 The attrs minDataUnitSize property contains the size of the smallest addressable data value in 8 bit units On C5000 platforms the attrs
119. s are then added automatically or included by other files already in the project Example Scripts 1 7 Example Scripts The following examples and the examples in Chapter Chapter 2 show a variety of ways to use DSP BIOS TextConf 1 7 1 Minimizing Application Code Size If you are implementing programs on a C5000 platform you might add a line like the following to all your applications to import a script you create that sets properties that minimize the size of the target code utils importFile minfootprint The following example script minimizes the code size footprint of a DSP BIOS application don t use TSK threads TSK USETSK 0 remove all default use of heaps MEM SEGZERO MEM NULL MEM MALLOCSEG MEM NULL loop through all MEM objects and remove any heap var memObjs MEM instances for var i 0 i lt memObjs length i if memObjs i MEM NULL amp amp memObjs i createHeap 1 memObjs i createHeap 0 remove SYS stuff SYS TRACESIZE 0 bind abort to user defined error function SYS ABORTFXN prog extern error bind exit and error to the same function SYS EXITFXN prog extern error SYS ERRORFXN prog extern error bind SYS_putc to a fxn that does nothing SYS PUTCFXN prog extern FXN F nop DSP BIOS TextConf Overview 1 43 Example Scripts 1 44 1 7 2 Mailbox Example The following script configures the m
120. s the ability to develop embedded real time software DSP BIOS provides a small firmware real time library and easy to use tools for real time tracing and analysis This book is intended as an addendum to the TMS320 DSP BIOS User s Guide In addition the TMS320 DSP BIOS API Reference Guide for your platform provides reference information about DSP BIOS modules and properties discussed in this book Notational Conventions This document uses the following conventions 1 Program listings program examples and interactive displays are shown in a special typeface Examples use a bold version of the special typeface for emphasis interactive displays use abold version of the special typeface to distinguish commands that you enter from items that the system displays such as prompts command output error messages etc 1 Square brackets and identify an optional parameter If you use an optional parameter you specify the information within the brackets Unless the square brackets are in a bold typeface do not enter the brackets themselves lt ccs_base_dir gt indicates the directory in which Code Composer Studio was installed Trademarks Trademarks Licences The Texas Instruments logo and Texas Instruments are registered trademarks of Texas Instruments Trademarks of Texas Instruments include Tl XDS Code Composer Code Composer Studio Probe Point Code Explorer DSP BIOS RTDX Online DSP Lab TMS320 TMS320C54x
121. s the platform name to the tconf command lines re targeting the entire suite is as simple as naming the target platform in the build command line JavaScript Language Highlights 1 5 8 3 Specifying Platform and Directory on the Command Line Notice that hellocfg tcf generates the configuration files in the current working directory typically the directory containing the tcf file Since the names of the configuration files are derived from the configuration script name this script would overwrite the files for one platform with the files for another platform if a build system ran the script twice with different command line parameters To avoid overwriting files a script can specify an output directory for the configuration files based on the platform parameter passed to the script For example the hellocfg tcf configuration script can be re written as follows utils loadPlatform environment config platform utils importFile hello tci prog gen environment config platform prog name In this example the generated configuration files are placed in a sub directory of the current working directory Thus a single build system can generate configuration files for later execution on multiple platforms using this single script Notice that the slash character is used to separate the directory name from the rest of the file name Since this character works on both Windows and UNIX platforms the script above can
122. s you would properties of other object classes GBL CALLMODEL prog build target model codeModel CLK MICROSECONDS 25000 Target Content Object Model Reference 2 1 9 Instance Class Table 2 9 Instance Class Summary create Method destroy Method Syntax Parameters Returns Description Object Type Contains Methods Properties Instance destroy defined in CDB references module name A Module object may contain one or more Instance objects Instance objects do not contain any objects Instance objects represent a single target object Loading a CDB file defines Module and Instance objects in the JavaScript environment The create method of a Module object can also be used to create Instance objects Instance objects have properties that are specific to the type of module that contains them and are defined within the CDB file that has been loaded All properties can be set even those that are not writable in the DSP BIOS Configuration Tool If setting a property fails because of a rule defined in the CDB file for setting that property an error is reported but no exception is thrown Note that while individual objects within any container object may be referred to as instances there is also a specific object class called Instance which is the child of the Module class Thus the instances method of the Module class returns an array of Instance objects Because of the potential for confusion this do
123. set when the object is created There is only one Config object so its name is unique by definition DSP BIOS TextConf Reference 2 7 Target Content Object Model Reference 2 1 3 Board Class Table 2 3 Board Class Summary cpu Method Syntax Parameters Returns Description cpus Method Syntax Parameters Returns Description 2 8 Object Type Contains Methods Properties Board Cpu cpu boardFamily Memory cpus boardRevision create config destroy menm name plilndex A configuration may contain one or more Board objects Board objects may contain one or more Cpu and Memory objects Board objects have properties for storing information about the board hardware used A default Board object is created by the startup script see Section 1 5 9 1 Startup Script Actions page 1 35 Additional Board objects can be created with the config create method cpu name name Name of object to get Required object or null if error occurs The cpu method returns the Cpu object specified by the name parameter If there is no object with the specified name in the specified Board object cpu returns null cpus none Array of all Cpu objects contained in the specified Board object The cpus method gets an array of all the cpus contained within the Board object Example create Method Syntax Parameters Returns Description Target Content Object Model Reference get bo
124. ted Instance Names c ccsssssseseseseeeeececeeeeceeeeeeeeeeeeenenenes 2 51 C6000 EDMA Configuration Instance EDMA rnrvrnnrnannrrvnnnennrrrnnnnrnnrrrnnrennrrreneennnrnen 2 52 C6000 EDMA Resource Instance HEDMA rnnnnnnnnnnnnnnnnnnonnnnnenvnrnrnrnrnrnnnnnnnnnnsnsnnnnenen 2 52 C6000 HEDMA Pre Created Instance Names rrrrnranavarerrrrrrrrnnnnnnnnnnnnnnnnnnrnnnsnsnnnnnenr 2 53 C6000 Parameter RAM Table Entry Instance Edmatable ronnrnnnnnnnnrrrnnnnnnnrnnnnnnnnnn 2 54 C6000 EMIF Configuration Instance EMIF ssnnnrnnnannnnnrnnrnnnnnnrnnnnnennrrnnsrennnrrnssrennnnne 2 54 C6000 EMIF Resource Instance HEMIF rnnnnnnnnnnonnnnnvnnnnnnvenevenvrrnrnrnrnrnnnnnnnnnnsnsnnnnenen 2 55 C6000 EMIFA Configuration Instance EMIF A rnnrrnnnnonnrrrnnnennnrrnnrnennrrennrennnrrensnennren 2 55 C6000 EMIFA Resource Instance HEMIFA rrrrnnnonnnnnonnnnnrvenenenvrrnrnrnrnrnnnnnnnnsnsnsnnnnener 2 56 C6000 EMIFB Configuration Instance EMIFB rrrrannnnrrrvnnnnnnrrnnnnonnrrnnnrennnrrrnnnennnne 2 56 C6000 EMIFB Resource Instance HEMIFB cccccccccccecseseceeaeaeseseseeeeeeseeeeseseseeeeeees 2 56 C6000 CSL Extern Declaration Module ExternDecl rrrannnnaaavevenrrrrrrrererernnnrernnnnnnnn 2 57 C6000 CSL Extern Declaration Instance ExternDecl rrrrnrnanrrrrrorerernnrnnnnnnnnnnnnnnnnnr 2 57 C6000 MCBSP Configuration Instance MCBSP murnnnnrrvnnnnnnrrrvnnnrnnrrvn
125. tes the script commands necessary to convert the settings in the first CDB file to the settings in the second CDB file The cdbcmp utility generates a DSP BIOS TextConf script that loads the first CDB file modifies the configuration to match the second CDB file and saves the resulting configuration as a CDB file 1 6 3 gconfgen Utility gconfgen projname cdb This command line utility reads a CDB file and generates the corresponding source header and linker command files The CDB file may have been created with the DSP BIOS Configuration Tool or the prog gen method in DSP BIOS TextConf On Solaris the gconfgen exe file is installed in the lt ccs_base_dir gt plugins bios directory On Windows it is installed in the lt ccs_base_dir gt plugins bios folder If your DSP BIOS TextConf script uses prog gen you do not need to use this utility to generate files If your DSP BIOS TextConf script uses DSP BIOS TextConf Overview 1 41 Command Line Utility Reference 1 42 prog save only the CDB file is created you should use the gconfgen utility to generate the corresponding files The gconfgen utility generates the following files programcfg c c programcfg h programcfg s programcfg h programcfg cmd ES A A A See Section 1 2 3 Configuration File Types page 1 8 for descriptions of these files Only the program cdb and programcfg cmd files need to be added to your Code Composer Studio project The other file
126. that loaded the file DSP BIOS TextConf provides the following methods for loading script files 11 load An extension to JavaScript that runs JavaScript statements in any file The file path and full filename must be specified For example load project includes file tci or load project includes file tci JavaScript Language Highlights 2 utils importFile A utility method that attempts to find and load the specified file using a search path For example utils importFile minFootprint If you do not specify a file extension this function looks for the specified file with an extension of tci If the config importPath variable was defined using the D option on the tconf command line utils importFile first looks in the directories in that search path If the config importPath variable was not defined utils importFile looks first in the current directory If the file is not found utils importFile then looks in the include subdirectory of the directory that contains the tconf executable 2 utils loadArch A utility method that loads a CPU architecture file This utility is typically used within a platform definition file when creating a Cpu object For example Create new cpu object config board dsk5402 create cpu 0 utils loadArch 5402 2 utils loadPlatform A utility method that loads a platform definition file tcp Such platform definition files contain scripts
127. that create the Config Board and Cpu objects for the hardware platform They also load the CDB template file for that platform For example utils loadPlatform Dsk6211 This function looks for the specified file in the same locations as the utils importFile method A number of pre defined platform definition files are provided in the include subdirectory of the directory that contains the tconf executable You can create custom platform definition files by using the provided files as examples 1 5 5 2 Methods for Working with CDB Files DSP BIOS TextConf provides these methods for working with CDB files 1 prog load A method of Program objects This method reads the specified CDB file and populates the Target Content Object Model with the modules and instances named in the CDB file It assumes the Config Board Cpu and Program objects have already been created Provide a relative path to the file from the current directory or the full path For example prog load test mytemplate cdb DSP BIOS TextConf Overview 1 25 JavaScript Language Highlights Another way to load a CDB file is to use the utils loadPlatform method described in Section 1 5 5 1 Methods for Loading Scripts page 1 24 utils findSeed A utility method that returns the full path of the specified CDB file This utility looks for the file in the lt cos base dir gt VciHHAbioslinclude directories If it cannot find the file it returns null For exa
128. tring Table 2 27 Description Set Manually Source Destination Register CSDP Control Register CCR Interrupt Control Register CICR Source Space Source Address Format Lower Source Address CSSA L Numeric Byte Address Lower Source Address CSSA_L Symbolic Byte Address Upper Source Address CSSA_U Numeric Byte Address Upper Source Address CSSA_U Symbolic Byte Address Destination Space Destination Address Format Lower Destination Address CDSA_L Numeric Byte Address Lower Destination Address CDSA_L Symbolic Byte Address Upper Destination Address CDSA_U Numeric Byte Address Upper Destination Address CDSA_U Symbolic Byte Address Element Number CEN Frame Number CFN Frame Index CFI Source Frame Index CSFI Destination Frame Index CDFI Element Index CEI Source Element Index CSEI Destination Element Index CDEI DSP BIOS TextConf Reference C55x DMA Configuration Instance DMA CSL Module and Instance Property Names TextConf Name dmaSetManually dmaCsdp dmaCcr dmaCicr dmaSrcSpaceAdv dmaSrcAddrFormatAdv dmaCssalNumeric dmaCssalSymbolic dmaCssauNumeric dmaCssauSymbolic dmaDstSpaceAdv dmaDstAddrFormatAdv dmaCdsalNumeric dmaCdsalSymbolic dmaCdsauNumeric dmaCdsauSymbolic dmaCenAdv dmaCfnAdv dmaCfiAdv dmaCfiSrcAdv dmaCfiDstAdv dmaCeiAdv dmaCeiSrcAdv dmaCeiDstAdv Type Bool Numeric Numeric Numeric EnumsString EnumString Numeric String N
129. ts created by the cdbcmp utility to compare two configuration files config boards EVM6201 cpus C6201 destroy program name name Name of Program object to get Required object or null if error occurs The program method returns the Program object specified by the name parameter programs Method Syntax Parameters Returns Description Example board Property Examples clockOscillator Property Example endian Property Target Content Object Model Reference If there is no object with the specified name in the Cpu object program returns null programs none Array of all Program objects contained in the specified Cpu object The programs method gets an array of all the Program objects contained within the specified Cpu object create short cut for program config scripts var prog config boards 0 cpus 0 programs 0 The board property holds the Board object that contains the Cpu object This property is gettable only It is set when the Cpu object is created utils importFile myApp_ prog cpu board boardFamily function checkMIPS cpu get board containing this cpu var board cpu board get all cpus on this board var cpus board cpus var MIPS cpu MIPS for var i 0 i lt cpus length i check all cpus against cpu MIPS if cpus i MIPS MIPS throw new Error All board name Cpus must run at the same rate
130. umeric String EnumsString EnumString Numeric String Numeric String Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric 2 41 CSL Module and Instance Property Names Table 2 28 C55x DMA Resource Module HDMA Description TextConf Name Type PG1 0 Compatibility Mode Select dmaModeSelect EnumString Generate Global DMA Configuration and Function Call dmaGenerateGlobalCall Bool Set Manually dmaSetManually Bool Global Control Register GCR dmaGcr Numeric Enable DMA clocks during IDLE AUTOGATE dmaGcrAutogate Bool Table 2 29 C55x DMA Resource Instance HDMA Description TextConf Name Type Open Handle to DMA dmaHandleEnable Bool Specify Handle Name dmaHandleName String Enable pre initialization dmaEnablePrelnit Bool Pre initialize dmaPrelnit Reference Table 2 30 C55x HDMA Pre Created Instance Names DMAO DMA1 DMA2 DMA3 DMA4 DMA5 Table 2 31 C55x EMIF Configuration Instance EMIF Description TextConf Name Type Configure Manually emifManuallConfigure Bool Global Control Register emifGer Numeric Global Reset Register emifGrr Numeric 2 42 CSL Module and Instance Property Names Table 2 31 C55x EMIF Configuration Instance EMIF Continued Description TextConf Name emifCeOscr1 Type Numeric CEO Space Control Register 1 CEO Space Control Register 2 CEO Space Control Register 3 CE1 Space Control Register 1 CE1 Space Control Register 2 CE1 Space Control Register 3 CE2
131. vention dsk54 dsk5416 dsk62 dsk67 evm54 evm55 evm62 sim54 sim55 sim62 and sim64 Program name If a script is specified on the tconf command line the program name is the filename minus any cfg suffix and the file extension For example if the command line is as follows the Program object is called myapp_dsk62 tconf myapp dsk 2cfg tcf Step 1 Step 2 Step 3 Step 4 JavaScript Language Highlights 1 5 10 Creating a Platform File TextConf platform files tcp provide definitions for the hardware execution platform A platform file populates the hardware aspects of the Target Content Object Model TCOM See Section 2 1 1 Target Content Object Model Quick Reference page 2 2 for details about the TCOM Platform files for boards supported by Code Composer Studio are provided in the tconflinclude directory The file naming convention is Boardname tcp for example Dsk6711 tcp If you want to create a new platform file or understand the platform file for your board the following list describes the steps performed within a platform file 1 Create a comment heading and a tag line for example IDESCRIPTION 54XX for tools that read and display the platform files available for a given family of processors such as 54xx You may also want to include a revision history section 2 Create a top level Config object 3 Instantiate a Board object giving it the name of the board for example dsk5402 4 C
132. y is undefined You may use JavaScript s array sorting methods to get sorted lists of objects create global context for configuration scripts var config new Config config 0 create an EVM62 Board object within config utils importFile Evm62 board 0 config create board 0 Evm62 create a generic Board object within config board 1 config create board 1 display number of DSPs on board 0 print board 0 has board cpus length DSPs destroy none true if successful false if failed The destroy method destroys the specified Config object This method fails and returns false if the object is either referenced by another object or contains objects Notice that while the create method creates an object one layer lower in the hierarchy than the object whose method is used the destroy method deletes the actual object whose method is used While you will probably not need to use the destroy method when writing configuration scripts from scratch the destroy method is often needed in scripts created by the cdbcmp utility to compare two configuration files Fails if config contains a board config destroy So destroy the previously created board board destroy Succeeds if config is now empty and unreferenced config destroy warn Method Syntax Parameters Returns Description Example hasReportedError Property Example
Download Pdf Manuals
Related Search
Related Contents
¡Advertencia! Sandberg Adapter USB on PS/2-port CESAR-LCPC N000961 Ultra S Stand 11-2007.book OU2 - ifm USER MANUAL eazy CLOT BC5023001-M User care manual Series 90-70 CPU, 16 MHz, 32-Bit Expandable, IC697CPU789, GFK LANsmart Pro user manual Introduction LANsmart Pro is a hand Copyright © All rights reserved.
Failed to retrieve file