Skip to content

Instantly share code, notes, and snippets.

@justacec
Last active May 28, 2020 09:43
Show Gist options
  • Save justacec/f6def23cc3bc10942f0d73c0dfa20914 to your computer and use it in GitHub Desktop.
Save justacec/f6def23cc3bc10942f0d73c0dfa20914 to your computer and use it in GitHub Desktop.
#set WORKAREASIZE 0
#set CPUTAPID 0x0ba00477
#source [find interface/raspberrypi2-native.cfg]
source myraspberrypi2-native.cfg
transport select swd
adapter speed 100
#set CHIPNAME stm32f103
#set CHIPNAME stm32
source [find target/stm32f4x.cfg]
#source stm32f4x.cfg
# did not yet manage to make a working setup using srst
#reset_config srst_only
#reset_config srst_nogate
#adapter srst delay 100
#adapter srst pulse_width 100
bindto 0.0.0.0
#tpiu config external uart off 72000000 2000000
init
targets
reset halt
##tpiu config external uart off 100000000 2000000
##mww phys 0xE000EDFC 0x01000000
##mwb phys 0xE0042004 0x27
##mwb phys 0xE00400F0 2
# 1MHz
#mww phys 0xE0040010 68
# 115200
##mww phys 0xE0040010 625
# 19200
#mww phys 0xE0040010 3750
# 9600
#mww phys 0xE0040010 7500
# 2MHz
#mww phys 0xE0040010 34
##mww phys 0xE0000FB0 0xC5ACCE55
##mww phys 0xE0000E80 0x0001000D
##mwb phys 0xE0000E40 0x0000000F
##mwb phys 0xE0000E00 0x3
Open On-Chip Debugger 0.10.0+dev-01181-ga1c51caa-dirty (2020-04-16-11:43)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode)
Info : clock speed 2002 kHz
Info : SWD DPIDR 0x2ba01477
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for stm32f4x.cpu on 3333
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08004c08 msp: 0x20020000
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : accepting 'gdb' connection on tcp/3333
Info : device id = 0x10006431
Info : flash size = 512 kbytes
Info : flash size = 512 bytes
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08004c08 msp: 0x20020000
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08004c08 msp: 0x20020000
Info : Padding image section 0 at 0x08004cbc with 4 bytes
Warn : target was in unknown state when halt was requested
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Error: error waiting for target flash write algorithm
Error: error writing to flash at address 0x08000000 at offset 0x00000000
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08004c08 msp: 0x20020000
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08004c08 msp: 0x20020000
Open On-Chip Debugger 0.10.0+dev-01181-ga1c51caa-dirty (2020-04-16-11:43)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
User : 13 6 options.c:63 configuration_output_handler(): debug_level: 4
User : 14 6 options.c:63 configuration_output_handler():
Debug: 15 6 options.c:187 add_default_dirs(): bindir=/usr/local/bin
Debug: 16 6 options.c:188 add_default_dirs(): pkgdatadir=/usr/local/share/openocd
Debug: 17 6 options.c:189 add_default_dirs(): exepath=/usr/local/bin
Debug: 18 6 options.c:190 add_default_dirs(): bin2data=../share/openocd
Debug: 19 6 configuration.c:42 add_script_search_dir(): adding /root/.openocd
Debug: 20 7 configuration.c:42 add_script_search_dir(): adding /usr/local/bin/../share/openocd/site
Debug: 21 7 configuration.c:42 add_script_search_dir(): adding /usr/local/bin/../share/openocd/scripts
Debug: 22 7 configuration.c:97 find_file(): found openocd.cfg
Debug: 23 7 command.c:143 script_debug(): command - adapter adapter driver bcm2835gpio
Debug: 25 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_jtag_nums'...
Debug: 26 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_tck_num'...
Debug: 27 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_tms_num'...
Debug: 28 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_tdo_num'...
Debug: 29 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_tdi_num'...
Debug: 30 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_swd_nums'...
Debug: 31 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_swclk_num'...
Debug: 32 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_swdio_num'...
Debug: 33 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_srst_num'...
Debug: 34 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_trst_num'...
Debug: 35 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_speed_coeffs'...
Debug: 36 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_peripheral_base'...
Debug: 37 8 command.c:143 script_debug(): command - bcm2835gpio_peripheral_base bcm2835gpio_peripheral_base 0xFE000000
Debug: 39 8 command.c:143 script_debug(): command - bcm2835gpio_speed_coeffs bcm2835gpio_speed_coeffs 146203 36
Debug: 41 8 command.c:143 script_debug(): command - bcm2835gpio_swd_nums bcm2835gpio_swd_nums 25 24
Debug: 43 8 command.c:143 script_debug(): command - transport transport select swd
Debug: 44 8 command.c:354 register_command_handler(): registering 'swd'...
Debug: 45 8 bitbang.c:391 bitbang_swd_init(): bitbang_swd_init
Debug: 46 8 command.c:143 script_debug(): command - adapter adapter speed 100
Debug: 48 8 core.c:1822 jtag_config_khz(): handle jtag khz
Debug: 49 8 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 50 8 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 51 8 configuration.c:97 find_file(): found /usr/local/bin/../share/openocd/scripts/target/stm32f4x.cfg
Debug: 52 9 configuration.c:97 find_file(): found /usr/local/bin/../share/openocd/scripts/target/swj-dp.tcl
Debug: 53 9 command.c:143 script_debug(): command - transport transport select
Debug: 54 9 configuration.c:97 find_file(): found /usr/local/bin/../share/openocd/scripts/mem_helper.tcl
Debug: 55 9 command.c:143 script_debug(): command - add_usage_text add_usage_text mrw address
Debug: 57 9 command.c:1126 help_add_command(): added 'mrw' help text
Debug: 58 9 command.c:143 script_debug(): command - add_help_text add_help_text mrw Returns value of word in memory.
Debug: 60 9 command.c:1139 help_add_command(): added 'mrw' help text
Debug: 61 9 command.c:143 script_debug(): command - add_usage_text add_usage_text mrh address
Debug: 63 9 command.c:1126 help_add_command(): added 'mrh' help text
Debug: 64 9 command.c:143 script_debug(): command - add_help_text add_help_text mrh Returns value of halfword in memory.
Debug: 66 9 command.c:1139 help_add_command(): added 'mrh' help text
Debug: 67 9 command.c:143 script_debug(): command - add_usage_text add_usage_text mrb address
Debug: 69 10 command.c:1126 help_add_command(): added 'mrb' help text
Debug: 70 10 command.c:143 script_debug(): command - add_help_text add_help_text mrb Returns value of byte in memory.
Debug: 72 10 command.c:1139 help_add_command(): added 'mrb' help text
Debug: 73 10 command.c:143 script_debug(): command - add_usage_text add_usage_text mmw address setbits clearbits
Debug: 75 10 command.c:1126 help_add_command(): added 'mmw' help text
Debug: 76 10 command.c:143 script_debug(): command - add_help_text add_help_text mmw Modify word in memory. new_val = (old_val & ~clearbits) | setbits;
Debug: 78 10 command.c:1139 help_add_command(): added 'mmw' help text
Debug: 79 10 command.c:143 script_debug(): command - transport transport select
Debug: 80 10 command.c:143 script_debug(): command - transport transport select
Debug: 81 10 command.c:143 script_debug(): command - transport transport select
Debug: 82 10 command.c:143 script_debug(): command - transport transport select
Debug: 83 11 command.c:143 script_debug(): command - swd swd newdap stm32f4x cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id 0x2ba01477
Debug: 84 11 tcl.c:567 jim_newtap_cmd(): Creating New Tap, Chip: stm32f4x, Tap: cpu, Dotted: stm32f4x.cpu, 8 params
Debug: 85 11 core.c:1488 jtag_tap_init(): Created Tap: stm32f4x.cpu @ abs position 0, irlen 0, capture: 0x0 mask: 0x0
Debug: 86 11 command.c:143 script_debug(): command - dap dap create stm32f4x.dap -chain-position stm32f4x.cpu
Debug: 87 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 88 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 89 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 90 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 91 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 92 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 93 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 94 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 95 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 96 11 command.c:143 script_debug(): command - transport transport select
Debug: 97 11 command.c:143 script_debug(): command - target target create stm32f4x.cpu cortex_m -endian little -dap stm32f4x.dap
Debug: 98 11 command.c:354 register_command_handler(): registering 'arm'...
Debug: 99 11 command.c:354 register_command_handler(): registering 'arm'...
Debug: 100 11 command.c:354 register_command_handler(): registering 'arm'...
Debug: 101 12 command.c:354 register_command_handler(): registering 'arm'...
Debug: 102 12 command.c:354 register_command_handler(): registering 'arm'...
Debug: 103 12 command.c:354 register_command_handler(): registering 'arm'...
Debug: 104 12 command.c:354 register_command_handler(): registering 'arm'...
Debug: 105 12 command.c:354 register_command_handler(): registering 'arm'...
Debug: 106 12 command.c:354 register_command_handler(): registering 'arm'...
Debug: 107 12 command.c:354 register_command_handler(): registering 'tpiu'...
Debug: 108 12 command.c:354 register_command_handler(): registering 'itm'...
Debug: 109 12 command.c:354 register_command_handler(): registering 'itm'...
Debug: 110 12 command.c:354 register_command_handler(): registering 'cortex_m'...
Debug: 111 12 command.c:354 register_command_handler(): registering 'cortex_m'...
Debug: 112 12 command.c:354 register_command_handler(): registering 'cortex_m'...
Debug: 113 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 114 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 115 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 116 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 117 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 118 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 119 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 120 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 121 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 122 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 123 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 124 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 125 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 126 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 127 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 128 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 129 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 130 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 131 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 132 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 133 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 134 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 135 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 136 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 137 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 138 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 139 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 140 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 141 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 142 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 143 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 144 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 145 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 146 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 147 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 148 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 149 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 150 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 151 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 152 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 153 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 154 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 155 13 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -work-area-phys 0x20000000 -work-area-size 0x8000 -work-area-backup 0
Debug: 156 13 target.c:1980 target_free_all_working_areas_restore(): freeing all working areas
Debug: 157 13 target.c:1980 target_free_all_working_areas_restore(): freeing all working areas
Debug: 158 13 target.c:1980 target_free_all_working_areas_restore(): freeing all working areas
Debug: 159 14 command.c:143 script_debug(): command - flash flash bank stm32f4x.flash stm32f2x 0 0 0 0 stm32f4x.cpu
Debug: 161 14 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 162 14 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 163 14 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 164 14 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 165 14 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 166 14 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 167 14 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 168 14 tcl.c:1179 handle_flash_bank_command(): 'stm32f2x' driver usage field missing
Debug: 169 14 command.c:143 script_debug(): command - flash flash bank stm32f4x.otp stm32f2x 0x1fff7800 0 0 0 stm32f4x.cpu
Debug: 171 14 command.c:376 register_command(): command 'stm32f2x' is already registered in '<global>' context
Debug: 172 14 command.c:376 register_command(): command 'lock' is already registered in 'stm32f2x' context
Debug: 173 14 command.c:376 register_command(): command 'unlock' is already registered in 'stm32f2x' context
Debug: 174 14 command.c:376 register_command(): command 'mass_erase' is already registered in 'stm32f2x' context
Debug: 175 14 command.c:376 register_command(): command 'options_read' is already registered in 'stm32f2x' context
Debug: 176 14 command.c:376 register_command(): command 'options_write' is already registered in 'stm32f2x' context
Debug: 177 14 command.c:376 register_command(): command 'optcr2_write' is already registered in 'stm32f2x' context
Debug: 178 14 command.c:376 register_command(): command 'otp' is already registered in 'stm32f2x' context
Debug: 179 14 tcl.c:1179 handle_flash_bank_command(): 'stm32f2x' driver usage field missing
Debug: 180 14 command.c:143 script_debug(): command - adapter adapter speed 2000
Debug: 182 14 core.c:1822 jtag_config_khz(): handle jtag khz
Debug: 183 14 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 184 14 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 185 14 command.c:143 script_debug(): command - adapter adapter srst delay 100
Debug: 187 15 command.c:143 script_debug(): command - transport transport select
Debug: 188 15 command.c:143 script_debug(): command - reset_config reset_config srst_nogate
Debug: 190 15 command.c:143 script_debug(): command - transport transport select
Debug: 191 15 command.c:143 script_debug(): command - cortex_m cortex_m reset_config sysresetreq
Debug: 193 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event examine-end
# Enable debug during low power modes (uses more power)
# DBGMCU_CR |= DBG_STANDBY | DBG_STOP | DBG_SLEEP
mmw 0xE0042004 0x00000007 0
# Stop watchdog counters during halt
# DBGMCU_APB1_FZ |= DBG_IWDG_STOP | DBG_WWDG_STOP
mmw 0xE0042008 0x00001800 0
Debug: 194 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event trace-config
# Set TRACE_IOEN; TRACE_MODE is set to async; when using sync
# change this value accordingly to configure trace pins
# assignment
mmw 0xE0042004 0x00000020 0
Debug: 195 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event reset-init
# Configure PLL to boost clock to HSI x 4 (64 MHz)
mww 0x40023804 0x08012008 ;# RCC_PLLCFGR 16 Mhz /8 (M) * 128 (N) /4(P)
mww 0x40023C00 0x00000102 ;# FLASH_ACR = PRFTBE | 2(Latency)
mmw 0x40023800 0x01000000 0 ;# RCC_CR |= PLLON
sleep 10 ;# Wait for PLL to lock
mmw 0x40023808 0x00001000 0 ;# RCC_CFGR |= RCC_CFGR_PPRE1_DIV2
mmw 0x40023808 0x00000002 0 ;# RCC_CFGR |= RCC_CFGR_SW_PLL
# Boost JTAG frequency
adapter speed 8000
Debug: 196 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event reset-start
# Reduce speed since CPU speed will slow down to 16MHz with the reset
adapter speed 2000
Debug: 197 15 command.c:143 script_debug(): command - bindto bindto 0.0.0.0
Debug: 199 15 command.c:143 script_debug(): command - init init
Debug: 201 15 command.c:143 script_debug(): command - target target init
Debug: 203 15 command.c:143 script_debug(): command - target target names
Debug: 204 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu cget -event gdb-flash-erase-start
Debug: 205 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event gdb-flash-erase-start reset init
Debug: 206 16 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu cget -event gdb-flash-write-end
Debug: 207 16 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event gdb-flash-write-end reset halt
Debug: 208 16 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu cget -event gdb-attach
Debug: 209 16 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event gdb-attach halt
Debug: 210 16 target.c:1442 handle_target_init_command(): Initializing targets...
Debug: 211 16 semihosting_common.c:97 semihosting_common_init():
Debug: 212 16 command.c:354 register_command_handler(): registering 'target_request'...
Debug: 213 16 command.c:354 register_command_handler(): registering 'trace'...
Debug: 214 16 command.c:354 register_command_handler(): registering 'trace'...
Debug: 215 16 command.c:354 register_command_handler(): registering 'fast_load_image'...
Debug: 216 16 command.c:354 register_command_handler(): registering 'fast_load'...
Debug: 217 16 command.c:354 register_command_handler(): registering 'profile'...
Debug: 218 16 command.c:354 register_command_handler(): registering 'virt2phys'...
Debug: 219 16 command.c:354 register_command_handler(): registering 'reg'...
Debug: 220 16 command.c:354 register_command_handler(): registering 'poll'...
Debug: 221 16 command.c:354 register_command_handler(): registering 'wait_halt'...
Debug: 222 16 command.c:354 register_command_handler(): registering 'halt'...
Debug: 223 16 command.c:354 register_command_handler(): registering 'resume'...
Debug: 224 16 command.c:354 register_command_handler(): registering 'reset'...
Debug: 225 16 command.c:354 register_command_handler(): registering 'soft_reset_halt'...
Debug: 226 16 command.c:354 register_command_handler(): registering 'step'...
Debug: 227 16 command.c:354 register_command_handler(): registering 'mdd'...
Debug: 228 16 command.c:354 register_command_handler(): registering 'mdw'...
Debug: 229 17 command.c:354 register_command_handler(): registering 'mdh'...
Debug: 230 17 command.c:354 register_command_handler(): registering 'mdb'...
Debug: 231 17 command.c:354 register_command_handler(): registering 'mwd'...
Debug: 232 17 command.c:354 register_command_handler(): registering 'mww'...
Debug: 233 17 command.c:354 register_command_handler(): registering 'mwh'...
Debug: 234 17 command.c:354 register_command_handler(): registering 'mwb'...
Debug: 235 17 command.c:354 register_command_handler(): registering 'bp'...
Debug: 236 17 command.c:354 register_command_handler(): registering 'rbp'...
Debug: 237 17 command.c:354 register_command_handler(): registering 'wp'...
Debug: 238 17 command.c:354 register_command_handler(): registering 'rwp'...
Debug: 239 17 command.c:354 register_command_handler(): registering 'load_image'...
Debug: 240 17 command.c:354 register_command_handler(): registering 'dump_image'...
Debug: 241 17 command.c:354 register_command_handler(): registering 'verify_image_checksum'...
Debug: 242 17 command.c:354 register_command_handler(): registering 'verify_image'...
Debug: 243 17 command.c:354 register_command_handler(): registering 'test_image'...
Debug: 244 17 command.c:354 register_command_handler(): registering 'reset_nag'...
Debug: 245 17 command.c:354 register_command_handler(): registering 'ps'...
Debug: 246 17 command.c:354 register_command_handler(): registering 'test_mem_access'...
Info : 247 17 bcm2835gpio.c:455 bcm2835gpio_init(): BCM2835 GPIO JTAG/SWD bitbang driver
Info : 248 17 bcm2835gpio.c:463 bcm2835gpio_init(): SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode)
Debug: 249 17 bcm2835gpio.c:530 bcm2835gpio_init(): saved pinmux settings: tck 0 tms 0 tdi 0 tdo 0 trst 0 srst 0
Debug: 250 17 bitbang.c:446 bitbang_switch_to_swd(): bitbang_switch_to_swd
Debug: 251 17 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 252 18 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 253 18 core.c:1789 adapter_khz_to_speed(): have interface set up
Debug: 254 18 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 255 18 core.c:1789 adapter_khz_to_speed(): have interface set up
Info : 256 18 core.c:1565 adapter_init(): clock speed 2002 kHz
Debug: 257 18 openocd.c:141 handle_init_command(): Debug Adapter init complete
Debug: 258 18 command.c:143 script_debug(): command - transport transport init
Debug: 260 18 transport.c:239 handle_transport_init(): handle_transport_init
Debug: 261 18 command.c:143 script_debug(): command - dap dap init
Debug: 263 18 arm_dap.c:106 dap_init_all(): Initializing all DAPs ...
Debug: 264 18 bitbang.c:421 bitbang_swd_switch_seq(): bitbang_swd_switch_seq
Debug: 265 18 bitbang.c:429 bitbang_swd_switch_seq(): JTAG-to-SWD
Debug: 266 18 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 267 18 bitbang.c:458 bitbang_swd_read_reg(): bitbang_swd_read_reg
Debug: 268 18 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 269 18 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 270 18 bitbang.c:485 bitbang_swd_read_reg(): JUNK DP read reg 0 = 003f019f
Debug: 271 18 bitbang.c:508 bitbang_swd_read_reg(): No valid acknowledge: ack=5
Debug: 272 18 bitbang.c:517 bitbang_swd_write_reg(): bitbang_swd_write_reg
Debug: 273 18 bitbang.c:521 bitbang_swd_write_reg(): Skip bitbang_swd_write_reg because queued_retval=5
Debug: 274 18 bitbang.c:569 bitbang_swd_run_queue(): bitbang_swd_run_queue
Debug: 275 18 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 276 18 bitbang.c:576 bitbang_swd_run_queue(): SWD queue return value: 05
Debug: 277 18 command.c:629 run_command(): Command 'dap init' failed with error code 5
User : 278 19 command.c:694 command_run_line():
Debug: 279 19 command.c:629 run_command(): Command 'init' failed with error code -4
User : 280 19 command.c:694 command_run_line():
Debug: 281 19 target.c:1980 target_free_all_working_areas_restore(): freeing all working areas
Debug: 282 19 bitbang.c:421 bitbang_swd_switch_seq(): bitbang_swd_switch_seq
Debug: 283 19 bitbang.c:433 bitbang_swd_switch_seq(): SWD-to-JTAG
Debug: 284 19 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 285 19 bitbang.c:569 bitbang_swd_run_queue(): bitbang_swd_run_queue
Debug: 286 19 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 287 19 bitbang.c:576 bitbang_swd_run_queue(): SWD queue return value: 00
Open On-Chip Debugger 0.10.0+dev-01181-ga1c51caa-dirty (2020-04-16-11:43)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
User : 13 6 options.c:63 configuration_output_handler(): debug_level: 4
User : 14 6 options.c:63 configuration_output_handler():
Debug: 15 7 options.c:187 add_default_dirs(): bindir=/usr/local/bin
Debug: 16 7 options.c:188 add_default_dirs(): pkgdatadir=/usr/local/share/openocd
Debug: 17 7 options.c:189 add_default_dirs(): exepath=/usr/local/bin
Debug: 18 7 options.c:190 add_default_dirs(): bin2data=../share/openocd
Debug: 19 7 configuration.c:42 add_script_search_dir(): adding /root/.openocd
Debug: 20 7 configuration.c:42 add_script_search_dir(): adding /usr/local/bin/../share/openocd/site
Debug: 21 7 configuration.c:42 add_script_search_dir(): adding /usr/local/bin/../share/openocd/scripts
Debug: 22 7 configuration.c:97 find_file(): found openocd.cfg
Debug: 23 7 command.c:143 script_debug(): command - adapter adapter driver bcm2835gpio
Debug: 25 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_jtag_nums'...
Debug: 26 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_tck_num'...
Debug: 27 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_tms_num'...
Debug: 28 8 command.c:354 register_command_handler(): registering 'bcm2835gpio_tdo_num'...
Debug: 29 8 command.c:354 register_command_handler(): registering 'bcm2835gpio_tdi_num'...
Debug: 30 8 command.c:354 register_command_handler(): registering 'bcm2835gpio_swd_nums'...
Debug: 31 8 command.c:354 register_command_handler(): registering 'bcm2835gpio_swclk_num'...
Debug: 32 8 command.c:354 register_command_handler(): registering 'bcm2835gpio_swdio_num'...
Debug: 33 8 command.c:354 register_command_handler(): registering 'bcm2835gpio_srst_num'...
Debug: 34 8 command.c:354 register_command_handler(): registering 'bcm2835gpio_trst_num'...
Debug: 35 8 command.c:354 register_command_handler(): registering 'bcm2835gpio_speed_coeffs'...
Debug: 36 8 command.c:354 register_command_handler(): registering 'bcm2835gpio_peripheral_base'...
Debug: 37 8 command.c:143 script_debug(): command - bcm2835gpio_peripheral_base bcm2835gpio_peripheral_base 0xFE000000
Debug: 39 8 command.c:143 script_debug(): command - bcm2835gpio_speed_coeffs bcm2835gpio_speed_coeffs 146203 36
Debug: 41 8 command.c:143 script_debug(): command - bcm2835gpio_swd_nums bcm2835gpio_swd_nums 25 24
Debug: 43 8 command.c:143 script_debug(): command - transport transport select swd
Debug: 44 8 command.c:354 register_command_handler(): registering 'swd'...
Debug: 45 8 bitbang.c:391 bitbang_swd_init(): bitbang_swd_init
Debug: 46 8 command.c:143 script_debug(): command - adapter adapter speed 100
Debug: 48 8 core.c:1822 jtag_config_khz(): handle jtag khz
Debug: 49 8 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 50 8 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 51 9 configuration.c:97 find_file(): found /usr/local/bin/../share/openocd/scripts/target/swj-dp.tcl
Debug: 52 9 command.c:143 script_debug(): command - transport transport select
Debug: 53 9 configuration.c:97 find_file(): found /usr/local/bin/../share/openocd/scripts/mem_helper.tcl
Debug: 54 9 command.c:143 script_debug(): command - add_usage_text add_usage_text mrw address
Debug: 56 9 command.c:1126 help_add_command(): added 'mrw' help text
Debug: 57 9 command.c:143 script_debug(): command - add_help_text add_help_text mrw Returns value of word in memory.
Debug: 59 9 command.c:1139 help_add_command(): added 'mrw' help text
Debug: 60 9 command.c:143 script_debug(): command - add_usage_text add_usage_text mrh address
Debug: 62 9 command.c:1126 help_add_command(): added 'mrh' help text
Debug: 63 10 command.c:143 script_debug(): command - add_help_text add_help_text mrh Returns value of halfword in memory.
Debug: 65 10 command.c:1139 help_add_command(): added 'mrh' help text
Debug: 66 10 command.c:143 script_debug(): command - add_usage_text add_usage_text mrb address
Debug: 68 10 command.c:1126 help_add_command(): added 'mrb' help text
Debug: 69 10 command.c:143 script_debug(): command - add_help_text add_help_text mrb Returns value of byte in memory.
Debug: 71 10 command.c:1139 help_add_command(): added 'mrb' help text
Debug: 72 10 command.c:143 script_debug(): command - add_usage_text add_usage_text mmw address setbits clearbits
Debug: 74 10 command.c:1126 help_add_command(): added 'mmw' help text
Debug: 75 10 command.c:143 script_debug(): command - add_help_text add_help_text mmw Modify word in memory. new_val = (old_val & ~clearbits) | setbits;
Debug: 77 10 command.c:1139 help_add_command(): added 'mmw' help text
Debug: 78 10 command.c:143 script_debug(): command - transport transport select
Debug: 79 10 command.c:143 script_debug(): command - transport transport select
Debug: 80 10 command.c:143 script_debug(): command - transport transport select
Debug: 81 10 command.c:143 script_debug(): command - transport transport select
Debug: 82 11 command.c:143 script_debug(): command - swd swd newdap stm32f4x cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id 0x2ba01477
Debug: 83 11 tcl.c:567 jim_newtap_cmd(): Creating New Tap, Chip: stm32f4x, Tap: cpu, Dotted: stm32f4x.cpu, 8 params
Debug: 84 11 core.c:1488 jtag_tap_init(): Created Tap: stm32f4x.cpu @ abs position 0, irlen 0, capture: 0x0 mask: 0x0
Debug: 85 11 command.c:143 script_debug(): command - dap dap create stm32f4x.dap -chain-position stm32f4x.cpu
Debug: 86 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 87 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 88 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 89 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 90 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 91 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 92 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 93 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 94 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 95 11 command.c:143 script_debug(): command - transport transport select
Debug: 96 11 command.c:143 script_debug(): command - target target create stm32f4x.cpu cortex_m -endian little -dap stm32f4x.dap
Debug: 97 11 command.c:354 register_command_handler(): registering 'arm'...
Debug: 98 11 command.c:354 register_command_handler(): registering 'arm'...
Debug: 99 11 command.c:354 register_command_handler(): registering 'arm'...
Debug: 100 12 command.c:354 register_command_handler(): registering 'arm'...
Debug: 101 12 command.c:354 register_command_handler(): registering 'arm'...
Debug: 102 12 command.c:354 register_command_handler(): registering 'arm'...
Debug: 103 12 command.c:354 register_command_handler(): registering 'arm'...
Debug: 104 12 command.c:354 register_command_handler(): registering 'arm'...
Debug: 105 12 command.c:354 register_command_handler(): registering 'arm'...
Debug: 106 12 command.c:354 register_command_handler(): registering 'tpiu'...
Debug: 107 12 command.c:354 register_command_handler(): registering 'itm'...
Debug: 108 12 command.c:354 register_command_handler(): registering 'itm'...
Debug: 109 12 command.c:354 register_command_handler(): registering 'cortex_m'...
Debug: 110 12 command.c:354 register_command_handler(): registering 'cortex_m'...
Debug: 111 12 command.c:354 register_command_handler(): registering 'cortex_m'...
Debug: 112 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 113 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 114 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 115 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 116 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 117 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 118 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 119 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 120 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 121 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 122 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 123 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 124 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 125 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 126 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 127 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 128 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 129 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 130 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 131 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 132 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 133 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 134 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 135 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 136 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 137 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 138 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 139 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 140 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 141 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 142 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 143 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 144 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 145 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 146 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 147 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 148 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 149 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 150 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 151 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 152 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 153 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 154 13 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -work-area-phys 0x20000000 -work-area-size 0x8000 -work-area-backup 0
Debug: 155 13 target.c:1980 target_free_all_working_areas_restore(): freeing all working areas
Debug: 156 13 target.c:1980 target_free_all_working_areas_restore(): freeing all working areas
Debug: 157 14 target.c:1980 target_free_all_working_areas_restore(): freeing all working areas
Debug: 158 14 command.c:143 script_debug(): command - flash flash bank stm32f4x.flash stm32f2x 0 0 0 0 stm32f4x.cpu
Debug: 160 14 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 161 14 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 162 14 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 163 14 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 164 14 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 165 14 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 166 14 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 167 14 tcl.c:1179 handle_flash_bank_command(): 'stm32f2x' driver usage field missing
Debug: 168 14 command.c:143 script_debug(): command - flash flash bank stm32f4x.otp stm32f2x 0x1fff7800 0 0 0 stm32f4x.cpu
Debug: 170 14 command.c:376 register_command(): command 'stm32f2x' is already registered in '<global>' context
Debug: 171 14 command.c:376 register_command(): command 'lock' is already registered in 'stm32f2x' context
Debug: 172 14 command.c:376 register_command(): command 'unlock' is already registered in 'stm32f2x' context
Debug: 173 14 command.c:376 register_command(): command 'mass_erase' is already registered in 'stm32f2x' context
Debug: 174 14 command.c:376 register_command(): command 'options_read' is already registered in 'stm32f2x' context
Debug: 175 14 command.c:376 register_command(): command 'options_write' is already registered in 'stm32f2x' context
Debug: 176 14 command.c:376 register_command(): command 'optcr2_write' is already registered in 'stm32f2x' context
Debug: 177 14 command.c:376 register_command(): command 'otp' is already registered in 'stm32f2x' context
Debug: 178 14 tcl.c:1179 handle_flash_bank_command(): 'stm32f2x' driver usage field missing
Debug: 179 14 command.c:143 script_debug(): command - adapter adapter speed 100
Debug: 181 14 core.c:1822 jtag_config_khz(): handle jtag khz
Debug: 182 14 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 183 14 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 184 14 command.c:143 script_debug(): command - adapter adapter srst delay 100
Debug: 186 15 command.c:143 script_debug(): command - transport transport select
Debug: 187 15 command.c:143 script_debug(): command - reset_config reset_config srst_nogate
Debug: 189 15 command.c:143 script_debug(): command - transport transport select
Debug: 190 15 command.c:143 script_debug(): command - cortex_m cortex_m reset_config sysresetreq
Debug: 192 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event examine-end
# Enable debug during low power modes (uses more power)
# DBGMCU_CR |= DBG_STANDBY | DBG_STOP | DBG_SLEEP
mmw 0xE0042004 0x00000007 0
# Stop watchdog counters during halt
# DBGMCU_APB1_FZ |= DBG_IWDG_STOP | DBG_WWDG_STOP
mmw 0xE0042008 0x00001800 0
Debug: 193 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event trace-config
# Set TRACE_IOEN; TRACE_MODE is set to async; when using sync
# change this value accordingly to configure trace pins
# assignment
mmw 0xE0042004 0x00000020 0
Debug: 194 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event reset-init
# Configure PLL to boost clock to HSI x 4 (64 MHz)
mww 0x40023804 0x08012008 ;# RCC_PLLCFGR 16 Mhz /8 (M) * 128 (N) /4(P)
mww 0x40023C00 0x00000102 ;# FLASH_ACR = PRFTBE | 2(Latency)
mmw 0x40023800 0x01000000 0 ;# RCC_CR |= PLLON
sleep 10 ;# Wait for PLL to lock
mmw 0x40023808 0x00001000 0 ;# RCC_CFGR |= RCC_CFGR_PPRE1_DIV2
mmw 0x40023808 0x00000002 0 ;# RCC_CFGR |= RCC_CFGR_SW_PLL
# Boost JTAG frequency
adapter speed 4000
Debug: 195 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event reset-start
# Reduce speed since CPU speed will slow down to 16MHz with the reset
adapter speed 1000
Debug: 196 15 command.c:143 script_debug(): command - bindto bindto 0.0.0.0
Debug: 198 15 command.c:143 script_debug(): command - init init
Debug: 200 15 command.c:143 script_debug(): command - target target init
Debug: 202 15 command.c:143 script_debug(): command - target target names
Debug: 203 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu cget -event gdb-flash-erase-start
Debug: 204 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event gdb-flash-erase-start reset init
Debug: 205 16 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu cget -event gdb-flash-write-end
Debug: 206 16 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event gdb-flash-write-end reset halt
Debug: 207 16 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu cget -event gdb-attach
Debug: 208 16 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event gdb-attach halt
Debug: 209 16 target.c:1442 handle_target_init_command(): Initializing targets...
Debug: 210 16 semihosting_common.c:97 semihosting_common_init():
Debug: 211 16 command.c:354 register_command_handler(): registering 'target_request'...
Debug: 212 16 command.c:354 register_command_handler(): registering 'trace'...
Debug: 213 16 command.c:354 register_command_handler(): registering 'trace'...
Debug: 214 16 command.c:354 register_command_handler(): registering 'fast_load_image'...
Debug: 215 16 command.c:354 register_command_handler(): registering 'fast_load'...
Debug: 216 16 command.c:354 register_command_handler(): registering 'profile'...
Debug: 217 16 command.c:354 register_command_handler(): registering 'virt2phys'...
Debug: 218 16 command.c:354 register_command_handler(): registering 'reg'...
Debug: 219 16 command.c:354 register_command_handler(): registering 'poll'...
Debug: 220 16 command.c:354 register_command_handler(): registering 'wait_halt'...
Debug: 221 16 command.c:354 register_command_handler(): registering 'halt'...
Debug: 222 16 command.c:354 register_command_handler(): registering 'resume'...
Debug: 223 16 command.c:354 register_command_handler(): registering 'reset'...
Debug: 224 16 command.c:354 register_command_handler(): registering 'soft_reset_halt'...
Debug: 225 16 command.c:354 register_command_handler(): registering 'step'...
Debug: 226 17 command.c:354 register_command_handler(): registering 'mdd'...
Debug: 227 17 command.c:354 register_command_handler(): registering 'mdw'...
Debug: 228 17 command.c:354 register_command_handler(): registering 'mdh'...
Debug: 229 17 command.c:354 register_command_handler(): registering 'mdb'...
Debug: 230 17 command.c:354 register_command_handler(): registering 'mwd'...
Debug: 231 17 command.c:354 register_command_handler(): registering 'mww'...
Debug: 232 17 command.c:354 register_command_handler(): registering 'mwh'...
Debug: 233 17 command.c:354 register_command_handler(): registering 'mwb'...
Debug: 234 17 command.c:354 register_command_handler(): registering 'bp'...
Debug: 235 17 command.c:354 register_command_handler(): registering 'rbp'...
Debug: 236 17 command.c:354 register_command_handler(): registering 'wp'...
Debug: 237 17 command.c:354 register_command_handler(): registering 'rwp'...
Debug: 238 17 command.c:354 register_command_handler(): registering 'load_image'...
Debug: 239 17 command.c:354 register_command_handler(): registering 'dump_image'...
Debug: 240 17 command.c:354 register_command_handler(): registering 'verify_image_checksum'...
Debug: 241 17 command.c:354 register_command_handler(): registering 'verify_image'...
Debug: 242 17 command.c:354 register_command_handler(): registering 'test_image'...
Debug: 243 17 command.c:354 register_command_handler(): registering 'reset_nag'...
Debug: 244 17 command.c:354 register_command_handler(): registering 'ps'...
Debug: 245 17 command.c:354 register_command_handler(): registering 'test_mem_access'...
Info : 246 17 bcm2835gpio.c:455 bcm2835gpio_init(): BCM2835 GPIO JTAG/SWD bitbang driver
Info : 247 17 bcm2835gpio.c:463 bcm2835gpio_init(): SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode)
Debug: 248 17 bcm2835gpio.c:530 bcm2835gpio_init(): saved pinmux settings: tck 0 tms 0 tdi 0 tdo 0 trst 0 srst 0
Debug: 249 17 bitbang.c:446 bitbang_switch_to_swd(): bitbang_switch_to_swd
Debug: 250 18 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 251 18 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 252 18 core.c:1789 adapter_khz_to_speed(): have interface set up
Debug: 253 18 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 254 18 core.c:1789 adapter_khz_to_speed(): have interface set up
Info : 255 18 core.c:1565 adapter_init(): clock speed 100 kHz
Debug: 256 18 openocd.c:141 handle_init_command(): Debug Adapter init complete
Debug: 257 18 command.c:143 script_debug(): command - transport transport init
Debug: 259 18 transport.c:239 handle_transport_init(): handle_transport_init
Debug: 260 18 command.c:143 script_debug(): command - dap dap init
Debug: 262 18 arm_dap.c:106 dap_init_all(): Initializing all DAPs ...
Debug: 263 18 bitbang.c:421 bitbang_swd_switch_seq(): bitbang_swd_switch_seq
Debug: 264 18 bitbang.c:429 bitbang_swd_switch_seq(): JTAG-to-SWD
Debug: 265 18 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 266 19 bitbang.c:458 bitbang_swd_read_reg(): bitbang_swd_read_reg
Debug: 267 19 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 268 19 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 269 20 bitbang.c:485 bitbang_swd_read_reg(): JUNK DP read reg 0 = ff3f019f
Debug: 270 20 bitbang.c:508 bitbang_swd_read_reg(): No valid acknowledge: ack=5
Debug: 271 20 bitbang.c:517 bitbang_swd_write_reg(): bitbang_swd_write_reg
Debug: 272 20 bitbang.c:521 bitbang_swd_write_reg(): Skip bitbang_swd_write_reg because queued_retval=5
Debug: 273 20 bitbang.c:569 bitbang_swd_run_queue(): bitbang_swd_run_queue
Debug: 274 20 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 275 20 bitbang.c:576 bitbang_swd_run_queue(): SWD queue return value: 05
Debug: 276 20 command.c:629 run_command(): Command 'dap init' failed with error code 5
User : 277 20 command.c:694 command_run_line():
Debug: 278 20 command.c:629 run_command(): Command 'init' failed with error code -4
User : 279 21 command.c:694 command_run_line():
Debug: 280 21 target.c:1980 target_free_all_working_areas_restore(): freeing all working areas
Debug: 281 21 bitbang.c:421 bitbang_swd_switch_seq(): bitbang_swd_switch_seq
Debug: 282 21 bitbang.c:433 bitbang_swd_switch_seq(): SWD-to-JTAG
Debug: 283 21 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 284 22 bitbang.c:569 bitbang_swd_run_queue(): bitbang_swd_run_queue
Debug: 285 22 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 286 22 bitbang.c:576 bitbang_swd_run_queue(): SWD queue return value: 00
Open On-Chip Debugger 0.10.0+dev-01181-ga1c51caa-dirty (2020-04-16-11:43)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
User : 13 6 options.c:63 configuration_output_handler(): debug_level: 4
User : 14 6 options.c:63 configuration_output_handler():
Debug: 15 6 options.c:187 add_default_dirs(): bindir=/usr/local/bin
Debug: 16 6 options.c:188 add_default_dirs(): pkgdatadir=/usr/local/share/openocd
Debug: 17 6 options.c:189 add_default_dirs(): exepath=/usr/local/bin
Debug: 18 6 options.c:190 add_default_dirs(): bin2data=../share/openocd
Debug: 19 6 configuration.c:42 add_script_search_dir(): adding /root/.openocd
Debug: 20 6 configuration.c:42 add_script_search_dir(): adding /usr/local/bin/../share/openocd/site
Debug: 21 6 configuration.c:42 add_script_search_dir(): adding /usr/local/bin/../share/openocd/scripts
Debug: 22 7 configuration.c:97 find_file(): found openocd.cfg
Debug: 23 7 command.c:143 script_debug(): command - adapter adapter driver bcm2835gpio
Debug: 25 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_jtag_nums'...
Debug: 26 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_tck_num'...
Debug: 27 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_tms_num'...
Debug: 28 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_tdo_num'...
Debug: 29 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_tdi_num'...
Debug: 30 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_swd_nums'...
Debug: 31 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_swclk_num'...
Debug: 32 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_swdio_num'...
Debug: 33 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_srst_num'...
Debug: 34 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_trst_num'...
Debug: 35 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_speed_coeffs'...
Debug: 36 7 command.c:354 register_command_handler(): registering 'bcm2835gpio_peripheral_base'...
Debug: 37 7 command.c:143 script_debug(): command - bcm2835gpio_peripheral_base bcm2835gpio_peripheral_base 0xFE000000
Debug: 39 7 command.c:143 script_debug(): command - bcm2835gpio_speed_coeffs bcm2835gpio_speed_coeffs 146203 36
Debug: 41 7 command.c:143 script_debug(): command - bcm2835gpio_swd_nums bcm2835gpio_swd_nums 25 24
Debug: 43 8 command.c:143 script_debug(): command - transport transport select swd
Debug: 44 8 command.c:354 register_command_handler(): registering 'swd'...
Debug: 45 8 bitbang.c:391 bitbang_swd_init(): bitbang_swd_init
Debug: 46 8 command.c:143 script_debug(): command - adapter adapter speed 100
Debug: 48 8 core.c:1822 jtag_config_khz(): handle jtag khz
Debug: 49 8 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 50 8 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 51 8 configuration.c:97 find_file(): found /usr/local/bin/../share/openocd/scripts/target/stm32f4x.cfg
Debug: 52 8 configuration.c:97 find_file(): found /usr/local/bin/../share/openocd/scripts/target/swj-dp.tcl
Debug: 53 8 command.c:143 script_debug(): command - transport transport select
Debug: 54 9 configuration.c:97 find_file(): found /usr/local/bin/../share/openocd/scripts/mem_helper.tcl
Debug: 55 9 command.c:143 script_debug(): command - add_usage_text add_usage_text mrw address
Debug: 57 9 command.c:1126 help_add_command(): added 'mrw' help text
Debug: 58 9 command.c:143 script_debug(): command - add_help_text add_help_text mrw Returns value of word in memory.
Debug: 60 9 command.c:1139 help_add_command(): added 'mrw' help text
Debug: 61 9 command.c:143 script_debug(): command - add_usage_text add_usage_text mrh address
Debug: 63 9 command.c:1126 help_add_command(): added 'mrh' help text
Debug: 64 9 command.c:143 script_debug(): command - add_help_text add_help_text mrh Returns value of halfword in memory.
Debug: 66 9 command.c:1139 help_add_command(): added 'mrh' help text
Debug: 67 9 command.c:143 script_debug(): command - add_usage_text add_usage_text mrb address
Debug: 69 9 command.c:1126 help_add_command(): added 'mrb' help text
Debug: 70 9 command.c:143 script_debug(): command - add_help_text add_help_text mrb Returns value of byte in memory.
Debug: 72 10 command.c:1139 help_add_command(): added 'mrb' help text
Debug: 73 10 command.c:143 script_debug(): command - add_usage_text add_usage_text mmw address setbits clearbits
Debug: 75 10 command.c:1126 help_add_command(): added 'mmw' help text
Debug: 76 10 command.c:143 script_debug(): command - add_help_text add_help_text mmw Modify word in memory. new_val = (old_val & ~clearbits) | setbits;
Debug: 78 10 command.c:1139 help_add_command(): added 'mmw' help text
Debug: 79 10 command.c:143 script_debug(): command - transport transport select
Debug: 80 10 command.c:143 script_debug(): command - transport transport select
Debug: 81 10 command.c:143 script_debug(): command - transport transport select
Debug: 82 10 command.c:143 script_debug(): command - transport transport select
Debug: 83 10 command.c:143 script_debug(): command - swd swd newdap stm32f4x cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id 0x2ba01477
Debug: 84 10 tcl.c:567 jim_newtap_cmd(): Creating New Tap, Chip: stm32f4x, Tap: cpu, Dotted: stm32f4x.cpu, 8 params
Debug: 85 10 core.c:1488 jtag_tap_init(): Created Tap: stm32f4x.cpu @ abs position 0, irlen 0, capture: 0x0 mask: 0x0
Debug: 86 10 command.c:143 script_debug(): command - dap dap create stm32f4x.dap -chain-position stm32f4x.cpu
Debug: 87 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 88 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 89 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 90 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 91 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 92 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 93 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 94 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 95 11 command.c:354 register_command_handler(): registering 'stm32f4x.dap'...
Debug: 96 11 command.c:143 script_debug(): command - transport transport select
Debug: 97 11 command.c:143 script_debug(): command - target target create stm32f4x.cpu cortex_m -endian little -dap stm32f4x.dap
Debug: 98 11 command.c:354 register_command_handler(): registering 'arm'...
Debug: 99 11 command.c:354 register_command_handler(): registering 'arm'...
Debug: 100 11 command.c:354 register_command_handler(): registering 'arm'...
Debug: 101 11 command.c:354 register_command_handler(): registering 'arm'...
Debug: 102 11 command.c:354 register_command_handler(): registering 'arm'...
Debug: 103 11 command.c:354 register_command_handler(): registering 'arm'...
Debug: 104 11 command.c:354 register_command_handler(): registering 'arm'...
Debug: 105 11 command.c:354 register_command_handler(): registering 'arm'...
Debug: 106 11 command.c:354 register_command_handler(): registering 'arm'...
Debug: 107 11 command.c:354 register_command_handler(): registering 'tpiu'...
Debug: 108 12 command.c:354 register_command_handler(): registering 'itm'...
Debug: 109 12 command.c:354 register_command_handler(): registering 'itm'...
Debug: 110 12 command.c:354 register_command_handler(): registering 'cortex_m'...
Debug: 111 12 command.c:354 register_command_handler(): registering 'cortex_m'...
Debug: 112 12 command.c:354 register_command_handler(): registering 'cortex_m'...
Debug: 113 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 114 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 115 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 116 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 117 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 118 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 119 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 120 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 121 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 122 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 123 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 124 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 125 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 126 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 127 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 128 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 129 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 130 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 131 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 132 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 133 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 134 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 135 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 136 12 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 137 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 138 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 139 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 140 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 141 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 142 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 143 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 144 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 145 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 146 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 147 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 148 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 149 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 150 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 151 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 152 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 153 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 154 13 command.c:354 register_command_handler(): registering 'stm32f4x.cpu'...
Debug: 155 13 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -work-area-phys 0x20000000 -work-area-size 0x8000 -work-area-backup 0
Debug: 156 13 target.c:1980 target_free_all_working_areas_restore(): freeing all working areas
Debug: 157 13 target.c:1980 target_free_all_working_areas_restore(): freeing all working areas
Debug: 158 13 target.c:1980 target_free_all_working_areas_restore(): freeing all working areas
Debug: 159 13 command.c:143 script_debug(): command - flash flash bank stm32f4x.flash stm32f2x 0 0 0 0 stm32f4x.cpu
Debug: 161 13 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 162 13 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 163 13 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 164 13 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 165 14 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 166 14 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 167 14 command.c:354 register_command_handler(): registering 'stm32f2x'...
Debug: 168 14 tcl.c:1179 handle_flash_bank_command(): 'stm32f2x' driver usage field missing
Debug: 169 14 command.c:143 script_debug(): command - flash flash bank stm32f4x.otp stm32f2x 0x1fff7800 0 0 0 stm32f4x.cpu
Debug: 171 14 command.c:376 register_command(): command 'stm32f2x' is already registered in '<global>' context
Debug: 172 14 command.c:376 register_command(): command 'lock' is already registered in 'stm32f2x' context
Debug: 173 14 command.c:376 register_command(): command 'unlock' is already registered in 'stm32f2x' context
Debug: 174 14 command.c:376 register_command(): command 'mass_erase' is already registered in 'stm32f2x' context
Debug: 175 14 command.c:376 register_command(): command 'options_read' is already registered in 'stm32f2x' context
Debug: 176 14 command.c:376 register_command(): command 'options_write' is already registered in 'stm32f2x' context
Debug: 177 14 command.c:376 register_command(): command 'optcr2_write' is already registered in 'stm32f2x' context
Debug: 178 14 command.c:376 register_command(): command 'otp' is already registered in 'stm32f2x' context
Debug: 179 14 tcl.c:1179 handle_flash_bank_command(): 'stm32f2x' driver usage field missing
Debug: 180 14 command.c:143 script_debug(): command - adapter adapter speed 2000
Debug: 182 14 core.c:1822 jtag_config_khz(): handle jtag khz
Debug: 183 14 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 184 14 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 185 14 command.c:143 script_debug(): command - adapter adapter srst delay 100
Debug: 187 14 command.c:143 script_debug(): command - transport transport select
Debug: 188 14 command.c:143 script_debug(): command - reset_config reset_config srst_nogate
Debug: 190 14 command.c:143 script_debug(): command - transport transport select
Debug: 191 14 command.c:143 script_debug(): command - cortex_m cortex_m reset_config sysresetreq
Debug: 193 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event examine-end
# Enable debug during low power modes (uses more power)
# DBGMCU_CR |= DBG_STANDBY | DBG_STOP | DBG_SLEEP
mmw 0xE0042004 0x00000007 0
# Stop watchdog counters during halt
# DBGMCU_APB1_FZ |= DBG_IWDG_STOP | DBG_WWDG_STOP
mmw 0xE0042008 0x00001800 0
Debug: 194 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event trace-config
# Set TRACE_IOEN; TRACE_MODE is set to async; when using sync
# change this value accordingly to configure trace pins
# assignment
mmw 0xE0042004 0x00000020 0
Debug: 195 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event reset-init
# Configure PLL to boost clock to HSI x 4 (64 MHz)
mww 0x40023804 0x08012008 ;# RCC_PLLCFGR 16 Mhz /8 (M) * 128 (N) /4(P)
mww 0x40023C00 0x00000102 ;# FLASH_ACR = PRFTBE | 2(Latency)
mmw 0x40023800 0x01000000 0 ;# RCC_CR |= PLLON
sleep 10 ;# Wait for PLL to lock
mmw 0x40023808 0x00001000 0 ;# RCC_CFGR |= RCC_CFGR_PPRE1_DIV2
mmw 0x40023808 0x00000002 0 ;# RCC_CFGR |= RCC_CFGR_SW_PLL
# Boost JTAG frequency
adapter speed 8000
Debug: 196 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event reset-start
# Reduce speed since CPU speed will slow down to 16MHz with the reset
adapter speed 2000
Debug: 197 15 command.c:143 script_debug(): command - bindto bindto 0.0.0.0
Debug: 199 15 command.c:143 script_debug(): command - init init
Debug: 201 15 command.c:143 script_debug(): command - target target init
Debug: 203 15 command.c:143 script_debug(): command - target target names
Debug: 204 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu cget -event gdb-flash-erase-start
Debug: 205 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event gdb-flash-erase-start reset init
Debug: 206 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu cget -event gdb-flash-write-end
Debug: 207 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event gdb-flash-write-end reset halt
Debug: 208 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu cget -event gdb-attach
Debug: 209 15 command.c:143 script_debug(): command - stm32f4x.cpu stm32f4x.cpu configure -event gdb-attach halt
Debug: 210 16 target.c:1442 handle_target_init_command(): Initializing targets...
Debug: 211 16 semihosting_common.c:97 semihosting_common_init():
Debug: 212 16 command.c:354 register_command_handler(): registering 'target_request'...
Debug: 213 16 command.c:354 register_command_handler(): registering 'trace'...
Debug: 214 16 command.c:354 register_command_handler(): registering 'trace'...
Debug: 215 16 command.c:354 register_command_handler(): registering 'fast_load_image'...
Debug: 216 16 command.c:354 register_command_handler(): registering 'fast_load'...
Debug: 217 16 command.c:354 register_command_handler(): registering 'profile'...
Debug: 218 16 command.c:354 register_command_handler(): registering 'virt2phys'...
Debug: 219 16 command.c:354 register_command_handler(): registering 'reg'...
Debug: 220 16 command.c:354 register_command_handler(): registering 'poll'...
Debug: 221 16 command.c:354 register_command_handler(): registering 'wait_halt'...
Debug: 222 16 command.c:354 register_command_handler(): registering 'halt'...
Debug: 223 16 command.c:354 register_command_handler(): registering 'resume'...
Debug: 224 16 command.c:354 register_command_handler(): registering 'reset'...
Debug: 225 16 command.c:354 register_command_handler(): registering 'soft_reset_halt'...
Debug: 226 16 command.c:354 register_command_handler(): registering 'step'...
Debug: 227 16 command.c:354 register_command_handler(): registering 'mdd'...
Debug: 228 16 command.c:354 register_command_handler(): registering 'mdw'...
Debug: 229 16 command.c:354 register_command_handler(): registering 'mdh'...
Debug: 230 16 command.c:354 register_command_handler(): registering 'mdb'...
Debug: 231 16 command.c:354 register_command_handler(): registering 'mwd'...
Debug: 232 16 command.c:354 register_command_handler(): registering 'mww'...
Debug: 233 16 command.c:354 register_command_handler(): registering 'mwh'...
Debug: 234 16 command.c:354 register_command_handler(): registering 'mwb'...
Debug: 235 16 command.c:354 register_command_handler(): registering 'bp'...
Debug: 236 17 command.c:354 register_command_handler(): registering 'rbp'...
Debug: 237 17 command.c:354 register_command_handler(): registering 'wp'...
Debug: 238 17 command.c:354 register_command_handler(): registering 'rwp'...
Debug: 239 17 command.c:354 register_command_handler(): registering 'load_image'...
Debug: 240 17 command.c:354 register_command_handler(): registering 'dump_image'...
Debug: 241 17 command.c:354 register_command_handler(): registering 'verify_image_checksum'...
Debug: 242 17 command.c:354 register_command_handler(): registering 'verify_image'...
Debug: 243 17 command.c:354 register_command_handler(): registering 'test_image'...
Debug: 244 17 command.c:354 register_command_handler(): registering 'reset_nag'...
Debug: 245 17 command.c:354 register_command_handler(): registering 'ps'...
Debug: 246 17 command.c:354 register_command_handler(): registering 'test_mem_access'...
Info : 247 17 bcm2835gpio.c:455 bcm2835gpio_init(): BCM2835 GPIO JTAG/SWD bitbang driver
Info : 248 17 bcm2835gpio.c:463 bcm2835gpio_init(): SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode)
Debug: 249 17 bcm2835gpio.c:530 bcm2835gpio_init(): saved pinmux settings: tck 0 tms 0 tdi 0 tdo 0 trst 0 srst 0
Debug: 250 17 bitbang.c:446 bitbang_switch_to_swd(): bitbang_switch_to_swd
Debug: 251 17 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 252 17 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 253 17 core.c:1789 adapter_khz_to_speed(): have interface set up
Debug: 254 17 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 255 17 core.c:1789 adapter_khz_to_speed(): have interface set up
Info : 256 17 core.c:1565 adapter_init(): clock speed 2002 kHz
Debug: 257 17 openocd.c:141 handle_init_command(): Debug Adapter init complete
Debug: 258 17 command.c:143 script_debug(): command - transport transport init
Debug: 260 17 transport.c:239 handle_transport_init(): handle_transport_init
Debug: 261 18 command.c:143 script_debug(): command - dap dap init
Debug: 263 18 arm_dap.c:106 dap_init_all(): Initializing all DAPs ...
Debug: 264 18 bitbang.c:421 bitbang_swd_switch_seq(): bitbang_swd_switch_seq
Debug: 265 18 bitbang.c:429 bitbang_swd_switch_seq(): JTAG-to-SWD
Debug: 266 18 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 267 18 bitbang.c:458 bitbang_swd_read_reg(): bitbang_swd_read_reg
Debug: 268 18 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 269 18 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 270 18 bitbang.c:485 bitbang_swd_read_reg(): JUNK DP read reg 0 = 003f019f
Debug: 271 18 bitbang.c:508 bitbang_swd_read_reg(): No valid acknowledge: ack=5
Debug: 272 18 bitbang.c:517 bitbang_swd_write_reg(): bitbang_swd_write_reg
Debug: 273 18 bitbang.c:521 bitbang_swd_write_reg(): Skip bitbang_swd_write_reg because queued_retval=5
Debug: 274 18 bitbang.c:569 bitbang_swd_run_queue(): bitbang_swd_run_queue
Debug: 275 18 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 276 18 bitbang.c:576 bitbang_swd_run_queue(): SWD queue return value: 05
Debug: 277 18 command.c:629 run_command(): Command 'dap init' failed with error code 5
User : 278 18 command.c:694 command_run_line():
Debug: 279 18 command.c:629 run_command(): Command 'init' failed with error code -4
User : 280 18 command.c:694 command_run_line():
Info : 281 19 server.c:311 add_service(): Listening on port 6666 for tcl connections
Info : 282 19 server.c:311 add_service(): Listening on port 4444 for telnet connections
Debug: 283 19 command.c:143 script_debug(): command - init init
Debug: 285 2877 server.c:609 sig_handler(): Terminating on Signal 2
Debug: 286 2877 command.c:143 script_debug(): command - shutdown shutdown
User : 288 2877 server.c:742 handle_shutdown_command(): shutdown command invoked
Debug: 289 2877 target.c:1980 target_free_all_working_areas_restore(): freeing all working areas
Debug: 290 2877 bitbang.c:421 bitbang_swd_switch_seq(): bitbang_swd_switch_seq
Debug: 291 2877 bitbang.c:433 bitbang_swd_switch_seq(): SWD-to-JTAG
Debug: 292 2877 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 293 2877 bitbang.c:569 bitbang_swd_run_queue(): bitbang_swd_run_queue
Debug: 294 2877 bitbang.c:398 bitbang_exchange(): bitbang_exchange
Debug: 295 2877 bitbang.c:576 bitbang_swd_run_queue(): SWD queue return value: 00
# Revision C (newer revision)
#source [find interface/stlink-v2-1.cfg]
# Revision A and B (older revisions)
#source [find interface/stlink-v2.cfg]
source [find interface/stlink.cfg]
source [find target/stm32f4x.cfg]
Open On-Chip Debugger 0.10.0+dev-00973-g80f1a92b (2019-11-28-22:56)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 2000 kHz
Info : STLINK V2J35S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.014436
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Listening on port 50000 for gdb connections
Info : accepting 'gdb' connection on tcp/50000
target halted due to debug-request, current mode: Handler HardFault
xPSR: 0x01000003 pc: 0x08004ca6 msp: 0x2001ffe0
Info : device id = 0x10006431
Info : flash size = 512 kbytes
Info : flash size = 512 bytes
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08004c08 msp: 0x20020000
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08004c08 msp: 0x20020000
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Padding image section 0 at 0x08012114 with 12 bytes
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800e3bc msp: 0x20020000
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800e3bc msp: 0x20020000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment