Сборка утилиты для прошивки МК с помощью st-link v2

Т.к. у нас не работает система прошивки из стандартного набора st-link то воспользуемся qtstlink2 - multi-platform ST-Link V2 Client.

Скачаем из svn репозитория исходники программы:

nis@jane ~/stm32 $ svn checkout http://qstlink2.googlecode.com/svn/trunk/ qstlink2-read-only

После соберем и установим приложение:

nis@jane ~/stm32 $ cd qstlink2-read-only/

nis@jane ~/stm32/qstlink2-read-only $ qmake

nis@jane ~/stm32/qstlink2-read-only $ make

nis@jane ~/stm32/qstlink2-read-only $ su

jane qstlink2-read-only # make install

После этого утилита установлена и готова к работе. Можно пользоваться как графическим интерфейсом утилиты:

nis@jane ~ $ qstlink2

Verbose level: 2

Info: Devices list loaded.

Или же воспользоваться консольным интерфейсом:

nis@jane ~ $ qstlink2 --help

Missing parameters, help below:

"

This application can be used through the GUI or via the command line. (CLI)

Command line usage:

qstlink2 [-hqvcwreV] [path]

-h, --help: shows this help

-q, --quiet: Quiet output (Nothing)

-v, --verbose: Verbose output (Debug)

-c,--cli: Enable command line mode

-w,--write: Enable write mode - Needs Path

-r,--read: Enable read mode - Needs Path

-e,--erase: Flash will be completely erased

-V, --verify: When used with write, the file will be verified against flash

-R, --reset: will reset the MCU

Example to write and verify the device:

qstlink2 -cwV /home/me/myfile.bin (you can also use relative paths like ./test.bin)

or

qstlink2 --cli --write --verify /home/me/myfile.bin

More info here

"