README.md 3.46 KB
Newer Older
1
# minipro
2
An open source program for controlling the MiniPRO TL866xx series of chip programmers
Valentin Dudouyt's avatar
Valentin Dudouyt committed
3 4

## Features
5
* Compatibility with Minipro TL866CS, TL866A, and TL866II+ from
6
Autoelectric (http://www.autoelectric.cn/en/tl866_main.html)
7 8
* More than 13000 target devices (including AVRs, PICs, various BIOSes
and EEPROMs)
Valentin Dudouyt's avatar
Valentin Dudouyt committed
9 10 11
* ZIF40 socket and ISP support
* Vendor-specific MCU configuration bits
* Chip ID verification
David Griffith's avatar
David Griffith committed
12
* Overcurrent protection
Valentin Dudouyt's avatar
Valentin Dudouyt committed
13 14
* System testing

Valentin Dudouyt's avatar
Valentin Dudouyt committed
15
## Synopsis
Valentin Dudouyt's avatar
Valentin Dudouyt committed
16

Valentin Dudouyt's avatar
Valentin Dudouyt committed
17 18 19 20 21
```nohighlight
$ minipro -p ATMEGA48 -w atmega48.bin
$ minipro -p ATMEGA48 -r atmega48.bin
```

22
## Prerequisites
Valentin Dudouyt's avatar
Valentin Dudouyt committed
23

24 25
You'll need some sort of Linux or MacOS machine.  Other Unices may work, 
though that is untested.  You will need version 1.0.16 or greater of libusb.
David Griffith's avatar
David Griffith committed
26

Valentin Dudouyt's avatar
Valentin Dudouyt committed
27

28
## Installation on Linux
29

30 31 32 33
### Install build dependencies 

#### Debian/Ubuntu
```nohighlight
34
sudo apt-get install build-essential pkg-config git libusb-1.0-0-dev
35 36
```

37
#### CentOS 7
38 39 40 41 42
```nohighlight
sudo yum install gcc make pkgconfig git libusbx-devel
```

### Checkout source code and compile 
Valentin Dudouyt's avatar
Valentin Dudouyt committed
43
```nohighlight
David Griffith's avatar
David Griffith committed
44
git clone https://gitlab.com/DavidGriffith/minipro.git
45 46 47
cd minipro
make
sudo make install
David Griffith's avatar
David Griffith committed
48
```
49 50

### Udev configuration (recommended)
51 52 53
If you want to access the programmer as a regular user, you'll have to
configure udev to recognize the programmer and set appropriate access
permissions.
54

55
```nohighlight
56
sudo cp udev/rules.d/80-minipro.rules /etc/udev/rules.d/
57 58 59 60 61 62
sudo udevadm trigger
```
You'll also have to add your regular user to the `plugdev` system
group:
```nohighlight
sudo usermod -a -G plugdev YOUR-USER
63
```
64 65
Note that this change will only become effective after your next
login.
66

67 68 69
### Bash completion (optional)

Bash users may want to optionally install the provided completion file:
70 71 72
```nohighlight
sudo cp bash_completion.d/minipro /etc/bash_completion.d/
```
73

74
### Making a .deb package
75

76
Building a Debian package directly from this repository is easy.  Make
77 78
sure you have the build dependencies installed as described above.  Be
sure it all builds, then do this:
79 80

```nohighlight
81 82
sudo apt-get install fakeroot debhelper dpkg-dev
fakeroot dpkg-buildpackage -b -us -uc
Valentin Dudouyt's avatar
Valentin Dudouyt committed
83
```
84

85 86 87
You should then have a .deb package for you to install with `dpkg -i`. 
Note that the .deb package will already provide the udev and 
bash-completion configurations for you.
88

89 90 91 92 93 94 95 96 97 98 99 100 101
### Making a .rpm package

You can build RPM packages for Fedora and CentOS with the supplied
minipro.spec.

First make sure you have a RPM build environment set up. You need to have
the rpmdevtools package installed and a `rpmbuild` directory tree within
your homedir. Use the `rpmdev-setuptree` command to create the rpmbuild
directory tree if it does not exist yet.

Since minipro does not yet make official releases with version numbers
and tags, you have to choose a specific git commit to build. Open the
minipro.spec file and adapt the "commit" and "commitdate" definitions.
102
You can get these either with `git log` or from the Gitlab project page.
103

104
Then use these commands to download the source tarballs from Gitlab and
105 106 107 108 109 110 111 112 113
build the package:

```nohighlight
spectool -g -R minipro.spec
rpmbuild -ba minipro.spec
```

The final RPMs can be found below `~/rpmbuild/RPMS/`

114
## Installation on macOS
115

116
### Install dependencies
Ray Bellis's avatar
Ray Bellis committed
117
Install `pkg-config` and `libusb` using brew or MacPorts:
118
```
Ray Bellis's avatar
Ray Bellis committed
119
brew install pkg-config
120 121 122 123 124
brew install libusb
brew link libusb
```
or:
```
Ray Bellis's avatar
Ray Bellis committed
125
port install pkgconfig
126 127
port install libusb
```
128 129
### Checkout source code and compile
```nohighlight
130
git clone git@gitlab.com:DavidGriffith/minipro.git
131 132 133
cd minipro
make
sudo make install
134
```