Skip to content

Commit 4f1c8c3

Browse files
committed
update documentation for Board Manager installation method
1 parent 8b3002a commit 4f1c8c3

6 files changed

Lines changed: 171 additions & 49 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

77
## [Unreleased]
8+
9+
## [0.3.0 - 2017-10-23]
810
### Added
911
- integration into the Arduino IDE
12+
- support for easy installing via the Arduino Board Manger
1013
- support for serialEvent()
1114

1215
### Changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Arduino IDE versions 1.8.5 and 1.6.13 are tested, but any version >=1.6.6
4242
should work.
4343

4444
Supported Systems:
45+
4546
* Linux 64 bit: Tested on Ubuntu 16.04
4647
* Linux 32 bit: Tested on Ubuntu 16.04
4748
* Windows: Tested on Windows 7. Sduino might work on XP (not tested), but
@@ -50,7 +51,9 @@ Supported Systems:
5051
install, but IDE integration should be easy now. Any volunteers?
5152

5253
Start the Arduino-IDE. In File->Preferences, Settings tab, enter
53-
https://github.com/tenbaht/sduino/raw/master/package_sduino_stm8_index.json
54+
55+
https://github.com/tenbaht/sduino/raw/master/package_sduino_stm8_index.json
56+
5457
as an Additional Boards Manager URL.
5558

5659
Open Tools->Board:...->Boards Manager. Find Sduino by typing 'sd' into

board-manager/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,15 @@ final package index file.
3131

3232

3333

34+
## Package URLs
35+
36+
If using attached files to github releases:
37+
38+
URLs of the auto-generated repository archive files:
39+
40+
- https://github.com/tenbaht/sduino/archive/<tagname>.zip
41+
- https://github.com/tenbaht/sduino/archive/<tagname>.tar.gz
42+
43+
URL of files attached to github releases:
44+
45+
https://github.com/tenbaht/sduino/releases/download/<tagname>/<filename>

docs/hardware/flashtool.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,21 @@ SWD):
4848

4949
## Installation for Linux
5050

51-
Required lines in /etc/udev/rules.d/99-stlink.rules:
51+
Save this as root in in `/etc/udev/rules.d/99-stlink.rules`:
5252

5353
# ST-Link/V2 programming adapter
5454

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

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

