Hi
我在修改DSPS時出現HardFault_HandlerC錯誤,ICE畫面如附件,map檔部分截取如下,請問可以看出是哪個function造成的嗎?
Regards
ke_event_clear 0x000320dd Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_event_get 0x00032109 Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_event_get_all 0x0003212f Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_event_flush 0x00032135 Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_event_schedule 0x0003213d Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_mem_init 0x0003218d Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_mem_is_empty 0x000321d7 Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_malloc 0x00032215 Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_free 0x000322d7 Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_msg_alloc 0x000323b1 Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_msg_send 0x000323e1 Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_msg_send_basic 0x0003240d Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_msg_forward 0x0003241b Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_msg_forward_new_id 0x00032425 Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_msg_free 0x00032435 Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_queue_extract 0x00032441 Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_queue_insert 0x0003247f Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_task_init 0x0003256d Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_task_create 0x00032587 Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_task_delete 0x000325e1 Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_state_set 0x00032631 Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_state_get 0x000326b3 Thumb Code 0 rom_symdef.txt ABSOLUTE
ke_msg_discard 0x000326e3 Thumb Code 0 rom_symdef.txt ABSOLUTE
你好,
系统老是挂死在hardFault_handler.c中void HardFault_HandlerC(unsigned long *hardfault_args)的如下地方:
void HardFault_HandlerC(unsigned long *hardfault_args)
{
if (DEVELOPMENT_DEBUG)
{
SetBits16(SYS_CTRL_REG, DEBUGGER_ENABLE, 1); // enable debugger to be able to re-attach
*(volatile unsigned long *)(STATUS_BASE ) = hardfault_args[0]; // R0
*(volatile unsigned long *)(STATUS_BASE + 0x04) = hardfault_args[1]; // R1
*(volatile unsigned long *)(STATUS_BASE + 0x08) = hardfault_args[2]; // R2
*(volatile unsigned long *)(STATUS_BASE + 0x0C) = hardfault_args[3]; // R3
*(volatile unsigned long *)(STATUS_BASE + 0x10) = hardfault_args[4]; // R12
*(volatile unsigned long *)(STATUS_BASE + 0x14) = hardfault_args[5]; // LR
*(volatile unsigned long *)(STATUS_BASE + 0x18) = hardfault_args[6]; // PC
*(volatile unsigned long *)(STATUS_BASE + 0x1C) = hardfault_args[7]; // PSR
*(volatile unsigned long *)(STATUS_BASE + 0x20) = (unsigned long)hardfault_args; // Stack Pointer
*(volatile unsigned long *)(STATUS_BASE + 0x24) = (*((volatile unsigned long *)(0xE000ED28))); // CFSR
*(volatile unsigned long *)(STATUS_BASE + 0x28) = (*((volatile unsigned long *)(0xE000ED2C))); // HFSR
*(volatile unsigned long *)(STATUS_BASE + 0x2C) = (*((volatile unsigned long *)(0xE000ED30))); // DFSR
*(volatile unsigned long *)(STATUS_BASE + 0x30) = (*((volatile unsigned long *)(0xE000ED3C))); // AFSR
*(volatile unsigned long *)(STATUS_BASE + 0x34) = (*((volatile unsigned long *)(0xE000ED34))); // MMAR
*(volatile unsigned long *)(STATUS_BASE + 0x38) = (*((volatile unsigned long *)(0xE000ED38))); // BFAR
if (USE_WDOG)
wdg_freeze(); // Stop WDOG
if ((GetWord16(SYS_STAT_REG) & DBG_IS_UP) == DBG_IS_UP)
__asm("BKPT #0\n"); //挂死在此处
else
while(1);
}
}
这个一般是什么原因啊?硬件的有虚焊还是?软件上能定位这个问题吗,前面的那些寄存器有助于定位问题吗?
谢谢!