I'm trying to create a decent development workflow on the Raspberry Pi Pico. With the current limitations with probe-rs, I've been trying to get picotool in my runner to work in a automated fashion, rebooting and setting it to BOOTSEL so I can program it. I tried forking usbd picotool reset over to work with the rp2350, but there remains one key error.
The crate I'm using uses rp2040_hal::rom_data::reset_to_usb_boot to reset, this is found in rp2040-hal/src/rom_data.rs:
/// Resets the RP2040 and uses the watchdog facility to re-start in BOOTSEL mode:
///
/// * gpio_activity_pin_mask is provided to enable an 'activity light' via GPIO attached LED
/// for the USB Mass Storage Device:
/// * 0 No pins are used as per cold boot.
/// * Otherwise a single bit set indicating which GPIO pin should be set to output and
/// raised whenever there is mass storage activity from the host.
/// * disable_interface_mask may be used to control the exposed USB interfaces:
/// * 0 To enable both interfaces (as per cold boot).
/// * 1 To disable the USB Mass Storage Interface.
/// * 2 to Disable the USB PICOBOOT Interface.
b"UB" fn reset_to_usb_boot(gpio_activity_pin_mask: u32, disable_interface_mask: u32) -> ();
but I do not see an equivalent in the rp235x-hal. Looking at 5.2.4 of the rp2350 datasheet, the Watchdog Boot Vector seems to be somewhat similar, but too be honest I'm unsure about how I would go about it. I know this is early days (and my 2nd day learning rust) but some suggestions would be appreciated.
I'm trying to create a decent development workflow on the Raspberry Pi Pico. With the current limitations with probe-rs, I've been trying to get picotool in my runner to work in a automated fashion, rebooting and setting it to BOOTSEL so I can program it. I tried forking usbd picotool reset over to work with the rp2350, but there remains one key error.
The crate I'm using uses
rp2040_hal::rom_data::reset_to_usb_boot
to reset, this is found inrp2040-hal/src/rom_data.rs
:but I do not see an equivalent in the rp235x-hal. Looking at 5.2.4 of the rp2350 datasheet, the Watchdog Boot Vector seems to be somewhat similar, but too be honest I'm unsure about how I would go about it. I know this is early days (and my 2nd day learning rust) but some suggestions would be appreciated.