Add openocd configuration
The target's debug would sometime get stuck while in low-power, making it difficult to resume communications, even after hardware resets. Some peripherals were also kept running when halted. This config should fix these issues
This commit is contained in:
parent
947df53ecb
commit
ba9bc57a49
22
openocd.cfg
Normal file
22
openocd.cfg
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
# using a STM32f103CB wich has 128kB of flash instead of the more common 64KB
|
||||||
|
set CHIPNAME stm32f103CB
|
||||||
|
set FLASH_SIZE 0x20000
|
||||||
|
|
||||||
|
# load default configurations
|
||||||
|
source [find interface/stlink.cfg]
|
||||||
|
source [find target/stm32f1x.cfg]
|
||||||
|
|
||||||
|
# override examine-end event
|
||||||
|
$CHIPNAME.cpu configure -event examine-end {
|
||||||
|
# write DBGMCU_CR, disable all peripherals (timers, dmas, watchdogs while
|
||||||
|
# halted by debug. Trace is not affected
|
||||||
|
mmw 0xE0042004 0x7E3FFF07 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# inits debugging, from that point, commands can be used
|
||||||
|
init
|
||||||
|
# resets the target and halt it immediately afterward. Stops debug from being
|
||||||
|
# inacessible due to low-power states
|
||||||
|
reset halt
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user