The .vector section is defined with the .rodata attribute. Make sure the vector table is written in the
source files, as shown below.
For C sources (vector.c)
Declare a vector table with const to specify that it be located in the .rodata section.
Example:
const unsigned long vector[] = {
(unsigned long)boot,
(unsigned long)addr_err,
(unsigned long)nmi,
(unsigned long)dummy,
(unsigned long)dummy
};
For assembler sources (boot.s)
Declare a .rodata section and write a vector table following it.
Example:
.section .rodata, "a"
.long
BOOT
.long
ADDR_ERR
.long
NMI
.long
DUMMY
.long
DUMMY
If you are using an assembler source in which a vector table is written in the .text section and you want
the table to be located in the .vector section, select the desired method from the following options:
Method 1: Editing the source file
(1) Insert a .rodata directive similar to the one shown above before the vector table in the source
file. If a program is written after the vector table, insert a .text directive in front of it and declare
a .text section.
(2) In the new project wizard, select the [Allocate a specific file to '.vector' section] check box, then
boot.o in the combo box. (If the source is other than boot.s, enter the file name of the source.)
Method 2: Editing section information in the iDE (using the source file as is)
(1) In the new project wizard, select the [Allocate a specific file to '.vector' section] check box, then
boot.o in the combo box. (If the source is other than boot.s, enter the file name of the source.)
(2) In the [Edit Section] dialog box, change the attribute of the .vector section to .text. (Refer to
the discussion in the next and the following pages.)
If you are not using the .vector section, deselect the [Allocate a specific file to '.vector' section] check
box and edit the .text section in the [Edit Section] dialog box to locate boot.o at the top.
S5U1C17001C ManUal
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
:
; 0x0
; 0x4
; 0x8
:
; 0x48
; 0x4c
EPSOn
// 0x0
0
// 0x4
1
// 0x8
2
// 0x48
18
// 0x4c
19
0
1
2
18
19
5 gnU17 iDE
5
IDE
5-133
Need help?
Do you have a question about the S5U1C17001C and is the answer not in the manual?
Questions and answers