トップ 差分 一覧 ソース 検索 ヘルプ RSS ログイン

Tips-stlinkv2

STM32 / STM8

https://amzn.to/3blXSfM

https://amzn.to/2S71VoP(送料あり)

GIT からインストール

zypper install libusb
~/$ git clone https://github.com/texane/stlink.git
~/$ cd stlink
~/stlink$ make
~/stlink$ cd build/Release/
~/stlink/build/Release$ sudo make install
~/stlink/build/Release$ cd ../..
~/stlink$ cd etc/udev/rules.d
~/stlink/etc/udev/rules.d$ sudo cp 49-stlinkv2.rules /etc/udev/rules
~/stlink/etc/udev/rules.d$ sudo udevadm control --reload-rules
~/stlink/etc/udev/rules.d$ sudo udevadm trigge
~/stlink/etc/udev/rules.d$ ls /dev/stlink*
/dev/stlinkv2_4

ST-linkファームウェア

https://my.st.com/

stsw-link007 で検索するとダウンロード可能

opensuse - leap

/etc/udev/rules.d/49-stlinkv2.rules

# stm32 discovery boards, with onboard st/linkv2
# ie, STM32L, STM32F4.
# STM32VL has st/linkv1, which is quite different

SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", \
   MODE:="0666", \
#   SYMLINK+="ttyACM4"
   SYMLINK+="stlinkv2_%n"

# If you share your linux system with other users, or just don't like the
# idea of write permission for everybody, you can replace MODE:="0666" with
# OWNER:="yourusername" to create the device owned by you, or with
# GROUP:="somegroupname" and mange access using standard unix groups.

GROUP:="dialout"

変更

 7,8c7
< #    SYMLINK+="ttyACM4"
<    SYMLINK+="stlinkv2_%n"
---
>     SYMLINK+="stlinkv2_%n"
14,16d12
< 
< GROUP:="dialout"
< 

/etc/udev/rules.d/99-stlink.rules ( なくても大丈夫??)

# ST-Link/V2 programming adapter

# ST-Link V1, if using a STM8S discovery board
# important: It needs a special entry in /etc/modprob/blacklist
ATTR{idVendor}=="0483", ATTR{idProduct}=="3744", MODE="0666", GROUP="plugdev"

# ST-Link/V2, the china adapter with the green plastic housing
ATTR{idVendor}=="0483", ATTR{idProduct}=="3748", MODE="0666", GROUP="plugdev"

再起動

# udevadm control --reload-rules
# udevadm trigger

T

https://wiki.kewl.org/dokuwiki/tools:stlink

自作する

http://www.micromouseonline.com/2014/01/05/mini-st-linkv2-programmer/