Cortex M0 HardFault

Hi,

What could cause: Stack pointer corrupted, reset to top of stack l.238, vectors_cortexm.c (then board is halted)

Any program I flash on the samr21 goes directly to hard_fault_handler()

Board dead or something missing?

Cheers,

Hey,

What could cause: Stack pointer corrupted, reset to top of stack l.238, vectors_cortexm.c (then board is halted)

Any program I flash on the samr21 goes directly to hard_fault_handler()

Any program, e.g., also "tests/hello-world"?

Board dead or something missing?

Which OS are you on, what toolchain? Do you have a second samr21-xpro to test the binary? Are you on a clean master checkout?

Seriously, did you try a different USB cable?

Kaspar

On a related note, I had some trouble with unexplained hard faults when I built newlib using gcc-6.2, but I didn’t have time to investigate further at that time and I simply reinstalled newlib built with gcc-5.4 instead.

Best regards, Joakim