Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flysky FS-X6B firmware update using openocd, successfully. #12

Open
kindsoldier opened this issue Mar 25, 2020 · 0 comments
Open

Flysky FS-X6B firmware update using openocd, successfully. #12

kindsoldier opened this issue Mar 25, 2020 · 0 comments

Comments

@kindsoldier
Copy link

kindsoldier commented Mar 25, 2020

I share my experience.
Flashing the receiver is like flashing typical stm32f* but I am faced with the fact that memory bank of the receiver is locked for write at factory.
Unlock sequence:

# openocd \
     -f interface/stlink-v2.cfg \
     -f target/stm32f0x.cfg \
     -c "init" \
     -c "reset halt" \
     -c "stm32f0x unlock 0" \
     -c "reset halt" \
     -c "shutdown"

After that it is flashed with a typical sequence of openocd commands:

 # image=X6B_rssi_ch14.bin
 # openocd \
    -f 'interface/stlink-v2.cfg' \
    -f 'target/stm32f0x.cfg'  \
    -c "init" \
    -c "reset halt" \
    -c "flash write_image erase $image 0x08000000"\
    -c "verify_image $image" \
    -c "reset" \
    -c "shutdown"

I use clone STLink V2 from Aliexpress.
Important! Also I soldered and connect to STLink "Reset" line on the receiver.

After that I got RSSI on channel 14 (Aux10)

For save original firmware:
# st-flash read ./firmware-orig.bin 0x08000000 0x8000

No guarantees, of course. =)

PS

I found that you can unlock flash memory immediately when recording. http://openocd.org/doc/html/Flash-Commands.html

Command: flash write_image [erase] [unlock] filename [offset] [type]

That should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant