Compare commits

..

104 Commits

Author SHA1 Message Date
Ivan Kravets
be049bfac2 Merge branch 'release/v2.7.0' 2015-12-30 20:25:12 +02:00
Ivan Kravets
02480730bb Version bump to 2.7.0 (issues #319, #382, #386, #391, #394, #397, #400, #403, #404, #406, #407, #417) 2015-12-30 20:24:51 +02:00
Ivan Kravets
4d8265bee2 Remove SCons from docs, etc. 2015-12-30 20:19:56 +02:00
Ivan Kravets
aff525e763 Use current interpreter to upgrade PlatformIO 2015-12-30 20:12:52 +02:00
Ivan Kravets
8d6aee3178 Use current Python interpreter for Python-based tools // Resolve #417 2015-12-30 20:01:43 +02:00
Ivan Kravets
d139225ffb Quote upload port for Espressif OTA // Issue #417 2015-12-30 19:23:58 +02:00
Ivan Kravets
56c5ba6fbb Allow OTA upload port to be quoted // Issue #417 2015-12-30 19:10:40 +02:00
Ivan Kravets
7a91683ca6 Better handling of upload port for OTA // Issue #417 2015-12-30 19:01:26 +02:00
Ivan Kravets
f2cad66d79 Quote upload port for Espressif OTA // Issue #417 2015-12-30 18:42:46 +02:00
Ivan Kravets
98ec2237b7 Merge pull request #418 from dh1tw/develop
updated URL in example to new mbed domain
2015-12-30 18:15:13 +02:00
dh1tw
27a555b99a updated URL in example to new mbed domain 2015-12-30 17:12:50 +01:00
Ivan Kravets
680c3867db Allow to use DNS.local as upload port for OTA // Issue #382 2015-12-30 15:02:13 +02:00
Ivan Kravets
121102beef Fix SPIFFS uploading via OTA // Issue #382 2015-12-30 14:33:16 +02:00
Ivan Kravets
4f8138fe1f Add link to discussion as for SPIFFS 2015-12-30 14:23:35 +02:00
Ivan Kravets
044486d46f Allow to upload SPIFFS image using OTA // Issue #382 2015-12-30 14:14:36 +02:00
Ivan Kravets
2d2ce0661f Update donate button 2015-12-30 01:49:16 +02:00
Ivan Kravets
e88ef48e18 Add example with library.json 2015-12-30 01:41:08 +02:00
Ivan Kravets
2dd2dd4f0d Use PySerial < 3 for Python 2.6 2015-12-30 00:13:38 +02:00
Ivan Kravets
38d9f0f5bc Add donate button 2015-12-29 21:59:32 +02:00
Ivan Kravets
14aed800a2 Improve telemetry service 2015-12-29 21:03:51 +02:00
Ivan Kravets
621393138f Move requirements to setuptools 2015-12-29 17:44:39 +02:00
Ivan Kravets
a959ff767d Better handling of source files for uploading // Issue #382 2015-12-29 14:36:39 +02:00
Ivan Kravets
11986354d9 Better handling of LD scripts for SPIFFS uploading // Issue #382 2015-12-29 00:21:24 +02:00
Ivan Kravets
5ea7ec470a Typo fix 2015-12-28 23:29:58 +02:00
Ivan Kravets
a0bcb4d4f0 Fix PyLint warning about sorting for imports 2015-12-28 20:35:56 +02:00
Ivan Kravets
ed68878592 Show error for invalid LD script 2015-12-28 20:09:48 +02:00
Ivan Kravets
3121ca5669 Fix SPIFFS_START address // Issue #382 2015-12-28 18:40:54 +02:00
Ivan Kravets
5abb21c3f9 Minor changes for offsets 2015-12-28 13:54:07 +02:00
Ivan Kravets
b9a87b3d54 Merge pull request #407 from ZachMassia/develop 2015-12-28 10:58:22 +02:00
Zach Massia
cd1259613a Fix typo 2015-12-28 00:54:19 -05:00
Ivan Kravets
023a3487e0 Don't run mkspiffs target by default 2015-12-28 01:38:41 +02:00
Ivan Kravets
2c4c3a12ea Add link to ESP8266 Flash layout // Issue #382 2015-12-28 01:21:17 +02:00
Ivan Kravets
cae5f1f553 Implement uploading files to file system SPIFFS for ESP8266 // Issue #382 2015-12-28 01:15:06 +02:00
Ivan Kravets
d7673b69e2 Add link for enlarge to Emacs screenshot 2015-12-27 17:54:51 +02:00
Ivan Kravets
85f0877d32 Project generator for Emacs text editor // Issue #404 2015-12-27 17:53:51 +02:00
Ivan Kravets
e152155a58 Merge pull request #404 from ZachMassia/develop
Emacs IDE integration support
2015-12-27 16:58:46 +02:00
Ivan Kravets
ce93e6013f Fix variant for RFduino board 2015-12-26 23:50:56 +02:00
Ivan Kravets
bee51aadcb Fix test for LD Scripts 2015-12-26 23:04:16 +02:00
Ivan Kravets
956633847d Add RFDuino iBeacon example 2015-12-26 21:50:47 +02:00
Ivan Kravets
918deb41a4 Typo fix 2015-12-26 21:32:10 +02:00
Ivan Kravets
1b7b2ca0a2 Add support for RFDuino // Resolve #319 2015-12-26 21:24:01 +02:00
Ivan Kravets
1b84078541 Show error message when user tries to install/run PlatformIO with Python 3 2015-12-26 20:22:22 +02:00
Ivan Kravets
f7311eb94d Update Wiring example according to Get-Started on home page 2015-12-26 20:08:50 +02:00
Ivan Kravets
9312ca7f0d Moved SCons to PlatformIO packages. PlatformIO does not require SCons to be installed in your system.
Significantly simplified installation process of  PlatformIO. "pip install platformio" rocks!
2015-12-26 14:47:42 +02:00
Zachary Massia
533720218a Add Emacs screenshot, add Emacs to IDE doc page 2015-12-26 03:00:44 -05:00
Ivan Kravets
d2088e7444 Enhance doc 2015-12-26 01:02:44 +02:00
Zachary Massia
9006b8b618 Add initial version of emacs documentation 2015-12-25 02:09:09 -05:00
Zachary Massia
b9f926d13b Add Emacs to IDE templates 2015-12-25 02:09:09 -05:00
Ivan Kravets
319636f017 Fix broken RST for mbed framework 2015-12-25 01:09:41 +02:00
Ivan Kravets
4c665a292a Cleanup docs for IDE integration 2015-12-25 01:06:55 +02:00
Ivan Kravets
72f93cd563 Link articles with platforms and frameworks 2015-12-25 00:49:27 +02:00
Ivan Kravets
2e38b156dd Add examples for frameworks 2015-12-25 00:31:13 +02:00
Ivan Kravets
a9a50f79da Add examples for Atmel AVR platform 2015-12-25 00:17:19 +02:00
Ivan Kravets
4b922b9de2 Documented firmware uploading for Atmel AVR development platform using Programmers 2015-12-24 23:55:49 +02:00
Ivan Kravets
36912c0fe6 Update Arduino framework for Atmel AVR development platform to 1.6.7 2015-12-24 23:39:25 +02:00
Ivan Kravets
dfe39f386d Add support for the new Adafruit boards Bluefruit Micro and Feather // Resolve #403 2015-12-24 23:09:40 +02:00
Ivan Kravets
943d16bcf8 Add example with "Ctrl+Q" to serial ports monitor as exit key // Resolve #386 2015-12-22 20:28:37 +02:00
Ivan Kravets
6d0b1a8106 Add demo for ESP8266 OTA 2015-12-22 20:17:10 +02:00
Ivan Kravets
663a3b1aec Add new articles 2015-12-22 20:07:43 +02:00
Ivan Kravets
131f6504ca Improve auto installation for SCons 2015-12-22 19:53:54 +02:00
Ivan Kravets
94cdc9b69e Merge branch 'feature/scons-autoinstall' into develop 2015-12-22 19:09:29 +02:00
Ivan Kravets
1c1cd2509e Add demo with "Over-the-Air update for ESP8266" 2015-12-22 18:21:21 +02:00
Ivan Kravets
abdc76aef8 Improve auto installation for SCons 2015-12-22 18:07:15 +02:00
Ivan Kravets
9b058c3958 Merge branch 'release/v2.6.3' into develop 2015-12-21 20:56:06 +02:00
Ivan Kravets
d91261412e Merge branch 'release/v2.6.3' 2015-12-21 20:56:05 +02:00
Ivan Kravets
2e26b5d31d Version bump to 2.6.3 (issues #396) 2015-12-21 20:55:49 +02:00
Ivan Kravets
3266d3b211 Fix top menu in docs 2015-12-21 20:52:39 +02:00
Ivan Kravets
c2072e3e62 Cleanup debug code 2015-12-21 20:43:07 +02:00
Ivan Kravets
5266f4810b Fix PyLint warning 2015-12-21 20:41:57 +02:00
Ivan Kravets
6e83b4b093 Restore support for Espressif ESP8266 ESP-01 1MB board (ready for OTA) 2015-12-21 20:39:45 +02:00
Ivan Kravets
7b1b908779 Fix invalid ROM size for ESP8266-based boards // Resolve #396 2015-12-21 19:23:46 +02:00
Ivan Kravets
7a95a201b5 Merge branch 'release/v2.6.2' 2015-12-21 17:42:01 +02:00
Ivan Kravets
70c86525cc Merge branch 'release/v2.6.2' into develop 2015-12-21 17:42:01 +02:00
Ivan Kravets
618d32b872 Version bump to 2.6.2 2015-12-21 17:41:37 +02:00
Ivan Kravets
66ca204697 Removed SCons from requirements list 2015-12-21 17:35:30 +02:00
Ivan Kravets
54d650aa40 Update number of supported boards 2015-12-19 01:19:36 +02:00
Ivan Kravets
851b452c17 Add warning to CLion docs to avoid running targets 2015-12-18 23:44:04 +02:00
Ivan Kravets
0ff795e798 Fix "ChunkedEncodingError" when SF connection is broken // Issue #356 2015-12-18 22:56:15 +02:00
Ivan Kravets
43b50e5b9f Update docs with the new vendors for ESP8266 2015-12-18 21:01:56 +02:00
Ivan Kravets
18d68bafd0 Fix vendors for ESP8266 boards 2015-12-18 20:56:17 +02:00
Ivan Kravets
feb951c35e Merge branch 'release/v2.6.1' into develop 2015-12-18 20:30:42 +02:00
Ivan Kravets
41c2164755 Merge branch 'release/v2.6.1' 2015-12-18 20:30:41 +02:00
Ivan Kravets
ee87b55947 Version bump to 2.6.1 (issues #377, #378, #379, #380, #381, #383, #384, #387) 2015-12-18 20:30:30 +02:00
Ivan Kravets
7119bb9084 Fix project generator for Eclipse IDE and "duplicate path entries found in project path" // Resolve #383 2015-12-18 20:18:19 +02:00
Ivan Kravets
132c769766 Better error handling 2015-12-18 19:58:09 +02:00
Ivan Kravets
e4dbcd50cc Improv documentation for Espressif platform 2015-12-18 19:29:20 +02:00
Ivan Kravets
62d5f66ae2 Extra docs for Espressif platform 2015-12-18 18:06:20 +02:00
Ivan Kravets
cfa3f1b520 Extra documentation for development platform / frameworks // Resolve #381 2015-12-18 17:06:28 +02:00
Ivan Kravets
0951d53f52 Fix issue with code builder when build path contains spaces // Resolve #387 2015-12-18 15:40:44 +02:00
Ivan Kravets
186580d794 Fix issue with code builder when build path contains spaces // Resolve #387 2015-12-18 15:20:37 +02:00
Ivan Kravets
1a47cfc938 Show INT values for serial monitor hot keys 2015-12-18 12:18:25 +02:00
Ivan Kravets
edc06f12b5 Add to FAQ "Monitoring a serial port breaks upload" // Resolve #384 2015-12-17 20:22:17 +02:00
Ivan Kravets
3830e98c1d Add support for the new ESP8266 based boards 2015-12-17 20:16:17 +02:00
Ivan Kravets
3cbbecb413 Repository for LD scripts; common LD script for ESP8266 // Resolve #379 2015-12-17 18:17:54 +02:00
Ivan Kravets
f0abd353ae Extend link to FAQ with what is PlatformIO 2015-12-17 00:47:56 +02:00
Ivan Kravets
84cbbe437d Remove default options 2015-12-17 00:08:57 +02:00
Ivan Kravets
34a5d366d5 Fix reset method for Espressif NodeMCU (ESP-12E Module) // Resolve #380 2015-12-17 00:02:22 +02:00
Ivan Kravets
d3b7fc7ddb Add JetBrains post in CLion Blog 2015-12-16 13:18:51 +02:00
Ivan Kravets
3d413743e4 Add ESP8266 quickstart 2015-12-16 00:35:24 +02:00
Ivan Kravets
1e38db8cae Merge branch 'release/v2.6.0' into develop 2015-12-15 20:54:31 +02:00
Ivan Kravets
cc46fa34e8 Add "framework-arduinonordicnrf51" for the platform 2015-11-10 00:12:30 +02:00
Valeriy Koval
b94cc655c2 Fix lint error. 2015-11-09 21:02:05 +02:00
Valeriy Koval
1c5d34cb5f Update nordicnrf51 platform for RFduino. 2015-11-09 20:24:41 +02:00
Valeriy Koval
ace9ae0b24 Initial support for RFduino. 2015-11-09 18:10:43 +02:00
103 changed files with 2314 additions and 502 deletions

1
.gitignore vendored
View File

@@ -2,6 +2,5 @@
*.pyc
.pioenvs
.tox
.sconsign.dblite
docs/_build
dist

View File

@@ -4,6 +4,69 @@ Release History
PlatformIO 2.0
--------------
2.7.0 (2015-12-30)
~~~~~~~~~~~~~~~~~~
**Happy New Year!**
* Moved SCons to PlatformIO packages. PlatformIO does not require SCons to be
installed in your system. Significantly simplified installation process of
PlatformIO. ``pip install platformio`` rocks!
* Implemented uploading files to file system of ESP8266 SPIFFS (including OTA)
(`issue #382 <https://github.com/platformio/platformio/issues/382>`_)
* Added support for the new Adafruit boards Bluefruit Micro and Feather
(`issue #403 <https://github.com/platformio/platformio/issues/403>`_)
* Added support for RFDuino
(`issue #319 <https://github.com/platformio/platformio/issues/319>`_)
* Project generator for `Emacs <http://docs.platformio.org/en/latest/ide/emacs.html>`__
text editor
(`pull #404 <https://github.com/platformio/platformio/pull/404>`_)
* Updated Arduino framework for Atmel AVR development platform to 1.6.7
* Documented `firmware uploading for Atmel AVR development platform using
Programmers <http://docs.platformio.org/en/latest/platforms/atmelavr.html#upload-using-programmer>`_:
AVR ISP, AVRISP mkII, USBtinyISP, USBasp, Parallel Programmer and Arduino as ISP
* Fixed issue with current Python interpreter for Python-based tools
(`pull #417 <https://github.com/platformio/platformio/pull/417>`_)
2.6.3 (2015-12-21)
~~~~~~~~~~~~~~~~~~
* Restored support for Espressif ESP8266 ESP-01 1MB board (ready for OTA)
* Fixed invalid ROM size for ESP8266-based boards
(`issue #396 <https://github.com/platformio/platformio/issues/396>`_)
2.6.2 (2015-12-21)
~~~~~~~~~~~~~~~~~~
* Removed ``SCons`` from requirements list. PlatformIO will try to install it
automatically, otherwise users need to install it manually
* Fixed ``ChunkedEncodingError`` when SF connection is broken
(`issue #356 <https://github.com/platformio/platformio/issues/356>`_)
2.6.1 (2015-12-18)
~~~~~~~~~~~~~~~~~~
* Added support for the new ESP8266-based boards (SparkFun ESP8266 Thing,
NodeMCU 0.9 & 1.0, Olimex MOD-WIFI-ESP8266(-DEV), Adafruit HUZZAH ESP8266,
ESPino, SweetPea ESP-210, WeMos D1, WeMos D1 mini) to
`Espressif <http://docs.platformio.org/en/latest/platforms/espressif.html>`__
development platform
* Created public `platformio-pkg-ldscripts <https://github.com/platformio/platformio-pkg-ldscripts.git>`_
repository for LD scripts. Moved common configuration for ESP8266 MCU to
``esp8266.flash.common.ld``
(`issue #379 <https://github.com/platformio/platformio/issues/379>`_)
* Improved documentation for `Espressif <http://docs.platformio.org/en/latest/platforms/espressif.html>`__
development platform: OTA update, custom Flash Size, Upload Speed and CPU
frequency
* Fixed reset method for Espressif NodeMCU (ESP-12E Module)
(`issue #380 <https://github.com/platformio/platformio/issues/380>`_)
* Fixed issue with code builder when build path contains spaces
(`issue #387 <https://github.com/platformio/platformio/issues/387>`_)
* Fixed project generator for Eclipse IDE and "duplicate path entries found
in project path"
(`issue #383 <https://github.com/platformio/platformio/issues/383>`_)
2.6.0 (2015-12-15)
~~~~~~~~~~~~~~~~~~

View File

@@ -28,6 +28,9 @@ PlatformIO
.. image:: https://badges.gitter.im/Join%20Chat.svg
:alt: Join the chat at https://gitter.im/platformio/platformio
:target: https://gitter.im/platformio/platformio
.. image:: https://img.shields.io/PlatformIO/donate.png?color=yellow
:alt: Support PlatformIO Team
:target: https://www.bountysource.com/teams/platformio
`Home & Demo <http://platformio.org>`_ |
`Project Examples <https://github.com/platformio/platformio/tree/develop/examples>`_ |
@@ -93,7 +96,7 @@ settings for most popular `Embedded Boards <http://platformio.org/#!/boards>`_.
* Colourful `command-line output <https://raw.githubusercontent.com/platformio/platformio/develop/examples/platformio-examples.png>`_
* `IDE Integration <http://docs.platformio.org/en/latest/ide.html>`_ with
*Arduino, Eclipse, Energia, Qt Creator, Sublime Text, Vim, Visual Studio*
*Arduino, Eclipse, Emacs, Energia, Qt Creator, Sublime Text, Vim, Visual Studio*
* Cloud compiling and `Continuous Integration <http://docs.platformio.org/en/latest/ci/index.html>`_
with *AppVeyor, Circle CI, Drone, Shippable, Travis CI*
* Built-in `Serial Port Monitor <http://docs.platformio.org/en/latest/userguide/cmd_serialports.html#platformio-serialports-monitor>`_ and configurable

View File

@@ -29,7 +29,8 @@ nav {
margin-right: auto;
margin-left: auto;
}
@media (min-width: 768px) {
@media (min-width: 992px) {
#pionav {
display: block !important;
}
@@ -39,11 +40,7 @@ nav {
.wy-nav-side {
top: 50px;
}
.container {
width: 750px;
}
}
@media (min-width: 992px) {
.container {
width: 970px;
}
@@ -94,6 +91,7 @@ nav {
position: relative;
display: block;
padding: 10px 15px;
font-size: 14px;
}
.nav > li > a:hover,
.nav > li > a:focus {
@@ -103,6 +101,9 @@ nav {
.nav > li > a > img {
max-width: none;
}
.nav > li > a > i {
margin-right: 5px;
}
.navbar {
position: relative;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 KiB

After

Width:  |  Height:  |  Size: 297 KiB

BIN
docs/_static/ide-platformio-emacs.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

View File

@@ -11,16 +11,16 @@
<nav role="navigation">
<div>
<ul class="nav navbar-nav">
<li><a href="http://platformio.org/#!/get-started"><i class="fa fa-rocket fa-lg"></i> Get Started</a></li>
<li><a href="http://platformio.org/#!/platforms"><i class="fa fa-laptop fa-lg"></i> Platforms</a></li>
<li><a href="http://platformio.org/#!/frameworks"><i class="fa fa-cogs fa-lg"></i> Frameworks</a></li>
<li><a href="http://platformio.org/#!/boards"><i class="fa fa-gamepad fa-lg"></i> Boards</a></li>
<li ><a href="http://platformio.org/#!/lib"><i class="fa fa-code fa-lg"></i> Libraries</a></li>
<li><a href="http://platformio.org/#!/get-started"><i class="fa fa-rocket fa-lg"></i>Get Started</a></li>
<li><a href="http://platformio.org/#!/platforms"><i class="fa fa-laptop fa-lg"></i>Platforms</a></li>
<li><a href="http://platformio.org/#!/frameworks"><i class="fa fa-cogs fa-lg"></i>Frameworks</a></li>
<li><a href="http://platformio.org/#!/boards"><i class="fa fa-gamepad fa-lg"></i>Boards</a></li>
<li ><a href="http://platformio.org/#!/lib"><i class="fa fa-code fa-lg"></i>Libraries</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="http://platformio.org/#!/who-uses"><i class="fa fa-heart-o fa-lg"></i> Who uses</a></li>
<li class="active"><a href="http://docs.platformio.org/"><i class="fa fa-book fa-lg"></i> Docs</a></li>
<li><a href="http://platformio.org/#!/who-uses"><i class="fa fa-heart-o fa-lg"></i>Who uses</a></li>
<li class="active"><a href="http://docs.platformio.org/"><i class="fa fa-book fa-lg"></i>Docs</a></li>
</ul>
</div>
@@ -39,7 +39,7 @@
}
window.setTimeout(fixScroll, 50);
$(window).on('hashchange', function(e){fixScroll();});
});
});
};
var timer = function() {

View File

@@ -23,6 +23,11 @@ Here are recent articles about PlatformIO:
2015
^^^^
* Dec 22, 2015 - **Jan Penninkhof** - `Over-the-Air ESP8266 programming using PlatformIO <http://www.penninkhof.com/2015/12/1610-over-the-air-esp8266-programming-using-platformio/>`_
* Dec 15, 2015 - **stastaka** - `PlatformIOでカスタムボードを使う (Use a custom board for PlatformIO, Japanese) <http://qiita.com/stastaka/items/a6a50dbbb2933bd78bdd>`_
* Dec 08, 2015 - **Piotr Król** - `Using PlatformIO with TI MSP430 LunchPads <http://blog.3mdeb.com/2015/12/08/using-platformio-with-ti-msp430-lunchpads/>`_
* Dec 01, 2015 - **Michał Seroczyński** - `Push Notification from Arduino Yún with motion sensor <http://www.ches.pl/push-from-yun-1/>`_
* Dec 01, 2015 - **JetBrains CLion Blog** - `C++ Annotated: Fall 2015. Arduino Support in CLion using PlatformIO <http://blog.jetbrains.com/clion/2015/12/cpp-annotated-fall-2015/>`_
* Dec 01, 2015 - **Tateno Yuichi** - `ESP8266 を CUI で開発する (Develop a ESP8266 in CUI, Japanese) <http://jaywiggins.com/platformio/arduino/avr/es8266/2015/09/30/platformio-investigation/>`_
* Nov 29, 2015 - **Keith Hughes** - `Using PlatformIO for Embedded Projects <http://smartspacestuff.blogspot.com/2015/11/using-platformio-for-embedded-projects.html>`_
* Nov 22, 2015 - **Michał Seroczyński** - `Using PlatformIO to get started with Arduino in CLion IDE <http://www.ches.pl/using-platformio-get-started-arduino-clion-ide/>`_
@@ -30,6 +35,7 @@ Here are recent articles about PlatformIO:
* Nov 06, 2015 - **nocd5** - `PlatformIOでmbedをオフラインビルドしSTM32 Nucleoボードでmrubyを使う (Use mruby in the offline build for STM32 Nucleo board with mbed and PlatformIO, Japanese) <http://qiita.com/nocd5/items/d5fda776240f7e7c17eb>`_
* Oct 21, 2015 - **Vittorio Zaccaria** - `Using a cheap STM32 Nucleo to teach remote sensor monitoring <http://www.vittoriozaccaria.net/blog/2015/10/21/using-a-cheap-stm32-nucleo-to-teach-remote-sensor-monitoring.html>`_
* Oct 18, 2015 - **Nico Coetzee** - `First Arduino I2C Experience with PlatformIO <https://electronicventurer.wordpress.com/2015/10/18/first-arduino-i2c-experience/>`_
* Oct 10, 2015 - **Floyd Hilton** - `Programming Arduino with Atom <http://floydhilton.com/software/career/2015/10/10/Arduino_with_Atom.html>`_
* Oct 01, 2015 - **Mistan** - `Compile and Upload Arduino Sketch with PlatformIO for Raspberry Pi Running Arch Linux <http://tech.memoryimprintstudio.com/code-building-for-arduino-with-platformio-for-raspberry-pi-with-arch-linux/>`_
* Sep 30, 2015 - **Jay Wiggins** - `PlatformIO Investigation <http://jaywiggins.com/platformio/arduino/avr/es8266/2015/09/30/platformio-investigation/>`_
* Sep 01, 2015 - **Thomas P. Weldon, Ph.D.** - `Improvised MBED FRDM-K64F Eclipse/PlatformIO Setup and Software Installation <http://thomasweldon.com/tpw/courses/embeddsp/p00pcFrdmK64_eclipsePlatformioSetup.html>`_

View File

@@ -50,7 +50,7 @@ Please fill all fields for your project in the Drone control panel:
.. code-block:: bash
python -c "$(curl -fsSL https://raw.githubusercontent.com/platformio/platformio/master/scripts/get-platformio.py)"
pip install -U platformio
platformio ci --board=TYPE_1 --board=TYPE_2 --board=TYPE_N
.. image:: ../_static/droneci-platformio-integration-1.png
@@ -75,7 +75,7 @@ Examples
.. code-block:: bash
python -c "$(curl -fsSL https://raw.githubusercontent.com/platformio/platformio/master/scripts/get-platformio.py)"
pip install -U platformio
wget https://github.com/xxxajk/spi4teensy3/archive/master.zip -O /tmp/spi4teensy3.zip
unzip /tmp/spi4teensy3.zip -d /tmp
platformio ci --lib="." --lib="/tmp/spi4teensy3-master" --board=uno --board=teensy31 --board=due

View File

@@ -55,7 +55,7 @@ GitHub repository.
- PLATFORMIO_CI_SRC=path/to/source/directory
install:
- python -c "$(curl -fsSL https://raw.githubusercontent.com/platformio/platformio/master/scripts/get-platformio.py)"
- pip install -U platformio
script:
- platformio ci --board=TYPE_1 --board=TYPE_2 --board=TYPE_N
@@ -81,7 +81,7 @@ Examples
- PLATFORMIO_CI_SRC=examples/pl2303/pl2303_gps/pl2303_gps.ino
install:
- python -c "$(curl -fsSL https://raw.githubusercontent.com/platformio/platformio/master/scripts/get-platformio.py)"
- pip install -U platformio
- wget https://github.com/xxxajk/spi4teensy3/archive/master.zip -O /tmp/spi4teensy3.zip
- unzip /tmp/spi4teensy3.zip -d /tmp

View File

@@ -69,7 +69,7 @@ release = platformio.__version__
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
exclude_patterns = ['_build', '**/*_extra.rst']
# The reST default role (used for this markup: `text`) to use for all
# documents.

View File

@@ -64,3 +64,15 @@ Used in demo
7. :ref:`platformio lib install 124 --version "1.40" <cmd_lib_install>` command
8. :ref:`platformio lib show 124 <cmd_lib_show>` command
9. :ref:`cmd_lib_update` command.
Over-the-Air update for ESP8266
-------------------------------
.. image:: _static/platformio-demo-ota-esp8266.jpg
:target: https://www.youtube.com/watch?v=lXchL3hpDO4
Used in demo
~~~~~~~~~~~~
1. :ref:`cmd_run` command
2. :ref:`platformio run -t upload <cmd_run>` command.

View File

@@ -55,6 +55,10 @@ Allows to override :ref:`projectconf` option :ref:`projectconf_pio_src_dir`.
Allows to override :ref:`projectconf` option :ref:`projectconf_pio_envs_dir`.
.. envvar:: PLATFORMIO_DATA_DIR
Allows to override :ref:`projectconf` option :ref:`projectconf_pio_data_dir`.
Builder
-------

View File

@@ -41,7 +41,7 @@ console application, it can be used in combination with one's favorite
Alright, so PlatformIO can run on different operating systems. But more
importantly, from development perspective at least, is a list of supported
boards and MCUs. To keep things short: PlatformIO supports over 150+
boards and MCUs. To keep things short: PlatformIO supports approximately 200
`Embedded Boards <http://platformio.org/#!/boards>`_ and all major
:ref:`Development Platforms <platforms>`.
@@ -103,52 +103,6 @@ Troubleshooting
Installation
~~~~~~~~~~~~
PlatformIO and ``SCons`` aren't installed properly
''''''''''''''''''''''''''''''''''''''''''''''''''
PlatformIO depends on awesome and irreplaceable software construction tool
named `SCons <http://www.scons.org>`_. PlatformIO Code Builder uses it to build
single source code for the multiple embedded platforms.
When you install PlatformIO it tries to find ``scons`` program in your OS. If
SCons is installed in your system, then PlatformIO will use it. Otherwise,
PlatformIO tries to install it automatically using ``pip install scons``. So, if
you are here, then it means that PlatformIO could not install it for you.
Let fix it manually.
1. Need to cleanup all previous SCons installations using `pip <https://pip.pypa.io>`_
.. code-block:: bash
[sudo] pip uninstall scons
2. Try to install it manually
.. code-block:: bash
[sudo] pip install scons
# If you have errors:
# * error: option --single-version-externally-managed not recognized
# * OSError: [Errno 1] Operation not permitted: '/System/Library/Frameworks/Python.framework/Versions/2.7/man'
[sudo] pip install --egg scons --install-option="--no-install-man"
3. If it didn't help you, try system OS package manager
* **Mac OS X** using `brew <http://brew.sh>`_ run ``brew install scons``
* **Linux** using ``apt`` run ``[sudo] apt-get install scons``
To identify that SCons is installed in your system run ``scons -v``.
.. _faq_troubleshooting_sconssingverextmanaged:
PIP & SCons Error: option --single-version-externally-managed not recognized
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Answered in `issue #279 <https://github.com/platformio/platformio/issues/279>`_.
[Errno 1] Operation not permitted
'''''''''''''''''''''''''''''''''
@@ -180,8 +134,8 @@ For example, ``which platformio`` is equal to ``/usr/local/bin/platformio``,
then `PATH (wiki) <https://en.wikipedia.org/wiki/PATH_(variable)>`_
should contain ``/usr/local/bin`` directory.
**Unix Users**: You can make "symlinks" from ``platformio`` and ``scons``
programs to the ``bin`` directory which is included in ``$PATH``. For example,
**Unix Users**: You can make "symlinks" from ``platformio`` program to the
``bin`` directory which is included in ``$PATH``. For example,
see `issue #272 <https://github.com/platformio/platformio/issues/272#issuecomment-133626112>`_.
Windows UnicodeDecodeError: 'ascii' codec can't decode byte
@@ -245,3 +199,8 @@ Archlinux: libncurses.so.5: cannot open shared object file
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Answered in `issue #291 <https://github.com/platformio/platformio/issues/291>`_.
Monitoring a serial port breaks upload
''''''''''''''''''''''''''''''''''''''
Answered in `issue #384 <https://github.com/platformio/platformio/issues/384>`_.

View File

@@ -36,6 +36,9 @@ Platforms
* - :ref:`platform_espressif`
- Espressif Systems is a privately held fabless semiconductor company. They provide wireless communications and Wi-Fi chips which are widely used in mobile devices and the Internet of Things applications.
* - :ref:`platform_nordicnrf51`
- The Nordic nRF51 Series is a family of highly flexible, multi-protocol, system-on-chip (SoC) devices for ultra-low power wireless applications. nRF51 Series devices support a range of protocol stacks including Bluetooth Smart (previously called Bluetooth low energy), ANT and proprietary 2.4GHz protocols such as Gazell.
* - :ref:`platform_teensy`
- 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.
@@ -63,6 +66,20 @@ Adafruit
- Flash
- RAM
* - ``bluefruitmicro``
- `Adafruit Bluefruit Micro <https://www.adafruit.com/products/2661>`_
- ATMEGA32U4
- 8 MHz
- 32 Kb
- 2.5 Kb
* - ``feather32u4``
- `Adafruit Feather <https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/>`_
- ATMEGA32U4
- 8 MHz
- 32 Kb
- 2.5 Kb
* - ``flora8``
- `Adafruit Flora <http://www.adafruit.com/product/659>`_
- ATMEGA32U4
@@ -77,6 +94,20 @@ Adafruit
- 8 Kb
- 0.5 Kb
* - ``huzzah``
- `Adafruit HUZZAH ESP8266 <https://www.adafruit.com/products/2471>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
* - ``metro``
- `Adafruit Metro <https://www.adafruit.com/products/2466>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``protrinket3``
- `Adafruit Pro Trinket 3V/12MHz (USB) <http://www.adafruit.com/products/2010>`_
- ATMEGA328P
@@ -363,7 +394,7 @@ BQ
- RAM
* - ``zumbt328``
- `BQ ZUM BT-328 board <http://www.bq.com/gb/products/zum.html>`_
- `BQ ZUM BT-328 <http://www.bq.com/gb/products/zum.html>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
@@ -437,6 +468,26 @@ Digistump
- 512 Kb
- 28 Kb
ESPino
~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``espino``
- `ESPino <http://www.espino.io>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
Engduino
~~~~~~~~
@@ -485,25 +536,25 @@ Espressif
- RAM
* - ``esp01``
- `Espressif ESP8266 ESP-01 board <https://nurdspace.nl/ESP8266>`_
- `Espressif Generic ESP8266 ESP-01 512k <http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family>`_
- ESP8266
- 80 MHz
- 512 Kb
- 32 Kb
- 80 Kb
* - ``esp01_1m``
- `Espressif ESP8266 ESP-01-1MB board <https://nurdspace.nl/ESP8266>`_
- `Espressif Generic ESP8266 ESP-01 1M <http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family>`_
- ESP8266
- 80 MHz
- 1024 Kb
- 32 Kb
- 80 Kb
* - ``esp12e``
- `Espressif ESP8266 ESP-12E board (NodeMCU) <https://nurdspace.nl/ESP8266>`_
- `Espressif ESP8266 ESP-12E <http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 32 Kb
- 80 Kb
LightUp
~~~~~~~
@@ -628,6 +679,46 @@ Microduino
- 64 Kb
- 4 Kb
NodeMCU
~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``nodemcu``
- `NodeMCU 0.9 & 1.0 <http://www.nodemcu.com/>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
Olimex
~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``modwifi``
- `Olimex MOD-WIFI-ESP8266(-DEV) <https://www.olimex.com/Products/IoT/MOD-WIFI-ESP8266-DEV/open-source-hardware>`_
- ESP8266
- 80 MHz
- 2048 Kb
- 80 Kb
PanStamp
~~~~~~~~
@@ -695,6 +786,26 @@ Quirkbot
- 32 Kb
- 2.5 Kb
RFduino
~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``rfduino``
- `RFduino <http://www.rfduino.com/product/rfd22102-rfduino-dip/index.html>`_
- NRF51822
- 16 MHz
- 128 Kb
- 8 Kb
RedBearLab
~~~~~~~~~~
@@ -893,6 +1004,13 @@ SparkFun
- 32 Kb
- 2 Kb
* - ``thing``
- `SparkFun ESP8266 Thing <https://www.sparkfun.com/products/13231>`_
- ESP8266
- 80 MHz
- 512 Kb
- 80 Kb
* - ``uview``
- `SparkFun MicroView <https://www.sparkfun.com/products/12923>`_
- ATMEGA328P
@@ -900,6 +1018,26 @@ SparkFun
- 32 Kb
- 2 Kb
SweetPea
~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``esp210``
- `SweetPea ESP-210 <http://wiki.sweetpeas.se/index.php?title=ESP-210>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
Teensy
~~~~~~
@@ -975,6 +1113,33 @@ TinyCircuits
- 32 Kb
- 2 Kb
WeMos
~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``d1``
- `WeMos D1 <http://www.wemos.cc/wiki/doku.php?id=en:d1>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
* - ``d1_mini``
- `WeMos D1 mini <http://www.wemos.cc/wiki/doku.php?id=en:d1_mini>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
Wicked Device
~~~~~~~~~~~~~

View File

@@ -112,3 +112,5 @@ ST
- 84 MHz
- 512 Kb
- 96 Kb
.. include:: cmsis_extra.rst

View File

@@ -0,0 +1,18 @@
.. Copyright 2014-2015 Ivan Kravets <me@ikravets.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Examples
--------
All project examples are located in PlatformIO repository
`Examples for CMSIS framework <https://github.com/platformio/platformio/tree/develop/examples/stm32>`_.
* `Blink <https://github.com/platformio/platformio/tree/develop/examples/stm32/stm32-cmsis-blink>`_

View File

@@ -115,3 +115,5 @@ TI
- 120 MHz
- 1024 Kb
- 256 Kb
.. include:: libopencm3_extra.rst

View File

@@ -0,0 +1,18 @@
.. Copyright 2014-2015 Ivan Kravets <me@ikravets.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Examples
--------
All project examples are located in PlatformIO repository
`Examples for libOpenCM3 framework <https://github.com/platformio/platformio/tree/develop/examples/stm32>`_.
* `Blink <https://github.com/platformio/platformio/tree/develop/examples/stm32/stm32-opencm3-blink>`_

View File

@@ -741,3 +741,5 @@ u-blox
- 96 MHz
- 512 Kb
- 32 Kb
.. include:: mbed_extra.rst

View File

@@ -0,0 +1,32 @@
.. Copyright 2014-2015 Ivan Kravets <me@ikravets.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Articles
--------
* Dec 15, 2015 - **stastaka** - `PlatformIOでカスタムボードを使う (Use a custom board for PlatformIO, Japanese) <http://qiita.com/stastaka/items/a6a50dbbb2933bd78bdd>`_
* Nov 06, 2015 - **nocd5** - `PlatformIOでmbedをオフラインビルドしSTM32 Nucleoボードでmrubyを使う (Use mruby in the offline build for STM32 Nucleo board with mbed and PlatformIO, Japanese) <http://qiita.com/nocd5/items/d5fda776240f7e7c17eb>`_
* Oct 21, 2015 - **Vittorio Zaccaria** - `Using a cheap STM32 Nucleo to teach remote sensor monitoring <http://www.vittoriozaccaria.net/blog/2015/10/21/using-a-cheap-stm32-nucleo-to-teach-remote-sensor-monitoring.html>`_
* Sep 01, 2015 - **Thomas P. Weldon, Ph.D.** - `Improvised MBED FRDM-K64F Eclipse/PlatformIO Setup and Software Installation <http://thomasweldon.com/tpw/courses/embeddsp/p00pcFrdmK64_eclipsePlatformioSetup.html>`_
See more :ref:`articles`.
Examples
--------
All project examples are located in PlatformIO repository
`Examples for MBED framework <https://github.com/platformio/platformio/tree/develop/examples/mbed>`_.
* `Blink <https://github.com/platformio/platformio/tree/develop/examples/mbed/mbed-blink>`_
* `DSP <https://github.com/platformio/platformio/tree/develop/examples/mbed/mbed-dsp>`_
* `HTTP Client <https://github.com/platformio/platformio/tree/develop/examples/mbed/mbed-http-client>`_
* `RTOS <https://github.com/platformio/platformio/tree/develop/examples/mbed/mbed-rtos>`_
* `Serial <https://github.com/platformio/platformio/tree/develop/examples/mbed/mbed-serial>`_

View File

@@ -105,3 +105,5 @@ ST
- 32 MHz
- 128 Kb
- 16 Kb
.. include:: spl_extra.rst

View File

@@ -0,0 +1,18 @@
.. Copyright 2014-2015 Ivan Kravets <me@ikravets.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Examples
--------
All project examples are located in PlatformIO repository
`Examples for SPL framework <https://github.com/platformio/platformio/tree/develop/examples/stm32>`_.
* `Blink <https://github.com/platformio/platformio/tree/develop/examples/stm32/stm32-spl-blink>`_

View File

@@ -71,3 +71,5 @@ Raspberry Pi
- 1000 MHz
- 524288 Kb
- 524288 Kb
.. include:: wiringpi_extra.rst

View File

@@ -0,0 +1,19 @@
.. Copyright 2014-2015 Ivan Kravets <me@ikravets.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Examples
--------
All project examples are located in PlatformIO repository
`Examples for WiringPi framework <https://github.com/platformio/platformio/tree/develop/examples/raspberrypi>`_.
* `Blink <https://github.com/platformio/platformio/tree/develop/examples/raspberrypi/wiringpi-blink>`_
* `Serial <https://github.com/platformio/platformio/tree/develop/examples/raspberrypi/wiringpi-serial>`_

View File

@@ -21,6 +21,7 @@ IDE Integration
ide/atom
ide/clion
ide/eclipse
ide/emacs
ide/energia
ide/qtcreator
ide/sublimetext

View File

@@ -37,9 +37,9 @@ please install `platomformio <https://atom.io/packages/platomformio>`_ package.
Articles / Manuals
------------------
* `Arduino Development in Atom Editor <http://viget.com/extend/arduino-development-in-atom-editor>`_
* Jul 20, 2015 - **Eli Fatsi** - `Arduino Development in Atom Editor <http://viget.com/extend/arduino-development-in-atom-editor>`_
See a full list with :ref:`articles`.
See more :ref:`articles`.
Screenshot
----------

View File

@@ -33,25 +33,25 @@ page for more detailed information.
Integration
-----------
Project Generator
^^^^^^^^^^^^^^^^^
Since PlatformIO 2.0 you can generate CLion compatible project using
:option:`platformio init --ide` command. Please choose board type using
:ref:`cmd_boards` command and run:
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/#!/boards>`_
command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell
platformio init --ide clion --board %TYPE%
# For example, generate project for Arduino UNO
platformio init --ide clion --board uno
Then:
1. Import this project via ``Menu: File > Import Project``
and specify root directory where is located :ref:`projectconf`
2. Open source file from ``src`` directory (``*.c, *.cpp, *.ino, etc.``)
3. Build project: ``Menu: Run > Build``.
3. Build project (*DO NOT RUN*): ``Menu: Run > Build``.
There are 3 predefined targets for building:
There are 3 predefined targets for building (*NOT FOR RUNNING*, see marks on
the screenshot below):
* ``PLATFORMIO_BUILD`` - build project without auto-uploading
* ``PLATFORMIO_UPLOAD`` - build and upload (if no errors)
@@ -81,10 +81,11 @@ There are 3 predefined targets for building:
Articles / Manuals
------------------
* `Using PlatformIO to get started with Arduino in CLion IDE <http://www.ches.pl/using-platformio-get-started-arduino-clion-ide/>`_
* `Programar con Arduino "The good way" (Programming with Arduino "The good way", Spanish) <http://congdegnu.es/2015/11/09/programar-con-arduino-the-good-way/>`_
* Dec 01, 2015 - **JetBrains CLion Blog** - `C++ Annotated: Fall 2015. Arduino Support in CLion using PlatformIO <http://blog.jetbrains.com/clion/2015/12/cpp-annotated-fall-2015/>`_
* Nov 22, 2015 - **Michał Seroczyński** - `Using PlatformIO to get started with Arduino in CLion IDE <http://www.ches.pl/using-platformio-get-started-arduino-clion-ide/>`_
* Nov 09, 2015 - **ÁLvaro García Gómez** - `Programar con Arduino "The good way" (Programming with Arduino "The good way", Spanish) <http://congdegnu.es/2015/11/09/programar-con-arduino-the-good-way/>`_
See a full list with :ref:`articles`.
See more :ref:`articles`.
Screenshot
----------

View File

@@ -37,14 +37,16 @@ page for more detailed information.
Integration
-----------
Since PlatformIO 2.0 you can generate Eclipse compatible project using
:option:`platformio init --ide` command. Please choose board type using
:ref:`cmd_boards` command and run:
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/#!/boards>`_
command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell
platformio init --ide eclipse --board %TYPE%
# For example, generate project for Arduino UNO
platformio init --ide eclipse --board uno
Then:
1. Import this project via
@@ -61,9 +63,9 @@ Then:
Articles / Manuals
------------------
* `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>`_
* `Improvised MBED FRDM-K64F Eclipse/PlatformIO Setup and Software Installation <http://thomasweldon.com/tpw/courses/embeddsp/p00pcFrdmK64_eclipsePlatformioSetup.html>`_
* `Learning Arduino GitHub Repository <http://www.trojanc.co.za/2015/07/11/learning-arduino-github-repository/>`_
* Sep 01, 2015 - **Thomas P. Weldon, Ph.D.** - `Improvised MBED FRDM-K64F Eclipse/PlatformIO Setup and Software Installation <http://thomasweldon.com/tpw/courses/embeddsp/p00pcFrdmK64_eclipsePlatformioSetup.html>`_
* Jul 11, 2015 - **TrojanC** - `Learning Arduino GitHub Repository <http://www.trojanc.co.za/2015/07/11/learning-arduino-github-repository/>`_
* June 20, 2014 - **Ivan Kravets, Ph.D.** - `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>`_
See a full list with :ref:`articles`.

77
docs/ide/emacs.rst Normal file
View File

@@ -0,0 +1,77 @@
.. Copyright 2014-2015 Ivan Kravets <me@ikravets.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.. _ide_emacs:
Emacs
=====
GNU Emacs is an extensible, customizable text editor - and more. At its core is
an interpreter for Emacs Lisp, a dialect of the
`Lisp programming language <http://en.wikipedia.org/wiki/Lisp_programming_language>`_
with extensions to support text editing.
This software can be used with:
* all available :ref:`platforms`
* all available :ref:`frameworks`
Refer to the `Emacs Documentation <https://www.gnu.org/software/emacs/#Manuals>`_
page for more detailed information.
.. contents::
Integration
-----------
PlatformIO-Mode
^^^^^^^^^^^^^^^
An Emacs minor mode has been written to facilitate building and uploading from within Emacs.
It can be installed from the MELPA repository using ``M-x package-install``.
See the MELPA `Getting Started <https://melpa.org/#/getting-started>`_ page for more information.
Setup instructions for the minor mode can be found at the `Github page <https://github.com/ZachMassia/platformio-mode>`_.
Code completion can optionally be provided by installing `irony-mode <https://github.com/Sarcasm/irony-mode>`_
Project Generator
^^^^^^^^^^^^^^^^^
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/#!/boards>`_
command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell
platformio init --ide emacs --board %TYPE%
cmake .
There are 4 predefined targets for building.
* ``platformio_build`` - Build project without auto-uploading. (``C-c i b``)
* ``platformio_upload`` - Build and upload (if no errors). (``C-c i u``)
* ``platformio_clean`` - Clean compiled objects. (``C-c i c``)
* ``platformio_update`` - Update installed platforms and libraries. (``C-c i d``)
.. warning::
The libraries which are added, installed or used in the project
after generating process wont be reflected in IDE. To fix it you
need to reinitialize project using :ref:`cmd_init` (repeat it).
Screenshot
----------
.. image:: ../_static/ide-platformio-emacs.png
:target: http://docs.platformio.org/en/latest/_static/ide-platformio-emacs.png

View File

@@ -37,14 +37,16 @@ Integration
Project Generator
^^^^^^^^^^^^^^^^^
Since PlatformIO 2.0 you can generate Qt Creator compatible project using
:option:`platformio init --ide` command. Please choose board type using
:ref:`cmd_boards` command and run:
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/#!/boards>`_
command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell
platformio init --ide qtcreator --board %TYPE%
# For example, generate project for Arduino UNO
platformio init --ide qtcreator --board uno
Then:
1. Import project via ``File > Open File or Project`` and select

View File

@@ -32,14 +32,16 @@ Integration
Project Generator
^^^^^^^^^^^^^^^^^
Since PlatformIO 2.0 you can generate Sublime Text compatible project using
:option:`platformio init --ide` command. Please choose board type using
:ref:`cmd_boards` command and run:
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/#!/boards>`_
command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell
platformio init --ide sublimetext --board %TYPE%
# For example, generate project for Arduino UNO
platformio init --ide sublimetext --board uno
Then:
1. Import project via ``Menu: Project > Open Project...`` and select

View File

@@ -37,13 +37,15 @@ Integration
Project Generator
^^^^^^^^^^^^^^^^^
Since PlatformIO 2.0 you can generate Visual Studio compatible project using
:option:`platformio init --ide` command. Please choose board type using
:ref:`cmd_boards` command and run:
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/#!/boards>`_
command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell
platformio init --ide visualstudio --board %TYPE%
platformio init --ide sublimetext --board %TYPE%
# For example, generate project for Arduino UNO
platformio init --ide visualstudio --board uno
Then:

View File

@@ -28,7 +28,7 @@ integration. Arduino and MBED compatible. Ready for Cloud compiling.**
*Atmel AVR & SAM, Espressif, Freescale Kinetis, Nordic nRF51, NXP LPC,
Silicon Labs EFM32, ST STM32, TI MSP430 & Tiva, Teensy, Arduino, mbed,
libOpenCM3, etc.**
libOpenCM3, etc.*
* `Website <http://platformio.org>`_
* `Web 2.0 Library Search <http://platformio.org/#!/lib>`_ |
@@ -46,12 +46,12 @@ Embedded Development. *Easier Than Ever.*
-----------------------------------------
* Colourful command-line output
* :ref:`IDE Integration <ide>` with *Arduino, Eclipse, Energia, Qt Creator,
* :ref:`IDE Integration <ide>` with *Arduino, Eclipse, Emacs, Energia, Qt Creator,
Sublime Text, Vim, Visual Studio*
* Cloud compiling and :ref:`ci` with *AppVeyor, Circle CI, Drone, Shippable, Travis CI*
* Built-in :ref:`Serial Port Monitor <cmd_serialports_monitor>` and
configurable build :ref:`-flags/-options <projectconf_build_flags>`
* Pre-built tool chains, :ref:`frameworks` for the
* Pre-built toolchains, :ref:`frameworks` for the
:ref:`Development Platforms <platforms>`
Smart Code Builder. *Fast and Reliable.*
@@ -71,7 +71,8 @@ The Missing Library Manager. *It's here!*
* Automatic library updating
* It runs on Windows, Mac OS X, and Linux (+ARM).
For further details, please refer to :ref:`faq_what_is_platformio`
For further details, please refer to
:ref:`What is PlatformIO? How does it work? <faq_what_is_platformio>`
Contents
--------
@@ -94,7 +95,7 @@ Contents
.. toctree::
:caption: Instruments
:maxdepth: 2
:maxdepth: 3
Platforms & Boards <platforms/index>
frameworks/index

View File

@@ -25,28 +25,27 @@ computers (`Raspberry Pi <http://www.raspberrypi.org>`_,
System requirements
-------------------
* **Operating systems:**
* Mac OS X
* Linux, +ARM
* Windows
* Python 2.6.x or Python 2.7.x(recommended)
:Operating System: Mac OS X, Linux (+ARM) or Windows
:Python Interpreter:
All commands below should be executed in
`Command-line <http://en.wikipedia.org/wiki/Command-line_interface>`_
application (Terminal):
Python 2.6 or 2.7. Python 2.7 is recommended
* Mac OS X / Linux *Terminal* application
* Windows ``cmd.exe`` application.
.. attention::
**Windows Users**: Please `Download the latest Python 2.7.x
<https://www.python.org/downloads/>`_ and install it.
**DON'T FORGET** to select ``Add python.exe to Path`` feature on the
"Customize" stage, otherwise ``pip`` command will not be available.
:Terminal Application:
All commands below should be executed in
`Command-line <http://en.wikipedia.org/wiki/Command-line_interface>`_
application (Terminal). For Mac OS X and Linux OS - *Terminal* application,
for Windows OS ``cmd.exe`` application.
Installation Methods
--------------------
.. warning::
**Windows OS**: Please `Download the latest Python 2.7.x
<https://www.python.org/downloads/>`_ and install it.
**DON'T FORGET** to select ``Add python.exe to Path`` feature on the
"Customize" stage.
Please *choose ONE of* the following methods:
a) Python Package Manager
@@ -57,19 +56,20 @@ The latest stable version of PlatformIO may be installed or upgraded via
.. code-block:: bash
# update package installer
pip install -U pip setuptools
# install or upgrade PlatformIO
pip install -U platformio
Note that you may run into permissions issues running these commands. You have
a few options here:
* Run with ``sudo`` to install PlatformIO and dependencies globally
* Specify the `pip install --user <https://pip.pypa.io/en/stable/user_guide.html#user-installs>`_
option to install local to your user
* Run the command in a `virtualenv <https://virtualenv.pypa.io>`_ local to a
specific project working set.
If ``pip`` command is not available or you have problems with it try
:ref:`installation_installer_script`.
.. _installation_installer_script:
b) Installer Script
@@ -130,10 +130,6 @@ c) Full Guide
.. code-block:: bash
# update package installer
pip install -U pip setuptools
# install or upgrade PlatformIO
pip install -U platformio
If your computer does not recognize ``pip`` command, try to install it first
@@ -152,8 +148,8 @@ Install the latest PlatformIO from the ``develop`` branch:
.. code-block:: bash
# update package installer
pip install -U pip setuptools
# uninstall existing version
pip uninstall platformio
# install the latest development version of PlatformIO
pip install -U https://github.com/platformio/platformio/archive/develop.zip

View File

@@ -25,7 +25,7 @@ to keep project in own structure and define:
PlatformIO Library Crawler uses ``library.json`` manifest to extract
source code from developer's location and keeps cleaned library in own
Libraries Storage.
Library Storage.
A data in ``library.json`` should be represented
in `JSON-style <http://en.wikipedia.org/wiki/JSON>`_ via
@@ -183,6 +183,16 @@ A version of the current library source code.
:ref:`libjson_repository` field. In this case
|PIOAPICR| will use the *CVS*-revision from the latest commit.
Example with fixed release/tag on GitHub:
.. code-block:: javascript
"version": "1.0.0",
"downloadUrl": "https://github.com/foo/bar/archive/v1.0.0.tar.gz",
"include": "bar-1.0.0"
See more ``library.json`` :ref:`library_creating_examples`.
.. _libjson_url:
@@ -244,6 +254,7 @@ Pattern Meaning
* - ``[!seq]``
- matches any character not in seq
See more ``library.json`` :ref:`library_creating_examples`.
.. _libjson_exclude:
@@ -329,6 +340,8 @@ Example:
]
See more ``library.json`` :ref:`library_creating_examples`.
.. _libjson_examples:
``examples``

View File

@@ -146,3 +146,12 @@ The registration requirements:
Now, you can :ref:`register <cmd_lib_register>` your library and allow others
to :ref:`install <cmd_lib_install>` it.
.. _library_creating_examples:
Examples
--------
* `GitHub + fixed release <http://platformio.org/#!/lib/show/552/ACNoblex>`_
* `Dependencies by author and framework <http://platformio.org/#!/lib/show/3/PID-AutoTune>`_
* `Multiple libraries in the one repository <https://github.com/jrowberg/i2cdevlib/tree/master/Arduino>`_

View File

@@ -82,6 +82,20 @@ Adafruit
- Flash
- RAM
* - ``bluefruitmicro``
- `Adafruit Bluefruit Micro <https://www.adafruit.com/products/2661>`_
- ATMEGA32U4
- 8 MHz
- 32 Kb
- 2.5 Kb
* - ``feather32u4``
- `Adafruit Feather <https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/>`_
- ATMEGA32U4
- 8 MHz
- 32 Kb
- 2.5 Kb
* - ``flora8``
- `Adafruit Flora <http://www.adafruit.com/product/659>`_
- ATMEGA32U4
@@ -96,6 +110,13 @@ Adafruit
- 8 Kb
- 0.5 Kb
* - ``metro``
- `Adafruit Metro <https://www.adafruit.com/products/2466>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``protrinket3``
- `Adafruit Pro Trinket 3V/12MHz (USB) <http://www.adafruit.com/products/2010>`_
- ATMEGA328P
@@ -368,7 +389,7 @@ BQ
- RAM
* - ``zumbt328``
- `BQ ZUM BT-328 board <http://www.bq.com/gb/products/zum.html>`_
- `BQ ZUM BT-328 <http://www.bq.com/gb/products/zum.html>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
@@ -903,3 +924,5 @@ ubIQio
- 16 MHz
- 32 Kb
- 2 Kb
.. include:: atmelavr_extra.rst

View File

@@ -0,0 +1,115 @@
.. Copyright 2014-2015 Ivan Kravets <me@ikravets.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.. _atmelavr_upload_via_programmer:
Upload using Programmer
-----------------------
To upload firmware using programmer you need to use ``program`` target instead
``upload`` for :option:`platformio run --target` command. For example,
``platformio run -t program``.
Configuration for the programmers:
* AVR ISP
.. code-block:: ini
[env:myenv]
platform = atmelavr
framework = arduino
upload_protocol = stk500v1
upload_flags = -P$UPLOAD_PORT
# edit this line with valid upload port
upload_port = SERIAL_PORT_HERE
* AVRISP mkII
.. code-block:: ini
[env:myenv]
platform = atmelavr
framework = arduino
upload_protocol = stk500v2
upload_flags = -Pusb
* USBtinyISP
.. code-block:: ini
[env:myenv]
platform = atmelavr
framework = arduino
upload_protocol = usbtiny
* USBasp
.. code-block:: ini
[env:myenv]
platform = atmelavr
framework = arduino
upload_protocol = usbasp
upload_flags = -Pusb
* Parallel Programmer
.. code-block:: ini
[env:myenv]
platform = atmelavr
framework = arduino
upload_protocol = dapa
upload_flags = -F
* Arduino as ISP
.. code-block:: ini
[env:myenv]
platform = atmelavr
framework = arduino
upload_protocol = stk500v1
upload_flags = -P$UPLOAD_PORT -b$UPLOAD_SPEED
# edit these lines
upload_port = SERIAL_PORT_HERE
upload_speed = 19200
Articles
--------
* Dec 01, 2015 - **Michał Seroczyński** - `Push Notification from Arduino Yún with motion sensor <http://www.ches.pl/push-from-yun-1/>`_
* Nov 29, 2015 - **Keith Hughes** - `Using PlatformIO for Embedded Projects <http://smartspacestuff.blogspot.com/2015/11/using-platformio-for-embedded-projects.html>`_
* Nov 22, 2015 - **Michał Seroczyński** - `Using PlatformIO to get started with Arduino in CLion IDE <http://www.ches.pl/using-platformio-get-started-arduino-clion-ide/>`_
* Nov 09, 2015 - **ÁLvaro García Gómez** - `Programar con Arduino "The good way" (Programming with Arduino "The good way", Spanish) <http://congdegnu.es/2015/11/09/programar-con-arduino-the-good-way/>`_
* Oct 18, 2015 - **Nico Coetzee** - `First Arduino I2C Experience with PlatformIO <https://electronicventurer.wordpress.com/2015/10/18/first-arduino-i2c-experience/>`_
* Oct 10, 2015 - **Floyd Hilton** - `Programming Arduino with Atom <http://floydhilton.com/software/career/2015/10/10/Arduino_with_Atom.html>`_
* June 20, 2014 - **Ivan Kravets, Ph.D.** - `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>`_
See more :ref:`articles`.
Examples
--------
All project examples are located in PlatformIO repository
`Examples for Atmel AVR platform <https://github.com/platformio/platformio/tree/develop/examples/atmelavr-and-arduino>`_.
* `Wiring Blink <https://github.com/platformio/platformio/tree/develop/examples/wiring-blink>`_
* `Arduino with external libraries <https://github.com/platformio/platformio/tree/develop/examples/atmelavr-and-arduino/arduino-external-libs>`_
* `Arduino with internal libraries <https://github.com/platformio/platformio/tree/develop/examples/atmelavr-and-arduino/arduino-internal-libs>`_
* `Project uses source file name for "src" directory (Arduino project structure) <https://github.com/platformio/platformio/tree/develop/examples/atmelavr-and-arduino/arduino-own-src_dir>`_
* `Atmel AVR Native blink <https://github.com/platformio/platformio/tree/develop/examples/atmelavr-and-arduino/atmelavr-native-blink>`_
* `Digitstump Mouse <https://github.com/platformio/platformio/tree/develop/examples/atmelavr-and-arduino/digitstump-mouse>`_
* `Engduino magnetometer <https://github.com/platformio/platformio/tree/develop/examples/atmelavr-and-arduino/engduino-magnetometer>`_
* `PanStamp blink <https://github.com/platformio/platformio/tree/develop/examples/atmelavr-and-arduino/panstamp-blink>`_

View File

@@ -19,10 +19,10 @@ 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
build scripts, toolchains, 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
which can use the same packages(toolchains, frameworks), but have
different/own build scripts, uploader and etc.
.. note::
@@ -62,6 +62,9 @@ Packages
* - ``framework-arduinomsp430``
- `Arduino Wiring-based Framework (MSP430 Core) <http://arduino.cc/en/Reference/HomePage>`_
* - ``framework-arduinonordicnrf51``
- `Arduino Wiring-based Framework (RFduino Core) <https://github.com/RFduino/RFduino>`_
* - ``framework-arduinosam``
- `Arduino Wiring-based Framework (SAM Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_
@@ -110,9 +113,18 @@ Packages
* - ``tool-micronucleus``
- `Micronucleus <https://github.com/micronucleus/micronucleus>`_
* - ``tool-mkspiffs``
- `Tool to build and unpack SPIFFS images <https://github.com/igrr/mkspiffs>`_
* - ``tool-mspdebug``
- `MSPDebug <http://mspdebug.sourceforge.net/>`_
* - ``tool-rfdloader``
- `rfdloader <https://github.com/RFduino/RFduino>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``tool-stlink``
- `ST-Link <https://github.com/texane/stlink>`_

View File

@@ -28,21 +28,24 @@ Packages
* - Name
- Contents
* - ``toolchain-xtensa``
- `xtensa-gcc <https://github.com/jcmvbkbc/gcc-xtensa>`_, `GDB <http://www.gnu.org/software/gdb/>`_
* - ``tool-esptool``
- `esptool-ck <https://github.com/igrr/esptool-ck>`_
* - ``tool-mkspiffs``
- `Tool to build and unpack SPIFFS images <https://github.com/igrr/mkspiffs>`_
* - ``framework-arduinoespressif``
- `Arduino Wiring-based Framework (ESP8266 Core) <https://github.com/esp8266/Arduino>`_
* - ``ldscripts``
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_
* - ``sdk-esp8266``
- `ESP8266 SDK <http://bbs.espressif.com>`_
* - ``tool-esptool``
- `esptool-ck <https://github.com/igrr/esptool-ck>`_
* - ``framework-arduinoespressif``
- `Arduino Wiring-based Framework (ESP8266 Core) <https://github.com/esp8266/Arduino>`_
* - ``toolchain-xtensa``
- `xtensa-gcc <https://github.com/jcmvbkbc/gcc-xtensa>`_, `GDB <http://www.gnu.org/software/gdb/>`_
.. warning::
**Linux Users:** Don't forget to install "udev" rules file
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
@@ -72,6 +75,46 @@ Boards
* For more detailed ``board`` information please scroll tables below by
horizontal.
Adafruit
~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``huzzah``
- `Adafruit HUZZAH ESP8266 <https://www.adafruit.com/products/2471>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
ESPino
~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``espino``
- `ESPino <http://www.espino.io>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
Espressif
~~~~~~~~~
@@ -86,22 +129,131 @@ Espressif
- RAM
* - ``esp01``
- `Espressif ESP8266 ESP-01 board <https://nurdspace.nl/ESP8266>`_
- `Espressif Generic ESP8266 ESP-01 512k <http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family>`_
- ESP8266
- 80 MHz
- 512 Kb
- 32 Kb
- 80 Kb
* - ``esp01_1m``
- `Espressif ESP8266 ESP-01-1MB board <https://nurdspace.nl/ESP8266>`_
- `Espressif Generic ESP8266 ESP-01 1M <http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family>`_
- ESP8266
- 80 MHz
- 1024 Kb
- 32 Kb
- 80 Kb
* - ``esp12e``
- `Espressif ESP8266 ESP-12E board (NodeMCU) <https://nurdspace.nl/ESP8266>`_
- `Espressif ESP8266 ESP-12E <http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 32 Kb
- 80 Kb
NodeMCU
~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``nodemcu``
- `NodeMCU 0.9 & 1.0 <http://www.nodemcu.com/>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
Olimex
~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``modwifi``
- `Olimex MOD-WIFI-ESP8266(-DEV) <https://www.olimex.com/Products/IoT/MOD-WIFI-ESP8266-DEV/open-source-hardware>`_
- ESP8266
- 80 MHz
- 2048 Kb
- 80 Kb
SparkFun
~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``thing``
- `SparkFun ESP8266 Thing <https://www.sparkfun.com/products/13231>`_
- ESP8266
- 80 MHz
- 512 Kb
- 80 Kb
SweetPea
~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``esp210``
- `SweetPea ESP-210 <http://wiki.sweetpeas.se/index.php?title=ESP-210>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
WeMos
~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``d1``
- `WeMos D1 <http://www.wemos.cc/wiki/doku.php?id=en:d1>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
* - ``d1_mini``
- `WeMos D1 mini <http://www.wemos.cc/wiki/doku.php?id=en:d1_mini>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
.. include:: espressif_extra.rst

View File

@@ -0,0 +1,179 @@
.. Copyright 2014-2015 Ivan Kravets <me@ikravets.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Custom CPU Frequency or Upload Speed
------------------------------------
See :ref:`projectconf_board_f_cpu` and :ref:`projectconf_upload_speed` options
from :ref:`projectconf`
.. code-block:: ini
[env:myenv]
# set frequency to 40MHz
board_f_cpu = 40000000L
upload_speed = 9600
.. _platform_espressif_customflash:
Custom Flash Size
-----------------
.. warning::
Please make sure to read `ESP8266 Flash layout <https://github.com/esp8266/Arduino/blob/master/doc/filesystem.md#flash-layout>`_
information first.
The list with preconfigured LD scripts is located in public repository
`platformio-pkg-ldscripts <https://github.com/platformio/platformio-pkg-ldscripts>`_.
* ``esp8266.flash.512k0.ld`` 512K (no SPIFFS)
* ``esp8266.flash.512k64.ld`` 512K (64K SPIFFS)
* ``esp8266.flash.1m64.ld`` 1M (64K SPIFFS)
* ``esp8266.flash.1m128.ld`` 1M (128K SPIFFS)
* ``esp8266.flash.1m256.ld`` 1M (256K SPIFFS)
* ``esp8266.flash.1m512.ld`` 1M (512K SPIFFS)
* ``esp8266.flash.2m.ld`` 2M (1M SPIFFS)
* ``esp8266.flash.4m1m.ld`` 4M (1M SPIFFS)
* ``esp8266.flash.4m.ld`` 4M (3M SPIFFS)
To override default LD script please use :ref:`projectconf_build_flags` from
:ref:`projectconf`.
.. code-block:: ini
[env:myenv]
build_flags = -Wl,-Tesp8266.flash.4m.ld
.. _platform_espressif_uploadfs:
Uploading files to file system SPIFFS
-------------------------------------
.. warning::
Please make sure to read `ESP8266 Flash layout <https://github.com/esp8266/Arduino/blob/master/doc/filesystem.md#flash-layout>`_
information first.
1. Create :ref:`projectconf_pio_data_dir` and put files here
2. Run target ``uploadfs`` via :option:`platformio run --target` command.
To upload SPIFFS image using OTA update please specify ``upload_port`` /
``--upload-port`` as IP address or DNS name (``*.local``). For the details
please follow to :ref:`platform_espressif_ota`.
By default, will be used default LD Script for the board where is specified
SPIFFS offsets (start, end, page, block). You can override it using
:ref:`platform_espressif_customflash`.
Active discussion is located in `issue #382 <https://github.com/platformio/platformio/issues/382>`_.
.. _platform_espressif_ota:
Over-the-Air (OTA) update
-------------------------
Firstly, please read `What is OTA? How to use it? <https://github.com/esp8266/Arduino/blob/master/doc/ota_updates/ota_updates.md>`_
There are 2 options:
* Directly specify :option:`platformio run --upload-port` in command line
.. code-block:: bash
platformio run --target upload --upload-port IP_ADDRESS_HERE or DNS_NAME.local
* Specify ``upload_port`` option in :ref:`projectconf`
.. code-block:: ini
[env:myenv]
...
upload_port = IP_ADDRESS_HERE or DNS_NAME.local
For example,
* ``platformio run -t upload --upload-port 192.168.0.255``
* ``platformio run -t upload --upload-port myesp8266.local``
Authentication and upload options
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can pass additional options/flags to OTA uploader using
``upload_flags`` option in :ref:`projectconf`
.. code-block:: ini
[env:myenv]
upload_flags = --port=8266
Available flags
* ``--port=ESP_PORT`` ESP8266 ota Port. Default 8266
* ``--auth=AUTH`` Set authentication password
* ``--spiffs`` Use this option to transmit a SPIFFS image and do not flash
the module
For the full list with available options please run
.. code-block:: bash
~/.platformio/packages/framework-arduinoespressif/tools/espota.py -h
Usage: espota.py [options]
Transmit image over the air to the esp8266 module with OTA support.
Options:
-h, --help show this help message and exit
Destination:
-i ESP_IP, --ip=ESP_IP
ESP8266 IP Address.
-p ESP_PORT, --port=ESP_PORT
ESP8266 ota Port. Default 8266
Authentication:
-a AUTH, --auth=AUTH
Set authentication password.
Image:
-f FILE, --file=FILE
Image file.
-s, --spiffs Use this option to transmit a SPIFFS image and do not
flash the module.
Output:
-d, --debug Show debug output. And override loglevel with debug.
-r, --progress Show progress output. Does not work for ArduinoIDE
Demo
~~~~
.. image:: ../_static/platformio-demo-ota-esp8266.jpg
:target: https://www.youtube.com/watch?v=lXchL3hpDO4
Articles
--------
* Dec 22, 2015 - **Jan Penninkhof** - `Over-the-Air ESP8266 programming using PlatformIO <http://www.penninkhof.com/2015/12/1610-over-the-air-esp8266-programming-using-platformio/>`_
* Dec 01, 2015 - **Tateno Yuichi** - `ESP8266 を CUI で開発する (Develop a ESP8266 in CUI, Japanese) <http://jaywiggins.com/platformio/arduino/avr/es8266/2015/09/30/platformio-investigation/>`_
See more :ref:`articles`.
Examples
--------
All project examples are located in PlatformIO repository
`Examples for Espressif platform <https://github.com/platformio/platformio/tree/develop/examples/espressif>`_.
* `Native SDK <https://github.com/platformio/platformio/tree/develop/examples/espressif/esp8266-native>`_
* `WebServer <https://github.com/platformio/platformio/tree/develop/examples/espressif/esp8266-webserver>`_
* `WiFiScan <https://github.com/platformio/platformio/tree/develop/examples/espressif/esp8266-wifiscan>`_

View File

@@ -13,7 +13,7 @@
Platform ``native``
===================
Native development platform is intended to be used for desktop OS. This platform uses built-in tool chains (preferable based on GCC), frameworks, libs from particular OS where it will be run.
Native development platform is intended to be used for desktop OS. This platform uses built-in toolchains (preferable based on GCC), frameworks, libs from particular OS where it will be run.
For more detailed information please visit `vendor site <http://platformio.org/#!/platforms/native>`_.

View File

@@ -31,9 +31,15 @@ Packages
* - ``framework-mbed``
- `mbed Framework <http://mbed.org>`_
* - ``tool-rfdloader``
- `rfdloader <https://github.com/RFduino/RFduino>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
* - ``framework-arduinonordicnrf51``
- `Arduino Wiring-based Framework (RFduino Core) <https://github.com/RFduino/RFduino>`_
.. warning::
**Linux Users:** Don't forget to install "udev" rules file
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
@@ -51,6 +57,9 @@ Frameworks
* - Name
- Description
* - :ref:`framework_arduino`
- Arduino Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences.
* - :ref:`framework_mbed`
- The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community.
@@ -137,6 +146,26 @@ Nordic
- 128 Kb
- 16 Kb
RFduino
~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``rfduino``
- `RFduino <http://www.rfduino.com/product/rfd22102-rfduino-dip/index.html>`_
- NRF51822
- 16 MHz
- 128 Kb
- 8 Kb
RedBearLab
~~~~~~~~~~
@@ -203,3 +232,5 @@ Switch Science
- 16 MHz
- 256 Kb
- 16 Kb
.. include:: nordicnrf51_extra.rst

View File

@@ -0,0 +1,18 @@
.. Copyright 2014-2015 Ivan Kravets <me@ikravets.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Examples
--------
All project examples are located in PlatformIO repository
`Examples for Nordic nRF51 platform <https://github.com/platformio/platformio/tree/develop/examples/nordicnrf51>`_.
* `RFduino iBeacon <https://github.com/platformio/platformio/tree/develop/examples/nordicnrf51/rfduino-ibeacon>`_

View File

@@ -329,3 +329,5 @@ ST
- 80 MHz
- 1024 Kb
- 128 Kb
.. include:: ststm32_extra.rst

View File

@@ -0,0 +1,29 @@
.. Copyright 2014-2015 Ivan Kravets <me@ikravets.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Articles
--------
* Nov 06, 2015 - **nocd5** - `PlatformIOでmbedをオフラインビルドしSTM32 Nucleoボードでmrubyを使う (Use mruby in the offline build for STM32 Nucleo board with mbed and PlatformIO, Japanese) <http://qiita.com/nocd5/items/d5fda776240f7e7c17eb>`_
* Oct 21, 2015 - **Vittorio Zaccaria** - `Using a cheap STM32 Nucleo to teach remote sensor monitoring <http://www.vittoriozaccaria.net/blog/2015/10/21/using-a-cheap-stm32-nucleo-to-teach-remote-sensor-monitoring.html>`_
* Aug 08, 2015 - **Josh Glendenning** - `Armstrap Eagle and PlatformIO <http://isobit.io/2015/08/08/armstrap.html>`_
See more :ref:`articles`.
Examples
--------
All project examples are located in PlatformIO repository
`Examples for ST STM32 platform <https://github.com/platformio/platformio/tree/develop/examples/stm32>`_.
* `CMSIS Blink <https://github.com/platformio/platformio/tree/develop/examples/stm32/stm32-cmsis-blink>`_
* `libOpenCM3 Blink <https://github.com/platformio/platformio/tree/develop/examples/stm32/stm32-opencm3-blink>`_
* `SPL Blink <https://github.com/platformio/platformio/tree/develop/examples/stm32/stm32-spl-blink>`_

View File

@@ -153,3 +153,5 @@ TI
- 16 MHz
- 16 Kb
- 0.5 Kb
.. include:: timsp430_extra.rst

View File

@@ -0,0 +1,28 @@
.. Copyright 2014-2015 Ivan Kravets <me@ikravets.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Articles
--------
* Dec 08, 2015 - **Piotr Król** - `Using PlatformIO with TI MSP430 LunchPads <http://blog.3mdeb.com/2015/12/08/using-platformio-with-ti-msp430-lunchpads/>`_
See more :ref:`articles`.
Examples
--------
All project examples are located in PlatformIO repository
`Examples for TI MSP430 platform <https://github.com/platformio/platformio/tree/develop/examples/timsp430>`_.
* `PanStamp blink <https://github.com/platformio/platformio/tree/develop/examples/timsp430/panstamp-blink>`_
* `Energia blink <https://github.com/platformio/platformio/tree/develop/examples/timsp430/timsp430-energia-blink>`_
* `Native blink <https://github.com/platformio/platformio/tree/develop/examples/timsp430/timsp430-native-blink>`_
* `Wiring Blink <https://github.com/platformio/platformio/tree/develop/examples/wiring-blink>`_

View File

@@ -44,7 +44,7 @@ Options
``home_dir``
^^^^^^^^^^^^
Is used to store platform tool chains, frameworks, external libraries,
Is used to store platform toolchains, frameworks, external libraries,
service data and etc.
A default value is User's home directory:
@@ -115,6 +115,18 @@ This option can be overridden by global environment variable
are defined in :ref:`projectconf`, then **TRY TO DELETE** this folder. In
this situation you will remove all cached files without any risk.
.. _projectconf_pio_data_dir:
``data_dir``
^^^^^^^^^^^^
Data directory to store contents and :ref:`platform_espressif_uploadfs`.
A default value is ``%project_dir%/data``.
This option can be overridden by global environment variable
:envvar:`PLATFORMIO_DATA_DIR`.
[env:NAME]
----------
@@ -176,6 +188,7 @@ 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.
.. _projectconf_board_f_cpu:
``board_f_cpu``
^^^^^^^^^^^^^^^
@@ -209,6 +222,7 @@ To print all available serial ports use :ref:`cmd_serialports` command.
A protocol that "uploader" tool uses to talk to the board.
.. _projectconf_upload_speed:
``upload_speed``
^^^^^^^^^^^^^^^^
@@ -396,7 +410,7 @@ Example:
^^^^^^^^^^^^^^^^
Control cyclic (recursive) behaviour for ``Library Dependency Finder (LDF)``.
By default, this option is turned OFF (``lib_dfcyclic=False``) and means, that
By default, this option is turned OFF (``lib_dfcyclic=False``) and means that
``LDF`` will find only libraries which are included in source files from the
project :ref:`projectconf_pio_src_dir`.
@@ -451,7 +465,7 @@ Example, specify own upload command for :ref:`platform_atmelavr`:
* see built-in examples of `PlatformIO build scripts <https://github.com/platformio/platformio/tree/develop/platformio/builder/scripts>`_.
* take a look on the multiple snippets/answers for the user questions:
* take a look at the multiple snippets/answers for the user questions:
`#365 <https://github.com/platformio/platformio/issues/365#issuecomment-163695011>`_,
`#351 <https://github.com/platformio/platformio/issues/351#issuecomment-161789165>`_,
`#236 <https://github.com/platformio/platformio/issues/236#issuecomment-112038284>`_,
@@ -461,8 +475,9 @@ Example, specify own upload command for :ref:`platform_atmelavr`:
^^^^^^^^^^^
A list with targets which will be processed by :ref:`cmd_run` command by
default. You can enter more than one target separated with "space". Which
targets are supported is described in :option:`platformio run --target`.
default. You can enter more than one target separated with "space".
The list with available targets is located in :option:`platformio run --target`.
**Tip!** You can use these targets like an option to
:option:`platformio run --target` command. For example:
@@ -530,9 +545,11 @@ Examples
platform = atmelavr
framework = arduino
board = pro8MHzatmega328
upload_protocol = usbasp -B5
upload_protocol = usbasp
upload_flags = -Pusb -B5
Then upload firmware using :option:`platformio run --target program`
Then upload firmware using :option:`platformio run --target program`. To use
other programmers see :ref:`atmelavr_upload_via_programmer`.
4. :ref:`platform_ststm32`: Upload firmware using GDB script ``upload.gdb``,

View File

@@ -14,7 +14,7 @@
Quickstart
==========
.. note::
.. hint::
Please read `Get Started <http://platformio.org/#!/get-started>`_
article from the official WebSite.
@@ -30,9 +30,6 @@ Quickstart
$ 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.
@@ -66,10 +63,9 @@ Change working directory to the project's root where is located
# 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/platformio/platformio/tree/develop/examples>`_.
Useful links:
Also, for more detailed information as for commands please go to
:ref:`userguide` sections.
* `Project examples <https://github.com/platformio/platformio/tree/develop/examples>`_
* :ref:`userguide` for PlatformIO commands
* `Quickstart for Espressif ESP8266 <https://github.com/esp8266/Arduino/blob/master/doc/platformio.md>`_

View File

@@ -73,7 +73,7 @@ Initialise PlatformIO project for the specified IDE which can be imported later
via "Import Project" functionality.
A list with supported IDE is available within ``platformio init --help`` command.
Also, please look into :ref:`ide` page.
Also, please take a look at :ref:`ide` page.
.. option::
--enable-auto-uploading

View File

@@ -53,6 +53,7 @@ Pre-built targets:
* ``program`` firmware "auto-uploading" for embedded platforms using external
programmer (available only for :ref:`platform_atmelavr`)
* ``uploadlazy`` upload existing firmware without project rebuilding
* ``uploadfs`` :ref:`platform_espressif_uploadfs`
* ``envdump`` dump current build environment
* ``size`` print the size of the sections in a firmware/program

View File

@@ -191,13 +191,16 @@ Do not apply any encodings/transformations
--exit-char
ASCII code of special character that is used to exit the application,
default ``0x1d``
default ``29`` (DEC).
For example, to use ``Ctrl+Q`` run
``platformio serialports monitor --exit-char 17``.
.. option::
--menu-char
ASCII code of special character that is used to control miniterm (menu),
default ``0x14``
default ``20`` (DEC)
.. option::
---quiet

View File

@@ -17,7 +17,27 @@
# Automatic targets - enable auto-uploading
# targets = upload
[env:esp01_8266]
[env:esp01]
platform = espressif
framework = arduino
board = esp01
[env:esp01_1m]
platform = espressif
framework = arduino
board = esp01_1m
[env:nodemcu]
platform = espressif
framework = arduino
board = nodemcu
[env:huzzah]
platform = espressif
framework = arduino
board = huzzah
[env:thing]
platform = espressif
framework = arduino
board = thing

View File

@@ -14,7 +14,7 @@ int main()
//GET data
printf("\nTrying to fetch page...\n");
int ret = http.get("http://mbed.org/media/uploads/donatien/hello.txt", str, 128);
int ret = http.get("https://developer.mbed.org/media/uploads/donatien/hello.txt", str, 128);
if (!ret)
{
printf("Page fetched successfully - read %d characters\n", strlen(str));

View File

@@ -0,0 +1 @@
.pioenvs

View File

@@ -0,0 +1,65 @@
# Continuous Integration (CI) is the practice, in software
# engineering, of merging all developer working copies with a shared mainline
# several times a day < http://docs.platformio.org/en/latest/ci/index.html >
#
# Documentation:
#
# * Travis CI Embedded Builds with PlatformIO
# < https://docs.travis-ci.com/user/integration/platformio/ >
#
# * PlatformIO integration with Travis CI
# < http://docs.platformio.org/en/latest/ci/travis.html >
#
# * User Guide for `platformio ci` command
# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html >
#
#
# Please choice one of the following templates (proposed below) and uncomment
# it (remove "# " before each line) or use own configuration according to the
# Travis CI documentation (see above).
#
#
# Template #1: General project. Test it using existing `platformio.ini`.
#
# language: python
# python:
# - "2.7"
#
# sudo: false
# cache:
# directories:
# - "~/.platformio"
#
# install:
# - pip install -U platformio
#
# script:
# - platformio run
#
# Template #2: The project is intended to by used as a library with examples
#
# language: python
# python:
# - "2.7"
#
# sudo: false
# cache:
# directories:
# - "~/.platformio"
#
# env:
# - PLATFORMIO_CI_SRC=path/to/test/file.c
# - PLATFORMIO_CI_SRC=examples/file.ino
# - PLATFORMIO_CI_SRC=path/to/test/directory
#
# install:
# - pip install -U platformio
#
# script:
# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N

View File

@@ -0,0 +1,29 @@
.. Copyright 2014-2015 Ivan Kravets <me@ikravets.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
How to build PlatformIO based project
=====================================
1. `Install PlatformIO <http://docs.platformio.org/en/latest/installation.html>`_
2. Download `source code with examples <https://github.com/platformio/platformio/archive/develop.zip>`_
3. Extract ZIP archive
4. Run these commands:
.. code-block:: bash
# Change directory to example
> cd platformio-develop/examples/nordicnrf51/rfduino-ibeacon
# Process example project
> platformio run
# Upload firmware
> platformio run --target upload

View File

@@ -0,0 +1,38 @@
This directory is intended for the project specific (private) libraries.
PlatformIO will compile them to static libraries and link to executable file.
The source code of each library should be placed in separate directory, like
"lib/private_lib/[here are source files]".
For example, see how can be organised `Foo` and `Bar` libraries:
|--lib
| |--Bar
| | |--docs
| | |--examples
| | |--src
| | |- Bar.c
| | |- Bar.h
| |--Foo
| | |- Foo.c
| | |- Foo.h
| |- readme.txt --> THIS FILE
|- platformio.ini
|--src
|- main.c
Then in `src/main.c` you should use:
#include <Foo.h>
#include <Bar.h>
// rest H/C/CPP code
PlatformIO will find your libraries automatically, configure preprocessor's
include paths and build them.
See additional options for PlatformIO Library Dependency Finder `lib_*`:
http://docs.platformio.org/en/latest/projectconf.html#lib-install

View File

@@ -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:rfduino]
platform = nordicnrf51
framework = arduino
board = rfduino

View File

@@ -0,0 +1,61 @@
/*
The sketch demonstrates iBecaon from an RFduino
*/
/*
Copyright (c) 2014 OpenSourceRF.com. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <RFduinoBLE.h>
// pin 3 on the RGB shield is the green led
int led = 3;
void setup() {
// led used to indicate that iBeacon has started
pinMode(led, OUTPUT);
// do iBeacon advertising
RFduinoBLE.iBeacon = true;
// start the BLE stack
RFduinoBLE.begin();
}
void loop() {
// switch to lower power mode
RFduino_ULPDelay(INFINITE);
}
void RFduinoBLE_onAdvertisement(bool start)
{
// turn the green led on if we start advertisement, and turn it
// off if we stop advertisement
if (start)
digitalWrite(led, HIGH);
else
digitalWrite(led, LOW);
}

View File

@@ -1,15 +1,17 @@
;
; Project Configuration File
;
; A detailed documentation with the EXAMPLES is located here:
; http://docs.platformio.org/en/latest/projectconf.html
;
; Docs: http://docs.platformio.org/en/latest/projectconf.html
[env:uno]
platform = atmelavr
framework = arduino
board = uno
[env:nodemcu]
platform = espressif
framework = arduino
board = nodemcu
build_flags = -D LED_BUILTIN=BUILTIN_LED
[env:teensy31]
platform = teensy
framework = arduino
@@ -19,9 +21,4 @@ board = teensy31
platform = timsp430
framework = energia
board = lpmsp430g2553
[env:lptm4c1230c3pm]
platform = titiva
framework = energia
board = lptm4c1230c3pm
build_flags = -DLED_PIN=GREEN_LED
build_flags = -D LED_BUILTIN=RED_LED

View File

@@ -1,21 +1,25 @@
#ifdef ENERGIA
#include "Energia.h"
#else
#include "Arduino.h"
#endif
/*
* Blink
* Turns on an LED on for one second,
* then off for one second, repeatedly.
*/
#ifndef LED_PIN
// Most Arduino boards already have a LED attached to pin 13 on the board itself
#define LED_PIN 13
#endif
#include "Arduino.h"
void setup() {
pinMode(LED_PIN, OUTPUT); // set pin as output
void setup()
{
// initialize digital pin 13 as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_PIN, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(LED_PIN, LOW); // set the LED off
delay(1000); // wait for a second
void loop()
{
// turn the LED on (HIGH is the voltage level)
digitalWrite(LED_BUILTIN, HIGH);
// wait for a second
delay(1000);
// turn the LED off by making the voltage LOW
digitalWrite(LED_BUILTIN, LOW);
// wait for a second
delay(1000);
}

View File

@@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
VERSION = (2, 6, 0)
import sys
VERSION = (2, 7, 0)
__version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio"
@@ -31,3 +33,10 @@ __license__ = "Apache Software License"
__copyright__ = "Copyright 2014-2015 Ivan Kravets"
__apiurl__ = "http://api.platformio.org"
if sys.version_info >= (3, 0, 0):
msg = ("PlatformIO version %s does not run under Python version %s.\n"
"Python 3 is not yet supported.\n")
sys.stderr.write(msg % (__version__, sys.version.split()[0]))
sys.exit(1)

View File

@@ -109,7 +109,11 @@ def main():
An unexpected error occurred. Further steps:
* Verify that you have the latest version of PlatformIO using
`platformio upgrade` command
`pip install -U platformio` command
* Try to find answer in FAQ Troubleshooting section
http://docs.platformio.org/en/latest/faq.html
* Report this problem to the developers
https://github.com/platformio/platformio/issues

View File

@@ -2,7 +2,7 @@
"flora8": {
"build": {
"core": "arduino",
"extra_flags": "-DARDUINO_ARCH_AVR",
"extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_FLORA8",
"f_cpu": "8000000L",
"mcu": "atmega32u4",
"usb_product": "Adafruit Flora",
@@ -21,16 +21,92 @@
"require_upload_port" : true,
"speed": 57600,
"use_1200bps_touch": true,
"wait_for_upload_port": false
"wait_for_upload_port": true
},
"url": "http://www.adafruit.com/product/659",
"vendor": "Adafruit"
},
"bluefruitmicro": {
"build": {
"core": "arduino",
"extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_BLUEFRUITMICRO",
"f_cpu": "8000000L",
"mcu": "atmega32u4",
"usb_product": "Bluefruit Micro",
"pid": "0x800A",
"variant": "bluefruitmicro",
"vid": "0x239A"
},
"frameworks": ["arduino"],
"name": "Adafruit Bluefruit Micro",
"platform": "atmelavr",
"upload": {
"disable_flushing": true,
"maximum_ram_size": 2560,
"maximum_size": 28672,
"protocol": "avr109",
"require_upload_port" : true,
"speed": 57600,
"use_1200bps_touch": true,
"wait_for_upload_port": true
},
"url": "https://www.adafruit.com/products/2661",
"vendor": "Adafruit"
},
"gemma": {
"build": {
"core": "arduino",
"extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_GEMMA",
"f_cpu": "8000000L",
"mcu": "attiny85",
"variant": "tiny8"
},
"frameworks": ["arduino"],
"name": "Adafruit Gemma",
"platform": "atmelavr",
"upload": {
"maximum_ram_size": 512,
"maximum_size": 8192,
"protocol": "usbtiny"
},
"url": "http://www.adafruit.com/products/1222",
"vendor": "Adafruit"
},
"feather32u4": {
"build": {
"core": "arduino",
"extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_FEATHER32U4",
"f_cpu": "8000000L",
"mcu": "atmega32u4",
"usb_product": "Feather 32u4",
"pid": "0x800C",
"variant": "feather32u4",
"vid": "0x239C"
},
"frameworks": ["arduino"],
"name": "Adafruit Feather",
"platform": "atmelavr",
"upload": {
"disable_flushing": true,
"maximum_ram_size": 2560,
"maximum_size": 28672,
"protocol": "avr109",
"require_upload_port" : true,
"speed": 57600,
"use_1200bps_touch": true,
"wait_for_upload_port": true
},
"url": "https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/",
"vendor": "Adafruit"
},
"trinket3": {
"build": {
"core": "arduino",
"extra_flags": "-DARDUINO_ARCH_AVR",
"extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_TRINKET3",
"f_cpu": "8000000L",
"mcu": "attiny85",
"variant": "tiny8"
@@ -47,30 +123,10 @@
"vendor": "Adafruit"
},
"gemma": {
"build": {
"core": "arduino",
"extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_GEMMA",
"f_cpu": "8000000L",
"mcu": "attiny85",
"variant": "gemma"
},
"frameworks": ["arduino"],
"name": "Adafruit Gemma",
"platform": "atmelavr",
"upload": {
"maximum_ram_size": 512,
"maximum_size": 8192,
"protocol": "usbtiny"
},
"url": "http://www.adafruit.com/products/1222",
"vendor": "Adafruit"
},
"trinket5": {
"build": {
"core": "arduino",
"extra_flags": "-DARDUINO_ARCH_AVR",
"extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_TRINKET5",
"f_cpu": "16000000L",
"mcu": "attiny85",
"variant": "tiny8"
@@ -87,10 +143,32 @@
"vendor": "Adafruit"
},
"metro": {
"build": {
"core": "arduino",
"extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_METRO",
"f_cpu": "16000000L",
"mcu": "atmega328p",
"variant": "standard"
},
"frameworks": ["arduino"],
"name": "Adafruit Metro",
"platform": "atmelavr",
"upload": {
"maximum_ram_size": 2048,
"maximum_size": 32256,
"protocol": "arduino",
"require_upload_port" : true,
"speed": 115200
},
"url": "https://www.adafruit.com/products/2466",
"vendor": "Adafruit"
},
"protrinket3": {
"build": {
"core": "arduino",
"extra_flags": "-DARDUINO_ARCH_AVR",
"extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_PROTRINKET3",
"f_cpu": "12000000L",
"mcu": "atmega328p",
"variant": "eightanaloginputs"
@@ -110,7 +188,7 @@
"protrinket5": {
"build": {
"core": "arduino",
"extra_flags": "-DARDUINO_ARCH_AVR",
"extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_PROTRINKET5",
"f_cpu": "16000000L",
"mcu": "atmega328p",
"variant": "eightanaloginputs"
@@ -129,7 +207,7 @@
"protrinket3ftdi": {
"build": {
"core": "arduino",
"extra_flags": "-DARDUINO_ARCH_AVR",
"extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_PROTRINKET3FTDI",
"f_cpu": "16000000L",
"mcu": "atmega328p",
"variant": "eightanaloginputs"
@@ -150,7 +228,7 @@
"protrinket5ftdi": {
"build": {
"core": "arduino",
"extra_flags": "-DARDUINO_ARCH_AVR",
"extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_PROTRINKET5FTDI",
"f_cpu": "16000000L",
"mcu": "atmega328p",
"variant": "eightanaloginputs"

View File

@@ -2,67 +2,253 @@
"esp01": {
"build": {
"core": "esp8266",
"extra_flags": "-DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01",
"f_cpu": "80000000L",
"ldscript": "esp8266.flash.512k.ld",
"ldscript": "esp8266.flash.512k64.ld",
"mcu": "esp8266",
"variant": "generic"
},
"frameworks": ["arduino"],
"name": "Espressif ESP8266 ESP-01 board",
"name": "Espressif Generic ESP8266 ESP-01 512k",
"platform": "espressif",
"upload": {
"maximum_ram_size": 32768,
"maximum_ram_size": 81920,
"maximum_size": 524288,
"protocol": "arduino",
"resetmethod": "ck",
"require_upload_port" : true,
"speed": 115200
},
"url": "https://nurdspace.nl/ESP8266",
"url": "http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family",
"vendor": "Espressif"
},
"esp01_1m": {
"build": {
"core": "esp8266",
"extra_flags": "-DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01",
"f_cpu": "80000000L",
"ldscript": "esp8266.flash.1m128.ld",
"ldscript": "esp8266.flash.1m256.ld",
"mcu": "esp8266",
"variant": "generic"
},
"frameworks": ["arduino"],
"name": "Espressif ESP8266 ESP-01-1MB board",
"name": "Espressif Generic ESP8266 ESP-01 1M",
"platform": "espressif",
"upload": {
"maximum_ram_size": 32768,
"maximum_ram_size": 81920,
"maximum_size": 1048576,
"protocol": "arduino",
"resetmethod": "ck",
"require_upload_port" : true,
"speed": 115200
},
"url": "https://nurdspace.nl/ESP8266",
"url": "http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family",
"vendor": "Espressif"
},
"esp12e": {
"build": {
"core": "esp8266",
"extra_flags": "-DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266 -DESP8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12",
"f_cpu": "80000000L",
"ldscript": "esp8266.flash.4m.ld",
"mcu": "esp8266",
"variant": "nodemcu"
},
"frameworks": ["arduino"],
"name": "Espressif ESP8266 ESP-12E board (NodeMCU)",
"name": "Espressif ESP8266 ESP-12E",
"platform": "espressif",
"upload": {
"maximum_ram_size": 32768,
"maximum_ram_size": 81920,
"maximum_size": 4194304,
"protocol": "arduino",
"resetmethod": "nodemcu",
"require_upload_port" : true,
"speed": 115200
},
"url": "https://nurdspace.nl/ESP8266",
"url": "http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family",
"vendor": "Espressif"
},
"nodemcu": {
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12",
"f_cpu": "80000000L",
"ldscript": "esp8266.flash.4m.ld",
"mcu": "esp8266",
"variant": "nodemcu"
},
"frameworks": ["arduino"],
"name": "NodeMCU 0.9 & 1.0",
"platform": "espressif",
"upload": {
"maximum_ram_size": 81920,
"maximum_size": 4194304,
"resetmethod": "nodemcu",
"require_upload_port" : true,
"speed": 115200
},
"url": "http://www.nodemcu.com/",
"vendor": "NodeMCU"
},
"huzzah": {
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12",
"f_cpu": "80000000L",
"ldscript": "esp8266.flash.4m.ld",
"mcu": "esp8266",
"variant": "adafruit"
},
"frameworks": ["arduino"],
"name": "Adafruit HUZZAH ESP8266",
"platform": "espressif",
"upload": {
"maximum_ram_size": 81920,
"maximum_size": 4194304,
"resetmethod": "nodemcu",
"require_upload_port" : true,
"speed": 115200
},
"url": "https://www.adafruit.com/products/2471",
"vendor": "Adafruit"
},
"modwifi": {
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_MOD_WIFI_ESP8266",
"f_cpu": "80000000L",
"ldscript": "esp8266.flash.2m.ld",
"mcu": "esp8266",
"variant": "generic"
},
"frameworks": ["arduino"],
"name": "Olimex MOD-WIFI-ESP8266(-DEV)",
"platform": "espressif",
"upload": {
"maximum_ram_size": 81920,
"maximum_size": 2097152,
"resetmethod": "ck",
"require_upload_port" : true,
"speed": 115200
},
"url": "https://www.olimex.com/Products/IoT/MOD-WIFI-ESP8266-DEV/open-source-hardware",
"vendor": "Olimex"
},
"thing": {
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_THING",
"f_cpu": "80000000L",
"ldscript": "esp8266.flash.512k64.ld",
"mcu": "esp8266",
"variant": "thing"
},
"frameworks": ["arduino"],
"name": "SparkFun ESP8266 Thing",
"platform": "espressif",
"upload": {
"maximum_ram_size": 81920,
"maximum_size": 524288,
"resetmethod": "nodemcu",
"require_upload_port" : true,
"speed": 921600
},
"url": "https://www.sparkfun.com/products/13231",
"vendor": "SparkFun"
},
"esp210": {
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP210",
"f_cpu": "80000000L",
"ldscript": "esp8266.flash.4m.ld",
"mcu": "esp8266",
"variant": "generic"
},
"frameworks": ["arduino"],
"name": "SweetPea ESP-210",
"platform": "espressif",
"upload": {
"maximum_ram_size": 81920,
"maximum_size": 4194304,
"resetmethod": "ck",
"require_upload_port" : true,
"speed": 115200
},
"url": "http://wiki.sweetpeas.se/index.php?title=ESP-210",
"vendor": "SweetPea"
},
"d1": {
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12",
"f_cpu": "80000000L",
"ldscript": "esp8266.flash.4m.ld",
"mcu": "esp8266",
"variant": "d1"
},
"frameworks": ["arduino"],
"name": "WeMos D1",
"platform": "espressif",
"upload": {
"maximum_ram_size": 81920,
"maximum_size": 4194304,
"resetmethod": "nodemcu",
"require_upload_port" : true,
"speed": 460800
},
"url": "http://www.wemos.cc/wiki/doku.php?id=en:d1",
"vendor": "WeMos"
},
"d1_mini": {
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12",
"f_cpu": "80000000L",
"ldscript": "esp8266.flash.4m.ld",
"mcu": "esp8266",
"variant": "d1_mini"
},
"frameworks": ["arduino"],
"name": "WeMos D1 mini",
"platform": "espressif",
"upload": {
"maximum_ram_size": 81920,
"maximum_size": 4194304,
"resetmethod": "nodemcu",
"require_upload_port" : true,
"speed": 460800
},
"url": "http://www.wemos.cc/wiki/doku.php?id=en:d1_mini",
"vendor": "WeMos"
},
"espino": {
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12",
"f_cpu": "80000000L",
"ldscript": "esp8266.flash.4m1m.ld",
"mcu": "esp8266",
"variant": "espino"
},
"frameworks": ["arduino"],
"name": "ESPino",
"platform": "espressif",
"upload": {
"maximum_ram_size": 81920,
"maximum_size": 4194304,
"resetmethod": "ck",
"require_upload_port" : true,
"speed": 115200
},
"url": "http://www.espino.io",
"vendor": "ESPino"
}
}

View File

@@ -459,7 +459,7 @@
"variant": "eightanaloginputs"
},
"frameworks": ["arduino"],
"name": "BQ ZUM BT-328 board",
"name": "BQ ZUM BT-328",
"platform": "atmelavr",
"upload": {
"disable_flushing": true,

View File

@@ -142,5 +142,25 @@
},
"url": "https://developer.mbed.org/platforms/Delta-DFCM-NNN40/",
"vendor": "Delta"
},
"rfduino": {
"build": {
"core": "arduino",
"extra_flags": "-D__RFduino__",
"f_cpu": "16000000L",
"ldscript": "RFduino.ld",
"cpu": "cortex-m0",
"mcu": "nrf51822",
"variant": "RFduino"
},
"frameworks": ["arduino"],
"name": "RFduino",
"platform": "nordicnrf51",
"upload": {
"maximum_ram_size": 8192,
"maximum_size": 131072
},
"url": "http://www.rfduino.com/product/rfd22102-rfduino-dip/index.html",
"vendor": "RFduino"
}
}

View File

@@ -18,7 +18,6 @@
"raspberrypi_2b": {
"build": {
"core": "esp8266",
"extra_flags": "-DRASPBERRYPI -DRASPBERRYPI2",
"f_cpu": "900000000L",
"mcu": "bcm2836"

View File

@@ -12,37 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# pylint: disable=wrong-import-position,wrong-import-order,unused-import
try:
from platformio import util
except ImportError:
import sys
for p in sys.path:
_new_paths = []
for item in ("dist-packages", "site-packages"):
if not p.endswith(item) and item in p:
_new_paths.append(p[:p.rfind(item) + len(item)])
if "platformio" in p:
_new_paths.append(p[:p.rfind("platformio") - 1])
for _p in _new_paths:
if _p not in sys.path:
sys.path.insert(0, _p)
try:
from platformio import util
import lockfile # NOQA
break
except ImportError:
pass
import json
import sys
from os import environ
from os.path import isfile, join
from os.path import join, normpath
from time import time
from SCons.Script import COMMAND_LINE_TARGETS, DefaultEnvironment, Variables
from platformio import util
from platformio.exception import UnknownBoard
# AllowSubstExceptions()
@@ -99,6 +77,7 @@ DefaultEnvironment(
PROJECT_DIR=util.get_project_dir(),
PROJECTLIB_DIR=util.get_projectlib_dir(),
PROJECTSRC_DIR=util.get_projectsrc_dir(),
PROJECTDATA_DIR=util.get_projectdata_dir(),
PIOENVS_DIR=util.get_pioenvs_dir(),
PIOBUILDER_DIR=join(util.get_source_dir(), "builder"),
@@ -110,10 +89,13 @@ DefaultEnvironment(
"$PROJECTLIB_DIR",
util.get_lib_dir(),
join("$PLATFORMFW_DIR", "libraries")
]
],
PYTHONEXE=normpath(sys.executable)
)
env = DefaultEnvironment()
env.Prepend(LIBPATH=[join("$PIOPACKAGES_DIR", "ldscripts")])
if "BOARD" in env:
try:
@@ -133,12 +115,7 @@ if "BOARD" in env:
UPLOAD_SPEED="${BOARD_OPTIONS['upload'].get('speed', None)}")
if "ldscript" in env.get("BOARD_OPTIONS", {}).get("build", {}):
env.Replace(
LDSCRIPT_PATH=(
env['BOARD_OPTIONS']['build']['ldscript']
if isfile(env['BOARD_OPTIONS']['build']['ldscript'])
else join("$PIOHOME_DIR", "packages", "ldscripts",
"${BOARD_OPTIONS['build']['ldscript']}")
)
LDSCRIPT_PATH="${BOARD_OPTIONS['build']['ldscript']}"
)
if env['PLATFORM'] != env.get("BOARD_OPTIONS", {}).get("platform"):

View File

@@ -27,11 +27,15 @@ from platformio.util import get_serialports
def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
if "program" in COMMAND_LINE_TARGETS:
return
if "micronucleus" in env['UPLOADER']:
print "Please unplug/plug device ..."
upload_options = env.get("BOARD_OPTIONS", {}).get("upload", {})
# Deprecated: compatibility with old projects. Use `program` instead
if "usb" in env.subst("$UPLOAD_PROTOCOL"):
upload_options['require_upload_port'] = False
env.Replace(UPLOAD_SPEED=None)

View File

@@ -39,19 +39,19 @@ env.Replace(
"-Wall", # show warnings
"-ffunction-sections", # place each function in its own section
"-fdata-sections",
"-MMD", # output dependency info
"-mmcu=$BOARD_MCU"
],
CPPDEFINES=[
"F_CPU=$BOARD_F_CPU"
],
CFLAGS=["-std=gnu11"],
CXXFLAGS=[
"-std=gnu++11",
"-fno-exceptions",
"-fno-threadsafe-statics"
],
CPPDEFINES=["F_CPU=$BOARD_F_CPU"],
LINKFLAGS=[
"-Os",
"-mmcu=$BOARD_MCU",

View File

@@ -12,24 +12,41 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# pylint: disable=redefined-outer-name
"""
Builder for Espressif MCUs
"""
import socket
import re
from os.path import join
from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default,
DefaultEnvironment)
def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
env.AutodetectUploadPort()
def _get_flash_size(env):
# use board's flash size by default
board_max_size = int(
env.get("BOARD_OPTIONS", {}).get("upload", {}).get("maximum_size", 0))
# check if user overrides LD Script
match = re.search(r"\.flash\.(\d+)(m|k).*\.ld", env.GetActualLDScript())
if match:
if match.group(2) == "k":
board_max_size = int(match.group(1)) * 1024
elif match.group(2) == "m":
board_max_size = int(match.group(1)) * 1024 * 1024
return ("%dK" % (board_max_size / 1024) if board_max_size < 1048576
else "%dM" % (board_max_size / 1048576))
env = DefaultEnvironment()
env.Replace(
__get_flash_size=_get_flash_size,
AR="xtensa-lx106-elf-ar",
AS="xtensa-lx106-elf-as",
CC="xtensa-lx106-elf-gcc",
@@ -82,38 +99,52 @@ env.Replace(
"-Wl,--gc-sections"
],
SIZEPRINTCMD='"$SIZETOOL" -B -d $SOURCES',
#
# Upload
#
UPLOADER=join("$PIOPACKAGES_DIR", "tool-esptool", "esptool"),
UPLOADEROTA=join("$PLATFORMFW_DIR", "tools", "espota.py"),
UPLOADERFLAGS=[
"-vv",
"-cd", "ck",
"-cd", "${BOARD_OPTIONS['upload']['resetmethod']}",
"-cb", "$UPLOAD_SPEED",
"-cp", "$UPLOAD_PORT",
"-ca", "0x00000",
"-cf", "$SOURCE"
"-cp", "$UPLOAD_PORT"
],
UPLOADCMD='$UPLOADER $UPLOADERFLAGS',
UPLOADEROTAFLAGS=[
"--debug",
"--progress",
"-i", "$UPLOAD_PORT",
"$UPLOAD_FLAGS"
],
UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS -cf $SOURCE',
UPLOADOTACMD='"$PYTHONEXE" "$UPLOADEROTA" $UPLOADEROTAFLAGS -f $SOURCE',
#
# Misc
#
MKSPIFFSTOOL=join("$PIOPACKAGES_DIR", "tool-mkspiffs", "mkspiffs"),
SIZEPRINTCMD='"$SIZETOOL" -B -d $SOURCES',
PROGNAME="firmware",
PROGSUFFIX=".elf"
)
_board_max_rom = int(
env.get("BOARD_OPTIONS", {}).get("upload", {}).get("maximum_size", 0))
env.Append(
BUILDERS=dict(
ElfToBin=Builder(
action=" ".join([
"$UPLOADER",
"-eo", join("$PLATFORMFW_DIR", "bootloaders",
"eboot", "eboot.elf"),
'"$UPLOADER"',
"-eo",
'"%s"' % join("$PLATFORMFW_DIR", "bootloaders",
"eboot", "eboot.elf"),
"-bo", "$TARGET",
"-bm", "dio",
"-bf", "${BOARD_OPTIONS['build']['f_cpu'][:2]}",
"-bz",
"%dK" % (_board_max_rom / 1024) if _board_max_rom < 1048576
else "%dM" % (_board_max_rom / 1048576),
"-bz", "${__get_flash_size(__env__)}",
"-bs", ".text",
"-bp", "4096",
"-ec",
@@ -129,6 +160,66 @@ env.Append(
)
)
#
# SPIFFS
#
def _fetch_spiffs_size(target, source, env):
spiffs_re = re.compile(
r"PROVIDE\s*\(\s*_SPIFFS_(\w+)\s*=\s*(0x[\dA-F]+)\s*\)")
with open(env.GetActualLDScript()) as f:
for line in f.readlines():
match = spiffs_re.search(line)
if not match:
continue
env["SPIFFS_%s" % match.group(1).upper()] = match.group(2)
assert all([k in env for k in ["SPIFFS_START", "SPIFFS_END", "SPIFFS_PAGE",
"SPIFFS_BLOCK"]])
# esptool flash starts from 0
for k in ("SPIFFS_START", "SPIFFS_END"):
_value = 0
if int(env[k], 16) < 0x40300000:
_value = int(env[k], 16) & 0xFFFFF
else:
_value = int(env[k], 16) & 0xFFFFFF
_value -= 0x200000 # esptool offset
env[k] = hex(_value)
return (target, source)
env.Append(
BUILDERS=dict(
DataToBin=Builder(
action=" ".join([
'"$MKSPIFFSTOOL"',
"-c", "$SOURCES",
"-p", "${int(SPIFFS_PAGE, 16)}",
"-b", "${int(SPIFFS_BLOCK, 16)}",
"-s", "${int(SPIFFS_END, 16) - int(SPIFFS_START, 16)}",
"$TARGET"
]),
emitter=_fetch_spiffs_size,
source_factory=env.Dir,
suffix=".bin"
)
)
)
if "uploadfs" in COMMAND_LINE_TARGETS:
env.Append(
UPLOADERFLAGS=["-ca", "$SPIFFS_START"],
UPLOADEROTAFLAGS=["-s"]
)
#
# Framework and SDK specific configuration
#
if "FRAMEWORK" in env:
env.Append(
LINKFLAGS=[
@@ -138,20 +229,13 @@ if "FRAMEWORK" in env:
)
# Handle uploading via OTA
try:
if env.get("UPLOAD_PORT") and socket.inet_aton(env.get("UPLOAD_PORT")):
env.Replace(
UPLOADEROTA=join("$PLATFORMFW_DIR", "tools", "espota.py"),
UPLOADERFLAGS=[
"--debug",
"--progress",
"-i", "$UPLOAD_PORT",
"-f", "$SOURCE"
],
UPLOADCMD='$UPLOADEROTA $UPLOADERFLAGS'
)
except socket.error:
pass
ota_port = None
if env.get("UPLOAD_PORT"):
ota_port = re.match(
r"\"?((([0-9]{1,3}\.){3}[0-9]{1,3})|.+\.local)\"?$",
env.get("UPLOAD_PORT"))
if ota_port:
env.Replace(UPLOADCMD="$UPLOADOTACMD")
# Configure native SDK
else:
@@ -164,7 +248,7 @@ else:
BUILDERS=dict(
ElfToBin=Builder(
action=" ".join([
"$UPLOADER",
'"$UPLOADER"',
"-eo", "$SOURCES",
"-bo", "${TARGETS[0]}",
"-bm", "qio",
@@ -206,10 +290,15 @@ else:
target_elf = env.BuildProgram()
#
# Target: Build the .hex
# Target: Build the .hex or SPIFFS image
#
if "uploadlazy" in COMMAND_LINE_TARGETS:
if set(["uploadfs", "uploadfsota"]) & set(COMMAND_LINE_TARGETS):
target_firm = env.DataToBin(
join("$BUILD_DIR", "spiffs"), "$PROJECTDATA_DIR")
AlwaysBuild(target_firm)
elif "uploadlazy" in COMMAND_LINE_TARGETS:
if "FRAMEWORK" not in env:
target_firm = [
join("$BUILD_DIR", "firmware_00000.bin"),
@@ -233,12 +322,14 @@ target_size = env.Alias("size", target_elf, "$SIZEPRINTCMD")
AlwaysBuild(target_size)
#
# Target: Upload firmware
# Target: Upload firmware or SPIFFS image
#
upload = env.Alias(["upload", "uploadlazy"], target_firm,
[BeforeUpload, "$UPLOADCMD"])
AlwaysBuild(upload)
target_upload = env.Alias(
["upload", "uploadlazy", "uploadfs"], target_firm,
[lambda target, source, env: env.AutodetectUploadPort(), "$UPLOADCMD"])
env.AlwaysBuild(target_upload)
#
# Target: Define targets

View File

@@ -60,6 +60,34 @@ elif env.get("PLATFORM") == "espressif":
LIBS=["smartconfig", "pp", "main", "wpa", "lwip",
"net80211", "wps", "crypto", "phy", "hal", "axtls", "gcc", "m"]
)
elif env.get("PLATFORM") == "nordicnrf51":
PLATFORMFW_DIR = join(
"$PIOPACKAGES_DIR",
"framework-arduinonordicnrf51"
)
env.Prepend(
CPPPATH=[
join("$PLATFORMFW_DIR", "system", "CMSIS", "CMSIS", "Include"),
join("$PLATFORMFW_DIR", "system", "RFduino"),
join("$PLATFORMFW_DIR", "system", "RFduino", "include")
],
LIBPATH=[
join(
"$PLATFORMFW_DIR",
"variants",
"${BOARD_OPTIONS['build']['variant']}"
),
join(
"$PLATFORMFW_DIR",
"variants",
"${BOARD_OPTIONS['build']['variant']}",
"linker_scripts",
"gcc"
),
],
LIBS=["RFduino", "RFduinoBLE", "RFduinoGZLL", "RFduinoSystem"]
)
env.Replace(PLATFORMFW_DIR=PLATFORMFW_DIR)

View File

@@ -61,7 +61,7 @@ if not isfile(join(env.subst("$PIOPACKAGES_DIR"), "ldscripts", ldscript)):
if "mbed" in env.get("BOARD_OPTIONS", {}).get("frameworks", {}):
env.Append(
LINKFLAGS=[
"-Wl,-T",
'-Wl,-T"%s"' %
join(
"$PIOPACKAGES_DIR", "framework-mbed", "variant",
env.subst("$BOARD").upper(), "mbed",

View File

@@ -25,6 +25,17 @@ env = DefaultEnvironment()
SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py")))
if env.subst("$BOARD") == "rfduino":
env.Append(
CPPFLAGS=["-fno-builtin"],
LINKFLAGS=["--specs=nano.specs"]
)
env.Replace(
UPLOADER=join("$PIOPACKAGES_DIR", "tool-rfdloader", "rfdloader"),
UPLOADERFLAGS=["-q", "$UPLOAD_PORT"],
UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS $SOURCES'
)
#
# Target: Build executable and linkable firmware
#
@@ -51,7 +62,12 @@ AlwaysBuild(target_size)
# Target: Upload by default .bin file
#
upload = env.Alias(["upload", "uploadlazy"], target_firm, env.UploadToDisk)
if env.subst("$BOARD") == "rfduino":
upload = env.Alias(
["upload", "uploadlazy"], target_firm,
[lambda target, source, env: env.AutodetectUploadPort(), "$UPLOADCMD"])
else:
upload = env.Alias(["upload", "uploadlazy"], target_firm, env.UploadToDisk)
AlwaysBuild(upload)
#

View File

@@ -20,7 +20,7 @@ import platform
from os.path import isfile, join
from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default,
DefaultEnvironment, Exit, SConscript)
DefaultEnvironment, SConscript)
env = DefaultEnvironment()
@@ -28,8 +28,8 @@ SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py")))
if env.subst("$UPLOAD_PROTOCOL") == "gdb":
if not isfile(join(env.subst("$PROJECT_DIR"), "upload.gdb")):
Exit(
"You are using GDB as firmware uploader. "
env.Exit(
"Error: You are using GDB as firmware uploader. "
"Please specify upload commands in upload.gdb "
"file in project directory!"
)
@@ -41,10 +41,11 @@ if env.subst("$UPLOAD_PROTOCOL") == "gdb":
UPLOADERFLAGS=[
join("$BUILD_DIR", "firmware.elf"),
"-batch",
"-x", join("$PROJECT_DIR", "upload.gdb")
"-x",
'"%s"' % join("$PROJECT_DIR", "upload.gdb")
],
UPLOADCMD="$UPLOADER $UPLOADERFLAGS"
UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS'
)
else:
env.Replace(
@@ -55,7 +56,7 @@ else:
"0x08000000" # flash start adress
],
UPLOADCMD="$UPLOADER $UPLOADERFLAGS"
UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS'
)

View File

@@ -68,7 +68,7 @@ env.Replace(
"$UPLOAD_PROTOCOL" if system() != "Windows" else "tilib",
"--force-reset"
],
UPLOADCMD='$UPLOADER $UPLOADERFLAGS "prog $SOURCES"',
UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS "prog $SOURCES"',
PROGNAME="firmware",
PROGSUFFIX=".elf"

View File

@@ -28,7 +28,7 @@ SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py")))
env.Replace(
UPLOADER=join("$PIOPACKAGES_DIR", "tool-lm4flash", "lm4flash"),
UPLOADCMD="$UPLOADER $SOURCES"
UPLOADCMD='"$UPLOADER" $SOURCES'
)
env.Append(

View File

@@ -26,9 +26,13 @@ def _huge_sources_hook(sources):
tmp_file = join(gettempdir(), "pioarargs-%s" % md5(_sources).hexdigest())
with open(tmp_file, "w") as f:
f.write(_sources)
# fix space in paths
for line in _sources.split(".o "):
if not line.endswith(".o"):
line += ".o"
f.write('"%s" ' % line)
return "@%s" % tmp_file
return '@"%s"' % tmp_file
def exists(_):

View File

@@ -18,7 +18,7 @@ import atexit
import re
from glob import glob
from os import environ, remove
from os.path import basename, join
from os.path import basename, isfile, join
from platformio.util import exec_command, where_is_program
@@ -190,6 +190,25 @@ def GetCompilerType(env):
return None
def GetActualLDScript(env):
script = None
for f in env.get("LINKFLAGS", []):
if f.startswith("-Wl,-T"):
script = env.subst(f[6:].replace('"', "").strip())
if isfile(script):
return script
for d in env.get("LIBPATH", []):
path = join(env.subst(d), script)
if isfile(path):
return path
if script:
env.Exit("Error: Could not find '%s' LD script in LDPATH '%s'" % (
script, env.subst("$LIBPATH")))
return None
def exists(_):
return True
@@ -198,4 +217,5 @@ def generate(env):
env.AddMethod(ConvertInoToCpp)
env.AddMethod(DumpIDEData)
env.AddMethod(GetCompilerType)
env.AddMethod(GetActualLDScript)
return env

View File

@@ -18,7 +18,6 @@ from os.path import isfile, join
from shutil import copyfile
from time import sleep
from SCons.Script import Exit
from serial import Serial
from platformio.util import get_logicaldisks, get_serialports, get_systype
@@ -48,7 +47,7 @@ def TouchSerialPort(env, port, baudrate):
sleep(0.4)
def WaitForNewSerialPort(_, before):
def WaitForNewSerialPort(env, before):
new_port = None
elapsed = 0
while elapsed < 10:
@@ -63,10 +62,10 @@ def WaitForNewSerialPort(_, before):
elapsed += 0.25
if not new_port:
Exit("Error: Couldn't find a board on the selected port. "
"Check that you have the correct port selected. "
"If it is correct, try pressing the board's reset "
"button after initiating the upload.")
env.Exit("Error: Couldn't find a board on the selected port. "
"Check that you have the correct port selected. "
"If it is correct, try pressing the board's reset "
"button after initiating the upload.")
return new_port
@@ -100,10 +99,10 @@ def AutodetectUploadPort(env):
if "UPLOAD_PORT" in env:
print "Auto-detected UPLOAD_PORT/DISK: %s" % env['UPLOAD_PORT']
else:
Exit("Error: Please specify `upload_port` for environment or use "
"global `--upload-port` option.\n"
"For some development platforms this can be a USB flash drive "
"(i.e. /media/<user>/<device name>)\n")
env.Exit("Error: Please specify `upload_port` for environment or use "
"global `--upload-port` option.\n"
"For some development platforms this can be a USB flash "
"drive (i.e. /media/<user>/<device name>)\n")
def UploadToDisk(_, target, source, env): # pylint: disable=W0613,W0621
@@ -113,8 +112,8 @@ def UploadToDisk(_, target, source, env): # pylint: disable=W0613,W0621
if not isfile(fpath):
continue
copyfile(fpath, join(env.subst("$UPLOAD_PORT"), "firmware.%s" % ext))
print ("Firmware has been successfully uploaded.\n"
"Please restart your board.")
print("Firmware has been successfully uploaded.\n"
"Please restart your board.")
def exists(_):

View File

@@ -19,11 +19,9 @@ from glob import glob
from os import getenv, listdir, sep, walk
from os.path import basename, dirname, isdir, isfile, join, normpath, realpath
from SCons.Script import (COMMAND_LINE_TARGETS, DefaultEnvironment, Exit,
SConscript)
from SCons.Util import case_sensitive_suffixes
from platformio.util import pioversion_to_intstr
from SCons.Script import COMMAND_LINE_TARGETS, DefaultEnvironment, SConscript
from SCons.Util import case_sensitive_suffixes
SRC_BUILD_EXT = ["c", "cpp", "S", "spp", "SPP", "sx", "s", "asm", "ASM"]
SRC_HEADER_EXT = ["h", "hpp"]
@@ -58,7 +56,7 @@ def BuildProgram(env):
if ("LDSCRIPT_PATH" in env and
not any(["-Wl,-T" in f for f in env['LINKFLAGS']])):
env.Append(
LINKFLAGS=["-Wl,-T", "$LDSCRIPT_PATH"]
LINKFLAGS=['-Wl,-T"$LDSCRIPT_PATH"']
)
# enable "cyclic reference" for linker
@@ -78,7 +76,9 @@ def BuildProgram(env):
env.Append(
CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format(
*pioversion_to_intstr())]
*pioversion_to_intstr())],
LIBS=deplibs,
LIBPATH=["$BUILD_DIR"]
)
return env.Program(
@@ -86,9 +86,7 @@ def BuildProgram(env):
env.LookupSources(
"$BUILDSRC_DIR", "$PROJECTSRC_DIR", duplicate=False,
src_filter=getenv("PLATFORMIO_SRC_FILTER",
env.get("SRC_FILTER"))),
LIBS=env.get("LIBS", []) + deplibs,
LIBPATH=env.get("LIBPATH", []) + ["$BUILD_DIR"]
env.get("SRC_FILTER")))
)
@@ -183,7 +181,7 @@ def BuildFrameworks(env, frameworks):
if board_frameworks:
frameworks.insert(0, board_frameworks[0])
else:
Exit("Error: Please specify board type")
env.Exit("Error: Please specify board type")
for f in frameworks:
if f in ("arduino", "energia"):
@@ -193,7 +191,7 @@ def BuildFrameworks(env, frameworks):
SConscript(env.subst(
join("$PIOBUILDER_DIR", "scripts", "frameworks", "%s.py" % f)))
else:
Exit("Error: This board doesn't support %s framework!" % f)
env.Exit("Error: This board doesn't support %s framework!" % f)
def BuildLibrary(env, variant_dir, src_dir, src_filter=None):

View File

@@ -12,6 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import sys
import click
import requests
@@ -32,7 +35,8 @@ def cli():
fg="yellow")
cmds = (
["pip", "install", "--upgrade", "platformio"],
[os.path.normpath(sys.executable),
"-m", "pip", "install", "--upgrade", "platformio"],
["platformio", "--version"]
)
@@ -44,8 +48,9 @@ def cli():
r = util.exec_command(cmd)
# try pip with disabled cache
if r['returncode'] != 0 and cmd[0] == "pip":
r = util.exec_command(["pip", "--no-cache-dir"] + cmd[1:])
if r['returncode'] != 0 and cmd[0] != "platformio":
cmd.insert(3, "--no-cache-dir")
r = util.exec_command(cmd)
assert r['returncode'] == 0
assert last in r['out'].strip()

View File

@@ -191,13 +191,6 @@ class CIBuildEnvsEmpty(PlatformioException):
"predefined environments using `--project-conf` option"
class SConsNotInstalledError(PlatformioException):
MESSAGE = "The PlatformIO and `scons` aren't installed properly. "\
"More details in FAQ/Troubleshooting section: "\
"http://docs.platformio.org/en/latest/faq.html"
class UpgradeError(PlatformioException):
MESSAGE = """{0}

View File

@@ -24,6 +24,9 @@
<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" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
% for include in includes:
% if "toolchain" in include:
% continue
% end
% if include.startswith(user_home_dir):
% if "windows" in systype:
<listOptionValue builtIn="false" value="${USERPROFILE}{{include.replace(user_home_dir, '')}}"/>
@@ -45,6 +48,9 @@
<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" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
% for include in includes:
% if "toolchain" in include:
% continue
% end
% if include.startswith(user_home_dir):
% if "windows" in systype:
<listOptionValue builtIn="false" value="${USERPROFILE}{{include.replace(user_home_dir, '')}}"/>
@@ -66,6 +72,9 @@
<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" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
% for include in includes:
% if "toolchain" in include:
% continue
% end
% if include.startswith(user_home_dir):
% if "windows" in systype:
<listOptionValue builtIn="false" value="${USERPROFILE}{{include.replace(user_home_dir, '')}}"/>

View File

@@ -0,0 +1,6 @@
.pioenvs
CMakeCache.txt
CMakeFiles/
MakeFile
cmake_install.cmake
compile_commands.json

View File

@@ -0,0 +1,56 @@
cmake_minimum_required(VERSION 3.2)
project({{project_name}})
set(ENV{PATH} "{{env_path}}")
set(PLATFORMIO_CMD "{{platformio_path}}")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
% for include in includes:
% if include.startswith(user_home_dir):
% if "windows" in systype:
include_directories("$ENV{HOMEDRIVE}$ENV{HOMEPATH}{{include.replace(user_home_dir, '').replace("\\", "/")}}")
% else:
include_directories("$ENV{HOME}{{include.replace(user_home_dir, '').replace("\\", "/")}}")
% end
% else:
include_directories("{{include.replace("\\", "/")}}")
% end
% end
% for define in defines:
add_definitions(-D{{!define}})
% end
add_custom_target(
platformio_build ALL
COMMAND ${PLATFORMIO_CMD} -f -c emacs run
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_custom_target(
platformio_upload ALL
COMMAND ${PLATFORMIO_CMD} -f -c emacs run --target upload
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_custom_target(
platformio_clean ALL
COMMAND ${PLATFORMIO_CMD} -f -c emacs run --target clean
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_custom_target(
platformio_update ALL
COMMAND ${PLATFORMIO_CMD} -f -c emacs update
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
% if main_src_file:
add_executable({{project_name}} {{main_src_file.replace("\\", "/")}})
% else:
#
# To enable code auto-completion, please specify path
# to main source file (*.c, *.cpp) and uncomment line below
#
# add_executable({{project_name}} src/main_change_me.cpp)
% end

View File

@@ -101,6 +101,7 @@ class PackageManager(object):
try:
dlpath = self.download(info['url'], pkg_dir, info['sha1'])
except (requests.exceptions.ConnectionError,
requests.exceptions.ChunkedEncodingError,
exception.FDUnrecognizedStatusCode, StopIteration):
if info['url'].startswith("http://sourceforge.net"):
dlpath = self.download(

View File

@@ -14,6 +14,7 @@
import os
import re
import sys
from imp import load_source
from multiprocessing import cpu_count
from os.path import isdir, isfile, join
@@ -46,6 +47,10 @@ PLATFORM_PACKAGES = {
("Arduino Wiring-based Framework (ESP8266 Core)",
"https://github.com/esp8266/Arduino")
],
"framework-arduinonordicnrf51": [
("Arduino Wiring-based Framework (RFduino Core)",
"https://github.com/RFduino/RFduino")
],
"framework-energiamsp430": [
("Energia Wiring-based Framework (MSP430 Core)",
"http://energia.nu/reference/")
@@ -112,6 +117,9 @@ PLATFORM_PACKAGES = {
("msp-gcc", "http://sourceforge.net/projects/mspgcc/"),
("GDB", "http://www.gnu.org/software/gdb/")
],
"tool-scons": [
("SCons software construction tool", "http://www.scons.org")
],
"tool-avrdude": [
("AVRDUDE", "http://www.nongnu.org/avrdude/")
],
@@ -135,6 +143,13 @@ PLATFORM_PACKAGES = {
],
"tool-esptool": [
("esptool-ck", "https://github.com/igrr/esptool-ck")
],
"tool-rfdloader": [
("rfdloader", "https://github.com/RFduino/RFduino")
],
"tool-mkspiffs": [
("Tool to build and unpack SPIFFS images",
"https://github.com/igrr/mkspiffs")
]
}
@@ -365,6 +380,9 @@ class BasePlatform(object):
if framework in pkg_name:
self.PACKAGES[pkg_name]['default'] = True
# append SCons tool
self.PACKAGES['tool-scons'] = {"default": True}
# enable upload tools for upload targets
if any(["upload" in t for t in targets] + ["program" in targets]):
for _name, _opts in self.PACKAGES.iteritems():
@@ -429,24 +447,7 @@ class BasePlatform(object):
"PIOPACKAGE_%s=%s" % (options['alias'].upper(), name))
self._found_error = False
try:
# test that SCons is installed correctly
assert util.test_scons()
result = util.exec_command(
[
"scons",
"-Q",
"-j %d" % self.get_job_nums(),
"--warn=no-no-parallel-support",
"-f", join(util.get_source_dir(), "builder", "main.py")
] + variables + targets,
stdout=util.AsyncPipe(self.on_run_out),
stderr=util.AsyncPipe(self.on_run_err)
)
except (OSError, AssertionError):
raise exception.SConsNotInstalledError()
result = self._run_scons(variables, targets)
assert "returncode" in result
# if self._found_error:
# result['returncode'] = 1
@@ -456,6 +457,32 @@ class BasePlatform(object):
return result
def _run_scons(self, variables, targets):
# pass current PYTHONPATH to SCons
if "PYTHONPATH" in os.environ:
_PYTHONPATH = os.environ.get("PYTHONPATH").split(os.pathsep)
else:
_PYTHONPATH = []
for p in os.sys.path:
if p not in _PYTHONPATH:
_PYTHONPATH.append(p)
os.environ['PYTHONPATH'] = os.pathsep.join(_PYTHONPATH)
result = util.exec_command(
[
os.path.normpath(sys.executable),
join(util.get_home_dir(), "packages", "tool-scons",
"script", "scons"),
"-Q",
"-j %d" % self.get_job_nums(),
"--warn=no-no-parallel-support",
"-f", join(util.get_source_dir(), "builder", "main.py")
] + variables + targets,
stdout=util.AsyncPipe(self.on_run_out),
stderr=util.AsyncPipe(self.on_run_err)
)
return result
def on_run_out(self, line):
self._echo_line(line, level=3)

View File

@@ -41,6 +41,10 @@ class EspressifPlatform(BasePlatform):
"default": True
},
"tool-mkspiffs": {
"alias": "uploader"
},
"sdk-esp8266": {
},

View File

@@ -19,7 +19,7 @@ class NativePlatform(BasePlatform):
"""
Native development platform is intended to be used for desktop OS.
This platform uses built-in tool chains (preferable based on GCC),
This platform uses built-in toolchains (preferable based on GCC),
frameworks, libs from particular OS where it will be run.
http://platformio.org/#!/platforms/native

View File

@@ -37,8 +37,22 @@ class Nordicnrf51Platform(BasePlatform):
"framework-mbed": {
"alias": "framework"
},
"framework-arduinonordicnrf51": {
"alias": "framework"
},
"tool-rfdloader": {
}
}
def get_name(self):
return "Nordic nRF51"
def configure_default_packages(self, envoptions, targets):
if envoptions.get("board") == "rfduino":
self.PACKAGES['tool-rfdloader']['alias'] = "uploader"
return BasePlatform.configure_default_packages(
self, envoptions, targets)

View File

@@ -15,13 +15,13 @@
import atexit
import platform
import Queue
import re
import sys
import threading
import uuid
from collections import deque
from os import getenv
from time import sleep, time
from traceback import format_exc
import click
import requests
@@ -47,6 +47,13 @@ class TelemetryBase(object):
if name in self._params:
del self._params[name]
def get_cid(self):
cid = app.get_state_item("cid")
if not cid:
cid = self.MACHINE_ID
app.set_state_item("cid", cid)
return cid
def send(self, hittype):
raise NotImplementedError()
@@ -66,7 +73,7 @@ class MeasurementProtocol(TelemetryBase):
TelemetryBase.__init__(self)
self['v'] = 1
self['tid'] = self.TRACKING_ID
self['cid'] = self.MACHINE_ID
self['cid'] = self.get_cid()
self['sr'] = "%dx%d" % click.get_terminal_size()
self._prefill_screen_name()
@@ -91,13 +98,6 @@ class MeasurementProtocol(TelemetryBase):
dpdata.append("Click/%s" % click.__version__)
if app.get_session_var("caller_id"):
dpdata.append("Caller/%s" % app.get_session_var("caller_id"))
try:
result = util.exec_command(["scons", "--version"])
match = re.search(r"engine: v([\d\.]+)", result['out'])
if match:
dpdata.append("SCons/%s" % match.group(1))
except: # pylint: disable=W0702
pass
self['an'] = " ".join(dpdata)
def _prefill_custom_data(self):
@@ -196,26 +196,25 @@ class MPDataPusher(object):
self._failedque.append(_item)
if self._send_data(item):
self._failedque.remove(_item)
else:
self._http_offline = True
self._queue.task_done()
except: # pylint: disable=W0702
pass
def _send_data(self, data):
result = False
if self._http_offline:
return False
try:
r = self._http_session.post(
"https://ssl.google-analytics.com/collect",
data=data,
headers=util.get_request_defheaders(),
timeout=2
timeout=1
)
r.raise_for_status()
result = True
return True
except: # pylint: disable=W0702
pass
return result
self._http_offline = True
return False
def on_command():
@@ -289,12 +288,13 @@ def on_event(category, action, label=None, value=None, screen_name=None):
def on_exception(e):
if isinstance(e, exception.AbortedByUser):
return
mp = MeasurementProtocol()
mp['exd'] = "%s: %s" % (type(e).__name__, e)
mp['exf'] = int(any([
is_crash = any([
not isinstance(e, exception.PlatformioException),
"Error" in e.__class__.__name__
]))
])
mp = MeasurementProtocol()
mp['exd'] = "%s: %s" % (type(e).__name__, format_exc() if is_crash else e)
mp['exf'] = 1 if is_crash else 0
mp.send("exception")

View File

@@ -18,7 +18,6 @@ import json
import os
import re
import subprocess
import sys
from glob import glob
from os.path import (abspath, basename, dirname, expanduser, isdir, isfile,
join, realpath)
@@ -201,6 +200,13 @@ def get_pioenvs_dir():
)
def get_projectdata_dir():
return _get_projconf_option_dir(
"data_dir",
join(get_project_dir(), "data")
)
def get_project_config():
path = join(get_project_dir(), "platformio.ini")
if not isfile(path):
@@ -330,54 +336,6 @@ def get_api_result(path, params=None, data=None):
return result
def test_scons():
try:
r = exec_command(["scons", "--version"])
if "ImportError: No module named SCons.Script" in r['err']:
_PYTHONPATH = []
for p in sys.path:
if not p.endswith("-packages"):
continue
for item in glob(join(p, "scons*")):
if isdir(join(item, "SCons")) and item not in sys.path:
_PYTHONPATH.append(item)
sys.path.insert(0, item)
if _PYTHONPATH:
_PYTHONPATH = str(os.pathsep).join(_PYTHONPATH)
if os.getenv("PYTHONPATH"):
os.environ['PYTHONPATH'] += os.pathsep + _PYTHONPATH
else:
os.environ['PYTHONPATH'] = _PYTHONPATH
r = exec_command(["scons", "--version"])
assert r['returncode'] == 0
return True
except (OSError, AssertionError):
for p in sys.path:
try:
r = exec_command([join(p, "scons"), "--version"])
assert r['returncode'] == 0
os.environ['PATH'] += os.pathsep + p
return True
except (OSError, AssertionError):
pass
return False
def install_scons():
r = exec_command(["pip", "install", "-U", "scons"])
if r['returncode'] != 0:
r = exec_command(["pip", "install", "--egg", "scons",
'--install-option="--no-install-man"'])
return r['returncode'] == 0
def scons_in_pip():
r = exec_command(["pip", "list"])
if r['returncode'] != 0:
return False
return "scons (" in r['out'].lower()
@memoized
def _lookup_boards():
boards = {}

View File

@@ -1,7 +0,0 @@
bottle==0.12.9
click==5.1
colorama==0.3.3
lockfile==0.12.2
pyserial==2.7
requests==2.8.1
scons==2.4.1

View File

@@ -13,7 +13,7 @@
# limitations under the License.
from math import ceil
from os.path import dirname, join, realpath
from os.path import dirname, isfile, join, realpath
from sys import exit as sys_exit
from sys import path
@@ -215,11 +215,13 @@ Boards
def update_platform_docs():
for name in PlatformFactory.get_platforms().keys():
rst_path = join(
dirname(realpath(__file__)), "..", "docs", "platforms",
"%s.rst" % name)
platforms_dir = join(dirname(realpath(__file__)),
"..", "docs", "platforms")
rst_path = join(platforms_dir, "%s.rst" % name)
with open(rst_path, "w") as f:
f.write(generate_platform(name))
if isfile(join(platforms_dir, "%s_extra.rst" % name)):
f.write("\n.. include:: %s_extra.rst\n" % name)
def generate_framework(type_, data):
@@ -302,10 +304,13 @@ Boards
def update_framework_docs():
for name, data in util.get_frameworks().items():
rst_path = join(util.get_source_dir(), "..", "docs", "frameworks",
"%s.rst" % name)
frameworks_dir = join(dirname(realpath(__file__)),
"..", "docs", "frameworks")
rst_path = join(frameworks_dir, "%s.rst" % name)
with open(rst_path, "w") as f:
f.write(generate_framework(name, data))
if isfile(join(frameworks_dir, "%s_extra.rst" % name)):
f.write("\n.. include:: %s_extra.rst\n" % name)
def update_create_platform_doc():

Some files were not shown because too many files have changed in this diff Show More