62+
Using the STM8S-Discovery board as a flash programmer is a special case and
63+
requires [some additional
64+
blacklisting](Dstm8sdiscovery#usage-with-linux-and-stm8flash).
65+
6166

6267

6368
## Installation for Windows

docs/hardware/stm8sdiscovery.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Save this as root in in `/etc/udev/rules.d/99-stlink.rules`:
5656
# ST-Link/V2 programming adapter
5757

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

6262
# ST-Link/V2, the china adapter with the green plastic housing

docs/install.md

Lines changed: 144 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,194 @@
1-
# Installing the needed tools
1+
# Installation
2+
3+
Supported Systems:
4+
5+
* Linux 64 bit: Tested on Ubuntu 16.04
6+
* Linux 32 bit: Tested on Ubuntu 16.04
7+
* Windows: Tested on Windows 7. Sduino might work on XP (not tested), but
8+
the ST-Link/V2 driver is not available anymore for XP.
9+
* MacOS: Not tested, but should be very close to working. Will need a manual
10+
install, but IDE integration should be easy now. Any volunteers?
11+
* Raspian/Raspberry Pi: Untested. Will require a manual install.
12+
13+
14+
## GUI install
15+
16+
Starting with version 0.3.0 automatic IDE integration is supported via the
17+
Arduino Boards Manager. This is the recommanded way of installation now.
18+
Arduino IDE versions 1.8.5 and 1.6.13 are tested, but any version >=1.6.6
19+
should work.
20+
21+
Start the Arduino-IDE. In File->Preferences, Settings tab, enter
22+
23+
https://github.com/tenbaht/sduino/raw/master/package_sduino_stm8_index.json
24+
25+
as an Additional Boards Manager URL.
26+
27+
Open Tools->Board:...->Boards Manager. Find Sduino by typing 'sd' into
28+
the search line. Click on the list entry, Click on Install.
29+
30+
Now you should find a new entry "STM8S Boards" in the list at
31+
Tools->Board:... Choose *STM8S103F3 Breakout Board* from the list, open the
32+
standard Blink example from File->Examples->01. Basics->Blink and compile it
33+
by hitting 'Verify'.
34+
35+
36+
### using make on the command line
37+
38+
All the needed tools are now installed, but they are not in your path or
39+
where the Makefile expects them to be. There is work needed here. #23
40+
41+
42+
43+
## Manual install
44+
45+
Only required if you want to use a current repository snapshot or if the GUI
46+
install fails for your system (please take the time to file a [bug
47+
report](https://github.com/tenbaht/sduino/issues)).
248

349
All tools are available for Linux, MacOS and Windows, most of them even for
450
Raspbian on a RaspberryPi.
551

6-
SDCC support for the STM8 is still quite fresh and not very mature. It
7-
improves significantly from version to version. Be sure to use
8-
[the latest snapshot build](http://sdcc.sourceforge.net/snap.php) from the
9-
[project site on sourceforge](http://sdcc.sourceforge.net/), not the older
10-
version that might be included in your distribution.
52+
- Clone or download and extract the
53+
[repository](https://github.com/tenbaht/sduino) to a convenient location.
54+
- Download [the latest snapshot build](http://sdcc.sourceforge.net/snap.php)
55+
for your system from the [SDCC project site on
56+
sourceforge](http://sdcc.sourceforge.net/). Support for the STM8 improves
57+
significantly from version to version. Do not use the older version of
58+
SDCC that might be included in your distribution (Version 3.6 is
59+
definitely too old).
1160

61+
Later in the process you will unpack the SDCC archive. You only need support
62+
for the stm8. You can safely delete all the files related to the PIC CPUs in
63+
the `pic*` and `non-free` directories. That safes more than 90% of the used
64+
disk space and leaves only 20MB out of 240MB.
1265

1366

14-
## Linux
1567

16-
Download the lastest snapshot build for SDCC from
17-
http://sdcc.sourceforge.net/snap.php and extract it under `/opt`.
68+
### Linux
1869

19-
mkdir /opt
20-
tar xvjf ~/Downloads/sdcc-snapshot* -C /opt
70+
Link the hardware/sduino folder of the downloaded repository to your local
71+
Arduino hardware folder (usually in `~/sketchbook` or `~/Arduino`). Create
72+
the hardware folder, if not already present:
73+
74+
cd ~/Arduino
75+
mkdir hardware
76+
cd hardware
77+
ln -s [the-extracted-repository]/sduino/hardware/sduino .
78+
79+
Extract the [downloaded SDCC archive](http://sdcc.sourceforge.net/snap.php)
80+
under `/opt`:
2181

22-
`make` is part of the standard repository for any Linux distribution.
23-
Example for Debian-type systems (like Ubuntu, Mint, Elementary etc.):
82+
sudo mkdir /opt
83+
sudo tar xvjf ~/Downloads/sdcc-snapshot* -C /opt
2484

25-
apt-get install make
85+
Create a link to SDCC from the tools directory of the sduino repository:
2686

27-
`stm8flash` is included in the tools directory of this repository. Copy it
28-
to a convient place in your path, e.g. `/usr/local/bin`. To use it you might
29-
need to add a udev rule in order to access the USB port. Save this as root
30-
in in `/etc/udev/rules.d/99-stlink.rules`:
87+
cd [the-extracted-repository]/sduino/hardware/sduino/tools
88+
ln -s /opt/sdcc .
89+
90+
`stm8flash` and `stm8gal` are both included as precompiled binaries in this
91+
tools directory. Create a link `linux` to the linux tools directory that
92+
matches your system and copy the binaries to a convient place in your path,
93+
e.g. `/usr/local/bin`:
94+
95+
ln -s linux64 linux
96+
cp -av linux/* /usr/local/bin
97+
98+
99+
`make` and libusb-1.0 (needed by stm8flash) are part of the standard
100+
repository for any Linux distribution. Example for Debian-type systems (like
101+
Ubuntu, Mint, Elementary etc.):
102+
103+
sudo apt-get install make libusb-1.0-0
104+
105+
Finally, add a udev rule in order to access the USB port for your flash
106+
tool. Save this as root in in `/etc/udev/rules.d/99-stlink.rules`:
31107

32108
# ST-Link/V2 programming adapter
33109

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

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

117+
Using the STM8S-Discovery board as a flash programmer requires a [special
118+
modprobe configuration
119+
entry](hardware/stm8sdiscovery#usage-with-linux-and-stm8flash).
120+
41121

42122

43-
## MacOS
123+
### MacOS
44124

45-
Quite similar. [Install Homebrew](https://brew.sh/) if you haven't done it
46-
yet, than:
125+
Quite similar to the Linux install. [Install Homebrew](https://brew.sh/) if
126+
you haven't done it yet, than install make and unpack the sdcc snapshot:
47127

48128
brew make
49129
mkdir /opt
50130
tar xvjf sdcc-snapshot* -C /opt
51131

52-
Not sure about stm8flash, I didn't try it. Have a look at the
53-
[stm8flash repository](https://github.com/vdudouyt/stm8flash).
132+
Adopt the other steps from the Linux install. The arduino hardware folder is
133+
in your Documents folder at `/Users/<username>/Documents/Arduino/hardware`.
134+
135+
Not sure about stm8flash, I didn't try it. Have a look at the [stm8flash
136+
repository](https://github.com/vdudouyt/stm8flash). It would be great if
137+
someone could summarize the procedure and send it to me together with a
138+
compiled binary for the repository.
139+
140+
54141

142+
### Windows
55143

144+
There is more work to do here, as it is lacking all the tools for the build
145+
system, a package system to install them and even a file system concept
146+
where to store them.
56147

148+
#### SDCC
57149

58-
## Windows
150+
Unpack the downloaded SDCC archive into hardware/sduino/tools.
59151

60-
Harder, but still possible. It is lacking all the tools, a package system to
61-
install them and even a file system concept where to store them. For
62-
convinience, I collected the bare minimum of needed tools in a
63-
[separate repository](https://github.com/tenbaht/sduino-windowstools).
64-
Download it and copy the directory tree into the sduino
65-
directory. Add the sduino/tools/bin directory to your path or move the files
66-
in there to a directory that is already in your path.
152+
#### MinGW
153+
154+
The bare minimum of needed unix-like tools is collected in a [separate
155+
repository](https://github.com/tenbaht/sduino-windowstools). This is used
156+
for building the archive file for the Board Manger based install. Download
157+
it and copy the directory tree into the sduino directory.
158+
159+
160+
#### ST-Link, stm8flash
161+
162+
If not already done, install the ST-Link driver from the ST website for
163+
hardware access.
67164

68165
You are not bound to `stm8flash`, you can use the regular flash tool by ST
69166
as well.
70167

71168

169+
#### Using the Makefile-based build system
72170

73-
### The individual pieces
171+
For IDE based builds you are done now. For use of the Makefile-based build
172+
system you need to update your `%PATH%`:
173+
174+
- Add a link `c:\sdcc` to your SDCC installation directory and add this to
175+
your `%PATH%`.
176+
- Add the `sduino/tools/win` directory to your path or move/copy/link the
177+
files in there to a directory that is already in your path.
74178

75-
All the tools in the convinience package are 32 bit. If you need the 64 bit
76-
versions you might have to collect them yourself.
77179

78-
You need SDCC, `make` with some basic tools and maybe `stm8flash`. Get SDCC
79-
from the project website. `make` is a standard tool included in either
80-
MinGW/Msys or cygwin. Both are fine, MinGW/Msys is smaller. `stm8flash` from
81-
the [stm8flash repository](https://github.com/vdudouyt/stm8flash).
82180

181+
#### The individual pieces
83182

183+
All the tools in the convinience package are 32 bit. If you need the 64 bit
184+
versions you might have to collect them yourself.
84185

85-
#### SDCC
186+
You need `make` with some basic tools and maybe `stm8flash`. `make` is a
187+
standard tool included in either MinGW/Msys or cygwin. Both are fine,
188+
MinGW/Msys is smaller. `stm8flash` from the [stm8flash
189+
repository](https://github.com/vdudouyt/stm8flash).
86190

87-
1. Download the lastest snapshot build from http://sdcc.sourceforge.net/snap.php
88-
2. unzip into c:\sdcc (use a path name without whitespace)
89191

90-
You only need support for the stm8. You can safely delete all the files
91-
related to the pic1x CPUs (that safes more than 90% of the used disk space
92-
and leaves only 20MB out of 240MB)
93192

94193

95194
#### MinGW

0 commit comments

Comments
 (0)