Texas InstrumentsThe World Leader in DSP and Analog

'C5000 Code Composer Studio v1.19 Release Notes

Installation Hardware  
DSP BIOS Plugins  
     
C55x Information: C54x Information:  
C55x Code Composer C54x Code Composer C54x Emulation
C55x Code Generation C54x Code Generation C5421 Emulation
C55x Simulator C54x RTDX C54x Simulator

 


C54x Code Composer

Some anti-virus programs can cause problems when building a project with Code Composer Studio.  The anti-virus software may cause A:\ to be accessed on each file compiled, or may cause compilation to hang. (SDSsq06918, SDSsq06879, SDSsq06730) If you observe these symptoms, there are three workarounds:
[Code Composer]
BackgroundCompile=SAFE

C55x Code Composer

SDSsq10601
When the ARM bit is set, disassembly of instructions containing short literals may be incorrect. (NOTE: This is a bug for Phase 3 only. This is fixed for Phase 2.)

SDSsq10377
The option to generate an absolute assembly listing, -aa, does not actually assemble the assembly source file. When this option is specified, a listing will be generated, but an object file will not.

SDSsq10318
Internal catastrophic failures in the compilation tools may not be detected by Code Composer, which may in that circumstance erroneously report that the project built to completion without error.

If the on-line help is already displayed, clicking on the "Help" button of the a plug-in only brings the on-line help to the foreground, but does not display the specific plug-in's help. (SDSsq09807)

When there are two text sections defined in the same source file, Code Composer does not display the mixed source-ASM for both sections. It displays it for one, but not the other. If one section is moved to a different source file, then they both display mixed source-asm correctly. (SDSsq10510)


Installation

Multiple Code Composer Studio installs on Windows 98 (second release) can result in a failure to boot windows 98. It appears to be a problem with windows 98 second release and it's inability to have more than a few items in autoexec.bat.

Windows 95 has a 64KB limitation to the size of the following key:
HK_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs. CCS installation inserts the path of almost all files installed by it into this key. This results in too many entries in this key, causing install/uninstall to potentially fail on some workstations. This also negatively affects installation of other applications later on such a system (causing "out of registry space" problem). This also has the side-effect of requiring users to select "Yes to all" during un-install - to avoid having to click "Yes" for all these (hundreds of) files marked as "shared". This problem is to be fixed in Code Composer Studio 1.20

Code Composer Studio uses the C54x 3.50 Code Generation toolset. If an older Code Generation toolset is installed, it may be useful to uninstall the older version before installing Code Composer Studio. More than one Code Generation toolset on the same machine can cause unwanted environment variable issues.

During installation on Win95/98, user is prompted to add the line c5000.bat to the autoexec.bat. This will add the proper environment variables to the system. Choosing NO will cause most applications to not function properly.

When installing Code Composer Studio v1.19 over the 'C6000 Code Composer Studio DSK Tools v1.05, the user will be prompted to uninstally the DSK Tools. Upon completion of the uninstall, a dialog box will prompt the user to reboot the machine. Select NO and continue with the Code Composer Studio v1.19 installation program. Selecting Yes will have the effect of not prompting the user to reboot the machine at the end of the Code Composer Studio v1.19 installation program. (SDSsq10787)



DSP BIOS

The Advanced tutorial that demonstrates the usage of the new features added to DSP/BIOS (dynamic tasks, semaphores, mailboxes, etc) is not shipped with CCS 1.19, it will be available in CCS 1.2. ·

C55x Instruction Set Simulator

The following functionality is supported in this release: For additional information, please refer to the C55x Instruction Set Simulator readme file.

C54x Instruction Set Simulator

The following are the enhancements and bug fixes in this release of the simulator as compared to the Simulator component in the 1.10 CCS product. The C54x Simulator Driver, under CCS Setup, now has a configuration file as one of its properties that can be set by the user. This replaces the Device ID that was in the earlier releases. On browsing in the 'drivers' directory, you will see all the configuration files available for c54x devices. You can pick the one matching the device that you intend to simulate. (Gel files are NOT to be manually loaded from the GEL menu to set the simulator configuration.)

For additional information, please refer to the C54x Instruction Set Simulator readme file.


C54x RTDX


Remote Channel Enable/Disable

Continuous Mode Flow of Control


FAR mode support

