Compare commits
6 Commits
better-doc
...
v1.5
Author | SHA1 | Date | |
---|---|---|---|
e0e2ab5526 | |||
4cc0deb8e9 | |||
5ab2a73411 | |||
4a40d5613a | |||
83c0b47f62 | |||
b0e882ff32 |
@ -11,7 +11,7 @@ python:
|
|||||||
before_install:
|
before_install:
|
||||||
- sudo apt install rpm dpkg-dev debhelper dh-python python3-setuptools fakeroot python3-serial python3-yaml
|
- sudo apt install rpm dpkg-dev debhelper dh-python python3-setuptools fakeroot python3-serial python3-yaml
|
||||||
install:
|
install:
|
||||||
- pip install pyserial pyusb tqdm
|
- pip install pyusb
|
||||||
script:
|
script:
|
||||||
- python setup.py build
|
- python setup.py build
|
||||||
- python setup.py test
|
- python setup.py test
|
||||||
|
@ -3,8 +3,16 @@ Installation
|
|||||||
|
|
||||||
stcgal requires Python 3.2 (or later) and pySerial. USB support is
|
stcgal requires Python 3.2 (or later) and pySerial. USB support is
|
||||||
optional and requires pyusb 1.0.0b2 or later. You can run stcgal
|
optional and requires pyusb 1.0.0b2 or later. You can run stcgal
|
||||||
directly with the included ```stcgal.py``` script. The recommended
|
directly with the included ```stcgal.py``` script if the dependencies
|
||||||
method for permanent installation is to use Python's setuptools. Run
|
are already installed.
|
||||||
```./setup.py build``` to build and ```sudo ./setup.py install```
|
|
||||||
to install stcgal. A permanent installation provides the ```stcgal```
|
There are several options for permanent installation:
|
||||||
command.
|
|
||||||
|
* Use Python3 and ```pip```. Run
|
||||||
|
```pip3 install git+https://github.com/grigorig/stcgal.git```
|
||||||
|
to install the latest version of stcgal globally on your system.
|
||||||
|
This may require administrator/root permissions for write access
|
||||||
|
to system directories.
|
||||||
|
|
||||||
|
* Use setuptools. Run ```./setup.py build``` to build and
|
||||||
|
```sudo ./setup.py install``` to install stcgal.
|
||||||
|
18
doc/PyPI.md
Normal file
18
doc/PyPI.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
stcgal - STC MCU ISP flash tool
|
||||||
|
===============================
|
||||||
|
|
||||||
|
stcgal is a command line flash programming tool for [STC MCU Ltd](http://stcmcu.com/).
|
||||||
|
8051 compatible microcontrollers.
|
||||||
|
|
||||||
|
STC microcontrollers have an UART/USB based boot strap loader (BSL). It
|
||||||
|
utilizes a packet-based protocol to flash the code memory and IAP
|
||||||
|
memory over a serial link. This is referred to as in-system programming
|
||||||
|
(ISP). The BSL is also used to configure various (fuse-like) device
|
||||||
|
options. Unfortunately, this protocol is not publicly documented and
|
||||||
|
STC only provide a (crude) Windows GUI application for programming.
|
||||||
|
|
||||||
|
stcgal is a full-featured Open Source replacement for STC's Windows
|
||||||
|
software; it supports a wide range of MCUs, it is very portable and
|
||||||
|
suitable for automation.
|
||||||
|
|
||||||
|
[See the GitHub page for more information](https://github.com/grigorig/stcgal).
|
7
setup.py
7
setup.py
@ -24,14 +24,15 @@
|
|||||||
import stcgal
|
import stcgal
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
with open("README.md", "r") as fh:
|
with open("doc/PyPI.md", "r") as fh:
|
||||||
long_description = fh.read()
|
long_description = fh.read()
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name = "stcgal",
|
name = "stcgal",
|
||||||
version = stcgal.__version__,
|
version = stcgal.__version__,
|
||||||
packages = find_packages(exclude=["doc", "tests"]),
|
packages = find_packages(exclude=["doc", "tests"]),
|
||||||
install_requires = ["pyserial"],
|
data_files = [("doc", ["README.md", "doc/FAQ.md", "doc/MODELS.md", "doc/USAGE.md"])],
|
||||||
|
install_requires = ["pyserial>=3.0", "tqdm>=4.0.0"],
|
||||||
extras_require = {
|
extras_require = {
|
||||||
"usb": ["pyusb>=1.0.0"]
|
"usb": ["pyusb>=1.0.0"]
|
||||||
},
|
},
|
||||||
@ -50,7 +51,7 @@ setup(
|
|||||||
license = "MIT License",
|
license = "MIT License",
|
||||||
platforms = "any",
|
platforms = "any",
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Development Status :: 4 - Beta",
|
"Development Status :: 5 - Production/Stable",
|
||||||
"Environment :: Console",
|
"Environment :: Console",
|
||||||
"Intended Audience :: Developers",
|
"Intended Audience :: Developers",
|
||||||
"License :: OSI Approved :: MIT License",
|
"License :: OSI Approved :: MIT License",
|
||||||
|
@ -1 +1 @@
|
|||||||
__version__ = "1.4"
|
__version__ = "1.5"
|
||||||
|
@ -214,7 +214,7 @@ def cli():
|
|||||||
# check arguments
|
# check arguments
|
||||||
parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter,
|
parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||||
description="stcgal {} - an STC MCU ISP flash tool\n".format(stcgal.__version__) +
|
description="stcgal {} - an STC MCU ISP flash tool\n".format(stcgal.__version__) +
|
||||||
"(C) 2014-2017 Grigori Goronzy\nhttps://github.com/grigorig/stcgal")
|
"(C) 2014-2018 Grigori Goronzy and others\nhttps://github.com/grigorig/stcgal")
|
||||||
parser.add_argument("code_image", help="code segment file to flash (BIN/HEX)", type=argparse.FileType("rb"), nargs='?')
|
parser.add_argument("code_image", help="code segment file to flash (BIN/HEX)", type=argparse.FileType("rb"), nargs='?')
|
||||||
parser.add_argument("eeprom_image", help="eeprom segment file to flash (BIN/HEX)", type=argparse.FileType("rb"), nargs='?')
|
parser.add_argument("eeprom_image", help="eeprom segment file to flash (BIN/HEX)", type=argparse.FileType("rb"), nargs='?')
|
||||||
parser.add_argument("-a", "--autoreset", help="cycle power automatically by asserting DTR", action="store_true")
|
parser.add_argument("-a", "--autoreset", help="cycle power automatically by asserting DTR", action="store_true")
|
||||||
|
Reference in New Issue
Block a user