I am using the Nordik SDK 17 and want to capture all soft and hardware faults.
In the sdk_config.h I set:
#define HARDFAULT_HANDLER_ENABLED 1
I was able to implement (override) the app_error_handler and app_error_fault_handler. But adding HardFault_process and HardFault_Handler to the same app_error_handler_gcc.c file seems not to work.
When creating a test function like:
uint16_t stackcnt = 0; void simulate_stack_crash(void) { stackcnt++; simulate_stack_crash(); }
and or
int illegal_instruction_execution(void) { int (*bad_instruction)(void) = (void *)0xE0000000; return bad_instruction(); }
will stop the attached Segger studio debugger, but neither one of the routines is ever called.
What could be the reason for this?