Make sure you have selected the right voltage in the FTDI Chip selector (5V/3.3V), VCC Must be matched with the ouput voltage.
FTDI | STM32 |
---|---|
TX | A10 |
RX | A9 |
VCC | 5V/3V3 (Voltage Switch) |
GND | G |
$ git clone https://github.com/ARMinARM/stm32flash.git
$ cd stm32flash
$ make
$ make install
Firt you have to press the button reset in order to force the bootloader read commands from UART. Then execute the command below
stm32flash -r - -g 0x8000000 $(ls /dev/tty.*usbserial*) > ouput.bin
Interface serial_posix: 57600 8E1
Version : 0x22
Option 1 : 0x00
Option 2 : 0x00
Device ID : 0x0410 (Medium-density)
- RAM : 20KiB (512b reserved by bootloader)
- Flash : 128KiB (sector size: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB
Memory read
Read address 0x08020000 (100.00%) Done.
Starting execution at address 0x08000000... done.
Firt you have to press the button reset in order to force the bootloader read commands from UART. Then execute the command below
$ stm32flash -w main.bin -v -g 0x8000000 $(ls /dev/tty.*usbserial*)
stm32flash 0.4
http://stm32flash.googlecode.com/
Using Parser : Intel HEX
Interface serial_posix: 57600 8E1
Version : 0x22
Option 1 : 0x00
Option 2 : 0x00
Device ID : 0x0410 (Medium-density)
- RAM : 20KiB (512b reserved by bootloader)
- Flash : 128KiB (sector size: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB
Write to memory
Erasing memory
Wrote and verified address 0x08001f00 (74.56%)
Starting execution at address 0x08000000... done.