Hi, we are having issues flashing firmware on to our custom board (attached).
The output from GDB is:
Unable to match requested speed 2000 kHz, using 1800 kHz
[stm32f4x.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
Failed to launch GDB: Error erasing flash with vFlashErase packet (from target-download)
</div>
In the schematic you'll notice there is an error where `BOOT1` is misidentified, however we have pulled the correct `BOOT1` low (pin 37) manually with a jump wire, this did not change the output.
We have a working firmware for a different design that uses the same MCU so we don't beleive this to be a firmware issue per se.
Digging deeper the MCU believes the flash is protected and the device is locked, unlocking and clearing the flash appears to work, but subsequent attpempts to write to the flash fail with the same error:
<div>
(gdb) monitor flash protect 0 0 last off
Device Security Bit Set
stm32x device protected
failed setting protection for blocks 0 to 7
Protocol error with Rcmd
(gdb) monitor reset halt
Unable to match requested speed 2000 kHz, using 1800 kHz
Unable to match requested speed 2000 kHz, using 1800 kHz
[stm32f4x.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
(gdb) monitor stm32f4x unlock 0
Device Security Bit Set
stm32f2x unlocked.
INFO: a reset or power cycle is required for the new settings to take effect.
(gdb) monitor flash protect 0 0 last off
cleared protection for sectors 0 through 7 on flash bank 0
(gdb) flash write_image
Error erasing flash with vFlashErase packet
</div>
I would appreciate it if somebody could reach out and asssist with this issue.
Mant thanks.