Hello all,
I'm new to the ARM platform and I'm having a problem discovering why my code is generating a Hard Fault.
My hardware is an mbed platform board with the NXP LPC1768 processor.
The code in question works when compiled using the mbed.org online compiler but creates a Hard Fault when compiled with the LPCXpresso compiler. I know it's probably a compiler switch or preprocessor definition that is wrong somewhere but I have no idea where to begin to look.
So, more detail on what is happening, the following assembly instruction is where the hard fault is generated:
ldr r3, [r7, #4]
If I understand the assembly properly, it is attempting to load a word into register r3 that is located in memory at the address stored in r7 + 4 bytes.
So, just before executing this instruction r7 contains 0x10007568. So it is attempting to load the word from memory location 0x1000756C which contains 0x00000000.
Being new to the architecture, I'm failing to discover why this is generating a hard fault.
Thanks in advance for any help anyone can provide!