Flashing STM32l Discovery Board hangs/fails

Hello,

i have set up an eclipse environment and use openOCD with the STM32L Discovery Board from ST. When i started to use const variables, openOCD hangs at flashing my program.

Before i used const variables i was able to use openOCD successfully. I think the failure is related to the const data section placed in flash.

Invoking: ARM Summon Linux GNU Print Size

arm-none-eabi-size --format=berkeley stm32l_test.elf

text data bss dec hex filename

1612 32 128 1772 6ec stm32l_test.elf

Finished building: stm32l_test.siz

Best regards

Garag

I am using openOCD with the following command line:

bin/openocd-0.6.1.exe -d 3 -l stm32l_test.log -f scripts/board/stm32ldiscovery.cfg

The content of the logfile is as follows:

Debug: 104 31 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32lx.cpu configure -work-area-phys 0x20000000 -work-area-size 0x3800 -work-area-backup 0

Debug: 105 31 command.c:145 script_debug(): command - ocd_stm32lx.cpu ocd_stm32lx.cpu configure -work-area-phys 0x20000000 -work-area-size 0x3800 -work-area-backup 0

Debug: 106 31 target.c:1620 target_free_all_working_areas_restore(): freeing all working areas

Debug: 107 31 target.c:1620 target_free_all_working_areas_restore(): freeing all working areas

Debug: 108 31 target.c:1620 target_free_all_working_areas_restore(): freeing all working areas

Debug: 109 31 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_flash bank stm32lx.flash stm32lx 0 0 0 0 stm32lx.cpu

Debug: 110 31 command.c:145 script_debug(): command - ocd_flash ocd_flash bank stm32lx.flash stm32lx 0 0 0 0 stm32lx.cpu

Debug: 112 31 tcl.c:781 handle_flash_bank_command(): ‘stm32lx’ driver usage field missing

Debug: 113 31 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_reset_config srst_only srst_nogate

Debug: 114 31 command.c:145 script_debug(): command - reset_config ocd_reset_config srst_only srst_nogate

User : 116 31 command.c:549 command_print(): srst_only separate srst_nogate srst_open_drain

Debug: 117 125 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_init

Debug: 118 125 command.c:145 script_debug(): command - init ocd_init

Debug: 120 125 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_target init

Debug: 121 125 command.c:145 script_debug(): command - ocd_target ocd_target init

Debug: 123 125 target.c:1183 handle_target_init_command(): Initializing targets…

Debug: 124 125 stm32_stlink.c:291 stm32_stlink_init_target(): stm32_stlink_init_target

Debug: 125 125 command.c:369 register_command_handler(): registering ‘ocd_target_request’…

Debug: 126 125 command.c:369 register_command_handler(): registering ‘ocd_trace’…

Debug: 127 125 command.c:369 register_command_handler(): registering ‘ocd_trace’…

Debug: 128 125 command.c:369 register_command_handler(): registering ‘ocd_fast_load_image’…

Debug: 129 125 command.c:369 register_command_handler(): registering ‘ocd_fast_load’…

Debug: 130 125 command.c:369 register_command_handler(): registering ‘ocd_profile’…

Debug: 131 125 command.c:369 register_command_handler(): registering ‘ocd_virt2phys’…

Debug: 132 125 command.c:369 register_command_handler(): registering ‘ocd_reg’…

Debug: 133 125 command.c:369 register_command_handler(): registering ‘ocd_poll’…

Debug: 134 125 command.c:369 register_command_handler(): registering ‘ocd_wait_halt’…

Debug: 135 125 command.c:369 register_command_handler(): registering ‘ocd_halt’…

Debug: 136 125 command.c:369 register_command_handler(): registering ‘ocd_resume’…

Debug: 137 125 command.c:369 register_command_handler(): registering ‘ocd_reset’…

Debug: 138 125 command.c:369 register_command_handler(): registering ‘ocd_soft_reset_halt’…

Debug: 139 125 command.c:369 register_command_handler(): registering ‘ocd_step’…

Debug: 140 125 command.c:369 register_command_handler(): registering ‘ocd_mdw’…

Debug: 141 125 command.c:369 register_command_handler(): registering ‘ocd_mdh’…

Debug: 142 125 command.c:369 register_command_handler(): registering ‘ocd_mdb’…

Debug: 143 125 command.c:369 register_command_handler(): registering ‘ocd_mww’…

Debug: 144 125 command.c:369 register_command_handler(): registering ‘ocd_mwh’…

Debug: 145 125 command.c:369 register_command_handler(): registering ‘ocd_mwb’…

Debug: 146 125 command.c:369 register_command_handler(): registering ‘ocd_bp’…

Debug: 147 125 command.c:369 register_command_handler(): registering ‘ocd_rbp’…

Debug: 148 125 command.c:369 register_command_handler(): registering ‘ocd_wp’…

Debug: 149 125 command.c:369 register_command_handler(): registering ‘ocd_rwp’…

Debug: 150 125 command.c:369 register_command_handler(): registering ‘ocd_load_image’…

Debug: 151 125 command.c:369 register_command_handler(): registering ‘ocd_dump_image’…

Debug: 152 125 command.c:369 register_command_handler(): registering ‘ocd_verify_image’…

Debug: 153 125 command.c:369 register_command_handler(): registering ‘ocd_test_image’…

Debug: 154 125 command.c:369 register_command_handler(): registering ‘ocd_reset_nag’…

Debug: 155 125 command.c:369 register_command_handler(): registering ‘ocd_ps’…

Debug: 156 125 stlink_interface.c:91 stlink_interface_init(): stlink_interface_init

Debug: 157 125 stlink_layout.c:88 stlink_layout_init(): stlink_layout_init

Debug: 158 125 core.c:1592 adapter_khz_to_speed(): convert khz to interface specific speed value

