2019-03-18 19:56:26 +08:00
|
|
|
target remote :3333
|
|
|
|
set print asm-demangle on
|
2019-03-21 03:28:33 +08:00
|
|
|
# https://github.com/rust-embedded/cortex-m-rt/issues/139
|
|
|
|
set backtrace limit 32
|
2019-03-18 19:56:26 +08:00
|
|
|
monitor arm semihosting enable
|
|
|
|
# if using ITM with itmdump
|
|
|
|
# monitor tpiu config internal itm.fifo uart off 168000000
|
|
|
|
# or uart
|
|
|
|
# monitor tpiu config external uart off 168000000 2000000
|
|
|
|
# monitor itm port 0 on
|
2019-03-19 23:27:22 +08:00
|
|
|
|
|
|
|
# detect unhandled exceptions, hard faults and panics
|
|
|
|
break DefaultHandler
|
|
|
|
break HardFault
|
|
|
|
break rust_begin_unwind
|
|
|
|
|
2019-03-18 19:56:26 +08:00
|
|
|
load
|
|
|
|
# tbreak cortex_m_rt::reset_handler
|
2020-06-09 00:11:14 +08:00
|
|
|
monitor reset halt
|
2019-03-18 19:56:26 +08:00
|
|
|
|
2021-01-05 00:12:24 +08:00
|
|
|
source ../../PyCortexMDebug/cmdebug/svd_gdb.py
|
|
|
|
svd_load ~/Downloads/STM32H743x.svd
|
|
|
|
|
2019-03-18 19:56:26 +08:00
|
|
|
# cycle counter delta tool, place two bkpts around the section
|
2019-03-30 02:33:32 +08:00
|
|
|
set var $cc=0xe0001004
|
2019-03-18 19:56:26 +08:00
|
|
|
define qq
|
2019-03-30 02:33:32 +08:00
|
|
|
print *$cc-$t0
|
|
|
|
set var $t0=*$cc
|
2019-03-18 19:56:26 +08:00
|
|
|
continue
|
|
|
|
end
|
2019-10-22 21:44:04 +08:00
|
|
|
#set var $t0=*$cc
|