read flash banks
[openocd-rpi2-stm32] / zc.txt
1
2 root@rpi4:/home/pi/openocd-rpi2-stm32# openocd -f rpi4-zc-swd.cfg
3 Open On-Chip Debugger 0.11.0+dev-00062-g6405d35f3-dirty (2021-03-27-16:05)
4 Licensed under GNU GPL v2
5 For bug reports, read
6         http://openocd.org/doc/doxygen/bugs.html
7 Info : BCM2835 GPIO JTAG/SWD bitbang driver
8 Info : clock speed 100 kHz
9 Info : SWD DPIDR 0x0bc11477
10 Info : chip.cpu: hardware has 4 breakpoints, 2 watchpoints
11 Info : starting gdb server for chip.cpu on 3333
12 Info : Listening on port 3333 for gdb connections
13 AP ID register 0x04770031
14         Type is MEM-AP AHB3
15 MEM-AP BASE 0xf0000003
16         Valid ROM table present
17                 Component base address 0xf0000000
18                 Peripheral ID 0x00000a0447
19                 Designer is 0x0a0, STMicroelectronics
20                 Part is 0x447, Unrecognized
21                 Component class is 0x1, ROM table
22                 MEMTYPE system memory present on bus
23         ROMTABLE[0x0] = 0xf00ff003
24                 Component base address 0xe00ff000
25                 Peripheral ID 0x04000bb4c0
26                 Designer is 0x4bb, ARM Ltd
27                 Part is 0x4c0, Cortex-M0+ ROM (ROM Table)
28                 Component class is 0x1, ROM table
29                 MEMTYPE system memory present on bus
30         [L01] ROMTABLE[0x0] = 0xfff0f003
31                 Component base address 0xe000e000
32                 Peripheral ID 0x04000bb008
33                 Designer is 0x4bb, ARM Ltd
34                 Part is 0x8, Cortex-M0 SCS (System Control Space)
35                 Component class is 0xe, Generic IP component
36         [L01] ROMTABLE[0x4] = 0xfff02003
37                 Component base address 0xe0001000
38                 Peripheral ID 0x04000bb00a
39                 Designer is 0x4bb, ARM Ltd
40                 Part is 0xa, Cortex-M0 DWT (Data Watchpoint and Trace)
41                 Component class is 0xe, Generic IP component
42         [L01] ROMTABLE[0x8] = 0xfff03003
43                 Component base address 0xe0002000
44                 Peripheral ID 0x04000bb00b
45                 Designer is 0x4bb, ARM Ltd
46                 Part is 0xb, Cortex-M0 BPU (Breakpoint Unit)
47                 Component class is 0xe, Generic IP component
48         [L01] ROMTABLE[0xc] = 0x0
49         [L01]   End of ROM table
50         ROMTABLE[0x4] = 0x200002
51                 Component not present
52         ROMTABLE[0x8] = 0x0
53                 End of ROM table
54
55
56 # figure out which stm32 is this
57 Info : SWD DPIDR 0x0bc11477
58 STM32L0xx
59
60 # using just target/stm32l0.cfg seems to produce just partial firmware dump
61
62 + openocd -f rpi4-zc-swd.cfg -f target/stm32l0_dual_bank.cfg
63 Open On-Chip Debugger 0.11.0+dev-00062-g6405d35f3-dirty (2021-03-27-16:05)
64 Licensed under GNU GPL v2
65 For bug reports, read
66         http://openocd.org/doc/doxygen/bugs.html
67 swd
68 Info : Listening on port 6666 for tcl connections
69 Info : Listening on port 4444 for telnet connections
70 Info : BCM2835 GPIO JTAG/SWD bitbang driver
71 Info : clock speed 300 kHz
72 Info : SWD DPIDR 0x0bc11477
73 Info : stm32l0.cpu: hardware has 4 breakpoints, 2 watchpoints
74 Error: stm32l0.cpu -- clearing lockup after double fault
75 Polling target stm32l0.cpu failed, trying to reexamine
76 Info : stm32l0.cpu: hardware has 4 breakpoints, 2 watchpoints
77 Info : starting gdb server for stm32l0.cpu on 3333
78 Info : Listening on port 3333 for gdb connections
79 Info : accepting 'gdb' connection on tcp/3333
80 Info : Device: STM32L0xx (Cat.5)
81 Info : STM32L flash has dual banks. Bank (0) size is 64kb, base address is 0x8000000
82 Info : Device: STM32L0xx (Cat.5)
83 Info : STM32L flash has dual banks. Bank (1) size is 64kb, base address is 0x8010000
84
85 # telnet localhost 4444
86
87 > flash banks
88 #0 : stm32l0.flash (stm32lx) at 0x08000000, size 0x00010000, buswidth 0, chipwidth 0
89 #1 : stm32l0.flash1 (stm32lx) at 0x08010000, size 0x00010000, buswidth 0, chipwidth 0
90
91 > flash read_bank 0 2012230024.0
92 wrote 65536 bytes to file 2012230024.0 from flash bank 0 at offset 0x00000000 in 1.198537s (53.398 KiB/s)
93
94 keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1211 ms). Workaround: increase "set remotetimeout" in GDB
95 > flash read_bank 1 2012230024.1
96 wrote 65536 bytes to file 2012230024.1 from flash bank 1 at offset 0x00000000 in 1.199143s (53.371 KiB/s)
97
98 keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1256 ms). Workaround: increase "set remotetimeout" in GDB
99 >