Debug: 159 125 core.c:1595 adapter_khz_to_speed(): have interface set up

Debug: 160 125 stlink_interface.c:106 stlink_interface_speed(): stlink_interface_speed: ignore speed 1000

Debug: 161 125 core.c:1592 adapter_khz_to_speed(): convert khz to interface specific speed value

Debug: 162 125 core.c:1595 adapter_khz_to_speed(): have interface set up

Info : 163 125 core.c:1399 adapter_init(): clock speed 1000 kHz

Debug: 164 125 openocd.c:132 handle_init_command(): Debug Adapter init complete

Debug: 165 125 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport init

Debug: 166 125 command.c:145 script_debug(): command - ocd_transport ocd_transport init

Debug: 168 125 transport.c:240 handle_transport_init(): handle_transport_init

Debug: 169 125 stlink_transport.c:140 stlink_transport_init(): stlink_transport_init

Debug: 170 125 stlink_transport.c:157 stlink_transport_init(): current transport stlink_swd

Debug: 171 125 stlink_interface.c:41 stlink_interface_open(): stlink_interface_open

Debug: 172 125 stlink_layout.c:43 stlink_layout_open(): stlink_layout_open

Debug: 173 125 stlink_usb.c:1152 stlink_usb_open(): stlink_usb_open

Debug: 174 125 stlink_usb.c:1167 stlink_usb_open(): transport: 1 vid: 0x0483 pid: 0x3748

Debug: 175 374 stlink_usb.c:422 stlink_usb_version(): STLINK v2 JTAG v15 API v2 SWIM v0 VID 0x0483 PID 0x3748

Debug: 176 374 stlink_usb.c:564 stlink_usb_init_mode(): MODE: 0x02

Debug: 177 374 stlink_usb.c:596 stlink_usb_init_mode(): MODE: 0x01

Debug: 178 374 stlink_usb.c:629 stlink_usb_init_mode(): MODE: 0x02

Debug: 179 374 stlink_interface.c:53 stlink_interface_init_target(): stlink_interface_init_target

Debug: 180 374 stlink_usb.c:656 stlink_usb_idcode(): IDCODE: 0x2BA01477

Debug: 181 374 openocd.c:145 handle_init_command(): Examining targets…

Debug: 182 374 target.c:1299 target_call_event_callbacks(): target event 21 (examine-start)

Debug: 183 374 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0xe000ed00 4 1

Debug: 184 374 target.c:1917 target_read_u32(): address: 0xe000ed00, value: 0x412fc230

Debug: 185 374 cortex_m.c:1815 cortex_m3_examine(): Cortex-M3 r2p0 processor detected

Debug: 186 374 cortex_m.c:1816 cortex_m3_examine(): cpuid: 0x412fc230

Debug: 187 374 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0xe0002000 4 1

Debug: 188 374 target.c:1917 target_read_u32(): address: 0xe0002000, value: 0x00000260

Debug: 189 374 cortex_m.c:1860 cortex_m3_examine(): FPB fpcr 0x260, numcode 6, numlit 2

Debug: 190 374 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0xe0001000 4 1

Debug: 191 374 target.c:1917 target_read_u32(): address: 0xe0001000, value: 0x40000000

Debug: 192 374 cortex_m.c:1772 cortex_m3_dwt_setup(): DWT dwtcr 0x40000000, comp 4, watch/trigger

Info : 193 374 cortex_m.c:1869 cortex_m3_examine(): stm32lx.cpu: hardware has 6 breakpoints, 4 watchpoints

Debug: 194 374 target.c:1299 target_call_event_callbacks(): target event 22 (examine-end)

Debug: 195 374 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_flash init

Debug: 196 374 command.c:145 script_debug(): command - ocd_flash ocd_flash init

Debug: 198 374 tcl.c:847 handle_flash_init_command(): Initializing flash devices…

Debug: 199 374 command.c:369 register_command_handler(): registering ‘ocd_flash’…

Debug: 200 374 command.c:369 register_command_handler(): registering ‘ocd_flash’…

Debug: 201 374 command.c:369 register_command_handler(): registering ‘ocd_flash’…

Debug: 202 374 command.c:369 register_command_handler(): registering ‘ocd_flash’…

Debug: 203 374 command.c:369 register_command_handler(): registering ‘ocd_flash’…

Debug: 204 374 command.c:369 register_command_handler(): registering ‘ocd_flash’…

Debug: 205 374 command.c:369 register_command_handler(): registering ‘ocd_flash’…

Debug: 206 374 command.c:369 register_command_handler(): registering ‘ocd_flash’…

Debug: 207 374 command.c:369 register_command_handler(): registering ‘ocd_flash’…

Debug: 208 374 command.c:369 register_command_handler(): registering ‘ocd_flash’…

Debug: 209 374 command.c:369 register_command_handler(): registering ‘ocd_flash’…

Debug: 210 374 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_mflash init

Debug: 211 374 command.c:145 script_debug(): command - ocd_mflash ocd_mflash init

Debug: 213 374 mflash.c:1379 handle_mflash_init_command(): Initializing mflash devices…

Debug: 214 374 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_nand init

Debug: 215 374 command.c:145 script_debug(): command - ocd_nand ocd_nand init

Debug: 217 374 tcl.c:497 handle_nand_init_command(): Initializing NAND devices…

Debug: 218 374 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_pld init

Debug: 219 374 command.c:145 script_debug(): command - ocd_pld ocd_pld init

Debug: 221 374 pld.c:207 handle_pld_init_command(): Initializing PLDs…

Info : 222 15116 server.c:83 add_connection(): accepting ‘gdb’ connection from 3333

Debug: 223 15116 breakpoints.c:359 breakpoint_clear_target_internal(): Delete all breakpoints for target: stm32lx.cpu

