How to flash Achilles Pro firmware on Eachine Pro58 on a mac using ST-Link v2
- Install brew
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install stlink and openocd and telnet
$ brew install openocd
$ brew install telnet
- Convert the hex file to binary using
arm-none-eabi-objcopy
(make sure the binary is in your $PATH)
$ arm-none-eabi-objcopy -I ihex --output-target=binary <path>/Achilleas_V_1_4_EACHINE.hex <path>/achilles.bin
- Run openocd
$ openocd -f openocd.cfg -f stm32f1x.cfg -c init
- Open another terminal and use telnet to connect to the debugger
- Make sure your module is connected
- Halt the module
- Unlock the flash (if needed)
- Reset to apply the changes
- Halt again
- Erase bank 0
- Flash the binary
> flash write_bank 0 <absolute_path>/achilles.bin 0
- Reset the module