Hello,
I encountered a strange behaviour on a nrf52832 :
- I flash a a debug firmware (with debug optim in build config) : I can run debugger and add breakpoints
- I stop debugger, switch to normal build (without debug optim) and flash
- When program reach an old breakpoint (set in debug mode), I got a "hard fault debug event"
Here is a log I got :
[00:00:00.067,291] <err> os: ***** HARD FAULT ***** [00:00:00.067,321] <err> os: Debug event [00:00:00.067,321] <err> os: r0/a1: 0x2000351c r1/a2: 0x00000000 r2/a3: 0x00000000 [00:00:00.067,321] <err> os: r3/a4: 0x00000040 r12/ip: 0x0001863d r14/lr: 0x00034c49 [00:00:00.067,321] <err> os: xpsr: 0x01000029 [00:00:00.067,352] <err> os: Faulting instruction address (r15/pc): 0x00043dd0 [00:00:00.067,382] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0 [00:00:00.067,382] <err> os: Fault during interrupt handling [00:00:00.067,413] <err> os: Current thread: 0x20001fd0 (unknown) [00:00:00.164,978] <err> os: Halting system
I tried to get ride of this, but I was not successful :
- Erase target
- Do a pristine build an a full reflash after erase in normal mode
- Flash a debug firmware without debugger connected
- Erase all breakpoints in debugger part of vscode
It seems like breakpoints where still existing it nrf52832 flash. This is really strange and ennoying.
To get reide of it, I must restart the debugger, at least clear all breakpoints and reflash with a normal build. Sometimes I got it working, sometimes not. What I miss to get it working back normally ?
Thanks by advance.