This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to enable hardfault_handler in SDK12.3.0

Hi, I am using sdk 12.3.0 sd130v2. I have the hardfault_implementation.c included in the project. But I am not able to keep breakpoint anywhere in that file. I have made HARDFAULT_HANDLER_ENABLED 1 in sdk_config.h and included 'HARDFAULT_HANDLER_ENABLED' in project options defines. Still no luck. In other words, how to debug hardfault handler error in sdk 12.3.0?

Parents
  • Hi, TurboJ, thanks for the quick reply. After including hardfault_handler_keil.c I am able to have breakpoints in hardfault_handler (I am using keil IDS). But, the program halts at HardFault_c_handler at HardFault_process((HardFault_stack_t *)p_stack_address); In watch window, p_stack_address is 0x20002E10 and p_stack_address[0] is 0x20002E30. How to know where the error had started from here? I tried disassembly's 'show disassembly at address' option. But, my disassembly and code were mismatched right from the start. So, 'show disassembly at address' for both 0x20002E10 and 0x20002E30 show some address close to 0x20002E0C : 0xFFF1FFFF - which is not of much help to me.

Reply
  • Hi, TurboJ, thanks for the quick reply. After including hardfault_handler_keil.c I am able to have breakpoints in hardfault_handler (I am using keil IDS). But, the program halts at HardFault_c_handler at HardFault_process((HardFault_stack_t *)p_stack_address); In watch window, p_stack_address is 0x20002E10 and p_stack_address[0] is 0x20002E30. How to know where the error had started from here? I tried disassembly's 'show disassembly at address' option. But, my disassembly and code were mismatched right from the start. So, 'show disassembly at address' for both 0x20002E10 and 0x20002E30 show some address close to 0x20002E0C : 0xFFF1FFFF - which is not of much help to me.

Children
No Data
Related