Debug: 224 15116 breakpoints.c:499 watchpoint_clear_target(): Delete all watchpoints for target: stm32lx.cpu

Debug: 225 15116 target.c:1299 target_call_event_callbacks(): target event 23 (gdb-attach)

Debug: 226 15116 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0xe0042000 4 1

Debug: 227 15116 target.c:1917 target_read_u32(): address: 0xe0042000, value: 0x10186416

Debug: 228 15116 stm32lx.c:476 stm32lx_probe(): device id = 0x10186416

Debug: 229 15116 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x1ff8004c 2 1

Debug: 230 15116 target.c:1941 target_read_u16(): address: 0x1ff8004c, value: 0x0080

Info : 231 15116 stm32lx.c:507 stm32lx_probe(): flash size = 128kbytes

Debug: 232 15116 gdb_server.c:821 gdb_new_connection(): New GDB Connection: 1, Target stm32lx.cpu, state: unknown

Debug: 233 15116 gdb_server.c:2048 gdb_input_inner(): received packet: ‘qSupported:qRelocInsn+’

Debug: 234 15116 gdb_server.c:2048 gdb_input_inner(): received packet: ‘QStartNoAckMode’

Warn : 235 15116 gdb_server.c:606 gdb_get_packet_inner(): acknowledgment received, but no packet pending

Debug: 236 15116 gdb_server.c:2048 gdb_input_inner(): received packet: ‘Hg0’

Debug: 237 15116 gdb_server.c:2048 gdb_input_inner(): received packet: ‘?’

User : 238 15116 gdb_server.c:128 gdb_last_signal(): undefined debug reason 6 - target needs reset

Debug: 239 15116 gdb_server.c:2048 gdb_input_inner(): received packet: ‘Hc-1’

Debug: 240 15116 gdb_server.c:2048 gdb_input_inner(): received packet: ‘qC’

Debug: 241 15116 gdb_server.c:2048 gdb_input_inner(): received packet: ‘qAttached’

Debug: 242 15116 gdb_server.c:2048 gdb_input_inner(): received packet: ‘qOffsets’

Debug: 243 15116 gdb_server.c:2048 gdb_input_inner(): received packet: ‘g’

Debug: 244 15116 gdb_server.c:2048 gdb_input_inner(): received packet: ‘qXfer:memory-map:read::0,fff’

Debug: 245 15116 gdb_server.c:2048 gdb_input_inner(): received packet: ‘m0,4’

Debug: 246 15116 gdb_server.c:1200 gdb_read_memory_packet(): addr: 0x00000000, len: 0x00000004

Debug: 247 15116 target.c:1769 target_read_buffer(): reading buffer of 4 byte at 0x00000000

Debug: 248 15116 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x00000000 4 1

Debug: 249 15116 gdb_server.c:2048 gdb_input_inner(): received packet: ‘qTStatus’

Debug: 250 15116 gdb_server.c:2048 gdb_input_inner(): received packet: ‘qfThreadInfo’

Debug: 251 15116 gdb_server.c:2048 gdb_input_inner(): received packet: ‘qL1200000000000000000’

Debug: 252 15132 gdb_server.c:2048 gdb_input_inner(): received packet: ‘qRcmd,72657365742068616c74’

Debug: 253 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_reset halt

Debug: 254 15132 command.c:145 script_debug(): command - reset ocd_reset halt

Debug: 256 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_target names

Debug: 257 15132 command.c:145 script_debug(): command - ocd_target ocd_target names

Debug: 258 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32lx.cpu invoke-event reset-start

Debug: 259 15132 command.c:145 script_debug(): command - ocd_stm32lx.cpu ocd_stm32lx.cpu invoke-event reset-start

Debug: 260 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_jtag arp_init-reset

Debug: 261 15132 command.c:145 script_debug(): command - ocd_jtag ocd_jtag arp_init-reset

Debug: 263 15132 stlink_transport.c:37 stlink_transport_jtag_command(): stlink_transport_jtag_command

Debug: 264 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32lx.cpu cget -chain-position

Debug: 265 15132 command.c:145 script_debug(): command - ocd_stm32lx.cpu ocd_stm32lx.cpu cget -chain-position

Debug: 266 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_jtag tapisenabled stm32lx.cpu

Debug: 267 15132 command.c:145 script_debug(): command - ocd_jtag ocd_jtag tapisenabled stm32lx.cpu

Debug: 268 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32lx.cpu invoke-event examine-start

Debug: 269 15132 command.c:145 script_debug(): command - ocd_stm32lx.cpu ocd_stm32lx.cpu invoke-event examine-start

Debug: 270 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32lx.cpu arp_examine

Debug: 271 15132 command.c:145 script_debug(): command - ocd_stm32lx.cpu ocd_stm32lx.cpu arp_examine

Debug: 272 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32lx.cpu invoke-event examine-end

Debug: 273 15132 command.c:145 script_debug(): command - ocd_stm32lx.cpu ocd_stm32lx.cpu invoke-event examine-end

Debug: 274 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32lx.cpu invoke-event reset-assert-pre

Debug: 275 15132 command.c:145 script_debug(): command - ocd_stm32lx.cpu ocd_stm32lx.cpu invoke-event reset-assert-pre

Debug: 276 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32lx.cpu cget -chain-position

Debug: 277 15132 command.c:145 script_debug(): command - ocd_stm32lx.cpu ocd_stm32lx.cpu cget -chain-position

Debug: 278 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_jtag tapisenabled stm32lx.cpu

Debug: 279 15132 command.c:145 script_debug(): command - ocd_jtag ocd_jtag tapisenabled stm32lx.cpu

Debug: 280 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32lx.cpu arp_reset assert 1

