Compare commits
524 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4627ec9ac | ||
|
|
7de9109437 | ||
|
|
e0f2bcdeaf | ||
|
|
ae92cdedea | ||
|
|
21c60fdd99 | ||
|
|
7756504c92 | ||
|
|
386ad9a94b | ||
|
|
6f19839920 | ||
|
|
442da36115 | ||
|
|
4d5c125d82 | ||
|
|
c55f4d35ba | ||
|
|
abf0f2d5d6 | ||
|
|
8e62d9ace3 | ||
|
|
7d63d6c77c | ||
|
|
148018749a | ||
|
|
f058506bc4 | ||
|
|
3a45d443a1 | ||
|
|
beb68fa836 | ||
|
|
8b9b978db0 | ||
|
|
6dddf77774 | ||
|
|
c4967243dc | ||
|
|
637a43d6f4 | ||
|
|
ce4ce67607 | ||
|
|
f3f0979f92 | ||
|
|
05b722faa1 | ||
|
|
a1c7fa9092 | ||
|
|
aba68a9c3f | ||
|
|
35ccefae87 | ||
|
|
4168fb6dcb | ||
|
|
6d8d87dfbc | ||
|
|
8bc8bdd6bd | ||
|
|
0102e7e195 | ||
|
|
fbd3d956f7 | ||
|
|
cd764d4b10 | ||
|
|
03636ad4ae | ||
|
|
e90e641941 | ||
|
|
7a311ff503 | ||
|
|
7c0b187ca0 | ||
|
|
e2f079fc1b | ||
|
|
f12611e27c | ||
|
|
9562e2456b | ||
|
|
fedb7527f4 | ||
|
|
d142b6e6d1 | ||
|
|
7948237c94 | ||
|
|
a18e151fa4 | ||
|
|
1fc85d3d1d | ||
|
|
7accb86ece | ||
|
|
73af0eed3c | ||
|
|
9bde156294 | ||
|
|
6f634e76e7 | ||
|
|
b60552e264 | ||
|
|
6d86f72060 | ||
|
|
eceedb879b | ||
|
|
d90933d014 | ||
|
|
efb02aa056 | ||
|
|
d28430d8ae | ||
|
|
90f17ce6fb | ||
|
|
aa578fd8ec | ||
|
|
45e8251479 | ||
|
|
aab282061c | ||
|
|
b79d1944f2 | ||
|
|
f3251342b4 | ||
|
|
6a42e1de90 | ||
|
|
0487825e94 | ||
|
|
dcb1590e57 | ||
|
|
6e0ebdbc94 | ||
|
|
2ac6d63ffc | ||
|
|
d1ca17c406 | ||
|
|
f86a33c991 | ||
|
|
46ae4c1a83 | ||
|
|
e17ce83499 | ||
|
|
a4926f3c28 | ||
|
|
06b009deaa | ||
|
|
5b9504d57a | ||
|
|
05376f873d | ||
|
|
bf059b8b78 | ||
|
|
620e5e81c7 | ||
|
|
18dd64df88 | ||
|
|
4da8630578 | ||
|
|
442adc1919 | ||
|
|
751a4b9883 | ||
|
|
6e820afd74 | ||
|
|
0d7d2ce0b4 | ||
|
|
9a8abaf02b | ||
|
|
a394db1ce1 | ||
|
|
2d53d2100d | ||
|
|
1fc6b222ec | ||
|
|
3f2faeea82 | ||
|
|
a1a5995210 | ||
|
|
9a17c6870b | ||
|
|
baf34b37d9 | ||
|
|
d02eb97eeb | ||
|
|
8baf2ce241 | ||
|
|
239e1f3fe9 | ||
|
|
8374199fae | ||
|
|
591efc7257 | ||
|
|
717d8596ec | ||
|
|
9501329526 | ||
|
|
86260a48ba | ||
|
|
eb4756360a | ||
|
|
256834be48 | ||
|
|
460e896b8f | ||
|
|
ade673d546 | ||
|
|
ed5e843893 | ||
|
|
a03d2382af | ||
|
|
870ce7e0a2 | ||
|
|
69d952ea65 | ||
|
|
0d2d6cc17e | ||
|
|
be6cdc09d9 | ||
|
|
63c92152d9 | ||
|
|
c9ed663ec5 | ||
|
|
45e7fcd106 | ||
|
|
3f05146de8 | ||
|
|
9a9b2d8bae | ||
|
|
639ee9fc47 | ||
|
|
fc7e09b8c4 | ||
|
|
79d3ad245f | ||
|
|
ca266e81ef | ||
|
|
2b924d1573 | ||
|
|
00e95dbabc | ||
|
|
983b629d23 | ||
|
|
0f070d1b78 | ||
|
|
dc61722907 | ||
|
|
83dfcf6ac2 | ||
|
|
5a32f88dee | ||
|
|
9914fc1122 | ||
|
|
beab1525a9 | ||
|
|
c6b79f13c3 | ||
|
|
22257e0351 | ||
|
|
030eddb244 | ||
|
|
0047c79fcd | ||
|
|
cf925b0338 | ||
|
|
2093960719 | ||
|
|
8fffc5ee9c | ||
|
|
88f0b51312 | ||
|
|
2bfb1d5569 | ||
|
|
7a3b43040f | ||
|
|
d2ccbf7b7a | ||
|
|
55ad753bf1 | ||
|
|
efcb205116 | ||
|
|
7470fd3fdd | ||
|
|
102e3f98de | ||
|
|
b55dc0917d | ||
|
|
061d7af2ed | ||
|
|
ae50b9212f | ||
|
|
2e90ab8092 | ||
|
|
f186488fc3 | ||
|
|
1a94952b20 | ||
|
|
2c1a864390 | ||
|
|
7f258a3f4c | ||
|
|
b57375b8af | ||
|
|
3bfe2914f5 | ||
|
|
ac14103870 | ||
|
|
68db70e6bb | ||
|
|
67f1e32652 | ||
|
|
3525c3cca0 | ||
|
|
302d1eb15c | ||
|
|
bea577beb9 | ||
|
|
7f2e6a02f0 | ||
|
|
f9ec259742 | ||
|
|
3179e90aea | ||
|
|
80002dc85c | ||
|
|
fa44827bff | ||
|
|
dd18b49604 | ||
|
|
7bad31c532 | ||
|
|
42caf7865c | ||
|
|
d76f0bef77 | ||
|
|
821ede1d23 | ||
|
|
0e46dc2222 | ||
|
|
121f66b2a1 | ||
|
|
d1a2570283 | ||
|
|
3a7dec1463 | ||
|
|
42f05979e3 | ||
|
|
86b6b6886b | ||
|
|
e18552dadc | ||
|
|
c62bd88963 | ||
|
|
cf2a7af7e3 | ||
|
|
b289d0ba42 | ||
|
|
d7405c44ca | ||
|
|
2bce970809 | ||
|
|
ebd2e31efe | ||
|
|
34f7b8b19a | ||
|
|
184df4d5bb | ||
|
|
25380a7e98 | ||
|
|
fcf4b0d303 | ||
|
|
70839abf88 | ||
|
|
8a3ad923e1 | ||
|
|
15416a9447 | ||
|
|
14355cb7d4 | ||
|
|
7cdb8b0c7d | ||
|
|
6fac35fced | ||
|
|
2280c01dc7 | ||
|
|
3f062f72a2 | ||
|
|
2ab49d7f24 | ||
|
|
9a221085d4 | ||
|
|
9721172481 | ||
|
|
a884db0825 | ||
|
|
5a13454244 | ||
|
|
dc341f9350 | ||
|
|
a9781293f9 | ||
|
|
2a84aec59e | ||
|
|
68cec0448e | ||
|
|
2487dab7eb | ||
|
|
423dc248bc | ||
|
|
c402cc7c62 | ||
|
|
4a5b6fc190 | ||
|
|
f176fe759d | ||
|
|
3442b11b3d | ||
|
|
2c51c2928a | ||
|
|
6acc183111 | ||
|
|
ab27592e5d | ||
|
|
85afbdb8a7 | ||
|
|
c05418f47e | ||
|
|
d57cc7b156 | ||
|
|
eeb58da1cb | ||
|
|
cf823c471d | ||
|
|
2227267ff6 | ||
|
|
9e36975d5f | ||
|
|
297f132a0c | ||
|
|
8b3979c993 | ||
|
|
a9b98afa42 | ||
|
|
9bd4047425 | ||
|
|
666c6c70ca | ||
|
|
a7fc184662 | ||
|
|
673c484fa7 | ||
|
|
977f30d617 | ||
|
|
49b7cf6008 | ||
|
|
4bb513e460 | ||
|
|
8926e27c46 | ||
|
|
63870fd825 | ||
|
|
f06cbebf63 | ||
|
|
6e93806b12 | ||
|
|
00f75c753d | ||
|
|
8c253137a7 | ||
|
|
fc7bbc3f20 | ||
|
|
0aea0ec1ed | ||
|
|
1921164ba3 | ||
|
|
d5a7fcf75f | ||
|
|
1ae23085d4 | ||
|
|
d2ad023b52 | ||
|
|
abd6ff9145 | ||
|
|
93273e922f | ||
|
|
ef76822773 | ||
|
|
87e1b09088 | ||
|
|
f84b113b5e | ||
|
|
c71026d135 | ||
|
|
c452302735 | ||
|
|
04726fd871 | ||
|
|
2820e5a243 | ||
|
|
5dee9ae4ef | ||
|
|
ccb0a6262d | ||
|
|
8baae82b35 | ||
|
|
e8b87a0168 | ||
|
|
c8c1c7a83f | ||
|
|
e8746232f6 | ||
|
|
dcf325f64e | ||
|
|
2672f2c7f6 | ||
|
|
09493ce196 | ||
|
|
78575f12d5 | ||
|
|
be224d2d8a | ||
|
|
4b7a7d0cf0 | ||
|
|
8c53cf1d3c | ||
|
|
09159c3ac0 | ||
|
|
0f1cd87deb | ||
|
|
e0cb0003dc | ||
|
|
23017a22ec | ||
|
|
6c86bb4167 | ||
|
|
ca31230928 | ||
|
|
01f8795981 | ||
|
|
2566879a99 | ||
|
|
418b693fe0 | ||
|
|
8686936a07 | ||
|
|
79b8e6c24e | ||
|
|
8c2dd44f44 | ||
|
|
f172019edc | ||
|
|
44bf3e8479 | ||
|
|
17d6c02d83 | ||
|
|
bd6a57095a | ||
|
|
68733a447a | ||
|
|
1fb0644f51 | ||
|
|
c74d10b2e3 | ||
|
|
95582d16a6 | ||
|
|
e8628443f0 | ||
|
|
af191834d1 | ||
|
|
82744afe58 | ||
|
|
c109857707 | ||
|
|
740f609ca8 | ||
|
|
1b7065d8c1 | ||
|
|
f78f5b454b | ||
|
|
c3686b4098 | ||
|
|
9cfa4e40d0 | ||
|
|
4a5903849e | ||
|
|
200944ebb3 | ||
|
|
7af9f50426 | ||
|
|
fe60369b6a | ||
|
|
15acca7b57 | ||
|
|
2aa4d0af33 | ||
|
|
01bbfcced0 | ||
|
|
65895e658f | ||
|
|
0241d65460 | ||
|
|
060e1764cb | ||
|
|
9dcc774bfd | ||
|
|
11b26b3730 | ||
|
|
d9a7537d5d | ||
|
|
d68937afe0 | ||
|
|
43441a431e | ||
|
|
9e4618ca7e | ||
|
|
69cde35fb7 | ||
|
|
ac02348833 | ||
|
|
311c07e857 | ||
|
|
34c0ccb29f | ||
|
|
efac8ec940 | ||
|
|
4f56bf66db | ||
|
|
3157ceaa47 | ||
|
|
2b2ceb60cc | ||
|
|
4f3c4e0901 | ||
|
|
5442ee459d | ||
|
|
63dcb5586c | ||
|
|
e521a691ae | ||
|
|
b653aca20f | ||
|
|
e0120bc86e | ||
|
|
0dff38fcdd | ||
|
|
d8863d1861 | ||
|
|
8596d271a2 | ||
|
|
affb47b82e | ||
|
|
61e07fe169 | ||
|
|
caf6746e89 | ||
|
|
f1f6817615 | ||
|
|
06f4e5c835 | ||
|
|
0aeb2e89de | ||
|
|
d1513169fc | ||
|
|
2af34821aa | ||
|
|
e1ad6072dd | ||
|
|
c69c889a26 | ||
|
|
2be4bc4817 | ||
|
|
32d422bd97 | ||
|
|
be0eb901db | ||
|
|
ce1b32e4e9 | ||
|
|
e2a4f48953 | ||
|
|
2bc68df958 | ||
|
|
ba00ee20c2 | ||
|
|
107a849f88 | ||
|
|
ddab7046ca | ||
|
|
e49d4e2722 | ||
|
|
3c9e809b58 | ||
|
|
a82d09e816 | ||
|
|
6b9cbde8eb | ||
|
|
22297b9cfd | ||
|
|
d8837e4756 | ||
|
|
bcfb007c90 | ||
|
|
33d87367e7 | ||
|
|
257f751dfa | ||
|
|
e41226fcbc | ||
|
|
4efb798371 | ||
|
|
f8f47886d3 | ||
|
|
dec78d29e8 | ||
|
|
102175215c | ||
|
|
cd2cc16fcf | ||
|
|
b103dc01c0 | ||
|
|
f8ed09c3ad | ||
|
|
7f918da87d | ||
|
|
32230c6b60 | ||
|
|
d8b00eef97 | ||
|
|
2b1b64c5c1 | ||
|
|
145fcb63e2 | ||
|
|
6748fb974b | ||
|
|
da234bf228 | ||
|
|
c821cdefa4 | ||
|
|
7eb86305d4 | ||
|
|
66b5299b56 | ||
|
|
fcd0528a9e | ||
|
|
99929d7fa6 | ||
|
|
6c7be9b339 | ||
|
|
73004d0ad8 | ||
|
|
c867f9a90a | ||
|
|
7f7620a08c | ||
|
|
416bf8e7af | ||
|
|
b3eebf717d | ||
|
|
baef85aed1 | ||
|
|
2d6c0ef66d | ||
|
|
4f817a5b61 | ||
|
|
01d415cc7f | ||
|
|
d13bf3325b | ||
|
|
0e62ad1600 | ||
|
|
700c6c9b3e | ||
|
|
ac02703f5f | ||
|
|
1f80b6746e | ||
|
|
9f87342e30 | ||
|
|
13d6616b55 | ||
|
|
81700523ed | ||
|
|
7f1827f1e5 | ||
|
|
8d491b4146 | ||
|
|
0ea57b8bca | ||
|
|
466026b5c6 | ||
|
|
c90ef9919b | ||
|
|
8649114546 | ||
|
|
dcfa899520 | ||
|
|
2e03d27d27 | ||
|
|
9ead140b6e | ||
|
|
719e03da16 | ||
|
|
6a775f3951 | ||
|
|
7de5166694 | ||
|
|
907a72d3bd | ||
|
|
024be2e094 | ||
|
|
1c4b97c2f2 | ||
|
|
2a7e67b8e4 | ||
|
|
09761004dd | ||
|
|
6404b02a5d | ||
|
|
766bc44b23 | ||
|
|
c14dbb5ef1 | ||
|
|
9c2dbf73f3 | ||
|
|
c0c3c8efcd | ||
|
|
24ec2dc9e4 | ||
|
|
97a42a357a | ||
|
|
2dddbfc074 | ||
|
|
f77c195f3d | ||
|
|
70493a7721 | ||
|
|
1e1fac2fc1 | ||
|
|
fbe014f687 | ||
|
|
fd2571da04 | ||
|
|
813c818477 | ||
|
|
c4b28ab252 | ||
|
|
ac66f62262 | ||
|
|
727ec2f4dc | ||
|
|
995a25478b | ||
|
|
5fa265374c | ||
|
|
369622f3fb | ||
|
|
6fdc47beda | ||
|
|
f316308860 | ||
|
|
2ac4b9a590 | ||
|
|
23bc5188b3 | ||
|
|
1631770b85 | ||
|
|
849a49f665 | ||
|
|
be710cefd8 | ||
|
|
a98dc5bc29 | ||
|
|
46fb576c9d | ||
|
|
b370d38192 | ||
|
|
716ff3df86 | ||
|
|
c784c7ab47 | ||
|
|
bac0a5ebb1 | ||
|
|
3c030edc38 | ||
|
|
35e7c8b3a7 | ||
|
|
855df959ee | ||
|
|
3d179fe1a7 | ||
|
|
69b73935d0 | ||
|
|
a7bc72aa41 | ||
|
|
5f539fdf7b | ||
|
|
78bf6c0e23 | ||
|
|
768eea8a6d | ||
|
|
e4ba030a0c | ||
|
|
ad6acb28ae | ||
|
|
63d9914652 | ||
|
|
c41be4b294 | ||
|
|
9cec1069d6 | ||
|
|
1b359b7587 | ||
|
|
80e21f61d3 | ||
|
|
0323fe7b90 | ||
|
|
e48c6744ed | ||
|
|
fcef78ed0d | ||
|
|
fbab527ed3 | ||
|
|
7bee016a7e | ||
|
|
c496b736ea | ||
|
|
1fb8c5dcab | ||
|
|
2f79b604c7 | ||
|
|
628cf3b652 | ||
|
|
71c66b9171 | ||
|
|
a14a724836 | ||
|
|
f83e052ea2 | ||
|
|
8961c2fad4 | ||
|
|
7af95ab897 | ||
|
|
9a99409ae1 | ||
|
|
62ccafde23 | ||
|
|
75c50ef213 | ||
|
|
05908dc882 | ||
|
|
94faec9827 | ||
|
|
26e70ad2f9 | ||
|
|
a2a13039ba | ||
|
|
6239b9d22a | ||
|
|
47b8d32bbf | ||
|
|
8e4520d6e0 | ||
|
|
de37cc0518 | ||
|
|
8c452851d2 | ||
|
|
3d680e5351 | ||
|
|
f7a4ee0d66 | ||
|
|
2534db8c0e | ||
|
|
f006561113 | ||
|
|
8b056efe64 | ||
|
|
a287d53520 | ||
|
|
00e51558db | ||
|
|
1b75d3e461 | ||
|
|
47edfdb043 | ||
|
|
ce0c1f9f4a | ||
|
|
eccba803b2 | ||
|
|
1b2339c3bd | ||
|
|
3f03143e5e | ||
|
|
693191770b | ||
|
|
94cb62e4d9 | ||
|
|
771261e298 | ||
|
|
3bd1fe51ab | ||
|
|
e81723f73c | ||
|
|
c4d2dc6267 | ||
|
|
ffa3d3f2f1 | ||
|
|
3125c8485b | ||
|
|
dac83d6164 | ||
|
|
02d7aa1e1e | ||
|
|
14c2e606e5 | ||
|
|
529a4c2d34 | ||
|
|
3a6a48aa22 | ||
|
|
e1b205c95a | ||
|
|
ec39cfeb90 | ||
|
|
02fe590dc4 | ||
|
|
bd47f44c1f | ||
|
|
202e2e0af5 | ||
|
|
3c70babde4 | ||
|
|
c0da671efe | ||
|
|
b41d453eec | ||
|
|
015436eb63 | ||
|
|
73a84cb86a | ||
|
|
5fa2732e02 | ||
|
|
586868b2db | ||
|
|
dc94820b48 | ||
|
|
a8112c2f37 | ||
|
|
ea71a24e6d | ||
|
|
a4fb655403 |
2
.gitignore
vendored
@@ -5,3 +5,5 @@
|
||||
.sconsign.dblite
|
||||
examples/ide-eclipse/.metadata
|
||||
examples/ide-eclipse/RemoteSystemsTempFiles
|
||||
docs/_build
|
||||
dist
|
||||
|
||||
6
.gitmodules
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
[submodule "examples/atmelavr-and-arduino/arduino-external-libs/lib/Adafruit-PCD8544-Nokia-5110-LCD-library"]
|
||||
path = examples/atmelavr-and-arduino/arduino-external-libs/lib/Adafruit-PCD8544-Nokia-5110-LCD-library
|
||||
url = https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library.git
|
||||
[submodule "examples/atmelavr-and-arduino/arduino-external-libs/lib/Adafruit-GFX-Library"]
|
||||
path = examples/atmelavr-and-arduino/arduino-external-libs/lib/Adafruit-GFX-Library
|
||||
url = https://github.com/adafruit/Adafruit-GFX-Library.git
|
||||
@@ -38,7 +38,7 @@ load-plugins=
|
||||
# --enable=similarities". If you want to run only the classes checker, but have
|
||||
# no Warning level messages displayed, use"--disable=all --enable=classes
|
||||
# --disable=W"
|
||||
disable=C0103,C0111,E0611,F0401,I0011,R0801,R0903
|
||||
disable=C0103,C0111,E0611,F0401,I0011,R0801,R0903,R0922
|
||||
|
||||
|
||||
[REPORTS]
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.platformio
|
||||
|
||||
language: python
|
||||
python: 2.7
|
||||
python:
|
||||
- "2.7"
|
||||
|
||||
env:
|
||||
- TOX_ENV=docs
|
||||
- TOX_ENV=lint
|
||||
- TOX_ENV=py26
|
||||
- TOX_ENV=py27
|
||||
|
||||
install:
|
||||
- pip install tox
|
||||
|
||||
250
HISTORY.rst
@@ -1,6 +1,254 @@
|
||||
Release History
|
||||
===============
|
||||
|
||||
1.1.0 (2015-03-05)
|
||||
------------------
|
||||
|
||||
* Implemented ``PLATFORMIO_*`` environment variables
|
||||
(`issue #102 <https://github.com/ivankravets/platformio/issues/102>`_)
|
||||
* Added support for *SainSmart* boards to
|
||||
`atmelsam <http://docs.platformio.org/en/latest/platforms/atmelsam.html#boards>`__
|
||||
development platform
|
||||
* Added
|
||||
`Project Configuration <http://docs.platformio.org/en/latest/projectconf.html>`__
|
||||
option named `envs_dir <http://docs.platformio.org/en/latest/projectconf.html#envs-dir>`__
|
||||
* Disabled "prompts" automatically for *Continuous Integration* systems
|
||||
(`issue #103 <https://github.com/ivankravets/platformio/issues/103>`_)
|
||||
* Fixed firmware uploading for
|
||||
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html#boards>`__
|
||||
boards which work within ``usbtiny`` protocol
|
||||
* Fixed uploading for *Digispark* board (`issue #106 <https://github.com/ivankravets/platformio/issues/106>`_)
|
||||
|
||||
1.0.1 (2015-02-27)
|
||||
------------------
|
||||
|
||||
**PlatformIO 1.0 - recommended for production**
|
||||
|
||||
* Changed development status from ``beta`` to ``Production/Stable``
|
||||
* Added support for *ARM*-based credit-card computers:
|
||||
`Raspberry Pi <http://www.raspberrypi.org>`_,
|
||||
`BeagleBone <http://beagleboard.org>`_ and `CubieBoard <http://cubieboard.org>`_
|
||||
* Added `atmelsam <http://docs.platformio.org/en/latest/platforms/atmelsam.html>`_
|
||||
development platform with supported boards: *Arduino Due and Digistump DigiX*
|
||||
(`issue #71 <https://github.com/ivankravets/platformio/issues/71>`_)
|
||||
* Added `stm32 <http://docs.platformio.org/en/latest/platforms/stm32.html>`_
|
||||
development platform with supported boards: *Discovery kit for STM32L151/152,
|
||||
STM32F303xx, STM32F407/417 lines* and `libOpenCM3 Framework <http://www.libopencm3.org>`_
|
||||
(`issue #73 <https://github.com/ivankravets/platformio/issues/73>`_)
|
||||
* Added `teensy <http://docs.platformio.org/en/latest/platforms/teensy.html>`_
|
||||
development platform with supported boards: *Teensy 2.x & 3.x*
|
||||
(`issue #72 <https://github.com/ivankravets/platformio/issues/72>`_)
|
||||
* Added new *Arduino* boards to
|
||||
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html#boards>`__
|
||||
platform: *Arduino NG, Arduino BT, Arduino Esplora, Arduino Ethernet,
|
||||
Arduino Robot Control, Arduino Robot Motor and Arduino Yun*
|
||||
* Added support for *Adafruit* boards to
|
||||
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html#boards>`__
|
||||
platform: *Adafruit Flora and Adafruit Trinkets*
|
||||
(`issue #65 <https://github.com/ivankravets/platformio/issues/65>`_)
|
||||
* Added support for *Digispark* boards to
|
||||
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html#boards>`__
|
||||
platform: *Digispark USB Development Board and Digispark Pro*
|
||||
(`issue #47 <https://github.com/ivankravets/platformio/issues/47>`_)
|
||||
* Covered code with tests (`issue #2 <https://github.com/ivankravets/platformio/issues/2>`_)
|
||||
* Refactored *Library Dependency Finder* (issues
|
||||
`#48 <https://github.com/ivankravets/platformio/issues/48>`_,
|
||||
`#50 <https://github.com/ivankravets/platformio/issues/50>`_,
|
||||
`#55 <https://github.com/ivankravets/platformio/pull/55>`_)
|
||||
* Added `src_dir <http://docs.platformio.org/en/latest/projectconf.html#src-dir>`__
|
||||
option to ``[platformio]`` section of
|
||||
`platformio.ini <http://docs.platformio.org/en/latest/projectconf.html>`__
|
||||
which allows to redefine location to project's source directory
|
||||
(`issue #83 <https://github.com/ivankravets/platformio/issues/83>`_)
|
||||
* Added ``--json-output`` option to
|
||||
`platformio boards <http://docs.platformio.org/en/latest/userguide/cmd_boards.html>`__
|
||||
and `platformio search <http://docs.platformio.org/en/latest/userguide/cmd_search.html>`__
|
||||
commands which allows to return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
|
||||
(`issue #42 <https://github.com/ivankravets/platformio/issues/42>`_)
|
||||
* Allowed to ignore some libs from *Library Dependency Finder* via
|
||||
`ignore_libs <http://docs.platformio.org/en/latest/projectconf.html#ignore-libs>`_ option
|
||||
* Improved `platformio run <http://docs.platformio.org/en/latest/userguide/cmd_run.html>`__
|
||||
command: asynchronous output for build process, timing and detailed
|
||||
information about environment configuration
|
||||
(`issue #74 <https://github.com/ivankravets/platformio/issues/74>`_)
|
||||
* Output compiled size and static memory usage with
|
||||
`platformio run <http://docs.platformio.org/en/latest/userguide/cmd_run.html>`__
|
||||
command (`issue #59 <https://github.com/ivankravets/platformio/issues/59>`_)
|
||||
* Updated `framework-arduino` AVR & SAM to 1.6 stable version
|
||||
* Fixed an issue with the libraries that are git repositories
|
||||
(`issue #49 <https://github.com/ivankravets/platformio/issues/49>`_)
|
||||
* Fixed handling of assembly files
|
||||
(`issue #58 <https://github.com/ivankravets/platformio/issues/58>`_)
|
||||
* Fixed compiling error if space is in user's folder
|
||||
(`issue #56 <https://github.com/ivankravets/platformio/issues/56>`_)
|
||||
* Fixed `AttributeError: 'module' object has no attribute 'disable_warnings'`
|
||||
when a version of `requests` package is less then 2.4.0
|
||||
* Fixed bug with invalid process's "return code" when PlatformIO has internal
|
||||
error (`issue #81 <https://github.com/ivankravets/platformio/issues/81>`_)
|
||||
* Several bug fixes, increased stability and performance improvements
|
||||
|
||||
|
||||
0.10.2 (2015-01-06)
|
||||
-------------------
|
||||
|
||||
* Fixed an issue with ``--json-output``
|
||||
(`issue #42 <https://github.com/ivankravets/platformio/issues/42>`_)
|
||||
* Fixed an exception during
|
||||
`platformio upgrade <http://docs.platformio.org/en/latest/userguide/cmd_upgrade.html>`__
|
||||
under Windows OS (`issue #45 <https://github.com/ivankravets/platformio/issues/45>`_)
|
||||
|
||||
0.10.1 (2015-01-02)
|
||||
-------------------
|
||||
|
||||
* Added ``--json-output`` option to
|
||||
`platformio list <http://docs.platformio.org/en/latest/userguide/cmd_list.html>`__,
|
||||
`platformio serialports list <http://docs.platformio.org/en/latest/userguide/cmd_serialports.html>`__ and
|
||||
`platformio lib list <http://docs.platformio.org/en/latest/userguide/lib/cmd_list.html>`__
|
||||
commands which allows to return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
|
||||
(`issue #42 <https://github.com/ivankravets/platformio/issues/42>`_)
|
||||
* Fixed missing auto-uploading by default after `platformio init <http://docs.platformio.org/en/latest/userguide/cmd_init.html>`__
|
||||
command
|
||||
|
||||
0.10.0 (2015-01-01)
|
||||
-------------------
|
||||
|
||||
**Happy New Year!**
|
||||
|
||||
* Implemented `platformio boards <http://docs.platformio.org/en/latest/userguide/cmd_boards.html>`_
|
||||
command (`issue #11 <https://github.com/ivankravets/platformio/issues/11>`_)
|
||||
* Added support of *Engduino* boards for
|
||||
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html#engduino>`__
|
||||
platform (`issue #38 <https://github.com/ivankravets/platformio/issues/38>`_)
|
||||
* Added ``--board`` option to `platformio init <http://docs.platformio.org/en/latest/userguide/cmd_init.html>`__
|
||||
command which allows to initialise project with the specified embedded boards
|
||||
(`issue #21 <https://github.com/ivankravets/platformio/issues/21>`_)
|
||||
* Added `example with uploading firmware <http://docs.platformio.org/en/latest/projectconf.html#examples>`_
|
||||
via USB programmer (USBasp) for
|
||||
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html>`_
|
||||
*MCUs* (`issue #35 <https://github.com/ivankravets/platformio/issues/35>`_)
|
||||
* Automatic detection of port on `platformio serialports monitor <http://docs.platformio.org/en/latest/userguide/cmd_serialports.html#platformio-serialports-monitor>`_
|
||||
(`issue #37 <https://github.com/ivankravets/platformio/issues/37>`_)
|
||||
* Allowed auto-installation of platforms when prompts are disabled (`issue #43 <https://github.com/ivankravets/platformio/issues/43>`_)
|
||||
* Fixed urllib3's *SSL* warning under Python <= 2.7.2 (`issue #39 <https://github.com/ivankravets/platformio/issues/39>`_)
|
||||
* Fixed bug with *Arduino USB* boards (`issue #40 <https://github.com/ivankravets/platformio/issues/40>`_)
|
||||
|
||||
0.9.2 (2014-12-10)
|
||||
------------------
|
||||
|
||||
* Replaced "dark blue" by "cyan" colour for the texts (`issue #33 <https://github.com/ivankravets/platformio/issues/33>`_)
|
||||
* Added new setting `enable_prompts <http://docs.platformio.org/en/latest/userguide/cmd_settings.html>`_
|
||||
and allowed to disable all *PlatformIO* prompts (useful for cloud compilers)
|
||||
(`issue #34 <https://github.com/ivankravets/platformio/issues/34>`_)
|
||||
* Fixed compilation bug on *Windows* with installed *MSVC* (`issue #18 <https://github.com/ivankravets/platformio/issues/18>`_)
|
||||
|
||||
0.9.1 (2014-12-05)
|
||||
------------------
|
||||
|
||||
* Ask user to install platform (when it hasn't been installed yet) within
|
||||
`platformio run <http://docs.platformio.org/en/latest/userguide/cmd_run.html>`__
|
||||
and `platformio show <http://docs.platformio.org/en/latest/userguide/cmd_show.html>`_ commands
|
||||
* Improved main `documentation <http://docs.platformio.org>`_
|
||||
* Fixed "*OSError: [Errno 2] No such file or directory*" within
|
||||
`platformio run <http://docs.platformio.org/en/latest/userguide/cmd_run.html>`__
|
||||
command when PlatformIO isn't installed properly
|
||||
* Fixed example for `Eclipse IDE with Tiva board <https://github.com/ivankravets/platformio/tree/develop/examples/ide-eclipse>`_
|
||||
(`issue #32 <https://github.com/ivankravets/platformio/pull/32>`_)
|
||||
* Upgraded `Eclipse Project Examples <https://github.com/ivankravets/platformio/tree/develop/examples/ide-eclipse>`_
|
||||
to latest *Luna* and *PlatformIO* releases
|
||||
|
||||
0.9.0 (2014-12-01)
|
||||
------------------
|
||||
|
||||
* Implemented `platformio settings <http://docs.platformio.org/en/latest/userguide/cmd_settings.html>`_ command
|
||||
* Improved `platformio init <http://docs.platformio.org/en/latest/userguide/cmd_init.html>`_ command.
|
||||
Added new option ``--project-dir`` where you can specify another path to
|
||||
directory where new project will be initialized (`issue #31 <https://github.com/ivankravets/platformio/issues/31>`_)
|
||||
* Added *Migration Manager* which simplifies process with upgrading to a
|
||||
major release
|
||||
* Added *Telemetry Service* which should help us make *PlatformIO* better
|
||||
* Implemented *PlatformIO AppState Manager* which allow to have multiple
|
||||
``.platformio`` states.
|
||||
* Refactored *Package Manager*
|
||||
* Download Manager: fixed SHA1 verification within *Cygwin Environment*
|
||||
(`issue #26 <https://github.com/ivankravets/platformio/issues/26>`_)
|
||||
* Fixed bug with code builder and built-in Arduino libraries
|
||||
(`issue #28 <https://github.com/ivankravets/platformio/issues/28>`_)
|
||||
|
||||
0.8.0 (2014-10-19)
|
||||
------------------
|
||||
|
||||
* Avoided trademark issues in `library.json <http://docs.platformio.org/en/latest/librarymanager/config.html>`_
|
||||
with the new fields: `frameworks <http://docs.platformio.org/en/latest/librarymanager/config.html#frameworks>`_,
|
||||
`platforms <http://docs.platformio.org/en/latest/librarymanager/config.html#platforms>`_
|
||||
and `dependencies <http://docs.platformio.org/en/latest/librarymanager/config.html#dependencies>`_
|
||||
(`issue #17 <https://github.com/ivankravets/platformio/issues/17>`_)
|
||||
* Switched logic from "Library Name" to "Library Registry ID" for all
|
||||
`platformio lib <http://docs.platformio.org/en/latest/userguide/lib/index.html>`_
|
||||
commands (install, uninstall, update and etc.)
|
||||
* Renamed ``author`` field to `authors <http://docs.platformio.org/en/latest/librarymanager/config.html#authors>`_
|
||||
and allowed to setup multiple authors per library in `library.json <http://docs.platformio.org/en/latest/librarymanager/config.html>`_
|
||||
* Added option to specify "maintainer" status in `authors <http://docs.platformio.org/en/latest/librarymanager/config.html#authors>`_ field
|
||||
* New filters/options for `platformio lib search <http://docs.platformio.org/en/latest/userguide/lib/cmd_search.html>`_
|
||||
command: ``--framework`` and ``--platform``
|
||||
|
||||
0.7.1 (2014-10-06)
|
||||
------------------
|
||||
|
||||
* Fixed bug with order for includes in conversation from INO/PDE to CPP
|
||||
* Automatic detection of port on upload (`issue #15 <https://github.com/ivankravets/platformio/issues/15>`_)
|
||||
* Fixed lib update crashing when no libs are installed (`issue #19 <https://github.com/ivankravets/platformio/issues/19>`_)
|
||||
|
||||
|
||||
0.7.0 (2014-09-24)
|
||||
------------------
|
||||
|
||||
* Implemented new `[platformio] <http://docs.platformio.org/en/latest/projectconf.html#platformio>`_
|
||||
section for Configuration File with `home_dir <http://docs.platformio.org/en/latest/projectconf.html#home-dir>`_
|
||||
option (`issue #14 <https://github.com/ivankravets/platformio/issues/14>`_)
|
||||
* Implemented *Library Manager* (`issue #6 <https://github.com/ivankravets/platformio/issues/6>`_)
|
||||
|
||||
0.6.0 (2014-08-09)
|
||||
------------------
|
||||
|
||||
* Implemented `platformio serialports monitor <http://docs.platformio.org/en/latest/userguide/cmd_serialports.html#platformio-serialports-monitor>`_ (`issue #10 <https://github.com/ivankravets/platformio/issues/10>`_)
|
||||
* Fixed an issue ``ImportError: No module named platformio.util`` (`issue #9 <https://github.com/ivankravets/platformio/issues/9>`_)
|
||||
* Fixed bug with auto-conversation from Arduino \*.ino to \*.cpp
|
||||
|
||||
0.5.0 (2014-08-04)
|
||||
------------------
|
||||
|
||||
* Improved nested lookups for libraries
|
||||
* Disabled default warning flag "-Wall"
|
||||
* Added auto-conversation from \*.ino to valid \*.cpp for Arduino/Energia
|
||||
frameworks (`issue #7 <https://github.com/ivankravets/platformio/issues/7>`_)
|
||||
* Added `Arduino example <https://github.com/ivankravets/platformio/tree/develop/examples/>`_
|
||||
with external library (*Adafruit CC3000*)
|
||||
* Implemented `platformio upgrade <http://docs.platformio.org/en/latest/userguide/cmd_upgrade.html>`_
|
||||
command and "auto-check" for the latest
|
||||
version (`issue #8 <https://github.com/ivankravets/platformio/issues/8>`_)
|
||||
* Fixed an issue with "auto-reset" for *Raspduino* board
|
||||
* Fixed a bug with nested libs building
|
||||
|
||||
0.4.0 (2014-07-31)
|
||||
------------------
|
||||
|
||||
* Implemented `platformio serialports <http://docs.platformio.org/en/latest/userguide/cmd_serialports.html>`_ command
|
||||
* Allowed to put special build flags only for ``src`` files via
|
||||
`srcbuild_flags <http://docs.platformio.org/en/latest/projectconf.html#srcbuild-flags>`_
|
||||
environment option
|
||||
* Allowed to override some of settings via system environment variables
|
||||
such as: ``PLATFORMIO_SRCBUILD_FLAGS`` and ``PLATFORMIO_ENVS_DIR``
|
||||
* Added ``--upload-port`` option for `platformio run <http://docs.platformio.org/en/latest/userguide/cmd_run.html#cmdoption--upload-port>`__ command
|
||||
* Implemented (especially for `SmartAnthill <http://docs.smartanthill.ikravets.com/>`_)
|
||||
`platformio run -t uploadlazy <http://docs.platformio.org/en/latest/userguide/cmd_run.html>`_
|
||||
target (no dependencies to framework libs, ELF and etc.)
|
||||
* Allowed to skip default packages via `platformio install --skip-default-package <http://docs.platformio.org/en/latest/userguide/cmd_install.html#cmdoption--skip-default>`_
|
||||
option
|
||||
* Added tools for *Raspberry Pi* platform
|
||||
* Added support for *Microduino* and *Raspduino* boards in
|
||||
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html>`_ platform
|
||||
|
||||
|
||||
0.3.1 (2014-06-21)
|
||||
------------------
|
||||
|
||||
@@ -22,7 +270,7 @@ Release History
|
||||
|
||||
* Resolved `issue #1 "Build referred libraries" <https://github.com/ivankravets/platformio/issues/1>`_
|
||||
* Renamed project's "libs" directory to "lib"
|
||||
* Added `arduino-internal-library <https://github.com/ivankravets/platformio/tree/develop/examples/arduino-internal-library>`_ example
|
||||
* Added `arduino-internal-library <https://github.com/ivankravets/platformio/tree/develop/examples/>`_ example
|
||||
* Changed to beta status
|
||||
|
||||
|
||||
|
||||
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Ivan Kravets
|
||||
Copyright (c) 2014-2015 Ivan Kravets
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
580
README.rst
@@ -7,492 +7,128 @@ PlatformIO
|
||||
.. image:: https://gemnasium.com/ivankravets/platformio.png
|
||||
:target: https://gemnasium.com/ivankravets/platformio
|
||||
:alt: Dependency Status
|
||||
.. image:: https://pypip.in/version/platformio/badge.png
|
||||
.. image:: https://pypip.in/version/platformio/badge.png?style=flat
|
||||
:target: https://pypi.python.org/pypi/platformio/
|
||||
:alt: Latest Version
|
||||
.. image:: https://pypip.in/download/platformio/badge.png
|
||||
.. image:: https://pypip.in/download/platformio/badge.png?style=flat
|
||||
:target: https://pypi.python.org/pypi/platformio/
|
||||
:alt: Downloads
|
||||
.. image:: https://pypip.in/license/platformio/badge.png
|
||||
.. image:: https://pypip.in/license/platformio/badge.png?style=flat
|
||||
:target: https://pypi.python.org/pypi/platformio/
|
||||
:alt: License
|
||||
|
||||
`Website + Library Search <http://platformio.org>`_ |
|
||||
`Documentation <http://docs.platformio.org>`_ |
|
||||
`Project Examples <https://github.com/ivankravets/platformio/tree/develop/examples>`_ |
|
||||
`Blog <http://www.ikravets.com/category/computer-life/platformio>`_ |
|
||||
`Twitter <https://twitter.com/PlatformIO_Org>`_
|
||||
|
||||
**PlatformIO** is a console tool to build code with different development
|
||||
platforms.
|
||||
.. image:: https://raw.githubusercontent.com/ivankravets/platformio/develop/docs/_static/platformio-logo.png
|
||||
:target: http://platformio.org
|
||||
|
||||
You have no need to install any *IDE* or compile any toolchains. *PlatformIO*
|
||||
`PlatformIO <http://platformio.org>`_ is a cross-platform code builder
|
||||
and the missing library manager.
|
||||
|
||||
* `Get Started <http://platformio.org/#!/get-started>`_
|
||||
* `Web 2.0 Library Search <http://platformio.org/#!/lib>`_
|
||||
* `Development Platforms <http://platformio.org/#!/platforms>`_
|
||||
* `Embedded Boards <http://platformio.org/#!/boards>`_
|
||||
* `Library Manager <http://docs.platformio.org/en/latest/librarymanager/index.html>`_
|
||||
* `User Guide <http://docs.platformio.org/en/latest/userguide/index.html>`_
|
||||
* `IDE Integration <http://docs.platformio.org/en/latest/ide.html>`_
|
||||
* `Release History <http://docs.platformio.org/en/latest/history.html>`_
|
||||
|
||||
You have **no need** to install any *IDE* or compile any tool chains. *PlatformIO*
|
||||
has pre-built different development platforms including: compiler, debugger,
|
||||
flasher (for embedded) and many other useful tools.
|
||||
|
||||
**PlatformIO** allows developer to compile the same code with different
|
||||
platforms using only one command ``platformio run``. This happens due to
|
||||
``platformio.ini`` project's file (see
|
||||
`default template <https://github.com/ivankravets/platformio/blob/develop/platformio/projectconftpl.ini>`_)
|
||||
where you can setup different environments with specific settings: platform,
|
||||
firmware uploading options, pre-built framework and many more.
|
||||
|
||||
Each platform consists of packages which are located in own repository.
|
||||
Due to ``platformio update`` command you will have up-to-date development
|
||||
instruments.
|
||||
|
||||
.. image:: examples/platformio-examples.png
|
||||
:target: https://github.com/ivankravets/platformio/raw/develop/examples/platformio-examples.png
|
||||
:alt: Examples
|
||||
:width: 730px
|
||||
|
||||
**PlatformIO** is well suited for **embedded development**. It can:
|
||||
|
||||
* Automatically analyse dependency
|
||||
* Reliably detect build changes
|
||||
* Build framework or library source code to static library
|
||||
* Build *ELF* (executable and linkable firmware)
|
||||
* Convert *ELF* to *HEX* or *BIN* file
|
||||
* Extract *EEPROM* data
|
||||
* Upload firmware to your device
|
||||
|
||||
It has support for many popular embedded platforms like these:
|
||||
|
||||
* ``atmelavr`` `Atmel AVR <http://en.wikipedia.org/wiki/Atmel_AVR>`_
|
||||
(including `Arduino <http://www.arduino.cc>`_ based boards)
|
||||
* ``timsp430`` `TI MSP430 <http://www.ti.com/lsds/ti/microcontroller/16-bit_msp430/overview.page>`_
|
||||
(including `MSP430 LaunchPads <http://www.ti.com/ww/en/launchpad/launchpads-msp430.html>`_)
|
||||
* ``titiva`` `TI TIVA C <http://www.ti.com/lsds/ti/microcontroller/tiva_arm_cortex/c_series/overview.page>`_
|
||||
(including `TIVA C Series LaunchPads <http://www.ti.com/ww/en/launchpad/launchpads-connected.html>`_)
|
||||
|
||||
|
||||
See project `examples with screenshots <https://github.com/ivankravets/platformio/tree/develop/examples>`_.
|
||||
|
||||
|
||||
IDE Integration
|
||||
---------------
|
||||
|
||||
* [Eclipse] `Building and debugging Atmel AVR (Arduino-based) project using Eclipse IDE+PlatformIO <http://www.ikravets.com/computer-life/programming/2014/06/20/building-and-debugging-atmel-avr-arduino-based-project-using-eclipse-ideplatformio>`_
|
||||
|
||||
|
||||
Python & OS Support
|
||||
-------------------
|
||||
|
||||
**PlatformIO** is written in `Python <https://www.python.org>`_ and works with
|
||||
versions 2.6 and 2.7 on Unix/Linux, OS X, and Windows.
|
||||
|
||||
|
||||
Quickstart
|
||||
----------
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Print all availalbe development platforms for installing
|
||||
$ platformio search all
|
||||
|
||||
# Install new development platform
|
||||
$ platformio install SomePlatform
|
||||
|
||||
# Initialize new platformio based project
|
||||
$ cd /path/to/empty/directory
|
||||
$ platformio init
|
||||
|
||||
# Process the project's environments
|
||||
$ platformio run
|
||||
|
||||
For more detailed information please follow to `Installation <#installation>`_
|
||||
and `User Guide <#user-guide>`_ sections.
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
All commands below should be executed in
|
||||
`Command-line <http://en.wikipedia.org/wiki/Command-line_interface>`_
|
||||
application in your *OS*:
|
||||
|
||||
* *Unix/Linux/OS X* this is *Terminal* application.
|
||||
* *Windows* this is
|
||||
`Command Prompt <http://en.wikipedia.org/wiki/Command_Prompt>`_ (``cmd.exe``)
|
||||
application.
|
||||
|
||||
Also, the `Python Interpreter <https://www.python.org/downloads/>`_ (2.6 or 2.7)
|
||||
is required.
|
||||
|
||||
|
||||
Super-Quick
|
||||
~~~~~~~~~~~
|
||||
|
||||
To install or upgrade *PlatformIO*, download
|
||||
`get-platformio.py <https://raw.githubusercontent.com/ivankravets/platformio/develop/scripts/get-platformio.py>`_ script.
|
||||
|
||||
Then run the following (which may require administrator access):
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ python get-platformio.py
|
||||
|
||||
On *Windows OS* it may look like:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
C:\Python27\python.exe get-platformio.py
|
||||
|
||||
|
||||
Full Guide
|
||||
~~~~~~~~~~
|
||||
|
||||
1. Check a ``python`` version (only 2.6-2.7 is supported):
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ python --version
|
||||
|
||||
*Windows OS* Users only:
|
||||
|
||||
* `Download Python 2.7 <https://www.python.org/downloads/>`_ and install it.
|
||||
* Add to PATH system variable ``;C:\Python27;C:\Python27\Scripts;`` and
|
||||
reopen *Command Prompt* (``cmd.exe``) application. Please read this
|
||||
article `How to set the path and environment variables in Windows
|
||||
<http://www.computerhope.com/issues/ch000549.htm>`_.
|
||||
|
||||
|
||||
2. Check a ``pip`` tool for installing and managing *Python* packages:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ pip search platformio
|
||||
|
||||
You should see short information about ``platformio`` package.
|
||||
|
||||
If your computer does not recognize ``pip`` command, try to install it first
|
||||
using `these instructions <http://www.pip-installer.org/en/latest/installing.html>`_.
|
||||
|
||||
3. Install a ``platformio`` and related packages:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ pip install platformio && pip install --egg scons
|
||||
|
||||
For upgrading the ``platformio`` to new version please use this command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ pip install -U platformio
|
||||
|
||||
|
||||
User Guide
|
||||
----------
|
||||
|
||||
To print all available commands and options:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio --help
|
||||
$ platformio COMMAND --help
|
||||
|
||||
# Example
|
||||
$ platformio --help
|
||||
Usage: platformio [OPTIONS] COMMAND [ARGS]...
|
||||
|
||||
Options:
|
||||
--version Show the version and exit.
|
||||
--help Show this message and exit.
|
||||
|
||||
Commands:
|
||||
init Initialize new platformio based project
|
||||
install Install new platforms
|
||||
list List installed platforms
|
||||
run Process project environments
|
||||
search Search for development platforms
|
||||
show Show details about an installed platforms
|
||||
uninstall Uninstall the platforms
|
||||
update Update installed platforms
|
||||
|
||||
|
||||
``platformio search``
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Search for development platforms:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Print all available development platforms
|
||||
$ platformio search all
|
||||
|
||||
# Filter platforms by "Query"
|
||||
$ platformio search "Query"
|
||||
|
||||
# Example
|
||||
$ platformio search ti
|
||||
timsp430 - An embedded platform for TI MSP430 microcontrollers (with Energia Framework)
|
||||
titiva - An embedded platform for TI TIVA C ARM microcontrollers (with Energia Framework)
|
||||
|
||||
$ platformio search arduino
|
||||
atmelavr - An embedded platform for Atmel AVR microcontrollers (with Arduino Framework)
|
||||
|
||||
|
||||
``platformio install``
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
*PlatformIO* has pre-built development platforms with related packages. You
|
||||
can install one of them:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio install SomePlatform
|
||||
$ platformio install SomePlatform --with-package=PackageName
|
||||
$ platformio install SomePlatform --without-package=PackageName
|
||||
|
||||
# Example
|
||||
$ platformio install timsp430 --with-package=framework-energiamsp430
|
||||
Installing toolchain-timsp430 package:
|
||||
Downloading [####################################] 100%
|
||||
Unpacking [####################################] 100%
|
||||
Installing tool-mspdebug package:
|
||||
Downloading [####################################] 100%
|
||||
Unpacking [####################################] 100%
|
||||
Installing framework-energiamsp430 package:
|
||||
Downloading [####################################] 100%
|
||||
Unpacking [####################################] 100%
|
||||
The platform 'timsp430' has been successfully installed!
|
||||
|
||||
|
||||
``platformio list``
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To list installed platforms:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio list
|
||||
|
||||
# Example
|
||||
$ platformio list
|
||||
timsp430 with packages: toolchain-timsp430, tool-mspdebug, framework-energiamsp430
|
||||
|
||||
|
||||
``platformio show``
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To show details about an installed platform:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio show SomePlatform
|
||||
|
||||
# Example
|
||||
$ platformio show timsp430
|
||||
timsp430 - An embedded platform for TI MSP430 microcontrollers (with Energia Framework)
|
||||
----------
|
||||
Package: toolchain-timsp430
|
||||
Location: /Users/ikravets/.platformio/timsp430/tools/toolchain
|
||||
Version: 1
|
||||
----------
|
||||
Package: tool-mspdebug
|
||||
Location: /Users/ikravets/.platformio/timsp430/tools/mspdebug
|
||||
Version: 1
|
||||
----------
|
||||
Package: framework-energiamsp430
|
||||
Location: /Users/ikravets/.platformio/timsp430/frameworks/energia
|
||||
Version: 1
|
||||
|
||||
|
||||
``platformio uninstall``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To uninstall platform:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio uninstall SomePlatform
|
||||
|
||||
# Example
|
||||
$ platformio uninstall timsp430
|
||||
Uninstalling toolchain-timsp430 package: [OK]
|
||||
Uninstalling tool-mspdebug package: [OK]
|
||||
Uninstalling framework-energiamsp430 package: [OK]
|
||||
The platform 'timsp430' has been successfully uninstalled!
|
||||
|
||||
|
||||
``platformio init``
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Initialize new platformio based project.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Change directory to future project
|
||||
$ cd /path/to/empty/directory
|
||||
$ platformio init
|
||||
|
||||
# Example
|
||||
$ platformio init
|
||||
Project successfully initialized.
|
||||
Please put your source code to `src` directory, external libraries to `lib`
|
||||
and setup environments in `platformio.ini` file.
|
||||
Then process project with `platformio run` command.
|
||||
|
||||
After this command ``platformio`` will create:
|
||||
|
||||
* ``.pioenvs`` - a temporary working directory.
|
||||
* ``lib`` - a directory for project specific libraries. PlatformIO will
|
||||
compile their to static libraries and link to executable file
|
||||
* ``src`` - a source directory. Put code here.
|
||||
* ``platformio.ini`` - a configuration file for project
|
||||
|
||||
|
||||
``platformio run``
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Process the project's environments defined in ``platformio.ini`` file:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio run
|
||||
|
||||
# Example
|
||||
$ platformio run
|
||||
Processing arduino_pro5v environment:
|
||||
scons: `.pioenvs/arduino_pro5v/firmware.elf' is up to date.
|
||||
scons: `.pioenvs/arduino_pro5v/firmware.hex' is up to date.
|
||||
|
||||
Processing launchpad_msp430g2 environment:
|
||||
scons: `.pioenvs/launchpad_msp430g2/firmware.elf' is up to date.
|
||||
scons: `.pioenvs/launchpad_msp430g2/firmware.hex' is up to date.
|
||||
|
||||
Processing launchpad_lm4f120 environment:
|
||||
scons: `.pioenvs/launchpad_lm4f120/firmware.elf' is up to date.
|
||||
scons: `.pioenvs/launchpad_lm4f120/firmware.hex' is up to date
|
||||
|
||||
Process specific environments:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio run -e myenv1 -e myenv2
|
||||
|
||||
# Example
|
||||
$ platformio run -e arduino_pro5v -e launchpad_lm4f120
|
||||
Processing arduino_pro5v environment:
|
||||
scons: `.pioenvs/arduino_pro5v/firmware.elf' is up to date.
|
||||
scons: `.pioenvs/arduino_pro5v/firmware.hex' is up to date.
|
||||
|
||||
Skipped launchpad_msp430g2 environment
|
||||
Processing launchpad_lm4f120 environment:
|
||||
scons: `.pioenvs/launchpad_lm4f120/firmware.elf' is up to date.
|
||||
scons: `.pioenvs/launchpad_lm4f120/firmware.hex' is up to date.
|
||||
|
||||
Process specific target:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio run -t clean
|
||||
$ platformio run -t upload
|
||||
|
||||
# Example
|
||||
platformio run -t clean
|
||||
Processing arduino_pro5v environment:
|
||||
Removed .pioenvs/arduino_pro5v/src/main.o
|
||||
...
|
||||
Removed .pioenvs/arduino_pro5v/firmware.hex
|
||||
|
||||
Processing launchpad_msp430g2 environment:
|
||||
Removed .pioenvs/launchpad_msp430g2/src/main.o
|
||||
...
|
||||
Removed .pioenvs/launchpad_msp430g2/firmware.hex
|
||||
|
||||
Processing launchpad_lm4f120 environment:
|
||||
Removed .pioenvs/launchpad_lm4f120/src/main.o
|
||||
...
|
||||
Removed .pioenvs/launchpad_lm4f120/firmware.hex
|
||||
|
||||
Mix environments and targets:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio run -e myembeddeddevice -t upload
|
||||
|
||||
# Example
|
||||
$ platformio run -e launchpad_msp430g2 -t upload
|
||||
Skipped arduino_pro5v environment
|
||||
Processing launchpad_msp430g2 environment:
|
||||
/Users/ikravets/.platformio/timsp430/tools/mspdebug/mspdebug rf2500 --force-reset "prog .pioenvs/launchpad_msp430g2/firmware.hex"
|
||||
MSPDebug version 0.20 - debugging tool for MSP430 MCUs
|
||||
Copyright (C) 2009-2012 Daniel Beer <dlbeer@gmail.com>
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
Trying to open interface 1 on 009
|
||||
Initializing FET...
|
||||
FET protocol version is 30394216
|
||||
Configured for Spy-Bi-Wire
|
||||
Sending reset...
|
||||
Set Vcc: 3000 mV
|
||||
Device ID: 0x2553
|
||||
Code start address: 0xc000
|
||||
Code size : 16384 byte = 16 kb
|
||||
RAM start address: 0x200
|
||||
RAM end address: 0x3ff
|
||||
RAM size : 512 byte = 0 kb
|
||||
Device: MSP430G2553/G2403
|
||||
Code memory starts at 0xc000
|
||||
Number of breakpoints: 2
|
||||
Chip ID data: 25 53
|
||||
Erasing...
|
||||
Programming...
|
||||
Writing 646 bytes at c000...
|
||||
Writing 32 bytes at ffe0...
|
||||
Done, 678 bytes total
|
||||
|
||||
Skipped launchpad_lm4f120 environment
|
||||
|
||||
|
||||
``platformio update``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To check or update installed platforms:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio update
|
||||
|
||||
# Example
|
||||
$ platformio update
|
||||
|
||||
Platform atmelavr
|
||||
--------
|
||||
Updating toolchain-atmelavr package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating framework-arduinoavr package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating tool-avrdude package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
|
||||
Platform timsp430
|
||||
--------
|
||||
Updating toolchain-timsp430 package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating tool-mspdebug package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating framework-energiamsp430 package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
|
||||
Platform titiva
|
||||
--------
|
||||
Updating toolchain-gccarmnoneeabi package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating tool-lm4flash package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating framework-energiativa package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
|
||||
|
||||
Questions & Bugs
|
||||
----------------
|
||||
|
||||
Please use the
|
||||
`issue tracker <https://github.com/ivankravets/platformio/issues>`_
|
||||
to ask questions or report bugs.
|
||||
uploader (for embedded boards) and many other useful tools.
|
||||
|
||||
Use whenever. *Run everywhere.*
|
||||
-------------------------------
|
||||
*PlatformIO* is written in pure *Python* and **doesn't depend** on any
|
||||
additional libraries/tools from an operation system. It allows you to use
|
||||
*PlatformIO* beginning from *PC (Mac, Linux, Win)* and ending with credit-card
|
||||
sized computers (like *Raspberry Pi*).
|
||||
|
||||
Embedded Development. *Easier Than Ever.*
|
||||
-----------------------------------------
|
||||
*PlatformIO* is well suited for embedded development and has pre-configured
|
||||
settings for most popular `Embedded Boards <http://platformio.org/#!/boards>`_.
|
||||
|
||||
* Colourful `command-line output <https://raw.githubusercontent.com/ivankravets/platformio/develop/examples/platformio-examples.png>`_
|
||||
* Built-in `Serial Port Monitor <http://docs.platformio.org/en/latest/userguide/cmd_serialports.html#platformio-serialports-monitor>`_
|
||||
* Configurable `build -flags/-options <http://docs.platformio.org/en/latest/projectconf.html#build-flags>`_
|
||||
* Automatic **firmware uploading**
|
||||
* Integration with `development environments (IDE) <http://docs.platformio.org/en/latest/ide.html>`_
|
||||
* Ready for **cloud compilers**
|
||||
* Pre-built tool chains, frameworks for the popular `Hardware Platforms <http://platformio.org/#!/platforms>`_
|
||||
|
||||
.. image:: https://raw.githubusercontent.com/ivankravets/platformio-web/develop/app/images/platformio-embedded-development.png
|
||||
:target: http://platformio.org
|
||||
:alt: PlatformIO Embedded Development Process
|
||||
|
||||
The Missing Library Manager. *It's here!*
|
||||
-----------------------------------------
|
||||
*PlatformIO Library Manager* is the missing library manager for development
|
||||
platforms which allows you to organize and have up-to-date external libraries.
|
||||
|
||||
* Friendly `Command-Line Interface <http://docs.platformio.org/en/latest/librarymanager/index.html>`_
|
||||
* Modern `Web 2.0 Library Search <http://platformio.org/#!/lib>`_
|
||||
* Open Source `Library Registry API <https://github.com/ivankravets/platformio-api>`_
|
||||
* Library Crawler based on `library.json <http://docs.platformio.org/en/latest/librarymanager/config.html>`_
|
||||
specification
|
||||
* Library **dependency management**
|
||||
* Automatic library updating
|
||||
|
||||
.. image:: https://raw.githubusercontent.com/ivankravets/platformio-web/develop/app/images/platformio-library-manager.png
|
||||
:target: http://platformio.org
|
||||
:alt: PlatformIO Library Manager Architecture
|
||||
|
||||
Smart Code Builder. *Fast and Reliable.*
|
||||
----------------------------------------
|
||||
*PlatformIO Code Builder* is built-on a next-generation software construction
|
||||
tool named `SCons <http://www.scons.org/>`_. Think of *SCons* as an improved,
|
||||
cross-platform substitute for the classic *Make* utility.
|
||||
|
||||
* Reliable, automatic *dependency analysis*
|
||||
* Reliable detection of *build changes*
|
||||
* Improved support for *parallel builds*
|
||||
* Ability to share *built files in a cache*
|
||||
* Lookup for external libraries which are installed via `Library Manager <http://docs.platformio.org/en/latest/librarymanager/index.html>`_
|
||||
|
||||
.. image:: https://raw.githubusercontent.com/ivankravets/platformio-web/develop/app/images/platformio-scons-builder.png
|
||||
:target: http://platformio.org
|
||||
:alt: PlatformIO Code Builder Architecture
|
||||
|
||||
Single source code. *Multiple platforms.*
|
||||
-----------------------------------------
|
||||
*PlatformIO* allows developer to compile the same code with different
|
||||
development platforms using the *Only One Command*
|
||||
`platformio run <http://docs.platformio.org/en/latest/userguide/cmd_run.html>`_.
|
||||
This happens due to
|
||||
`Project Configuration File (platformio.ini) <http://docs.platformio.org/en/latest/projectconf.html>`_
|
||||
where you can setup different environments with specific options (platform
|
||||
type, firmware uploading settings, pre-built framework, build flags and many
|
||||
more).
|
||||
|
||||
It has support for the most popular embedded platforms:
|
||||
|
||||
* ``atmelavr`` `Atmel AVR <http://platformio.org/#!/platforms/atmelavr>`_
|
||||
(including *Arduino*-based boards, *Microduino, Raspduino, Teensy*)
|
||||
* ``atmelsam`` `Atmel SAM <http://platformio.org/#!/platforms/atmelsam>`_
|
||||
(including *Arduino*-based boards, *Digistump DigiX*)
|
||||
* ``stm32`` `STM32 <http://platformio.org/#!/platforms/stm32>`_
|
||||
(including *STM32 Discovery* Kits, CMSIS, SPL, libOpenCM3)
|
||||
* ``teensy`` `Teensy <http://platformio.org/#!/platforms/teensy>`_
|
||||
(including *Teensy 2 and 3* USB boards)
|
||||
* ``timsp430`` `TI MSP430 <http://platformio.org/#!/platforms/timsp430>`_
|
||||
(including *MSP430* LaunchPads)
|
||||
* ``titiva`` `TI TIVA C <http://platformio.org/#!/platforms/titiva>`_
|
||||
(including *TIVA C* Series LaunchPads)
|
||||
|
||||
|
||||
Licence
|
||||
-------
|
||||
|
||||
Copyright (C) 2014 Ivan Kravets
|
||||
Copyright (C) 2014-2015 Ivan Kravets
|
||||
|
||||
Licenced under the MIT Licence.
|
||||
|
||||
177
docs/Makefile
Normal file
@@ -0,0 +1,177 @@
|
||||
# Makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXBUILD = sphinx-build
|
||||
PAPER =
|
||||
BUILDDIR = _build
|
||||
|
||||
# User-friendly check for sphinx-build
|
||||
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
|
||||
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
|
||||
endif
|
||||
|
||||
# Internal variables.
|
||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
||||
PAPEROPT_letter = -D latex_paper_size=letter
|
||||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||
# the i18n builder cannot share the environment and doctrees with the others
|
||||
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||
|
||||
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
|
||||
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " html to make standalone HTML files"
|
||||
@echo " dirhtml to make HTML files named index.html in directories"
|
||||
@echo " singlehtml to make a single large HTML file"
|
||||
@echo " pickle to make pickle files"
|
||||
@echo " json to make JSON files"
|
||||
@echo " htmlhelp to make HTML files and a HTML help project"
|
||||
@echo " qthelp to make HTML files and a qthelp project"
|
||||
@echo " devhelp to make HTML files and a Devhelp project"
|
||||
@echo " epub to make an epub"
|
||||
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
||||
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
||||
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
|
||||
@echo " text to make text files"
|
||||
@echo " man to make manual pages"
|
||||
@echo " texinfo to make Texinfo files"
|
||||
@echo " info to make Texinfo files and run them through makeinfo"
|
||||
@echo " gettext to make PO message catalogs"
|
||||
@echo " changes to make an overview of all changed/added/deprecated items"
|
||||
@echo " xml to make Docutils-native XML files"
|
||||
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
|
||||
@echo " linkcheck to check all external links for integrity"
|
||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)/*
|
||||
|
||||
html:
|
||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||
|
||||
dirhtml:
|
||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
||||
|
||||
singlehtml:
|
||||
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
||||
|
||||
pickle:
|
||||
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
||||
@echo
|
||||
@echo "Build finished; now you can process the pickle files."
|
||||
|
||||
json:
|
||||
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
||||
@echo
|
||||
@echo "Build finished; now you can process the JSON files."
|
||||
|
||||
htmlhelp:
|
||||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
||||
".hhp project file in $(BUILDDIR)/htmlhelp."
|
||||
|
||||
qthelp:
|
||||
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
||||
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
||||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/PlatformIO.qhcp"
|
||||
@echo "To view the help file:"
|
||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PlatformIO.qhc"
|
||||
|
||||
devhelp:
|
||||
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
||||
@echo
|
||||
@echo "Build finished."
|
||||
@echo "To view the help file:"
|
||||
@echo "# mkdir -p $$HOME/.local/share/devhelp/PlatformIO"
|
||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PlatformIO"
|
||||
@echo "# devhelp"
|
||||
|
||||
epub:
|
||||
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
||||
@echo
|
||||
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
||||
|
||||
latex:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo
|
||||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
||||
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
||||
"(use \`make latexpdf' here to do that automatically)."
|
||||
|
||||
latexpdf:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through pdflatex..."
|
||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
latexpdfja:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through platex and dvipdfmx..."
|
||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
text:
|
||||
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
||||
@echo
|
||||
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
||||
|
||||
man:
|
||||
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
||||
@echo
|
||||
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
||||
|
||||
texinfo:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo
|
||||
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
|
||||
@echo "Run \`make' in that directory to run these through makeinfo" \
|
||||
"(use \`make info' here to do that automatically)."
|
||||
|
||||
info:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo "Running Texinfo files through makeinfo..."
|
||||
make -C $(BUILDDIR)/texinfo info
|
||||
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
|
||||
|
||||
gettext:
|
||||
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
|
||||
@echo
|
||||
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
|
||||
|
||||
changes:
|
||||
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
||||
@echo
|
||||
@echo "The overview file is in $(BUILDDIR)/changes."
|
||||
|
||||
linkcheck:
|
||||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
||||
@echo
|
||||
@echo "Link check complete; look for any errors in the above output " \
|
||||
"or in $(BUILDDIR)/linkcheck/output.txt."
|
||||
|
||||
doctest:
|
||||
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
||||
@echo "Testing of doctests in the sources finished, look at the " \
|
||||
"results in $(BUILDDIR)/doctest/output.txt."
|
||||
|
||||
xml:
|
||||
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
|
||||
@echo
|
||||
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
|
||||
|
||||
pseudoxml:
|
||||
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
|
||||
@echo
|
||||
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
|
||||
BIN
docs/_static/ide-platformio-arduino.png
vendored
Normal file
|
After Width: | Height: | Size: 108 KiB |
BIN
docs/_static/ide-platformio-eclipse.png
vendored
Normal file
|
After Width: | Height: | Size: 265 KiB |
BIN
docs/_static/ide-platformio-energia.png
vendored
Normal file
|
After Width: | Height: | Size: 112 KiB |
BIN
docs/_static/ide-platformio-vim.png
vendored
Normal file
|
After Width: | Height: | Size: 109 KiB |
BIN
docs/_static/platformio-logo.png
vendored
Normal file
|
After Width: | Height: | Size: 10 KiB |
278
docs/conf.py
Normal file
@@ -0,0 +1,278 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# PlatformIO documentation build configuration file, created by
|
||||
# sphinx-quickstart on Sun Aug 3 19:13:49 2014.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its
|
||||
# containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
sys.path.insert(0, os.path.abspath(os.pardir))
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
#needs_sphinx = '1.0'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = []
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'PlatformIO'
|
||||
copyright = u'2014-2015, Ivan Kravets'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
import platformio
|
||||
# The short X.Y version.
|
||||
version = '.'.join(map(str, platformio.VERSION[0:2]))
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = platformio.__version__
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#language = None
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
#today_fmt = '%B %d, %Y'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = ['_build']
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all
|
||||
# documents.
|
||||
#default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
||||
# If true, keep warnings as "system message" paragraphs in the built documents.
|
||||
#keep_warnings = False
|
||||
|
||||
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'default'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = []
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
#html_logo = None
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
|
||||
# Add any extra paths that contain custom files (such as robots.txt or
|
||||
# .htaccess) here, relative to this directory. These files are copied
|
||||
# directly to the root of the documentation.
|
||||
#html_extra_path = []
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
#html_sidebars = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
#html_show_sphinx = True
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = None
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'PlatformIOdoc'
|
||||
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#'papersize': 'letterpaper',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#'pointsize': '10pt',
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#'preamble': '',
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
('index', 'PlatformIO.tex', u'PlatformIO Documentation',
|
||||
u'Ivan Kravets', 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
|
||||
# If true, show page references after internal links.
|
||||
#latex_show_pagerefs = False
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#latex_show_urls = False
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_domain_indices = True
|
||||
|
||||
|
||||
# -- Options for manual page output ---------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('index', 'platformio', u'PlatformIO Documentation',
|
||||
[u'Ivan Kravets'], 1)
|
||||
]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#man_show_urls = False
|
||||
|
||||
|
||||
# -- Options for Texinfo output -------------------------------------------
|
||||
|
||||
# Grouping the document tree into Texinfo files. List of tuples
|
||||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
('index', 'PlatformIO', u'PlatformIO Documentation',
|
||||
u'Ivan Kravets', 'PlatformIO', 'One line description of project.',
|
||||
'Miscellaneous'),
|
||||
]
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#texinfo_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#texinfo_domain_indices = True
|
||||
|
||||
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
||||
#texinfo_show_urls = 'footnote'
|
||||
|
||||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||
#texinfo_no_detailmenu = False
|
||||
|
||||
|
||||
# Example configuration for intersphinx: refer to the Python standard library.
|
||||
#intersphinx_mapping = {'http://docs.python.org/': None}
|
||||
|
||||
# Read the Docs Sphinx Theme patch
|
||||
# on_rtd is whether we are on readthedocs.org,
|
||||
# this line of code grabbed from docs.readthedocs.org
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
if not on_rtd: # only import and set the theme if we're building docs locally
|
||||
import sphinx_rtd_theme
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
|
||||
# A timeout value, in seconds, for the linkcheck builder
|
||||
# http://sphinx-doc.org/config.html#confval-linkcheck_timeout
|
||||
linkcheck_timeout = 10
|
||||
linkcheck_anchors = False
|
||||
120
docs/envvars.rst
Normal file
@@ -0,0 +1,120 @@
|
||||
.. _envvars:
|
||||
|
||||
Environment variables
|
||||
=====================
|
||||
|
||||
`Environment variables <http://en.wikipedia.org/wiki/Environment_variable>`_
|
||||
are a set of dynamic named values that can affect the way running processes
|
||||
will behave on a computer.
|
||||
|
||||
*PlatformIO* handles variables which start with ``PLATFORMIO_`` prefix. They
|
||||
have the **HIGHEST PRIORITY**.
|
||||
|
||||
.. contents::
|
||||
|
||||
General
|
||||
-------
|
||||
|
||||
PlatformIO uses *General* environment variables for the common
|
||||
operations/commands.
|
||||
|
||||
.. _envvar_CI:
|
||||
|
||||
CI
|
||||
~~
|
||||
|
||||
PlatformIO handles ``CI`` variable which is setup by
|
||||
`Continuous Integration <http://en.wikipedia.org/wiki/Continuous_integration>`_
|
||||
(Travis, Circle and etc.) systems.
|
||||
Currently, PlatformIO uses it to disable prompts.
|
||||
|
||||
In other words, ``CI=true`` automatically setup
|
||||
:ref:`PLATFORMIO_SETTING_ENABLE_PROMPTS=false <envvar_PLATFORMIO_SETTING_ENABLE_PROMPTS>`.
|
||||
|
||||
.. _envvar_PLATFORMIO_HOME_DIR:
|
||||
|
||||
PLATFORMIO_HOME_DIR
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Allows to override :ref:`projectconf` option
|
||||
:ref:`projectconf_pio_home_dir`.
|
||||
|
||||
.. _envvar_PLATFORMIO_LIB_DIR:
|
||||
|
||||
PLATFORMIO_LIB_DIR
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Allows to override :ref:`projectconf` option
|
||||
:ref:`projectconf_pio_lib_dir`.
|
||||
|
||||
.. _envvar_PLATFORMIO_SRC_DIR:
|
||||
|
||||
PLATFORMIO_SRC_DIR
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Allows to override :ref:`projectconf` option
|
||||
:ref:`projectconf_pio_src_dir`.
|
||||
|
||||
.. _envvar_PLATFORMIO_ENVS_DIR:
|
||||
|
||||
PLATFORMIO_ENVS_DIR
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Allows to override :ref:`projectconf` option
|
||||
:ref:`projectconf_pio_envs_dir`.
|
||||
|
||||
|
||||
Builder
|
||||
-------
|
||||
|
||||
.. _envvar_PLATFORMIO_SRCBUILD_FLAGS:
|
||||
|
||||
PLATFORMIO_SRCBUILD_FLAGS
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Allows to override :ref:`projectconf` option
|
||||
:ref:`projectconf_srcbuild_flags`.
|
||||
|
||||
Settings
|
||||
--------
|
||||
|
||||
Allows to override PlatformIO settings. You can manage them via
|
||||
:ref:`cmd_settings` command.
|
||||
|
||||
|
||||
PLATFORMIO_SETTING_AUTO_UPDATE_LIBRARIES
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Allows to override setting :option:`auto_update_libraries`.
|
||||
|
||||
PLATFORMIO_SETTING_AUTO_UPDATE_PLATFORMS
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Allows to override setting :option:`auto_update_platforms`.
|
||||
|
||||
PLATFORMIO_SETTING_CHECK_LIBRARIES_INTERVAL
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Allows to override setting :option:`check_libraries_interval`.
|
||||
|
||||
PLATFORMIO_SETTING_CHECK_PLATFORMIO_INTERVAL
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Allows to override setting :option:`check_platformio_interval`.
|
||||
|
||||
PLATFORMIO_SETTING_CHECK_PLATFORMS_INTERVAL
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Allows to override setting :option:`check_platforms_interval`.
|
||||
|
||||
.. _envvar_PLATFORMIO_SETTING_ENABLE_PROMPTS:
|
||||
|
||||
PLATFORMIO_SETTING_ENABLE_PROMPTS
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Allows to override setting :option:`enable_prompts`.
|
||||
|
||||
PLATFORMIO_SETTING_ENABLE_TELEMETRY
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Allows to override setting :option:`enable_telemetry`.
|
||||
1
docs/history.rst
Normal file
@@ -0,0 +1 @@
|
||||
.. include:: ../HISTORY.rst
|
||||
62
docs/ide.rst
Normal file
@@ -0,0 +1,62 @@
|
||||
.. _ide:
|
||||
|
||||
IDE Integration
|
||||
===============
|
||||
|
||||
.. contents::
|
||||
|
||||
Arduino IDE
|
||||
-----------
|
||||
|
||||
.. image:: _static/ide-platformio-arduino.png
|
||||
:target: http://www.ikravets.com/computer-life/platformio/2014/10/07/integration-of-platformio-library-manager-to-arduino-and-energia-ides
|
||||
|
||||
* `Integration of PlatformIO library manager to Arduino IDE <http://www.ikravets.com/computer-life/platformio/2014/10/07/integration-of-platformio-library-manager-to-arduino-and-energia-ides>`_
|
||||
|
||||
Eclipse
|
||||
-------
|
||||
|
||||
|
||||
.. image:: _static/ide-platformio-eclipse.png
|
||||
:target: http://www.ikravets.com/computer-life/programming/2014/06/20/building-and-debugging-atmel-avr-arduino-based-project-using-eclipse-ideplatformio
|
||||
|
||||
* `Building and debugging Atmel AVR (Arduino-based) project using Eclipse IDE+PlatformIO <http://www.ikravets.com/computer-life/programming/2014/06/20/building-and-debugging-atmel-avr-arduino-based-project-using-eclipse-ideplatformio>`_
|
||||
* `More examples (TI MSP430, TI TIVA and etc) <https://github.com/ivankravets/platformio/tree/develop/examples/ide-eclipse>`_
|
||||
|
||||
Energia IDE
|
||||
-----------
|
||||
|
||||
.. image:: _static/ide-platformio-energia.png
|
||||
:target: http://www.ikravets.com/computer-life/platformio/2014/10/07/integration-of-platformio-library-manager-to-arduino-and-energia-ides
|
||||
|
||||
* `Integration of PlatformIO library manager to Energia IDE <http://www.ikravets.com/computer-life/platformio/2014/10/07/integration-of-platformio-library-manager-to-arduino-and-energia-ides>`_
|
||||
|
||||
VIM
|
||||
---
|
||||
|
||||
.. image:: _static/ide-platformio-vim.png
|
||||
|
||||
Recommended bundles:
|
||||
|
||||
* Syntax highlight - `Arduino-syntax-file <https://github.com/vim-scripts/Arduino-syntax-file>`_
|
||||
* Code Completion - `YouCompleteMe <https://github.com/Valloric/YouCompleteMe>`_
|
||||
* Syntax checking - `Syntastic <https://github.com/scrooloose/syntastic>`_
|
||||
|
||||
Put to the project directory ``Makefile`` wrapper with contents:
|
||||
|
||||
.. code-block:: make
|
||||
|
||||
# Uncomment lines below if you have problems with $PATH
|
||||
#SHELL := /bin/bash
|
||||
#PATH := /usr/local/bin:$(PATH)
|
||||
|
||||
all:
|
||||
platformio run -t upload
|
||||
|
||||
clean:
|
||||
platformio run -t clean
|
||||
|
||||
|
||||
Now, in VIM ``cd /path/to/this/project`` and press ``Ctrl+B`` or ``Cmd+B``
|
||||
(Mac). *PlatformIO* should compile your source code from the ``src`` directory,
|
||||
make firmware and upload it.
|
||||
65
docs/index.rst
Normal file
@@ -0,0 +1,65 @@
|
||||
PlatformIO: A cross-platform code builder and the missing library manager
|
||||
=========================================================================
|
||||
|
||||
.. image:: _static/platformio-logo.png
|
||||
:target: http://platformio.org
|
||||
|
||||
`Website + Library Search <http://platformio.org>`_ |
|
||||
`Project Examples <https://github.com/ivankravets/platformio/tree/develop/examples>`_ |
|
||||
`Source Code <https://github.com/ivankravets/platformio>`_ |
|
||||
`Issues <https://github.com/ivankravets/platformio/issues>`_ |
|
||||
`Blog <http://www.ikravets.com/category/computer-life/platformio>`_ |
|
||||
`Twitter <https://twitter.com/PlatformIO_Org>`_
|
||||
|
||||
You have no need to install any *IDE* or compile any tool chains. *PlatformIO*
|
||||
has pre-built different development platforms including: compiler, debugger,
|
||||
uploader (for embedded) and many other useful tools.
|
||||
|
||||
**PlatformIO** allows developer to compile the same code with different
|
||||
platforms using only one command :ref:`cmd_run`. This happens due to
|
||||
:ref:`projectconf` where you can setup different environments with specific
|
||||
options: platform type, firmware uploading settings, pre-built framework
|
||||
and many more.
|
||||
|
||||
Embedded Development. *Easier Than Ever.*
|
||||
-----------------------------------------
|
||||
|
||||
* Colourful command-line output
|
||||
* Built-in :ref:`Serial Port Monitor <cmd_serialports_monitor>`
|
||||
* Configurable build :ref:`-flags/-options <projectconf_build_flags>`
|
||||
* Integration with :ref:`development environments (IDE) <ide>`
|
||||
* Pre-built tool chains, frameworks for the popular Hardware Platforms
|
||||
|
||||
Smart Code Builder. *Fast and Reliable.*
|
||||
----------------------------------------
|
||||
|
||||
* Reliable, automatic dependency analysis and detection of build changes
|
||||
* Improved support for parallel builds
|
||||
* Ability to share built files in a cache
|
||||
* Lookup for external libraries which are installed via :ref:`librarymanager`
|
||||
|
||||
The Missing Library Manager. *It's here!*
|
||||
-----------------------------------------
|
||||
|
||||
* Friendly Command-Line Interface
|
||||
* Modern `Web 2.0 Library Search <http://platformio.org/#!/lib>`_
|
||||
* Library dependency management
|
||||
* Automatic library updating
|
||||
* It runs on Windows, Mac OS X, and Linux (+ARM).
|
||||
|
||||
|
||||
Contents
|
||||
--------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
quickstart
|
||||
installation
|
||||
projectconf
|
||||
envvars
|
||||
platforms/index
|
||||
librarymanager/index
|
||||
userguide/index
|
||||
ide
|
||||
history
|
||||
143
docs/installation.rst
Normal file
@@ -0,0 +1,143 @@
|
||||
.. _installation:
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
**PlatformIO** is written in `Python <https://www.python.org/downloads/>`_ and works
|
||||
on Mac OS X, Linux, Windows OS and *ARM*-based credit-card
|
||||
computers (`Raspberry Pi <http://www.raspberrypi.org>`_,
|
||||
`BeagleBoard <http://beagleboard.org>`_,
|
||||
`CubieBoard <http://cubieboard.org>`_).
|
||||
|
||||
.. contents::
|
||||
|
||||
System requirements
|
||||
-------------------
|
||||
|
||||
* **Operating systems:**
|
||||
* Mac OS X
|
||||
* Linux, +ARM
|
||||
* Windows
|
||||
* `Python 2.6 or Python 2.7 <https://www.python.org/downloads/>`_
|
||||
|
||||
All commands below should be executed in
|
||||
`Command-line <http://en.wikipedia.org/wiki/Command-line_interface>`_
|
||||
application:
|
||||
|
||||
* *Mac OS X / Linux* this is *Terminal* application.
|
||||
* *Windows* this is
|
||||
`Command Prompt <http://en.wikipedia.org/wiki/Command_Prompt>`_ (``cmd.exe``)
|
||||
application.
|
||||
|
||||
.. warning::
|
||||
If you are going to run *PlatformIO* from **subprocess**, you **MUST
|
||||
DISABLE** all prompts. It will allow you to avoid blocking.
|
||||
There are a few options:
|
||||
|
||||
- using environment variable :ref:`PLATFORMIO_SETTING_ENABLE_PROMPTS=No <envvar_PLATFORMIO_SETTING_ENABLE_PROMPTS>`
|
||||
- disable global setting ``enable_prompts`` via :ref:`cmd_settings` command
|
||||
- masking under Continuous Integration system via environment variable
|
||||
:ref:`CI=true <envvar_CI>`.
|
||||
|
||||
Please *choose one of* the following:
|
||||
|
||||
Super-Quick (Mac / Linux)
|
||||
-------------------------
|
||||
|
||||
To install or upgrade *PlatformIO* paste that at a *Terminal* prompt
|
||||
(**you might need** to run ``sudo`` first):
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
python -c "$(curl -fsSL https://raw.githubusercontent.com/ivankravets/platformio/master/scripts/get-platformio.py)"
|
||||
|
||||
|
||||
Installer Script (Mac / Linux / Windows)
|
||||
----------------------------------------
|
||||
|
||||
To install or upgrade *PlatformIO*, download
|
||||
`get-platformio.py <https://raw.githubusercontent.com/ivankravets/platformio/develop/scripts/get-platformio.py>`_
|
||||
script. Then run the following (you might need to run ``sudo`` first):
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
python get-platformio.py
|
||||
|
||||
|
||||
On *Windows OS* it may look like:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
C:\Python27\python.exe get-platformio.py
|
||||
|
||||
.. warning::
|
||||
If you have an error ``pkg_resources.DistributionNotFound`` please
|
||||
upgrade *SetupTools* package: ``$ [sudo] pip uninstall setuptools``
|
||||
and ``$ [sudo] pip install setuptools``.
|
||||
Then re-install *PlatformIO*: ``$ [sudo] pip uninstall platformio``
|
||||
and ``$ [sudo] pip install platformio``.
|
||||
|
||||
|
||||
Full Guide
|
||||
----------
|
||||
|
||||
1. Check a ``python`` version (only 2.6-2.7 is supported):
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ python --version
|
||||
|
||||
*Windows OS* Users only:
|
||||
|
||||
* `Download Python 2.7 <https://www.python.org/downloads/>`_ and install it.
|
||||
* Add to PATH system variable ``;C:\Python27;C:\Python27\Scripts;`` and
|
||||
reopen *Command Prompt* (``cmd.exe``) application. Please read this
|
||||
article `How to set the path and environment variables in Windows
|
||||
<http://www.computerhope.com/issues/ch000549.htm>`_.
|
||||
|
||||
|
||||
2. Check a ``pip`` tool for installing and managing *Python* packages:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ pip search platformio
|
||||
|
||||
You should see short information about ``platformio`` package.
|
||||
|
||||
If your computer does not recognize ``pip`` command, try to install it first
|
||||
using `these instructions <https://pip.pypa.io/en/latest/installing.html>`_.
|
||||
|
||||
3. Install a ``platformio`` and related packages:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ pip install platformio && pip install --egg scons
|
||||
|
||||
For upgrading the ``platformio`` to new version please use this command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ pip install -U platformio
|
||||
|
||||
|
||||
Development Version
|
||||
-------------------
|
||||
|
||||
.. warning::
|
||||
We don't recommend to use ``develop`` version in production.
|
||||
|
||||
1. If you had have already installed PlatformIO, please uninstall it:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ pip uninstall platformio
|
||||
|
||||
2. Install the latest PlatformIO from the ``develop`` branch:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ pip install https://github.com/ivankravets/platformio/archive/develop.zip
|
||||
|
||||
If you want to be up-to-date with the latest ``develop`` version of PlatformIO,
|
||||
then you need to perform step #2 each time if you see the new commits in
|
||||
`PlatformIO GitHub repository <https://github.com/ivankravets/platformio/commits/develop>`_.
|
||||
307
docs/librarymanager/config.rst
Normal file
@@ -0,0 +1,307 @@
|
||||
.. |PIOAPICR| replace:: *PlatformIO Library Registry Crawler*
|
||||
.. _library_config:
|
||||
|
||||
library.json
|
||||
============
|
||||
|
||||
``library.json`` is a manifest file of development library.
|
||||
|
||||
Initially it was
|
||||
developed for :ref:`librarymanager`, but later was accepted by worldwide embedded
|
||||
community like a **standard library specification**.
|
||||
|
||||
A data in ``library.json`` should be represented
|
||||
in `JSON-style <http://en.wikipedia.org/wiki/JSON>`_ via
|
||||
`associative array <http://en.wikipedia.org/wiki/Associative_array>`_
|
||||
(name/value pairs). An order doesn't matter. The allowable fields
|
||||
(names from pairs) are described below.
|
||||
|
||||
.. contents::
|
||||
|
||||
.. _libjson_name:
|
||||
|
||||
``name``
|
||||
--------
|
||||
|
||||
**Required** | Type: ``String`` | Max. Length: 50
|
||||
|
||||
A name of the library.
|
||||
|
||||
* Must be unique.
|
||||
* Should be slug style for simplicity, consistency and compatibility.
|
||||
Example: *Arduino-SPI*
|
||||
* Title Case, Aa-z, can contain digits and dashes (but not start/end
|
||||
with them).
|
||||
* Consecutive dashes are not allowed.
|
||||
|
||||
|
||||
.. _libjson_description:
|
||||
|
||||
``description``
|
||||
---------------
|
||||
|
||||
**Required** | Type: ``String`` | Max. Length: 255
|
||||
|
||||
The field helps users to identify and search for your library with a brief
|
||||
description. Describe the hardware devices (sensors, boards and etc.) which
|
||||
are suitable with it.
|
||||
|
||||
|
||||
.. _libjson_keywords:
|
||||
|
||||
``keywords``
|
||||
------------
|
||||
|
||||
**Required** | Type: ``String`` | Max. Length: 255
|
||||
|
||||
Used for search by keyword. Helps to make your library easier to discover
|
||||
without people needing to know its name.
|
||||
|
||||
The keyword should be lowercased, can contain a-z, digits and dash (but not
|
||||
start/end with them). A list from the keywords can be specified with
|
||||
separator ``,``
|
||||
|
||||
|
||||
.. _libjson_authors:
|
||||
|
||||
``authors``
|
||||
-----------
|
||||
|
||||
*Required* if :ref:`libjson_repository` field is not defined | Type: ``Object``
|
||||
or ``Array``
|
||||
|
||||
An author contact information
|
||||
|
||||
* ``name`` Full name (**Required**)
|
||||
* ``email``
|
||||
* ``url`` An author's contact page
|
||||
* ``maintainer`` Specify "maintainer" status
|
||||
|
||||
Examples:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
"authors":
|
||||
{
|
||||
"name": "John Smith",
|
||||
"email": "me@john-smith.com",
|
||||
"url": "http://www.john-smith/contact"
|
||||
}
|
||||
|
||||
...
|
||||
|
||||
"authors":
|
||||
[
|
||||
{
|
||||
"name": "John Smith",
|
||||
"email": "me@john-smith.com",
|
||||
"url": "http://www.john-smith/contact"
|
||||
},
|
||||
{
|
||||
"name": "Andrew Smith",
|
||||
"email": "me@andrew-smith.com",
|
||||
"url": "http://www.andrew-smith/contact",
|
||||
"maintainer": true
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
.. note::
|
||||
You can omit :ref:`libjson_authors` field and define
|
||||
:ref:`libjson_repository` field. Only *GitHub-based* repository is
|
||||
supported now. In this case
|
||||
|PIOAPICR| will use information from
|
||||
`GitHub API Users <https://developer.github.com/v3/users/>`_.
|
||||
|
||||
|
||||
.. _libjson_repository:
|
||||
|
||||
``repository``
|
||||
--------------
|
||||
|
||||
*Required* if :ref:`libjson_downloadurl` field is not defined | Type: ``Object``
|
||||
|
||||
The repository in which the source code can be found.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
"repository":
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://github.com/foo/bar.git"
|
||||
}
|
||||
|
||||
|
||||
.. _libjson_downloadurl:
|
||||
|
||||
``downloadUrl``
|
||||
---------------
|
||||
|
||||
*Required* if :ref:`libjson_repository` field is not defined | Type: ``String``
|
||||
|
||||
It is the *HTTP URL* to the archived source code of library. It should end
|
||||
with the type of archive (``.zip`` or ``.tar.gz``).
|
||||
|
||||
|
||||
.. _libjson_version:
|
||||
|
||||
``version``
|
||||
-----------
|
||||
|
||||
*Required* if :ref:`libjson_repository` field is not defined | Type: ``String``
|
||||
| Max. Length: 20
|
||||
|
||||
A version of the current library source code.
|
||||
|
||||
* Can contain a-z, digits, dots or dash.
|
||||
* `Semantic Versioning <http://semver.org>`_ is recommended.
|
||||
* A `CVS <http://en.wikipedia.org/wiki/Concurrent_Versions_System>`_
|
||||
revision from the latest commit. Example: ``13`` (*SVN*) or first 10
|
||||
chars of *SHA* digest ``e4564b7da4`` (*Git*).
|
||||
|
||||
.. note::
|
||||
You can omit :ref:`libjson_version` field and define
|
||||
:ref:`libjson_repository` field. In this case
|
||||
|PIOAPICR| will use the *CVS*-revision from the latest commit.
|
||||
|
||||
|
||||
.. _libjson_include:
|
||||
|
||||
``include``
|
||||
-----------
|
||||
|
||||
*Optional* | Type: ``String`` or ``Array`` |
|
||||
`Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_
|
||||
|
||||
If :ref:`libjson_include` field is a type of ``String``, then
|
||||
|PIOAPICR| will recognize it like a "relative path inside
|
||||
repository/archive to library source code". See example below where the only
|
||||
source code from the relative directory ``LibrarySourceCodeHere`` will be
|
||||
included.
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
"include": "some/child/dir/LibrarySourceCodeHere"
|
||||
|
||||
If :ref:`libjson_include` field is a type of ``Array``, then
|
||||
|PIOAPICR| firstly will apply :ref:`libjson_exclude` filter and
|
||||
then include only directories/files which match with :ref:`libjson_include`
|
||||
patterns.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
"include":
|
||||
[
|
||||
"dir/*.[ch]pp",
|
||||
"dir/examples/*",
|
||||
"*/*/*.h"
|
||||
]
|
||||
|
||||
Pattern Meaning
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Pattern
|
||||
- Meaning
|
||||
* - ``*``
|
||||
- matches everything
|
||||
* - ``?``
|
||||
- matches any single character
|
||||
* - ``[seq]``
|
||||
- matches any character in seq
|
||||
* - ``[!seq]``
|
||||
- matches any character not in seq
|
||||
|
||||
|
||||
.. _libjson_exclude:
|
||||
|
||||
``exclude``
|
||||
-----------
|
||||
|
||||
*Optional* | Type: ``String`` or ``Array`` |
|
||||
`Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_
|
||||
|
||||
Exclude the directories and files which match with :ref:`libjson_exclude`
|
||||
patterns.
|
||||
|
||||
.. _libjson_frameworks:
|
||||
|
||||
``frameworks``
|
||||
--------------
|
||||
|
||||
*Optional* | Type: ``String`` or ``Array``
|
||||
|
||||
A list with compatible frameworks. The available framework types are defined in
|
||||
the :ref:`platforms` section.
|
||||
|
||||
|
||||
.. _libjson_platforms:
|
||||
|
||||
``platforms``
|
||||
-------------
|
||||
|
||||
*Optional* | Type: ``String`` or ``Array``
|
||||
|
||||
A list with compatible platforms. The available platform types are
|
||||
defined in :ref:`platforms` section.
|
||||
|
||||
|
||||
.. _libjson_dependencies:
|
||||
|
||||
``dependencies``
|
||||
----------------
|
||||
|
||||
*Optional* | Type: ``Array`` or ``Object``
|
||||
|
||||
A list of dependent libraries. They will be installed automatically with
|
||||
:ref:`cmd_lib_install` command.
|
||||
|
||||
Allowed requirements for dependent library:
|
||||
|
||||
* ``name`` | Type: ``String``
|
||||
* ``authors`` | Type: ``String`` or ``Array``
|
||||
* ``frameworks`` | Type: ``String`` or ``Array``
|
||||
* ``platforms`` | Type: ``String`` or ``Array``
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
"dependencies":
|
||||
[
|
||||
{
|
||||
"name": "Library-Foo",
|
||||
"authors":
|
||||
[
|
||||
"Jhon Smith",
|
||||
"Andrew Smith"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Library-Bar",
|
||||
"frameworks": "FrameworkFoo, FrameworkBar"
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
.. _libjson_examples:
|
||||
|
||||
``examples``
|
||||
----------------
|
||||
|
||||
*Optional* | Type: ``String`` or ``Array`` |
|
||||
`Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_
|
||||
|
||||
A list of example patterns. This field is predefined with default value:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
"examples": [
|
||||
"[Ee]xamples/*/*.ini",
|
||||
"[Ee]xamples/*/*.pde"
|
||||
]
|
||||
136
docs/librarymanager/creating.rst
Normal file
@@ -0,0 +1,136 @@
|
||||
.. _library_creating:
|
||||
.. |PIOAPICR| replace:: *PlatformIO Library Registry Crawler*
|
||||
|
||||
Creating Library
|
||||
================
|
||||
|
||||
*PlatformIO* :ref:`librarymanager` doesn't have any requirements to a library
|
||||
source code structure. The only one requirement is library's manifest file -
|
||||
:ref:`library_config`. It can be located inside your library or in the another
|
||||
location where |PIOAPICR| will have *HTTP* access.
|
||||
|
||||
.. contents::
|
||||
|
||||
Source Code Location
|
||||
--------------------
|
||||
|
||||
There are a several ways how to share your library with the whole world
|
||||
(see `examples <https://github.com/ivankravets/platformio-libmirror/tree/master/configs>`_).
|
||||
|
||||
You can hold a lot of libraries (split into separated folders) inside one of
|
||||
the repository/archive. In this case please use :ref:`libjson_include`
|
||||
field to specify the relative path to your library's source code.
|
||||
|
||||
|
||||
At GitHub
|
||||
^^^^^^^^^
|
||||
|
||||
**Recommended**
|
||||
|
||||
If a library source code is located at `GitHub <https://github.com>`_, then
|
||||
you **need to specify** only these fields in the :ref:`library_config`:
|
||||
|
||||
* :ref:`libjson_name`
|
||||
* :ref:`libjson_keywords`
|
||||
* :ref:`libjson_description`
|
||||
* :ref:`libjson_repository`
|
||||
|
||||
|PIOAPICR| will populate the rest fields, like :ref:`libjson_version` or
|
||||
:ref:`libjson_authors` with an actual information from *GitHub*.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
{
|
||||
"name": "IRremote",
|
||||
"keywords": "infrared, ir, remote",
|
||||
"description": "Send and receive infrared signals with multiple protocols",
|
||||
"repository":
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://github.com/shirriff/Arduino-IRremote.git"
|
||||
},
|
||||
"frameworks": "arduino",
|
||||
"platforms": "atmelavr"
|
||||
}
|
||||
|
||||
Under CVS (SVN/GIT)
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|PIOAPICR| can operate with a library source code that is under *CVS* control.
|
||||
The list of **required** fields in the :ref:`library_config` will look like:
|
||||
|
||||
* :ref:`libjson_name`
|
||||
* :ref:`libjson_keywords`
|
||||
* :ref:`libjson_description`
|
||||
* :ref:`libjson_authors`
|
||||
* :ref:`libjson_repository`
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
{
|
||||
"name": "XBee",
|
||||
"keywords": "xbee, protocol, radio",
|
||||
"description": "Arduino library for communicating with XBees in API mode",
|
||||
"authors":
|
||||
{
|
||||
"name": "Andrew Rapp",
|
||||
"email": "andrew.rapp@gmail.com",
|
||||
"url": "https://code.google.com/u/andrew.rapp@gmail.com/"
|
||||
},
|
||||
"repository":
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://code.google.com/p/xbee-arduino/"
|
||||
},
|
||||
"frameworks": "arduino",
|
||||
"platforms": "atmelavr"
|
||||
}
|
||||
|
||||
Self-hosted
|
||||
^^^^^^^^^^^
|
||||
|
||||
You can manually archive (*Zip, Tar.Gz*) your library source code and host it
|
||||
in the *Internet*. Then you should specify the additional fields,
|
||||
like :ref:`libjson_version` and :ref:`libjson_downloadurl`. The final list
|
||||
of **required** fields in the :ref:`library_config` will look like:
|
||||
|
||||
* :ref:`libjson_name`
|
||||
* :ref:`libjson_keywords`
|
||||
* :ref:`libjson_description`
|
||||
* :ref:`libjson_authors`
|
||||
* :ref:`libjson_version`
|
||||
* :ref:`libjson_downloadurl`
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
{
|
||||
"name": "OneWire",
|
||||
"keywords": "onewire, 1-wire, bus, sensor, temperature, ibutton",
|
||||
"description": "Control devices (from Dallas Semiconductor) that use the One Wire protocol (DS18S20, DS18B20, DS2408 and etc)",
|
||||
"authors":
|
||||
{
|
||||
"name": "Paul Stoffregen",
|
||||
"url": "http://www.pjrc.com/teensy/td_libs_OneWire.html"
|
||||
},
|
||||
"version": "2.2",
|
||||
"downloadUrl": "http://www.pjrc.com/teensy/arduino_libraries/OneWire.zip",
|
||||
"include": "OneWire",
|
||||
"frameworks": "arduino",
|
||||
"platforms": "atmelavr"
|
||||
}
|
||||
|
||||
|
||||
Register
|
||||
--------
|
||||
|
||||
The registration requirements:
|
||||
|
||||
* A library must adhere to the :ref:`library_config` specification.
|
||||
* There must be public *HTTP* access to the library :ref:`library_config` file.
|
||||
|
||||
Now, you can :ref:`register <cmd_lib_register>` your library and allow others
|
||||
to :ref:`install <cmd_lib_install>` it.
|
||||
25
docs/librarymanager/index.rst
Normal file
@@ -0,0 +1,25 @@
|
||||
.. _librarymanager:
|
||||
|
||||
Library Manager
|
||||
===============
|
||||
|
||||
..
|
||||
|
||||
*"The missing library manager for development platforms"* [#]_
|
||||
|
||||
*PlatformIO Library Manager* allows you to organize external embedded libraries.
|
||||
You can search for new libraries via :ref:`Command Line interface <cmd_lib_search>`
|
||||
or `Web 2.0 Library Search <http://platformio.org/#!/lib>`_.
|
||||
|
||||
You don't need to bother for finding the latest version of library. Due to
|
||||
:ref:`cmd_lib_update` command you will have up-to-date external libraries.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
config
|
||||
creating
|
||||
User Guide <../userguide/lib/index.rst>
|
||||
|
||||
.. [#] Inspired by `npm <https://www.npmjs.com/>`_ and `bower
|
||||
<http://bower.io>`_ package managers for web.
|
||||
242
docs/make.bat
Normal file
@@ -0,0 +1,242 @@
|
||||
@ECHO OFF
|
||||
|
||||
REM Command file for Sphinx documentation
|
||||
|
||||
if "%SPHINXBUILD%" == "" (
|
||||
set SPHINXBUILD=sphinx-build
|
||||
)
|
||||
set BUILDDIR=_build
|
||||
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
|
||||
set I18NSPHINXOPTS=%SPHINXOPTS% .
|
||||
if NOT "%PAPER%" == "" (
|
||||
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
|
||||
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
|
||||
)
|
||||
|
||||
if "%1" == "" goto help
|
||||
|
||||
if "%1" == "help" (
|
||||
:help
|
||||
echo.Please use `make ^<target^>` where ^<target^> is one of
|
||||
echo. html to make standalone HTML files
|
||||
echo. dirhtml to make HTML files named index.html in directories
|
||||
echo. singlehtml to make a single large HTML file
|
||||
echo. pickle to make pickle files
|
||||
echo. json to make JSON files
|
||||
echo. htmlhelp to make HTML files and a HTML help project
|
||||
echo. qthelp to make HTML files and a qthelp project
|
||||
echo. devhelp to make HTML files and a Devhelp project
|
||||
echo. epub to make an epub
|
||||
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
|
||||
echo. text to make text files
|
||||
echo. man to make manual pages
|
||||
echo. texinfo to make Texinfo files
|
||||
echo. gettext to make PO message catalogs
|
||||
echo. changes to make an overview over all changed/added/deprecated items
|
||||
echo. xml to make Docutils-native XML files
|
||||
echo. pseudoxml to make pseudoxml-XML files for display purposes
|
||||
echo. linkcheck to check all external links for integrity
|
||||
echo. doctest to run all doctests embedded in the documentation if enabled
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "clean" (
|
||||
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
|
||||
del /q /s %BUILDDIR%\*
|
||||
goto end
|
||||
)
|
||||
|
||||
|
||||
%SPHINXBUILD% 2> nul
|
||||
if errorlevel 9009 (
|
||||
echo.
|
||||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
||||
echo.installed, then set the SPHINXBUILD environment variable to point
|
||||
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.http://sphinx-doc.org/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if "%1" == "html" (
|
||||
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "dirhtml" (
|
||||
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "singlehtml" (
|
||||
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "pickle" (
|
||||
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished; now you can process the pickle files.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "json" (
|
||||
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished; now you can process the JSON files.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "htmlhelp" (
|
||||
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished; now you can run HTML Help Workshop with the ^
|
||||
.hhp project file in %BUILDDIR%/htmlhelp.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "qthelp" (
|
||||
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished; now you can run "qcollectiongenerator" with the ^
|
||||
.qhcp project file in %BUILDDIR%/qthelp, like this:
|
||||
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\PlatformIO.qhcp
|
||||
echo.To view the help file:
|
||||
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\PlatformIO.ghc
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "devhelp" (
|
||||
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "epub" (
|
||||
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The epub file is in %BUILDDIR%/epub.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "latex" (
|
||||
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "latexpdf" (
|
||||
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
||||
cd %BUILDDIR%/latex
|
||||
make all-pdf
|
||||
cd %BUILDDIR%/..
|
||||
echo.
|
||||
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "latexpdfja" (
|
||||
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
||||
cd %BUILDDIR%/latex
|
||||
make all-pdf-ja
|
||||
cd %BUILDDIR%/..
|
||||
echo.
|
||||
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "text" (
|
||||
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The text files are in %BUILDDIR%/text.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "man" (
|
||||
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The manual pages are in %BUILDDIR%/man.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "texinfo" (
|
||||
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "gettext" (
|
||||
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "changes" (
|
||||
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.The overview file is in %BUILDDIR%/changes.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "linkcheck" (
|
||||
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Link check complete; look for any errors in the above output ^
|
||||
or in %BUILDDIR%/linkcheck/output.txt.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "doctest" (
|
||||
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Testing of doctests in the sources finished, look at the ^
|
||||
results in %BUILDDIR%/doctest/output.txt.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "xml" (
|
||||
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The XML files are in %BUILDDIR%/xml.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "pseudoxml" (
|
||||
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
|
||||
goto end
|
||||
)
|
||||
|
||||
:end
|
||||
524
docs/platforms/atmelavr.rst
Normal file
@@ -0,0 +1,524 @@
|
||||
.. _platform_atmelavr:
|
||||
|
||||
Platform ``atmelavr``
|
||||
=====================
|
||||
|
||||
`Atmel AVR® 8- and 32-bit MCUs <http://www.atmel.com/products/microcontrollers/avr/default.aspx>`_
|
||||
deliver a unique combination of performance, power efficiency and design
|
||||
flexibility. Optimized to speed time to market—and easily adapt to new
|
||||
ones—they are based on the industry's most code-efficient architecture for
|
||||
C and assembly programming.
|
||||
|
||||
.. contents::
|
||||
|
||||
Packages
|
||||
--------
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Name
|
||||
- Alias
|
||||
- Contents
|
||||
* - ``toolchain-atmelavr``
|
||||
- toolchain
|
||||
- `avr-gcc <https://gcc.gnu.org/wiki/avr-gcc>`_,
|
||||
`GDB <http://www.gnu.org/software/gdb/>`_,
|
||||
`AVaRICE <http://avarice.sourceforge.net>`_,
|
||||
`SimulAVR <http://www.nongnu.org/simulavr/>`_
|
||||
* - ``tool-avrdude``
|
||||
- uploader
|
||||
- `AVRDUDE <http://www.nongnu.org/avrdude/>`_
|
||||
* - ``tool-micronucleus``
|
||||
- uploader
|
||||
- `Micronucleus <https://github.com/micronucleus/micronucleus>`_
|
||||
* - ``framework-arduinoavr``
|
||||
-
|
||||
- See below in :ref:`atmelavr_frameworks`
|
||||
|
||||
|
||||
.. warning::
|
||||
**Linux Users:** Don't forget to install "udev" rules file
|
||||
`99-platformio-udev.rules <https://github.com/ivankravets/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
||||
|
||||
|
||||
.. _atmelavr_frameworks:
|
||||
|
||||
Frameworks
|
||||
----------
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Type ``framework``
|
||||
- Name
|
||||
- Reference
|
||||
* - ``arduino``
|
||||
- Arduino Wiring-based Framework (AVR Core, 1.6)
|
||||
- `Documentation <http://arduino.cc/en/Reference/HomePage>`_
|
||||
|
||||
|
||||
Boards
|
||||
------
|
||||
|
||||
.. note::
|
||||
* You can list pre-configured boards by :ref:`cmd_boards` command
|
||||
* For more detailed ``board`` information please scroll tables below by
|
||||
horizontal.
|
||||
|
||||
Arduino
|
||||
~~~~~~~
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Type ``board``
|
||||
- Name
|
||||
- Microcontroller ``board_mcu``
|
||||
- Frequency ``board_f_cpu``
|
||||
- Flash
|
||||
- RAM
|
||||
* - ``atmegangatmega168``
|
||||
- `Arduino NG or older (ATmega168)
|
||||
<http://arduino.cc/en/main/boards>`_
|
||||
- ATmega168 ``atmega168``
|
||||
- 16 MHz ``16000000L``
|
||||
- 16 Kb
|
||||
- 1 Kb
|
||||
* - ``atmegangatmega8``
|
||||
- `Arduino Arduino NG or older (ATmega8)
|
||||
<http://arduino.cc/en/main/boards>`_
|
||||
- ATmega8 ``atmega8``
|
||||
- 16 MHz ``16000000L``
|
||||
- 8 Kb
|
||||
- 1 Kb
|
||||
* - ``btatmega168``
|
||||
- `Arduino BT (ATmega168)
|
||||
<http://arduino.cc/en/main/boards>`_
|
||||
- ATmega168 ``atmega168``
|
||||
- 16 MHz ``16000000L``
|
||||
- 16 Kb
|
||||
- 1 Kb
|
||||
* - ``btatmega328``
|
||||
- `Arduino BT (ATmega328)
|
||||
<http://arduino.cc/en/main/boards>`_
|
||||
- ATmega328 ``atmega328``
|
||||
- 16 MHz ``16000000L``
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
* - ``diecimilaatmega168``
|
||||
- `Arduino Diecimila or Duemilanove (ATmega168)
|
||||
<http://arduino.cc/en/Main/ArduinoBoardDiecimila>`_
|
||||
- ATmega168 ``atmega168``
|
||||
- 16 MHz ``16000000L``
|
||||
- 16 Kb
|
||||
- 1 Kb
|
||||
* - ``diecimilaatmega328``
|
||||
- `Arduino Diecimila or Duemilanove (ATmega328)
|
||||
<http://arduino.cc/en/Main/ArduinoBoardDiecimila>`_
|
||||
- ATmega328 ``atmega328``
|
||||
- 16 MHz ``16000000L``
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
* - ``esplora``
|
||||
- `Arduino Esplora <http://arduino.cc/en/Main/ArduinoBoardEsplora>`_
|
||||
- ATmega32u4 ``atmega32u4``
|
||||
- 16 MHz ``16000000L``
|
||||
- 32 Kb
|
||||
- 2.5 Kb
|
||||
* - ``ethernet``
|
||||
- `Arduino Ethernet
|
||||
<http://arduino.cc/en/Main/ArduinoBoardEthernet>`_
|
||||
- ATmega328P ``atmega328p``
|
||||
- 16 MHz ``16000000L``
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
* - ``fio``
|
||||
- `Arduino Fio
|
||||
<http://arduino.cc/en/Main/ArduinoBoardFio>`_
|
||||
- ATmega328P ``atmega328p``
|
||||
- 8 MHz ``8000000L``
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
* - ``leonardo``
|
||||
- `Arduino Leonardo <http://arduino.cc/en/Main/arduinoBoardLeonardo>`_
|
||||
- ATmega32u4 ``atmega32u4``
|
||||
- 16 MHz ``16000000L``
|
||||
- 32 Kb
|
||||
- 2.5 Kb
|
||||
* - ``LilyPadUSB``
|
||||
- `Arduino LilyPad USB
|
||||
<http://arduino.cc/en/Main/ArduinoBoardLilyPadUSB>`_
|
||||
- ATmega32u4 ``atmega32u4``
|
||||
- 8 MHz ``8000000L``
|
||||
- 32 Kb
|
||||
- 2.5 Kb
|
||||
* - ``lilypadatmega168``
|
||||
- `Arduino LilyPad (ATmega168)
|
||||
<http://arduino.cc/en/Main/ArduinoBoardLilyPad>`_
|
||||
- ATmega168 ``atmega168``
|
||||
- 8 MHz ``8000000L``
|
||||
- 16 Kb
|
||||
- 1 Kb
|
||||
* - ``lilypadatmega328``
|
||||
- `Arduino LilyPad (ATmega328)
|
||||
<http://arduino.cc/en/Main/ArduinoBoardLilyPad>`_
|
||||
- ATmega328P ``atmega328p``
|
||||
- 8 MHz ``8000000L``
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
* - ``megaADK``
|
||||
- `Arduino Mega ADK
|
||||
<http://arduino.cc/en/Main/ArduinoBoardMegaADK>`_
|
||||
- ATmega2560 ``atmega2560``
|
||||
- 16 MHz ``16000000L``
|
||||
- 256 Kb
|
||||
- 8 Kb
|
||||
* - ``megaatmega1280``
|
||||
- `Arduino Mega (ATmega1280)
|
||||
<http://arduino.cc/en/Main/arduinoBoardMega>`_
|
||||
- ATmega1280 ``atmega1280``
|
||||
- 16 MHz ``16000000L``
|
||||
- 128 Kb
|
||||
- 8 Kb
|
||||
* - ``megaatmega2560``
|
||||
- `Arduino Mega (ATmega2560)
|
||||
<http://arduino.cc/en/Main/arduinoBoardMega2560>`_
|
||||
- ATmega2560 ``atmega2560``
|
||||
- 16 MHz ``16000000L``
|
||||
- 256 Kb
|
||||
- 8 Kb
|
||||
* - ``micro``
|
||||
- `Arduino Micro
|
||||
<http://arduino.cc/en/Main/ArduinoBoardMicro>`_
|
||||
- ATmega32u4 ``atmega32u4``
|
||||
- 16 MHz ``16000000L``
|
||||
- 32 Kb
|
||||
- 2.5 Kb
|
||||
* - ``miniatmega168``
|
||||
- `Arduino Mini (ATmega168)
|
||||
<http://arduino.cc/en/Main/ArduinoBoardMini>`_
|
||||
- ATmega168 ``atmega168``
|
||||
- 16 MHz ``16000000L``
|
||||
- 16 Kb
|
||||
- 1 Kb
|
||||
* - ``miniatmega328``
|
||||
- `Arduino Mini (ATmega328P)
|
||||
<http://arduino.cc/en/Main/ArduinoBoardMini>`_
|
||||
- ATmega328P ``atmega328p``
|
||||
- 16 MHz ``16000000L``
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
* - ``nanoatmega168``
|
||||
- `Arduino Nano (ATmega168)
|
||||
<http://arduino.cc/en/Main/ArduinoBoardNano>`_
|
||||
- ATmega168 ``atmega168``
|
||||
- 16 MHz ``16000000L``
|
||||
- 16 Kb
|
||||
- 1 Kb
|
||||
* - ``nanoatmega328``
|
||||
- `Arduino Nano (ATmega328P)
|
||||
<http://arduino.cc/en/Main/ArduinoBoardNano>`_
|
||||
- ATmega328P ``atmega328p``
|
||||
- 16 MHz ``16000000L``
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
* - ``pro8MHzatmega168``
|
||||
- `Arduino Pro or Pro Mini (ATmega168, 3.3V)
|
||||
<http://arduino.cc/en/Main/ArduinoBoardProMini>`_
|
||||
- ATmega168 ``atmega168``
|
||||
- 8 MHz ``8000000L``
|
||||
- 16 Kb
|
||||
- 1 Kb
|
||||
* - ``pro16MHzatmega168``
|
||||
- `Arduino Pro or Pro Mini (ATmega168, 5V)
|
||||
<http://arduino.cc/en/Main/ArduinoBoardProMini>`_
|
||||
- ATmega168 ``atmega168``
|
||||
- 16 MHz ``16000000L``
|
||||
- 16 Kb
|
||||
- 1 Kb
|
||||
* - ``pro8MHzatmega328``
|
||||
- `Arduino Pro or Pro Mini (ATmega328P, 3.3V)
|
||||
<http://arduino.cc/en/Main/ArduinoBoardProMini>`_
|
||||
- ATmega328P ``atmega328p``
|
||||
- 8 MHz ``8000000L``
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
* - ``pro16MHzatmega328``
|
||||
- `Arduino Pro or Pro Mini (ATmega328P, 5V)
|
||||
<http://arduino.cc/en/Main/ArduinoBoardProMini>`_
|
||||
- ATmega328P ``atmega328p``
|
||||
- 16 MHz ``16000000L``
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
* - ``robotControl``
|
||||
- `Arduino Robot Control
|
||||
<http://arduino.cc/en/Main/Robot>`_
|
||||
- ATmega32u4 ``atmega32u4``
|
||||
- 16 MHz ``16000000L``
|
||||
- 32 Kb
|
||||
- 2.5 Kb
|
||||
* - ``robotMotor``
|
||||
- `Arduino Robot Motor
|
||||
<http://arduino.cc/en/Main/Robot>`_
|
||||
- ATmega32u4 ``atmega32u4``
|
||||
- 16 MHz ``16000000L``
|
||||
- 32 Kb
|
||||
- 2.5 Kb
|
||||
* - ``uno``
|
||||
- `Arduino Uno
|
||||
<http://arduino.cc/en/Main/ArduinoBoardUno>`_
|
||||
- ATmega328P ``atmega328p``
|
||||
- 16 MHz ``16000000L``
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
* - ``yun``
|
||||
- `Arduino Yun
|
||||
<http://arduino.cc/en/Main/ArduinoBoardYun>`_
|
||||
- ATmega32u4 ``atmega32u4``
|
||||
- 16 MHz ``16000000L``
|
||||
- 32 Kb
|
||||
- 2.5 Kb
|
||||
|
||||
More detailed information you can find here
|
||||
`Arduino boards <http://arduino.cc/en/Main/Products>`_.
|
||||
|
||||
|
||||
Adafruit
|
||||
~~~~~~~~
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Type ``board``
|
||||
- Name
|
||||
- Microcontroller ``board_mcu``
|
||||
- Frequency ``board_f_cpu``
|
||||
- Flash
|
||||
- RAM
|
||||
* - ``flora8``
|
||||
- `Adafruit Flora
|
||||
<http://www.adafruit.com/product/659>`_
|
||||
- ATmega32u4 ``atmega32u4``
|
||||
- 8 MHz ``8000000L``
|
||||
- 32 Kb
|
||||
- 2.5 Kb
|
||||
* - ``trinket3``
|
||||
- `Adafruit Trinket 8MHz 3.3V LOGIC
|
||||
<http://www.adafruit.com/products/1500>`_
|
||||
- ATtiny85 ``attiny85``
|
||||
- 8 MHz ``8000000L``
|
||||
- 8 Kb
|
||||
- 0.5 Kb
|
||||
* - ``trinket5``
|
||||
- `Adafruit Trinket 16MHz 5V LOGIC
|
||||
<http://www.adafruit.com/products/1501>`_
|
||||
- ATtiny85 ``ATtiny85``
|
||||
- 16 MHz ``16000000L``
|
||||
- 8 Kb
|
||||
- 0.5 Kb
|
||||
* - ``protrinket3``
|
||||
- `Adafruit Pro Trinket 3V/12MHz (USB)
|
||||
<http://www.adafruit.com/products/2010>`_
|
||||
- ATmega328P ``atmega328p``
|
||||
- 12 MHz ``12000000L``
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
* - ``protrinket3ftdi``
|
||||
- `Adafruit Pro Trinket 3V/12MHz (FTDI)
|
||||
<http://www.adafruit.com/products/2010>`_
|
||||
- ATmega328P ``atmega328p``
|
||||
- 12 MHz ``12000000L``
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
* - ``protrinket5``
|
||||
- `Adafruit Pro Trinket 5V/16MHz (USB)
|
||||
<http://www.adafruit.com/products/2000>`_
|
||||
- ATmega328P ``atmega328p``
|
||||
- 16 MHz ``16000000L``
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
* - ``protrinket5ftdi``
|
||||
- `Adafruit Pro Trinket 5V/16MHz (FTDI)
|
||||
<http://www.adafruit.com/products/2000>`_
|
||||
- ATmega328P ``atmega328p``
|
||||
- 16 MHz ``16000000L``
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
|
||||
More detailed information you can find here
|
||||
`Adafruits boards <https://learn.adafruit.com/category/trinket>`_.
|
||||
|
||||
|
||||
Digispark
|
||||
~~~~~~~~~
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Type ``board``
|
||||
- Name
|
||||
- Microcontroller ``board_mcu``
|
||||
- Frequency ``board_f_cpu``
|
||||
- Flash
|
||||
- RAM
|
||||
* - ``digispark-tiny``
|
||||
- `Digispark USB Development Board <http://digistump.com/products/1>`_
|
||||
- ATtiny85 ``attiny85``
|
||||
- 16 MHz ``16000000L``
|
||||
- 8 Kb
|
||||
- 0.5 Kb
|
||||
* - ``digispark-pro``
|
||||
- `Digispark Pro (Default 16 Mhz) <http://digistump.com/products/109>`_
|
||||
- ATtiny167 ``attiny167``
|
||||
- 16 MHz ``16000000L``
|
||||
- 16 Kb
|
||||
- 0.5 Kb
|
||||
* - ``digispark-pro32``
|
||||
- `Digispark Pro (16 Mhz) (32 byte buffer) <http://digistump.com/products/109>`_
|
||||
- ATtiny167 ``attiny167``
|
||||
- 16 Mhz ``16000000L``
|
||||
- 16 kb
|
||||
- 0.5 Kb
|
||||
|
||||
More detailed information you can find here
|
||||
`Digistump Development Boards <http://digistump.com/wiki/start>`_.
|
||||
|
||||
Engduino
|
||||
~~~~~~~~
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Type ``board``
|
||||
- Name
|
||||
- Microcontroller ``board_mcu``
|
||||
- Frequency ``board_f_cpu``
|
||||
- Flash
|
||||
- RAM
|
||||
* - ``engduinov1``
|
||||
- `Engduino 1 <http://www.engduino.org>`_
|
||||
- ATmega32u4 ``atmega32u4``
|
||||
- 8 MHz ``8000000L``
|
||||
- 32 Kb
|
||||
- 2.5 Kb
|
||||
* - ``engduinov2``
|
||||
- `Engduino 2 <http://www.engduino.org>`_
|
||||
- ATmega32u4 ``atmega32u4``
|
||||
- 8 MHz ``8000000L``
|
||||
- 32 Kb
|
||||
- 2.5 Kb
|
||||
* - ``engduinov3``
|
||||
- `Engduino 3 <http://www.engduino.org>`_
|
||||
- ATmega32u4 ``atmega32u4``
|
||||
- 8 MHz ``8000000L``
|
||||
- 32 Kb
|
||||
- 2.5 Kb
|
||||
|
||||
More detailed information you can find here
|
||||
`Engduino Site <http://www.engduino.org>`_.
|
||||
|
||||
|
||||
Microduino
|
||||
~~~~~~~~~~
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Type ``board``
|
||||
- Name
|
||||
- Microcontroller ``board_mcu``
|
||||
- Frequency ``board_f_cpu``
|
||||
- Flash
|
||||
- RAM
|
||||
* - ``168pa8m``
|
||||
- `Microduino Core (ATmega168P, 3.3V)
|
||||
<https://www.microduino.cc/wiki/index.php?title=Microduino-Core>`_
|
||||
- ATmega168P ``atmega168p``
|
||||
- 8 MHz ``8000000L``
|
||||
- 16 Kb
|
||||
- 1 Kb
|
||||
* - ``168pa16m``
|
||||
- `Microduino Core (ATmega168P, 5V)
|
||||
<https://www.microduino.cc/wiki/index.php?title=Microduino-Core>`_
|
||||
- ATmega168P ``atmega168p``
|
||||
- 16 MHz ``16000000L``
|
||||
- 16 Kb
|
||||
- 1 Kb
|
||||
* - ``328p8m``
|
||||
- `Microduino Core (ATmega328P, 3.3V)
|
||||
<https://www.microduino.cc/wiki/index.php?title=Microduino-Core>`_
|
||||
- ATmega328P ``atmega328p``
|
||||
- 8 MHz ``8000000L``
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
* - ``328p16m``
|
||||
- `Microduino Core (ATmega328P, 5V)
|
||||
<https://www.microduino.cc/wiki/index.php?title=Microduino-Core>`_
|
||||
- ATmega328P ``atmega328p``
|
||||
- 16 MHz ``16000000L``
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
* - ``644pa8m``
|
||||
- `Microduino Core+ (ATmega644PA, 3.3V)
|
||||
<https://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B>`_
|
||||
- ATmega644PA ``atmega644p``
|
||||
- 8 MHz ``8000000L``
|
||||
- 64 Kb
|
||||
- 4 Kb
|
||||
* - ``644pa16m``
|
||||
- `Microduino Core+ (ATmega644PA, 5V)
|
||||
<https://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B>`_
|
||||
- ATmega644PA ``atmega644p``
|
||||
- 16 MHz ``16000000L``
|
||||
- 64 Kb
|
||||
- 4 Kb
|
||||
* - ``1284p8m``
|
||||
- `Microduino Core+ (Atmega1284P, 3.3V)
|
||||
<https://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B>`_
|
||||
- Atmega1284P ``atmega1284p``
|
||||
- 8 MHz ``8000000L``
|
||||
- 128 Kb
|
||||
- 16 Kb
|
||||
* - ``1284p16m``
|
||||
- `Microduino Core+ (Atmega1284P, 5V)
|
||||
<https://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B>`_
|
||||
- Atmega1284P ``atmega1284p``
|
||||
- 16 MHz ``16000000L``
|
||||
- 128 Kb
|
||||
- 16 Kb
|
||||
* - ``32u416m``
|
||||
- `Microduino-Core USB
|
||||
<https://www.microduino.cc/wiki/index.php?title=Microduino-CoreUSB>`_
|
||||
- ATmega32u4 ``atmega32u4``
|
||||
- 16 MHz ``16000000L``
|
||||
- 32 Kb
|
||||
- 2.5 Kb
|
||||
|
||||
|
||||
More detailed information you can find here
|
||||
`Microduino boards <https://www.microduino.cc/wiki/index.php?title=Main_Page>`_.
|
||||
|
||||
|
||||
Raspduino
|
||||
~~~~~~~~~
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Type ``board``
|
||||
- Name
|
||||
- Microcontroller ``board_mcu``
|
||||
- Frequency ``board_f_cpu``
|
||||
- Flash
|
||||
- RAM
|
||||
* - ``raspduino``
|
||||
- `Raspduino
|
||||
<http://www.bitwizard.nl/wiki/index.php/Raspduino>`_
|
||||
- ATmega328P ``atmega328p``
|
||||
- 16 MHz ``16000000L``
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
|
||||
More detailed information you can find here
|
||||
`Wiki <http://www.bitwizard.nl/wiki/index.php/Raspduino>`_.
|
||||
104
docs/platforms/atmelsam.rst
Normal file
@@ -0,0 +1,104 @@
|
||||
.. _platform_atmelsam:
|
||||
|
||||
Platform ``atmelsam``
|
||||
=====================
|
||||
|
||||
`Atmel® | SMART <http://www.atmel.com/products/microcontrollers/arm/default.aspx>`_
|
||||
offers Flash- based ARM® products based on the ARM Cortex-®M0+, Cortex-M3 and
|
||||
Cortex-M4 architectures, ranging from 8KB to 2MB of Flash including a rich
|
||||
peripheral and feature mix.
|
||||
|
||||
.. contents::
|
||||
|
||||
Packages
|
||||
--------
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Name
|
||||
- Alias
|
||||
- Contents
|
||||
* - ``toolchain-gccarmnoneeabi``
|
||||
- toolchain
|
||||
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_,
|
||||
`GDB <http://www.gnu.org/software/gdb/>`_
|
||||
* - ``tool-bossac``
|
||||
- uploader
|
||||
- `BOSSA CLI <https://sourceforge.net/projects/b-o-s-s-a/>`_
|
||||
* - ``framework-arduino``
|
||||
-
|
||||
- See below in :ref:`atmelsam_frameworks`
|
||||
|
||||
|
||||
.. warning::
|
||||
**Linux Users:** Don't forget to install "udev" rules file
|
||||
`99-platformio-udev.rules <https://github.com/ivankravets/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
||||
|
||||
|
||||
.. _atmelsam_frameworks:
|
||||
|
||||
Frameworks
|
||||
----------
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Type ``framework``
|
||||
- Name
|
||||
- Reference
|
||||
* - ``arduino``
|
||||
- Arduino Wiring-based Framework (SAM Core, 1.6)
|
||||
- `Documentation <http://arduino.cc/en/Reference/HomePage>`_
|
||||
|
||||
|
||||
Boards
|
||||
------
|
||||
|
||||
.. note::
|
||||
* You can list pre-configured boards by :ref:`cmd_boards` command
|
||||
* For more detailed ``board`` information please scroll tables below by
|
||||
horizontal.
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Type ``board``
|
||||
- Name
|
||||
- Microcontroller ``board_mcu``
|
||||
- Frequency ``board_f_cpu``
|
||||
- Flash
|
||||
- RAM
|
||||
* - ``due``
|
||||
- `Arduino Due (Programming Port) <http://arduino.cc/en/Main/arduinoBoardDue>`_
|
||||
- at91sam3x8e ``cortex-m3``
|
||||
- 84 MHz ``84000000L``
|
||||
- 512 Kb
|
||||
- 32 Kb
|
||||
* - ``dueUSB``
|
||||
- `Arduino Due (USB Native Port) <http://arduino.cc/en/Main/arduinoBoardDue>`_
|
||||
- at91sam3x8e ``cortex-m3``
|
||||
- 84 MHz ``84000000L``
|
||||
- 512 Kb
|
||||
- 32 Kb
|
||||
* - ``digix``
|
||||
- `Digistump DigiX <http://digistump.com/products/50>`_
|
||||
- at91sam3x8e ``cortex-m3``
|
||||
- 84 MHz ``84000000L``
|
||||
- 512 kb
|
||||
- 32 Kb
|
||||
* - ``sainSmartDue``
|
||||
- `SainSmart Due (Programming Port) <http://www.sainsmart.com/arduino/control-boards/sainsmart-due-atmel-sam3x8e-arm-cortex-m3-board-black.html>`_
|
||||
- at91sam3x8e ``cortex-m3``
|
||||
- 84 MHz ``84000000L``
|
||||
- 512 Kb
|
||||
- 32 Kb
|
||||
* - ``sainSmartDueUSB``
|
||||
- `SainSmart Due (USB Native Port) <http://www.sainsmart.com/arduino/control-boards/sainsmart-due-atmel-sam3x8e-arm-cortex-m3-board-black.html>`_
|
||||
- at91sam3x8e ``cortex-m3``
|
||||
- 84 MHz ``84000000L``
|
||||
- 512 Kb
|
||||
- 32 Kb
|
||||
|
||||
More detailed information you can find here
|
||||
`Atmel SMART ARM-based MCUs <http://www.atmel.com/products/microcontrollers/arm/default.aspx>`_.
|
||||
285
docs/platforms/creating_platform.rst
Normal file
@@ -0,0 +1,285 @@
|
||||
.. _platform_creating:
|
||||
|
||||
Creating Platform
|
||||
=================
|
||||
|
||||
*PlatformIO* was developed like a tool which would build the same source code
|
||||
for the different development platforms via single command :ref:`cmd_run`
|
||||
without any dependent software or requirements.
|
||||
|
||||
For this purpose *PlatformIO* uses own pre-configured platforms data:
|
||||
build scripts, tool chains, the settings for the most popular embedded
|
||||
boards and etc. These data are pre-built and packaged to the different
|
||||
``packages``. It allows *PlatformIO* to have multiple development platforms
|
||||
which can use the same packages(tool chains, frameworks), but have
|
||||
different/own build scripts, uploader and etc.
|
||||
|
||||
.. note::
|
||||
If you want to change some build flags for the existing
|
||||
:ref:`Platforms <platforms>`, you don't need to create (or duplicate) own
|
||||
development platforms! Please use :ref:`projectconf_build_flags` option.
|
||||
|
||||
**Step-by-Step Manual**
|
||||
|
||||
1. Chose :ref:`platform_creating_packages` for platform
|
||||
2. Create :ref:`platform_creating_manifest_file`
|
||||
3. Create :ref:`platform_creating_build_script`
|
||||
4. Finish with the :ref:`platform_creating_installation`.
|
||||
|
||||
.. contents::
|
||||
|
||||
.. _platform_creating_packages:
|
||||
|
||||
Packages
|
||||
--------
|
||||
|
||||
*PlatformIO* has pre-built packages for the most popular operation systems:
|
||||
*Mac OS*, *Linux (+ARM)* and *Windows*.
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Name
|
||||
- Alias
|
||||
- Contents
|
||||
* - ``toolchain-gccarmnoneeabi``
|
||||
- toolchain
|
||||
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded/>`_,
|
||||
`GDB <http://www.gnu.org/software/gdb/>`_
|
||||
* - ``toolchain-atmelavr``
|
||||
- toolchain
|
||||
- `avr-gcc <https://gcc.gnu.org/wiki/avr-gcc>`_,
|
||||
`GDB <http://www.gnu.org/software/gdb/>`_,
|
||||
`AVaRICE <http://avarice.sourceforge.net>`_,
|
||||
`SimulAVR <http://www.nongnu.org/simulavr/>`_
|
||||
* - ``toolchain-timsp430``
|
||||
- toolchain
|
||||
- `msp-gcc <http://sourceforge.net/projects/mspgcc/>`_,
|
||||
`GDB <http://www.gnu.org/software/gdb/>`_
|
||||
* - ``tool-avrdude``
|
||||
- uploader
|
||||
- `AVRDUDE <http://www.nongnu.org/avrdude/>`_
|
||||
* - ``tool-bossac``
|
||||
- uploader
|
||||
- `BOSSA CLI <https://sourceforge.net/projects/b-o-s-s-a/>`_
|
||||
* - ``tool-micronucleus``
|
||||
- uploader
|
||||
- `Micronucleus <https://github.com/micronucleus/micronucleus>`_
|
||||
* - ``tool-mspdebug``
|
||||
- uploader
|
||||
- `MSPDebug <http://mspdebug.sourceforge.net>`_
|
||||
* - ``tool-lm4flash``
|
||||
- uploader
|
||||
- `Flash Programmer <http://www.ti.com/tool/lmflashprogrammer>`_
|
||||
* - ``tool-stlink``
|
||||
- uploader
|
||||
- `STLink <https://github.com/texane/stlink>`_
|
||||
* - ``tool-teensy``
|
||||
- uploader
|
||||
- `Teensy Loader <https://www.pjrc.com/teensy/loader.html>`_
|
||||
* - ``framework-arduinoavr``
|
||||
-
|
||||
- `Arduino Wiring-based Framework (AVR Core, 1.6 branch) <http://arduino.cc/en/Reference/HomePage>`_
|
||||
* - ``framework-arduinosam``
|
||||
-
|
||||
- `Arduino Wiring-based Framework (SAM Core, 1.6 branch) <http://arduino.cc/en/Reference/HomePage>`_
|
||||
* - ``framework-arduinoteensy``
|
||||
-
|
||||
- `Arduino Wiring-based Framework <http://arduino.cc/en/Reference/HomePage>`_
|
||||
* - ``framework-energiamsp430``
|
||||
-
|
||||
- `Energia Wiring-based Framework (MSP430 Core) <http://energia.nu/reference/>`_
|
||||
* - ``framework-energiativa``
|
||||
-
|
||||
- `Energia Wiring-based Framework (LM4F Core) <http://energia.nu/reference/>`_
|
||||
* - ``framework-cmsis``
|
||||
-
|
||||
- `Vendor-independent hardware abstraction layer for the Cortex-M processor series <http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php>`_
|
||||
* - ``framework-spl``
|
||||
-
|
||||
- `Standard Peripheral Library for STM32 MCUs <http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF257890>`_
|
||||
* - ``framework-opencm3``
|
||||
-
|
||||
- `libOpenCM3 Framework <http://www.libopencm3.org>`_
|
||||
|
||||
.. _platform_creating_manifest_file:
|
||||
|
||||
Manifest File
|
||||
-------------
|
||||
|
||||
A platform manifest file is a `Python <https://www.python.org>`_ script with the
|
||||
next requirements:
|
||||
|
||||
1. The file should have ``.py`` extension
|
||||
2. The **name of the file** is the **platform name** (lowercase)
|
||||
3. The source code of this file should contain a ``class`` which describes your
|
||||
own platform. The name of the ``class`` should start with your
|
||||
**platform name** (the first letter should be capitalized) + ``Platform``
|
||||
ending. This ``class`` should be derived from *PlatformIO* ``BasePlatform``
|
||||
class.
|
||||
|
||||
.. warning::
|
||||
If you are new to *Python* language, please read:
|
||||
|
||||
* `Style Guide for Python Code <https://www.python.org/dev/peps/pep-0008>`_.
|
||||
* A hash sign (#) that is not inside a string literal begins a comment.
|
||||
All characters after the # and up to the physical line end are part
|
||||
of the comment and the *Python* interpreter ignores them.
|
||||
|
||||
Example of the **test** platform (``test.py``):
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from platformio.platforms.base import BasePlatform
|
||||
|
||||
class TestPlatform(BasePlatform):
|
||||
# This is a description of your platform.
|
||||
# Platformio uses it for the `platformio search / list` commands
|
||||
"""
|
||||
My Test platform - test.py
|
||||
"""
|
||||
|
||||
PACKAGES = {
|
||||
|
||||
"toolchain-foo": {
|
||||
|
||||
# alias is used for quick access to package.
|
||||
# For example,
|
||||
# `> platformio install test --without-package=toolchain`
|
||||
"alias": "toolchain",
|
||||
|
||||
# Flag which allows PlatformIO to install this package by
|
||||
# default via `> platformio install test` command
|
||||
"default": True
|
||||
},
|
||||
|
||||
"tool-bar": {
|
||||
"alias": "uploader",
|
||||
"default": True
|
||||
},
|
||||
|
||||
"framework-baz": {
|
||||
"default": True
|
||||
}
|
||||
}
|
||||
|
||||
def get_build_script(self):
|
||||
""" Returns a path to build script """
|
||||
|
||||
# You can return static path
|
||||
#return "/path/to/test-builder.py"
|
||||
|
||||
# or detect dynamically if `test-builder.py` is located in the same
|
||||
# folder with `test.py`
|
||||
return os.path.join(
|
||||
os.path.dirname(os.path.realpath(__file__)),
|
||||
"test-builder.py"
|
||||
)
|
||||
|
||||
.. _platform_creating_build_script:
|
||||
|
||||
Build Script
|
||||
------------
|
||||
|
||||
Platform's build script is based on a next-generation build tool named
|
||||
`SCons <http://www.scons.org>`_. PlatformIO has own built-in firmware builder
|
||||
``env.BuildFirmware`` with the nested libraries search. Please look into a
|
||||
base template of ``test-builder.py``.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
"""
|
||||
Build script for test.py
|
||||
test-builder.py
|
||||
"""
|
||||
|
||||
from os.path import join
|
||||
from SCons.Script import AlwaysBuild, Builder, Default, DefaultEnvironment
|
||||
|
||||
env = DefaultEnvironment()
|
||||
|
||||
# A full list with the available variables
|
||||
# http://www.scons.org/doc/production/HTML/scons-user.html#app-variables
|
||||
env.Replace(
|
||||
AR="ar",
|
||||
AS="gcc",
|
||||
CC="gcc",
|
||||
CXX="g++",
|
||||
OBJCOPY="objcopy",
|
||||
RANLIB="ranlib",
|
||||
|
||||
ARFLAGS=["..."],
|
||||
|
||||
ASFLAGS=["flag1", "flag2", "flagN"],
|
||||
CCFLAGS=["flag1", "flag2", "flagN"],
|
||||
CXXFLAGS=["flag1", "flag2", "flagN"],
|
||||
LINKFLAGS=["flag1", "flag2", "flagN"],
|
||||
|
||||
CPPDEFINES=["DEFINE_1", "DEFINE=2", "DEFINE_N"],
|
||||
|
||||
UPLOADER=join("$PIOPACKAGES_DIR", "tool-bar", "uploader"),
|
||||
UPLOADCMD="$UPLOADER $SOURCES"
|
||||
)
|
||||
|
||||
env.Append(
|
||||
BUILDERS=dict(
|
||||
ElfToBin=Builder(
|
||||
action=" ".join([
|
||||
"$OBJCOPY",
|
||||
"-O",
|
||||
"binary",
|
||||
"$SOURCES",
|
||||
"$TARGET"]),
|
||||
suffix=".bin"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
# The source code of "platformio-build-tool" is here
|
||||
# https://github.com/ivankravets/platformio/blob/develop/platformio/builder/tools/platformio.py
|
||||
|
||||
CORELIBS = env.ProcessGeneral()
|
||||
|
||||
#
|
||||
# Target: Build executable and linkable firmware
|
||||
#
|
||||
target_elf = env.BuildFirmware(CORELIBS + ["additional", "libs", "here"])
|
||||
|
||||
#
|
||||
# Target: Build the .bin file
|
||||
#
|
||||
target_bin = env.ElfToBin(join("$BUILD_DIR", "firmware"), target_elf)
|
||||
|
||||
#
|
||||
# Target: Upload firmware
|
||||
#
|
||||
upload = env.Alias(["upload"], target_bin, "$UPLOADCMD")
|
||||
AlwaysBuild(upload)
|
||||
|
||||
#
|
||||
# Target: Define targets
|
||||
#
|
||||
Default(target_bin)
|
||||
|
||||
|
||||
Please look into the examples with built-in scripts for the popular
|
||||
platforms:
|
||||
|
||||
* `atmelavr.py <https://github.com/ivankravets/platformio/blob/develop/platformio/builder/scripts/atmelavr.py>`_
|
||||
* `timsp430.py <https://github.com/ivankravets/platformio/blob/develop/platformio/builder/scripts/timsp430.py>`_
|
||||
* `titiva.py <https://github.com/ivankravets/platformio/blob/develop/platformio/builder/scripts/titiva.py>`_
|
||||
|
||||
.. _platform_creating_installation:
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
1. Create ``platforms`` directory in :ref:`projectconf_pio_home_dir` if it
|
||||
doesn't exists.
|
||||
2. Copy ``test.py`` and ``test-builder.py`` files to ``platforms`` directory.
|
||||
3. Search available platforms via :ref:`cmd_search` command. You should see
|
||||
``test`` platform.
|
||||
4. Install ``test`` platform via :ref:`cmd_install` command.
|
||||
|
||||
Now, you can use ``test`` for the :ref:`projectconf_env_platform` option in
|
||||
:ref:`projectconf`.
|
||||
23
docs/platforms/index.rst
Normal file
@@ -0,0 +1,23 @@
|
||||
.. _platforms:
|
||||
|
||||
Platforms & Embedded Boards
|
||||
===========================
|
||||
|
||||
*PlatformIO* has pre-built different development platforms for popular OS
|
||||
(*Mac OS X, Linux (+ARM) and Windows*). Each of them include compiler,
|
||||
debugger, uploader (for embedded) and many other useful tools.
|
||||
|
||||
Also it has pre-configured settings for most popular **Embedded Platform
|
||||
Boards**. You have no need to specify in :ref:`projectconf` type or frequency of
|
||||
MCU, upload protocol or etc. Please use ``board`` option.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
atmelavr
|
||||
atmelsam
|
||||
stm32
|
||||
teensy
|
||||
timsp430
|
||||
titiva
|
||||
creating_platform
|
||||
104
docs/platforms/stm32.rst
Normal file
@@ -0,0 +1,104 @@
|
||||
.. _platform_stm32:
|
||||
|
||||
Platform ``stm32``
|
||||
==================
|
||||
|
||||
`The STM32 family of 32-bit Flash MCUs <http://www.st.com/web/en/catalog/mmc/FM141/SC1169?sc=stm32>`_ based on the ARM® Cortex®-M processor is designed to offer new degrees of freedom to MCU users. It offers a 32-bit product range that combines very high performance, real-time capabilities, digital signal processing, and low-power, low-voltage operation, while maintaining full integration and ease of development.
|
||||
|
||||
The unparalleled and large range of STM32 devices, based on an industry-standard core and accompanied by a vast choice of tools and software, makes this family of products the ideal choice, both for small projects and for entire platform decisions.
|
||||
|
||||
.. contents::
|
||||
|
||||
Packages
|
||||
--------
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Name
|
||||
- Alias
|
||||
- Contents
|
||||
* - ``toolchain-gccarmnoneeabi``
|
||||
- toolchain
|
||||
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_,
|
||||
`GDB <http://www.gnu.org/software/gdb/>`_
|
||||
* - ``tool-stlink``
|
||||
- uploader
|
||||
- `STLink <https://github.com/texane/stlink>`_
|
||||
* - ``framework-cmsis``
|
||||
-
|
||||
- See below in :ref:`stm32_frameworks`
|
||||
* - ``framework-spl``
|
||||
-
|
||||
- See below in :ref:`stm32_frameworks`
|
||||
* - ``framework-opencm3``
|
||||
-
|
||||
- See below in :ref:`stm32_frameworks`
|
||||
|
||||
.. warning::
|
||||
**Linux Users:** Don't forget to install "udev" rules file
|
||||
`99-platformio-udev.rules <https://github.com/ivankravets/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
||||
|
||||
|
||||
.. _stm32_frameworks:
|
||||
|
||||
Frameworks
|
||||
----------
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Type ``framework``
|
||||
- Name
|
||||
- Reference
|
||||
* - ``cmsis``
|
||||
- Vendor-independent hardware abstraction layer for the Cortex-M processor series
|
||||
- `Documentation <http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php>`__
|
||||
* - ``spl``
|
||||
- Standard Peripheral Library for STM32 MCUs
|
||||
- `Documentation <http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF257890>`__
|
||||
* - ``opencm3``
|
||||
- libOpenCM3 Framework
|
||||
- `Documentation <http://www.libopencm3.org>`__
|
||||
|
||||
|
||||
Boards
|
||||
------
|
||||
|
||||
.. note::
|
||||
* You can list pre-configured boards by :ref:`cmd_boards` command
|
||||
* For more detailed ``board`` information please scroll tables below by
|
||||
horizontal.
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Type ``board``
|
||||
- Name
|
||||
- Microcontroller ``board_mcu``
|
||||
- Frequency ``board_f_cpu``
|
||||
- Flash
|
||||
- RAM
|
||||
* - ``stm32ldiscovery``
|
||||
- `Discovery kit for STM32L151/152 line <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF250990?sc=internet/evalboard/product/250990.jsp>`_
|
||||
- STM32L152rbt6 ``cortex-m3``
|
||||
- 32 MHz ``32000000L``
|
||||
- 128 Kb
|
||||
- 16 Kb
|
||||
* - ``stm32f3discovery``
|
||||
- `Discovery kit for STM32F303xx microcontrollers
|
||||
<http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF254044>`_
|
||||
- STM32F303vct6 ``cortex-m4``
|
||||
- 72 MHz ``72000000L``
|
||||
- 256 Kb
|
||||
- 48 Kb
|
||||
* - ``stm32f4discovery``
|
||||
- `Discovery kit for STM32F407/417 lines
|
||||
<http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF252419>`_
|
||||
- STM32F407vgt6 ``cortex-m4``
|
||||
- 168 Mhz ``168000000L``
|
||||
- 1 Mb
|
||||
- 192 Kb
|
||||
|
||||
More detailed information you can find here
|
||||
`STM32 Discovery kits <http://www.st.com/web/en/catalog/tools/FM116/SC959/SS1532/LN1848?icmp=ln1848_pron_pr-stm32f446_dec2014&sc=stm32discovery-pr>`_.
|
||||
101
docs/platforms/teensy.rst
Normal file
@@ -0,0 +1,101 @@
|
||||
.. _platform_teensy:
|
||||
|
||||
Platform ``teensy``
|
||||
===================
|
||||
|
||||
`Teensy <https://www.pjrc.com/teensy/>`_ is a complete USB-based microcontroller development system, in a very small footprint, capable of implementing many types of projects. All programming is done via the USB port. No special programmer is needed, only a standard "Mini-B" USB cable and a PC or Macintosh with a USB port.
|
||||
|
||||
.. contents::
|
||||
|
||||
Packages
|
||||
--------
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Name
|
||||
- Alias
|
||||
- Contents
|
||||
* - ``toolchain-gccarmnoneeabi``
|
||||
- toolchain
|
||||
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_,
|
||||
`GDB <http://www.gnu.org/software/gdb/>`_
|
||||
* - ``toolchain-atmelavr``
|
||||
- toolchain
|
||||
- `avr-gcc <https://gcc.gnu.org/wiki/avr-gcc>`_,
|
||||
`GDB <http://www.gnu.org/software/gdb/>`_,
|
||||
`AVaRICE <http://avarice.sourceforge.net>`_,
|
||||
`SimulAVR <http://www.nongnu.org/simulavr/>`_
|
||||
* - ``tool-teensy``
|
||||
- uploader
|
||||
- `Teensy Loader <https://www.pjrc.com/teensy/loader.html>`_
|
||||
* - ``framework-arduinoteensy``
|
||||
-
|
||||
- See below in :ref:`teensy_frameworks`
|
||||
|
||||
|
||||
.. warning::
|
||||
**Linux Users:** Don't forget to install "udev" rules file
|
||||
`99-platformio-udev.rules <https://github.com/ivankravets/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
||||
|
||||
|
||||
.. _teensy_frameworks:
|
||||
|
||||
Frameworks
|
||||
----------
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Type ``framework``
|
||||
- Name
|
||||
- Reference
|
||||
* - ``arduino``
|
||||
- Arduino Wiring-based Framework
|
||||
- `Documentation <http://arduino.cc/en/Reference/HomePage>`_
|
||||
|
||||
|
||||
Boards
|
||||
------
|
||||
|
||||
.. note::
|
||||
* You can list pre-configured boards by :ref:`cmd_boards` command
|
||||
* For more detailed ``board`` information please scroll tables below by
|
||||
horizontal.
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Type ``board``
|
||||
- Name
|
||||
- Microcontroller ``board_mcu``
|
||||
- Frequency ``board_f_cpu``
|
||||
- Flash
|
||||
- RAM
|
||||
* - ``teensy20``
|
||||
- `Teensy 2.0 <https://www.pjrc.com/store/teensy.html>`_
|
||||
- ATmega32u4 ``atmega32u4``
|
||||
- 16 MHz ``16000000L``
|
||||
- 32 Kb
|
||||
- 2.5 Kb
|
||||
* - ``teensy20pp``
|
||||
- `Teensy++ 2.0 <https://www.pjrc.com/store/teensypp.html>`_
|
||||
- AT90USB1289 ``at90usb1286``
|
||||
- 16 MHz ``16000000L``
|
||||
- 128 Kb
|
||||
- 8 Kb
|
||||
* - ``teensy30``
|
||||
- `Teensy 3.0 <https://www.pjrc.com/store/teensy3.html>`_
|
||||
- MK20DX128 ``cortex-m4``
|
||||
- 48 Mhz ``48000000L``
|
||||
- 128 kb
|
||||
- 16 Kb
|
||||
* - ``teensy31``
|
||||
- `Teensy 3.1 <https://www.pjrc.com/store/teensy31.html>`_
|
||||
- MK20DX256 ``cortex-m4``
|
||||
- 72 Mhz ``72000000L``
|
||||
- 256 kb
|
||||
- 64 Kb
|
||||
|
||||
More detailed information you can find here
|
||||
`Teensy USB Development Boards <https://www.pjrc.com/teensy/>`_.
|
||||
120
docs/platforms/timsp430.rst
Normal file
@@ -0,0 +1,120 @@
|
||||
.. _platform_timsp430:
|
||||
|
||||
Platform ``timsp430``
|
||||
=====================
|
||||
|
||||
`MSP430 microcontrollers (MCUs) from Texas Instruments (TI) <http://www.ti.com/lsds/ti/microcontrollers_16-bit_32-bit/msp/overview.page>`_
|
||||
are 16-bit, RISC-based, mixed-signal processors designed for ultra-low power.
|
||||
These MCUs offer the lowest power consumption and the perfect mix of integrated
|
||||
peripherals for thousands of applications.
|
||||
|
||||
.. contents::
|
||||
|
||||
Packages
|
||||
--------
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Name
|
||||
- Alias
|
||||
- Contents
|
||||
* - ``toolchain-timsp430``
|
||||
- toolchain
|
||||
- `msp-gcc <http://sourceforge.net/projects/mspgcc/>`_,
|
||||
`GDB <http://www.gnu.org/software/gdb/>`_
|
||||
* - ``tool-mspdebug``
|
||||
- uploader
|
||||
- `MSPDebug <http://mspdebug.sourceforge.net>`_
|
||||
* - ``framework-energiamsp430``
|
||||
-
|
||||
- See below in :ref:`timsp430_frameworks`
|
||||
|
||||
|
||||
.. warning::
|
||||
**Linux Users:** Don't forget to install "udev" rules file
|
||||
`99-platformio-udev.rules <https://github.com/ivankravets/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
||||
|
||||
|
||||
.. _timsp430_frameworks:
|
||||
|
||||
Frameworks
|
||||
----------
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Type ``framework``
|
||||
- Name
|
||||
- Reference
|
||||
* - ``energia``
|
||||
- Energia Wiring-based Framework (MSP430 Core)
|
||||
- `Documentation <http://energia.nu/reference/>`_
|
||||
|
||||
|
||||
Boards
|
||||
------
|
||||
|
||||
.. note::
|
||||
* You can list pre-configured boards by :ref:`cmd_boards` command
|
||||
* For more detailed ``board`` information please scroll tables below by
|
||||
horizontal.
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Type ``board``
|
||||
- Name
|
||||
- Microcontroller ``board_mcu``
|
||||
- Frequency ``board_f_cpu``
|
||||
- Flash
|
||||
- RAM
|
||||
* - ``lpmsp430g2231``
|
||||
- `MSP430G2231 LaunchPad <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430g2.html>`_
|
||||
- MSP430G2231 ``msp430g2231``
|
||||
- 16 MHz ``16000000L``
|
||||
- 2 Kb
|
||||
- 128 B
|
||||
* - ``lpmsp430g2452``
|
||||
- `MSP430G2452 LaunchPad <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430g2.html>`_
|
||||
- MSP430G2452 ``msp430g2452``
|
||||
- 16 MHz ``16000000L``
|
||||
- 8 Kb
|
||||
- 256 B
|
||||
* - ``lpmsp430g2553``
|
||||
- `MSP430G2553 LaunchPad <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430g2.html>`_
|
||||
- MSP430G2553 ``msp430g2553``
|
||||
- 16 MHz ``16000000L``
|
||||
- 16 Kb
|
||||
- 512 B
|
||||
* - ``lpmsp430f5529``
|
||||
- `MSP430F5529 LaunchPad (16 Mhz) <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430f5529lp.html>`_
|
||||
- MSP430F5529 ``msp430f5529``
|
||||
- 16 MHz ``16000000L``
|
||||
- 128 Kb
|
||||
- 8 KB
|
||||
* - ``lpmsp430f5529_25``
|
||||
- `MSP430F5529 LaunchPad (25 Mhz) <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430f5529lp.html>`_
|
||||
- MSP430F5529 ``msp430f5529``
|
||||
- 25 MHz ``25000000L``
|
||||
- 128 Kb
|
||||
- 8 KB
|
||||
* - ``lpmsp430fr5739``
|
||||
- `MSP430FR5739 Experimenter Board <http://www.ti.com/tool/msp-exp430fr5739>`_
|
||||
- MSP430FR5739 ``msp430fr5739``
|
||||
- 16 MHz ``16000000L``
|
||||
- 16 Kb
|
||||
- 1 KB
|
||||
* - ``lpmsp430fr5969``
|
||||
- `MSP430FR5969 LaunchPad <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430fr5969.html>`_
|
||||
- MSP430FR5969 ``msp430fr5969``
|
||||
- 16 MHz ``16000000L``
|
||||
- 64 Kb
|
||||
- 2 KB
|
||||
|
||||
|
||||
More detailed information you can find here
|
||||
`MSP430 LaunchPads <http://www.ti.com/ww/en/launchpad/launchpads-msp430.html>`_.
|
||||
|
||||
|
||||
|
||||
100
docs/platforms/titiva.rst
Normal file
@@ -0,0 +1,100 @@
|
||||
.. _platform_titiva:
|
||||
|
||||
Platform ``titiva``
|
||||
===================
|
||||
|
||||
`Texas Instruments TM4C12x MCUs <http://www.ti.com/lsds/ti/microcontrollers_16-bit_32-bit/c2000_performance/control_automation/tm4c12x/overview.page>`_
|
||||
offer the industry’s most popular ARM®
|
||||
Cortex®-M4 core with scalable memory and package options, unparalleled
|
||||
connectivity peripherals, advanced application functions, industry-leading
|
||||
analog integration, and extensive software solutions.
|
||||
|
||||
.. contents::
|
||||
|
||||
Packages
|
||||
--------
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Name
|
||||
- Alias
|
||||
- Contents
|
||||
* - ``toolchain-gccarmnoneeabi``
|
||||
- toolchain
|
||||
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded/>`_,
|
||||
`GDB <http://www.gnu.org/software/gdb/>`_
|
||||
* - ``tool-lm4flash``
|
||||
- uploader
|
||||
- `Flash Programmer <http://www.ti.com/tool/lmflashprogrammer>`_
|
||||
* - ``framework-energiativa``
|
||||
-
|
||||
- See below in :ref:`titiva_frameworks`
|
||||
* - ``framework-opencm3``
|
||||
-
|
||||
- See below in :ref:`titiva_frameworks`
|
||||
|
||||
.. warning::
|
||||
**Linux Users:** Don't forget to install "udev" rules file
|
||||
`99-platformio-udev.rules <https://github.com/ivankravets/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
||||
|
||||
|
||||
.. _titiva_frameworks:
|
||||
|
||||
Frameworks
|
||||
----------
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Type ``framework``
|
||||
- Name
|
||||
- Reference
|
||||
* - ``energia``
|
||||
- Energia Wiring-based Framework (LM4F Core)
|
||||
- `Documentation <http://energia.nu/reference/>`__
|
||||
* - ``opencm3``
|
||||
- libOpenCM3 Framework
|
||||
- `Documentation <http://www.libopencm3.org>`__
|
||||
|
||||
|
||||
Boards
|
||||
------
|
||||
|
||||
.. note::
|
||||
* You can list pre-configured boards by :ref:`cmd_boards` command
|
||||
* For more detailed ``board`` information please scroll tables below by
|
||||
horizontal.
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Type ``board``
|
||||
- Name
|
||||
- Microcontroller ``board_mcu``
|
||||
- Frequency ``board_f_cpu``
|
||||
- Flash
|
||||
- RAM
|
||||
* - ``lplm4f120h5qr``
|
||||
- `Stellaris LM4F120 LaunchPad <http://www.ti.com/tool/ek-lm4f120xl>`_
|
||||
- LM4F120H5QR ``cortex-m4``
|
||||
- 80 MHz ``80000000L``
|
||||
- 256 Kb
|
||||
- 32 Kb
|
||||
* - ``lptm4c1230c3pm``
|
||||
- `Tiva C Series TM4C123G LaunchPad
|
||||
<http://www.ti.com/ww/en/launchpad/launchpads-connected-ek-tm4c123gxl.html>`_
|
||||
- TM4C123GH6PM ``cortex-m4``
|
||||
- 80 MHz ``80000000L``
|
||||
- 256 Kb
|
||||
- 32 Kb
|
||||
* - ``lptm4c1294ncpdt``
|
||||
- `Tiva C Series TM4C1294 Connected LaunchPad
|
||||
<http://www.ti.com/ww/en/launchpad/launchpads-connected-ek-tm4c1294xl.html>`_
|
||||
- TM4C1294NCPDT ``cortex-m4``
|
||||
- 120 Mhz ``120000000L``
|
||||
- 1 Mb
|
||||
- 256 Kb
|
||||
|
||||
More detailed information you can find here
|
||||
`TIVA C Series LaunchPads <http://www.ti.com/ww/en/launchpad/launchpads-connected.html>`_.
|
||||
448
docs/projectconf.rst
Normal file
@@ -0,0 +1,448 @@
|
||||
.. _projectconf:
|
||||
|
||||
Project Configuration File ``platformio.ini``
|
||||
=============================================
|
||||
|
||||
The Project configuration file is named ``platformio.ini``. This is a
|
||||
`INI-style <http://en.wikipedia.org/wiki/INI_file>`_ file.
|
||||
|
||||
``platformio.ini`` has sections (each denoted by a ``[header]``) and
|
||||
key / value pairs within the sections. A sign ``#`` at the beginning of the
|
||||
line indicates a comment. Comment lines are ignored.
|
||||
|
||||
The sections and their allowable values are described below.
|
||||
|
||||
.. contents::
|
||||
|
||||
[platformio]
|
||||
------------
|
||||
|
||||
A ``platformio`` section is used for overriding default configuration options
|
||||
|
||||
.. note::
|
||||
Relative path is allowed for directory option:
|
||||
|
||||
* ``~`` will be expanded to user's home directory
|
||||
* ``../`` or ``..\`` go up to one folder
|
||||
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
.. _projectconf_pio_home_dir:
|
||||
|
||||
``home_dir``
|
||||
^^^^^^^^^^^^
|
||||
|
||||
Is used to store platform tool chains, frameworks, external libraries,
|
||||
service data and etc.
|
||||
|
||||
A default value is User's home directory:
|
||||
|
||||
* Unix ``~/.platformio``
|
||||
* Windows ``%HOMEPATH%\.platformio``
|
||||
|
||||
This option can be overridden by global environment variable
|
||||
:ref:`envvar_PLATFORMIO_HOME_DIR`.
|
||||
|
||||
.. _projectconf_pio_lib_dir:
|
||||
|
||||
``lib_dir``
|
||||
^^^^^^^^^^^
|
||||
|
||||
This directory is used to store external libraries downloaded by
|
||||
:ref:`librarymanager`.
|
||||
|
||||
A default value is ``%home_dir%/lib``.
|
||||
|
||||
This option can be overridden by global environment variable
|
||||
:ref:`envvar_PLATFORMIO_LIB_DIR`.
|
||||
|
||||
.. _projectconf_pio_src_dir:
|
||||
|
||||
``src_dir``
|
||||
^^^^^^^^^^^
|
||||
|
||||
A path to project's source directory. PlatformIO uses it for :ref:`cmd_run`
|
||||
command.
|
||||
|
||||
A default value is ``%project_dir%/src``.
|
||||
|
||||
This option can be overridden by global environment variable
|
||||
:ref:`envvar_PLATFORMIO_SRC_DIR`.
|
||||
|
||||
.. note::
|
||||
This option is useful for people who migrate from Arduino/Energia IDEs where
|
||||
source directory should have the same name like the main source file.
|
||||
See `example <https://github.com/ivankravets/platformio/tree/develop/examples/atmelavr-and-arduino/arduino-own-src_dir>`__ project with own source directory.
|
||||
|
||||
.. _projectconf_pio_envs_dir:
|
||||
|
||||
``envs_dir``
|
||||
^^^^^^^^^^^^
|
||||
|
||||
*PlatformIO Builder* within :ref:`cmd_run` command uses this folder for project
|
||||
environments to store compiled object files, static libraries, firmwares and
|
||||
other cached information. It allows PlatformIO to build source code extremely
|
||||
fast!
|
||||
|
||||
*You can delete this folder without any risk!* If you modify :ref:`projectconf`,
|
||||
then PlatformIO will remove this folder automatically. It will be created on the
|
||||
next build operation.
|
||||
|
||||
A default value is ``%project_dir%/.pioenvs``.
|
||||
|
||||
This option can be overridden by global environment variable
|
||||
:ref:`envvar_PLATFORMIO_ENVS_DIR`.
|
||||
|
||||
.. note::
|
||||
If you have any problems with building your Project environmets which
|
||||
are defined in :ref:`projectconf`, then **TRY TO DELETE** this folder. In
|
||||
this situation you will remove all cached files without any risk.
|
||||
|
||||
[env:NAME]
|
||||
----------
|
||||
|
||||
A section with ``env:`` prefix is used to define virtual environment with
|
||||
specific options that will be processed with :ref:`cmd_run` command. You can
|
||||
define unlimited numbers of environments.
|
||||
|
||||
Each environment must have unique ``NAME``. The valid chars for ``NAME`` are
|
||||
|
||||
* letters ``a-z``
|
||||
* numbers ``0-9``
|
||||
* special char ``_`` (underscore)
|
||||
|
||||
For example, ``[env:hello_world]``.
|
||||
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
.. _projectconf_env_platform:
|
||||
|
||||
``platform``
|
||||
^^^^^^^^^^^^
|
||||
|
||||
:ref:`Platform <platforms>` type
|
||||
|
||||
|
||||
.. _projectconf_env_framework:
|
||||
|
||||
``framework``
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
See ``framework`` type in *Frameworks* section of :ref:`platforms`
|
||||
|
||||
|
||||
.. _projectconf_env_board:
|
||||
|
||||
``board``
|
||||
^^^^^^^^^
|
||||
|
||||
*PlatformIO* has pre-configured settings for the most popular boards. You don't
|
||||
need to specify ``board_mcu``, ``board_f_cpu``, ``upload_protocol`` or
|
||||
``upload_speed`` options. Just define a ``board`` type and *PlatformIO* will
|
||||
pre-fill options described above with appropriate values.
|
||||
|
||||
You can find the ``board`` type in *Boards* section of each :ref:`platforms`.
|
||||
|
||||
|
||||
``board_mcu``
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
``board_mcu`` is a microcontroller(MCU) type that is used by compiler to
|
||||
recognize MCU architecture. The correct type of ``board_mcu`` depends on
|
||||
platform library. For example, the list of ``board_mcu`` for "megaAVR Devices"
|
||||
is described `here <http://www.nongnu.org/avr-libc/user-manual/>`_.
|
||||
|
||||
The full list of ``board_mcu`` for the popular embedded platforms you can find
|
||||
in *Boards* section of :ref:`platforms`. See "Microcontroller" column.
|
||||
|
||||
|
||||
``board_f_cpu``
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
An option ``board_f_cpu`` is used to define MCU frequency (Hertz, Clock). A
|
||||
format of this option is ``C-like long integer`` value with ``L`` suffix. The
|
||||
1 Hertz is equal to ``1L``, then 16 Mhz (Mega Hertz) is equal to ``16000000L``.
|
||||
|
||||
The full list of ``board_f_cpu`` for the popular embedded platforms you can
|
||||
find in *Boards* section of :ref:`platforms`. See "Frequency" column.
|
||||
|
||||
|
||||
``upload_port``
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
This option is used by "uploader" tool when sending firmware to board via
|
||||
``upload_port``. For example,
|
||||
|
||||
* ``/dev/ttyUSB0`` - Unix-based OS
|
||||
* ``COM3`` - Windows OS
|
||||
|
||||
If ``upload_port`` isn't specified, then *PlatformIO* will try to detect it
|
||||
automatically.
|
||||
|
||||
To print all available serial ports use :ref:`cmd_serialports` command.
|
||||
|
||||
|
||||
``upload_protocol``
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
A protocol that "uploader" tool uses to talk to the board.
|
||||
|
||||
|
||||
``upload_speed``
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
A connection speed (`baud rate <http://en.wikipedia.org/wiki/Baud>`_)
|
||||
which "uploader" tool uses when sending firmware to board.
|
||||
|
||||
|
||||
``targets``
|
||||
^^^^^^^^^^^
|
||||
|
||||
A list with targets which will be processed by :ref:`cmd_run` command by
|
||||
default. You can enter more then one target separated with "space".
|
||||
|
||||
When no targets are defined, *PlatformIO* will build only sources by default.
|
||||
|
||||
.. note::
|
||||
This option is useful to enable "auto-uploading" after building operation
|
||||
(``targets = upload``).
|
||||
|
||||
|
||||
.. _projectconf_build_flags:
|
||||
|
||||
``build_flags``
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
These flags/options control preprocessing, compilation, assembly and linking
|
||||
processes:
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Format
|
||||
- Scope
|
||||
- Description
|
||||
* - ``Wp,option``
|
||||
- CPPFLAGS
|
||||
- Bypass the compiler driver and pass *option* directly through to the
|
||||
preprocessor
|
||||
* - ``-D name``
|
||||
- CPPDEFINES
|
||||
- Predefine *name* as a macro, with definition 1.
|
||||
* - ``-D name=definition``
|
||||
- CPPDEFINES
|
||||
- The contents of *definition* are tokenized and processed as if they
|
||||
appeared during translation phase three in a ``#define`` directive.
|
||||
* - ``-U name``
|
||||
- CPPDEFINES
|
||||
- Cancel any previous definition of *name*, either built in or provided
|
||||
with a ``-D`` option.
|
||||
* - ``-Wall``
|
||||
- CCFLAGS
|
||||
- Turns on all optional warnings which are desirable for normal code.
|
||||
* - ``-Werror``
|
||||
- CCFLAGS
|
||||
- Make all warnings into hard errors. Source code which triggers warnings will be rejected.
|
||||
* - ``-w``
|
||||
- CCFLAGS
|
||||
- Suppress all warnings, including those which GNU CPP issues by default.
|
||||
* - ``-include file``
|
||||
- CCFLAGS
|
||||
- Process *file* as if ``#include "file"`` appeared as the first line of
|
||||
the primary source file.
|
||||
* - ``-Wa,option``
|
||||
- ASFLAGS, CCFLAGS
|
||||
- Pass *option* as an option to the assembler. If *option* contains
|
||||
commas, it is split into multiple options at the commas.
|
||||
* - ``-llibrary``
|
||||
- LIBS
|
||||
- Search the *library* named library when linking
|
||||
* - ``-Ldir``
|
||||
- LIBPATH
|
||||
- Add directory *dir* to the list of directories to be searched for
|
||||
``-l``.
|
||||
* - ``-Idir``
|
||||
- CPPPATH
|
||||
- Add the directory *dir* to the list of directories to be searched
|
||||
for header files.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:specific_defines]
|
||||
build_flags = -O2 -Dfoo -Dbar=1
|
||||
|
||||
[env:specific_inclibs]
|
||||
build_flags = -I/opt/include -L/opt/lib -lfoo
|
||||
|
||||
|
||||
For more detailed information about available flags/options go to:
|
||||
|
||||
* `Options to Request or Suppress Warnings
|
||||
<https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html>`_
|
||||
* `Options for Debugging Your Program
|
||||
<https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html>`_
|
||||
* `Options That Control Optimization
|
||||
<https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html>`_
|
||||
* `Options Controlling the Preprocessor
|
||||
<https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html>`_
|
||||
* `Passing Options to the Assembler
|
||||
<https://gcc.gnu.org/onlinedocs/gcc/Assembler-Options.html>`_
|
||||
* `Options for Linking <https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html>`_
|
||||
* `Options for Directory Search
|
||||
<https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html>`_
|
||||
|
||||
.. _projectconf_srcbuild_flags:
|
||||
|
||||
``srcbuild_flags``
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
An option ``srcbuild_flags`` has the same behaviour like ``build_flags``
|
||||
but will be applied only for the project source code from
|
||||
:ref:`projectconf_pio_src_dir` directory.
|
||||
|
||||
This option can be overridden by global environment variable
|
||||
:ref:`envvar_PLATFORMIO_SRCBUILD_FLAGS`.
|
||||
|
||||
``ignore_libs``
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
Specify libraries which should be ignored by ``Library Dependency Finder``
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:ignore_some_libs]
|
||||
ignore_libs = SPI,EngduinoV3_ID123
|
||||
|
||||
|
||||
.. _projectconf_examples:
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. note::
|
||||
A full list with project examples can be found in
|
||||
`PlatformIO Repository <https://github.com/ivankravets/platformio/tree/develop/examples>`_.
|
||||
|
||||
1. :ref:`platform_atmelavr`: Arduino UNO board with auto pre-configured
|
||||
``board_*`` and ``upload_*`` options (use only ``board`` option) and Arduino
|
||||
Wiring-based Framework
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:atmelavr_arduino_uno_board]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = uno
|
||||
|
||||
# enable auto-uploading
|
||||
targets = upload
|
||||
|
||||
|
||||
2. :ref:`platform_atmelavr`: Microduino Core (ATmega168P, 3.3V) board with
|
||||
auto pre-configured ``board_*`` and ``upload_*`` options (use only
|
||||
``board`` option) and Arduino Wiring-based Framework
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:atmelavr_microduino_core_board]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = 168pa8m
|
||||
|
||||
# enable auto-uploading
|
||||
targets = upload
|
||||
|
||||
|
||||
3. :ref:`platform_atmelavr`: Raspduino board with
|
||||
auto pre-configured ``board_*`` and ``upload_*`` options (use only
|
||||
``board`` option) and Arduino Wiring-based Framework
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:atmelavr_raspduino_board]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = raspduino
|
||||
|
||||
upload_port = /dev/ttyS0
|
||||
|
||||
# enable auto-uploading
|
||||
targets = upload
|
||||
|
||||
|
||||
4. :ref:`platform_atmelavr`: Embedded board that is based on ATmega168 MCU with
|
||||
"arduino" bootloader
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:atmelavr_atmega168_board]
|
||||
platform = atmelavr
|
||||
board_mcu = atmega168
|
||||
board_f_cpu = 16000000L
|
||||
|
||||
upload_port = /dev/ttyUSB0
|
||||
# for Windows OS
|
||||
# upload_port = COM3
|
||||
upload_protocol = arduino
|
||||
upload_speed = 19200
|
||||
|
||||
# enable auto-uploading
|
||||
targets = upload
|
||||
|
||||
|
||||
5. Upload firmware via USB programmer (USBasp) to :ref:`platform_atmelavr`
|
||||
microcontrollers
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:atmelavr_usbasp]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = pro8MHzatmega328
|
||||
upload_protocol = usbasp -B5
|
||||
|
||||
|
||||
6. :ref:`platform_timsp430`: TI MSP430G2553 LaunchPad with auto pre-configured
|
||||
``board_*`` and ``upload_*`` options (use only ``board`` option) and Energia
|
||||
Wiring-based Framework
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:timsp430_g2553_launchpad]
|
||||
platform = timsp430
|
||||
framework = energia
|
||||
board = lpmsp430g2553
|
||||
|
||||
|
||||
7. :ref:`platform_timsp430`: Embedded board that is based on MSP430G2553 MCU
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:timsp430_g2553_board]
|
||||
platform = timsp430
|
||||
board_mcu = msp430g2553
|
||||
board_f_cpu = 16000000L
|
||||
|
||||
upload_protocol = rf2500
|
||||
|
||||
# enable auto-uploading
|
||||
targets = upload
|
||||
|
||||
|
||||
8. :ref:`platform_titiva`: TI Tiva C ARM Series TM4C123G LaunchPad with auto
|
||||
pre-configured ``board_*`` and ``upload_*`` options (use only ``board``
|
||||
option) and Energia Wiring-based Framework
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:titiva_tm4c1230c3pm_launchpad]
|
||||
platform = titiva
|
||||
framework = energia
|
||||
board = lptm4c1230c3pm
|
||||
|
||||
64
docs/quickstart.rst
Normal file
@@ -0,0 +1,64 @@
|
||||
.. _quickstart:
|
||||
|
||||
Quickstart
|
||||
==========
|
||||
|
||||
.. note::
|
||||
Please read `Get Started <http://platformio.org/#!/get-started>`_
|
||||
article from the official WebSite.
|
||||
|
||||
1. :ref:`Install PlatformIO <installation>`.
|
||||
|
||||
2. Find board ``type`` on this :ref:`Embedded Boards <platforms>` page or
|
||||
via :ref:`cmd_boards` command.
|
||||
|
||||
3. Initialize new PlatformIO based project via :ref:`cmd_init` command with the
|
||||
pre-configured environments for your boards:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio init --board=TYPE_1 --board=TYPE_2 --board=TYPE_N
|
||||
|
||||
Would you like to enable firmware auto-uploading when project is successfully built using `platformio run` command?
|
||||
Don't forget that you can upload firmware manually using `platformio run --target upload` command. [y/N]: y
|
||||
|
||||
The current working directory *** will be used for the new project.
|
||||
You can specify another project directory via
|
||||
`platformio init -d %PATH_TO_THE_PROJECT_DIR%` command.
|
||||
|
||||
The next files/directories will be created in ***
|
||||
platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|
|
||||
src - Put your source code here
|
||||
lib - Put here project specific or 3-rd party libraries
|
||||
Do you want to continue? [y/N]: y
|
||||
Project has been successfully initialized!
|
||||
Useful commands:
|
||||
`platformio run` - process/build project from the current directory
|
||||
`platformio run --target upload` or `platformio run -t upload` - upload firmware to embedded board
|
||||
`platformio run --target clean` - clean project (remove compiled files)
|
||||
|
||||
Put your source code ``*.h, *.c, *.cpp or *.ino`` files to ``src`` directory.
|
||||
|
||||
4. Process the project's environments.
|
||||
|
||||
Change working directory to the project's root where is located
|
||||
:ref:`Project Configuration File (platformio.ini) <projectconf>` and run:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio run
|
||||
|
||||
# if you don't have specified `targets = upload` option for environment,
|
||||
# then you can upload firmware manually with this command:
|
||||
$ platformio run --target upload
|
||||
|
||||
# clean project
|
||||
$ platformio run --target clean
|
||||
|
||||
If you don't have installed required platforms, then *PlatformIO* will propose
|
||||
you to install them automatically.
|
||||
|
||||
Further examples can be found in `PlatformIO Repository <https://github.com/ivankravets/platformio/tree/develop/examples>`_.
|
||||
|
||||
Also, for more detailed information as for commands please go to
|
||||
:ref:`userguide` sections.
|
||||
86
docs/userguide/cmd_boards.rst
Normal file
@@ -0,0 +1,86 @@
|
||||
.. _cmd_boards:
|
||||
|
||||
platformio boards
|
||||
=================
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Print all available pre-configured embedded boards
|
||||
platformio boards
|
||||
|
||||
# Filter boards by "Query"
|
||||
platformio boards QUERY
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
List pre-configured Embedded Boards
|
||||
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
1. Show Arduino-based boards
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio boards arduino
|
||||
|
||||
Platform: atmelavr
|
||||
---------------------------------------------------------------------------
|
||||
Type MCU Frequency Flash RAM Name
|
||||
---------------------------------------------------------------------------
|
||||
btatmega168 atmega168 16Mhz 14Kb 1Kb Arduino BT ATmega168
|
||||
btatmega328 atmega328p 16Mhz 28Kb 2Kb Arduino BT ATmega328
|
||||
diecimilaatmega168 atmega168 16Mhz 14Kb 1Kb Arduino Duemilanove or Diecimila ATmega168
|
||||
diecimilaatmega328 atmega328p 16Mhz 30Kb 2Kb Arduino Duemilanove or Diecimila ATmega328
|
||||
esplora atmega32u4 16Mhz 28Kb 2Kb Arduino Esplora
|
||||
ethernet atmega328p 16Mhz 31Kb 2Kb Arduino Ethernet
|
||||
...
|
||||
|
||||
|
||||
2. Show boards which are based on ``ATmega168`` MCU
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio boards atmega168
|
||||
|
||||
Platform: atmelavr
|
||||
---------------------------------------------------------------------------
|
||||
Type MCU Frequency Flash RAM Name
|
||||
---------------------------------------------------------------------------
|
||||
btatmega168 atmega168 16Mhz 14Kb 1Kb Arduino BT ATmega168
|
||||
diecimilaatmega168 atmega168 16Mhz 14Kb 1Kb Arduino Duemilanove or Diecimila ATmega168
|
||||
miniatmega168 atmega168 16Mhz 14Kb 1Kb Arduino Mini ATmega168
|
||||
atmegangatmega168 atmega168 16Mhz 14Kb 1Kb Arduino NG or older ATmega168
|
||||
nanoatmega168 atmega168 16Mhz 14Kb 1Kb Arduino Nano ATmega168
|
||||
pro8MHzatmega168 atmega168 8Mhz 14Kb 1Kb Arduino Pro or Pro Mini ATmega168 (3.3V, 8 MHz)
|
||||
pro16MHzatmega168 atmega168 16Mhz 14Kb 1Kb Arduino Pro or Pro Mini ATmega168 (5V, 16 MHz)
|
||||
lilypadatmega168 atmega168 8Mhz 14Kb 1Kb LilyPad Arduino ATmega168
|
||||
168pa16m atmega168p 16Mhz 15Kb 1Kb Microduino Core (Atmega168PA@16M,5V)
|
||||
168pa8m atmega168p 8Mhz 15Kb 1Kb Microduino Core (Atmega168PA@8M,3.3V)
|
||||
|
||||
3. Show boards by :ref:`platform_timsp430`
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio boards timsp430
|
||||
|
||||
Platform: timsp430
|
||||
---------------------------------------------------------------------------
|
||||
Type MCU Frequency Flash RAM Name
|
||||
---------------------------------------------------------------------------
|
||||
lpmsp430fr5739 msp430fr5739 16Mhz 15Kb 1Kb FraunchPad w/ msp430fr5739
|
||||
lpmsp430f5529 msp430f5529 16Mhz 128Kb 1Kb LaunchPad w/ msp430f5529 (16MHz)
|
||||
lpmsp430f5529_25 msp430f5529 25Mhz 128Kb 1Kb LaunchPad w/ msp430f5529 (25MHz)
|
||||
lpmsp430fr5969 msp430fr5969 8Mhz 64Kb 1Kb LaunchPad w/ msp430fr5969
|
||||
lpmsp430g2231 msp430g2231 1Mhz 2Kb 128B LaunchPad w/ msp430g2231 (1MHz)
|
||||
lpmsp430g2452 msp430g2452 16Mhz 8Kb 256B LaunchPad w/ msp430g2452 (16MHz)
|
||||
lpmsp430g2553 msp430g2553 16Mhz 16Kb 512B LaunchPad w/ msp430g2553 (16MHz)
|
||||
|
||||
121
docs/userguide/cmd_init.rst
Normal file
@@ -0,0 +1,121 @@
|
||||
.. _cmd_init:
|
||||
|
||||
platformio init
|
||||
===============
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio init [OPTIONS]
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Initialize new PlatformIO based project.
|
||||
|
||||
|
||||
This command will create:
|
||||
|
||||
* :ref:`projectconf`
|
||||
* ``src`` - a source directory. Put your source code here
|
||||
* ``lib`` - a directory for the project specific libraries. PlatformIO will
|
||||
compile them to static libraries and link to executable file
|
||||
|
||||
Options
|
||||
-------
|
||||
|
||||
.. option::
|
||||
--project-dir, -d
|
||||
|
||||
A path to the directory where *PlatformIO* will initialise new project.
|
||||
|
||||
.. option::
|
||||
--board, -b
|
||||
|
||||
If you specify board ``type`` (you can pass multiple ``--board`` options), then
|
||||
*PlatformIO* will automatically generate environment for :ref:`projectconf` and
|
||||
pre-fill these data:
|
||||
|
||||
* :ref:`projectconf_env_platform`
|
||||
* :ref:`projectconf_env_framework`
|
||||
* :ref:`projectconf_env_board`
|
||||
|
||||
The full list with pre-configured boards is available here :ref:`platforms`.
|
||||
|
||||
.. option::
|
||||
--disable-auto-uploading
|
||||
|
||||
If you initialise project with the specified ``--board``, then *PlatformIO*
|
||||
will create environment with enabled firmware auto-uploading. This option
|
||||
allows you to disable firmware auto-uploading by default.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
1. Create new project in the current working directory
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio init
|
||||
|
||||
The current working directory *** will be used for the new project.
|
||||
You can specify another project directory via
|
||||
`platformio init -d %PATH_TO_THE_PROJECT_DIR%` command.
|
||||
|
||||
The next files/directories will be created in ***
|
||||
platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|
|
||||
src - Put your source code here
|
||||
lib - Put here project specific or 3-rd party libraries
|
||||
Do you want to continue? [y/N]: y
|
||||
Project has been successfully initialized!
|
||||
Useful commands:
|
||||
`platformio run` - process/build project from the current directory
|
||||
`platformio run --target upload` or `platformio run -t upload` - upload firmware to embedded board
|
||||
`platformio run --target clean` - clean project (remove compiled files)
|
||||
|
||||
|
||||
2. Create new project in the specified directory
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio init -d %PATH_TO_DIR%
|
||||
|
||||
The next files/directories will be created in ***
|
||||
platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|
|
||||
src - Put your source code here
|
||||
lib - Put here project specific or 3-rd party libraries
|
||||
Do you want to continue? [y/N]: y
|
||||
Project has been successfully initialized!
|
||||
Useful commands:
|
||||
`platformio run` - process/build project from the current directory
|
||||
`platformio run --target upload` or `platformio run -t upload` - upload firmware to embedded board
|
||||
`platformio run --target clean` - clean project (remove compiled files)
|
||||
|
||||
3. Initialise project for Arduino Uno
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio init --board uno
|
||||
|
||||
Would you like to enable firmware auto-uploading when project is successfully built using `platformio run` command?
|
||||
Don't forget that you can upload firmware manually using `platformio run --target upload` command. [y/N]: y
|
||||
|
||||
The current working directory *** will be used for the new project.
|
||||
You can specify another project directory via
|
||||
`platformio init -d %PATH_TO_THE_PROJECT_DIR%` command.
|
||||
|
||||
The next files/directories will be created in ***
|
||||
platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|
|
||||
src - Put your source code here
|
||||
lib - Put here project specific or 3-rd party libraries
|
||||
Do you want to continue? [y/N]: y
|
||||
Project has been successfully initialized!
|
||||
Useful commands:
|
||||
`platformio run` - process/build project from the current directory
|
||||
`platformio run --target upload` or `platformio run -t upload` - upload firmware to embedded board
|
||||
`platformio run --target clean` - clean project (remove compiled files)
|
||||
75
docs/userguide/cmd_install.rst
Normal file
@@ -0,0 +1,75 @@
|
||||
.. _cmd_install:
|
||||
|
||||
platformio install
|
||||
==================
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio install [OPTIONS] [PLATFORMS]
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Install pre-built development :ref:`Platforms <platforms>` with related
|
||||
packages.
|
||||
|
||||
There are several predefined aliases for packages, such as:
|
||||
|
||||
* ``toolchain``
|
||||
* ``uploader``
|
||||
|
||||
Options
|
||||
-------
|
||||
|
||||
.. option::
|
||||
--with-package
|
||||
|
||||
Install specified package (or alias)
|
||||
|
||||
|
||||
.. option::
|
||||
--without-package
|
||||
|
||||
Do not install specified package (or alias)
|
||||
|
||||
.. option::
|
||||
--skip-default
|
||||
|
||||
Skip default packages
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
1. Install :ref:`platform_timsp430` with default packages
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio install timsp430
|
||||
Installing toolchain-timsp430 package:
|
||||
Downloading [####################################] 100%
|
||||
Unpacking [####################################] 100%
|
||||
Installing tool-mspdebug package:
|
||||
Downloading [####################################] 100%
|
||||
Unpacking [####################################] 100%
|
||||
Installing framework-energiamsp430 package:
|
||||
Downloading [####################################] 100%
|
||||
Unpacking [####################################] 100%
|
||||
The platform 'timsp430' has been successfully installed!
|
||||
|
||||
|
||||
2. Install :ref:`platform_timsp430` with ``uploader`` utility only and skip
|
||||
default packages
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio install timsp430 --skip-default-package --with-package=uploader
|
||||
Installing tool-mspdebug package:
|
||||
Downloading [####################################] 100%
|
||||
Unpacking [####################################] 100%
|
||||
The platform 'timsp430' has been successfully installed!
|
||||
40
docs/userguide/cmd_list.rst
Normal file
@@ -0,0 +1,40 @@
|
||||
.. _cmd_list:
|
||||
|
||||
platformio list
|
||||
===============
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio list [OPTIONS]
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
List installed :ref:`Platforms <platforms>`
|
||||
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
.. option::
|
||||
--json-output
|
||||
|
||||
Return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio list
|
||||
atmelavr with packages: toolchain-atmelavr, tool-avrdude, framework-arduinoavr, tool-micronucleus
|
||||
atmelsam with packages: framework-arduinosam, ldscripts, toolchain-gccarmnoneeabi, tool-bossac
|
||||
stm32 with packages: toolchain-gccarmnoneeabi, tool-stlink, framework-spl, framework-cmsis, framework-opencm3, ldscripts
|
||||
teensy with packages: toolchain-atmelavr, ldscripts, framework-arduinoteensy, toolchain-gccarmnoneeabi, tool-teensy
|
||||
timsp430 with packages: toolchain-timsp430, tool-mspdebug, framework-energiamsp430
|
||||
titiva with packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa
|
||||
130
docs/userguide/cmd_run.rst
Normal file
@@ -0,0 +1,130 @@
|
||||
.. _cmd_run:
|
||||
|
||||
platformio run
|
||||
==============
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio run [OPTIONS]
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Process environments which are defined in :ref:`projectconf` file
|
||||
|
||||
|
||||
Options
|
||||
-------
|
||||
|
||||
.. option::
|
||||
-e, --environment
|
||||
|
||||
Process specified environments
|
||||
|
||||
|
||||
.. option::
|
||||
-t, --target
|
||||
|
||||
Process specified targets
|
||||
|
||||
.. option::
|
||||
--upload-port
|
||||
|
||||
Upload port of embedded board. To print all available ports use
|
||||
:ref:`cmd_serialports` command
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
1. Process `Wiring Blink Example <https://github.com/ivankravets/platformio/tree/develop/examples/wiring-blink>`_
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio run
|
||||
Processing arduino_pro5v environment:
|
||||
scons: `.pioenvs/arduino_pro5v/firmware.elf' is up to date.
|
||||
scons: `.pioenvs/arduino_pro5v/firmware.hex' is up to date.
|
||||
|
||||
Processing launchpad_msp430g2 environment:
|
||||
scons: `.pioenvs/launchpad_msp430g2/firmware.elf' is up to date.
|
||||
scons: `.pioenvs/launchpad_msp430g2/firmware.hex' is up to date.
|
||||
|
||||
Processing launchpad_lm4f120 environment:
|
||||
scons: `.pioenvs/launchpad_lm4f120/firmware.elf' is up to date.
|
||||
scons: `.pioenvs/launchpad_lm4f120/firmware.hex' is up to date
|
||||
|
||||
|
||||
2. Process specific environment
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio run -e arduino_pro5v -e launchpad_lm4f120
|
||||
Processing arduino_pro5v environment:
|
||||
scons: `.pioenvs/arduino_pro5v/firmware.elf' is up to date.
|
||||
scons: `.pioenvs/arduino_pro5v/firmware.hex' is up to date.
|
||||
|
||||
Processing launchpad_lm4f120 environment:
|
||||
scons: `.pioenvs/launchpad_lm4f120/firmware.elf' is up to date.
|
||||
scons: `.pioenvs/launchpad_lm4f120/firmware.hex' is up to date.
|
||||
|
||||
|
||||
3. Process specific target
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio run -t clean
|
||||
Processing arduino_pro5v environment:
|
||||
Removed .pioenvs/arduino_pro5v/src/main.o
|
||||
...
|
||||
Removed .pioenvs/arduino_pro5v/firmware.hex
|
||||
|
||||
Processing launchpad_msp430g2 environment:
|
||||
Removed .pioenvs/launchpad_msp430g2/src/main.o
|
||||
...
|
||||
Removed .pioenvs/launchpad_msp430g2/firmware.hex
|
||||
|
||||
Processing launchpad_lm4f120 environment:
|
||||
Removed .pioenvs/launchpad_lm4f120/src/main.o
|
||||
...
|
||||
Removed .pioenvs/launchpad_lm4f120/firmware.hex
|
||||
|
||||
|
||||
4. Mix environments and targets
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio run -e launchpad_msp430g2 -t upload
|
||||
Processing launchpad_msp430g2 environment:
|
||||
/Users/ikravets/.platformio/timsp430/tools/mspdebug/mspdebug rf2500 --force-reset "prog .pioenvs/launchpad_msp430g2/firmware.hex"
|
||||
MSPDebug version 0.20 - debugging tool for MSP430 MCUs
|
||||
Copyright (C) 2009-2012 Daniel Beer <dlbeer@gmail.com>
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
Trying to open interface 1 on 009
|
||||
Initializing FET...
|
||||
FET protocol version is 30394216
|
||||
Configured for Spy-Bi-Wire
|
||||
Sending reset...
|
||||
Set Vcc: 3000 mV
|
||||
Device ID: 0x2553
|
||||
Code start address: 0xc000
|
||||
Code size : 16384 byte = 16 kb
|
||||
RAM start address: 0x200
|
||||
RAM end address: 0x3ff
|
||||
RAM size : 512 byte = 0 kb
|
||||
Device: MSP430G2553/G2403
|
||||
Code memory starts at 0xc000
|
||||
Number of breakpoints: 2
|
||||
Chip ID data: 25 53
|
||||
Erasing...
|
||||
Programming...
|
||||
Writing 646 bytes at c000...
|
||||
Writing 32 bytes at ffe0...
|
||||
Done, 678 bytes total
|
||||
61
docs/userguide/cmd_search.rst
Normal file
@@ -0,0 +1,61 @@
|
||||
.. _cmd_search:
|
||||
|
||||
platformio search
|
||||
=================
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio search QUERY [OPTIONS]
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Search for development :ref:`Platforms <platforms>`
|
||||
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
.. option::
|
||||
--json-output
|
||||
|
||||
Return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
|
||||
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
1. Print all available development platforms
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio search
|
||||
atmelavr - An embedded platform for Atmel AVR microcontrollers (with Arduino Framework)
|
||||
atmelsam - An embedded platform for Atmel SAM microcontrollers (with Arduino Framework)
|
||||
stm32 - An embedded platform for STMicroelectronics ARM microcontrollers
|
||||
teensy - An embedded platform for Teensy boards (with Arduino Framework)
|
||||
timsp430 - An embedded platform for TI MSP430 microcontrollers (with Energia Framework)
|
||||
titiva - An embedded platform for TI TIVA C ARM microcontrollers (with Energia and OpenCM3 Frameworks)
|
||||
...
|
||||
|
||||
2. Search for TI development platforms
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio search ti
|
||||
timsp430 - An embedded platform for TI MSP430 microcontrollers (with Energia Framework)
|
||||
titiva - An embedded platform for TI TIVA C ARM microcontrollers (with Energia Framework)
|
||||
|
||||
3. Search for development platforms which support "Arduino Framework"
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio search arduino
|
||||
atmelavr - An embedded platform for Atmel AVR microcontrollers (with Arduino Framework)
|
||||
atmelsam - An embedded platform for Atmel SAM microcontrollers (with Arduino Framework)
|
||||
teensy - An embedded platform for Teensy boards (with Arduino Framework)
|
||||
253
docs/userguide/cmd_serialports.rst
Normal file
@@ -0,0 +1,253 @@
|
||||
.. _cmd_serialports:
|
||||
|
||||
platformio serialports
|
||||
======================
|
||||
|
||||
.. contents::
|
||||
|
||||
platformio serialports list
|
||||
---------------------------
|
||||
|
||||
Usage
|
||||
~~~~~
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio serialports list [OPTIONS]
|
||||
|
||||
|
||||
Description
|
||||
~~~~~~~~~~~
|
||||
|
||||
List available `Serial Ports <http://en.wikipedia.org/wiki/Serial_port>`_
|
||||
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
.. option::
|
||||
--json-output
|
||||
|
||||
Return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
|
||||
|
||||
|
||||
Examples
|
||||
~~~~~~~~
|
||||
|
||||
1. Unix OS
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio serialports list
|
||||
/dev/cu.SLAB_USBtoUART
|
||||
----------
|
||||
Hardware ID: USB VID:PID=10c4:ea60 SNR=0001
|
||||
Description: CP2102 USB to UART Bridge Controller
|
||||
|
||||
/dev/cu.uart-1CFF4676258F4543
|
||||
----------
|
||||
Hardware ID: USB VID:PID=451:f432 SNR=1CFF4676258F4543
|
||||
Description: Texas Instruments MSP-FET430UIF
|
||||
|
||||
|
||||
2. Windows OS
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio serialports list
|
||||
COM4
|
||||
----------
|
||||
Hardware ID: USB VID:PID=0451:F432
|
||||
Description: MSP430 Application UART (COM4)
|
||||
|
||||
COM3
|
||||
----------
|
||||
Hardware ID: USB VID:PID=10C4:EA60 SNR=0001
|
||||
Description: Silicon Labs CP210x USB to UART Bridge (COM3)
|
||||
|
||||
|
||||
.. _cmd_serialports_monitor:
|
||||
|
||||
platformio serialports monitor
|
||||
------------------------------
|
||||
|
||||
Usage
|
||||
~~~~~
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio serialports monitor [OPTIONS]
|
||||
|
||||
|
||||
Description
|
||||
~~~~~~~~~~~
|
||||
|
||||
This is a console application that provides a small terminal
|
||||
application. It is based on `Miniterm <http://pyserial.sourceforge.net/examples.html#miniterm>`_
|
||||
and itself does not implement any terminal features such
|
||||
as *VT102* compatibility. However it inherits these features from the terminal
|
||||
it is run. For example on GNU/Linux running from an *xterm* it will support the
|
||||
escape sequences of the *xterm*. On *Windows* the typical console window is dumb
|
||||
and does not support any escapes. When *ANSI.sys* is loaded it supports some
|
||||
escapes.
|
||||
|
||||
To control *monitor* please use these "hot keys":
|
||||
|
||||
* ``Ctrl+]`` Quit
|
||||
* ``Ctrl+T`` Menu
|
||||
* ``Ctrl+T followed by Ctrl+H`` Help
|
||||
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
.. option::
|
||||
-p, --port
|
||||
|
||||
Port, a number or a device name
|
||||
|
||||
.. option::
|
||||
-b, --baud
|
||||
|
||||
Set baud rate, default ``9600``
|
||||
|
||||
.. option::
|
||||
--parity
|
||||
|
||||
Set parity (*None, Even, Odd, Space, Mark*), one of
|
||||
[``N``, ``E``, ``O``, ``S``, ``M``], default ``N``
|
||||
|
||||
.. option::
|
||||
--rtscts
|
||||
|
||||
Enable ``RTS/CTS`` flow control, default ``Off``
|
||||
|
||||
.. option::
|
||||
--xonxoff
|
||||
|
||||
Enable software flow control, default ``Off``
|
||||
|
||||
.. option::
|
||||
--rts
|
||||
|
||||
Set initial ``RTS`` line state, default ``0``
|
||||
|
||||
.. option::
|
||||
--dtr
|
||||
|
||||
Set initial ``DTR`` line state, default ``0``
|
||||
|
||||
.. option::
|
||||
--echo
|
||||
|
||||
Enable local echo, default ``Off``
|
||||
|
||||
.. option::
|
||||
--cr
|
||||
|
||||
Do not send ``CR+LF``, send ``R`` only, default ``Off``
|
||||
|
||||
.. option::
|
||||
--lf
|
||||
|
||||
Do not send ``CR+LF``, send ``LF`` only, default ``Off``
|
||||
|
||||
.. option::
|
||||
-d, --debug
|
||||
|
||||
Debug received data (escape non-printable chars). ``--debug`` can be given
|
||||
multiple times:
|
||||
|
||||
0. just print what is received
|
||||
1. escape non-printable characters, do newlines as unusual
|
||||
2. escape non-printable characters, newlines too
|
||||
3. hex dump everything
|
||||
|
||||
.. option::
|
||||
--exit-char
|
||||
|
||||
ASCII code of special character that is used to exit the application,
|
||||
default ``0x1d``
|
||||
|
||||
.. option::
|
||||
--menu-char
|
||||
|
||||
ASCII code of special character that is used to control miniterm (menu),
|
||||
default ``0x14``
|
||||
|
||||
.. option::
|
||||
---quiet
|
||||
|
||||
Diagnostics: suppress non-error messages, default ``Off``
|
||||
|
||||
Examples
|
||||
~~~~~~~~
|
||||
|
||||
1. Show available options for *monitor*
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio serialports monitor --help
|
||||
Usage: platformio serialports monitor [OPTIONS]
|
||||
|
||||
Options:
|
||||
-p, --port TEXT Port, a number or a device name
|
||||
-b, --baud INTEGER Set baud rate, default=9600
|
||||
--parity [N|E|O|S|M] Set parity, default=N
|
||||
--rtscts Enable RTS/CTS flow control, default=Off
|
||||
--xonxoff Enable software flow control, default=Off
|
||||
--rts [0|1] Set initial RTS line state, default=0
|
||||
--dtr [0|1] Set initial DTR line state, default=0
|
||||
--echo Enable local echo, default=Off
|
||||
--cr Do not send CR+LF, send CR only, default=Off
|
||||
--lf Do not send CR+LF, send LF only, default=Off
|
||||
-d, --debug Debug received data (escape non-printable chars)
|
||||
--debug can be given multiple times:
|
||||
0: just print what is received
|
||||
1: escape non-printable characters, do newlines as
|
||||
unusual
|
||||
2: escape non-printable characters, newlines too
|
||||
3: hex dump everything
|
||||
--exit-char INTEGER ASCII code of special character that is used to exit
|
||||
the application, default=0x1d
|
||||
--menu-char INTEGER ASCII code of special character that is used to
|
||||
control miniterm (menu), default=0x14
|
||||
--quiet Diagnostics: suppress non-error messages, default=Off
|
||||
--help Show this message and exit.
|
||||
|
||||
2. Communicate with serial device and print help inside terminal
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio serialports monitor
|
||||
|
||||
--- Available ports:
|
||||
--- /dev/cu.Bluetooth-Incoming-Port n/a
|
||||
--- /dev/cu.Bluetooth-Modem n/a
|
||||
--- /dev/cu.SLAB_USBtoUART CP2102 USB to UART Bridge Controller
|
||||
--- /dev/cu.obd2ecu-SPPDev n/a
|
||||
Enter port name:/dev/cu.SLAB_USBtoUART
|
||||
--- Miniterm on /dev/cu.SLAB_USBtoUART: 9600,8,N,1 ---
|
||||
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
|
||||
Hello PlatformIO!
|
||||
--- pySerial (2.7) - miniterm - help
|
||||
---
|
||||
--- Ctrl+] Exit program
|
||||
--- Ctrl+T Menu escape key, followed by:
|
||||
--- Menu keys:
|
||||
--- Ctrl+T Send the menu character itself to remote
|
||||
--- Ctrl+] Send the exit character itself to remote
|
||||
--- Ctrl+I Show info
|
||||
--- Ctrl+U Upload file (prompt will be shown)
|
||||
--- Toggles:
|
||||
--- Ctrl+R RTS Ctrl+E local echo
|
||||
--- Ctrl+D DTR Ctrl+B BREAK
|
||||
--- Ctrl+L line feed Ctrl+A Cycle repr mode
|
||||
---
|
||||
--- Port settings (Ctrl+T followed by the following):
|
||||
--- p change port
|
||||
--- 7 8 set data bits
|
||||
--- n e o s m change parity (None, Even, Odd, Space, Mark)
|
||||
--- 1 2 3 set stop bits (1, 2, 1.5)
|
||||
--- b change baud rate
|
||||
--- x X disable/enable software flow control
|
||||
--- r R disable/enable hardware flow control
|
||||
--- exit ---
|
||||
182
docs/userguide/cmd_settings.rst
Normal file
@@ -0,0 +1,182 @@
|
||||
.. _cmd_settings:
|
||||
|
||||
platformio settings
|
||||
===================
|
||||
|
||||
Manage PlatformIO settings
|
||||
|
||||
.. contents::
|
||||
|
||||
platformio settings get
|
||||
-----------------------
|
||||
|
||||
Usage
|
||||
~~~~~
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio settings get [NAME]
|
||||
|
||||
|
||||
Description
|
||||
~~~~~~~~~~~
|
||||
|
||||
Get/List existing settings
|
||||
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
.. option:: auto_update_libraries
|
||||
|
||||
:Default: Yes
|
||||
:Values: Yes/No
|
||||
|
||||
Automatically update libraries.
|
||||
|
||||
.. option:: auto_update_platforms
|
||||
|
||||
:Default: Yes
|
||||
:Values: Yes/No
|
||||
|
||||
Automatically update platforms.
|
||||
|
||||
.. option:: check_libraries_interval
|
||||
|
||||
:Default: 7
|
||||
:Values: Days (Number)
|
||||
|
||||
Check for the library updates interval.
|
||||
|
||||
.. option:: check_platformio_interval
|
||||
|
||||
:Default: 3
|
||||
:Values: Days (Number)
|
||||
|
||||
Check for the new PlatformIO interval.
|
||||
|
||||
.. option:: check_platforms_interval
|
||||
|
||||
:Default: 7
|
||||
:Values: Days (Number)
|
||||
|
||||
Check for the platform updates interval.
|
||||
|
||||
.. option:: enable_prompts
|
||||
|
||||
:Default: Yes
|
||||
:Values: Yes/No
|
||||
|
||||
Can PlatformIO communicate with you via prompts?
|
||||
|
||||
* propose to install platforms which aren't installed yet
|
||||
* paginate over library search results
|
||||
* and etc.
|
||||
|
||||
.. warning::
|
||||
If you are going to run *PlatformIO* from **subprocess**, you **MUST
|
||||
DISABLE** all prompts. It will allow you to avoid blocking.
|
||||
|
||||
.. option:: enable_telemetry
|
||||
|
||||
:Default: Yes
|
||||
:Values: Yes/No
|
||||
|
||||
Shares commands, platforms and libraries usage to help us make PlatformIO
|
||||
better.
|
||||
|
||||
|
||||
.. note::
|
||||
* The ``Yes`` value is equl to: ``True``, ``Y``, ``1``.
|
||||
The value is not case sensetive.
|
||||
* You can override these settings using :ref:`envvars`.
|
||||
|
||||
Examples
|
||||
~~~~~~~~
|
||||
|
||||
1. List all settings and theirs current values
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio settings get
|
||||
Name Value [Default] Description
|
||||
------------------------------------------------------------------------------------------
|
||||
auto_update_libraries Yes Automatically update libraries (Yes/No)
|
||||
auto_update_platforms Yes Automatically update platforms (Yes/No)
|
||||
check_libraries_interval 7 Check for the library updates interval (days)
|
||||
check_platformio_interval 3 Check for the new PlatformIO interval (days)
|
||||
check_platforms_interval 7 Check for the platform updates interval (days)
|
||||
enable_prompts Yes Can PlatformIO communicate with you via prompts: propose to install platforms which aren't installed yet, paginate over library search results and etc.)? ATTENTION!!! If you call PlatformIO like subprocess, please disable prompts to avoid blocking (Yes/No)
|
||||
enable_telemetry Yes Shares commands, platforms and libraries usage to help us make PlatformIO better (Yes/No)
|
||||
|
||||
|
||||
2. Show specified setting
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio settings get auto_update_platforms
|
||||
Name Value [Default] Description
|
||||
------------------------------------------------------------------------------------------
|
||||
auto_update_platforms Yes Automatically update platforms (Yes/No)
|
||||
|
||||
|
||||
platformio settings set
|
||||
-----------------------
|
||||
|
||||
Usage
|
||||
~~~~~
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio settings set NAME VALUE
|
||||
|
||||
|
||||
Description
|
||||
~~~~~~~~~~~
|
||||
|
||||
Set new value for the setting
|
||||
|
||||
Examples
|
||||
~~~~~~~~
|
||||
|
||||
Change to check for the new PlatformIO each day
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio settings set check_platformio_interval 1
|
||||
The new value for the setting has been set!
|
||||
Name Value [Default] Description
|
||||
------------------------------------------------------------------------------------------
|
||||
check_platformio_interval 1 [3] Check for the new PlatformIO interval (days)
|
||||
|
||||
|
||||
platformio settings reset
|
||||
-------------------------
|
||||
|
||||
Usage
|
||||
~~~~~
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio settings reset
|
||||
|
||||
|
||||
Description
|
||||
~~~~~~~~~~~
|
||||
|
||||
Reset settings to default
|
||||
|
||||
Examples
|
||||
~~~~~~~~
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio settings reset
|
||||
The settings have been reseted!
|
||||
|
||||
Name Value [Default] Description
|
||||
------------------------------------------------------------------------------------------
|
||||
auto_update_libraries Yes Automatically update libraries (Yes/No)
|
||||
auto_update_platforms Yes Automatically update platforms (Yes/No)
|
||||
check_libraries_interval 7 Check for the library updates interval (days)
|
||||
check_platformio_interval 3 Check for the new PlatformIO interval (days)
|
||||
check_platforms_interval 7 Check for the platform updates interval (days)
|
||||
45
docs/userguide/cmd_show.rst
Normal file
@@ -0,0 +1,45 @@
|
||||
.. _cmd_show:
|
||||
|
||||
platformio show
|
||||
===============
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio show PLATFORM
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Show details about the installed :ref:`Platforms <platforms>`
|
||||
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio show atmelavr
|
||||
atmelavr - An embedded platform for Atmel AVR microcontrollers (with Arduino Framework)
|
||||
----------
|
||||
Package: toolchain-atmelavr
|
||||
Alias: toolchain
|
||||
Version: 1
|
||||
Installed: 2014-12-13 23:58:48
|
||||
----------
|
||||
Package: tool-avrdude
|
||||
Version: 2
|
||||
Installed: 2015-02-13 22:23:17
|
||||
----------
|
||||
Package: framework-arduinoavr
|
||||
Version: 12
|
||||
Installed: 2015-02-23 20:57:40
|
||||
----------
|
||||
Package: tool-micronucleus
|
||||
Version: 1
|
||||
Installed: 2015-02-23 21:20:14
|
||||
31
docs/userguide/cmd_uninstall.rst
Normal file
@@ -0,0 +1,31 @@
|
||||
.. _cmd_uninstall:
|
||||
|
||||
platformio uninstall
|
||||
====================
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio uninstall PLATFORM
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Uninstall specified :ref:`Platforms <platforms>`
|
||||
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio uninstall timsp430
|
||||
Uninstalling toolchain-timsp430 package: [OK]
|
||||
Uninstalling tool-mspdebug package: [OK]
|
||||
Uninstalling framework-energiamsp430 package: [OK]
|
||||
The platform 'timsp430' has been successfully uninstalled!
|
||||
99
docs/userguide/cmd_update.rst
Normal file
@@ -0,0 +1,99 @@
|
||||
.. _cmd_update:
|
||||
|
||||
platformio update
|
||||
=================
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio update
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Check or update installed :ref:`Platforms <platforms>`
|
||||
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio update
|
||||
|
||||
Platform atmelavr
|
||||
--------
|
||||
Updating toolchain-atmelavr package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating tool-avrdude package:
|
||||
Versions: Current=2, Latest=2 [Up-to-date]
|
||||
Updating framework-arduinoavr package:
|
||||
Versions: Current=12, Latest=12 [Up-to-date]
|
||||
Updating tool-micronucleus package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
|
||||
Platform atmelsam
|
||||
--------
|
||||
Updating framework-arduinosam package:
|
||||
Versions: Current=3, Latest=3 [Up-to-date]
|
||||
Updating ldscripts package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating toolchain-gccarmnoneeabi package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating tool-bossac package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
|
||||
Platform stm32
|
||||
--------
|
||||
Updating toolchain-gccarmnoneeabi package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating tool-stlink package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating framework-spl package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating framework-cmsis package:
|
||||
Versions: Current=2, Latest=2 [Up-to-date]
|
||||
Updating framework-opencm3 package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating ldscripts package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
|
||||
Platform teensy
|
||||
--------
|
||||
Updating toolchain-atmelavr package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating ldscripts package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating framework-arduinoteensy package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating toolchain-gccarmnoneeabi package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating tool-teensy package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
|
||||
Platform timsp430
|
||||
--------
|
||||
Updating toolchain-timsp430 package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating tool-mspdebug package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating framework-energiamsp430 package:
|
||||
Versions: Current=2, Latest=2 [Up-to-date]
|
||||
|
||||
Platform titiva
|
||||
--------
|
||||
Updating ldscripts package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating toolchain-gccarmnoneeabi package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating tool-lm4flash package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating framework-opencm3 package:
|
||||
Versions: Current=1, Latest=1 [Up-to-date]
|
||||
Updating framework-energiativa package:
|
||||
Versions: Current=4, Latest=4 [Up-to-date]
|
||||
32
docs/userguide/cmd_upgrade.rst
Normal file
@@ -0,0 +1,32 @@
|
||||
.. _cmd_upgrade:
|
||||
|
||||
platformio upgrade
|
||||
==================
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio upgrade
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Check or upgrade PlatformIO to the latest version
|
||||
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio upgrade
|
||||
You're up-to-date!
|
||||
PlatformIO x.x.x is currently the newest version available.
|
||||
|
||||
# If you have problem with permissions try:
|
||||
$ sudo platformio upgrade
|
||||
29
docs/userguide/index.rst
Normal file
@@ -0,0 +1,29 @@
|
||||
.. _userguide:
|
||||
|
||||
User Guide
|
||||
==========
|
||||
|
||||
To print all available commands and options use:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio --help
|
||||
$ platformio COMMAND --help
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
cmd_boards
|
||||
cmd_init
|
||||
cmd_install
|
||||
platformio lib <lib/index>
|
||||
cmd_list
|
||||
cmd_run
|
||||
cmd_search
|
||||
cmd_serialports
|
||||
cmd_settings
|
||||
cmd_show
|
||||
cmd_uninstall
|
||||
cmd_update
|
||||
cmd_upgrade
|
||||
72
docs/userguide/lib/cmd_install.rst
Normal file
@@ -0,0 +1,72 @@
|
||||
.. _cmd_lib_install:
|
||||
|
||||
platformio lib install
|
||||
======================
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio lib install [OPTIONS] [LIBRARY_ID]
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Install new library by specified
|
||||
`PlatformIO Library Registry ID <http://platformio.org/#!/lib>`_.
|
||||
|
||||
Options
|
||||
-------
|
||||
|
||||
.. option::
|
||||
-v, --version
|
||||
|
||||
Install specified version of library
|
||||
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
1. Install the latest version of library
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# IRremote: http://platformio.org/#!/lib/show/4/IRremote
|
||||
$ platformio lib install 4
|
||||
# Installing library [ 4 ]:
|
||||
# Downloading [####################################] 100%
|
||||
# Unpacking [####################################] 100%
|
||||
# The library #4 'IRremote' has been successfully installed!
|
||||
|
||||
|
||||
2. Install specified version of library
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# XBee: http://platformio.org/#!/lib/show/6/XBee
|
||||
$ platformio lib install 6 --version=0.5
|
||||
# Installing library [ 6 ]:
|
||||
# Downloading [####################################] 100%
|
||||
# Unpacking [####################################] 100%
|
||||
# The library #6 'XBee' has been successfully installed!
|
||||
|
||||
|
||||
3. Install library with dependencies
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Adafruit-ST7735: http://platformio.org/#!/lib/show/12/Adafruit-ST7735
|
||||
$ platformio lib install 12
|
||||
# Installing library [ 12 ]:
|
||||
# Downloading [####################################] 100%
|
||||
# Unpacking [####################################] 100%
|
||||
# The library #12 'Adafruit-ST7735' has been successfully installed!
|
||||
# Installing dependencies:
|
||||
# Installing library [ 13 ]:
|
||||
# Downloading [####################################] 100%
|
||||
# Unpacking [####################################] 100%
|
||||
# The library #13 'Adafruit-GFX' has been successfully installed!
|
||||
46
docs/userguide/lib/cmd_list.rst
Normal file
@@ -0,0 +1,46 @@
|
||||
.. _cmd_lib_list:
|
||||
|
||||
platformio lib list
|
||||
===================
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio lib list [OPTIONS]
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
List installed libraries
|
||||
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
.. option::
|
||||
--json-output
|
||||
|
||||
Return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio lib list
|
||||
#
|
||||
# [ ID ] Name Compatibility "Authors": Description
|
||||
# -------------------------------------------------------------------------------------
|
||||
# [ 23 ] Adafruit-L3GD20-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for the L3GD20 Gyroscope
|
||||
# [ 12 ] Adafruit-ST7735 arduino, atmelavr "Adafruit Industries": A library for the Adafruit 1.8" SPI display
|
||||
# [ 31 ] Adafruit-Unified-Sensor arduino, atmelavr "Adafruit Industries": Adafruit Unified Sensor Driver
|
||||
# [ 26 ] Adafruit-LSM303DLHC-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for Adafruit's LSM303 Breakout (Accelerometer + Magnetometer)
|
||||
# [ 6 ] XBee arduino, atmelavr "Andrew Rapp": Arduino library for communicating with XBees in API mode
|
||||
# [ 13 ] Adafruit-GFX arduino, atmelavr "Adafruit Industries": A core graphics library for all our displays, providing a common set of graphics primitives (points, lines, circles, etc.)
|
||||
# [ 4 ] IRremote arduino, atmelavr "Ken Shirriff": Send and receive infrared signals with multiple protocols
|
||||
# [ 14 ] Adafruit-9DOF-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for the Adafruit 9DOF Breakout (L3GD20 / LSM303)
|
||||
# ...
|
||||
26
docs/userguide/lib/cmd_register.rst
Normal file
@@ -0,0 +1,26 @@
|
||||
.. _cmd_lib_register:
|
||||
|
||||
platformio lib register
|
||||
=======================
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio lib regiter [HTTP_URL_TO_LIBRARY.JSON]
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Register new library and allow others to install it.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio lib register http://my.example.com/library.json
|
||||
213
docs/userguide/lib/cmd_search.rst
Normal file
@@ -0,0 +1,213 @@
|
||||
.. _cmd_lib_search:
|
||||
|
||||
platformio lib search
|
||||
=====================
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio lib search [OPTIONS] [QUERY]
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Search for library in `PlatformIO Library Registry <http://platformio.org/#!/lib>`_
|
||||
by :ref:`library_config` fields in the boolean mode.
|
||||
|
||||
The boolean search capability supports the following operators:
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Operator
|
||||
- Description
|
||||
* - ``+``
|
||||
- A leading or trailing plus sign indicates that this word must be present
|
||||
in library fields (see above) that is returned.
|
||||
* - ``-``
|
||||
- A leading or trailing minus sign indicates that this word must not be
|
||||
present in any of the libraries that are returned.
|
||||
* - ``(no operator)``
|
||||
- By default (when neither ``+`` nor ``-`` is specified), the
|
||||
word is optional, but the libraries that contain it are rated higher.
|
||||
* - ``> <``
|
||||
- These two operators are used to change a word's contribution to the
|
||||
relevance value that is assigned to a library. The ``>`` operator
|
||||
increases the contribution and the ``<`` operator decreases it.
|
||||
* - ``( )``
|
||||
- Parentheses group words into subexpressions. Parenthesized groups can
|
||||
be nested.
|
||||
* - ``~``
|
||||
- A leading tilde acts as a negation operator, causing the word's
|
||||
contribution to the library's relevance to be negative. This is useful for
|
||||
marking "noise" words. A library containing such a word is rated lower than
|
||||
others, but is not excluded altogether, as it would be with the ``-`` operator.
|
||||
* - ``*``
|
||||
- The asterisk serves as the truncation (or wildcard) operator. Unlike the
|
||||
other operators, it is appended to the word to be affected. Words match if
|
||||
they begin with the word preceding the ``*`` operator.
|
||||
* - ``"``
|
||||
- A phrase that is enclosed within double quote (``"``) characters matches
|
||||
only libraries that contain the phrase literally, as it was typed.
|
||||
|
||||
For more detail information please go to
|
||||
`MySQL Boolean Full-Text Searches <http://dev.mysql.com/doc/refman/5.6/en/fulltext-boolean.html>`_.
|
||||
|
||||
Options
|
||||
-------
|
||||
|
||||
.. option::
|
||||
-a, --author
|
||||
|
||||
Filter libraries by specified author
|
||||
|
||||
.. option::
|
||||
-k, --keyword
|
||||
|
||||
Filter libraries by specified keyword
|
||||
|
||||
|
||||
.. option::
|
||||
-f, --framework
|
||||
|
||||
Filter libraries by specified framework
|
||||
|
||||
|
||||
.. option::
|
||||
-p, --platform
|
||||
|
||||
Filter libraries by specified keyword
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
1. List all libraries
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio lib search
|
||||
# Found N libraries:
|
||||
#
|
||||
# [ ID ] Name Compatibility "Authors": Description
|
||||
# -------------------------------------------------------------------------------------
|
||||
# [ 14 ] Adafruit-9DOF-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for the Adafruit 9DOF Breakout (L3GD20 / LSM303)
|
||||
# [ 13 ] Adafruit-GFX arduino, atmelavr "Adafruit Industries": A core graphics library for all our displays, providing a common set of graphics primitives (points, lines, circles, etc.)
|
||||
# [ 23 ] Adafruit-L3GD20-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for the L3GD20 Gyroscope
|
||||
# [ 26 ] Adafruit-LSM303DLHC-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for Adafruit's LSM303 Breakout (Accelerometer + Magnetometer)
|
||||
# [ 12 ] Adafruit-ST7735 arduino, atmelavr "Adafruit Industries": A library for the Adafruit 1.8" SPI display
|
||||
# [ 31 ] Adafruit-Unified-Sensor arduino, atmelavr "Adafruit Industries": Adafruit Unified Sensor Driver
|
||||
# [ 4 ] IRremote arduino, atmelavr "Ken Shirriff": Send and receive infrared signals with multiple protocols
|
||||
# [ 1 ] OneWire arduino, atmelavr "Paul Stoffregen": Control devices (from Dallas Semiconductor) that use the One Wire protocol (DS18S20, DS18B20, DS2408 and etc)
|
||||
# [ 6 ] XBee arduino, atmelavr "Andrew Rapp": Arduino library for communicating with XBees in API mode
|
||||
# [ 15 ] Adafruit-ADXL345-Unified arduino, atmelavr "Adafruit Industries": Unified driver for the ADXL345 Accelerometer
|
||||
# Show next libraries? [y/N]:
|
||||
# ...
|
||||
|
||||
2. Search for `1-Wire libraries <http://platformio.org/#!/lib/search?query=%25221-wire%2522>`_
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio lib search "1-wire"
|
||||
# Found N libraries:
|
||||
#
|
||||
# [ ID ] Name Compatibility "Authors": Description
|
||||
# -------------------------------------------------------------------------------------
|
||||
# [ 1 ] OneWire arduino, atmelavr "Paul Stoffregen": Control devices (from Dallas Semiconductor) that use the One Wire protocol (DS18S20, DS18B20, DS2408 and etc)
|
||||
# ...
|
||||
|
||||
3. Search for `Arduino-based "I2C" libraries <http://platformio.org/#!/lib/search?query=framework%253Aarduino%2520i2c>`_
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio lib search "i2c" --framework="arduino"
|
||||
# Found N libraries:
|
||||
#
|
||||
# [ ID ] Name Compatibility "Authors": Description
|
||||
# -------------------------------------------------------------------------------------
|
||||
# [ 11 ] I2Cdevlib-Core arduino, atmelavr "Jeff Rowberg": The I2C Device Library (I2Cdevlib) is a collection of uniform and well-documented classes to provide simple and intuitive interfaces to I2C devices.
|
||||
# [ 24 ] Adafruit-L3GD20 arduino, atmelavr "Adafruit Industries": Driver for Adafruit's L3GD20 I2C Gyroscope Breakout
|
||||
# [ 10 ] I2Cdevlib-AK8975 arduino, atmelavr "Jeff Rowberg": AK8975 is 3-axis electronic compass IC with high sensitive Hall sensor technology
|
||||
# [ 14 ] Adafruit-9DOF-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for the Adafruit 9DOF Breakout (L3GD20 / LSM303)
|
||||
# ...
|
||||
|
||||
4. Search for `libraries by "web" and "http" keywords <http://platformio.org/#!/lib/search?query=keyword%253A%2522web%2522%2520keyword%253A%2522http%2522>`_.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio lib search --keyword="web" --keyword="http"
|
||||
# Found N libraries:
|
||||
#
|
||||
# [ ID ] Name Compatibility "Authors": Description
|
||||
# -------------------------------------------------------------------------------------
|
||||
# [ 5 ] Webduino arduino, atmelavr "Ben Combee": An extensible web server library (for use with the Arduino WizNet Ethernet Shield)
|
||||
# [ 17 ] Adafruit-CC3000 arduino, atmelavr "Adafruit Industries": Library code for Adafruit's CC3000 Wi-Fi/WiFi breakouts
|
||||
# ...
|
||||
|
||||
5. Search for `libraries by "Adafruit Industries" author <http://platformio.org/#!/lib/search?query=author%253A%2522Adafruit%20Industries%2522>`_
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio lib search --author="Adafruit Industries"
|
||||
# Found N libraries:
|
||||
#
|
||||
# [ ID ] Name Compatibility "Authors": Description
|
||||
# -------------------------------------------------------------------------------------
|
||||
# [ 14 ] Adafruit-9DOF-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for the Adafruit 9DOF Breakout (L3GD20 / LSM303)
|
||||
# [ 13 ] Adafruit-GFX arduino, atmelavr "Adafruit Industries": A core graphics library for all our displays, providing a common set of graphics primitives (points, lines, circles, etc.)
|
||||
# [ 23 ] Adafruit-L3GD20-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for the L3GD20 Gyroscope
|
||||
# [ 26 ] Adafruit-LSM303DLHC-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for Adafruit's LSM303 Breakout (Accelerometer + Magnetometer)
|
||||
# ...
|
||||
|
||||
6. Search for `libraries which are compatible with Dallas temperature sensors <http://platformio.org/#!/lib/search?query=DS*>`_
|
||||
like DS18B20, DS18S20 and etc.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio lib search "DS*"
|
||||
# Found N libraries:
|
||||
#
|
||||
# [ ID ] Name Compatibility "Authors": Description
|
||||
# -------------------------------------------------------------------------------------
|
||||
# [ 1 ] OneWire arduino, atmelavr "Paul Stoffregen": Control devices (from Dallas Semiconductor) that use the One Wire protocol (DS18S20, DS18B20, DS2408 and etc)
|
||||
# ...
|
||||
|
||||
7. Search for `Energia-based *nRF24* or *HttpClient* libraries <http://platformio.org/#!/lib/search?query=framework%253Aenergia%2520%252B(nRF24%2520HttpClient)>`_.
|
||||
The search query that is described below can be interpreted like
|
||||
``energia nRF24 OR energia HttpClient``
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio lib search "+(nRF24 HttpClient)" --framework="energia"
|
||||
# Found 2 libraries:
|
||||
#
|
||||
# [ ID ] Name Compatibility "Authors": Description
|
||||
# -------------------------------------------------------------------------------------
|
||||
# [ 46 ] HttpClient energia, timsp430, titiva "Zack Lalanne": HttpClient is a library to make it easier to interact with web servers
|
||||
# [ 43 ] nRF24 energia, timsp430 "Eric": The nRF24L01 is a low-cost 2.4GHz ISM transceiver module. It supports a number of channel frequencies in the 2.4GHz band and a range of data rates.
|
||||
|
||||
|
||||
8. Search for the `all sensor libraries excluding temperature <http://platformio.org/#!/lib/search?query=sensor%2520-temperature>`_.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio lib search "sensor -temperature"
|
||||
# Found N libraries:
|
||||
#
|
||||
# [ ID ] Name Compatibility "Authors": Description
|
||||
# -------------------------------------------------------------------------------------
|
||||
# [ 31 ] Adafruit-Unified-Sensor arduino, atmelavr "Adafruit Industries": Adafruit Unified Sensor Driver
|
||||
# [ 10 ] I2Cdevlib-AK8975 arduino, atmelavr "Jeff Rowberg": AK8975 is 3-axis electronic compass IC with high sensitive Hall sensor technology
|
||||
# [ 14 ] Adafruit-9DOF-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for the Adafruit 9DOF Breakout (L3GD20 / LSM303)
|
||||
# [ 23 ] Adafruit-L3GD20-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for the L3GD20 Gyroscope
|
||||
# [ 26 ] Adafruit-LSM303DLHC-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for Adafruit's LSM303 Breakout (Accelerometer + Magnetometer)
|
||||
# [ 33 ] Adafruit-TMP006 arduino, atmelavr "Adafruit Industries": A library for the Adafruit TMP006 Infrared Thermopile Sensor
|
||||
# [ 34 ] Adafruit-TSL2561-Unified arduino, atmelavr "Adafruit Industries": Unified light sensor driver for Adafruit's TSL2561 breakouts
|
||||
# [ 97 ] I2Cdevlib-BMA150 arduino, atmelavr "Jeff Rowberg": The BMA150 is a triaxial, low-g acceleration sensor IC with digital output for consumer market applications
|
||||
# [ 106 ] I2Cdevlib-MPR121 arduino, atmelavr "Jeff Rowberg": The MPR121 is a 12-bit proximity capacitive touch sensor
|
||||
# [ 111 ] I2Cdevlib-AK8975 energia, timsp430 "Jeff Rowberg": AK8975 is 3-axis electronic compass IC with high sensitive Hall sensor technology
|
||||
# Show next libraries? [y/N]:
|
||||
37
docs/userguide/lib/cmd_show.rst
Normal file
@@ -0,0 +1,37 @@
|
||||
.. _cmd_lib_show:
|
||||
|
||||
platformio lib show
|
||||
===================
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio lib show ID
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Show details about the installed library
|
||||
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# OneWire: http://platformio.org/#!/lib/show/1/OneWire
|
||||
$ platformio lib show 1
|
||||
# OneWire
|
||||
# -------
|
||||
# Authors: Paul Stoffregen <paul@pjrc.com> http://www.pjrc.com/teensy/td_libs_OneWire.html (maintainer), Jim Studt, Jason Dangel <dangel.jason@gmail.com>, Derek Yerger, Tom Pollard <pollard@alum.mit.edu>, Robin James
|
||||
# Keywords: onewire, 1-wire, bus, sensor, temperature, ibutton
|
||||
# Frameworks: arduino
|
||||
# Platforms: atmelavr
|
||||
# Version: 2.2
|
||||
#
|
||||
# Control devices (from Dallas Semiconductor) that use the One Wire protocol (DS18S20, DS18B20, DS2408 and etc)
|
||||
29
docs/userguide/lib/cmd_uninstall.rst
Normal file
@@ -0,0 +1,29 @@
|
||||
.. _cmd_lib_uninstall:
|
||||
|
||||
platformio lib uninstall
|
||||
========================
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio lib uninstall ID
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Uninstall specified library
|
||||
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# XBee: http://platformio.org/#!/lib/show/6/XBee
|
||||
$ platformio lib uninstall 6
|
||||
# The library #6 'XBee' has been successfully uninstalled!
|
||||
43
docs/userguide/lib/cmd_update.rst
Normal file
@@ -0,0 +1,43 @@
|
||||
.. _cmd_lib_update:
|
||||
|
||||
platformio lib update
|
||||
=====================
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio lib update
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Check or update installed libraries
|
||||
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio lib update
|
||||
# Updating [ 23 ] Adafruit-L3GD20-Unified library:
|
||||
# Versions: Current=63de2eb9ea, Latest=63de2eb9ea [Up-to-date]
|
||||
# Updating [ 12 ] Adafruit-ST7735 library:
|
||||
# Versions: Current=e880eb1687, Latest=e880eb1687 [Up-to-date]
|
||||
# Updating [ 31 ] Adafruit-Unified-Sensor library:
|
||||
# Versions: Current=88ae805bce, Latest=88ae805bce [Up-to-date]
|
||||
# Updating [ 26 ] Adafruit-LSM303DLHC-Unified library:
|
||||
# Versions: Current=59767208a8, Latest=59767208a8 [Up-to-date]
|
||||
# Updating [ 13 ] Adafruit-GFX library:
|
||||
# Versions: Current=a9e5bc4707, Latest=a9e5bc4707 [Up-to-date]
|
||||
# Updating [ 1 ] OneWire library:
|
||||
# Versions: Current=2.2, Latest=2.2 [Up-to-date]
|
||||
# Updating [ 4 ] IRremote library:
|
||||
# Versions: Current=f2dafe5030, Latest=f2dafe5030 [Up-to-date]
|
||||
# Updating [ 14 ] Adafruit-9DOF-Unified library:
|
||||
# Versions: Current=b2f07242ac, Latest=b2f07242ac [Up-to-date]
|
||||
23
docs/userguide/lib/index.rst
Normal file
@@ -0,0 +1,23 @@
|
||||
.. _userguide_lib:
|
||||
|
||||
Library Manager
|
||||
===============
|
||||
|
||||
To print all available commands and options use:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio lib --help
|
||||
$ platformio lib COMMAND --help
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
cmd_install
|
||||
cmd_list
|
||||
cmd_register
|
||||
cmd_search
|
||||
cmd_show
|
||||
cmd_uninstall
|
||||
cmd_update
|
||||
@@ -1,20 +0,0 @@
|
||||
Arduino Example: Build code with internal library
|
||||
=================================================
|
||||
|
||||
1. Download ``platformio``
|
||||
`sources <https://github.com/ivankravets/platformio/archive/develop.zip>`_
|
||||
2. Extract ZIP archive
|
||||
3. Then run these commands:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Change directory to example
|
||||
$ cd platformio-develop/examples/arduino-internal-library/
|
||||
|
||||
# Install Atmel AVR development platform with Arduino Framework
|
||||
$ platformio install atmelavr
|
||||
|
||||
# Process example project
|
||||
$ platformio run
|
||||
|
||||
.. image:: console-result.png
|
||||
|
Before Width: | Height: | Size: 806 KiB |
@@ -1,7 +0,0 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
|
||||
[env:arduino_pro5v]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = pro16MHzatmega168
|
||||
@@ -1,51 +0,0 @@
|
||||
/**
|
||||
* Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
* See LICENSE for details.
|
||||
*/
|
||||
|
||||
/*
|
||||
* EEPROM Read
|
||||
*
|
||||
* Reads the value of each byte of the EEPROM and prints it
|
||||
* to the computer.
|
||||
* This example code is in the public domain.
|
||||
*
|
||||
* https://github.com/arduino/Arduino/blob/master/libraries/EEPROM/examples/eeprom_read/eeprom_read.ino
|
||||
*/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <EEPROM.h>
|
||||
|
||||
// start reading from the first byte (address 0) of the EEPROM
|
||||
int address = 0;
|
||||
byte value;
|
||||
|
||||
void setup()
|
||||
{
|
||||
// initialize serial and wait for port to open:
|
||||
Serial.begin(9600);
|
||||
while (!Serial) {
|
||||
; // wait for serial port to connect. Needed for Leonardo only
|
||||
}
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
// read a byte from the current address of the EEPROM
|
||||
value = EEPROM.read(address);
|
||||
|
||||
Serial.print(address);
|
||||
Serial.print("\t");
|
||||
Serial.print(value, DEC);
|
||||
Serial.println();
|
||||
|
||||
// advance to the next address of the EEPROM
|
||||
address = address + 1;
|
||||
|
||||
// there are only 512 bytes of EEPROM, from 0 to 511, so if we're
|
||||
// on address 512, wrap around to address 0
|
||||
if (address == 512)
|
||||
address = 0;
|
||||
|
||||
delay(500);
|
||||
}
|
||||
21
examples/atmelavr-and-arduino/adafruit-blink/README.rst
Normal file
@@ -0,0 +1,21 @@
|
||||
How to buid PlatformIO based project
|
||||
====================================
|
||||
|
||||
1. `Install PlatformIO <http://docs.platformio.org/en/latest/installation.html>`_
|
||||
2. Download `source code with examples <https://github.com/ivankravets/platformio/archive/develop.zip>`_
|
||||
3. Extract ZIP archive
|
||||
4. Run these commands:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Change directory to example
|
||||
> cd platformio-develop/examples/atmelavr-and-arduino/adafruit-blink
|
||||
|
||||
# Process example project
|
||||
> platformio run
|
||||
|
||||
# Upload firmware
|
||||
> platformio run --target upload
|
||||
|
||||
# Clean build files
|
||||
> platformio run --target clean
|
||||
33
examples/atmelavr-and-arduino/adafruit-blink/platformio.ini
Normal file
@@ -0,0 +1,33 @@
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:flora8]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = flora8
|
||||
|
||||
[env:trinket3]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = trinket3
|
||||
|
||||
[env:protrinket5]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = protrinket5
|
||||
24
examples/atmelavr-and-arduino/adafruit-blink/src/Blink.pde
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
Blink
|
||||
Turns on an LED on for one second, then off for one second, repeatedly.
|
||||
|
||||
This example code is in the public domain.
|
||||
*/
|
||||
|
||||
int led = 1; // blink 'digital' pin 1 - AKA the built in red LED
|
||||
|
||||
// the setup routine runs once when you press reset:
|
||||
void setup() {
|
||||
// initialize the digital pin as an output.
|
||||
pinMode(led, OUTPUT);
|
||||
|
||||
}
|
||||
|
||||
// the loop routine runs over and over again forever:
|
||||
void loop() {
|
||||
digitalWrite(led, HIGH);
|
||||
delay(1000);
|
||||
digitalWrite(led, LOW);
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
How to buid PlatformIO based project
|
||||
====================================
|
||||
|
||||
1. `Install PlatformIO <http://docs.platformio.org/en/latest/installation.html>`_
|
||||
2. Download `source code with examples <https://github.com/ivankravets/platformio/archive/develop.zip>`_
|
||||
3. Extract ZIP archive
|
||||
4. Run these commands:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Change directory to example
|
||||
> cd platformio-develop/examples/atmelavr-and-arduino/arduino-external-libs
|
||||
|
||||
# Process example project
|
||||
> platformio run
|
||||
|
||||
# Upload firmware
|
||||
> platformio run --target upload
|
||||
|
||||
# Clean build files
|
||||
> platformio run --target clean
|
||||
1
examples/atmelavr-and-arduino/arduino-external-libs/lib/Adafruit-PCD8544-Nokia-5110-LCD-library
Submodule
@@ -0,0 +1,23 @@
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:arduino_uno]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = uno
|
||||
@@ -0,0 +1,350 @@
|
||||
/*********************************************************************
|
||||
This is an example sketch for our Monochrome Nokia 5110 LCD Displays
|
||||
|
||||
Pick one up today in the adafruit shop!
|
||||
------> http://www.adafruit.com/products/338
|
||||
|
||||
These displays use SPI to communicate, 4 or 5 pins are required to
|
||||
interface
|
||||
|
||||
Adafruit invests time and resources providing this open source code,
|
||||
please support Adafruit and open-source hardware by purchasing
|
||||
products from Adafruit!
|
||||
|
||||
Written by Limor Fried/Ladyada for Adafruit Industries.
|
||||
BSD license, check license.txt for more information
|
||||
All text above, and the splash screen must be included in any redistribution
|
||||
*********************************************************************/
|
||||
|
||||
#include <SPI.h>
|
||||
#include <Adafruit_GFX.h>
|
||||
#include <Adafruit_PCD8544.h>
|
||||
|
||||
// Software SPI (slower updates, more flexible pin options):
|
||||
// pin 7 - Serial clock out (SCLK)
|
||||
// pin 6 - Serial data out (DIN)
|
||||
// pin 5 - Data/Command select (D/C)
|
||||
// pin 4 - LCD chip select (CS)
|
||||
// pin 3 - LCD reset (RST)
|
||||
Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3);
|
||||
|
||||
// Hardware SPI (faster, but must use certain hardware pins):
|
||||
// SCK is LCD serial clock (SCLK) - this is pin 13 on Arduino Uno
|
||||
// MOSI is LCD DIN - this is pin 11 on an Arduino Uno
|
||||
// pin 5 - Data/Command select (D/C)
|
||||
// pin 4 - LCD chip select (CS)
|
||||
// pin 3 - LCD reset (RST)
|
||||
// Adafruit_PCD8544 display = Adafruit_PCD8544(5, 4, 3);
|
||||
// Note with hardware SPI MISO and SS pins aren't used but will still be read
|
||||
// and written to during SPI transfer. Be careful sharing these pins!
|
||||
|
||||
#define NUMFLAKES 10
|
||||
#define XPOS 0
|
||||
#define YPOS 1
|
||||
#define DELTAY 2
|
||||
|
||||
|
||||
#define LOGO16_GLCD_HEIGHT 16
|
||||
#define LOGO16_GLCD_WIDTH 16
|
||||
|
||||
static const unsigned char PROGMEM logo16_glcd_bmp[] =
|
||||
{ B00000000, B11000000,
|
||||
B00000001, B11000000,
|
||||
B00000001, B11000000,
|
||||
B00000011, B11100000,
|
||||
B11110011, B11100000,
|
||||
B11111110, B11111000,
|
||||
B01111110, B11111111,
|
||||
B00110011, B10011111,
|
||||
B00011111, B11111100,
|
||||
B00001101, B01110000,
|
||||
B00011011, B10100000,
|
||||
B00111111, B11100000,
|
||||
B00111111, B11110000,
|
||||
B01111100, B11110000,
|
||||
B01110000, B01110000,
|
||||
B00000000, B00110000 };
|
||||
|
||||
void setup() {
|
||||
Serial.begin(9600);
|
||||
|
||||
display.begin();
|
||||
// init done
|
||||
|
||||
// you can change the contrast around to adapt the display
|
||||
// for the best viewing!
|
||||
display.setContrast(50);
|
||||
|
||||
display.display(); // show splashscreen
|
||||
delay(2000);
|
||||
display.clearDisplay(); // clears the screen and buffer
|
||||
|
||||
// draw a single pixel
|
||||
display.drawPixel(10, 10, BLACK);
|
||||
display.display();
|
||||
delay(2000);
|
||||
display.clearDisplay();
|
||||
|
||||
// draw many lines
|
||||
testdrawline();
|
||||
display.display();
|
||||
delay(2000);
|
||||
display.clearDisplay();
|
||||
|
||||
// draw rectangles
|
||||
testdrawrect();
|
||||
display.display();
|
||||
delay(2000);
|
||||
display.clearDisplay();
|
||||
|
||||
// draw multiple rectangles
|
||||
testfillrect();
|
||||
display.display();
|
||||
delay(2000);
|
||||
display.clearDisplay();
|
||||
|
||||
// draw mulitple circles
|
||||
testdrawcircle();
|
||||
display.display();
|
||||
delay(2000);
|
||||
display.clearDisplay();
|
||||
|
||||
// draw a circle, 10 pixel radius
|
||||
display.fillCircle(display.width()/2, display.height()/2, 10, BLACK);
|
||||
display.display();
|
||||
delay(2000);
|
||||
display.clearDisplay();
|
||||
|
||||
testdrawroundrect();
|
||||
delay(2000);
|
||||
display.clearDisplay();
|
||||
|
||||
testfillroundrect();
|
||||
delay(2000);
|
||||
display.clearDisplay();
|
||||
|
||||
testdrawtriangle();
|
||||
delay(2000);
|
||||
display.clearDisplay();
|
||||
|
||||
testfilltriangle();
|
||||
delay(2000);
|
||||
display.clearDisplay();
|
||||
|
||||
// draw the first ~12 characters in the font
|
||||
testdrawchar();
|
||||
display.display();
|
||||
delay(2000);
|
||||
display.clearDisplay();
|
||||
|
||||
// text display tests
|
||||
display.setTextSize(1);
|
||||
display.setTextColor(BLACK);
|
||||
display.setCursor(0,0);
|
||||
display.println("Hello, world!");
|
||||
display.setTextColor(WHITE, BLACK); // 'inverted' text
|
||||
display.println(3.141592);
|
||||
display.setTextSize(2);
|
||||
display.setTextColor(BLACK);
|
||||
display.print("0x"); display.println(0xDEADBEEF, HEX);
|
||||
display.display();
|
||||
delay(2000);
|
||||
|
||||
// rotation example
|
||||
display.clearDisplay();
|
||||
display.setRotation(1); // rotate 90 degrees counter clockwise, can also use values of 2 and 3 to go further.
|
||||
display.setTextSize(1);
|
||||
display.setTextColor(BLACK);
|
||||
display.setCursor(0,0);
|
||||
display.println("Rotation");
|
||||
display.setTextSize(2);
|
||||
display.println("Example!");
|
||||
display.display();
|
||||
delay(2000);
|
||||
|
||||
// revert back to no rotation
|
||||
display.setRotation(0);
|
||||
|
||||
// miniature bitmap display
|
||||
display.clearDisplay();
|
||||
display.drawBitmap(30, 16, logo16_glcd_bmp, 16, 16, 1);
|
||||
display.display();
|
||||
|
||||
// invert the display
|
||||
display.invertDisplay(true);
|
||||
delay(1000);
|
||||
display.invertDisplay(false);
|
||||
delay(1000);
|
||||
|
||||
// draw a bitmap icon and 'animate' movement
|
||||
testdrawbitmap(logo16_glcd_bmp, LOGO16_GLCD_WIDTH, LOGO16_GLCD_HEIGHT);
|
||||
}
|
||||
|
||||
|
||||
void loop() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
void testdrawbitmap(const uint8_t *bitmap, uint8_t w, uint8_t h) {
|
||||
uint8_t icons[NUMFLAKES][3];
|
||||
srandom(666); // whatever seed
|
||||
|
||||
// initialize
|
||||
for (uint8_t f=0; f< NUMFLAKES; f++) {
|
||||
icons[f][XPOS] = random() % display.width();
|
||||
icons[f][YPOS] = 0;
|
||||
icons[f][DELTAY] = random() % 5 + 1;
|
||||
|
||||
Serial.print("x: ");
|
||||
Serial.print(icons[f][XPOS], DEC);
|
||||
Serial.print(" y: ");
|
||||
Serial.print(icons[f][YPOS], DEC);
|
||||
Serial.print(" dy: ");
|
||||
Serial.println(icons[f][DELTAY], DEC);
|
||||
}
|
||||
|
||||
while (1) {
|
||||
// draw each icon
|
||||
for (uint8_t f=0; f< NUMFLAKES; f++) {
|
||||
display.drawBitmap(icons[f][XPOS], icons[f][YPOS], logo16_glcd_bmp, w, h, BLACK);
|
||||
}
|
||||
display.display();
|
||||
delay(200);
|
||||
|
||||
// then erase it + move it
|
||||
for (uint8_t f=0; f< NUMFLAKES; f++) {
|
||||
display.drawBitmap(icons[f][XPOS], icons[f][YPOS], logo16_glcd_bmp, w, h, WHITE);
|
||||
// move it
|
||||
icons[f][YPOS] += icons[f][DELTAY];
|
||||
// if its gone, reinit
|
||||
if (icons[f][YPOS] > display.height()) {
|
||||
icons[f][XPOS] = random() % display.width();
|
||||
icons[f][YPOS] = 0;
|
||||
icons[f][DELTAY] = random() % 5 + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void testdrawchar(void) {
|
||||
display.setTextSize(1);
|
||||
display.setTextColor(BLACK);
|
||||
display.setCursor(0,0);
|
||||
|
||||
for (uint8_t i=0; i < 168; i++) {
|
||||
if (i == '\n') continue;
|
||||
display.write(i);
|
||||
//if ((i > 0) && (i % 14 == 0))
|
||||
//display.println();
|
||||
}
|
||||
display.display();
|
||||
}
|
||||
|
||||
void testdrawcircle(void) {
|
||||
for (int16_t i=0; i<display.height(); i+=2) {
|
||||
display.drawCircle(display.width()/2, display.height()/2, i, BLACK);
|
||||
display.display();
|
||||
}
|
||||
}
|
||||
|
||||
void testfillrect(void) {
|
||||
uint8_t color = 1;
|
||||
for (int16_t i=0; i<display.height()/2; i+=3) {
|
||||
// alternate colors
|
||||
display.fillRect(i, i, display.width()-i*2, display.height()-i*2, color%2);
|
||||
display.display();
|
||||
color++;
|
||||
}
|
||||
}
|
||||
|
||||
void testdrawtriangle(void) {
|
||||
for (int16_t i=0; i<min(display.width(),display.height())/2; i+=5) {
|
||||
display.drawTriangle(display.width()/2, display.height()/2-i,
|
||||
display.width()/2-i, display.height()/2+i,
|
||||
display.width()/2+i, display.height()/2+i, BLACK);
|
||||
display.display();
|
||||
}
|
||||
}
|
||||
|
||||
void testfilltriangle(void) {
|
||||
uint8_t color = BLACK;
|
||||
for (int16_t i=min(display.width(),display.height())/2; i>0; i-=5) {
|
||||
display.fillTriangle(display.width()/2, display.height()/2-i,
|
||||
display.width()/2-i, display.height()/2+i,
|
||||
display.width()/2+i, display.height()/2+i, color);
|
||||
if (color == WHITE) color = BLACK;
|
||||
else color = WHITE;
|
||||
display.display();
|
||||
}
|
||||
}
|
||||
|
||||
void testdrawroundrect(void) {
|
||||
for (int16_t i=0; i<display.height()/2-2; i+=2) {
|
||||
display.drawRoundRect(i, i, display.width()-2*i, display.height()-2*i, display.height()/4, BLACK);
|
||||
display.display();
|
||||
}
|
||||
}
|
||||
|
||||
void testfillroundrect(void) {
|
||||
uint8_t color = BLACK;
|
||||
for (int16_t i=0; i<display.height()/2-2; i+=2) {
|
||||
display.fillRoundRect(i, i, display.width()-2*i, display.height()-2*i, display.height()/4, color);
|
||||
if (color == WHITE) color = BLACK;
|
||||
else color = WHITE;
|
||||
display.display();
|
||||
}
|
||||
}
|
||||
|
||||
void testdrawrect(void) {
|
||||
for (int16_t i=0; i<display.height()/2; i+=2) {
|
||||
display.drawRect(i, i, display.width()-2*i, display.height()-2*i, BLACK);
|
||||
display.display();
|
||||
}
|
||||
}
|
||||
|
||||
void testdrawline() {
|
||||
for (int16_t i=0; i<display.width(); i+=4) {
|
||||
display.drawLine(0, 0, i, display.height()-1, BLACK);
|
||||
display.display();
|
||||
}
|
||||
for (int16_t i=0; i<display.height(); i+=4) {
|
||||
display.drawLine(0, 0, display.width()-1, i, BLACK);
|
||||
display.display();
|
||||
}
|
||||
delay(250);
|
||||
|
||||
display.clearDisplay();
|
||||
for (int16_t i=0; i<display.width(); i+=4) {
|
||||
display.drawLine(0, display.height()-1, i, 0, BLACK);
|
||||
display.display();
|
||||
}
|
||||
for (int8_t i=display.height()-1; i>=0; i-=4) {
|
||||
display.drawLine(0, display.height()-1, display.width()-1, i, BLACK);
|
||||
display.display();
|
||||
}
|
||||
delay(250);
|
||||
|
||||
display.clearDisplay();
|
||||
for (int16_t i=display.width()-1; i>=0; i-=4) {
|
||||
display.drawLine(display.width()-1, display.height()-1, i, 0, BLACK);
|
||||
display.display();
|
||||
}
|
||||
for (int16_t i=display.height()-1; i>=0; i-=4) {
|
||||
display.drawLine(display.width()-1, display.height()-1, 0, i, BLACK);
|
||||
display.display();
|
||||
}
|
||||
delay(250);
|
||||
|
||||
display.clearDisplay();
|
||||
for (int16_t i=0; i<display.height(); i+=4) {
|
||||
display.drawLine(display.width()-1, 0, 0, i, BLACK);
|
||||
display.display();
|
||||
}
|
||||
for (int16_t i=0; i<display.width(); i+=4) {
|
||||
display.drawLine(display.width()-1, 0, i, display.height()-1, BLACK);
|
||||
display.display();
|
||||
}
|
||||
delay(250);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
How to buid PlatformIO based project
|
||||
====================================
|
||||
|
||||
1. `Install PlatformIO <http://docs.platformio.org/en/latest/installation.html>`_
|
||||
2. Download `source code with examples <https://github.com/ivankravets/platformio/archive/develop.zip>`_
|
||||
3. Extract ZIP archive
|
||||
4. Run these commands:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Change directory to example
|
||||
> cd platformio-develop/examples/atmelavr-and-arduino/arduino-internal-libs
|
||||
|
||||
# Process example project
|
||||
> platformio run
|
||||
|
||||
# Upload firmware
|
||||
> platformio run --target upload
|
||||
|
||||
# Clean build files
|
||||
> platformio run --target clean
|
||||
@@ -0,0 +1,63 @@
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:arduino_uno]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = uno
|
||||
|
||||
[env:arduino_ethernet]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = ethernet
|
||||
|
||||
[env:arduino_leonardo]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = leonardo
|
||||
|
||||
[env:arduino_pro16MHzatmega328]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = pro16MHzatmega328
|
||||
|
||||
[env:arduino_megaatmega1280]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = megaatmega1280
|
||||
|
||||
[env:arduino_micro]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = micro
|
||||
|
||||
[env:arduino_robotControl]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = robotControl
|
||||
|
||||
[env:arduino_yun]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = yun
|
||||
|
||||
[env:arduino_due]
|
||||
platform = atmelsam
|
||||
framework = arduino
|
||||
board = due
|
||||
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
Chat Server
|
||||
|
||||
A simple server that distributes any incoming messages to all
|
||||
connected clients. To use telnet to your device's IP address and type.
|
||||
You can see the client's input in the serial monitor as well.
|
||||
Using an Arduino Wiznet Ethernet shield.
|
||||
|
||||
Circuit:
|
||||
* Ethernet shield attached to pins 10, 11, 12, 13
|
||||
* Analog inputs attached to pins A0 through A5 (optional)
|
||||
|
||||
created 18 Dec 2009
|
||||
by David A. Mellis
|
||||
modified 9 Apr 2012
|
||||
by Tom Igoe
|
||||
|
||||
*/
|
||||
|
||||
#include <SPI.h>
|
||||
#include <Ethernet.h>
|
||||
|
||||
// Enter a MAC address and IP address for your controller below.
|
||||
// The IP address will be dependent on your local network.
|
||||
// gateway and subnet are optional:
|
||||
byte mac[] = {
|
||||
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
|
||||
};
|
||||
IPAddress ip(192, 168, 1, 177);
|
||||
IPAddress gateway(192, 168, 1, 1);
|
||||
IPAddress subnet(255, 255, 0, 0);
|
||||
|
||||
|
||||
// telnet defaults to port 23
|
||||
EthernetServer server(23);
|
||||
boolean alreadyConnected = false; // whether or not the client was connected previously
|
||||
|
||||
void setup() {
|
||||
// initialize the ethernet device
|
||||
Ethernet.begin(mac, ip, gateway, subnet);
|
||||
// start listening for clients
|
||||
server.begin();
|
||||
// Open serial communications and wait for port to open:
|
||||
Serial.begin(9600);
|
||||
while (!Serial) {
|
||||
; // wait for serial port to connect. Needed for Leonardo only
|
||||
}
|
||||
|
||||
|
||||
Serial.print("Chat server address:");
|
||||
Serial.println(Ethernet.localIP());
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// wait for a new client:
|
||||
EthernetClient client = server.available();
|
||||
|
||||
// when the client sends the first byte, say hello:
|
||||
if (client) {
|
||||
if (!alreadyConnected) {
|
||||
// clead out the input buffer:
|
||||
client.flush();
|
||||
Serial.println("We have a new client");
|
||||
client.println("Hello, client!");
|
||||
alreadyConnected = true;
|
||||
}
|
||||
|
||||
if (client.available() > 0) {
|
||||
// read the bytes incoming from the client:
|
||||
char thisChar = client.read();
|
||||
// echo the bytes back to the client:
|
||||
server.write(thisChar);
|
||||
// echo the bytes to the server as well:
|
||||
Serial.write(thisChar);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,15 +3,8 @@
|
||||
* See LICENSE for details.
|
||||
*/
|
||||
|
||||
/**
|
||||
Turns ON and OFF the Wiring compatible board LED,
|
||||
with intervals of 1 second (1000 milliseconds)
|
||||
*/
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
#ifndef LED_PIN
|
||||
#define LED_PIN 13 // Most Arduino boards already have an LED attached to pin 13 on the board itself
|
||||
#define LED_PIN 13 // Most Arduino boards already have a LED attached to pin 13 on the board itself
|
||||
#endif
|
||||
|
||||
|
||||
21
examples/atmelavr-and-arduino/arduino-own-src_dir/README.rst
Normal file
@@ -0,0 +1,21 @@
|
||||
How to buid PlatformIO based project
|
||||
====================================
|
||||
|
||||
1. `Install PlatformIO <http://docs.platformio.org/en/latest/installation.html>`_
|
||||
2. Download `source code with examples <https://github.com/ivankravets/platformio/archive/develop.zip>`_
|
||||
3. Extract ZIP archive
|
||||
4. Run these commands:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Change directory to example
|
||||
> cd platformio-develop/examples/arduino-own-src_dir
|
||||
|
||||
# Process example project
|
||||
> platformio run
|
||||
|
||||
# Upload firmware
|
||||
> platformio run --target upload
|
||||
|
||||
# Clean build files
|
||||
> platformio run --target clean
|
||||
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[platformio]
|
||||
src_dir = Blink
|
||||
|
||||
[env:arduino_uno]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = uno
|
||||
@@ -0,0 +1,21 @@
|
||||
How to buid PlatformIO based project
|
||||
====================================
|
||||
|
||||
1. `Install PlatformIO <http://docs.platformio.org/en/latest/installation.html>`_
|
||||
2. Download `source code with examples <https://github.com/ivankravets/platformio/archive/develop.zip>`_
|
||||
3. Extract ZIP archive
|
||||
4. Run these commands:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Change directory to example
|
||||
> cd platformio-develop/examples/atmelavr-and-arduino/atmelavr-native-blink
|
||||
|
||||
# Process example project
|
||||
> platformio run
|
||||
|
||||
# Upload firmware
|
||||
> platformio run --target upload
|
||||
|
||||
# Clean build files
|
||||
> platformio run --target clean
|
||||
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:arduino_pro5v]
|
||||
platform = atmelavr
|
||||
board_mcu = atmega168
|
||||
board_f_cpu = 16000000L
|
||||
|
||||
upload_protocol = arduino
|
||||
upload_speed = 19200
|
||||
|
||||
# targets = upload
|
||||
21
examples/atmelavr-and-arduino/digitstump-mouse/README.rst
Normal file
@@ -0,0 +1,21 @@
|
||||
How to buid PlatformIO based project
|
||||
====================================
|
||||
|
||||
1. `Install PlatformIO <http://docs.platformio.org/en/latest/installation.html>`_
|
||||
2. Download `source code with examples <https://github.com/ivankravets/platformio/archive/develop.zip>`_
|
||||
3. Extract ZIP archive
|
||||
4. Run these commands:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Change directory to example
|
||||
> cd platformio-develop/examples/atmelavr-and-arduino/digitstump-mouse
|
||||
|
||||
# Process example project
|
||||
> platformio run
|
||||
|
||||
# Upload firmware
|
||||
> platformio run --target upload
|
||||
|
||||
# Clean build files
|
||||
> platformio run --target clean
|
||||
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:digispark-tiny]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = digispark-tiny
|
||||
|
||||
[env:digispark-pro32]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = digispark-pro32
|
||||
41
examples/atmelavr-and-arduino/digitstump-mouse/src/Mouse.ino
Normal file
@@ -0,0 +1,41 @@
|
||||
// DigiMouse test and usage documentation
|
||||
// CAUTION!!!! This does click things!!!!!!!!
|
||||
// Originally created by Sean Murphy (duckythescientist)
|
||||
|
||||
#include <DigiMouse.h>
|
||||
|
||||
void setup() {
|
||||
DigiMouse.begin(); //start or reenumerate USB - BREAKING CHANGE from old versions that didn't require this
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// If not using plentiful DigiMouse.delay(), make sure to call
|
||||
// DigiMouse.update() at least every 50ms
|
||||
|
||||
// move across the screen
|
||||
// these are signed chars
|
||||
DigiMouse.moveY(10); //down 10
|
||||
DigiMouse.delay(500);
|
||||
DigiMouse.moveX(20); //right 20
|
||||
DigiMouse.delay(500);
|
||||
DigiMouse.scroll(5);
|
||||
DigiMouse.delay(500);
|
||||
|
||||
// or DigiMouse.move(X, Y, scroll) works
|
||||
|
||||
// three buttons are the three LSBs of an unsigned char
|
||||
DigiMouse.setButtons(1<<0); //left click
|
||||
DigiMouse.delay(500);
|
||||
DigiMouse.setButtons(0); //unclick all
|
||||
DigiMouse.delay(500);
|
||||
|
||||
//or you can use these functions to click
|
||||
DigiMouse.rightClick();
|
||||
DigiMouse.delay(500);
|
||||
DigiMouse.leftClick();
|
||||
DigiMouse.delay(500);
|
||||
DigiMouse.middleClick();
|
||||
DigiMouse.delay(500);
|
||||
|
||||
//for compatability with other libraries you can also use DigiMouse.move(X, Y, scroll, buttons)
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
How to buid PlatformIO based project
|
||||
====================================
|
||||
|
||||
1. `Install PlatformIO <http://docs.platformio.org/en/latest/installation.html>`_
|
||||
2. Download `source code with examples <https://github.com/ivankravets/platformio/archive/develop.zip>`_
|
||||
3. Extract ZIP archive
|
||||
4. Run these commands:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Change directory to example
|
||||
> cd platformio-develop/examples/atmelavr-and-arduino/engduino-magnetometer
|
||||
|
||||
# Process example project
|
||||
> platformio run
|
||||
|
||||
# Upload firmware
|
||||
> platformio run --target upload
|
||||
|
||||
# Clean build files
|
||||
> platformio run --target clean
|
||||
@@ -0,0 +1,23 @@
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:engduinov3]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = engduinov3
|
||||
@@ -0,0 +1,44 @@
|
||||
#include <EngduinoMagnetometer.h>
|
||||
#include <Wire.h>
|
||||
|
||||
// Magnetometer demo
|
||||
//
|
||||
// Print the field strength values
|
||||
//
|
||||
|
||||
void setup()
|
||||
{
|
||||
EngduinoMagnetometer.begin();
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
float magneticField[3];
|
||||
|
||||
// Read magnetic field strength. The values range from -20000
|
||||
// to +20000 counts and are based on internal calibration
|
||||
// values
|
||||
//
|
||||
EngduinoMagnetometer.xyz(magneticField);
|
||||
|
||||
float x = magneticField[0];
|
||||
float y = magneticField[1];
|
||||
float z = magneticField[2];
|
||||
Serial.print("Magnetic field strength: x = ");
|
||||
Serial.print(x);
|
||||
Serial.print(" counts y = ");
|
||||
Serial.print(y);
|
||||
Serial.print(" counts z = ");
|
||||
Serial.print(z);
|
||||
Serial.println(" counts");
|
||||
|
||||
// Note that this is an uncalibrated temperature
|
||||
// of the die itself. Whilst it should be a value
|
||||
// in degrees C, the lack of calibration could mean
|
||||
// that it's anything.
|
||||
int8_t t = EngduinoMagnetometer.temperature();
|
||||
Serial.print("Temperature: ");
|
||||
Serial.println(t);
|
||||
|
||||
delay(1000);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
Atmel AVR: Native Blink Example
|
||||
===============================
|
||||
|
||||
1. Download ``platformio``
|
||||
`sources <https://github.com/ivankravets/platformio/archive/develop.zip>`_
|
||||
2. Extract ZIP archive
|
||||
3. Then run these commands:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Change directory to example
|
||||
$ cd platformio-develop/examples/atmelavr-native-blink/
|
||||
|
||||
# Install Atmel AVR development platform
|
||||
$ platformio install atmelavr
|
||||
|
||||
# Process example project
|
||||
$ platformio run
|
||||
|
||||
.. image:: console-result.png
|
||||
|
Before Width: | Height: | Size: 126 KiB |
@@ -1,14 +0,0 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
|
||||
[env:arduino_pro5v]
|
||||
platform = atmelavr
|
||||
board_mcu = atmega168
|
||||
board_f_cpu = 16000000L
|
||||
|
||||
upload_port = /dev/tty.SLAB_USBtoUART
|
||||
# upload_port = COM3
|
||||
upload_protocol = arduino
|
||||
upload_speed = 19200
|
||||
|
||||
targets = upload
|
||||
@@ -5,7 +5,7 @@ The detailed information and steps are described in this article:
|
||||
`Building and debugging Atmel AVR (Arduino-based) project using Eclipse IDE+PlatformIO <http://www.ikravets.com/computer-life/programming/2014/06/20/building-and-debugging-atmel-avr-arduino-based-project-using-eclipse-ideplatformio>`_.
|
||||
|
||||
|
||||
.. image:: http://www.ikravets.com/wp-content/uploads/2014/06/eclipse_build_arduino_pro5v-1024x822.png
|
||||
.. image:: http://www.ikravets.com/wp-content/uploads/2014/06/eclipse_platformio_build_arduino_uno.png
|
||||
:width: 850px
|
||||
:target: http://www.ikravets.com/computer-life/programming/2014/06/20/building-and-debugging-atmel-avr-arduino-based-project-using-eclipse-ideplatformio
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?>
|
||||
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="0.910961921">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.910961921" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||
@@ -13,41 +11,46 @@
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.910961921" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
|
||||
<folderInfo id="0.910961921." name="/" resourcePath="">
|
||||
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.952979152" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
||||
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.952979152.52310970" name=""/>
|
||||
<builder id="org.eclipse.cdt.build.core.settings.default.builder.1519453406" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.eclipse.cdt.build.core.prefbase.toolchain.952979152.52310970" name=""/>
|
||||
<builder cleanBuildTarget="run --target clean" command="platformio" id="org.eclipse.cdt.build.core.settings.default.builder.1519453406" incrementalBuildTarget="run" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1409095472" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.1624502120" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.239157887" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/atmelavr/tools/toolchain/avr/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/atmelavr/frameworks/arduino/cores/arduino""/>
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.239157887" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/toolchain-atmelavr/avr/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/framework-arduinoavr/cores/arduino""/>
|
||||
</option>
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.922107295" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.922107295" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__AVR_ATmega168__"/>
|
||||
</option>
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.149990277" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
</tool>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.54121539" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1096940598" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1096940598" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/atmelavr/tools/toolchain/avr/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/atmelavr/frameworks/arduino/cores/arduino""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/toolchain-atmelavr/avr/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/framework-arduinoavr/cores/arduino""/>
|
||||
</option>
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.1198905600" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.1198905600" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__AVR_ATmega168__"/>
|
||||
</option>
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.762536863" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
</tool>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.1310559623" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.41298875" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.41298875" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/atmelavr/tools/toolchain/avr/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/atmelavr/frameworks/arduino/cores/arduino""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/toolchain-atmelavr/avr/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/framework-arduinoavr/cores/arduino""/>
|
||||
</option>
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.884639970" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.884639970" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__AVR_ATmega168__"/>
|
||||
</option>
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.549319812" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
@@ -74,4 +77,5 @@
|
||||
<resource resourceType="PROJECT" workspacePath="/arduino_pro5"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
</cproject>
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
all:
|
||||
platformio run -t upload
|
||||
|
||||
clean:
|
||||
platformio run -t clean
|
||||
@@ -1,8 +1,25 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:arduino_pro5v]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = pro16MHzatmega168
|
||||
upload_port = /dev/tty.SLAB_USBtoUART
|
||||
|
||||
# targets = upload
|
||||
@@ -1,7 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?>
|
||||
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="0.1706826288">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1706826288" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||
@@ -13,18 +11,19 @@
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.1706826288" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
|
||||
<folderInfo id="0.1706826288." name="/" resourcePath="">
|
||||
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.944229927" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
||||
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.944229927.1146791472" name=""/>
|
||||
<builder id="org.eclipse.cdt.build.core.settings.default.builder.81097189" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.eclipse.cdt.build.core.prefbase.toolchain.944229927.1146791472" name=""/>
|
||||
<builder cleanBuildTarget="run --target clean" command="platformio" id="org.eclipse.cdt.build.core.settings.default.builder.81097189" incrementalBuildTarget="run" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.615700392" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.509191184" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1976688999" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/atmelavr/tools/toolchain/avr/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/toolchain-atmelavr/avr/include""/>
|
||||
</option>
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.1146079252" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__AVR_ATmega168__"/>
|
||||
@@ -34,6 +33,7 @@
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.524184308" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1379816017" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/atmelavr/tools/toolchain/avr/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/toolchain-atmelavr/avr/include""/>
|
||||
</option>
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.1180078676" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__AVR_ATmega168__"/>
|
||||
@@ -43,6 +43,7 @@
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.746817635" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.905883681" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/atmelavr/tools/toolchain/avr/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/toolchain-atmelavr/avr/include""/>
|
||||
</option>
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.1589314232" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__AVR_ATmega168__"/>
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
all:
|
||||
platformio run -t upload
|
||||
|
||||
clean:
|
||||
platformio run -t clean
|
||||
@@ -1,12 +1,28 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:atmelavr_atmega168]
|
||||
platform = atmelavr
|
||||
board_mcu = atmega168
|
||||
board_f_cpu = 16000000L
|
||||
|
||||
upload_port = /dev/tty.SLAB_USBtoUART
|
||||
# upload_port = COM3
|
||||
upload_protocol = arduino
|
||||
upload_speed = 19200
|
||||
upload_speed = 19200
|
||||
|
||||
# targets = upload
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?>
|
||||
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="0.1778616297">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1778616297" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||
@@ -13,30 +11,36 @@
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.1778616297" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
|
||||
<folderInfo id="0.1778616297." name="/" resourcePath="">
|
||||
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.576447412" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
||||
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.576447412.203226592" name=""/>
|
||||
<builder id="org.eclipse.cdt.build.core.settings.default.builder.592280532" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.eclipse.cdt.build.core.prefbase.toolchain.576447412.203226592" name=""/>
|
||||
<builder cleanBuildTarget="run --target clean" command="platformio" id="org.eclipse.cdt.build.core.settings.default.builder.592280532" incrementalBuildTarget="run" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.251286138" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.1824859462" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.2021826184" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/timsp430/tools/toolchain/msp430/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/toolchain-timsp430/msp430/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/framework-energiamsp430/cores/msp430""/>
|
||||
</option>
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1509314343" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
</tool>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.1251065831" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1876118829" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/timsp430/tools/toolchain/msp430/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/toolchain-timsp430/msp430/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/framework-energiamsp430/cores/msp430""/>
|
||||
</option>
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.518683230" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
</tool>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.847615484" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1922525168" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/timsp430/tools/toolchain/msp430/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/toolchain-timsp430/msp430/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/framework-energiamsp430/cores/msp430""/>
|
||||
</option>
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.68822385" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
</tool>
|
||||
@@ -57,5 +61,9 @@
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Default">
|
||||
<resource resourceType="PROJECT" workspacePath="/tilaunchpad_msp430g2"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
</cproject>
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
all:
|
||||
platformio run -t upload
|
||||
|
||||
clean:
|
||||
platformio run -t clean
|
||||
@@ -1,5 +1,21 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:launchpad_msp430g2]
|
||||
platform = timsp430
|
||||
@@ -7,3 +23,5 @@ board_mcu = msp430g2553
|
||||
board_f_cpu = 16000000L
|
||||
|
||||
upload_protocol = rf2500
|
||||
|
||||
# targets = upload
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?>
|
||||
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="0.18931736">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.18931736" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||
@@ -13,33 +11,34 @@
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.18931736" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
|
||||
<folderInfo id="0.18931736." name="/" resourcePath="">
|
||||
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.946409409" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
||||
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.946409409.264614082" name=""/>
|
||||
<builder id="org.eclipse.cdt.build.core.settings.default.builder.2099118713" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.eclipse.cdt.build.core.prefbase.toolchain.946409409.264614082" name=""/>
|
||||
<builder cleanBuildTarget="run --target clean" command="platformio" id="org.eclipse.cdt.build.core.settings.default.builder.2099118713" incrementalBuildTarget="run" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1860044306" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.490604788" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1186638432" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/titiva/frameworks/energia/cores/lm4f""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/titiva/tools/toolchain/arm-none-eabi/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/framework-energiativa/cores/lm4f""/>
|
||||
</option>
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1338936035" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
</tool>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.1620533967" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1007143336" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/titiva/frameworks/energia/cores/lm4f""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/titiva/tools/toolchain/arm-none-eabi/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/framework-energiativa/cores/lm4f""/>
|
||||
</option>
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.2051673558" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
</tool>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.549164281" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.454536693" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/titiva/frameworks/energia/cores/lm4f""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/titiva/tools/toolchain/arm-none-eabi/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include""/>
|
||||
<listOptionValue builtIn="false" value=""${HOME}/.platformio/packages/framework-energiativa/cores/lm4f""/>
|
||||
</option>
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1468046922" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
</tool>
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
all:
|
||||
platformio run -t upload
|
||||
|
||||
clean:
|
||||
platformio run -t clean
|
||||
@@ -1,8 +1,25 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:launchpad_lm4f120]
|
||||
platform = titiva
|
||||
framework = energia
|
||||
board = lplm4f120h5qr
|
||||
targets = upload
|
||||
|
||||
# targets = upload
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* See LICENSE for details.
|
||||
*/
|
||||
|
||||
#define false 0
|
||||
#define true 1
|
||||
typedef int bool;
|
||||
#define false 0
|
||||
#define true 1
|
||||
typedef int bool;
|
||||
|
||||
#include <stdint.h>
|
||||
#include "inc/hw_memmap.h"
|
||||
@@ -16,27 +16,21 @@ typedef int bool;
|
||||
#define LED_BLUE GPIO_PIN_2
|
||||
#define LED_GREEN GPIO_PIN_3
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
||||
void setup() {
|
||||
SysCtlClockSet(
|
||||
SYSCTL_SYSDIV_4|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);
|
||||
SYSCTL_SYSDIV_4|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);
|
||||
|
||||
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
|
||||
GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN);
|
||||
|
||||
while (1)
|
||||
{
|
||||
GPIOPinWrite(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN, LED_RED);
|
||||
SysCtlDelay(3000000);
|
||||
GPIOPinWrite(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN, LED_BLUE);
|
||||
SysCtlDelay(3000000);
|
||||
GPIOPinWrite(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN, LED_GREEN);
|
||||
SysCtlDelay(3000000);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// hook for Energia main.cpp where these methods are defined
|
||||
void setup() {}
|
||||
void loop() {}
|
||||
|
||||
void loop() {
|
||||
GPIOPinWrite(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN, LED_RED);
|
||||
SysCtlDelay(3000000);
|
||||
GPIOPinWrite(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN, LED_BLUE);
|
||||
SysCtlDelay(3000000);
|
||||
GPIOPinWrite(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN, LED_GREEN);
|
||||
SysCtlDelay(3000000);
|
||||
}
|
||||
|
||||
21
examples/stm32/stm32-cmsis-blink/README.rst
Normal file
@@ -0,0 +1,21 @@
|
||||
How to buid PlatformIO based project
|
||||
====================================
|
||||
|
||||
1. `Install PlatformIO <http://docs.platformio.org/en/latest/installation.html>`_
|
||||
2. Download `source code with examples <https://github.com/ivankravets/platformio/archive/develop.zip>`_
|
||||
3. Extract ZIP archive
|
||||
4. Run these commands:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Change directory to example
|
||||
> cd platformio-develop/examples/stm32/stm32-cmsis-blink
|
||||
|
||||
# Process example project
|
||||
> platformio run
|
||||
|
||||
# Upload firmware
|
||||
> platformio run --target upload
|
||||
|
||||
# Clean build files
|
||||
> platformio run --target clean
|
||||
33
examples/stm32/stm32-cmsis-blink/platformio.ini
Normal file
@@ -0,0 +1,33 @@
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:stm32f4discovery]
|
||||
platform = stm32
|
||||
framework = cmsis
|
||||
board = stm32f4discovery
|
||||
|
||||
[env:stm32ldiscovery]
|
||||
platform = stm32
|
||||
framework = cmsis
|
||||
board = stm32ldiscovery
|
||||
|
||||
[env:stm32f3discovery]
|
||||
platform = stm32
|
||||
framework = cmsis
|
||||
board = stm32f3discovery
|
||||