probe-rs: Unable to flash SAM chip with bootloader

Describe the bug When trying to flash a Feather M0 (SAMD21G18AU) with 8K bootloader, the command fails (see log output below).

To Reproduce Steps to reproduce the behavior:

  1. cargo generate --git https://github.com/rust-embedded/cortex-m-quickstart
  2. Edit memory.x to make space for bootloader:
MEMORY
{
  FLASH : ORIGIN = 0x00000000 + 8K, LENGTH = 256K - 8K
  RAM : ORIGIN = 0x20000000, LENGTH = 32K
}
  1. Edit .cargo/config:
[build]
target = "thumbv6m-none-eabi" 
  1. Run cargo flash --chip atsamd21g18au

Expected behavior The program is flashed to the MCU.

Stacktrace

DEBUG probe_rs_cli_util > Running '/home/erik/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo' in directory /code/bug-reproduce-samd-bootprot
    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
    Flashing /code/bug-reproduce-samd-bootprot/target/thumbv6m-none-eabi/debug/bug-reproduce-samd-bootprot
       DEBUG jaylink           > libusb 1.0.22.11312
       DEBUG jaylink           > libusb has capability API: true
       DEBUG jaylink           > libusb has HID access: true
       DEBUG jaylink           > libusb has hotplug support: true
       DEBUG jaylink           > libusb can detach kernel driver: true
       DEBUG jaylink           > open_usb: device descriptor: DeviceDescriptor {
    bLength: 0x12,
    bDescriptorType: 0x1,
    bcdUSB: 0x200,
    bDeviceClass: 0x0,
    bDeviceSubClass: 0x0,
    bDeviceProtocol: 0x0,
    bMaxPacketSize: 0x40,
    idVendor: 0x1366,
    idProduct: 0x101,
    bcdDevice: 0x100,
    iManufacturer: 0x1,
    iProduct: 0x2,
    iSerialNumber: 0x3,
    bNumConfigurations: 0x1,
}
       DEBUG jaylink           > scanning 1 interfaces
       DEBUG jaylink           > J-Link interface is #0
       DEBUG probe_rs::probe::daplink::tools > Device Bus 002 Device 001: ID 1d6b:0003
       DEBUG probe_rs::probe::daplink::tools > Device open error Access
       DEBUG probe_rs::probe::daplink::tools > Device Bus 001 Device 005: ID 1366:0101
       DEBUG probe_rs::probe::daplink::tools > No device matches
       DEBUG probe_rs::probe::daplink::tools > Device Bus 001 Device 007: ID 0483:3748
       DEBUG probe_rs::probe::daplink::tools > No device matches
       DEBUG probe_rs::probe::daplink::tools > Device Bus 001 Device 006: ID 0403:6001
       DEBUG probe_rs::probe::daplink::tools > No device matches
       DEBUG probe_rs::probe::daplink::tools > Device Bus 001 Device 002: ID 8087:0a2b
       DEBUG probe_rs::probe::daplink::tools > Device open error Access
       DEBUG probe_rs::probe::daplink::tools > Device Bus 001 Device 001: ID 1d6b:0002
       DEBUG probe_rs::probe::daplink::tools > Device open error Access
       DEBUG probe_rs::probe::daplink::tools > Attempting to open 1366:0101 in CMSIS-DAP v1 mode
       DEBUG probe_rs::probe::stlink::usb_interface > Acquired libusb context.
       DEBUG jaylink                                > open_usb: device descriptor: DeviceDescriptor {
    bLength: 0x12,
    bDescriptorType: 0x1,
    bcdUSB: 0x200,
    bDeviceClass: 0x0,
    bDeviceSubClass: 0x0,
    bDeviceProtocol: 0x0,
    bMaxPacketSize: 0x40,
    idVendor: 0x1366,
    idProduct: 0x101,
    bcdDevice: 0x100,
    iManufacturer: 0x1,
    iProduct: 0x2,
    iSerialNumber: 0x3,
    bNumConfigurations: 0x1,
}
       DEBUG jaylink                                > scanning 1 interfaces
       DEBUG jaylink                                > J-Link interface is #0
       DEBUG jaylink                                > legacy caps: GET_HW_VERSION | READ_CONFIG | WRITE_CONFIG | SPEED_INFO | GET_MAX_BLOCK_SIZE | GET_HW_INFO | RESET_STOP_TIMED | SELECT_IF | GET_COUNTERS | GET_CPU_CAPS | EXEC_CPU_CMD | SWO | REGISTER | INDICATORS | TEST_NET_SPEED | GET_CAPS_EX
       DEBUG jaylink                                > extended caps: GET_HW_VERSION | READ_CONFIG | WRITE_CONFIG | SPEED_INFO | GET_MAX_BLOCK_SIZE | GET_HW_INFO | RESET_STOP_TIMED | SELECT_IF | GET_COUNTERS | GET_CPU_CAPS | EXEC_CPU_CMD | SWO | REGISTER | INDICATORS | TEST_NET_SPEED | GET_CAPS_EX
        INFO cargo_flash                            > Protocol speed 0 kHz
       DEBUG probe_rs::probe::jlink                 > Attaching to J-Link
       DEBUG probe_rs::probe::jlink                 > Attaching with protocol 'SWD'
        INFO probe_rs::probe::jlink                 > J-Link: S/N: 801020640
       DEBUG probe_rs::probe::jlink                 > J-Link: Capabilities: GET_HW_VERSION | READ_CONFIG | WRITE_CONFIG | SPEED_INFO | GET_MAX_BLOCK_SIZE | GET_HW_INFO | RESET_STOP_TIMED | SELECT_IF | GET_COUNTERS | GET_CPU_CAPS | EXEC_CPU_CMD | SWO | REGISTER | INDICATORS | TEST_NET_SPEED | GET_CAPS_EX
        INFO probe_rs::probe::jlink                 > J-Link: Firmware version: J-Link EDU Mini V1 compiled Jul 17 2020 16:25:21
        INFO probe_rs::probe::jlink                 > J-Link: Hardware version: JLink 1.0.0
        INFO probe_rs::probe::jlink                 > J-Link: Target voltage: 3.30 V
       DEBUG probe_rs::probe::jlink                 > Sucessfully switched to SWD
       DEBUG probe_rs::probe::jlink                 > Attached succesfully
       DEBUG probe_rs::config::registry             > Searching registry for chip with name atsamd21g18au
       DEBUG probe_rs::architecture::arm::communication_interface > Debug Port version: DPv1
       DEBUG probe_rs::architecture::arm::communication_interface > Reading DP register DPIDR
       DEBUG probe_rs::architecture::arm::communication_interface > Read    DP register DPIDR, value=0x0bc11477
       DEBUG probe_rs::architecture::arm::communication_interface > DebugPort ID:  DebugPortId {
    revision: 0x0,
    part_no: 0xbc,
    version: DPv1,
    min_dp_support: Implemented,
    designer: JEP106Code({ cc: 0x04, id: 0x3b } => Some("ARM Ltd")),
}
       DEBUG probe_rs::architecture::arm::communication_interface > Writing DP register ABORT, value=0x0000001e
       DEBUG probe_rs::architecture::arm::communication_interface > Writing DP register SELECT, value=0x00000000
       DEBUG probe_rs::architecture::arm::communication_interface > Requesting debug power
       DEBUG probe_rs::architecture::arm::communication_interface > Writing DP register CTRL/STAT, value=0x50000000
       DEBUG probe_rs::architecture::arm::communication_interface > Reading DP register CTRL/STAT
       DEBUG probe_rs::architecture::arm::communication_interface > Read    DP register CTRL/STAT, value=0xf0000040
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register IDR
       DEBUG probe_rs::architecture::arm::communication_interface > Changing AP to 0, AP_BANK_SEL to 15
       DEBUG probe_rs::architecture::arm::communication_interface > Writing DP register SELECT, value=0x000000f0
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    IDR, value=0x04770031
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register IDR
       DEBUG probe_rs::architecture::arm::communication_interface > Changing AP to 1, AP_BANK_SEL to 15
       DEBUG probe_rs::architecture::arm::communication_interface > Writing DP register SELECT, value=0x010000f0
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    IDR, value=0x00000000
       DEBUG probe_rs::architecture::arm::communication_interface > Reading DP register CTRL/STAT
       DEBUG probe_rs::architecture::arm::communication_interface > Read    DP register CTRL/STAT, value=0xf0000040
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register IDR
       DEBUG probe_rs::architecture::arm::communication_interface > Changing AP to 0, AP_BANK_SEL to 15
       DEBUG probe_rs::architecture::arm::communication_interface > Writing DP register SELECT, value=0x000000f0
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    IDR, value=0x04770031
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register BASE
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    BASE, value=0x41003003
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register BASE2
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    BASE2, value=0x00000000
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000010
       DEBUG probe_rs::architecture::arm::communication_interface > Changing AP to 0, AP_BANK_SEL to 0
       DEBUG probe_rs::architecture::arm::communication_interface > Writing DP register SELECT, value=0x00000000
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register CSW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    CSW, value=0x03000050
       DEBUG probe_rs::architecture::arm::communication_interface > AP 0: MemoryAp { port_number: 0, only_32bit_data_size: false, debug_base_address: 1090531328 }
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000ED30
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register DRW, value=0x0000001F
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register DRW, value=0xA05F0001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE0002000
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x00000040
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE0002008
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register DRW, value=0x00000000
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000200C
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register DRW, value=0x00000000
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE0002010
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register DRW, value=0x00000000
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE0002014
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register DRW, value=0x00000000
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::flashing::download                         > Found loadable segment.
       DEBUG probe_rs::flashing::download                         > Found loadable segment.
       DEBUG probe_rs::flashing::download                         > Found loadable segment.
        INFO probe_rs::flashing::download                         > Found 3 loadable sections:
        INFO probe_rs::flashing::download                         >     .vector_table at 00002000 (192 byte0)
        INFO probe_rs::flashing::download                         >     .text at 000020C0 (960 byte0)
        INFO probe_rs::flashing::download                         >     .rodata at 00002480 (376 byte0)
       DEBUG probe_rs::flashing::loader                           > Using builder for region (0x00000000..0x00040000)
       DEBUG probe_rs::flashing::loader                           > Algorithm atsamd21_256 - start: 0x000000 - size: 0x040000
       DEBUG probe_rs::flashing::loader                           > Algorithms: [RawFlashAlgorithm { name: "atsamd21_256", description: "atsamd21 256kb flash", default: true, instructions: [65, 33, 9, 6, 10, 104, 82, 7, 1, 213, 4, 34, 10, 96, 45, 74, 43, 73, 81, 96, 44, 73, 73, 68, 8, 96, 0, 32, 112, 71, 0, 32, 112, 71, 15, 33, 137, 3, 1, 64, 66, 8, 15, 32, 64, 3, 2, 64, 16, 181, 36, 72, 194, 97, 37, 74, 2, 128, 2, 125, 210, 7, 252, 208, 34, 76, 1, 34, 63, 60, 146, 3, 139, 24, 12, 224, 74, 8, 194, 97, 4, 128, 2, 125, 210, 7, 252, 208, 2, 125, 146, 7, 1, 213, 1, 32, 16, 189, 255, 49, 1, 49, 153, 66, 240, 211, 0, 32, 16, 189, 240, 181, 201, 28, 137, 8, 21, 75, 137, 0, 18, 77, 219, 28, 43, 128, 43, 125, 219, 7, 252, 208, 17, 78, 61, 62, 0, 41, 22, 208, 3, 70, 64, 41, 1, 217, 64, 36, 5, 224, 12, 70, 3, 224, 128, 202, 9, 31, 128, 195, 36, 31, 0, 44, 249, 209, 46, 128, 64, 48, 43, 125, 219, 7, 252, 208, 43, 125, 155, 7, 232, 213, 1, 32, 240, 189, 0, 32, 240, 189, 0, 0, 158, 0, 4, 0, 0, 64, 0, 65, 4, 0, 0, 0, 65, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], pc_init: Some(1), pc_uninit: Some(31), pc_program_page: 111, pc_erase_sector: 35, pc_erase_all: None, data_section_offset: 208, flash_properties: FlashProperties { address_range: 0..262144, page_size: 1024, erased_byte_value: 255, program_page_timeout: 100, erase_sector_timeout: 1000, sectors: [SectorDescription { size: 16384, address: 0 }] } }]
       DEBUG probe_rs::flashing::flasher                          > Full Chip Erase enabled: false
       DEBUG probe_rs::flashing::flasher                          > Double Buffering enabled: false
       DEBUG probe_rs::flashing::flasher                          > Initializing the flash algorithm.
       DEBUG probe_rs::flashing::flasher                          > Halting core.
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register DRW, value=0xA05F0003
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register CSW, value=0x63000012
       DEBUG probe_rs::architecture::arm::communication_interface > Writing register TAR, value=0xE000EDF0
       DEBUG probe_rs::architecture::arm::communication_interface > Reading register DRW
       DEBUG probe_rs::architecture::arm::communication_interface > Read register    DRW, value=0x02000001
     Erasing sectors ✔ [00:00:00] [------------------------------------------------------------------------]       0B/ 16.00KB @       0B/s (eta 0s )
 Programming pages   ✔ [00:00:00] [------------------------------------------------------------------------]       0B/  2.00KB @       0B/s (eta 0s )
       Error failed to flash /code/bug-reproduce-samd-bootprot/target/thumbv6m-none-eabi/debug/bug-reproduce-samd-bootprot