Revised Target API Revised Host API Assembly Interface Tutorial Bug Fixes

SDSsq07165

Known Problems


C54x Emulation


IER Bit 0 (Reset Interrupt Enable bit).

Bit 0 of the Interrupt Enable Register displays incorrectly in the debugger window. Although this bit always displays as '0' on the debugger, it is actually always '1' (it is tied high on chip).
 

Software Debugger/Emulator
 

For additional information, please refer to the Emulation readme file.

C5421 Emulation

The Code Composer Studio debugger hides the complexity of dealing with shared memory when building and debugging applications. The only extra effort we ask of 5421 users is to link the entire 128K of shared memory space into each application. This will allow both debuggers running on each core to be aware of the symbols of the entire 128K of shared address space. In the case where the entire 128K of shared address space will be logically shared as well as physically shared the user will not actually need any extra effort to link the entire 128K of shared memory. The exact same .out file will suffice for both cores.

For additional information, please refer to the C5421 Emulation readme file.



C55x Code Generation


Use the new directive ".ivec" for initializing the entries in the interrupt vector table.
 

Background on Interrupt Vectors

An interrupt vector on the C55x is 8-bytes long. Byte 0 of the reset vector contains the setting for the stack mode. Byte 0 of the remaining vectors is ignored. Bytes 1-3 encode the 24-bit byte address of the interrupt service routine (ISR). Bytes 4-7 encode an instruction which is executed before branching to the ISR. Only the first instruction found in bytes through 4-7 is executed.
 

Syntax

The syntax is ...

[label:] .ivec [address [, stack mode]]
 
 
 
label If present, will be assigned the code (byte) address associated with the directive, not the data (word) address as with other directives.
.ivec  The directive itself. 
address  The address of the interrupt service routine. If not present, then 0 is used. 
stack mode  You can specify a stack mode only for the reset vector, which must be the first .ivec in the interrupt vector table.

 
Syntax Means 
C54X_STK 32-bit stack needed by converted C54x code 
USE_RETA 16-bit plus register fast return; used by the compiler 
NO_RETA  16-bit slow return 
More information on the stack modes can be found in the online TMS320C5xx CPU User's Guide. Note you can write these symbolic names in either upper case or lower case.

Using Inline Function Expansion

When an inline function is called, the C/C++ source code for the function is inserted at the point of the call. This is known as inline function expansion. Inline function expansion is advantageous in short functions for the following reasons:

There are four types of inline function expansion:
Function Inlining Can Greatly Increase Code Size Expanding functions inline increases code size, especially inlining a function that is called in a number of places. Function inlining is optimal for functions that are called only from a small number of places and for small functions.
Inlining Intrisic Operators:
There are several intrinsic operators for the 'C55xx. All of them are automatically inlined by the compiler. The inlining happens automatically whether or not you use the optimizer. (Example: ETSI-GSM Intrinsics)
Automatic Inlining:
Automatic inline function expansion is performed on small functions when the -o3 option is used.
Unguarded Definition-Controlled Inlining
The inline keyword specifies that a function is expanded inline at the point at which it is called rather than by using standard calling procedures. The compiler will perform inline expansion of functions declared with the inline keyword.

You must invoke the optimizer with any -o option (-o0, -o1, -o2, or -o3) to turn on definition-controlled inlining. Note that automatic inlining is also turned on when using -o3.

The -pi option turns off definition-controlled inlining. This option is useful when you need a certain level of optimization but do not want definition-controlled inlining.

The following example shows usage of the inline keyword, where the function call will be "replaced" by the code in the called function.

Usage of the inline keyword

inline int volume_sphere(float r)
{
return 4.0/3.0 * PI * r * r * r;
}

int foo(...)
{ ...
volume = volume_sphere(radius);
...
}

Guarded Inlining and the _INLINE Preprocessor Symbol
When declaring a function in a header file as static inline, additional procedures should be followed to avoid a potential code size increase when inlining is turned off with -pn or the optimizer is not run.

In order to prevent a static inline function in a header file from causing an increase in code size when inlining gets turned off, use the following procedure. This will allow external-linkage when inlining is turned off; thus, only one function definition will exist throughout the object files.

In Example 2-1 (Compiler Manual), there are two definitions of the strlen function. The first, in the header file, is an inline definition. Note that this definition is enabled and the prototype is declared as static inline only if _INLINE is true (_INLINE is automatically defined for you when the optimizer is used and -pi is *NOT* specified).