Debug: 281 15132 command.c:145 script_debug(): command - ocd_stm32lx.cpu ocd_stm32lx.cpu arp_reset assert 1

Debug: 282 15132 target.c:1620 target_free_all_working_areas_restore(): freeing all working areas

Debug: 283 15132 stm32_stlink.c:417 stm32_stlink_assert_reset(): stm32_stlink_assert_reset

Debug: 284 15132 stlink_interface.c:125 stlink_interface_execute_queue(): stlink_interface_execute_queue: ignored

Debug: 285 15132 core.c:715 jtag_add_reset(): SRST line asserted

Debug: 286 15132 core.c:743 jtag_add_reset(): TRST line released

Debug: 287 15132 core.c:323 jtag_call_event_callbacks(): jtag event: TAP reset

Debug: 288 15132 stlink_usb.c:788 stlink_usb_reset(): RESET: 0x00000080

Debug: 289 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32lx.cpu invoke-event reset-assert-post

Debug: 290 15132 command.c:145 script_debug(): command - ocd_stm32lx.cpu ocd_stm32lx.cpu invoke-event reset-assert-post

Debug: 291 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32lx.cpu invoke-event reset-deassert-pre

Debug: 292 15132 command.c:145 script_debug(): command - ocd_stm32lx.cpu ocd_stm32lx.cpu invoke-event reset-deassert-pre

Debug: 293 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32lx.cpu cget -chain-position

Debug: 294 15132 command.c:145 script_debug(): command - ocd_stm32lx.cpu ocd_stm32lx.cpu cget -chain-position

Debug: 295 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_jtag tapisenabled stm32lx.cpu

Debug: 296 15132 command.c:145 script_debug(): command - ocd_jtag ocd_jtag tapisenabled stm32lx.cpu

Debug: 297 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32lx.cpu arp_reset deassert 1

Debug: 298 15132 command.c:145 script_debug(): command - ocd_stm32lx.cpu ocd_stm32lx.cpu arp_reset deassert 1

Debug: 299 15132 target.c:1620 target_free_all_working_areas_restore(): freeing all working areas

Debug: 300 15132 stm32_stlink.c:475 stm32_stlink_deassert_reset(): stm32_stlink_deassert_reset

Debug: 301 15132 stlink_interface.c:125 stlink_interface_execute_queue(): stlink_interface_execute_queue: ignored

Debug: 302 15132 core.c:719 jtag_add_reset(): SRST line released

Debug: 303 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32lx.cpu invoke-event reset-deassert-post

Debug: 304 15132 command.c:145 script_debug(): command - ocd_stm32lx.cpu ocd_stm32lx.cpu invoke-event reset-deassert-post

Debug: 305 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32lx.cpu cget -chain-position

Debug: 306 15132 command.c:145 script_debug(): command - ocd_stm32lx.cpu ocd_stm32lx.cpu cget -chain-position

Debug: 307 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_jtag tapisenabled stm32lx.cpu

Debug: 308 15132 command.c:145 script_debug(): command - ocd_jtag ocd_jtag tapisenabled stm32lx.cpu

Debug: 309 15132 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32lx.cpu arp_waitstate halted 1000

Debug: 310 15132 command.c:145 script_debug(): command - ocd_stm32lx.cpu ocd_stm32lx.cpu arp_waitstate halted 1000

Debug: 311 15132 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 312 15132 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 0 value 0x0

Debug: 313 15132 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 314 15132 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 1 value 0x0

Debug: 315 15132 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 316 15132 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 2 value 0x0

Debug: 317 15132 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 318 15132 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 3 value 0x0

Debug: 319 15132 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 320 15132 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 4 value 0x0

Debug: 321 15132 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 322 15132 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 5 value 0x0

Debug: 323 15132 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 324 15132 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 6 value 0x0

Debug: 325 15132 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 326 15132 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 7 value 0x0

Debug: 327 15132 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 328 15132 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 8 value 0x0

Debug: 329 15132 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 330 15132 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 9 value 0x0

Debug: 331 15132 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 332 15132 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 10 value 0x0

Debug: 333 15132 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 334 15132 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 11 value 0x0

Debug: 335 15132 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 336 15132 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 12 value 0x0

Debug: 337 15132 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 338 15132 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 13 value 0x0

Debug: 339 15132 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 340 15132 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 14 value 0xffffffff

Debug: 341 15132 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 342 15132 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 15 value 0x0

Debug: 343 15132 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 344 15132 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 16 value 0x0

Debug: 345 15132 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 346 15147 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 17 value 0x0

Debug: 347 15147 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 348 15147 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 18 value 0x0

Debug: 349 15147 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 350 15147 stm32_stlink.c:136 stm32_stlink_load_core_reg_u32(): load from special reg 19 value 0x0

Debug: 351 15147 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 352 15147 stm32_stlink.c:136 stm32_stlink_load_core_reg_u32(): load from special reg 20 value 0x0

Debug: 353 15147 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 354 15147 stm32_stlink.c:136 stm32_stlink_load_core_reg_u32(): load from special reg 21 value 0x0

Debug: 355 15147 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 356 15147 stm32_stlink.c:136 stm32_stlink_load_core_reg_u32(): load from special reg 22 value 0x0

Debug: 357 15147 stm32_stlink.c:372 stlink_debug_entry(): entered debug state in core mode: Thread at PC 0x00000000, target->state: halted

Debug: 358 15147 target.c:1299 target_call_event_callbacks(): target event 0 (gdb-halt)

Debug: 359 15147 target.c:1299 target_call_event_callbacks(): target event 1 (halted)

User : 360 15147 target.c:1672 target_arch_state(): target state: halted

User : 361 15147 armv7m.c:517 armv7m_arch_state(): target halted due to debug-request, current mode: Thread

xPSR: 00000000 pc: 00000000 msp: 00000000

