Hi. I've experimented with too many environments and too many flashers and think I now have a corrupted BL706 eval board. I'm on MacOS. It seems strange there are interface options for Segger and serial and not the provided board built using Bouffalo's own chips! I would LIKE to load code and debug over the provided BL702 debugger, as I'll need JTAG debugging, but if code download over serial is fast and reliable enough, I'm OK with that. (I'm also typing a lot in the hopes of getting this RV706 RISC-V Development Board with Bluetooth, LCD Display, and JTAG some Google rank.)

I'll soon need to work with the IoT version instead of the MCU version, but I'm taking your example LVG code now.. I have relied heavily on https://lupyuen.github.io/articles/bl706, but I know the MacOS bldevcube has had problems in the past, so I've tried to work around it, too. I understand that many names and directories have changed, and I've tried to adapt.

The code is built with

 make APP=lvgl \
     BOARD=bl706_avb \
     SUPPORT_LVGL=y

This gives me a an elf and bin for running, and an asm and map for correlation. First, we'll try speaking directly to OpenOCD at a very low level.

I am able to reliably start an OpenOCD session via

➜  bl_iot_sdk git:(master) ✗ riscv-openocd -d2 -f flash_tool/utils/openocd/if_rv_dbg_plus.cfg  -f flash_tool/utils/openocd/tgt_702.cfg

I'm able to successfully communicate to port 4444 via NC and 3333 via GDB.

Info : clock speed 4000 kHz
Info : JTAG tap: riscv.cpu tap/device found: 0x20000e05 (mfg: 0x702 (<unknown>), part: 0x0000, ver: 0x2)
Info : datacount=1 progbufsize=2
Info : Disabling abstract command reads from CSRs.
Info : Examined RISC-V core; found 1 harts
Info :  hart 0: XLEN=32, misa=0x40801125
Info : starting gdb server for riscv.cpu.0 on 3333
Info : Listening on port 3333 for gdb connections
Info : JTAG tap: riscv.cpu tap/device found: 0x20000e05 (mfg: 0x702 (<unknown>), part: 0x0000, ver: 0x2)
reset-assert-pre
reset-deassert-post
Info : Disabling abstract command writes to CSRs.
reset-init
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections

I may very well be getting tripped up on a single memory address having three addresses (base physical from JTAG side, 0x23000000 if it's code and 0x42000000 if it's instruction) but I decided to choose 0x2000 as that was used both in LupYeun's series and in a series of late night tweets. So this proceeds without error:

 nc localhost 4444 < cmds
��������Open On-Chip Debugger
> halt
> load_image lvgl_main.bin 0x2000

> reg pc 0x22020000
pc (/32): 0x23020000

> resume
> #  WaitCmd replaced with sleep 500 to wait a half seconds
> sleep 500
> mwb 0x4202c000 0x0
> mwb 0x4202bff0 0x48
> mwb 0x4202bff1 0x52
> mwb 0x4202bff2 0x44
> mwb 0x4202bff3 0x59
> mdb 0x4202bff0 0x4
0x4202bff0: 48 52 44 59

> # WaitCmd
> sleep 500
> mdw 0x4202bff4 0x3
0x4202bff4: 3bd27076 ab9432d4 7edb2457

> sleep 500

I think that burst of noise at the beginning is just bit rates syncing up and junk being flushed on the connection. It's consistent. It's a lot slower than I'd think a JTAG transfer should be at 35 seconds, but that's not a deal-breaker. The deal breaker is that the code didn't get loaded. Looking at the first several opcodes of the *.bin, it's the traditional RISC-V "make the stack and GP sane, relocate myself, call main; panic" loop but I can't tell that we've relocated and I don't see that the load actually changed memory. I think it has to do with cache synchronization between I & D caches and the JTAGer having a dirty image.

Displaying ...0x0000 (the relocated address) or 0x2000 (the offset of the load) for any of the segments at 0x2100.0000, 0x22, or 0x23 bears no fruit.


> mdb 0x21000000 0x20
mdb 0x21000000 0x20
0x21000000: 97 81 02 21 93 81 01 48 73 70 04 30 97 82 00 00 93 82 42 c3 93 e2 32 00 73 90 52 30 93 02 00 00

> mdb 0x21002000 0x20
mdb 0x21002000 0x20
0x21002000: b2 97 c2 06 37 a9 02 42 b6 97 62 07 ba 97 2e 84 13 05 49 f8 81 45 3e c8 ef c0 90 0f 0a 87 93 06

> mdb 0x22000000 0x20
mdb 0x22000000 0x20
0x22000000: ef be ad de ef be ad de ef be ad de ef be ad de ef be ad de ef be ad de ef be ad de ef be ad de

> mdb 0x22002000 0x20
mdb 0x22002000 0x20
0x22002000: ef be ad de ef be ad de ef be ad de ef be ad de ef be ad de ef be ad de ef be ad de ef be ad de

> mdb 0x23000000 0x20
mdb 0x23000000 0x20
0x23000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

> mdb 0x23002000 0x20
mdb 0x23002000 0x20
0x23002000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Now for convenience, I have an overkill .gdbinit that connects to the server, grabs the version with a symbol table, and defines some (OK, almost everything) memory ranges.

 cat .gdbinit
target extended-remote localhost:3333
file /Users/robertl/src/bl_mcu_sdk_/out/examples/lvgl/lvgl_main.elf

mem 0x22000000 0x22008000 rw
mem 0x22008000 0x22014000 rw
mem 0x42008000 0x42014000 rw
mem 0x22014000 0x22020000 rw
mem 0x42014000 0x42020000 rw
mem 0x22020000 0x22030000 rw
mem 0x42020000 0x42030000 rw
mem 0x22030000 0x2204C000 rw
mem 0x42030000 0x4204C000 rw
mem 0x23000000 0x23400000 ro

GDB successfully connects and returns sane-looking results for a SiFive 32-bitter:

0x21007c70 in ?? ()
(gdb) info registers
ra             0x21007d40	0x21007d40
sp             0x42026d00	0x42026d00
gp             0x42028480	0x42028480
tp             0x2567c03b	0x2567c03b
t0             0xb	11
[ ... ]
pc             0x21007c70	0x21007c70

It's troublesome that $pc if off in space, but I can hand assemble code, run it, and see it taking effect on registers, so I'm pretty sure the basic JTAG setup is OK. I just can't tame the load operation.

