Skip to content

Commit 4abfd97

Browse files
committed
restructuring the installation instructions, using msys2
1 parent bd43343 commit 4abfd97

5 files changed

Lines changed: 193 additions & 254 deletions

File tree

README.md

Lines changed: 63 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,108 @@
1-
## Sduino: Small Devices Arduino
1+
# Sduino: Small Devices Arduino
22

3-
Getting started on the STM8 CPU the easy way by using an Arduino-like
4-
programming API.
3+
**Getting started on the STM8 the easy way.**
54

6-
It fully integrates with the Arduino IDE or it can be used
7-
independently (GUI-less) with very easy Makefiles based on the amazing
8-
[Arduino.mk makefile](https://github.com/sudar/Arduino-Makefile) by
9-
[Sudar](http://sudarmuthu.com>).
5+
An Arduino-like programming API that can be used from within the Arduino IDE
6+
or for Makefile-controlled builds.
107

11-
This project is based on free tools that are available for Linux, MacOS, and
12-
Windows: SDCC, make, and stm8flash. Since it's based on the SDCC Small
13-
Devices C compiler, I called it "Small Devices -uino" or "Small-duino".
8+
* [Project website](https://tenbaht.github.io/sduino/) for more
9+
information on supported hardware and the programming API
10+
11+
* [github issue tracker](https://github.com/tenbaht/sduino/issues) for bug
12+
reports and other issues tightly related to the repository content
13+
14+
* The [STM8 board](http://stm32duino.com/viewforum.php?f=52) of the
15+
stm32duino forum: For general discussions and suggestions
16+
17+
Since this project is based on the SDCC Small Devices C compiler, I called
18+
it "Small Devices -uino" or "Small-duino". It is entirely based on free
19+
tools that are available for Linux, MacOS, and Windows: SDCC, make, and
20+
stm8flash.
1421

1522
This project is not supposed to be “better than Arduino”. It’s purpose
1623
is to give you a head start into a different CPU architecture if you happen
1724
to have a professional need or a private desire for it.
1825

19-
Please find more detailed information about the supported boards, the needed
20-
tools and the library APIs on the
21-
[project website](https://tenbaht.github.io/sduino/).
22-
23-
For bug reports and other issues tightly related to the repository content
24-
please use the
25-
[github issue tracker](https://github.com/tenbaht/sduino/issues).
26-
27-
For general discussions and suggestions on Sduino it might be more
28-
convinient to open a thread on the
29-
[STM8 board](http://stm32duino.com/viewforum.php?f=52) of the stm32duino
30-
forum. It will help to catch my attention to prefix your topic with
31-
"[sduino]".
3226

3327

3428
## Installation
3529

3630
Starting with version 0.3.0 automatic IDE integration is supported via the
3731
Arduino Boards Manager. This is the recommanded way of installation now. For
38-
a manual non-IDE installation please check the full [installation
39-
instructions](https://tenbaht.github.io/sduino/install/).
40-
41-
Arduino IDE versions 1.8.5 and 1.6.13 are tested, but any version >=1.6.6
42-
should work.
43-
44-
Supported Systems:
45-
46-
* Linux 64 bit: Tested on Ubuntu 16.04
47-
* Linux 32 bit: Tested on Ubuntu 16.04
48-
* Windows: Tested on Windows 7. Sduino might work on XP (not tested), but
49-
the ST-Link/V2 driver is not available anymore for XP.
50-
* MacOS: Not tested, but should be very close to working. Will need a manual
51-
install, but IDE integration should be easy now. Any volunteers?
52-
53-
Start the Arduino-IDE. In File->Preferences, Settings tab, enter
54-
55-
https://github.com/tenbaht/sduino/raw/master/package_sduino_stm8_index.json
56-
57-
as an Additional Boards Manager URL.
32+
a manual non-IDE installation please check the [manual installation
33+
instructions](https://tenbaht.github.io/sduino/usage/manual-install/).
5834

59-
Open Tools->Board:...->Boards Manager. Find Sduino by typing 'sd' into
60-
the search line. Click on the list entry, Click on Install.
35+
Start the Arduino-IDE. In *File->Preferences*, *Settings* tab, enter
6136

62-
Now you should find a new entry "STM8S Boards" in the list at
63-
Tools->Board:... Choose *STM8S103F3 Breakout Board* from the list, open the
64-
standard Blink example from File->Examples->01. Basics->Blink and compile it
65-
by hitting 'Verify'.
37+
> https://github.com/tenbaht/sduino/raw/master/package_sduino_stm8_index.json
6638
39+
as an *Additional Boards Manager URL*.
6740

41+
* Open *Tools->Board:...->Boards Manager*
42+
* Find Sduino by typing 'sd' into the search line
43+
* Click on the list entry
44+
* Click on *Install*.
6845

69-
### Uploading to the board
46+
Now you should find a new entry *STM8S Boards* in the list at
47+
*Tools->Board:...*
7048

71-
To upload the compiled sketch to the hardware you need an ST-Link/V2
72-
compatible flash programmer. They are very cheap, starting at $2.50 on
73-
Aliexpress or eBay.
49+
* Choose *STM8S103F3 Breakout Board* from the list
50+
* open the standard Blink example from *File->Examples->01. Basics->Blink*
51+
* compile it by hitting *Verify*
7452

75-
#### ST-Link/V2 for Linux
7653

77-
Required lines in /etc/udev/rules.d/99-stlink.rules:
54+
## Included libraries
7855

79-
# ST-Link/V2 programming adapter
56+
Most parts of the Arduino core system and some Arduino libraries are already
57+
ported to C-syntax. The resulting API is still very close to the C++ version
58+
and porting an existing application is not hard. Check out the [migration
59+
guide](https://tenbaht.github.io/sduino/api/migration/) for details.
8060

81-
# ST-Link V1, ST-Discovery boards
82-
ATTR{idVendor}=="0483", ATTR{idProduct}=="3744", MODE="0666", GROUP="pl
8361

84-
# ST-Link/V2, the china adapter with the green plastic housing
85-
ATTR{idVendor}=="0483", ATTR{idProduct}=="3748", MODE="0666", GROUP="pl
62+
#### Communication
8663

64+
* SPI: Real hardware-SPI up to 10MHz.
65+
* I2C: Port of the I2C master library by Wayne Truchsess
66+
* HardwareSerial: The standard serial interface.
8767

68+
#### Displays
8869

89-
#### ST-Link/V2 for Windows
70+
* LiquidCrystal: HD44780 based text LCDs
71+
* PCD8544: Monochrome graphical LCD based on the PCD8544 controller like the
72+
Nokia 5110 display. SPI mode only.
73+
* Mini_SSD1306: SSD1306-based monochrome OLED displays with 128x64 pixels.
74+
I2C support only.
9075

91-
Download and install the ST-Link/v2 driver **before you plug in the flash
92-
tool**: [STSW-LINK009 driver download]
93-
(http://www.st.com/en/development-tools/stsw-link009.html) (Registration
94-
required, but very easy)
76+
#### Motor control
9577

96-
97-
#### Serial upload
98-
99-
Most larger STM8 CPUs (unfortunately not the popular STM8S103) even come
100-
with a builtin bootloader. Support for programming via a simple serial
101-
adapter for these devices is planned, but not implemented yet.
78+
* Stepper: Stepper motors with 2, 4 or 5 phases.
79+
* Servo: Up to 12 servos using only 1 timer.
10280

10381

10482

10583
## Compatibility with the Arduino world
10684

107-
Unfortunatly there is no free C++ compiler for the STM8. This makes it
108-
impossible to do a full 1:1 port of the whole enviroment as is has been done
109-
for the STM32 and the ESP8266.
85+
Since there is no free C++ for the STM8, it is impossible to do a full 1:1
86+
port of the whole enviroment as is has been done for the STM32 and the
87+
ESP8266.
11088

11189
This is not a drop-in replacement for an AVR, but thanks to some C
11290
preprocessor magic the programming API is still very, very similar and it is
11391
often enough to just move over the opening bracket of the class
11492
instanciation statement and to replace the dot in a method call for an
115-
underscore.
93+
underscore. Check the [migration
94+
guide](https://tenbaht.github.io/sduino/api/migration/) for an overview.
11695

11796

11897

119-
## Library support
98+
## Supported Systems:
12099

121-
The most important libraries and parts of the Arduino core system are
122-
ported for the STM8 already: analog input and output, digital input and
123-
output, delay(), millis(), Serial, SPI, and I2C.
124-
125-
There are ported versions of the standard libraries Servo, Stepper, and
126-
LiquidCrystal for motor control and the popular text LCDs based on the
127-
HD44780 controller.
100+
Arduino IDE versions 1.8.5 and 1.6.13 are tested, but any version >=1.6.6
101+
should work.
128102

129-
For more sophisticated output there are libraries for Nokia-5110-type
130-
graphical LCDs and SSD1306-based graphical OLED displays.
103+
* Linux 64 bit: Tested on Ubuntu 16.04
104+
* Linux 32 bit: Tested on Ubuntu 16.04
105+
* Windows: Tested on Windows 7. Sduino might work on XP (not tested), but
106+
the ST-Link/V2 driver is not available anymore for XP.
107+
* MacOS: Not tested, but should be very close to working. Will need a manual
108+
install, but IDE integration should be easy now. Any volunteers?

docs/usage/board-manager-install.md

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,8 @@ Wasn't too hard, was it?
2424

2525

2626

27-
## More flexible ways of installation
28-
29-
There are two other ways to install Sduino: [Updating to a manual
30-
installation](update-to-manual) or a [fully manual
31-
installation](manual-install).
32-
33-
The Arduino Board Manager is now the recommended way of installation. If you
34-
outgrow it's possibilities it is easy to [update to the manual
35-
install](update-to-manual). The manual install gives you more flexibility,
36-
but is only useful if you are planning to use development or experimental
37-
branches of Sduino or if you prefer a GUI-less build system controlled by a
38-
Makefile.
39-
40-
Let's compare the alternatives:
41-
42-
43-
| | Board Manager |[update to manual install](update-to-manual)|[full manual install](manual-install)
44-
|---- |----- |---- |------
45-
|Difficulty (Windows) |very easy |fair |advanced
46-
|Difficulty (Linux, MacOS)|very easy |easy |easy
47-
|Used Packages |releases only |flexible |flexible
48-
|IDE/GUI based builds|yes |yes |yes
49-
|Makefile based builds|no |yes |yes
50-
|Compiling without Arduino libraries|no |yes |yes
27+
## Manual install
5128

29+
Only if you prefer a Makefile based build over using the Arduino IDE or if
30+
you would like to help with the development of Sduino you will have to do a
31+
[manual installation](manual-install.md) instead.

0 commit comments

Comments
 (0)