这几天搞LPC2136的中断向量重映射,发现下载程序后无法运行。谁能帮助解决下啊?先谢谢了。
主要是想让程序在RAM中运行,中断向量在0x1000的地方。程序如下:
分散文件:ROM_LOAD 0x1000
{
ROM_EXEC 0x1000
{
Startup.o (vectors, +First)
* (+RO)
}
IRAM 0x40000014
{
Startup.o (MyStacks)
* (+RW,+ZI)
}
HEAP 0x4008000 UNINIT
{
Startup.o (Heap)
}
STACKS 0x40002000 UNINIT
{
Startup.o (Stacks)
}
}
startup.s部分:
;中断向量表
Reset
LDR PC, ResetAddr
LDR PC, UndefinedAddr
LDR PC, SWI_Addr
LDR PC, PrefetchAddr
LDR PC, DataAbortAddr
DCD 0xb9205f80
LDR PC, [PC, #-0xff0]
LDR PC, FIQ_Addr
ResetAddr DCD ResetInit
UndefinedAddr DCD Undefined
SWI_Addr DCD SoftwareInterrupt
PrefetchAddr DCD PrefetchAbort
DataAbortAddr DCD DataAbort
Nouse DCD 0
IRQ_Addr DCD 0
FIQ_Addr DCD FIQ_Handler
target.c部分:
unsigned int *vptr = (unsigned int *) 0x00000000;
unsigned int *vsram = (unsigned int *) 0x40000080;
unsigned int i;
for(i=0;i<32;i++)
{
*(vptr+i)=*(vsram+i);
}
MEMMAP =0x02;
文章评论(0条评论)
登录后参与讨论