This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

.vectors 段无法写入

因为程序中用到了TIMER,需要用到中断,在自己更改了CMD文件之后提示.vecrors段无法写入!

下面是自己写的CMD文件,DSP是5509A,没有外挂任何RAM或flash.

编译后提示错误:

program will not fit into available memory.  placement with alignment/blocking fails for section ".vectors" size 0x100 page 0.  

Available memory ranges: P_VECT       size: 0x80         unused: 0x80         max hole: 0x80

CMD文件:

-w
-stack 500
-sysstack 500
-l rts55x.lib

MEMORY
{
PAGE 0:
IOPORT: origin = 00100h length = 01100h
SARAM0: origin = 01200h length = 06e00h
SARAM1: origin = 08000h length = 07c00h
P_VECT0(RIX): origin = 0fc00h length = 00200h
P_VECT1(RIX): origin = 0fe00h length = 00200h

PAGE 1:
PROG0: origin = 010000h length = 030000h

}

SECTIONS
{
vectors : { } > P_VECT0 PAGE 0
.vectors : { } > P_VECT1 PAGE 0  注:(<----这里错误!)
.text : { } > SARAM1 PAGE 0
.cinit : { } > SARAM1 PAGE 0
.csldata : { } > SARAM1 PAGE 0
.switch : { } > SARAM1 PAGE 0
.stack : { } > SARAM1 PAGE 0
.sysstack : { } > SARAM1 PAGE 0
.bss : { } > SARAM1 PAGE 0
.cio : { } > IOPORT PAGE 0
.const : { } > SARAM1 PAGE 0
.sysmem : { } > SARAM1 PAGE 0
}

MAP文件:

该错误能生产out文件,仿真时提示错误,无法进行仿真。

仿真提示的错误信息:

Trouble Halting Target CPU: (Error -2130 @ 0x400) Unable to access device memory. Verify that the memory address is in valid memory.

以下是vectors.s55文件:

; "@(#) DSP/BIOS 4.90.270 06-11-03 (barracuda-m10)"
.sect ".vectors"
.global _VECSTART
.ref _c_int00
.def nmi, int0, int1, int2, int3, int4, int5, int6
.def int7, int8, int9, int10, int11, int12, int13
.def int14, int15, int16, int17, int18, int19, int20
.def int21, int22, int23, int24, int25, int26, int27
.def int28, int29

_VECSTART:
.ivec _c_int00,c54x_stk
nmi .ivec no_isr
nop_16
int0 .ivec no_isr
nop_16
int1 .ivec no_isr
nop_16
int2 .ivec no_isr
nop_16
int3 .ivec no_isr
nop_16
int4 .ivec no_isr
nop_16
int5 .ivec no_isr
nop_16
int6 .ivec no_isr
nop_16
int7 .ivec no_isr
nop_16
int8 .ivec no_isr
nop_16
int9 .ivec no_isr
nop_16
int10 .ivec no_isr
nop_16
int11 .ivec no_isr
nop_16
int12 .ivec no_isr
nop_16
int13 .ivec no_isr
nop_16
int14 .ivec no_isr
nop_16
int15 .ivec no_isr
nop_16
int16 .ivec no_isr
nop_16
int17 .ivec no_isr
nop_16
int18 .ivec no_isr
nop_16
int19 .ivec no_isr
nop_16
int20 .ivec no_isr
nop_16
int21 .ivec no_isr
nop_16
int22 .ivec no_isr
nop_16
int23 .ivec no_isr
nop_16
int24 .ivec no_isr
nop_16
int25 .ivec no_isr
nop_16
int26 .ivec no_isr
nop_16
int27 .ivec no_isr
nop_16
int28 .ivec no_isr
nop_16
int29 .ivec no_isr
nop_16


.text
.def no_isr
no_isr:
b #no_isr

  • guanghua huang 说:
    vectors : { } > P_VECT0 PAGE 0

    这个是什么段?哪来的?

    上面的提示是

    guanghua huang 说:
    P_VECT0(RIX): origin = 0fc00h length = 00200h

    这块内存不够用了,因为前面放了vectros段了,剩下的不够了。