The second definition, for the library, ensures that the callable version of strlen exists when inlining is disabled. Since this is not an inline function, the _INLINE preprocessor symbol is undefined (#undef) before string.h is included to generate a noninline version of strlen's prototype.

Inlining Restrictions
There are several restrictions on what functions can be inlined for both automatic inlining and definition-controlled inlining. Functions with local static variables or a variable number of arguments are not inlined, with the exception of functions decalred as static inline. In functions decalred as static inline, expansion occurs despite the presence of local static variables. In addition, a limit is placed on the depth of inlining for recursive or nonleaf functions. Furthermore, inlining should be used for small functions or functions that are called in a few places (though the compiler does not enforce this).

A function may be disqualified from inlining if it:

Automatic Inline Expansion (-oi Option)
The optimizer automatically inlines small functions when it is invoked with the -o3 option. A command-line option, -oi/size/, specifies a size threshold. Any function larger than the size threshold will not be automatically inlined. You can use the -oi/size/ option in the following ways: The -oi/size/ option controls only the inlining of functions that are not explicitly declared as inline. If you do not use the -oi/size/ option, the optimizer inlines very small functions. See section 2.10 for information on controlling other types of inlining.

NOTE:

-o3 Optimization and Inlining In order to turn on automatic inlining, it is necessary to use the -o3 option. Note that -o3 turns on other optimizations. If you desire the -o3 optimizations, but not automatic inlining, use -oi0 with the -o3 option.

NOTE:

Inlining and Code Size Expanding functions inline increases code size, especially inlining a function that is called in a number of places. Function inlining is optimal for functions that are called only from a small number of places and for small functions. In order to prevent increases in code size because of inlining, use the options -oi0 and -pi. These options will cause the compiler to inline intrinsics only.

For additional information, please see the following files: Mnemonic Assembler readme file.

C54x Code Generation

The 'near' and 'far' keywords are now supported. When the 'far' keyword is associated with a function, all calls to that function are made with the FCALL instruction. When the 'near' keyword is used, all calls to that function are made with the CALL instruction. Note, however, that the size of pointers to the functions is not affected.

The linker now permits code that has been compiled with the -mf option to be linked with code that has not been compiled with the option. However, when 'mixed' code is linked, a warning is issued.

The compiler option -on (create optimizer information file) does not work.

When entering options manually in the Build Options dialog, the optimizer level option -o erroneously defaults to -o0. It should default to -o2. The proper optimizer level is set, however, if the options check boxes are used instead of entering the option manually.

The TAP5000 (Translation Assistant Program) can be invoked from C:\ti\c5400\cgtools\bin\tap5k\bin\tap5000.exe.



Plugins

Command Window

All register names must be entered in uppercase. You should modify all of your current command files (*.cmd) before running them. (SDSsq06678)

Data Converter Support Plug-In

The Data Converter Support Plug-In (DCSP) is a new addition to the standard set of CCS plug-ins. The DCSP is a new tool to support TI DSP customers using also TI's data converter products. Currently the DCSP supports a limited number of data converter devices (see device table below). Development for further support is ongoing.

DCSP allows the customer to configure all necessary parameters an advanced data converter device offers and creates a set of 'C' code functions to address this data converter using the DSP. The actual functions are device dependent and usually allow to configure, read and/or write the data converter. In some cases additional support functions are provided to provide special functionality such as power-down, power-up or reset. Files created by DCSP are automatically added to the CCS project. All data entered into DCSP can be saved within a CCS workspace file.

For additional information, please refer to the Data Converter Support Plug-in readme file.


Hardware

The DSK5402 needs to be initialized with the correct register values and to use SRAM in order to run the CCS tutorials and RTDX diagnostics.

To initialize the DSK5402 properly:

  1. From CCS select gel->C54x->C54xReset
  2. Also, select gel->C54x->c5402_DSK
  3. Also, select gel->C54x->Enable_DSK_SRAM
(All three Gel files need to be loaded before loading any of the above programs on the DSK5402.)

To initialize the DSK5402 to run the blink example:

  1. From CCS select gel->C54x->C54xReset
  2. Also, select gel->C54x->Enable_DSK_SRAM
CCS 'C5402 DSK TOOLS: