TI中文支持网
TI专业的中文技术问题搜集分享网站

C6748中断向量表分配内存地址后编译出错

您好,我将中断向量表分配到地址 0x00001C00处,并将中断向量表地址寄存器指向了它

MEMORY
{
    VECTORS      o = 0x00001C00  l = 0x00000400   /*中断向量表*/
}

SECTIONS                                      {
    .vecs          >  VECTORS
}

然后调试时不能加载设备,出现如下错误

C674X_0: Trouble Writing Memory Block at 0x80001e20 on Page 0 of Length 0x54: (Error -1190 @ 0x1C00) Unable to access device memory. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 5.0.747.0)C674X_0: GEL: File: D:\TI\workspace_v5_2\interrupt_test\Debug\interrupt_test.out: Load failed.
C674X_0: Error: (Error -1190 @ 0x0) Unable to access device memory. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 5.0.747.0)

我查看.map文件,发现.text中的intvecs.obj (.text)起始地址0x80001e00,长度0x20,跟错误中显示的地址有关。.cinit起始地址0x80001e20,长度0x54跟提示错误对应。我如果直接将.vec放进share RAM中而不给他手动分配地址就不会出现任何错误

.text      0    80001000    00000e20     
                  80001000    000007e0     init.obj (.text)
                  800017e0    00000160     test interrupt.obj (.text)
                  80001940    00000100     rts6740.lib : autoinit.obj (.text:__auto_init)
                  80001a40    000000e0                 : exit.obj (.text:_exit)
                  80001b20    000000a0                 : cpy_tbl.obj (.text:_copy_in)
                  80001bc0    000000a0                 : memcpy64.obj (.text:_memcpy)
                  80001c60    000000a0     test interrupt.obj (.text:retain)
                  80001d00    00000080     rts6740.lib : boot.obj (.text:_c_int00)
                  80001d80    00000040                 : args_main.obj (.text:__args_main)
                  80001dc0    00000020                 : _lock.obj (.text:__nop)
                  80001de0    00000020                 : exit.obj (.text:_abort)
                  80001e00    00000020     intvecs.obj (.text)

.cinit     0    80001e20    00000054                      80001e20    0000002c     rts6740.lib : exit.obj (.cinit)
                  80001e4c    00000004     –HOLE– [fill = 0]
                  80001e50    0000001c                 : _lock.obj (.cinit)
                  80001e6c    00000004     –HOLE– [fill = 0]
                  80001e70    00000004     (.pad.cinit) [fill = 0]

GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name

address    name
——–   —-

80001e20   ___cinit__

80001e20   ___etext__

 

请问这错误是什么原因引起的?我如果直接将.vec放进share RAM中就不会出现任何错误

Shine:

你好,

0x1c00处地址是reserved memory, 不能用. 你可以看一下手册上的memory map.http://www.ti.com/lit/ds/symlink/tms320c6748.pdf

赞(0)
未经允许不得转载:TI中文支持网 » C6748中断向量表分配内存地址后编译出错
分享到: 更多 (0)