DSPRelated.com
Forums

Problem with vector.asm

Started by melaniesaayman November 18, 2003
Hi all,

I'm using the C6711DSK. When I try to allocate the .text section to
external SDRAM I get 3 of the following errors:

>> error: relocation overflow occured at address 0x00000080 in
section 'vectors' of input
file 'C:\ti\myprojects\mp3decoder\vectors.obj'.
The 32-bit PC-relative displacement -536865758 at this location is
too large to fit into the 21-bit PC-Relative field; the destination
address is too far away from the instruction. You may need to add a
mask to the assembly instruction or use other target specific
assembly features if you really only need the lowest 21 bits of
this symbol. Please see the section on Relocation in the Assembly
User's Guide.

I don't get these errors when allocating the .text section to IRAM.
I've attached my cmd file and an extract of the vectors.asm file
below.

I would appreciate it if you could help me.
Thank you.
Melanie CMD FILE
========
-l rts6700.lib

MEMORY
{
vecs: o = 00000000h l = 00000200h
IRAM: o = 00000200h l = 0000FE00h
CE0: o = 80000000h l = 01000000h
}

SECTIONS
{
"vectors" > 0h
.cinit > IRAM
.text > IRAM /*CE0*/
.stack > IRAM
.bss > IRAM
.const > IRAM
.data > IRAM
.far > CE0 /*IRAM*/
.switch > IRAM
.sysmem > IRAM
.tables > IRAM
.cio > IRAM
.sdram > CE0
mydata > CE0
} VECTOR.ASM FILE (extract)
===============
.ref _mcbsp0_rx_intr
.ref _usb_rx
.ref _c_int00

.sect "vectors"

RESET_RST:
b _c_int00
NOP
NOP
NOP
NOP
NOP
NOP
NOP

NMI_RST:
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP

RESV1:
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP

RESV2:
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP

INT4:
b _usb_rx
NOP
NOP
NOP
NOP
NOP
NOP
NOP INT8:
b _mcbsp0_rx_intr
NOP
NOP
NOP
NOP
NOP
NOP
NOP



Melanie-

> I'm using the C6711DSK. When I try to allocate the .text section to
> external SDRAM I get 3 of the following errors:
>
> >> error: relocation overflow occured at address 0x00000080 in
> section 'vectors' of input
> file 'C:\ti\myprojects\mp3decoder\vectors.obj'.
> The 32-bit PC-relative displacement -536865758 at this location is
> too large to fit into the 21-bit PC-Relative field; the destination
> address is too far away from the instruction. You may need to add a
> mask to the assembly instruction or use other target specific
> assembly features if you really only need the lowest 21 bits of
> this symbol. Please see the section on Relocation in the Assembly
> User's Guide.

SDRAM is at 0x80000000 in the DSK board memory map, way more than 21 bits away
from
onchip SRAM and beyond the C6xxx capability for single-instruction jump. But
you can
still get there if you use a register to hold the target address. Here is a
relevant
answer from P Ligander that pops up if you do a quick archive search for
"21-bit":

http://groups.yahoo.com/group/c6x/message/1538

Jeff Brower
system engineer
Signalogic > I don't get these errors when allocating the .text section to IRAM.
> I've attached my cmd file and an extract of the vectors.asm file
> below.
>
> I would appreciate it if you could help me.
> Thank you.
> Melanie
>
> CMD FILE
> ========
> -l rts6700.lib
>
> MEMORY
> {
> vecs: o = 00000000h l = 00000200h
> IRAM: o = 00000200h l = 0000FE00h
> CE0: o = 80000000h l = 01000000h
> }
>
> SECTIONS
> {
> "vectors" > 0h
> .cinit > IRAM
> .text > IRAM /*CE0*/
> .stack > IRAM
> .bss > IRAM
> .const > IRAM
> .data > IRAM
> .far > CE0 /*IRAM*/
> .switch > IRAM
> .sysmem > IRAM
> .tables > IRAM
> .cio > IRAM
> .sdram > CE0
> mydata > CE0
> }
>
> VECTOR.ASM FILE (extract)
> ===============
> .ref _mcbsp0_rx_intr
> .ref _usb_rx
> .ref _c_int00
>
> .sect "vectors"
>
> RESET_RST:
> b _c_int00
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
>
> NMI_RST:
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
>
> RESV1:
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
>
> RESV2:
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
>
> INT4:
> b _usb_rx
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
>
> INT8:
> b _mcbsp0_rx_intr
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP



Melanie-

> I'm using the C6711DSK. When I try to allocate the .text section to
> external SDRAM I get 3 of the following errors:
>
> >> error: relocation overflow occured at address 0x00000080 in
> section 'vectors' of input
> file 'C:\ti\myprojects\mp3decoder\vectors.obj'.
> The 32-bit PC-relative displacement -536865758 at this location is
> too large to fit into the 21-bit PC-Relative field; the destination
> address is too far away from the instruction. You may need to add a
> mask to the assembly instruction or use other target specific
> assembly features if you really only need the lowest 21 bits of
> this symbol. Please see the section on Relocation in the Assembly
> User's Guide.

SDRAM is at 0x80000000 in the DSK board memory map, way more than 21 bits away
from
onchip SRAM and beyond the C6xxx capability for single-instruction jump. But
you can
still get there if you use a register to hold the target address. Here is a
relevant
answer from P Ligander that pops up if you do a quick archive search for
"21-bit":

http://groups.yahoo.com/group/c6x/message/1538

Jeff Brower
system engineer
Signalogic > I don't get these errors when allocating the .text section to IRAM.
> I've attached my cmd file and an extract of the vectors.asm file
> below.
>
> I would appreciate it if you could help me.
> Thank you.
> Melanie
>
> CMD FILE
> ========
> -l rts6700.lib
>
> MEMORY
> {
> vecs: o = 00000000h l = 00000200h
> IRAM: o = 00000200h l = 0000FE00h
> CE0: o = 80000000h l = 01000000h
> }
>
> SECTIONS
> {
> "vectors" > 0h
> .cinit > IRAM
> .text > IRAM /*CE0*/
> .stack > IRAM
> .bss > IRAM
> .const > IRAM
> .data > IRAM
> .far > CE0 /*IRAM*/
> .switch > IRAM
> .sysmem > IRAM
> .tables > IRAM
> .cio > IRAM
> .sdram > CE0
> mydata > CE0
> }
>
> VECTOR.ASM FILE (extract)
> ===============
> .ref _mcbsp0_rx_intr
> .ref _usb_rx
> .ref _c_int00
>
> .sect "vectors"
>
> RESET_RST:
> b _c_int00
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
>
> NMI_RST:
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
>
> RESV1:
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
>
> RESV2:
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
>
> INT4:
> b _usb_rx
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
>
> INT8:
> b _mcbsp0_rx_intr
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP
> NOP