Advice on disabling flash write protection and flashing firmware with Black Magic Probe or Segger j-link mini? #104
Unanswered
CtrlC-Root
asked this question in
Q&A
Replies: 1 comment
-
Ok well using the Segger J-Link Mini worked and was really straight-forward. Here's the OpenOCD config file I used:
I had to tweak the command to disable write protection as documented in the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am trying to follow the instructions to disable the write protection and flash the compiled firmware to a DFM17 radiosonde. I have an ST-LINKv2 which is on loan to a friend at the moment so I'm trying to see if I can make do with the other tools I have on hand.
I have a Black Magic Probe (https://black-magic.org) connected to the SWD interface on the DFM17 and I'm using it through GDB as an extended remote. It recognizes the STM32 as a target when I power on the radiosonde:
I'd like to use this interface to disable the flash write protection and flash the firmware. I think flashing the firmware should be straight-forward and I've used GDB to do this before on other ARM Cortex-M microcontrollers. What I could use help with is disabling the flash write protection. I know I can read and write registers and other parts of memory through GDB and I believe the flash protection on this microcontroller is controlled through registers so as far as I can tell it should be possible but I'm having trouble finding any examples online.
As an alternative it might also be possible to use OpenOCD with the Black Magic Probe as a backend. It seems like there's been some scattered efforts to make this happen:
I also have a Segger j-link mini which does seem to be a supported target for OpenOCD (https://openocd.org/doc/html/Debug-Adapter-Configuration.html#index-jlink) so maybe that would be an easier alternative.
Does anyone here have any advice or could point me in the right direction for any of these options? If I really have to use OpenOCD with an ST-LINKv2 it's not the end of the world but I thought I'd start a discussion here in case someone else has tried these alternatives before.
Beta Was this translation helpful? Give feedback.
All reactions