请教一个在不能remap的板子上初始化中断向量表的问题

关键词: 请教 一个 不能 remap 板子 初始化 中断

多谢amine老大的回复.
年月久远,amine老大也有记混的时候啊,呵呵.
excVecInit()函数是有意义的,之前的那个intVecBaseSet()没什么用处.
我在网上也找到了excVecInit()函数的实现,但里面还有对局部全局变量_func_armIrqHandler 的初始化,不然自己直接定义这个函数替掉得了,让我真是恨的牙痒痒的.不知道谁能够提供excVecInit()函数所在的完整c文件么?非常感谢!
STATUS excVecInit (void) { FAST int i; /* initialise ARM exception mode registers */ armInitExceptionModes (); /* initialise hardware exception vectors */ for (i = 0; i < NUM_EXC_VECS; ++i) { /* * Each vector contains a LDR PC,[PC,#offset] instruction to * load the PC from a table of addresses stored at * EXC_VEC_TABLE_BASE. This allows full 32 bit addressing rather * than 12 bit (MOV #) or 24 bit (B). */ *(UINT32 *)excEnterTbl.vecAddr = 0xE59FF000 | (EXC_VEC_TABLE_BASE - 8 - FIRST_VECTOR); *(VOIDFUNCPTR *) (excEnterTbl.vecAddr + EXC_VEC_TABLE_BASE - FIRST_VECTOR) = excEnterTbl.fn; } /* * Branch through zero has to be handled differently if it is * possible for address 0 to be be branched to in ARM and Thumb * states (no LDR pc,[pc,#n] in Thumb state). The following * instruction, installed at address 0, will cause an undefined * instruction exception in both ARM and Thumb states. */ *(UINT32 *)EXC_OFF_RESET = 0xE7FDDEFE; /* now sort out the instruction cache to reflect the changes */ CACHE_TEXT_UPDATE(EXC_OFF_RESET, EXC_OFF_IRQ + 4); /* install default IRQ handler */ _func_armIrqHandler = excIntHandle; return OK; }
回复
打赏帖 | |
---|---|
汽车电子中巡航控制系统的使用被打赏10分 | |
分享汽车电子中巡航控制系统知识被打赏10分 | |
分享安全气囊系统的检修注意事项被打赏10分 | |
分享电子控制安全气囊计算机知识点被打赏10分 | |
【分享开发笔记,赚取电动螺丝刀】【OZONE】使用方法总结被打赏20分 | |
【分享开发笔记,赚取电动螺丝刀】【S32K314】芯片启动流程分析被打赏40分 | |
【分享开发笔记,赚取电动螺丝刀】【S32K146】S32DS RTD 驱动环境搭建被打赏12分 | |
【分享开发笔记,赚取电动螺丝刀】【IAR】libc标注库time相关库函数使用被打赏23分 | |
LP‑MSPM0L1306开发版试用结果被打赏10分 | |
【分享开发笔记,赚取电动螺丝刀】【LP-MSPM0L1306】适配 RT-Thread Nano被打赏23分 |