This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
software:stm8:ubuntu [2018/07/06 13:48] shaddi |
software:stm8:ubuntu [2021/02/24 23:49] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | https://www.ondrovo.com/a/20170107-stm8-getting-started/ | ||
+ | |||
+ | **openocd** | ||
+ | - # sudo apt-get install automake libtool | ||
+ | - # git clone git: / /repo.or.cz/openocd.git | ||
+ | - # cd openocd | ||
+ | - # ./bootstrap | ||
+ | - # ./configure | ||
+ | - # make | ||
+ | - # sudo make install | ||
+ | |||
**sdcc** | **sdcc** | ||
- Get sources from https://sourceforge.net/projects/sdcc/files/ | - Get sources from https://sourceforge.net/projects/sdcc/files/ | ||
Line 9: | Line 20: | ||
- Get sources from https://sourceforge.net/projects/stm8-binutils-gdb/files/ | - Get sources from https://sourceforge.net/projects/stm8-binutils-gdb/files/ | ||
- # ./patch_binutils.sh | - # ./patch_binutils.sh | ||
- | - # cd binutils-2.30/ | + | - # ./configure_binutils.sh |
- | - # ./configure | + | - # cd binutils-2.3 |
- # make | - # make | ||
- | - # | + | - # sudo make install |
**stm8-flash** | **stm8-flash** | ||
Line 19: | Line 30: | ||
- # make | - # make | ||
- # sudo cp stm8flash /usr/bin/ | - # sudo cp stm8flash /usr/bin/ | ||
+ | |||
+ | **st-link permissions** | ||
+ | <code> | ||
+ | # /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+="stlinkv2_%n" | ||
+ | |||
+ | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", \ | ||
+ | KERNEL!="sd*", KERNEL!="sg*", KERNEL!="tty*", SUBSYSTEM!="bsg", \ | ||
+ | MODE:="0666", \ | ||
+ | SYMLINK+="stlinkv2_%n" | ||
+ | |||
+ | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", \ | ||
+ | KERNEL=="sd*", MODE:="0666", \ | ||
+ | SYMLINK+="stlinkv2_disk" | ||
+ | |||
+ | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", \ | ||
+ | KERNEL=="sg*", MODE:="0666", \ | ||
+ | SYMLINK+="stlinkv2_raw_scsi" | ||
+ | |||
+ | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", \ | ||
+ | SUBSYSTEM=="bsg", MODE:="0666", \ | ||
+ | SYMLINK+="stlinkv2_block_scsi" | ||
+ | |||
+ | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", \ | ||
+ | KERNEL=="tty*", MODE:="0666", \ | ||
+ | SYMLINK+="stlinkv2_console" | ||
+ | |||
+ | # 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 control access using standard unix groups. | ||
+ | </code> |