OpenOCD for STLink
If you are using linux then you can't use the ST-LINK utility from st.com. But fortunately you can achieve the same effect with openocd on the linux command line. This tutorial assumes you have an STLink v2
- install openocd from your distro's repository. for debian/ubuntu use:
sudo apt-get install openocd
- change directories to openocd script repository:
- issue the full command:
openocd -f ./scripts/interface/stlink-v2.cfg -f ./scripts/target/stm32f1x.cfg -c "init; reset halt; stm32f1x unlock 0; reset run; shutdown"
- restart your device so the disabled readout protection can take effect.
- Now you can proceed with flashing your R9m or R9MM. this may work on other frsky devices or it might not.