[riot-notifications] [RIOT-OS/RIOT] stm32l152re: hard-fault unless power-cycled after flash, or depending on optimization (#11820)

Francisco notifications at github.com
Tue Jul 9 15:29:24 CEST 2019


> Do you have any clue which exact instruction causes the hard fault?

According to the debug output it would be `irq_restore()`

```
2019-07-09 15:27:44,953 - INFO # Context before hardfault:
2019-07-09 15:27:44,954 - INFO #    r0: 0x00000001
2019-07-09 15:27:44,954 - INFO #    r1: 0x00000001
2019-07-09 15:27:44,955 - INFO #    r2: 0xe000ed00
2019-07-09 15:27:44,960 - INFO #    r3: 0x00000010
2019-07-09 15:27:44,960 - INFO #   r12: 0x00000000
2019-07-09 15:27:44,961 - INFO #    lr: 0x08000693
2019-07-09 15:27:44,961 - INFO #    pc: 0x08422d92
2019-07-09 15:27:44,971 - INFO #   psr: 0x61000000
2019-07-09 15:27:44,972 - INFO # 
2019-07-09 15:27:44,972 - INFO # FSR/FAR:
2019-07-09 15:27:44,972 - INFO #  CFSR: 0x00000100
2019-07-09 15:27:44,973 - INFO #  HFSR: 0x40000000
2019-07-09 15:27:44,973 - INFO #  DFSR: 0x00000008
2019-07-09 15:27:44,974 - INFO #  AFSR: 0x00000000
2019-07-09 15:27:44,974 - INFO # Misc
2019-07-09 15:27:44,974 - INFO # EXC_RET: 0xfffffffd
2019-07-09 15:27:44,979 - INFO # Attempting to reconstruct state for debugging...
2019-07-09 15:27:44,981 - INFO # In GDB:
2019-07-09 15:27:44,981 - INFO #   set $pc=0x8422d92
2019-07-09 15:27:44,984 - INFO #   frame 0
2019-07-09 15:27:44,984 - INFO #   bt
2019-07-09 15:27:44,984 - INFO # 

```

```
    at /home/francisco/workspace/RIOT/cpu/cortexm_common/vectors_cortexm.c:360
360	    __BKPT(1);
(gdb) set $pc=0x8422d92
(gdb) frame 0
#0  0x08422d92 in ?? ()
(gdb) bt
#0  0x08422d92 in ?? ()
#1  0x08000692 in irq_restore (state=1) at /home/francisco/workspace/RIOT/cpu/cortexm_common/include/vendor/cmsis_gcc.h:414
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) 

```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/11820#issuecomment-509642482
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190709/e0425ffd/attachment-0001.html>


More information about the notifications mailing list