Caused by:
    0: Error while flashing
    1: Something during the interaction with the core went wrong
    2: An error with the usage of the probe occured
    3: Operation timed out

Desktop (please complete the following information):

  • Linux (Debian Buster)

Additional context

  • The board has a 8K bootloader which I am trying to preserve.
  • The first flash pages are protected by BOOTPROT.
  • Flashing the board directly with JFlash starting at address 0x2000 works fine, so does bossac.
  • I am trying to use probe-rs instead of the bootloader due to the RTT integration, but would like to keep the option of later flashing with bootloader.

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 1
  • Comments: 25 (16 by maintainers)

Most upvoted comments

Yes, I think this is still a significant issue. With https://github.com/probe-rs/probe-rs/pull/1855, probe-rs now does have a chip erase for ATSAM, however that doesn’t really help here since the chip erase functionality leaves the “user row” intact, and that includes the bootloader protection setting…

With a wider view, I think we need a generic reading/writing functionality for field like the BOOTPROT, where there’s more to it than simply reading/writing a register, and there are also good reasons for developers to want to access just that specific field. For another instance, in a recent project with i.MX8 (not-Rust and proprietary), I’ve encountered similar need for programming crypto keys.

I totally agree that better diagnostics messages would be great - in this case it would be difficult to make the diagnostic very helpful without the ability to read the BOOTPROT setting. The logs in the attached bugs do start with the same failure to erase sector 0x0000, however in other combinations of flash size and BOOTPROT setting, those erasing errors will manifest at different addresses.