Debug: 362 15147 target.c:1299 target_call_event_callbacks(): target event 6 (gdb-end)

Debug: 363 15147 stm32_stlink.c:404 stm32_stlink_poll(): halted: PC: 0x00000000

Debug: 364 15147 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32lx.cpu curstate

Debug: 365 15147 command.c:145 script_debug(): command - ocd_stm32lx.cpu ocd_stm32lx.cpu curstate

Debug: 366 15147 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32lx.cpu invoke-event reset-end

Debug: 367 15147 command.c:145 script_debug(): command - ocd_stm32lx.cpu ocd_stm32lx.cpu invoke-event reset-end

Debug: 368 15147 gdb_server.c:2048 gdb_input_inner(): received packet: ‘vFlashErase:08000000,00001000’

Debug: 369 15147 target.c:1299 target_call_event_callbacks(): target event 25 (gdb-flash-erase-start)

Debug: 370 15147 stlink_interface.c:125 stlink_interface_execute_queue(): stlink_interface_execute_queue: ignored

Debug: 371 15147 target.c:1983 target_write_u32(): address: 0x40023c0c, value: 0x89abcdef

Debug: 372 15147 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c0c 4 1

Debug: 373 15147 target.c:1983 target_write_u32(): address: 0x40023c0c, value: 0x02030405

Debug: 374 15147 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c0c 4 1

Debug: 375 15147 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c04 4 1

Debug: 376 15147 target.c:1917 target_read_u32(): address: 0x40023c04, value: 0x00000006

Debug: 377 15147 target.c:1983 target_write_u32(): address: 0x40023c10, value: 0x8c9daebf

Debug: 378 15147 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c10 4 1

Debug: 379 15147 target.c:1983 target_write_u32(): address: 0x40023c10, value: 0x13141516

Debug: 380 15147 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c10 4 1

Debug: 381 15147 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c04 4 1

Debug: 382 15147 target.c:1917 target_read_u32(): address: 0x40023c04, value: 0x00000004

Debug: 383 15147 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x00000208

Debug: 384 15147 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 385 15147 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 386 15147 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000c

Debug: 387 15147 target.c:1983 target_write_u32(): address: 0x08000000, value: 0x00000000

Debug: 388 15147 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x08000000 4 1

Debug: 389 15147 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 390 15147 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x00000009

Debug: 391 15163 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 392 15163 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x00000009

Debug: 393 15179 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 394 15179 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 395 15179 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x00000208

Debug: 396 15179 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 397 15179 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 398 15179 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 399 15179 target.c:1983 target_write_u32(): address: 0x08000100, value: 0x00000000

Debug: 400 15179 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x08000100 4 1

Debug: 401 15179 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 402 15179 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000b

Debug: 403 15194 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 404 15194 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 405 15194 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x00000208

Debug: 406 15194 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 407 15194 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 408 15194 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 409 15194 target.c:1983 target_write_u32(): address: 0x08000200, value: 0x00000000

Debug: 410 15194 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x08000200 4 1

Debug: 411 15194 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 412 15194 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000b

Debug: 413 15210 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 414 15210 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 415 15210 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x00000208

Debug: 416 15210 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 417 15210 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 418 15210 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 419 15210 target.c:1983 target_write_u32(): address: 0x08000300, value: 0x00000000

Debug: 420 15210 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x08000300 4 1

Debug: 421 15210 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 422 15210 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000b

Debug: 423 15225 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 424 15225 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 425 15225 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x00000208

Debug: 426 15225 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 427 15225 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 428 15225 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 429 15225 target.c:1983 target_write_u32(): address: 0x08000400, value: 0x00000000

Debug: 430 15225 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x08000400 4 1

Debug: 431 15225 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 432 15225 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000b

Debug: 433 15241 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 434 15241 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 435 15241 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x00000208

Debug: 436 15241 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 437 15241 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 438 15241 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 439 15241 target.c:1983 target_write_u32(): address: 0x08000500, value: 0x00000000

Debug: 440 15241 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x08000500 4 1

Debug: 441 15241 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 442 15241 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000b

Debug: 443 15257 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 444 15257 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 445 15257 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x00000208

Debug: 446 15257 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 447 15257 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 448 15257 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 449 15257 target.c:1983 target_write_u32(): address: 0x08000600, value: 0x00000000

Debug: 450 15257 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x08000600 4 1

Debug: 451 15257 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 452 15257 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000b

Debug: 453 15272 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 454 15272 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 455 15272 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x00000208

Debug: 456 15272 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 457 15272 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 458 15272 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 459 15272 target.c:1983 target_write_u32(): address: 0x08000700, value: 0x00000000

Debug: 460 15272 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x08000700 4 1

Debug: 461 15272 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 462 15272 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000b

Debug: 463 15288 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 464 15288 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 465 15288 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x00000208

Debug: 466 15288 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 467 15288 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 468 15288 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 469 15288 target.c:1983 target_write_u32(): address: 0x08000800, value: 0x00000000

Debug: 470 15288 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x08000800 4 1

Debug: 471 15288 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 472 15288 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000b

Debug: 473 15303 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 474 15303 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 475 15303 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x00000208

Debug: 476 15303 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 477 15303 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 478 15303 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 479 15303 target.c:1983 target_write_u32(): address: 0x08000900, value: 0x00000000

Debug: 480 15303 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x08000900 4 1

Debug: 481 15303 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 482 15303 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000b

Debug: 483 15319 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 484 15319 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 485 15319 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x00000208

Debug: 486 15319 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 487 15319 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 488 15319 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 489 15319 target.c:1983 target_write_u32(): address: 0x08000a00, value: 0x00000000

Debug: 490 15319 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x08000a00 4 1

Debug: 491 15319 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 492 15319 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000b

