| 
									
										
										
										
											2016-01-01 20:51:48 +02:00
										 |  |  | ..  Copyright 2014-2016 Ivan Kravets <me@ikravets.com>
 | 
					
						
							| 
									
										
										
										
											2015-11-18 17:33:46 +02:00
										 |  |  |     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.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-03-29 23:19:50 +03:00
										 |  |  | .. _faq:
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Frequently Asked Questions
 | 
					
						
							|  |  |  | ==========================
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .. contents::
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | General
 | 
					
						
							|  |  |  | -------
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | What is PlatformIO?
 | 
					
						
							|  |  |  | ~~~~~~~~~~~~~~~~~~~
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-25 02:57:42 +02:00
										 |  |  | Please refer to :ref:`what_is_pio`
 | 
					
						
							| 
									
										
										
										
											2015-03-29 23:19:50 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-13 17:44:28 +01:00
										 |  |  | Command completion in Terminal
 | 
					
						
							|  |  |  | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
					
						
							| 
									
										
										
										
											2015-10-04 15:20:49 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | Bash completion
 | 
					
						
							|  |  |  | '''''''''''''''
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Bash completion support will complete subcommands and parameters. To enable
 | 
					
						
							|  |  |  | Bash completion for `platformio` subcommands you need to put into your `.bashrc`:
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .. code-block:: bash
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     eval "$(_PLATFORMIO_COMPLETE=source platformio)"
 | 
					
						
							| 
									
										
										
										
											2016-01-26 02:00:55 +02:00
										 |  |  |     eval "$(_PLATFORMIO_COMPLETE=source pio)"
 | 
					
						
							| 
									
										
										
										
											2015-10-04 15:20:49 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-13 17:44:28 +01:00
										 |  |  | ZSH completion
 | 
					
						
							|  |  |  | ''''''''''''''
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | To enable ``zsh`` completion please run these commands:
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-13 18:36:37 +01:00
										 |  |  | .. code-block:: bash
 | 
					
						
							| 
									
										
										
										
											2015-10-13 17:44:28 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     autoload bashcompinit && bashcompinit
 | 
					
						
							|  |  |  |     eval "$(_PLATFORMIO_COMPLETE=source platformio)"
 | 
					
						
							| 
									
										
										
										
											2016-01-26 02:00:55 +02:00
										 |  |  |     eval "$(_PLATFORMIO_COMPLETE=source pio)"
 | 
					
						
							| 
									
										
										
										
											2015-10-13 17:44:28 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | .. note::
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     For permanent command completion you need to place commands above to
 | 
					
						
							|  |  |  |     ``~/.bashrc`` or ``~/.zshrc`` file.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-03-31 15:27:04 +03:00
										 |  |  | .. _faq_troubleshooting:
 | 
					
						
							| 
									
										
										
										
											2015-03-29 23:19:50 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | Troubleshooting
 | 
					
						
							|  |  |  | ---------------
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-09-28 16:57:28 +01:00
										 |  |  | Installation
 | 
					
						
							|  |  |  | ~~~~~~~~~~~~
 | 
					
						
							| 
									
										
										
										
											2015-03-31 15:27:04 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-09-28 16:57:28 +01:00
										 |  |  | [Errno 1] Operation not permitted
 | 
					
						
							|  |  |  | '''''''''''''''''''''''''''''''''
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Answered in `issue #295 <https://github.com/platformio/platformio/issues/295#issuecomment-143772005>`_.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-11-24 19:58:24 +02:00
										 |  |  | Windows AttributeError: 'module' object has no attribute 'packages'
 | 
					
						
							|  |  |  | '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 | 
					
						
							| 
									
										
										
										
											2015-09-28 16:57:28 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-11-24 19:58:24 +02:00
										 |  |  | Answered in `issue #252 <https://github.com/platformio/platformio/issues/252#issuecomment-127072039>`_.
 | 
					
						
							| 
									
										
										
										
											2015-09-28 16:57:28 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-08-21 23:41:50 +03:00
										 |  |  | .. _faq_troubleshooting_pionotfoundinpath:
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-12-11 00:16:06 +02:00
										 |  |  | Program "platformio" not found in PATH
 | 
					
						
							|  |  |  | ''''''''''''''''''''''''''''''''''''''
 | 
					
						
							| 
									
										
										
										
											2015-08-21 23:41:50 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | Where is ``platformio`` binary installed? Run this command in Terminal
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .. code-block:: bash
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     # for Unix
 | 
					
						
							|  |  |  |     which platformio
 | 
					
						
							|  |  |  |     echo $PATH
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     # for Windows OS
 | 
					
						
							|  |  |  |     where platformio
 | 
					
						
							|  |  |  |     echo %PATH%
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 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.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-12-30 20:19:56 +02:00
										 |  |  | **Unix Users**: You can make "symlinks" from ``platformio`` program to the
 | 
					
						
							|  |  |  | ``bin`` directory which is included in ``$PATH``. For example,
 | 
					
						
							| 
									
										
										
										
											2015-08-22 17:30:58 +03:00
										 |  |  | see `issue #272 <https://github.com/platformio/platformio/issues/272#issuecomment-133626112>`_.
 | 
					
						
							| 
									
										
										
										
											2015-03-31 15:27:04 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-09-10 17:47:19 +03:00
										 |  |  | Windows UnicodeDecodeError: 'ascii' codec can't decode byte
 | 
					
						
							| 
									
										
										
										
											2015-11-24 19:58:24 +02:00
										 |  |  | '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 | 
					
						
							| 
									
										
										
										
											2015-03-31 15:27:04 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-03-31 15:56:35 +03:00
										 |  |  | Answered in `issue #143 <https://github.com/platformio/platformio/issues/143#issuecomment-88060906>`_.
 | 
					
						
							| 
									
										
										
										
											2015-03-31 15:27:04 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-11-24 19:58:24 +02:00
										 |  |  | PlatformIO: command not found || An error "pkg_resources.DistributionNotFound"
 | 
					
						
							|  |  |  | ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 | 
					
						
							| 
									
										
										
										
											2015-03-31 15:27:04 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | Please upgrade *SetupTools* package:
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .. code-block:: bash
 | 
					
						
							| 
									
										
										
										
											2015-03-29 23:19:50 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-09-10 17:47:19 +03:00
										 |  |  |     [sudo] pip uninstall setuptools
 | 
					
						
							|  |  |  |     [sudo] pip install setuptools
 | 
					
						
							| 
									
										
										
										
											2015-03-29 23:19:50 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-03-31 15:27:04 +03:00
										 |  |  |     # Then re-install PlatformIO
 | 
					
						
							| 
									
										
										
										
											2015-09-10 17:47:19 +03:00
										 |  |  |     [sudo] pip uninstall platformio
 | 
					
						
							|  |  |  |     [sudo] pip install platformio
 | 
					
						
							| 
									
										
										
										
											2015-06-22 18:45:20 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-11-24 19:58:24 +02:00
										 |  |  | Miscellaneous
 | 
					
						
							|  |  |  | ~~~~~~~~~~~~~
 | 
					
						
							| 
									
										
										
										
											2015-08-21 23:09:56 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-11-24 19:58:24 +02:00
										 |  |  | .. _faq_troubleshooting_pioblocksprompt:
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | PlatformIO blocks command execution using user prompt
 | 
					
						
							|  |  |  | '''''''''''''''''''''''''''''''''''''''''''''''''''''
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | If you are going to run *PlatformIO* from **subprocess**, you **MUST
 | 
					
						
							|  |  |  | DISABLE** all prompts. It will allow you to avoid blocking.
 | 
					
						
							|  |  |  | There are a few options:
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | - using :option:`platformio --force` option before each command
 | 
					
						
							|  |  |  | - using environment variable :envvar:`PLATFORMIO_SETTING_ENABLE_PROMPTS=No <PLATFORMIO_SETTING_ENABLE_PROMPTS>`
 | 
					
						
							|  |  |  | - disable global setting ``enable_prompts`` via :ref:`cmd_settings` command
 | 
					
						
							|  |  |  | - masking under Continuous Integration system via environment variable
 | 
					
						
							|  |  |  |   :envvar:`CI=true <CI>`.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Serial does not work with panStampAVR board
 | 
					
						
							|  |  |  | '''''''''''''''''''''''''''''''''''''''''''
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Answered in `issue #144 <https://github.com/platformio/platformio/issues/144#issuecomment-87388038>`_.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Building
 | 
					
						
							|  |  |  | ~~~~~~~~
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Can not compile a library that compiles without issue with Arduino IDE
 | 
					
						
							|  |  |  | ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | * `#298: Unable to use Souliss library <https://github.com/platformio/platformio/issues/298>`_
 | 
					
						
							|  |  |  | * `#331: Unable to use MySensors library <https://github.com/platformio/platformio/issues/331>`_
 | 
					
						
							| 
									
										
										
										
											2015-08-21 23:09:56 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-09-10 17:47:19 +03:00
										 |  |  | ARM toolchain: cc1plus: error while loading shared libraries
 | 
					
						
							| 
									
										
										
										
											2015-11-24 19:58:24 +02:00
										 |  |  | ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 | 
					
						
							| 
									
										
										
										
											2015-06-22 18:45:20 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | See related answers for
 | 
					
						
							|  |  |  | `error while loading shared libraries <https://github.com/platformio/platformio/issues?utf8=✓&q=error+while+loading+shared+libraries>`_.
 | 
					
						
							| 
									
										
										
										
											2015-09-23 15:55:19 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | Archlinux: libncurses.so.5: cannot open shared object file
 | 
					
						
							| 
									
										
										
										
											2015-11-24 19:58:24 +02:00
										 |  |  | ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 | 
					
						
							| 
									
										
										
										
											2015-09-23 15:55:19 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | Answered in `issue #291 <https://github.com/platformio/platformio/issues/291>`_.
 | 
					
						
							| 
									
										
										
										
											2015-12-17 20:22:17 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | Monitoring a serial port breaks upload
 | 
					
						
							|  |  |  | ''''''''''''''''''''''''''''''''''''''
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Answered in `issue #384 <https://github.com/platformio/platformio/issues/384>`_.
 |