If I get a chance, I’ll look into whether or not the CMSIS-Pack has been updated this weekend. If not, I can submit a PR to update the target description file for the g18au.

I believe I tried with a a rust probe, and an st-link V3… and I recall doing the same tests with a jlink and pio that you did. I think I even documented some of it in another related issue here somewhere.

On Thu, Oct 26, 2023, 3:38 AM Ian @.***> wrote:

what’s more interesting, when I flash this chip with platformio, which uses the same derived algos from the cmsis packs, it works fine.

I replicated this using platformio and a J-Link - from the logs it appears that pio uses Segger’s software to drive the flashing process, and it doesn’t seem to suffer the same problem as here. With the chip’s bootloader protection set to 8kB, the Segger tool flashes the application, and if I set the bootloader protection to 16kB, it fails with an error ((sector is locked)). So, it’s not fiddling with the bootloader protection, and I guess it isn’t using the loader from Microchip’s dev_packs.

@LongLiveCHIEF https://github.com/LongLiveCHIEF - what probe are you using?

— Reply to this email directly, view it on GitHub https://github.com/probe-rs/probe-rs/issues/507#issuecomment-1780665503, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZBLALEK2OMQIIBYVC2KRDYBIOP7AVCNFSM4VGZQU32U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZYGA3DMNJVGAZQ . You are receiving this because you were mentioned.Message ID: @.***>

