I'm trying to learn how to use Ada and I'm using the Adafruit RP2040 feather (https://www.adafruit.com/product/4884). I soldered a SWD debug header onto the feather, and tried to load an led blinking program, using the black magic probe (https://www.adafruit.com/product/3839) to connect to the feather but I get an error about vFlashErase. My GDB session log is below. Do you have any suggestions?
From looking online, it sounds like if there was a write-protected section on the flash, it could cause that error. If that's the case, how would I clear the write protection? I don't see anything obvious in the gdb menus under "monitor".(gdb) target extended-remote /dev/ttyACM1
Remote debugging using /dev/ttyACM1
(gdb) monitor version
Black Magic Probe v1.8.2, Hardware Version 6
Copyright (C) 2022 Black Magic Debug Project
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
(gdb) file bin/ada_hello_pi_pico
Reading symbols from bin/ada_hello_pi_pico...
(gdb) monitor swdp_scan
Target voltage: 3.3V
Available Targets:
No. Att Driver
1 Raspberry RP2040 M0+
2 Raspberry RP2040 M0+
3 Raspberry RP2040 Rescue(Attach to reset!)
(gdb) attach 1
Attaching to program: /home/kcurtis/project-base/software/apps/ada_hello_pi_pico/bin/ada_hello_pi_pico, Remote target
0x000020e0 in ?? ()
(gdb) load
Error erasing flash with vFlashErase packet
FWIW, I have been able to successful load Ada code onto the STM32F405 feather.
Thanks,
Keith