OSX 10.11.4, GDB Server v5.12e
I'm chasing an elusive bug on an STM32F415. It looks as if it is resetting as it prints a message that only happens during boot.
I'm using OSX and tried to use Ozone. I set a breakpoint in main() but when I induced the error the processor did not halt. I set a breakpoint in the one and only place where the message is printed and it also did not halt on failure. Unfortunately I got to a place where Ozone kept crashing that I do not think is related to my bug. (I do like the tool).
I switched to GDB and when the error occurs the server complains that it cannot read certain registers when the CPU is running. The GDB client receives SIGTRAP.
After this I try to read the RCC_CSR to determine the reset cause but it cannot be read. I'm wondering if I'm getting a brown-out and the JLink communications are lost? If this is the case I'd probably lose my hardware breakpoints as well and all bets are off.
Why wouldn't the JLink detect this condition on the Vtarget pin? Or that just a slow periodic polling thing?
Thanks,
Kenny
GDB Server
Display All
GDB Session
Display All
I'm chasing an elusive bug on an STM32F415. It looks as if it is resetting as it prints a message that only happens during boot.
I'm using OSX and tried to use Ozone. I set a breakpoint in main() but when I induced the error the processor did not halt. I set a breakpoint in the one and only place where the message is printed and it also did not halt on failure. Unfortunately I got to a place where Ozone kept crashing that I do not think is related to my bug. (I do like the tool).
I switched to GDB and when the error occurs the server complains that it cannot read certain registers when the CPU is running. The GDB client receives SIGTRAP.
After this I try to read the RCC_CSR to determine the reset cause but it cannot be read. I'm wondering if I'm getting a brown-out and the JLink communications are lost? If this is the case I'd probably lose my hardware breakpoints as well and all bets are off.
Why wouldn't the JLink detect this condition on the Vtarget pin? Or that just a slow periodic polling thing?
Thanks,
Kenny
GDB Server
Source Code
- Starting target CPU...
- ERROR: Can not read register 15 (R15) while CPU is running
- Reading all registers
- ERROR: Can not read register 0 (R0) while CPU is running
- ERROR: Can not read register 1 (R1) while CPU is running
- ERROR: Can not read register 2 (R2) while CPU is running
- ...ERROR: Can not read register 55 (FPS22) while CPU is running
- ERROR: Can not read register 56 (FPS23) while CPU is running
- ERROR: Can not read register 57 (FPS24) while CPU is running
- ERROR: Can not read register 58 (FPS25) while CPU is running
- ERROR: Can not read register 59 (FPS26) while CPU is running
- ERROR: Can not read register 60 (FPS27) while CPU is running
- ERROR: Can not read register 61 (FPS28) while CPU is running
- ERROR: Can not read register 62 (FPS29) while CPU is running
- ERROR: Can not read register 63 (FPS30) while CPU is running
- ERROR: Can not read register 64 (FPS31) while CPU is running
- Read 4 bytes @ address 0x00000000 (Data = 0x20020000)
- Reading from address 0x40023874 (Failed)
- Writing 0x01000000 @ address 0x40023874
GDB Session
Source Code
- (gdb) monitor reset
- Resetting target
- (gdb) source rcc.py
- Reading from address 0x40023874 (Data = 0x14000000)
- Writing 0x01000000 @ address 0x40023874
- (gdb) source rcc.py
- Reading from address 0x40023874 (Data = 0x00000000)
- Writing 0x01000000 @ address 0x40023874
- (gdb) c
- Continuing.
- Program received signal SIGTRAP, Trace/breakpoint trap.
- 0x00000000 in ?? ()
- (gdb) source rcc.py
- Reading from address 0x40023874 (Failed)
- Writing 0x01000000 @ address 0x40023874
The post was edited 3 times, last by Kenny ().