bristlemouth / bm_protocol

Primary Bristlemouth firmware repository
https://www.bristlemouth.org/
Apache License 2.0
10 stars 7 forks source link

Feature/log bridges pclr #62

Closed victorsowa12 closed 9 months ago

victorsowa12 commented 9 months ago

On boot let's get the PC/LR from the Memfault SDK so we can send it and log it.

Example of the the PC/LR coming from the bridge log:

First power on after flash:
Reboot cnt: 0 PC: 0x0 LR: 0x0

Debug crash
Reboot cnt: 1 PC: 0x801f39c LR: 0x8026665

(bristlemouth) ➜  src git:(feature/log_bridges_pclr) ✗ arm-none-eabi-addr2line -pCf -e bridge_v1_0-bridge-dbg.elf 0x801f39c
debugCommand(char*, unsigned int, char const*) at ./src/./lib/debug/debug_sys.cpp:313
(bristlemouth) ➜  src git:(feature/log_bridges_pclr) ✗ arm-none-eabi-addr2line -pCf -e bridge_v1_0-bridge-dbg.elf 0x8026665
FreeRTOS_CLIProcessCommand at ./src/./third_party/FreeRTOS-Plus-CLI/FreeRTOS_CLI.c:213

Debug hard fault:
Reboot cnt: 2 PC: 0x801f384 LR: 0x801f37b

(bristlemouth) ➜  src git:(feature/log_bridges_pclr) ✗ arm-none-eabi-addr2line -pCf -e bridge_v1_0-bridge-dbg.elf 0x801f384
debugCommand(char*, unsigned int, char const*) at ./src/./lib/debug/debug_sys.cpp:316
(bristlemouth) ➜  src git:(feature/log_bridges_pclr) ✗ arm-none-eabi-addr2line -pCf -e bridge_v1_0-bridge-dbg.elf 0x801f37b
debugCommand(char*, unsigned int, char const*) at ./src/./lib/debug/debug_sys.cpp:314

Debug hang:
Reboot cnt: 3 PC: 0x801cb58 LR: 0xffffffbc

(bristlemouth) ➜  src git:(feature/log_bridges_pclr) ✗ arm-none-eabi-addr2line -pCf -e bridge_v1_0-bridge-dbg.elf 0x801cb58
IWDG_IRQHandler at ./src/./lib/common/watchdog.c:60
(bristlemouth) ➜  src git:(feature/log_bridges_pclr) ✗ arm-none-eabi-addr2line -pCf -e bridge_v1_0-bridge-dbg.elf 0xffffffbc
?? ??:0

And the crash locations: Screen Shot 2023-12-06 at 11 43 50 AM

Screen Shot 2023-12-06 at 11 44 20 AM