Debug: 493 15335 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 494 15335 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 495 15335 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x00000208

Debug: 496 15335 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 497 15335 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 498 15335 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 499 15335 target.c:1983 target_write_u32(): address: 0x08000b00, value: 0x00000000

Debug: 500 15335 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x08000b00 4 1

Debug: 501 15335 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 502 15335 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000b

Debug: 503 15350 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 504 15350 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 505 15350 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x00000208

Debug: 506 15350 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 507 15350 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 508 15350 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 509 15350 target.c:1983 target_write_u32(): address: 0x08000c00, value: 0x00000000

Debug: 510 15350 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x08000c00 4 1

Debug: 511 15350 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 512 15350 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000b

Debug: 513 15366 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 514 15366 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 515 15366 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x00000208

Debug: 516 15366 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 517 15366 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 518 15366 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 519 15366 target.c:1983 target_write_u32(): address: 0x08000d00, value: 0x00000000

Debug: 520 15366 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x08000d00 4 1

Debug: 521 15366 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 522 15366 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000b

Debug: 523 15381 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 524 15381 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 525 15381 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x00000208

Debug: 526 15381 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 527 15381 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 528 15381 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 529 15381 target.c:1983 target_write_u32(): address: 0x08000e00, value: 0x00000000

Debug: 530 15381 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x08000e00 4 1

Debug: 531 15381 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 532 15381 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000b

Debug: 533 15397 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 534 15397 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 535 15397 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x00000208

Debug: 536 15397 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 537 15397 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 538 15397 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 539 15397 target.c:1983 target_write_u32(): address: 0x08000f00, value: 0x00000000

Debug: 540 15397 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x08000f00 4 1

Debug: 541 15397 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 542 15397 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000b

Debug: 543 15413 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c18 4 1

Debug: 544 15413 target.c:1917 target_read_u32(): address: 0x40023c18, value: 0x0000000e

Debug: 545 15413 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c04 4 1

Debug: 546 15413 target.c:1917 target_read_u32(): address: 0x40023c04, value: 0x0000020c

Debug: 547 15413 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x0000020e

Debug: 548 15413 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 549 15413 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c04 4 1

Debug: 550 15413 target.c:1917 target_read_u32(): address: 0x40023c04, value: 0x0000020e

Debug: 551 15413 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x0000020f

Debug: 552 15413 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 553 15413 target.c:1299 target_call_event_callbacks(): target event 26 (gdb-flash-erase-end)

Debug: 554 15413 gdb_server.c:2048 gdb_input_inner(): received packet: ‘vFlashWrite:8000000:’

Debug: 555 15413 gdb_server.c:2048 gdb_input_inner(): received packet: ‘vFlashWrite:800010c:€´…°’

Debug: 556 15413 gdb_server.c:2048 gdb_input_inner(): received packet: ‘vFlashWrite:800064c:’

Debug: 557 15413 gdb_server.c:2048 gdb_input_inner(): received packet: ‘vFlashDone’

Debug: 558 15413 target.c:1299 target_call_event_callbacks(): target event 27 (gdb-flash-write-start)

Debug: 559 15413 core.c:703 flash_write_unlock(): image_read_section: section = 0, t_section_num = 0, section_offset = 0, buffer_size = 0, size_read = 1644

Debug: 560 15413 target.c:1470 target_alloc_working_area_try(): MMU disabled, using physical address for working memory 0x20000000

Debug: 561 15413 target.c:1523 target_alloc_working_area_try(): allocated new working area of 20 bytes at address 0x20000000

Debug: 562 15413 target.c:1386 print_wa_layout(): * 0x20000000-0x20000013 (20 bytes)

Debug: 563 15413 target.c:1386 print_wa_layout(): 0x20000014-0x200037ff (14316 bytes)

Debug: 564 15413 target.c:1688 target_write_buffer(): writing buffer of 20 byte at 0x20000000

Debug: 565 15413 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x20000000 4 5

Debug: 566 15413 target.c:1523 target_alloc_working_area_try(): allocated new working area of 13312 bytes at address 0x20000014

Debug: 567 15413 target.c:1386 print_wa_layout(): * 0x20000000-0x20000013 (20 bytes)

Debug: 568 15413 target.c:1386 print_wa_layout(): * 0x20000014-0x20003413 (13312 bytes)

Debug: 569 15413 target.c:1386 print_wa_layout(): 0x20003414-0x200037ff (1004 bytes)

Debug: 570 15413 stm32lx.c:299 stm32lx_write_half_pages(): allocated working area for data (3400 bytes)

Debug: 571 15413 target.c:1983 target_write_u32(): address: 0x40023c0c, value: 0x89abcdef

Debug: 572 15413 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c0c 4 1

Debug: 573 15413 target.c:1983 target_write_u32(): address: 0x40023c0c, value: 0x02030405

Debug: 574 15413 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c0c 4 1

Debug: 575 15413 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c04 4 1

Debug: 576 15413 target.c:1917 target_read_u32(): address: 0x40023c04, value: 0x00000006

Debug: 577 15413 target.c:1983 target_write_u32(): address: 0x40023c10, value: 0x8c9daebf

Debug: 578 15413 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c10 4 1

Debug: 579 15413 target.c:1983 target_write_u32(): address: 0x40023c10, value: 0x13141516

Debug: 580 15413 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c10 4 1

Debug: 581 15413 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c04 4 1

Debug: 582 15413 target.c:1917 target_read_u32(): address: 0x40023c04, value: 0x00000004

Debug: 583 15413 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c04 4 1

Debug: 584 15413 target.c:1917 target_read_u32(): address: 0x40023c04, value: 0x00000004

Debug: 585 15413 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x00000404

Debug: 586 15413 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 587 15413 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x40023c04 4 1

