Downgrade failed - possible to recover with ST-Link/V2?


#1

Hello,

Due to problems with version 0.3.1 (my Arduino code did not work any more) I downgraded to 0.2.9 (which is the version my code was developed with) without reading the warning in https://github.com/redbear/firmware/releases… Now I don’t have RBLink - is it possible to connect an original ST-Link/V2 and reprogram the bootloader???

Thanks,
bruno


#2

I will answer my own question:

YES it’s possible to program the Duo with the normal ST-Link! I had to connect ALL the JTAG ports of the Duo to the respective ports on the ST-Link, then I changed the first line in openocd-redbearduo.cfg to source [find interface/stlink-v2.cfg] and I was able to program the 0.2.4 versions of the bootloader and everything else, like this:

openocd -f duo-test.cfg -c "init" -c "reset init" -c "flash write_image erase unlock Duo/firmware/bootloader/duo-bootloader-r4.bin 0x08000000"
openocd -f duo-test.cfg -c "init" -c "reset init" -c "flash write_image erase unlock Duo/firmware/dct/fac-dct-r1.bin 0x08004000"
openocd -f duo-test.cfg -c "init" -c "reset init" -c "flash write_image erase unlock Duo/firmware/system/v0.2.4/duo-system-part1-v0.2.4.bin 0x08020000"
openocd -f duo-test.cfg -c "init" -c "reset init" -c "flash write_image erase unlock Duo/firmware/system/v0.2.4/duo-system-part2-v0.2.4.bin 0x08040000"