@Yatekii this is only happening when the board uses the ATSAMD21G18AU chip. I’ve tested on both the feather M0 and the seeeduino xiao. The only way to flash the chips on these boards is to use the atsamd21e17a.

I did some digging a little over a year ago, and determined that it came down to the flash region size being incorrect for the CMSIS pack for the 21G18au. I compared the flash algo’s for that chip and the 21e17a, and the only differences were the flash region size. The region size for the 21e17a seems to be right size for 21d18au, so that why I flashed it using the “wrong chip” so long ago.

Since then I’ve seen a few dozen people with the same problem for these 2 chips, and this fix always works for them.

I think there’s another issue thread in one of the probe-rs repos where I had an even more detailed description and analysis, but can’t remember where that is.

so, strangely enough, even though I’m fairly sure my chip is a atsamd21g18au, if I change my chip in .embed.toml and probe-run commands to atsamd21e17a, everything works flawlessly… but only if I use my stlinkv2-1 probe (jlink edu mini still has issues).

I am currently testing on a seeeduino xiao, which the manufacturer states is a “ARM Cortex-M0+ CPU(SAMD21G18)” (seeeduino xiao specs.

The actual chip on the xiao board is shielded, so I cant verify the chip without destroying the board, but I have some new boards coming in a few days that supposedly also have the atsamd21g18au (and not shielded), and I’ll re-run some of these tests with those boards as well to see what results I can replicate.

If things go strangely at that point, I’ll rip the shielding off one of these seeeduino’s to verify the chip.