Skip to content

Commit 1248559

Browse files
committed
Move PlatformIO instructions to a separate file
1 parent a23cb9c commit 1248559

File tree

2 files changed

+64
-58
lines changed

2 files changed

+64
-58
lines changed

README.md

+3-58
Original file line numberDiff line numberDiff line change
@@ -48,66 +48,11 @@ python get.py
4848
```
4949
- Restart Arduino
5050

51-
### Using PlatformIO
51+
### Using stable version with PlatformIO
5252

53-
[PlatformIO](http://platformio.org) is a cross-platform code-builder and library manager for embedded development with no external dependencies and support for Espressif platform. Works on the popular host OS: Mac OS X, Windows, Linux 32/64, Linux ARM (like Raspberry Pi, BeagleBone, CubieBoard). More details in documentation [What is PlatformIO? How does it work?](http://docs.platformio.org/en/latest/faq.html#general).
53+
[PlatformIO](http://platformio.org) is a cross-platform code-builder and library manager for embedded development with no external dependencies. Works on the popular host OS: Mac OS X, Windows, Linux 32/64, Linux ARM (like Raspberry Pi, BeagleBone, CubieBoard). More details in documentation [What is PlatformIO? How does it work?](http://docs.platformio.org/en/latest/faq.html#general).
5454

55-
- Install [PlatformIO](http://platformio.org)
56-
- Initialise new project
57-
```bash
58-
#
59-
# Create empty directory
60-
#
61-
mkdir myproject
62-
cd myproject
63-
64-
#
65-
# Find type of supported boards
66-
#
67-
platformio boards espressif
68-
69-
# Platform: espressif
70-
# --------------------------------------------------------------------------------------------------------
71-
# Type MCU Frequency Flash RAM Name
72-
# --------------------------------------------------------------------------------------------------------
73-
# esp01 esp8266 80Mhz 512Kb 32Kb Espressif ESP8266 ESP-01 board
74-
# esp01_1m esp8266 80Mhz 1024Kb 32Kb Espressif ESP8266 ESP-01-1MB board
75-
# esp12e esp8266 80Mhz 4096Kb 32Kb Espressif ESP8266 ESP-12E board (NodeMCU)
76-
# ...
77-
78-
#
79-
# Initialise base project
80-
#
81-
platformio init --board %TYPE%(see above)
82-
83-
# The next files/directories will be created in myproject
84-
# platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|
85-
# src - Put your source files here
86-
# lib - Put here project specific (private) libraries
87-
# Do you want to continue? [y/N]: Y
88-
```
89-
- Place your source code to `src` directory
90-
- Build/Upload project
91-
```
92-
# process/build project
93-
platformio run
94-
95-
# build+upload firmware
96-
platformio run --target upload
97-
98-
# build+upload firmware via OTA
99-
platformio run --target upload --upload-port IP_ADDRESS_HERE
100-
```
101-
102-
### IDE Integration
103-
In addition, PlatformIO [can be integrated into the popular IDEs](http://docs.platformio.org/en/latest/ide.html). For example, initialise project for Espressif ESP8266 ESP-01 board and Eclipse IDE
104-
```
105-
platformio init --board esp01 --ide eclipse
106-
```
107-
Then [import project](http://docs.platformio.org/en/latest/ide/eclipse.html) using `Eclipse Menu: File > Import... > General > Existing Projects into Workspace`.
108-
109-
### Demo of OTA firmware uploading
110-
[![PlatformIO and OTA firmware uploading to Espressif ESP8266 ESP-01](http://img.youtube.com/vi/W8wWjvQ8ZQs/0.jpg)](http://www.youtube.com/watch?v=W8wWjvQ8ZQs "PlatformIO and OTA firmware uploading to Espressif ESP8266 ESP-01")
55+
See [detailed instructions on how to use Espressif platform with PlatformIO](docs/platformio.md).
11156

11257
### Documentation
11358

doc/platformio.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
## Using PlatformIO
2+
3+
- Install [PlatformIO](http://platformio.org)
4+
- Initialise new project
5+
6+
```bash
7+
#
8+
# Create empty directory
9+
#
10+
mkdir myproject
11+
cd myproject
12+
13+
#
14+
# Find type of supported boards
15+
#
16+
platformio boards espressif
17+
18+
# Platform: espressif
19+
# --------------------------------------------------------------------------------------------------------
20+
# Type MCU Frequency Flash RAM Name
21+
# --------------------------------------------------------------------------------------------------------
22+
# esp01 esp8266 80Mhz 512Kb 32Kb Espressif ESP8266 ESP-01 board
23+
# esp01_1m esp8266 80Mhz 1024Kb 32Kb Espressif ESP8266 ESP-01-1MB board
24+
# esp12e esp8266 80Mhz 4096Kb 32Kb Espressif ESP8266 ESP-12E board (NodeMCU)
25+
# ...
26+
27+
#
28+
# Initialise base project
29+
#
30+
platformio init --board %TYPE%(see above)
31+
32+
# The next files/directories will be created in myproject
33+
# platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|
34+
# src - Put your source files here
35+
# lib - Put here project specific (private) libraries
36+
# Do you want to continue? [y/N]: Y
37+
```
38+
39+
- Place your source code to `src` directory
40+
- Build/Upload project
41+
42+
```
43+
# process/build project
44+
platformio run
45+
46+
# build+upload firmware
47+
platformio run --target upload
48+
49+
# build+upload firmware via OTA
50+
platformio run --target upload --upload-port IP_ADDRESS_HERE
51+
```
52+
53+
## IDE Integration
54+
In addition, PlatformIO [can be integrated into the popular IDEs](http://docs.platformio.org/en/latest/ide.html). For example, initialise project for Espressif ESP8266 ESP-01 board and Eclipse IDE
55+
```
56+
platformio init --board esp01 --ide eclipse
57+
```
58+
Then [import project](http://docs.platformio.org/en/latest/ide/eclipse.html) using `Eclipse Menu: File > Import... > General > Existing Projects into Workspace`.
59+
60+
## Demo of OTA firmware uploading
61+
[![PlatformIO and OTA firmware uploading to Espressif ESP8266 ESP-01](http://img.youtube.com/vi/W8wWjvQ8ZQs/0.jpg)](http://www.youtube.com/watch?v=W8wWjvQ8ZQs "PlatformIO and OTA firmware uploading to Espressif ESP8266 ESP-01")

0 commit comments

Comments
 (0)