I wrote a simple program, where I am writing to an illegal memory location. Writing in an illegal Memory location generates a MemManage fault. And if MemManage is not enabled, HardFault in generated. But in my case hardfault is also not triggering.
Here's a compiling program that demonstrates the issue,
void HardFault_Handler(void){ __asm( "MOV R4, 0x77777777\n\t" "MOV R5, 0x77777777\n\t" );}
int main(void){
__asm( "LDR R0, =0xE0100000\n\t" "MOV R1, 0x77777777\n\t" "STR R1, [R0,#0]" ); return (1);}
void SystemInit(void){}
So, in main function I am writing to an illegal memory location, 0xE0100000, and it doesnot generates hardfault. It does print a error message however saying that you are writing to an illegal memory address.
Depends on how M4 is integrated at system level !!, A illegal access may not generate trap for CPU