![]() ![]() |
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 |
[Code Composer]
BackgroundCompile=SAFE
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)
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)
For additional
information, please refer to the C54x Instruction Set Simulator readme
file.
Remote
Channel Enable/Disable
Utilized
only during continuous mode.
FAR mode
support
The correct
definition is: #define Failure 0x80004005
This applies to both the example code presented in the RTDX Tutorial document and the corresponding C++ source files (*.cpp) provided with the tutorial.
SDSsq07165
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
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.
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. |
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.
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
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:
Note:
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.Guarded Inlining and the _INLINE Preprocessor SymbolYou 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);
...
}
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.Inlining RestrictionsIn 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).
- Prototype a static inline version of the function. Then, prototype an alternative, non-static, externally-linked version of the function. Conditionally preprocess these two prototypes with the _INLINE preprocessor symbol, as shown below.
- Create an identical version of the function definition in a .c or .cpp file, as shown below.
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.
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).Automatic Inline Expansion (-oi Option)A function may be disqualified from inlining if it:
- returns a struct or union
- has a struct or union parameter
- has a volatile parameter
- has a variable length argument list
- declares a struct, union, or enum type
- contains a static variable
- contains a volatile variable
- is recursive
- contains a pragma
- has too large of a stack (too many local variables)
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:For additional information, please see the following files: Mnemonic Assembler readme file.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.
- If you set the /size/ parameter to 0 (-oi0), automatic inline expansion is disabled.
- If you set the /size/ parameter to a nonzero integer, the compiler will use this size threshold as a limit to the size of the functions it automatically inlines. The optimizer multiplies the number of times the function is inlined (plus 1 if the function is externally visible and its declaration cannot be safely removed) by the size of the function. The compiler inlines the function only if the result is less than the /size/ parameter. The compiler measures the size of a function in arbitrary units; however, the optimizer information file (created with the -on1 or -on2 option) reports the size of each function in the same units that the -oi option uses.
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.
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.
All register names must be entered in uppercase. You should modify all of your current command files (*.cmd) before running them. (SDSsq06678)
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.
To initialize the DSK5402 properly:
To initialize the DSK5402 to run the blink example: