So, threre are Archlinux distro, stm32 mc, and C code. How to flash stm32, without some IDE, only using console?
With Texane stlink
.bin
if necessary arm-none-eabi-objcopy -O binary firmware.elf firmware.bin
/opt/stlink/st-flash write firmware.bin 0x8000000
With OpenOCD , if your board is not supported by Texane
openocd/scripts/board
, create one if necessary. openocd -d0 -f board/yourboard.cfg -c "init;targets;halt;flash write_image erase firmware.hex;shutdown"
If you have USB to UART adapter, you can use stm32flash
. Basically connect USART1
to the adapter, pull BOOT0
to high (there might be a jumper or button on the board) and power up / reset the board. Then you should be able to follow stm32flash -h
to see what to do.
Some STM32 (eg STM32F042
) has USB DFU bootloader built in, so you can also connect the MCU to USB directly and use dfu-utils
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.