S5U1C17001C ManUal
EPSOn
8-31
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
8 aSSEMBlEr
8
Assemblr
8.9 Precautions
•
To perform assembly source level debugging with the debugger
gdb
, specify the
--gstabs
assembler option to
add the source information to the output object file when assembling the source file.
•
Always be sure to use the
xgcc
compiler and/or
as
assembler to add debugging information (
.stab
directive)
in the source file and do not use any other method. Also be sure not to correct the debugging information that is
output. Corrections could cause the
as
,
ld
or
gdb
to malfunction.
•
To prevent errors during linkage, be sure to write the
.section
directive with the
.align
directive to clearly
define the section boundary.
Example:
.section .rodata
.align 2 ;
←
Essential
.long data1
.long data2
•
Up to 512 characters can be used for a global symbol name and up to 32,000 global symbols can be defined.
•
The assembler source, map and dump files have an upper limit of 2,047 characters per line (except for a new line
character). An error will occur if there is a line that exceeds the limit.
•
More than one source file cannot be specified as the input file of the
as
assembler. An error will occur if
specified.
•
The output file name specified with the
-o
option must be the same as that of the input source file name (except
for the file name extension).
•
When the
ext
instructions are written directly to an assembler source to extend basic instructions, they will
not be optimized even if the
-mc17_ext
option is specified. When creating an assembler source, use
s
*
or
x
*
extended instructions for data transfer, arithmetic operation, and branch if a symbol is used as the operand.
•
If the branch destination symbol for a relative branch instruction is located in another section, the branch
instruction will not be optimized even if the
-mc17_ext
option is specified.
Example:
.text_A 0x00000000 :
{
__START_ text_A = . ;
sub_1.o(.text)
sub_2.o(.text)
sub_3.o(.text)
sub_4.o(.text)
__END_ text_A = . ;
}
.text_B 0x00C00000 :
{
__START_text_B = . ;
main.o(.text)
__END_ text_B = . ;
}
In this example, the extended instructions for referencing or branching to a symbol between "
main.o
" and
"
sub_
X
.o
" will not be optimized. Therefore, new sections should not be added in the linker script file (
.lds
) if
they are not necessary.
•
When a file name is described twice or more in a dump file (source files with the same name (except extension
and path) exist), optimization for local symbols using the dump file will not be performed. This is not applied
when the uppercase and lowercase letter configuration is different even if the file name is the same. Furthermore,
this condition does not affect optimization for global symbols using a map file.
Summary of Contents for S5U1C17001C
Page 6: ......
Page 17: ...1 General S5U1C17001C Manual 1 General ...
Page 18: ......
Page 21: ...1 2 Install S5U1C17001C Manual 2 Installation ...
Page 22: ......
Page 29: ...3 SoftDev S5U1C17001C Manual 3 Software Development Procedures ...
Page 30: ......
Page 103: ...4 SrcFiles S5U1C17001C Manual 4 Source files ...
Page 104: ......
Page 121: ...5 IDE S5U1C17001C Manual 5 gnU17 iDE ...
Page 122: ......
Page 365: ...6 Compiler S5U1C17001C Manual 6 C Compiler ...
Page 366: ......
Page 385: ...7 Library S5U1C17001C Manual 7 library ...
Page 386: ......
Page 405: ...8 Assemblr S5U1C17001C Manual 8 assembler ...
Page 406: ......
Page 439: ...9 Linker S5U1C17001C Manual 9 linker ...
Page 440: ......
Page 449: ...10 Debugger S5U1C17001C Manual 10 Debugger ...
Page 450: ......
Page 626: ...11 Tools S5U1C17001C Manual 11 Other Tools ...
Page 627: ......
Page 696: ...S1C17 Family C Compiler Package Quick Reference Reference ...