What is the most scriptable (not a GUI) way to reliable transfer and execute over USB with the provided Sipeed/Bouffalo JTAG adapter?

That's a mouthful. Let's look at the serial side.

There are several programs around that try to implement the BL602/4 upload process, but I can't find any that implement the BL70x protocol, so I'll limit myself to BLDevFlasherCube 1.6.8 for MacOS.

We set the interface to UART since this is not a Segger. We don't expect the serial ports exposed by the Sipeed JTAG probe (/dev/tty.usbserial1200 and /dev/tty.usbserial1201) to work. Actually, for debugging reproduciliity, let's physically remove those and go with /dev/tty.usbmodem0000000200001 which only appears after the board has had a Boot + Reset Salute. Fortunately, we can see the debugging fine. I think, however, that I've corrupted my setup enough in all my experimentation that I can't work my way back out.

BUG: We can select the chip type, but it doesn't 'stick'; the next time you view that setting, it's reverted back to BL602.

Under View, there are completely separate images depending on whether you comoplied with two different SDKs. That doesn't make much sense. That should be hidden to the developer. Maybe there's an ELF note or a symbol that stores this informatino or something...

In the leftmost column, we select Interface = UART (explained earlier, COM port = /dev/tty.usbmodembignumber), UART rate of 230400 as a conservative start, an Xtal of 32M (it's soldered to the board. Do I need to know this?) and Chip Erase = False. Refresh seems a bit silly since the app should register an observer on device notification and offer to change the type. This is just one more thing for users to mess up.

I originally started with the IOT settings and found it frustrating there was no "reset to defaults" and it was possible to mix up bins and cfgs of different types, I eventually settled on:

/Applications/BLDevCube.app/Contents/MacOS/chips/bl702/conf/mcu.toml
/Applications/BLDevCube.app/Contents/MacOS/chips/bl702/builtin_imgs/boot2_iap_v5.3/boot2_iap_debug.bin
/Users/robertl/src/bl_mcu_sdk/out/examples/lvgl/lvgl_bl702.bin
and /Applications/BLDevCube.app/Contents/MacOS/chips/bl702/builtin_imgs/mfg/bl702_mfg_stdfw.bin

These were mostly guesses.

BUG: The button ordering and labeling is strange. 'Log' and ''OpenUart' seem related. The UART is always opened. The last button is just whether it's channeled to log, right? So can they be the same button?

"Create Download" implied that's the action that adds the ELF loader to user's executable. On screenshots, it's "Create & Download" sometimes. If the creation thing is something you're trying to hid, don't show it here at all. Also, move it out from between the two related buttons. Dismissive obtions (like cancel) go to the left and action buttons (like "upload") go to the far right.

This screen used to actually put the device into download mode and spin. Now, it just crashes before trying, even if I deselect all the partitions to upload:

[04:56:29.556] - ========= Interface is Uart =========
[04:56:29.557] - eflash loader bin is eflash_loader_32m.bin
[04:56:29.558] - ========= chip flash id: c84015 =========
[04:56:29.560] - create partition.bin, pt_new is True
Traceback (most recent call last):
  File “core/bflb_iot_tool.py”, line 1213, in flasher_download_thread
  File “core/bflb_iot_tool.py”, line 954, in flasher_download_cfg_ini_gen
  File “libs/bflb_pt_creater.py”, line 90, in create_pt_table
KeyError: ‘pt_entry’

Whether or not partition table is selected, that's the crash.

Let's try the MCU view.

All the settings are the same, with the same rationale. Image Addr ix 0x2000 and BootInfo Addr is 0. With "Flash" set as the boot source:

[05:00:48.801] - Version: bflb_eflash_loader_v2.3.0
[05:00:48.801] - Program Start
[05:00:48.801] - ========= eflash loader cmd arguments =========
[05:00:48.801] - None
[05:00:48.801] - Config file: /Applications/BLDevCube.app/Contents/MacOS/chips/bl702/eflash_loader/eflash_loader_cfg.ini
[05:00:48.802] - serial port is /dev/tty.usbmodem0000000200001
[05:00:48.802] - cpu_reset=False
[05:00:48.803] - chiptype: bl702
[05:00:48.803] - ========= Interface is uart =========
[05:00:48.803] - com speed: 230400
[05:00:48.803] - Eflash load helper file: /Applications/BLDevCube.app/Contents/MacOS/chips/bl702/eflash_loader/eflash_loader_32m.bin
[05:00:48.803] - Eflash load helper file: /Applications/BLDevCube.app/Contents/MacOS/chips/bl702/eflash_loader/eflash_loader_32m.bin
[05:00:48.803] - ========= load eflash_loader.bin =========
[05:00:48.803] - Load eflash_loader.bin via uart
[05:00:48.804] - ========= image load =========
[05:00:49.069] - tx rx and power off, press the machine!
[05:00:49.070] - cutoff time is 0.05
[05:00:49.126] - power on tx and rx
[05:00:50.073] - reset cnt: 0, reset hold: 0.05, shake hand delay: 0.1
[05:00:50.074] - clean buf
[05:00:50.077] - send sync
[05:00:50.285] - ack is b’4f4b464c0201’
[05:00:50.322] - shake hand success
[05:00:50.335] - get_boot_info
[05:00:50.347] - data read is b’0100020700000000931d00002b0000800000c1b376949424’
[05:00:50.347] - ========= ChipID: 0000c1b376949424 =========
[05:00:50.347] - last boot info: None
[05:00:50.347] - sign is 0 encrypt is 0
[05:00:50.348] - segcnt is 1
[05:00:50.374] - segdata_len is 58928
[05:00:50.410] - 4080/58928
[05:00:50.448] - 8160/58928
[05:00:50.484] - 12240/58928
[05:00:50.522] - 16320/58928
[05:00:50.558] - 20400/58928
[05:00:50.592] - 24480/58928
[05:00:50.630] - 28560/58928
[05:00:50.668] - 32640/58928
[05:00:50.705] - 36720/58928
[05:00:50.744] - 40800/58928
[05:00:50.778] - 44880/58928
[05:00:50.817] - 48960/58928
[05:00:50.858] - 53040/58928
[05:00:50.895] - 57120/58928
[05:00:50.920] - 58928/58928
[05:00:50.932] - Run img
[05:00:51.049] - Load helper bin time cost(ms): 2245.376708984375
[05:00:51.155] - Flash load shake hand
[05:00:51.163] - default set DTR high
[05:00:51.269] - clean buf
[05:00:51.270] - send sync
[05:00:51.477] - ack is b’4f4b’
[05:00:51.513] - Read mac addr
[05:00:51.514] - flash set para
[05:00:51.514] - ========= flash read jedec ID =========
[05:00:51.515] - Read flash jedec ID
[05:00:51.515] - readdata:
[05:00:51.515] - b’ef401780’
[05:00:51.515] - Finished
[05:00:51.516] - {“ErrorCode”: “003D”,”ErrorMsg”:”BFLB FLASH MATCH TYPE FAIL”}
[05:00:51.516] - Burn Retry
[05:00:51.516] - 0
[05:00:51.516] - Burn return with retry fail

This seems like it should have been detected before actually writing to the flash. (This makes me wonder if this is what's corrupted my board....)

Incidientally, the height of the progress bar varies from about 2/3 of the button height to about 3x the button height when 'show advanced options' is enabled.

So instead of choosing Flash, let's try the "run from RAM" case:

I don't know why the action button changed from Create Download to Create Program.

I originally had a problem that the Bind, Save Image, Browse buttons on the right weren't displayed. There are vertical overflow scrollbars enabled, but none for the horizontal axis. On a big screen, that's no big deal but in the mobile era, we can't assume that apps have infinite real estate now. Widening the window works around this.

[05:17:20.898] - {‘xtal_type’: ‘XTAL_32M’, ‘pll_clk’: ‘144M’, ‘encrypt_type’: ‘None’, ‘key_sel’: ‘0’, ‘cache_way_disable’: ‘None’, ‘sign_type’: ‘None’, ‘crc_ignore’: ‘False’, ‘hash_ignore’: ‘False’, ‘encrypt_key’: ‘’, ‘aes_iv’: ‘’, ‘public_key_cfg’: ‘’, ‘private_key_cfg’: ‘’, ‘device_tree’: ‘’, ‘page_type’: ‘mcu’, ‘flash_clk_type’: ‘XCLK’, ‘boot_src’: ‘UART/USB’, ‘img_type’: ‘SingleCPU’, ‘img_addr’: ‘0x2000’, ‘bootinfo_addr’: ‘0x0’, ‘img_file’: ‘/Users/robertl/src/bl_mcu_sdk/out/examples/lvgl/lvgl_bl702.bin’, ‘dl_device’: ‘Uart’, ‘dl_comport’: ‘/dev/tty.usbmodem0000000200001’, ‘dl_comspeed’: ‘230400’, ‘dl_jlinkspeed’: ‘1000’, ‘dl_chiperase’: ‘False’, ‘dl_xtal’: ‘32M’}
[05:17:20.906] - EFUSE_CFG
[05:17:20.907] - BOOTHEADER_CFG
[05:17:20.912] - Create bootheader using /Applications/BLDevCube.app/Contents/MacOS/chips/bl702/img_create_mcu/efuse_bootheader_cfg.ini
[05:17:20.912] - Updating data according to </Applications/BLDevCube.app/Contents/MacOS/chips/bl702/img_create_mcu/efuse_bootheader_cfg.ini[BOOTHEADER_CFG]>
[05:17:20.914] - Created file len:176
[05:17:20.917] - Image create path: /Applications/BLDevCube.app/Contents/MacOS/chips/bl702/img_create_mcu
[05:17:20.917] - Config file: /Applications/BLDevCube.app/Contents/MacOS/chips/bl702/img_create_mcu/img_create_cfg.ini
[05:17:20.919] - Image hash is b’26905fb1bf7d36ea300b314728d2858ccc5ff0ed5b07e0c96fba6c27efebd04f’
[05:17:20.919] - Header crc: b’e1233822’
[05:17:20.919] - Write if img
[05:17:20.920] - image create success
[05:17:20.921] - ========= eflash loader config =========
[05:17:20.922] - ========= image load =========
[05:17:21.189] - tx rx and power off, press the machine!
[05:17:21.190] - cutoff time is 0.05
[05:17:21.245] - power on tx and rx
[05:17:22.194] - reset cnt: 0, reset hold: 0.05, shake hand delay: 0.1
[05:17:22.195] - clean buf
[05:17:22.198] - send sync
[05:17:22.408] - ack is b’4f4b464c0201’
[05:17:22.445] - shake hand success
[05:17:22.457] - get_boot_info
[05:17:22.469] - data read is b’0100020700000000931d00002b0000800000c1b376949424’
[05:17:22.469] - ========= ChipID: 0000c1b376949424 =========
[05:17:22.469] - last boot info: None
[05:17:22.469] - sign is 0 encrypt is 0
[05:17:22.469] - [Errno 2] No such file or directory: ‘chips/bl702/img_create_mcu/img_if.bin’
Traceback (most recent call last):
  File “libs/bflb_img_loader.py”, line 655, in img_load_process
  File “libs/bflb_img_loader.py”, line 485, in img_load_main_process
FileNotFoundError: [Errno 2] No such file or directory: ‘chips/bl702/img_create_mcu/img_if.bin’

I can see there's an img_if.bin in the app itself:
/Applications/BLDevCube.app/Contents/MacOS/chips/bl702/img_create_mcu/img_if.bin
but I don't know that anything I've done prevents the app from finding its own internal resources.

I found the ISP Protocol document at ['https://github.com/bouffalolab/bl_docs/blob/main/BL602_ISP/en/BL 602_ISP_protocol.pdf'](''https://github.com/bouffalolab/bl_docs/blob/main/BL602_ISP/en/BL 602_ISP_protocol.pdf') helpful, but there are still gaps between what's appropriate between 60x vs. 70x, between the different chain types, the relative youth of the respective programs, and the reality of just pushing a single ".exe" to the board vs. having to push multiple downloads - and how you choose which ones - and vs building an entire filesystem image with embedded filesystems (app resources, wifi configs, device trees, etc.) and such within this space.

So that's the status of my journey so far. Whether via JTAG or via serial and whether communicating directly with OpenOCD or using BLDevCube, I'm failing. Can someone experienced with this board and on MacOS help find a way to run code wither from RAM (for development) or flash (for a product) and push it with no human intervention on the host?

Thank you for any help you can offer. Even if you can offer a factory image so that I can restore the board back to a useful state, that would help get me unstuck.

4 days later

robert
Since I'm using windows and I don't currently have MacOS to experiment with; so next I'll try to share with you the experiments I've done under windows, and hopefully these will be helpful to you.

I have compiled a Helloworld code that runs on ram.

cp drivers/bl702_driver/bl702_ram.ld examples/hellowd/helloworld

Modify the CMakeList.txt file so that this case uses bl702_ram.ld for linking.

set(mains main.c)
SET(LINKER_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/bl702_ram.ld)   # add this line
generate_bin()

So I got an executable program on the bl706 ram.

Make sure the JTAG pin is not occupied by APP, so press and hold the boot key, then press the RST key, and finally release both keys to put the bl706 into boot mode.
Oh, and func1 and func2 on bl706_avb need to be connected. It's easy to forget ......

Next I used openocd to connect to bl706.

.\openocd.exe -f .\if_rv_dbg_plus.cfg -f .\tgt_702.cfg
Open On-Chip Debugger 0.11.0 (2021-05-19) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Ready for Remote Connections
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : clock speed 1000 kHz
Info : JTAG tap: riscv.cpu tap/device found: 0x20000e05 (mfg: 0x702 (<unknown>), part: 0x0000, ver: 0x2)
Info : datacount=1 progbufsize=2
Info : Disabling abstract command reads from CSRs.
Info : Examined RISC-V core; found 1 harts
Info :  hart 0: XLEN=32, misa=0x40801125
Info : starting gdb server for riscv.cpu.0 on 3333
Info : Listening on port 3333 for gdb connections
Info : JTAG tap: riscv.cpu tap/device found: 0x20000e05 (mfg: 0x702 (<unknown>), part: 0x0000, ver: 0x2)
reset-assert-pre
reset-deassert-post
Info : Disabling abstract command writes to CSRs.
reset-init
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections

As we can see, I successfully connected.

Then I use GDB to access the port 3333

$ riscv64-unknown-elf-gdb  helloworld_bl702_ram.elf
......
......
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from helloworld_bl702_ram.elf...
(gdb) 

Then

(gdb) set arch riscv:rv32
The target architecture is assumed to be riscv:rv32
(gdb) target remote :3333
Remote debugging using :3333
0x20fe3982 in ?? ()
(gdb) i r
ra             0x2100411a       0x2100411a
sp             0x42026f50       0x42026f50
gp             0x42028480       0x42028480
tp             0xb2504016       0xb2504016
t0             0x6000   24576
t1             0x0      0
t2             0x84b013aa       -2068835414
fp             0x42029f8c       0x42029f8c
s1             0x0      0
a0             0x0      0
a1             0x1      1
a2             0x0      0
a3             0xf86    3974
a4             0xdeadbeef       -559038737
a5             0x1      1
a6             0x7130012        118685714
a7             0xffffe0ff       -7937
s2             0x42029f88       1107468168
s3             0x4202dff4       1107484660
s4             0x10000  65536
s5             0x1005d  65629
s6             0xfffe   65534
s7             0x42028654       1107461716
s8             0x2100191e       553654558
s9             0x21002000       553656320
s10            0x21010000       553713664
s11            0xaa224380       -1440595072
t3             0x1      1
t4             0x2100839c       553681820
t5             0xc1561024       -1051324380
t6             0x19502042       424681538
pc             0x20fe3982       0x20fe3982
(gdb) load
Loading section .text, size 0x533c lma 0x22010000
        section progress: 100.0%, total progress: 98.76%
Loading section RAM_DATA, size 0x10c lma 0x2201533c
        section progress: 100.0%, total progress: 100.00%
Start address 0x22010000, load size 21576
Transfer rate: 24 KB/sec, 7192 bytes/write.
(gdb) i r
ra             0x2100411a       0x2100411a
sp             0x42026f50       0x42026f50
gp             0x42028480       0x42028480
tp             0xb2504016       0xb2504016
t0             0x6000   24576
t1             0x0      0
t2             0x84b013aa       -2068835414
fp             0x42029f8c       0x42029f8c
s1             0x0      0
a0             0x0      0
a1             0x1      1
a2             0x0      0
a3             0xf86    3974
a4             0xdeadbeef       -559038737
a5             0x1      1
a6             0x7130012        118685714
a7             0xffffe0ff       -7937
s2             0x42029f88       1107468168
s3             0x4202dff4       1107484660
s4             0x10000  65536
s5             0x1005d  65629
s6             0xfffe   65534
s7             0x42028654       1107461716
s8             0x2100191e       553654558
s9             0x21002000       553656320
s10            0x21010000       553713664
s11            0xaa224380       -1440595072
t3             0x1      1
t4             0x2100839c       553681820
t5             0xc1561024       -1051324380
t6             0x19502042       424681538
pc             0x22010000       0x22010000 <_enter>
(gdb) c
Continuing.

We can see in the serial port that the program is up and running on ram.

For more information about telnet, please refer to my previous log file(https://gist.github.com/strongwong/97fb1332b813bb160e10ee1823af078c), the handshake address is 0x4202bff0, the command and data address is 0x4202c000, the command and data format is the same as the ISP protocol.
FYI.
helloworld bin:https://github.com/strongwong/tmp_file

    localhost 4444 --> openocd

    [1011061587 bytes missing in capture file].............Open On-Chip Debugger
    
    > adapter speed 1000
    .adapter speed: 1000 kHz
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > halt
    .
    > load_image openocd_load_data.bin 0x22010000
    .58928 bytes written at address 0x22010000
    downloaded 58928 bytes in 1.855874s (31.008 KiB/s)
    
    
    > halt
    .
    > reg pc 0x22010000
    .pc (/32): 0x22010000
    
    
    > resume
    .
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mwb 0x4202c000 0x0
    .Failed to read priv register.
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 48 52 44 59 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mwb 0x4202c000 0x42
    .Failed to read priv register.
    
    > mwb 0x4202c001 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c002 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c003 0x0
    .Failed to read priv register.
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x4
    .Failed to read priv register.
    0x4202c000: 4f 4b 0c 00 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x4
    .Failed to read priv register.
    0x4202c000: 4f 4b 0c 00 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202c004 0x3
    .Failed to read priv register.
    0x4202c004: b36e0000 24949476 9ddb8724 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mwb 0x4202c000 0x36
    .Failed to read priv register.
    
    > mwb 0x4202c001 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c002 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c003 0x0
    .Failed to read priv register.
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x4
    .Failed to read priv register.
    0x4202c000: 4f 4b 04 00 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x4
    .Failed to read priv register.
    0x4202c000: 4f 4b 04 00 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202c004 0x1
    .Failed to read priv register.
    0x4202c004: 801640ef 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mwb 0x4202c000 0x30
    .Failed to read priv register.
    
    > mwb 0x4202c001 0xb7
    .Failed to read priv register.
    
    > mwb 0x4202c002 0x8
    .Failed to read priv register.
    
    > mwb 0x4202c003 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c004 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c005 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c006 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c007 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c008 0xaf
    .Failed to read priv register.
    
    > mwb 0x4202c009 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c00a 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c00b 0x0
    .Failed to read priv register.
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x4
    .Failed to read priv register.
    0x4202c000: 4f 4b 08 00 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202c004 0xf9
    .Failed to read priv register.
    0x4202c004: 00000000 000000af 9ddb8724 6133212c 13686c6e b4b2cf39 e5944da0 bc857577 
    0x4202c024: 0015605e 22014930 22014598 00144020 22014940 22014598 00154020 22014950 
    0x4202c044: 22014598 00164020 22014960 22014598 00174020 22014970 22014598 0013325e 
    0x4202c064: 22014980 220144f0 0014325e 22014990 220144f0 0015405e 220149a0 22014598 
    0x4202c084: 0016405e 220149b0 22014598 001560eb 220149c0 22014544 0015345e 220149d4 
    0x4202c0a4: 22014598 3f010011 03ff9966 009f009f 01005104 d85220c7 00320206 010b010b 
    0x4202c0c4: 00bb013b 02eb016b 500202eb 01000100 01000001 01ab0102 00003505 00000101 
    0x4202c0e4: ffa0ff38 40020377 f0020377 04b0012c 000504b0 00144e20 400007b7 76c14398 
    0x4202c104: 0ff68693 05228f75 07378d59 177dff01 05c28d79 c3888d4d 40001737 2e234685 
    0x4202c124: 2e23fed7 0001fe07 00010001 00010001 00010001 43980001 00c76713 0001c398 
    0x4202c144: 00010001 00010001 00010001 45010001 11418082 c606c422 220d842a 4000f6b7 
    0x4202c164: 40b25a98 00341793 44229b1d da9c8fd9 01414501 f6b78082 a7834000 07372046 
    0x4202c184: 177dfff4 a2238ff9 450120f6 47958082 02f577b3 22015737 07137179 d04a8a87 
    0x4202c1a4: 4710434c 892a4754 4b184308 c62ac82e cc36ca32 d422ce3a 4000e437 40442703 
    0x4202c1c4: 869376fd 8f750ff6 d226d606 20076713 40e42223 41842703 ff0006b7 8f754529 
    0x4202c1e4: 078a1014 a78397b6 8fd9fec7 40f42c23 40042483 2004e793 40f42023 e79336a9 
    0x4202c204: 20236004 e79340f4 98ed6044 40f42023 e4934529 3e056004 40942023 40442783 
    0x4202c224: f7934709 0f63f807 e79300e9 50b20247 e7375422 22234000 549240f7 45015902 
    0x4202c244: 80826145 0487e793 97b7b7dd a7832101 87828507 210197b7 8587a783 97b78782 
    0x4202c264: a7832101 878285c7 210197b7 8647a783 97b78782 a7832101 87828e07 210197b7 
    0x4202c284: 9287a783 00008782 00374bc6 0032cced 0032cced 006e978d 006c0000 4d5f4447 
    0x4202c2a4: 44343044 5f34305f 00003333 4b5f584d 5f303448 335f3430 00000033 4b5f584d 
    0x4202c2c4: 5f303848 335f3830 00000033 4b5f584d 5f363148 335f3631 00000033 325f4d46 
    0x4202c2e4: 30385135 5f30385f 00003333 626e6957 4a36315f 36315f56 0033335f 626e6957 
    0x4202c304: 3832315f 315f564a 335f3832 00000033 565f425a 5f363151 335f3631 00000033 
    0x4202c324: 325f4d58 38485135 30385f30 0033335f 325f4d58 31485135 36315f36 0033335f 
    0x4202c344: 325f4d58 33485135 32335f32 0033335f 325f4d58 36485135 34365f34 0033335f 
    0x4202c364: 445f425a 5f423034 335f3038 00000033 445f425a 5f423038 335f3038 00000033 
    0x4202c384: 325f425a 36315135 35315f42 0033335f 325f425a 32335135 36315f42 0033335f 
    0x4202c3a4: 325f4854 36315135 315f4248 33335f36 00000000 325f425a 36315135 35315f41 
    0x4202c3c4: 0033335f 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
    0x4202c3e4: 00000000 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > load_image openocd_load_data.bin 0x4202c000
    .Failed to read priv register.
    184 bytes written at address 0x4202c000
    downloaded 184 bytes in 0.007977s (22.526 KiB/s)
    
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mwb 0x4202c000 0x3a
    .Failed to read priv register.
    
    > mwb 0x4202c001 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c002 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c003 0x0
    .Failed to read priv register.
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mwb 0x4202c000 0x60
    .Failed to read priv register.
    
    > mwb 0x4202c001 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c002 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c003 0x0
    .Failed to read priv register.
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mwb 0x4202c000 0x3e
    .Failed to read priv register.
    
    > mwb 0x4202c001 0xb8
    .Failed to read priv register.
    
    > mwb 0x4202c002 0x8
    .Failed to read priv register.
    
    > mwb 0x4202c003 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c004 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c005 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c006 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c007 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c008 0xb0
    .Failed to read priv register.
    
    > mwb 0x4202c009 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c00a 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c00b 0x0
    .Failed to read priv register.
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x4
    .Failed to read priv register.
    0x4202c000: 4f 4b 20 00 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x4
    .Failed to read priv register.
    0x4202c000: 4f 4b 20 00 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202c004 0x8
    .Failed to read priv register.
    0x4202c004: ea2f76c6 f3f1ffef 7a0b9b64 24297bce 788bdba2 d6bb8510 33fd1aa8 0cb8f057 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mwb 0x4202c000 0x61
    .Failed to read priv register.
    
    > mwb 0x4202c001 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c002 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c003 0x0
    .Failed to read priv register.
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mwb 0x4202c000 0x30
    .Failed to read priv register.
    
    > mwb 0x4202c001 0x6b
    .Failed to read priv register.
    
    > mwb 0x4202c002 0x8
    .Failed to read priv register.
    
    > mwb 0x4202c003 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c004 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c005 0x20
    .Failed to read priv register.
    
    > mwb 0x4202c006 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c007 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c008 0xcf
    .Failed to read priv register.
    
    > mwb 0x4202c009 0x74
    .Failed to read priv register.
    
    > mwb 0x4202c00a 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c00b 0x0
    .Failed to read priv register.
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 50 44 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x4
    .Failed to read priv register.
    0x4202c000: 4f 4b 08 00 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202c004 0xf9
    .Failed to read priv register.
    0x4202c004: 00002000 000074cf 7a0b9b64 24297bce 788bdba2 d6bb8510 33fd1aa8 0cb8f057 
    0x4202c024: d85220c7 00320206 010b010b 00bb013b 02eb016b 500202eb 01000100 01020001 
    0x4202c044: 01ab0102 00003505 00000101 ffa0ff38 40020377 f0020377 04b0012c 000504b0 
    0x4202c064: 00140d40 d3340aae 47464350 01000401 00000001 d81bb531 00000300 000054d0 
    0x4202c084: 00000000 00002000 bbdc8261 688c1850 ab377e30 6133212c 13686c6e b4b2cf39 
    0x4202c0a4: e5944da0 bc857577 00001000 00002000 21a1cd7f d85220c7 00320206 010b010b 
    0x4202c0c4: 00bb013b 02eb016b 500202eb 01000100 01000001 01ab0102 00003505 00000101 
    0x4202c0e4: ffa0ff38 40020377 f0020377 04b0012c 000504b0 00144e20 400007b7 76c14398 
    0x4202c104: 0ff68693 05228f75 07378d59 177dff01 05c28d79 c3888d4d 40001737 2e234685 
    0x4202c124: 2e23fed7 0001fe07 00010001 00010001 00010001 43980001 00c76713 0001c398 
    0x4202c144: 00010001 00010001 00010001 45010001 11418082 c606c422 220d842a 4000f6b7 
    0x4202c164: 40b25a98 00341793 44229b1d da9c8fd9 01414501 f6b78082 a7834000 07372046 
    0x4202c184: 177dfff4 a2238ff9 450120f6 47958082 02f577b3 22015737 07137179 d04a8a87 
    0x4202c1a4: 4710434c 892a4754 4b184308 c62ac82e cc36ca32 d422ce3a 4000e437 40442703 
    0x4202c1c4: 869376fd 8f750ff6 d226d606 20076713 40e42223 41842703 ff0006b7 8f754529 
    0x4202c1e4: 078a1014 a78397b6 8fd9fec7 40f42c23 40042483 2004e793 40f42023 e79336a9 
    0x4202c204: 20236004 e79340f4 98ed6044 40f42023 e4934529 3e056004 40942023 40442783 
    0x4202c224: f7934709 0f63f807 e79300e9 50b20247 e7375422 22234000 549240f7 45015902 
    0x4202c244: 80826145 0487e793 97b7b7dd a7832101 87828507 210197b7 8587a783 97b78782 
    0x4202c264: a7832101 878285c7 210197b7 8647a783 97b78782 a7832101 87828e07 210197b7 
    0x4202c284: 9287a783 00008782 00374bc6 0032cced 0032cced 006e978d 006c0000 4d5f4447 
    0x4202c2a4: 44343044 5f34305f 00003333 4b5f584d 5f303448 335f3430 00000033 4b5f584d 
    0x4202c2c4: 5f303848 335f3830 00000033 4b5f584d 5f363148 335f3631 00000033 325f4d46 
    0x4202c2e4: 30385135 5f30385f 00003333 626e6957 4a36315f 36315f56 0033335f 626e6957 
    0x4202c304: 3832315f 315f564a 335f3832 00000033 565f425a 5f363151 335f3631 00000033 
    0x4202c324: 325f4d58 38485135 30385f30 0033335f 325f4d58 31485135 36315f36 0033335f 
    0x4202c344: 325f4d58 33485135 32335f32 0033335f 325f4d58 36485135 34365f34 0033335f 
    0x4202c364: 445f425a 5f423034 335f3038 00000033 445f425a 5f423038 335f3038 00000033 
    0x4202c384: 325f425a 36315135 35315f42 0033335f 325f425a 32335135 36315f42 0033335f 
    0x4202c3a4: 325f4854 36315135 315f4248 33335f36 00000000 325f425a 36315135 35315f41 
    0x4202c3c4: 0033335f 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
    0x4202c3e4: 00000000 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > load_image openocd_load_data.bin 0x4202c000
    .Failed to read priv register.
    2056 bytes written at address 0x4202c000
    downloaded 2056 bytes in 0.069814s (28.759 KiB/s)
    
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 00 00 00 00 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > load_image openocd_load_data.bin 0x4202c000
    .Failed to read priv register.
    2056 bytes written at address 0x4202c000
    downloaded 2056 bytes in 0.064911s (30.932 KiB/s)
    
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 00 00 00 00 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > load_image openocd_load_data.bin 0x4202c000
    .Failed to read priv register.
    2056 bytes written at address 0x4202c000
    downloaded 2056 bytes in 0.066986s (29.974 KiB/s)
    
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 00 00 00 00 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > load_image openocd_load_data.bin 0x4202c000
    .Failed to read priv register.
    2056 bytes written at address 0x4202c000
    downloaded 2056 bytes in 0.066039s (30.403 KiB/s)
    
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 00 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > load_image openocd_load_data.bin 0x4202c000
    .Failed to read priv register.
    2056 bytes written at address 0x4202c000
    downloaded 2056 bytes in 0.065036s (30.872 KiB/s)
    
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 00 00 00 00 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > load_image openocd_load_data.bin 0x4202c000
    .Failed to read priv register.
    2056 bytes written at address 0x4202c000
    downloaded 2056 bytes in 0.066827s (30.045 KiB/s)
    
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 00 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > load_image openocd_load_data.bin 0x4202c000
    .Failed to read priv register.
    2056 bytes written at address 0x4202c000
    downloaded 2056 bytes in 0.068848s (29.163 KiB/s)
    
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 00 00 00 00 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > load_image openocd_load_data.bin 0x4202c000
    .Failed to read priv register.
    2056 bytes written at address 0x4202c000
    downloaded 2056 bytes in 0.064154s (31.297 KiB/s)
    
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 00 00 00 00 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > load_image openocd_load_data.bin 0x4202c000
    .Failed to read priv register.
    2056 bytes written at address 0x4202c000
    downloaded 2056 bytes in 0.065894s (30.470 KiB/s)
    
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 00 00 00 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > load_image openocd_load_data.bin 0x4202c000
    .Failed to read priv register.
    2056 bytes written at address 0x4202c000
    downloaded 2056 bytes in 0.069856s (28.742 KiB/s)
    
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 00 00 00 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > load_image openocd_load_data.bin 0x4202c000
    .Failed to read priv register.
    1240 bytes written at address 0x4202c000
    downloaded 1240 bytes in 0.041947s (28.868 KiB/s)
    
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mwb 0x4202c000 0x3a
    .Failed to read priv register.
    
    > mwb 0x4202c001 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c002 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c003 0x0
    .Failed to read priv register.
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mwb 0x4202c000 0x60
    .Failed to read priv register.
    
    > mwb 0x4202c001 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c002 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c003 0x0
    .Failed to read priv register.
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mwb 0x4202c000 0x3e
    .Failed to read priv register.
    
    > mwb 0x4202c001 0x4c
    .Failed to read priv register.
    
    > mwb 0x4202c002 0x8
    .Failed to read priv register.
    
    > mwb 0x4202c003 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c004 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c005 0x20
    .Failed to read priv register.
    
    > mwb 0x4202c006 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c007 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c008 0xd0
    .Failed to read priv register.
    
    > mwb 0x4202c009 0x54
    .Failed to read priv register.
    
    > mwb 0x4202c00a 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c00b 0x0
    .Failed to read priv register.
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x4
    .Failed to read priv register.
    0x4202c000: 4f 4b 20 00 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x4
    .Failed to read priv register.
    0x4202c000: 4f 4b 20 00 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202c004 0x8
    .Failed to read priv register.
    0x4202c004: bbdc8261 688c1850 ab377e30 6133212c 13686c6e b4b2cf39 e5944da0 bc857577 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mwb 0x4202c000 0x61
    .Failed to read priv register.
    
    > mwb 0x4202c001 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c002 0x0
    .Failed to read priv register.
    
    > mwb 0x4202c003 0x0
    .Failed to read priv register.
    
    > mwb 0x4202bff0 0x48
    .Failed to read priv register.
    
    > mwb 0x4202bff1 0x52
    .Failed to read priv register.
    
    > mwb 0x4202bff2 0x44
    .Failed to read priv register.
    
    > mwb 0x4202bff3 0x59
    .Failed to read priv register.
    
    > mdb 0x4202bff0 0x4
    .Failed to read priv register.
    0x4202bff0: 53 41 43 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdw 0x4202bff4 0x3
    .Failed to read priv register.
    0x4202bff4: 1273f3f9 53bfc8c2 d21e97c4 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > mdb 0x4202c000 0x2
    .Failed to read priv register.
    0x4202c000: 4f 4b 
    
    
    > WaitCmd
    .invalid command name "WaitCmd"
    
    > shutdown
    .shutdown command invoked

      Thank you. I look forward to experimenting with this tomorrow. You did bring back one key variable that I just didn't try in this pass - simply not writing to flash. That is, of course, not an ideal solution, but it will at least help thin things out.

      The 386 occurrences of "Failed to read priv register" in your logs are troubling. Even just looking at your logs, I'm not sure things are working consistently. For example, the first time (edited for brevity) we see it writing and then reading back the command block:

      Four Write Bytes + values:

      mwb 0x4202bff0 0x48
      mwb 0x4202bff1 0x52
      mwb 0x4202bff2 0x44
      mwb 0x4202bff3 0x59

      Read back what we just wrong; confirmed to match above

      mdb 0x4202bff0 0x4
      0x4202bff0: 48 52 44 59

      And yet, just a few lines later, we repeat the above that we even match the same four write bytes with the same four values, but when issuing a 'display word' on the command buffer, completely different values are there:

      mdb 0x4202bff0 0x4
      .Failed to read priv register.
      0x4202bff0: 53 41 43 4b

      This is ascii "SACK" in case that's useful. It's definitely not what was written.

      The basic pattern (sometimes matching, usually not) repeats itself several times. I wonder if that 'failed to read' is actually a problem and the higher layers (gdb? openocd? bldevcube?) are just tossing the error codes. Let's not speculate too much more on this until I can try it.

      Oh, it was from that very gist that I created the 'cmds' group of commands that I used nc to shove into port 4444 as described, so we shouldn't be TOO far from each other.

      I look forward to digging into this again tonight. Thank you.

      robert
      Hi robert,
      I did a test in telnet and if I execute the read or write command without "halt", I get the problem "Failed to read priv register". But this should work, otherwise I can't download it successfully.
      If I want to avoid this problem then I need to execute the "halt" command before each read/write operation. Then "resume" after writing the data, command and trigger signal.
      It may be that BLDevCube does not do this in order to download fast.

      About reading back after the first write of the handshake (or trigger) signal, I think it is because the eflash_loader will return a "SACK" message at this address if it receives "HRDY" 48 52 44 59("host ready" maybe).
      And there may be a timeout mechanism here.

      Oh! I forgot to tell you that eflash_loader is here.

      eflash_loader_32m.bin is a program that can be executed on ram ; in the dev_cube->chips->bl702->eflash_loader directory.

      You can directly load eflash_loader.elf through gdb to run eflash_loader, after eflash_loader is running, the next operation flow is similar to the log caught by telnet. If you want to use the eflash_loader_32m.bin file, then please note that [0x0:0xc0] is the header , please load [0xc0:end] (code) to the beginning of 0x22010000. Set $pc=0x22010000 to run.
      Then the following ISP interaction is shown in the telnet log, 0x4202bff0 is the HRDY and SACK signals, 0x4202c000 starts with commands and data (FYI. The size here should be less than 8KByte according to the ISP protocol)
      The eflash_loader interaction protocol is almost identical to the ISP protocol you found.

      Since the BL70x uses XIP flash and has to support multiple flash models, it is not so convenient to manipulate flash.

        A few learnings so far. I'm not giving up yet, but I've also not succeeded.

        Sometimes the JTAG board/openOCD just seems to get into a bad state where commands are executed (at the GDB level) but the reads/writes aren't actually done to the board. Sometimes restarting OpenOCD is enough. Sometimes the board has to be physically unplugged.

        Working directly in RAM seems to be more functional than writing to flash ever has been for me.

        Building LVGL demo to run from RAM just doesn't work - it's larger than RAM by...a lot.
        [ 57%] Built target bl702_driver
        Consolidate compiler generated dependencies of target lvgl_bl702.elf
        [ 58%] Linking C executable ../../../out/examples/lvgl/lvgl_bl702.elf
        /opt/homebrew/Cellar/riscv-gnu-toolchain/master/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: ../../../out/examples/lvgl/lvgl_bl702.elf section .text' will not fit in regionitcm_memory'
        /opt/homebrew/Cellar/riscv-gnu-toolchain/master/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: region `itcm_memory' overflowed by 286928 bytes
        collect2: error: ld returned 1 exit status
        make[3]: *** [../out/examples/lvgl/lvgl_bl702.elf] Error 1
        make[2]: *** [samples/lvgl/CMakeFiles/lvgl_bl702.elf.dir/all] Error 2

        So let's lower our sights to chasing hellowd. I haven't found a difference in our hw.bin's, but yours has debugging tables with absolutely hardcoded pathnames (/mnt/e/work/blablah) so for convenience, I'll use mine.

        I can load and execute code!

        (gdb) load
        Loading section .text, size 0x533c lma 0x22010000
        Loading section RAM_DATA, size 0x10c lma 0x2201533c
        Start address 0x22010000, load size 21576
        Transfer rate: 6 KB/sec, 7192 bytes/write.
        (gdb) disassemble
        Dump of assembler code for function _enter:
        => 0x22010000 <+0>: auipc gp,0x20011
        0x22010004 <+4>: addi gp,gp,-2048 # 0x42020800
        0x22010008 <+8>: csrci mstatus,8
        0x2201000c <+12>: auipc t0,0x2
        0x22010010 <+16>: addi t0,t0,-844 # 0x22011cc0 <Trap_Handler_Stub>

        I see a burst of traffic at startup on the serial port, but it's not at a serial rate I can guess (115200, 230400, 500000, 2000000) It's like something isn't initialized correctly. Maybe I can put a scope on the serial line and measure bit widths and calulate from there...or I can just make increasingly explicit versions of hellowd.

        Under what circumstances do I need to load eflash_loader? Loading it and running it before loading and running helloworld_bl702_ram.elf doesn't make the serial console work any differently. Is that the code that's actually responsible for putting uploaded code in Flash?

        Either way, I think I can take this basic recipe (link, then load code into RAM) and probably run with it.

        It seems pretty clear now that something is broken on the Mac flash writer, though.

        I'm going to keep trying! Thanx for your help.

          Here's a 100% way to crash the JTAG board enough that it has to be power cycled.

          OCD is running:

          DIR=tools/openocd/
          riscv-openocd -f $DIR/if_rv_dbg_plus.cfg  -f $DIR/tgt_702.cfg

          GDB is configured thusly:

          cat .gdbinit
          target extended-remote localhost:3333
          file out/examples/hellowd/helloworld/helloworld_bl702.elf
          
          (gdb) load
          Loading section .text, size 0x5328 lma 0x22010000
          Loading section RAM_DATA, size 0x10c lma 0x22015328
          Start address 0x22010000, load size 21556
          Transfer rate: 7 KB/sec, 7185 bytes/write.
          (gdb) b main
          Breakpoint 1 at 0x220105aa: file ~/src/bl_mcu_sdk/examples/hellowd/helloworld/main.c, line 28.
          
          (gdb) cont
          Continuing.
          
          Breakpoint 1, main ()
              at ~/src/bl_mcu_sdk/examples/hellowd/helloworld/main.c:28
          28	    bflb_platform_init(0);

          (This is all a minor accent away from your DOS example)
          Now just keep 's'tepping through things. Don't worry, it's only a few instructions. Eventually you hit this:

          (gdb) s
          265	    L1C_Cache_Flush((tmpVal >> L1C_WAY_DIS_POS) & 0xf);
          (gdb) s
          L1C_Cache_Flush (wayDisable=15 '\017')
              at drivers/bl702_driver/std_drv/src/bl702_romapi.c:785
          785	    return RomDriver_L1C_Cache_Flush(wayDisable);

          Now, everythign goes boom!

          (gdb) s
          failed read at 0x11, status=2
          failed read at 0x11, status=2
          failed read at 0x11, status=1
          failed read (NOP) at 0x11, status=1
          failed read at 0x11, status=1
          failed read at 0x11, status=2
          Hart 0 doesn't exist.
          failed read (NOP) at 0x11, status=1

          This is all output also shown in the OpenOCD session above. Once this happens, OpenOCD stays unhappy.

          Error: failed write at 0x17, status=1
          Error: DMI operation didn't complete in 1 seconds. The target is either really slow or broken. You could increase the timeout with riscv set_command_timeout_sec.

          So you interrupt OpenOCD, and the USB pipe gets jammed up:

          Error: failed read at 0x4, status=1
          ^CError: libusb_handle_events() failed with LIBUSB_ERROR_INTERRUPTED
          Assertion failed: (ctx->write_count == 0 && ctx->read_count == 0), function mpsse_flush, file /Users/ilg/Work/openocd-0.10.0-15/openocd.git/src/jtag/drivers/mpsse.c, line 849.
          ./mkocd: line 3:  6388 Abort trap: 6           riscv-openocd -f $DIR/if_rv_dbg_plus.cfg -f $DIR/tgt_702.cfg

          and even restarting OpenOCD doesn't unstick it.
          xPack OpenOCD, x86_64 Open On-Chip Debugger 0.10.0+dev (2020-10-13-20:30)
          Licensed under GNU GPL v2
          For bug reports, read
          http://openocd.org/doc/doxygen/bugs.html
          Ready for Remote Connections
          Warn : Haven't made progress in mpsse_flush() for 2003ms.
          Warn : Haven't made progress in mpsse_flush() for 4005ms.
          Warn : Haven't made progress in mpsse_flush() for 8018ms.
          CError: libusb_handle_events() failed with LIBUSB_ERROR_INTERRUPTED

          There are a few different failure forms here, but once this happens, it's dead for the count. The board has to be unplugged from USB and plugged back in.

          Now it's entirely possible that RomDriver_L1C_Cache_Flush() is doing something unexpected when we're running it from RAM as we are. My point is more that this is one of seemingly a couple of different JTAG crashed and this was the first time I was able to catch it with repro steps.

          This happens when it's run at the default 4Khz or at 1kHz as in your example.

          I know we're covering a lot of ground in this conversation, but a reproducible crash seems worth calling out in the hope that fixing it will fix some of our unreproducible ones.

            8 months later
            Write a Reply...
            @ 2025 Bouffalo Lab (Nanjing) Co., Ltd. All rights reserved.