
3-26
SC100 C Compiler
Using the SC100 C Compiler
3.3.8.3 Copying initialized variables from ROM
During development you would normally use a loader to set the values for global variables, and to load
these initialized variables into RAM at startup, together with the executable application.
When you have finished development, if your final application does not use a loader, you must ensure that
when the completed application executes, the initialized variables will be copied from ROM into RAM. To
do this, when you compile the final application version, specify the
-mrom
option.
Refer to
Chapter 6,
“
Runtime Environment,
”
for more detailed information about the initialization of
variables in the runtime environment.
3.3.8.4 Specifying the silicon revision
This option lets you specify the revision number of the silicon chip currently in use. You need to use this
only if a new version has been issued since the original installation.
Select the option
-rev
followed by the revision number.
3.3.8.5 Defining the profiling information file
Profiling information describes the timing behavior of specific inputs for an application, meaning the exact
number of times each specified source line executes. This information can be stored in a file and read by
the compiler in order to enhance the efficiency of the optimization.
To instruct the compiler to read profiling information, select the option
-pro
, followed by a file name with
one of the following:
The name
tcovd
On a PC, any file name and the extension
.tdf
On a SPARCstation, any file name and the extension
.d
The
-pro
option may be specified only once in the command line.
In Example 3-8, the compiler reads the profiling information file
coder.tdf
, and uses this information
during optimization to determine the exact number of times that certain lines of code execute.
Example 3-8. Defining a profiling information file
ccsc100 -pro coder
.
tdf -o coder.eld coder.c
3.3.8.6 Specifying big-endian mode
By default, the compiler generates code based on the assumption that the architecture operates in
little-endian mode, meaning the least significant bits in the lower address. If you want to run the
application in an environment that operates in big-endian mode, meaning the most significant bits in the
lower address, specify the option
-be
.