Debug: 588 15413 target.c:1917 target_read_u32(): address: 0x40023c04, value: 0x00000404

Debug: 589 15413 target.c:1983 target_write_u32(): address: 0x40023c04, value: 0x0000040c

Debug: 590 15413 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x40023c04 4 1

Debug: 591 15413 target.c:1688 target_write_buffer(): writing buffer of 1536 byte at 0x20000014

Debug: 592 15413 stm32_stlink.c:716 stm32_stlink_write_memory(): stm32_stlink_write_memory 0x20000014 4 384

Debug: 593 15459 target.c:1299 target_call_event_callbacks(): target event 3 (resume-start)

Debug: 594 15459 stm32_stlink.c:538 stm32_stlink_resume(): stm32_stlink_resume 0 0x20000000 1 1

Debug: 595 15459 armv7m.c:144 armv7m_restore_context():

Debug: 596 15459 stm32_stlink.c:155 stm32_stlink_store_core_reg_u32(): stm32_stlink_store_core_reg_u32

Debug: 597 15459 stm32_stlink.c:185 stm32_stlink_store_core_reg_u32(): write core reg 15 value 0x20000000

Debug: 598 15459 armv7m.c:252 armv7m_write_core_reg(): write core reg 15 value 0x20000000

Debug: 599 15459 stm32_stlink.c:155 stm32_stlink_store_core_reg_u32(): stm32_stlink_store_core_reg_u32

Debug: 600 15459 stm32_stlink.c:185 stm32_stlink_store_core_reg_u32(): write core reg 4 value 0x820050

Debug: 601 15459 armv7m.c:252 armv7m_write_core_reg(): write core reg 4 value 0x820050

Debug: 602 15459 stm32_stlink.c:155 stm32_stlink_store_core_reg_u32(): stm32_stlink_store_core_reg_u32

Debug: 603 15459 stm32_stlink.c:185 stm32_stlink_store_core_reg_u32(): write core reg 3 value 0x820080

Debug: 604 15459 armv7m.c:252 armv7m_write_core_reg(): write core reg 3 value 0x820080

Debug: 605 15459 stm32_stlink.c:155 stm32_stlink_store_core_reg_u32(): stm32_stlink_store_core_reg_u32

Debug: 606 15459 stm32_stlink.c:185 stm32_stlink_store_core_reg_u32(): write core reg 2 value 0x180

Debug: 607 15459 armv7m.c:252 armv7m_write_core_reg(): write core reg 2 value 0x180

Debug: 608 15459 stm32_stlink.c:155 stm32_stlink_store_core_reg_u32(): stm32_stlink_store_core_reg_u32

Debug: 609 15459 stm32_stlink.c:185 stm32_stlink_store_core_reg_u32(): write core reg 1 value 0x20000014

Debug: 610 15459 armv7m.c:252 armv7m_write_core_reg(): write core reg 1 value 0x20000014

Debug: 611 15459 stm32_stlink.c:155 stm32_stlink_store_core_reg_u32(): stm32_stlink_store_core_reg_u32

Debug: 612 15459 stm32_stlink.c:185 stm32_stlink_store_core_reg_u32(): write core reg 0 value 0x8000000

Debug: 613 15459 armv7m.c:252 armv7m_write_core_reg(): write core reg 0 value 0x8000000

Debug: 614 15459 target.c:1299 target_call_event_callbacks(): target event 2 (resumed)

Debug: 615 15459 target.c:1299 target_call_event_callbacks(): target event 4 (resume-end)

Debug: 616 15459 target.c:2449 target_wait_state(): waiting for target halted…

Error: 655 35474 target.c:2457 target_wait_state(): timed out while waiting for target halted

Debug: 656 35474 stm32_stlink.c:506 stm32_stlink_halt(): stm32_stlink_halt

Debug: 657 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 658 35474 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 0 value 0x8000000

Debug: 659 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 660 35474 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 1 value 0x20000014

Debug: 661 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 662 35474 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 2 value 0x180

Debug: 663 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 664 35474 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 3 value 0x820080

Debug: 665 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 666 35474 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 4 value 0x820050

Debug: 667 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 668 35474 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 5 value 0x0

Debug: 669 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 670 35474 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 6 value 0x0

Debug: 671 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 672 35474 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 7 value 0x0

Debug: 673 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 674 35474 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 8 value 0x0

Debug: 675 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 676 35474 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 9 value 0x0

Debug: 677 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 678 35474 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 10 value 0x0

Debug: 679 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 680 35474 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 11 value 0x0

Debug: 681 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 682 35474 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 12 value 0x0

Debug: 683 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 684 35474 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 13 value 0xffffffe0

Debug: 685 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 686 35474 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 14 value 0xfffffff9

Debug: 687 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 688 35474 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 15 value 0x0

Debug: 689 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 690 35474 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 16 value 0x3

Debug: 691 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 692 35474 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 17 value 0xffffffe0

Debug: 693 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 694 35474 stm32_stlink.c:71 stm32_stlink_load_core_reg_u32(): load from core reg 18 value 0x0

Debug: 695 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 696 35474 stm32_stlink.c:136 stm32_stlink_load_core_reg_u32(): load from special reg 19 value 0x0

Debug: 697 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 698 35474 stm32_stlink.c:136 stm32_stlink_load_core_reg_u32(): load from special reg 20 value 0x0

Debug: 699 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 700 35474 stm32_stlink.c:136 stm32_stlink_load_core_reg_u32(): load from special reg 21 value 0x0

Debug: 701 35474 stm32_stlink.c:56 stm32_stlink_load_core_reg_u32(): stm32_stlink_load_core_reg_u32

Debug: 702 35474 stm32_stlink.c:136 stm32_stlink_load_core_reg_u32(): load from special reg 22 value 0x0

