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

N52832 hardfault after first branch.

I use eclipse IDE as a builder. My toolchain is arm-none-eabi 5.2.0. Compilation is for N52832 processor. I imported *.ld script files and startups from nRF sdk.

During assembly stepping in SystemInit my program goes to __Vector at address 0x00000000 and through addresses 0x00000000-0x00000400 goest to reset handler.

When the program is running without stepping it finishes in HardFault immediately after branch to SystemInit.

I added ~1sec assembly delay loop before SystemInit branch.

Another scenario:

After deleting SystemInit branch, my program goes to main() where local variable declaration and simple substraction before for loop causes HardFault. But it only happens when the program runs freely and is not stepped... Main function has infinite loop at its end.

I spend many hours trying to solve that problem, any help is very appreciated.

Related