Skip to content

davide99/stm8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STM8s Open peripheral library

Work in progress...
Contact me @davide99

Requirements

  1. Linux
  2. git
  3. Python >= 3.5
  4. colorama for python 3 (use pip)
  5. SDCC
  6. stm8flash

Quick start

  • $ git clone https://github.com/davide99/stm8.git
  • $ cd stm8
  • $ sudo chmod +x make.py
  • $ ./make.py flash
  • Done

ST-Link Pinout

ST-Link V2 clones usually come in two flavours, the ones with the metal enclosing and the ones by Baite in green plastic enclosing. They are both perfectly fine, despite the second one support also the JTAG protocol (besides SWIM and SWD)

pinout_stlink

Baite version

  1. T_JRST
  2. 3V3
  3. 5V
  4. T_JTCK/T_SWCLK
  5. SWIM
  6. T_JTMS/T_SWDIO
  7. GND
  8. T_JTDO
  9. SWIM_RST
  10. T_JTDI

Plastic version

  1. RST
  2. SWDIO
  3. GND
  4. GND
  5. SWIM
  6. SWCLK
  7. 3V3
  8. 3V3
  9. 5V
  10. 5V

MCU wiring

Signal Baite ST-Link Metal ST-Link
3V3 2 7
SWIM 5 5
GND 7 3
NRST 9 1

CLion support

This repository is CLion-ready. After importing the repository the Build & Flash target is available. Just open the main file you want to flash and hit the button.