Debug: 703 35474 stm32_stlink.c:372 stlink_debug_entry(): entered debug state in core mode: Handler at PC 0x00000000, target->state: halted

Debug: 704 35474 target.c:1299 target_call_event_callbacks(): target event 0 (gdb-halt)

Debug: 705 35474 target.c:1299 target_call_event_callbacks(): target event 1 (halted)

User : 706 35474 target.c:1672 target_arch_state(): target state: halted

User : 707 35474 armv7m.c:517 armv7m_arch_state(): target halted due to debug-request, current mode: Handler HardFault

xPSR: 0x00000003 pc: 00000000 msp: 0xffffffe0

Debug: 708 35474 target.c:1299 target_call_event_callbacks(): target event 6 (gdb-end)

Debug: 709 35474 stm32_stlink.c:404 stm32_stlink_poll(): halted: PC: 0x00000000

Debug: 710 35474 target.c:1592 target_free_working_area_restore(): freed 13312 bytes of working area at address 0x20000014

Debug: 711 35474 target.c:1386 print_wa_layout(): * 0x20000000-0x20000013 (20 bytes)

Debug: 712 35474 target.c:1386 print_wa_layout(): 0x20000014-0x200037ff (14316 bytes)

Debug: 713 35474 target.c:1592 target_free_working_area_restore(): freed 20 bytes of working area at address 0x20000000

Debug: 714 35474 target.c:1386 print_wa_layout(): 0x20000000-0x200037ff (14336 bytes)

Error: 715 35474 core.c:93 flash_driver_write(): error writing to flash at address 0x08000000 at offset 0x00000000

Debug: 716 35474 target.c:1299 target_call_event_callbacks(): target event 28 (gdb-flash-write-end)

Debug: 717 35474 gdb_server.c:2048 gdb_input_inner(): received packet: ‘qL1200000000000000000’

Debug: 718 35474 gdb_server.c:2048 gdb_input_inner(): received packet: ‘m0,4’

Debug: 719 35474 gdb_server.c:1200 gdb_read_memory_packet(): addr: 0x00000000, len: 0x00000004

Debug: 720 35474 target.c:1769 target_read_buffer(): reading buffer of 4 byte at 0x00000000

Debug: 721 35474 stm32_stlink.c:668 stm32_stlink_read_memory(): stm32_stlink_read_memory 0x00000000 4 1

Debug: 722 35505 gdb_server.c:847 gdb_connection_closed(): GDB Close, Target: stm32lx.cpu, state: halted, gdb_actual_connections=0

Debug: 723 35505 target.c:1299 target_call_event_callbacks(): target event 6 (gdb-end)

Debug: 724 35505 target.c:1299 target_call_event_callbacks(): target event 24 (gdb-detach)

Info : 725 35505 server.c:472 server_loop(): dropped ‘gdb’ connection

I am not entirely sure how well tested the stm32l flash driver is, so it could contain “features”.

Firstly i would suggest you remove gdb from the equation, this makes it a bit easier to track issues.

I would create a openocd.cfg as follows:

log_output openocd.log
debug_level 3

source [find scripts/board/stm32ldiscovery.cfg]

init
reset init

# flash program, erase separately
flash erase_sector stm32lx.flash 0 last
flash write_image stm32l_test.elf

# it is possible to erase in one step, but for testing we split this operation into two
#flash write_image erase stm32l_test.elf

If you are still getting issues then can you attach a testcase here - including any map files.

Cheers

Spen

Hello,

the problem also exists with your script.

Attached you can find the log and map file.

Regards

Garag

Hello Garag,

Does your file upload and run OK if you use another method to flash? ST-Link utility under windows, or texane st-flash utility under linux. (GitHub - stlink-org/stlink: Open source STM32 MCU programming toolset).

hsutherl makes a good point, have you tested any other tools?

Just so i can test here, can you give me the elf, or even the full project.

Cheers

Spen

It is a really simple test application. The original problem occured with my project. When i use a JLink with the JLink GDB Server it works.

Currently i am at work. When i am at home i will upload the simple test project. Also i will try to flash it with my project with the ST tools to verify if it will run.

Regards

Garag

Hello again,

with the flash tool from ST i was able to flash the program. The complete project for this test can you find as attachment.

i have done two more tests:

  1. Ersased the flash with the ST flash tool and programming with openOCD. OpenOCD was unable to finnish successfully. After reading back the flash contents with the ST tool i saw that nothing was written to the flash.

  2. I have flashed the test project with the ST flash tool and then startet openOCD. OpenOCD does not break and seems to work. I have attached the openOCD log of this second test.

Thank you for your help.

Regards

Garag

The issue seems related to a blank (erased device) - i am running a few tests now, but OpenOCD fails to execute its flash loader if the target is blank !!

Very strange.

Cheers

Spen

Hi,

As mentioned previously i have spotted an issue with the stm32l15x targets.

To speed up programming we load a small program into ram and execute it. It seems that if the stm32l has been erased and has received a reset or power cycle then any attempt to run a ram loader will fail with a Hard Fault.

If you look into your logs you will see this.

Not sure if you are able to build OpenOCD yourself, if so i have uploaded the change for review - http://openocd.zylin.com/101

Cheers

Spen

Hi,

i am working on a build environment under Windows for openOCD. Your change is currently not approved. How can i get the changes and applay it to the master branch ?

Regards

Garag

Ok clone as OpenOCD repo as normal, eg.

git clone http://git.code.sf.net/p/openocd/code openocd

then to add my change

git fetch http://openocd.zylin.com/openocd refs/changes/10/1010/1 && git checkout FETCH_HEAD

to build you then do

only required once on a new clone

./bootstrap

configure build

./configure --enable-maintainer-mode --disable-werror --enable-stlink

and build

make

Cheers

Spen