From e3d17d132a962ef20977e4daef57012f35297c23 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 10 Aug 2018 14:33:36 +0300 Subject: [PATCH 001/100] Docs: Improve "Drivers" section for debugging tools --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 21c1cf52..efde11a2 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 21c1cf522ce5e1cf7c04914ba7dbaf33c8cf463d +Subproject commit efde11a2342d8ce4109e937a1737f6369abec167 From 71cdc9fe7800bd63592d165ae6ddeec08fd848a9 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 11 Aug 2018 15:34:33 +0300 Subject: [PATCH 002/100] Docs: Add compatible platforms, frameworks, and boards per debug tool --- docs | 2 +- scripts/docspregen.py | 212 ++++++++++++++++++++++-------------------- 2 files changed, 112 insertions(+), 102 deletions(-) diff --git a/docs b/docs index efde11a2..680da882 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit efde11a2342d8ce4109e937a1737f6369abec167 +Subproject commit 680da882a1b5d1dc91852ae68b93798dd0b46699 diff --git a/scripts/docspregen.py b/scripts/docspregen.py index 4fd8c2b3..1647436e 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -27,6 +27,7 @@ API_PACKAGES = util.get_api_result("/packages") API_FRAMEWORKS = util.get_api_result("/frameworks") BOARDS = PlatformManager().get_installed_boards() PLATFORM_MANIFESTS = PlatformManager().get_installed() +DOCS_ROOT_DIR = realpath(join(dirname(realpath(__file__)), "..", "docs")) def is_compat_platform_and_framework(platform, framework): @@ -118,6 +119,48 @@ def generate_boards(boards, extend_debug=False, skip_columns=None): return lines +def generate_frameworks_contents(frameworks): + if not frameworks: + return [] + lines = [] + lines.append(""" +Frameworks +---------- +.. list-table:: + :header-rows: 1 + + * - Name + - Description""") + for framework in API_FRAMEWORKS: + if framework['name'] not in frameworks: + continue + lines.append(""" + * - :ref:`framework_{name}` + - {description}""".format(**framework)) + return lines + + +def generate_platforms_contents(platforms): + if not platforms: + return [] + lines = [] + lines.append(""" +Platforms +--------- +.. list-table:: + :header-rows: 1 + + * - Name + - Description""") + + for name in sorted(platforms): + p = PlatformFactory.newPlatform(name) + lines.append(""" + * - :ref:`platform_{name}` + - {description}""".format(name=p.name, description=p.description)) + return lines + + def generate_debug_contents(boards, skip_board_columns=None, extra_rst=None): lines = [] onboard_debug = [ @@ -143,8 +186,8 @@ Debugging lines.append(".. include:: %s" % extra_rst) lines.append(""" -Debug Tools -~~~~~~~~~~~ +Tools & Debug Probes +~~~~~~~~~~~~~~~~~~~~ Supported debugging tools are listed in "Debug" column. For more detailed information, please scroll table by horizontal. @@ -269,7 +312,9 @@ def generate_platform(name, rst_dir): lines.append(p.title) lines.append("=" * len(p.title)) - lines.append(":ref:`projectconf_env_platform` = ``%s``" % p.name) + lines.append("") + lines.append(":Configuration:") + lines.append(" :ref:`projectconf_env_platform` = ``%s``" % p.name) lines.append("") lines.append(p.description) lines.append(""" @@ -362,24 +407,11 @@ Upstream # # Frameworks # - _frameworks_lines = [] + compatible_frameworks = [] for framework in API_FRAMEWORKS: - if not is_compat_platform_and_framework(name, framework['name']): - continue - _frameworks_lines.append(""" - * - :ref:`framework_{name}` - - {description}""".format(**framework)) - - if _frameworks_lines: - lines.append(""" -Frameworks ----------- -.. list-table:: - :header-rows: 1 - - * - Name - - Description""") - lines.extend(_frameworks_lines) + if is_compat_platform_and_framework(name, framework['name']): + compatible_frameworks.append(framework['name']) + lines.extend(generate_frameworks_contents(compatible_frameworks)) # # Boards @@ -413,8 +445,7 @@ Boards def update_platform_docs(): for manifest in PLATFORM_MANIFESTS: name = manifest['name'] - platforms_dir = join( - dirname(realpath(__file__)), "..", "docs", "platforms") + platforms_dir = join(DOCS_ROOT_DIR, "platforms") rst_path = join(platforms_dir, "%s.rst" % name) with open(rst_path, "w") as f: f.write(generate_platform(name, platforms_dir)) @@ -451,7 +482,9 @@ def generate_framework(type_, data, rst_dir=None): lines.append(data['title']) lines.append("=" * len(data['title'])) - lines.append(":ref:`projectconf_env_framework` = ``%s``" % type_) + lines.append("") + lines.append(":Configuration:") + lines.append(" :ref:`projectconf_env_framework` = ``%s``" % type_) lines.append("") lines.append(data['description']) lines.append(""" @@ -492,21 +525,9 @@ Examples "%s/tree/master/examples" % p.repository_url[:-4]))) # Platforms - lines.append(""" -Platforms ---------- -.. list-table:: - :header-rows: 1 - - * - Name - - Description""") - - for manifest in compatible_platforms: - p = PlatformFactory.newPlatform(manifest['name']) - lines.append(""" - * - :ref:`platform_{type_}` - - {description}""".format( - type_=manifest['name'], description=p.description)) + lines.extend( + generate_platforms_contents( + [manifest['name'] for manifest in compatible_platforms])) # # Boards @@ -536,8 +557,7 @@ Boards def update_framework_docs(): for framework in API_FRAMEWORKS: name = framework['name'] - frameworks_dir = join( - dirname(realpath(__file__)), "..", "docs", "frameworks") + frameworks_dir = join(DOCS_ROOT_DIR, "frameworks") rst_path = join(frameworks_dir, "%s.rst" % name) with open(rst_path, "w") as f: f.write(generate_framework(name, framework, frameworks_dir)) @@ -594,15 +614,14 @@ popular embedded boards and IDE. lines.append("~" * len(vendor)) lines.extend(generate_boards(boards)) - emboards_rst = join( - dirname(realpath(__file__)), "..", "docs", "platforms", - "embedded_boards.rst") + emboards_rst = join(DOCS_ROOT_DIR, "platforms", "embedded_boards.rst") with open(emboards_rst, "w") as f: f.write("\n".join(lines)) def update_debugging(): - tools_to_platforms = {} + tool_to_platforms = {} + tool_to_boards = {} vendors = {} platforms = [] frameworks = [] @@ -612,9 +631,12 @@ def update_debugging(): for tool in data['debug']['tools']: tool = str(tool) - if tool not in tools_to_platforms: - tools_to_platforms[tool] = [] - tools_to_platforms[tool].append(data['platform']) + if tool not in tool_to_platforms: + tool_to_platforms[tool] = [] + tool_to_platforms[tool].append(data['platform']) + if tool not in tool_to_boards: + tool_to_boards[tool] = [] + tool_to_boards[tool].append(data['id']) platforms.append(data['platform']) frameworks.extend(data['frameworks']) @@ -624,60 +646,12 @@ def update_debugging(): else: vendors[vendor] = [data] - def _update_tool_compat_platforms(content): - begin_tpl = ".. begin_compatible_platforms_" - end_tpl = ".. end_compatible_platforms_" - for tool, platforms in tools_to_platforms.items(): - begin = begin_tpl + tool - end = end_tpl + tool - begin_index = content.index(begin) - end_index = content.index(end) - chunk = ["\n\n:Compatible Platforms:\n"] - chunk.extend([ - " * :ref:`platform_%s`" % str(p) - for p in sorted(set(platforms)) - ]) - chunk.extend(["\n"]) - content = content[:begin_index + len(begin)] + "\n".join( - chunk) + content[end_index:] - return content + platforms = sorted(set(platforms)) + frameworks = sorted(set(frameworks)) - lines = [] - # Platforms - lines.append(""".. _debugging_platforms: - -Platforms ---------- -.. list-table:: - :header-rows: 1 - - * - Name - - Description""") - - for manifest in PLATFORM_MANIFESTS: - if manifest['name'] not in platforms: - continue - p = PlatformFactory.newPlatform(manifest['name']) - lines.append(""" - * - :ref:`platform_{type_}` - - {description}""".format( - type_=manifest['name'], description=p.description)) - - # Frameworks - lines.append(""" -Frameworks ----------- -.. list-table:: - :header-rows: 1 - - * - Name - - Description""") - for framework in API_FRAMEWORKS: - if framework['name'] not in frameworks: - continue - lines.append(""" - * - :ref:`framework_{name}` - - {description}""".format(**framework)) + lines = [".. _debugging_platforms:"] + lines.extend(generate_platforms_contents(platforms)) + lines.extend(generate_frameworks_contents(frameworks)) # Boards lines.append(""" @@ -692,15 +666,51 @@ Boards lines.append("~" * len(vendor)) lines.extend(generate_boards(boards, extend_debug=True)) + # save with open( join(util.get_source_dir(), "..", "docs", "plus", "debugging.rst"), "r+") as fp: - content = _update_tool_compat_platforms(fp.read()) + content = fp.read() fp.seek(0) fp.truncate() fp.write(content[:content.index(".. _debugging_platforms:")] + "\n".join(lines)) + # Debug tools + for tool, platforms in tool_to_platforms.items(): + tool_path = join(DOCS_ROOT_DIR, "plus", "debug-tools", "%s.rst" % tool) + assert isfile(tool_path) + platforms = sorted(set(platforms)) + + lines = [".. begin_platforms"] + lines.extend(generate_platforms_contents(platforms)) + tool_frameworks = [] + for platform in platforms: + for framework in frameworks: + if is_compat_platform_and_framework(platform, framework): + tool_frameworks.append(framework) + lines.extend(generate_frameworks_contents(tool_frameworks)) + + lines.append(""" +Boards +------ + +.. note:: + For more detailed ``board`` information please scroll tables below by horizontal. +""") + lines.extend( + generate_boards( + [b for b in BOARDS if b['id'] in tool_to_boards[tool]], + extend_debug=True, + skip_columns=None)) + + with open(tool_path, "r+") as fp: + content = fp.read() + fp.seek(0) + fp.truncate() + fp.write(content[:content.index(".. begin_platforms")] + + "\n".join(lines)) + def update_project_examples(): platform_readme_tpl = """ From 4ff013c0fe07d1ed53b556f8326b34b741d69405 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 14 Aug 2018 14:24:03 +0300 Subject: [PATCH 003/100] Improve docs for advanced scripting --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 680da882..f644f664 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 680da882a1b5d1dc91852ae68b93798dd0b46699 +Subproject commit f644f664b986fce8bcd7497cca9df6e864907144 From 79e6df7263c328cdc639586bff87d052761ddf32 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 14 Aug 2018 14:36:03 +0300 Subject: [PATCH 004/100] Temporary hook for ReadTheDocs #2971 with a broken "edit" link --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index f644f664..81bdab8d 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit f644f664b986fce8bcd7497cca9df6e864907144 +Subproject commit 81bdab8d6d0c08a2c632f448c9e670cdb8f9207e From 9258763491eb39df30e89d6e15127b896ba39a44 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 15 Aug 2018 14:38:19 +0300 Subject: [PATCH 005/100] Correct docs for SemVer/Deps syntax --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 81bdab8d..abd1726b 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 81bdab8d6d0c08a2c632f448c9e670cdb8f9207e +Subproject commit abd1726bc68c47b8899de57112568f994be2e119 From d009b997bc8ec1919e3d4a7639ee630e4f7f5c57 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 15 Aug 2018 19:12:41 +0300 Subject: [PATCH 006/100] Auto-dropdown navigation; move "Docs" to the right side --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index abd1726b..042e123c 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit abd1726bc68c47b8899de57112568f994be2e119 +Subproject commit 042e123ca1d8365be0f5bed1bde684c5478bde31 From d448a0ec5ce197c8ce928d42e61d7493f760e8ae Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 15 Aug 2018 19:44:02 +0300 Subject: [PATCH 007/100] Switch docs to HTTPS --- HISTORY.rst | 520 +++++++++--------- README.rst | 22 +- docs | 2 +- examples | 2 +- platformio/__main__.py | 2 +- platformio/app.py | 2 +- platformio/builder/main.py | 2 +- platformio/builder/tools/piolib.py | 2 +- platformio/builder/tools/pioupload.py | 2 +- platformio/commands/init.py | 10 +- platformio/commands/lib.py | 2 +- platformio/commands/upgrade.py | 2 +- platformio/exception.py | 4 +- .../vscode/.vscode/c_cpp_properties.json.tpl | 2 +- .../ide/tpls/vscode/.vscode/launch.json.tpl | 4 +- platformio/maintenance.py | 5 +- platformio/projectconftpl.ini | 2 +- platformio/util.py | 2 +- scripts/99-platformio-udev.rules | 2 +- scripts/docspregen.py | 6 +- 20 files changed, 299 insertions(+), 298 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 39ce1ab7..ad550843 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,18 +7,18 @@ PlatformIO 3.0 3.6.0 (2018-08-06) ~~~~~~~~~~~~~~~~~~ -* `Program Memory Usage `_ +* `Program Memory Usage `_ - Print human-readable memory usage information after a build and before uploading - Print detailed memory usage information with "sections" and "addresses" - in `verbose mode `__ + in `verbose mode `__ - Check maximum allowed "program" and "data" sizes before uploading/programming (`issue #1412 `_) -* `PIO Unit Testing `__: +* `PIO Unit Testing `__: - - Documented `Project Shared Code `__ - - Force building of project source code using `test_build_project_src `__ option + - Documented `Project Shared Code `__ + - Force building of project source code using `test_build_project_src `__ option - Fixed missed ``UNIT_TEST`` macro for unit test components/libraries * Check package structure after unpacking and raise error when antivirus tool @@ -27,16 +27,16 @@ PlatformIO 3.0 * Lock interprocess requests to PlatformIO Package Manager for install/uninstall operations (`issue #1594 `_) -* Fixed an issue with `PIO Remote `__ +* Fixed an issue with `PIO Remote `__ when upload process depends on the source code of a project framework -* Fixed an issue when ``srcFilter`` field in `library.json `__ +* Fixed an issue when ``srcFilter`` field in `library.json `__ breaks a library build (`issue #1735 `_) 3.5.4 (2018-07-03) ~~~~~~~~~~~~~~~~~~ -* Improved removing of default build flags using `build_unflags `__ option +* Improved removing of default build flags using `build_unflags `__ option (`issue #1712 `_) * Export ``LIBS``, ``LIBPATH``, and ``LINKFLAGS`` data from project dependent libraries to the global build environment @@ -44,40 +44,40 @@ PlatformIO 3.0 build environment (`issue #1665 `_) * Handle "architectures" data from "library.properties" manifest in - `lib_compat_mode = strict `__ + `lib_compat_mode = strict `__ * Added workaround for Python SemVer package's `issue #61 `_ with caret range and pre-releases -* Replaced conflicted "env" pattern by "sysenv" for `"platformio.ini" Dynamic Variables" `__ +* Replaced conflicted "env" pattern by "sysenv" for `"platformio.ini" Dynamic Variables" `__ (`issue #1705 `_) -* Removed "date&time" when processing project with `platformio run `__ command +* Removed "date&time" when processing project with `platformio run `__ command (`issue #1343 `_) * Fixed issue with invalid LD script if path contains space * Fixed preprocessor for Arduino sketch when function returns certain type (`issue #1683 `_) -* Fixed issue when `platformio lib uninstall `__ +* Fixed issue when `platformio lib uninstall `__ removes initial source code (`issue #1023 `_) 3.5.3 (2018-06-01) ~~~~~~~~~~~~~~~~~~ -* `PlatformIO Home `__ - +* `PlatformIO Home `__ - interact with PlatformIO ecosystem using modern and cross-platform GUI: - "Recent News" block on "Welcome" page - Direct import of development platform's example -* Simplify configuration for `PIO Unit Testing `__: separate main program from a test build process, drop +* Simplify configuration for `PIO Unit Testing `__: separate main program from a test build process, drop requirement for ``#ifdef UNIT_TEST`` guard -* Override any option from board manifest in `Project Configuration File "platformio.ini" `__ +* Override any option from board manifest in `Project Configuration File "platformio.ini" `__ (`issue #1612 `_) -* Configure a custom path to SVD file using `debug_svd_path `__ +* Configure a custom path to SVD file using `debug_svd_path `__ option -* Custom project `description `_ - which will be used by `PlatformIO Home `_ +* Custom project `description `_ + which will be used by `PlatformIO Home `_ * Updated Unity tool to 2.4.3 * Improved support for Black Magic Probe in "uploader" mode * Renamed "monitor_baud" option to "monitor_speed" -* Fixed issue when a custom `lib_dir `__ +* Fixed issue when a custom `lib_dir `__ was not handled correctly (`issue #1473 `_) * Fixed issue with useless project rebuilding for case insensitive file @@ -92,17 +92,17 @@ PlatformIO 3.0 3.5.2 (2018-03-13) ~~~~~~~~~~~~~~~~~~ -* `PlatformIO Home `__ - +* `PlatformIO Home `__ - interact with PlatformIO ecosystem using modern and cross-platform GUI: - Multiple themes (Dark & Light) - Ability to specify a name for new project -* Control `PIO Unified Debugger `__ +* Control `PIO Unified Debugger `__ and its firmware loading mode using - `debug_load_mode `__ option + `debug_load_mode `__ option * Added aliases (off, light, strict) for - `LDF Compatibility Mode `__ + `LDF Compatibility Mode `__ * Search for a library using PIO Library Registry ID ``id:X`` (e.g. ``pio lib search id:13``) * Show device system information (MCU, Frequency, RAM, Flash, Debugging tools) in a build log @@ -123,15 +123,15 @@ PlatformIO 3.0 ~~~~~~~~~~~~~~~~~~ * New ``test_speed`` option to control a communication baudrate/speed between - `PIO Unit Testing `__ + `PIO Unit Testing `__ engine and a target device (`issue #1273 `_) * Show full library version in "Library Dependency Graph" including VCS information (`issue #1274 `_) -* Configure a custom firmware/program name in build directory (`example `__) +* Configure a custom firmware/program name in build directory (`example `__) * Renamed ``envs_dir`` option to ``build_dir`` - in `Project Configuration File "platformio.ini" `__ + in `Project Configuration File "platformio.ini" `__ * Refactored code without "arrow" dependency (resolve issue with "ImportError: No module named backports.functools_lru_cache") * Improved support of PIO Unified Debugger for Eclipse Oxygen @@ -144,7 +144,7 @@ PlatformIO 3.0 3.5.0 (2017-12-28) ~~~~~~~~~~~~~~~~~~ -* `PlatformIO Home `__ - +* `PlatformIO Home `__ - interact with PlatformIO ecosystem using modern and cross-platform GUI: - Library Manager: @@ -161,38 +161,38 @@ PlatformIO 3.0 - Development platforms, frameworks and board explorer - Device Manager: serial, logical, and multicast DNS services -* Integration with `Jenkins CI `_ -* New `include `__ +* Integration with `Jenkins CI `_ +* New `include `__ folder for project's header files (`issue #1107 `_) * Depend on development platform using VCS URL (Git, Mercurial and Subversion) - instead of a name in `Project Configuration File "platformio.ini" `__. + instead of a name in `Project Configuration File "platformio.ini" `__. Drop support for ``*_stage`` dev/platform names (use VCS URL instead). * Reinstall/redownload package with a new ``-f, --force`` option for - `platformio lib install `__ - and `platformio platform install `__ + `platformio lib install `__ + and `platformio platform install `__ commands (`issue #778 `_) * Handle missed dependencies and provide a solution based on PlatformIO Library Registry (`issue #781 `_) -* New setting `projects_dir `__ +* New setting `projects_dir `__ that allows to override a default PIO Home Projects location (`issue #1161 `_) -* `Library Dependency Finder (LDF) `__: +* `Library Dependency Finder (LDF) `__: - - Search for dependencies used in `PIO Unit Testing `__ + - Search for dependencies used in `PIO Unit Testing `__ (`issue #953 `_) - Parse library source file in pair with a header when they have the same name (`issue #1175 `_) - Handle library dependencies defined as VCS or SemVer in - `Project Configuration File "platformio.ini" `__ + `Project Configuration File "platformio.ini" `__ (`issue #1155 `_) - - Added option to configure library `Compatible Mode `__ - using `library.json `__ + - Added option to configure library `Compatible Mode `__ + using `library.json `__ -* New options for `platformio device list `__ +* New options for `platformio device list `__ command: - ``--serial`` list available serial ports (default) @@ -215,51 +215,51 @@ PlatformIO 3.0 * Pre/Post extra scripting for advanced control of PIO Build System (`issue #891 `_) -* New `lib_archive `_ +* New `lib_archive `_ option to control library archiving and linking behavior (`issue #993 `_) * Add "inc" folder automatically to CPPPATH when "src" is available (works for project and library) (`issue #1003 `_) * Use a root of library when filtering source code using - `library.json `__ + `library.json `__ and ``srcFilter`` field -* Added ``monitor_*`` options to white-list for `Project Configuration File "platformio.ini" `__ +* Added ``monitor_*`` options to white-list for `Project Configuration File "platformio.ini" `__ (`issue #982 `_) * Do not ask for board ID when initialize project for desktop platform * Handle broken PIO Core state and create new one -* Fixed an issue with a custom transport for `PIO Unit Testing `__ +* Fixed an issue with a custom transport for `PIO Unit Testing `__ when multiple tests are present * Fixed an issue when can not upload firmware to SAM-BA based board (Due) 3.4.0 (2017-06-26) ~~~~~~~~~~~~~~~~~~ -* `PIO Unified Debugger `__ +* `PIO Unified Debugger `__ - "1-click" solution, zero configuration - Support for 100+ embedded boards - Multiple architectures and development platforms - Windows, MacOS, Linux (+ARMv6-8) - - Built-in into `PlatformIO IDE for Atom `__ and `PlatformIO IDE for VScode `__ - - Integration with `Eclipse `__ and `Sublime Text `__ + - Built-in into `PlatformIO IDE for Atom `__ and `PlatformIO IDE for VScode `__ + - Integration with `Eclipse `__ and `Sublime Text `__ -* Filter `PIO Unit Testing `__ - tests using a new ``test_filter`` option in `Project Configuration File "platformio.ini" `__ - or `platformio test --filter `__ command +* Filter `PIO Unit Testing `__ + tests using a new ``test_filter`` option in `Project Configuration File "platformio.ini" `__ + or `platformio test --filter `__ command (`issue #934 `_) -* Custom ``test_transport`` for `PIO Unit Testing `__ Engine -* Configure Serial Port Monitor in `Project Configuration File "platformio.ini" `__ +* Custom ``test_transport`` for `PIO Unit Testing `__ Engine +* Configure Serial Port Monitor in `Project Configuration File "platformio.ini" `__ (`issue #787 `_) -* New `monitor `__ +* New `monitor `__ target which allows to launch Serial Monitor automatically after successful "build" or "upload" operations (`issue #788 `_) -* Project generator for `VIM `__ -* Multi-line support for the different options in `Project Configuration File "platformio.ini" `__, +* Project generator for `VIM `__ +* Multi-line support for the different options in `Project Configuration File "platformio.ini" `__, such as: ``build_flags``, ``build_unflags``, etc. (`issue #889 `_) * Handle dynamic ``SRC_FILTER`` environment variable from - `library.json extra script `__ + `library.json extra script `__ * Notify about multiple installations of PIO Core (`issue #961 `_) * Improved auto-detecting of mbed-enabled media disks @@ -267,7 +267,7 @@ PlatformIO 3.0 that were installed from repository * Add support for ``.*cc`` extension (`issue #939 `_) -* Handle ``env_default`` in `Project Configuration File "platformio.ini" `__ +* Handle ``env_default`` in `Project Configuration File "platformio.ini" `__ when re-initializing a project (`issue #950 `_) * Use root directory for PIO Home when path contains non-ascii characters @@ -282,7 +282,7 @@ PlatformIO 3.0 (`issue #935 `_) * Fixed linter error "unity.h does not exist" for Unit Testing (`issue #947 `_) -* Fixed issue when `Library Dependency Finder (LDF) `__ +* Fixed issue when `Library Dependency Finder (LDF) `__ does not handle custom ``src_dir`` (`issue #942 `_) * Fixed cloning a package (library) from a private Git repository with @@ -298,31 +298,31 @@ PlatformIO 3.0 ~~~~~~~~~~~~~~~~~~ * PlatformIO Library Registry statistics with new - `pio lib stats `__ command + `pio lib stats `__ command - Recently updated and added libraries - Recent and popular keywords - Featured libraries (today, week, month) * List built-in libraries based on development platforms with a new - `pio lib builtin `__ command -* Show detailed info about a library using `pio lib show `__ + `pio lib builtin `__ command +* Show detailed info about a library using `pio lib show `__ command (`issue #430 `_) * List supported frameworks, SDKs with a new - `pio platform frameworks `__ command + `pio platform frameworks `__ command * Visual Studio Code extension for PlatformIO (`issue #619 `_) * Added new options ``--no-reset``, ``--monitor-rts`` and ``--monitor-dtr`` - to `pio test `__ + to `pio test `__ command (allows to avoid automatic board's auto-reset when gathering test results) * Added support for templated methods in ``*.ino to *.cpp`` converter (`pull #858 `_) * Package version as "Repository URL" in manifest of development version (``"version": "https://github.com/user/repo.git"``) * Produce less noisy output when ``-s/--silent`` options are used for - `platformio init `__ - and `platformio run `__ + `platformio init `__ + and `platformio run `__ commands (`issue #850 `_) * Use C++11 by default for CLion IDE based projects @@ -338,13 +338,13 @@ PlatformIO 3.0 3.2.1 (2016-12-07) ~~~~~~~~~~~~~~~~~~ -* Changed default `LDF Mode `__ +* Changed default `LDF Mode `__ from ``chain+`` to ``chain`` 3.2.0 (2016-12-07) ~~~~~~~~~~~~~~~~~~ -* `PIO Remote™ `__. +* `PIO Remote™ `__. **Your devices are always with you!** + Over-The-Air (OTA) Device Manager @@ -353,44 +353,44 @@ PlatformIO 3.0 + Continuous Deployment + Continuous Delivery -* Integration with `Cloud IDEs `__ +* Integration with `Cloud IDEs `__ + Cloud9 + Codeanywhere + Eclipse Che -* `PIO Account `__ - and `PLATFORMIO_AUTH_TOKEN `__ +* `PIO Account `__ + and `PLATFORMIO_AUTH_TOKEN `__ environment variable for CI systems (`issue #808 `_, `issue #467 `_) * Inject system environment variables to configuration settings in - `Project Configuration File "platformio.ini" `__ + `Project Configuration File "platformio.ini" `__ (`issue #792 `_) * Custom boards per project with ``boards_dir`` option in - `Project Configuration File "platformio.ini" `__ + `Project Configuration File "platformio.ini" `__ (`issue #515 `_) -* Unix shell-style wildcards for `upload_port `_ +* Unix shell-style wildcards for `upload_port `_ (`issue #839 `_) -* Refactored `Library Dependency Finder (LDF) `__ +* Refactored `Library Dependency Finder (LDF) `__ C/C++ Preprocessor for conditional syntax (``#ifdef``, ``#if``, ``#else``, ``#elif``, ``#define``, etc.) (`issue #837 `_) -* Added new `LDF Modes `__: +* Added new `LDF Modes `__: ``chain+`` and ``deep+`` and set ``chain+`` as default * Added global ``lib_extra_dirs`` option to ``[platformio]`` section for - `Project Configuration File "platformio.ini" `__ + `Project Configuration File "platformio.ini" `__ (`issue #842 `_) -* Enabled caching by default for API requests and Library Manager (see `enable_cache `__ setting) +* Enabled caching by default for API requests and Library Manager (see `enable_cache `__ setting) * Native integration with VIM/Neovim using `neomake-platformio `__ plugin * Changed a default exit combination for Device Monitor from ``Ctrl+]`` to ``Ctrl+C`` * Improved detecting of ARM mbed media disk for uploading * Improved Project Generator for CLion IDE when source folder contains nested items * Improved handling of library dependencies specified in ``library.json`` manifest (`issue #814 `_) -* Improved `Library Dependency Finder (LDF) `__ +* Improved `Library Dependency Finder (LDF) `__ for circular dependencies -* Show vendor version of a package for `platformio platform show `__ command +* Show vendor version of a package for `platformio platform show `__ command (`issue #838 `_) * Fixed unable to include SSH user in ``lib_deps`` repository url (`issue #830 `_) @@ -402,15 +402,15 @@ PlatformIO 3.0 3.1.0 (2016-09-19) ~~~~~~~~~~~~~~~~~~ -* New! Dynamic variables/templates for `Project Configuration File "platformio.ini" `__ +* New! Dynamic variables/templates for `Project Configuration File "platformio.ini" `__ (`issue #705 `_) * Summary about processed environments (`issue #777 `_) * Implemented LocalCache system for API and improved a work in off-line mode * Improved Project Generator when custom ``--project-option`` is passed to - `platformio init `__ + `platformio init `__ command -* Deprecated ``lib_force`` option, please use `lib_deps `__ instead +* Deprecated ``lib_force`` option, please use `lib_deps `__ instead * Return valid exit code from ``plaformio test`` command * Fixed Project Generator for CLion IDE using Windows OS (`issue #785 `_) @@ -428,7 +428,7 @@ PlatformIO 3.0 * `PlatformIO Plus `__ - + Local and Embedded `Unit Testing `__ + + Local and Embedded `Unit Testing `__ (`issue #408 `_, `issue #519 `_) @@ -446,7 +446,7 @@ PlatformIO 3.0 * Library Manager 3.0 - + Project dependencies per build environment using `lib_deps `__ option + + Project dependencies per build environment using `lib_deps `__ option (`issue #413 `_) + `Semantic Versioning `__ for library commands and dependencies @@ -465,18 +465,18 @@ PlatformIO 3.0 * New Intelligent Library Build System - + `Library Dependency Finder `__ + + `Library Dependency Finder `__ that interprets C/C++ Preprocessor conditional macros with deep search behavior + Check library compatibility with project environment before building (`issue #415 `_) + Control Library Dependency Finder for compatibility using - `lib_compat_mode `__ + `lib_compat_mode `__ option + Custom library storages/directories with - `lib_extra_dirs `__ option + `lib_extra_dirs `__ option (`issue #537 `_) + Handle extra build flags, source filters and build script from - `library.json `__ + `library.json `__ (`issue #289 `_) + Allowed to disable library archiving (``*.ar``) (`issue #719 `_) @@ -498,7 +498,7 @@ PlatformIO 3.0 * Improved INO to CPP converter (`issue #659 `_, `issue #765 `_) -* Added ``license`` field to `library.json `__ +* Added ``license`` field to `library.json `__ (`issue #522 `_) * Warn about unknown options in project configuration file ``platformio.ini`` (`issue #740 `_) @@ -512,11 +512,11 @@ PlatformIO 2.0 2.11.2 (2016-08-02) ~~~~~~~~~~~~~~~~~~~ -* Improved support for `Microchip PIC32 `__ development platform and ChipKIT boards +* Improved support for `Microchip PIC32 `__ development platform and ChipKIT boards (`issue #438 `_) * Added support for Pinoccio Scout board (`issue #52 `_) -* Added support for `Teensy USB Features `__ +* Added support for `Teensy USB Features `__ (HID, SERIAL_HID, DISK, DISK_SDFLASH, MIDI, etc.) (`issue #722 `_) * Switched to built-in GCC LwIP library for Espressif development platform @@ -541,25 +541,25 @@ PlatformIO 2.0 (`issue #472 `_) * Added support for Microchip chipKIT Lenny board * Updated Microchip PIC32 Arduino framework to v1.2.1 -* Documented `uploading of EEPROM data `__ +* Documented `uploading of EEPROM data `__ (from EEMEM directive) * Added ``Rebuild C/C++ Project Index`` target to CLion and Eclipse IDEs -* Improved project generator for `CLion IDE `__ +* Improved project generator for `CLion IDE `__ * Added ``udev`` rules for OpenOCD CMSIS-DAP adapters (`issue #718 `_) * Auto-remove project cache when PlatformIO is upgraded * Keep user changes for ``.gitignore`` file when re-generate/update project data * Ignore ``[platformio]`` section from custom project configuration file when - `platformio ci --project-conf `__ + `platformio ci --project-conf `__ command is used * Fixed missed ``--boot`` flag for the firmware uploader for ATSAM3X8E Cortex-M3 MCU based boards (Arduino Due, etc) (`issue #710 `_) * Fixed missing trailing ``\`` for the source files list when generate project - for `Qt Creator IDE `__ + for `Qt Creator IDE `__ (`issue #711 `_) * Split source files to ``HEADERS`` and ``SOURCES`` when generate project - for `Qt Creator IDE `__ + for `Qt Creator IDE `__ (`issue #713 `_) 2.11.0 (2016-06-28) @@ -636,7 +636,7 @@ PlatformIO 2.0 2.9.2 (2016-06-02) ~~~~~~~~~~~~~~~~~~ -* Simplified `Continuous Integration with AppVeyor `__ +* Simplified `Continuous Integration with AppVeyor `__ (`issue #671 `_) * Automatically add source directory to ``CPPPATH`` of Build System * Added support for Silicon Labs SLSTK3401A (Pearl Gecko) and @@ -670,21 +670,21 @@ PlatformIO 2.0 2.9.0 (2016-04-28) ~~~~~~~~~~~~~~~~~~ -* Project generator for `CodeBlocks IDE `__ +* Project generator for `CodeBlocks IDE `__ (`issue #600 `_) -* New `Lattice iCE40 FPGA `__ +* New `Lattice iCE40 FPGA `__ development platform with support for Lattice iCEstick FPGA Evaluation Kit and BQ IceZUM Alhambra FPGA (`issue #480 `_) -* New `Intel ARC 32-bit `_ +* New `Intel ARC 32-bit `_ development platform with support for Arduino/Genuino 101 board (`issue #535 `_) -* New `Microchip PIC32 `__ +* New `Microchip PIC32 `__ development platform with support for 20+ different PIC32 based boards (`issue #438 `_) -* New RTOS and build Framework named `Simba `__ +* New RTOS and build Framework named `Simba `__ (`issue #412 `_) -* New boards for `ARM mbed `__ +* New boards for `ARM mbed `__ framework: ST Nucleo F410RB, ST Nucleo L073RZ and BBC micro:bit * Added support for Arduino.Org boards: Arduino Leonardo ETH, Arduino Yun Mini, Arduino Industrial 101 and Linino One @@ -695,7 +695,7 @@ PlatformIO 2.0 * Added support for MightyCore boards: ATmega1284, ATmega644, ATmega324, ATmega164, ATmega32, ATmega16 and ATmega8535 (`issue #585 `_) -* Added support for `TI MSP430 `__ +* Added support for `TI MSP430 `__ boards: TI LaunchPad w/ msp430fr4133 and TI LaunchPad w/ msp430fr6989 * Updated Arduino core for Espressif platform to 2.2.0 (`issue #627 `_) @@ -703,14 +703,14 @@ PlatformIO 2.0 (`issue #366 `_) * PlatformIO Library Registry in JSON format! Implemented ``--json-output`` and ``--page`` options for - `platformio lib search `__ + `platformio lib search `__ command (`issue #604 `_) -* Allowed to specify default environments `env_default `__ +* Allowed to specify default environments `env_default `__ which should be processed by default with ``platformio run`` command (`issue #576 `_) * Allowed to unflag(remove) base/initial flags using - `build_unflags `__ + `build_unflags `__ option (`issue #559 `_) * Allowed multiple VID/PID pairs when detecting serial ports @@ -761,7 +761,7 @@ PlatformIO 2.0 2.8.5 (2016-03-07) ~~~~~~~~~~~~~~~~~~ -* Project generator for `NetBeans IDE `__ +* Project generator for `NetBeans IDE `__ (`issue #541 `_) * Created package for Homebrew Mac OS X Package Manager: ``brew install platformio`` @@ -769,21 +769,21 @@ PlatformIO 2.0 * Updated Arduino core for Espressif platform to 2.1.0 (`issue #544 `_) * Added support for the ESP8266 ESP-07 board to - `Espressif `__ + `Espressif `__ (`issue #527 `_) * Improved handling of String-based ``CPPDEFINES`` passed to extra ``build_flags`` (`issue #526 `_) * Generate appropriate project for CLion IDE and CVS (`issue #523 `_) -* Use ``src_dir`` directory from `Project Configuration File platformio.ini `__ +* Use ``src_dir`` directory from `Project Configuration File platformio.ini `__ when initializing project otherwise create base ``src`` directory (`issue #536 `_) * Fixed issue with incorrect handling of user's build flags where the base flags were passed after user's flags to GCC compiler (`issue #528 `_) * Fixed issue with Project Generator when optional build flags were passed using - system environment variables: `PLATFORMIO_BUILD_FLAGS `__ - or `PLATFORMIO_BUILD_SRC_FLAGS `__ + system environment variables: `PLATFORMIO_BUILD_FLAGS `__ + or `PLATFORMIO_BUILD_SRC_FLAGS `__ * Fixed invalid detecting of compiler type (`issue #550 `_) * Fixed issue with updating package which was deleted manually by user @@ -796,18 +796,18 @@ PlatformIO 2.0 * Added support for the new ESP8266-based boards (ESPDuino, ESP-WROOM-02, ESPresso Lite 1.0 & 2.0, SparkFun ESP8266 Thing Dev, ThaiEasyElec ESPino) to - `Espressif `__ + `Espressif `__ development platform -* Added ``board_f_flash`` option to `Project Configuration File platformio.ini `__ - which allows to specify `custom flash chip frequency `_ +* Added ``board_f_flash`` option to `Project Configuration File platformio.ini `__ + which allows to specify `custom flash chip frequency `_ for Espressif development platform (`issue #501 `_) -* Added ``board_flash_mode`` option to `Project Configuration File platformio.ini `__ - which allows to specify `custom flash chip mode `_ +* Added ``board_flash_mode`` option to `Project Configuration File platformio.ini `__ + which allows to specify `custom flash chip mode `_ for Espressif development platform * Handle new environment variables - `PLATFORMIO_UPLOAD_PORT `_ - and `PLATFORMIO_UPLOAD_FLAGS `_ + `PLATFORMIO_UPLOAD_PORT `_ + and `PLATFORMIO_UPLOAD_FLAGS `_ (`issue #518 `_) * Fixed issue with ``CPPDEFINES`` which contain space and break PlatformIO IDE Linter @@ -843,19 +843,19 @@ PlatformIO 2.0 2.8.0 (2016-01-29) ~~~~~~~~~~~~~~~~~~ -* `PlatformIO IDE `_ for +* `PlatformIO IDE `_ for Atom (`issue #470 `_) * Added ``pio`` command line alias for ``platformio`` command (`issue #447 `_) * Added SPL-Framework support for Nucleo F401RE board (`issue #453 `_) -* Added ``upload_resetmethod`` option to `Project Configuration File platformio.ini `__ - which allows to specify `custom upload reset method `_ +* Added ``upload_resetmethod`` option to `Project Configuration File platformio.ini `__ + which allows to specify `custom upload reset method `_ for Espressif development platform (`issue #444 `_) * Allowed to force output of color ANSI-codes or to disable progress bar even - if the output is a ``pipe`` (not a ``tty``) using `Environment variables `__ + if the output is a ``pipe`` (not a ``tty``) using `Environment variables `__ (`issue #465 `_) * Set 1Mb SPIFFS for Espressif boards by default (`issue #458 `_) @@ -870,7 +870,7 @@ PlatformIO 2.0 * Initial support for Arduino Zero board (`issue #356 `_) * Added support for completions to Atom text editor using ``.clang_complete`` -* Generate default targets for `supported IDE `__ +* Generate default targets for `supported IDE `__ (CLion, Eclipse IDE, Emacs, Sublime Text, VIM): Build, Clean, Upload, Upload SPIFFS image, Upload using Programmer, Update installed platforms and libraries @@ -900,12 +900,12 @@ PlatformIO 2.0 (`issue #403 `_) * Added support for RFDuino (`issue #319 `_) -* Project generator for `Emacs `__ +* Project generator for `Emacs `__ text editor (`pull #404 `_) * Updated Arduino framework for Atmel AVR development platform to 1.6.7 * Documented `firmware uploading for Atmel AVR development platform using - Programmers `_: + Programmers `_: AVR ISP, AVRISP mkII, USBtinyISP, USBasp, Parallel Programmer and Arduino as ISP * Fixed issue with current Python interpreter for Python-based tools (`issue #417 `_) @@ -931,13 +931,13 @@ PlatformIO 2.0 * 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 `__ + `Espressif `__ development platform * Created public `platformio-pkg-ldscripts `_ repository for LD scripts. Moved common configuration for ESP8266 MCU to ``esp8266.flash.common.ld`` (`issue #379 `_) -* Improved documentation for `Espressif `__ +* Improved documentation for `Espressif `__ development platform: OTA update, custom Flash Size, Upload Speed and CPU frequency * Fixed reset method for Espressif NodeMCU (ESP-12E Module) @@ -954,17 +954,17 @@ PlatformIO 2.0 * Install only required packages depending on build environment (`issue #308 `_) -* Added support for Raspberry Pi `WiringPi `__ +* Added support for Raspberry Pi `WiringPi `__ framework (`issue #372 `_) -* Implemented Over The Air (OTA) upgrades for `Espressif `__ +* Implemented Over The Air (OTA) upgrades for `Espressif `__ development platform. (`issue #365 `_) -* Updated `CMSIS framework `__ +* Updated `CMSIS framework `__ and added CMSIS support for Nucleo F401RE board (`issue #373 `_) * Added support for Espressif ESP8266 ESP-01-1MB board (ready for OTA) -* Handle ``upload_flags`` option in `platformio.ini `__ +* Handle ``upload_flags`` option in `platformio.ini `__ (`issue #368 `_) * Improved PlatformIO installation on the Mac OS X El Capitan @@ -972,13 +972,13 @@ PlatformIO 2.0 ~~~~~~~~~~~~~~~~~~ * Improved code builder for parallel builds (up to 4 times faster than before) -* Generate `.travis.yml `__ +* Generate `.travis.yml `__ CI and `.gitignore` files for embedded projects by default (`issue #354 `_) -* Removed prompt with "auto-uploading" from `platformio init `__ +* Removed prompt with "auto-uploading" from `platformio init `__ command and added ``--enable-auto-uploading`` option (`issue #352 `_) -* Fixed incorrect behaviour of `platformio serialports monitor `__ +* Fixed incorrect behaviour of `platformio serialports monitor `__ in pair with PySerial 3.0 2.4.1 (2015-12-01) @@ -995,7 +995,7 @@ PlatformIO 2.0 * Updated Arduino core for Espressif platform to 2.0.0 (`issue #345 `_) * Added to FAQ explanation of `Can not compile a library that compiles without issue - with Arduino IDE `_ + with Arduino IDE `_ (`issue #331 `_) * Fixed ESP-12E flash size (`pull #333 `_) @@ -1008,7 +1008,7 @@ PlatformIO 2.0 2.3.5 (2015-11-18) ~~~~~~~~~~~~~~~~~~ -* Added support of `libOpenCM3 `_ +* Added support of `libOpenCM3 `_ framework for Nucleo F103RB board (`issue #309 `_) * Added support for Espressif ESP8266 ESP-12E board (NodeMCU) @@ -1017,13 +1017,13 @@ PlatformIO 2.0 (`issue #307 `_) * Updated Arduino AVR/SAM frameworks to 1.6.6 (`issue #321 `_) -* Upload firmware using external programmer via `platformio run --target program `__ +* Upload firmware using external programmer via `platformio run --target program `__ target (`issue #311 `_) * Fixed handling of upload port when ``board`` option is not specified in - `platformio.ini `__ + `platformio.ini `__ (`issue #313 `_) -* Fixed firmware uploading for `nordicrf51 `__ +* Fixed firmware uploading for `nordicrf51 `__ development platform (`issue #316 `_) * Fixed installation on Mac OS X El Capitan @@ -1039,18 +1039,18 @@ PlatformIO 2.0 2.3.4 (2015-10-13) ~~~~~~~~~~~~~~~~~~ -* Full support of `CLion IDE `_ +* Full support of `CLion IDE `_ including code auto-completion (`issue #132 `_) -* PlatformIO `command completion in Terminal `_ for ``bash`` and ``zsh`` +* PlatformIO `command completion in Terminal `_ for ``bash`` and ``zsh`` * Added support for ubIQio Ardhat board (`pull #302 `_) * Install SCons automatically and avoid ``error: option --single-version-externally-managed not recognized`` (`issue #279 `_) * Use Teensy CLI Loader for upload of .hex files on Mac OS X (`issue #306 `_) -* Fixed missing `framework-mbed `_ - package for `teensy `_ +* Fixed missing `framework-mbed `_ + package for `teensy `_ platform (`issue #305 `_) @@ -1072,7 +1072,7 @@ PlatformIO 2.0 * Allowed to use ST-Link uploader for mbed-based projects * Explained how to use ``lib`` directory from the PlatformIO based project in ``readme.txt`` which will be automatically generated using - `platformio init `__ + `platformio init `__ command (`issue #273 `_) * Found solution for "pip/scons error: option --single-version-externally-managed not @@ -1085,44 +1085,44 @@ PlatformIO 2.0 2.3.1 (2015-09-06) ~~~~~~~~~~~~~~~~~~ -* Fixed critical issue when `platformio init --ide `__ command hangs PlatformIO +* Fixed critical issue when `platformio init --ide `__ command hangs PlatformIO (`issue #283 `_) 2.3.0 (2015-09-05) ~~~~~~~~~~~~~~~~~~ * Added - `native `__, - `linux_arm `__, - `linux_i686 `__, - `linux_x86_64 `__, - `windows_x86 `__ + `native `__, + `linux_arm `__, + `linux_i686 `__, + `linux_x86_64 `__, + `windows_x86 `__ development platforms (`issue #263 `_) -* Added `PlatformIO Demo `_ +* Added `PlatformIO Demo `_ page to documentation -* Simplified `installation `__ +* Simplified `installation `__ process of PlatformIO (`issue #274 `_) -* Significantly improved `Project Generator `__ which allows to integrate with `the most popular - IDE `__ +* Significantly improved `Project Generator `__ which allows to integrate with `the most popular + IDE `__ * Added short ``-h`` help option for PlatformIO and sub-commands -* Updated `mbed `__ +* Updated `mbed `__ framework -* Updated ``tool-teensy`` package for `Teensy `__ +* Updated ``tool-teensy`` package for `Teensy `__ platform (`issue #268 `_) -* Added FAQ answer when `Program "platformio" not found in PATH `_ +* Added FAQ answer when `Program "platformio" not found in PATH `_ (`issue #272 `_) * Generate "readme.txt" for project "lib" directory (`issue #273 `_) * Use toolchain's includes pattern ``include*`` for Project Generator (`issue #277 `_) * Added support for Adafruit Gemma board to - `atmelavr `__ + `atmelavr `__ platform (`pull #256 `_) -* Fixed includes list for Windows OS when generating project for `Eclipse IDE `__ +* Fixed includes list for Windows OS when generating project for `Eclipse IDE `__ (`issue #270 `_) * Fixed ``AttributeError: 'module' object has no attribute 'packages'`` (`issue #252 `_) @@ -1130,15 +1130,15 @@ PlatformIO 2.0 2.2.2 (2015-07-30) ~~~~~~~~~~~~~~~~~~ -* Integration with `Atom IDE `__ +* Integration with `Atom IDE `__ * Support for off-line/unpublished/private libraries (`issue #260 `_) * Disable project auto-clean while building/uploading firmware using - `platformio run --disable-auto-clean `_ option + `platformio run --disable-auto-clean `_ option (`issue #255 `_) -* Show internal errors from "Miniterm" using `platformio serialports monitor `__ command +* Show internal errors from "Miniterm" using `platformio serialports monitor `__ command (`issue #257 `_) -* Fixed `platformio serialports monitor --help `__ information with HEX char for hotkeys +* Fixed `platformio serialports monitor --help `__ information with HEX char for hotkeys (`issue #253 `_) * Handle "OSError: [Errno 13] Permission denied" for PlatformIO installer script (`issue #254 `_) @@ -1146,35 +1146,35 @@ PlatformIO 2.0 2.2.1 (2015-07-17) ~~~~~~~~~~~~~~~~~~ -* Project generator for `CLion IDE `__ +* Project generator for `CLion IDE `__ (`issue #132 `_) -* Updated ``tool-bossac`` package to 1.5 version for `atmelsam `__ platform +* Updated ``tool-bossac`` package to 1.5 version for `atmelsam `__ platform (`issue #251 `_) -* Updated ``sdk-esp8266`` package for `espressif `__ platform -* Fixed incorrect arguments handling for `platformio serialports monitor `_ command +* Updated ``sdk-esp8266`` package for `espressif `__ platform +* Fixed incorrect arguments handling for `platformio serialports monitor `_ command (`issue #248 `_) 2.2.0 (2015-07-01) ~~~~~~~~~~~~~~~~~~ * Allowed to exclude/include source files from build process using - `src_filter `__ + `src_filter `__ (`issue #240 `_) * Launch own extra script before firmware building/uploading processes (`issue #239 `_) * Specify own path to the linker script (ld) using - `build_flags `__ + `build_flags `__ option (`issue #233 `_) * Specify library compatibility with the all platforms/frameworks using ``*`` symbol in - `library.json `__ + `library.json `__ * Added support for new embedded boards: *ST 32L0538DISCOVERY and Delta DFCM-NNN40* - to `Framework mbed `__ + to `Framework mbed `__ * Updated packages for - `Framework Arduino (AVR, SAM, Espressif and Teensy cores `__, - `Framework mbed `__, - `Espressif ESP8266 SDK `__ + `Framework Arduino (AVR, SAM, Espressif and Teensy cores `__, + `Framework mbed `__, + `Espressif ESP8266 SDK `__ (`issue #246 `_) * Fixed ``stk500v2_command(): command failed`` (`issue #238 `_) @@ -1202,19 +1202,19 @@ PlatformIO 2.0 2.1.0 (2015-06-03) ~~~~~~~~~~~~~~~~~~ -* Added Silicon Labs EFM32 `siliconlabsefm32 `_ +* Added Silicon Labs EFM32 `siliconlabsefm32 `_ development platform (`issue #226 `_) * Integrate PlatformIO with `Circle CI `_ and `Shippable CI `_ -* Described in documentation how to `create/register own board `_ for PlatformIO +* Described in documentation how to `create/register own board `_ for PlatformIO * Disabled "nano.specs" for ARM-based platforms (`issue #219 `_) * Fixed "ConnectionError" when PlatformIO SF Storage is off-line * Fixed resolving of C/C++ std libs by Eclipse IDE (`issue #220 `_) * Fixed firmware uploading using USB programmer (USBasp) for - `atmelavr `_ + `atmelavr `_ platform (`issue #221 `_) @@ -1227,16 +1227,16 @@ PlatformIO 2.0 ~~~~~~~~~~~~~~~~~~ * Handle new environment variable - `PLATFORMIO_BUILD_FLAGS `_ + `PLATFORMIO_BUILD_FLAGS `_ * Pass to API requests information about Continuous Integration system. This information will be used by PlatformIO-API. * Use ``include`` directories from toolchain when initialising project for IDE (`issue #210 `_) * Added support for new WildFire boards from `Wicked Device `_ to - `atmelavr `__ + `atmelavr `__ platform -* Updated `Arduino Framework `__ to +* Updated `Arduino Framework `__ to 1.6.4 version (`issue #212 `_) * Handle Atmel AVR Symbols when initialising project for IDE (`issue #216 `_) @@ -1249,7 +1249,7 @@ PlatformIO 2.0 *Made in* `Paradise `_ -* PlatformIO as `Continuous Integration `_ +* PlatformIO as `Continuous Integration `_ (CI) tool for embedded projects (`issue #108 `_) * Initialise PlatformIO project for the specified IDE @@ -1262,29 +1262,29 @@ PlatformIO 2.0 * Global ``-f, --force`` option which will force to accept any confirmation prompts (`issue #152 `_) -* Run project with `platformio run --project-dir `_ option without changing the current working +* Run project with `platformio run --project-dir `_ option without changing the current working directory (`issue #192 `_) -* Control verbosity of `platformio run `_ command via ``-v/--verbose`` option +* Control verbosity of `platformio run `_ command via ``-v/--verbose`` option * Add library dependencies for build environment using - `lib_install `_ + `lib_install `_ option in ``platformio.ini`` (`issue #134 `_) * Specify libraries which are compatible with build environment using - `lib_use `_ + `lib_use `_ option in ``platformio.ini`` (`issue #148 `_) * Add more boards to PlatformIO project with - `platformio init --board `__ + `platformio init --board `__ command (`issue #167 `_) * Choose which library to update (`issue #168 `_) -* Specify `platformio init --env-prefix `__ when initialise/update project +* Specify `platformio init --env-prefix `__ when initialise/update project (`issue #182 `_) * Added new Armstrap boards (`issue #204 `_) -* Updated SDK for `espressif `__ +* Updated SDK for `espressif `__ development platform to v1.1 (`issue #179 `_) * Disabled automatic updates by default for platforms, packages and libraries @@ -1301,7 +1301,7 @@ PlatformIO 1.0 * Added support of `Framework mbed `_ for Teensy 3.1 (`issue #183 `_) -* Added GDB as alternative uploader to `ststm32 `__ platform +* Added GDB as alternative uploader to `ststm32 `__ platform (`issue #175 `_) * Added `examples `__ with preconfigured IDE projects @@ -1321,22 +1321,22 @@ PlatformIO 1.0 1.4.0 (2015-04-11) ~~~~~~~~~~~~~~~~~~ -* Added `espressif `_ +* Added `espressif `_ development platform with ESP01 board * Integrated PlatformIO with AppVeyor Windows based Continuous Integration system (`issue #149 `_) * Added support for Teensy LC board to - `teensy `__ + `teensy `__ platform * Added support for new Arduino based boards by *SparkFun, BQ, LightUp, LowPowerLab, Quirkbot, RedBearLab, TinyCircuits* to - `atmelavr `__ + `atmelavr `__ platform -* Upgraded `Arduino Framework `__ to +* Upgraded `Arduino Framework `__ to 1.6.3 version (`issue #156 `_) -* Upgraded `Energia Framework `__ to +* Upgraded `Energia Framework `__ to 0101E0015 version (`issue #146 `_) -* Upgraded `Arduino Framework with Teensy Core `_ +* Upgraded `Arduino Framework with Teensy Core `_ to 1.22 version (`issue #162 `_, `issue #170 `_) @@ -1351,12 +1351,12 @@ PlatformIO 1.0 account to `PlatformIO Organisation `_ (`issue #138 `_) * Added support for new Arduino based boards by *SparkFun, RepRap, Sanguino* to - `atmelavr `__ + `atmelavr `__ platform (`issue #127 `_, `issue #131 `_) -* Added integration instructions for `Visual Studio `_ - and `Sublime Text `_ IDEs +* Added integration instructions for `Visual Studio `_ + and `Sublime Text `_ IDEs * Improved handling of multi-file ``*.ino/pde`` sketches (`issue #130 `_) * Fixed wrong insertion of function prototypes converting ``*.ino/pde`` @@ -1368,31 +1368,31 @@ PlatformIO 1.0 1.2.0 (2015-03-20) ~~~~~~~~~~~~~~~~~~ -* Added full support of `mbed `__ +* Added full support of `mbed `__ framework including libraries: *RTOS, Ethernet, DSP, FAT, USB*. -* Added `freescalekinetis `_ +* Added `freescalekinetis `_ development platform with Freescale Kinetis Freedom boards -* Added `nordicnrf51 `_ +* Added `nordicnrf51 `_ development platform with supported boards from *JKSoft, Nordic, RedBearLab, Switch Science* -* Added `nxplpc `_ +* Added `nxplpc `_ development platform with supported boards from *CQ Publishing, Embedded Artists, NGX Technologies, NXP, Outrageous Circuits, SeeedStudio, Solder Splash Labs, Switch Science, u-blox* * Added support for *ST Nucleo* boards to - `ststm32 `__ + `ststm32 `__ development platform -* Created new `Frameworks `__ +* Created new `Frameworks `__ page in documentation and added to `PlatformIO Web Site `_ (`issue #115 `_) * Introduced online `Embedded Boards Explorer `_ * Automatically append define ``-DPLATFORMIO=%version%`` to builder (`issue #105 `_) * Renamed ``stm32`` development platform to - `ststm32 `__ + `ststm32 `__ * Renamed ``opencm3`` framework to - `libopencm3 `__ -* Fixed uploading for `atmelsam `__ + `libopencm3 `__ +* Fixed uploading for `atmelsam `__ development platform * Fixed re-arranging the ``*.ino/pde`` files when converting to ``*.cpp`` (`issue #100 `_) @@ -1403,15 +1403,15 @@ PlatformIO 1.0 * Implemented ``PLATFORMIO_*`` environment variables (`issue #102 `_) * Added support for *SainSmart* boards to - `atmelsam `__ + `atmelsam `__ development platform * Added - `Project Configuration `__ - option named `envs_dir `__ + `Project Configuration `__ + option named `envs_dir `__ * Disabled "prompts" automatically for *Continuous Integration* systems (`issue #103 `_) * Fixed firmware uploading for - `atmelavr `__ + `atmelavr `__ boards which work within ``usbtiny`` protocol * Fixed uploading for *Digispark* board (`issue #106 `_) @@ -1424,26 +1424,26 @@ PlatformIO 1.0 * Added support for *ARM*-based credit-card sized computers: `Raspberry Pi `_, `BeagleBone `_ and `CubieBoard `_ -* Added `atmelsam `__ +* Added `atmelsam `__ development platform with supported boards: *Arduino Due and Digistump DigiX* (`issue #71 `_) -* Added `ststm32 `__ +* Added `ststm32 `__ development platform with supported boards: *Discovery kit for STM32L151/152, STM32F303xx, STM32F407/417 lines* and `libOpenCM3 Framework `_ (`issue #73 `_) -* Added `teensy `_ +* Added `teensy `_ development platform with supported boards: *Teensy 2.x & 3.x* (`issue #72 `_) * Added new *Arduino* boards to - `atmelavr `__ + `atmelavr `__ platform: *Arduino NG, Arduino BT, Arduino Esplora, Arduino Ethernet, Arduino Robot Control, Arduino Robot Motor and Arduino Yun* * Added support for *Adafruit* boards to - `atmelavr `__ + `atmelavr `__ platform: *Adafruit Flora and Adafruit Trinkets* (`issue #65 `_) * Added support for *Digispark* boards to - `atmelavr `__ + `atmelavr `__ platform: *Digispark USB Development Board and Digispark Pro* (`issue #47 `_) * Covered code with tests (`issue #2 `_) @@ -1451,24 +1451,24 @@ PlatformIO 1.0 `#48 `_, `#50 `_, `#55 `_) -* Added `src_dir `__ +* Added `src_dir `__ option to ``[platformio]`` section of - `platformio.ini `__ + `platformio.ini `__ which allows to redefine location to project's source directory (`issue #83 `_) * Added ``--json-output`` option to - `platformio boards `__ - and `platformio search `__ + `platformio boards `__ + and `platformio search `__ commands which allows to return the output in `JSON `_ format (`issue #42 `_) * Allowed to ignore some libs from *Library Dependency Finder* via - `lib_ignore `_ option -* Improved `platformio run `__ + `lib_ignore `_ option +* Improved `platformio run `__ command: asynchronous output for build process, timing and detailed information about environment configuration (`issue #74 `_) * Output compiled size and static memory usage with - `platformio run `__ + `platformio run `__ command (`issue #59 `_) * Updated `framework-arduino` AVR & SAM to 1.6 stable version * Fixed an issue with the libraries that are git repositories @@ -1492,19 +1492,19 @@ PlatformIO 0.0 * Fixed an issue with ``--json-output`` (`issue #42 `_) * Fixed an exception during - `platformio upgrade `__ + `platformio upgrade `__ under Windows OS (`issue #45 `_) 0.10.1 (2015-01-02) ~~~~~~~~~~~~~~~~~~~ * Added ``--json-output`` option to - `platformio list `__, - `platformio serialports list `__ and - `platformio lib list `__ + `platformio list `__, + `platformio serialports list `__ and + `platformio lib list `__ commands which allows to return the output in `JSON `_ format (`issue #42 `_) -* Fixed missing auto-uploading by default after `platformio init `__ +* Fixed missing auto-uploading by default after `platformio init `__ command 0.10.0 (2015-01-01) @@ -1512,19 +1512,19 @@ PlatformIO 0.0 **Happy New Year!** -* Implemented `platformio boards `_ +* Implemented `platformio boards `_ command (`issue #11 `_) * Added support of *Engduino* boards for - `atmelavr `__ + `atmelavr `__ platform (`issue #38 `_) -* Added ``--board`` option to `platformio init `__ +* Added ``--board`` option to `platformio init `__ command which allows to initialise project with the specified embedded boards (`issue #21 `_) -* Added `example with uploading firmware `_ +* Added `example with uploading firmware `_ via USB programmer (USBasp) for - `atmelavr `_ + `atmelavr `_ *MCUs* (`issue #35 `_) -* Automatic detection of port on `platformio serialports monitor `_ +* Automatic detection of port on `platformio serialports monitor `_ (`issue #37 `_) * Allowed auto-installation of platforms when prompts are disabled (`issue #43 `_) * Fixed urllib3's *SSL* warning under Python <= 2.7.2 (`issue #39 `_) @@ -1542,11 +1542,11 @@ PlatformIO 0.0 ~~~~~~~~~~~~~~~~~~ * Ask user to install platform (when it hasn't been installed yet) within - `platformio run `__ - and `platformio show `_ commands -* Improved main `documentation `_ + `platformio run `__ + and `platformio show `_ commands +* Improved main `documentation `_ * Fixed "*OSError: [Errno 2] No such file or directory*" within - `platformio run `__ + `platformio run `__ command when PlatformIO isn't installed properly * Fixed example for Eclipse IDE with Tiva board (`issue #32 `_) @@ -1556,8 +1556,8 @@ PlatformIO 0.0 0.9.0 (2014-12-01) ~~~~~~~~~~~~~~~~~~ -* Implemented `platformio settings `_ command -* Improved `platformio init `_ command. +* Implemented `platformio settings `_ command +* Improved `platformio init `_ command. Added new option ``--project-dir`` where you can specify another path to directory where new project will be initialized (`issue #31 `_) * Added *Migration Manager* which simplifies process with upgrading to a @@ -1574,18 +1574,18 @@ PlatformIO 0.0 0.8.0 (2014-10-19) ~~~~~~~~~~~~~~~~~~ -* Avoided trademark issues in `library.json `_ - with the new fields: `frameworks `_, - `platforms `_ - and `dependencies `_ +* Avoided trademark issues in `library.json `_ + with the new fields: `frameworks `_, + `platforms `_ + and `dependencies `_ (`issue #17 `_) * Switched logic from "Library Name" to "Library Registry ID" for all - `platformio lib `_ + `platformio lib `_ commands (install, uninstall, update and etc.) -* Renamed ``author`` field to `authors `_ - and allowed to setup multiple authors per library in `library.json `_ -* Added option to specify "maintainer" status in `authors `_ field -* New filters/options for `platformio lib search `_ +* Renamed ``author`` field to `authors `_ + and allowed to setup multiple authors per library in `library.json `_ +* Added option to specify "maintainer" status in `authors `_ field +* New filters/options for `platformio lib search `_ command: ``--framework`` and ``--platform`` 0.7.1 (2014-10-06) @@ -1599,15 +1599,15 @@ PlatformIO 0.0 0.7.0 (2014-09-24) ~~~~~~~~~~~~~~~~~~ -* Implemented new `[platformio] `_ - section for Configuration File with `home_dir `_ +* Implemented new `[platformio] `_ + section for Configuration File with `home_dir `_ option (`issue #14 `_) * Implemented *Library Manager* (`issue #6 `_) 0.6.0 (2014-08-09) ~~~~~~~~~~~~~~~~~~ -* Implemented `platformio serialports monitor `_ (`issue #10 `_) +* Implemented `platformio serialports monitor `_ (`issue #10 `_) * Fixed an issue ``ImportError: No module named platformio.util`` (`issue #9 `_) * Fixed bug with auto-conversation from Arduino \*.ino to \*.cpp @@ -1620,7 +1620,7 @@ PlatformIO 0.0 frameworks (`issue #7 `_) * Added `Arduino example `_ with external library (*Adafruit CC3000*) -* Implemented `platformio upgrade `_ +* Implemented `platformio upgrade `_ command and "auto-check" for the latest version (`issue #8 `_) * Fixed an issue with "auto-reset" for *Raspduino* board @@ -1629,21 +1629,21 @@ PlatformIO 0.0 0.4.0 (2014-07-31) ~~~~~~~~~~~~~~~~~~ -* Implemented `platformio serialports `_ command +* Implemented `platformio serialports `_ command * Allowed to put special build flags only for ``src`` files via - `src_build_flags `_ + `src_build_flags `_ environment option * Allowed to override some of settings via system environment variables such as: ``PLATFORMIO_SRC_BUILD_FLAGS`` and ``PLATFORMIO_ENVS_DIR`` -* Added ``--upload-port`` option for `platformio run `__ command +* Added ``--upload-port`` option for `platformio run `__ command * Implemented (especially for `SmartAnthill `_) - `platformio run -t uploadlazy `_ + `platformio run -t uploadlazy `_ target (no dependencies to framework libs, ELF and etc.) -* Allowed to skip default packages via `platformio install --skip-default-package `_ +* Allowed to skip default packages via `platformio install --skip-default-package `_ option * Added tools for *Raspberry Pi* platform * Added support for *Microduino* and *Raspduino* boards in - `atmelavr `_ platform + `atmelavr `_ platform 0.3.1 (2014-06-21) ~~~~~~~~~~~~~~~~~~ diff --git a/README.rst b/README.rst index cbbf0cc1..b2f2fc6a 100644 --- a/README.rst +++ b/README.rst @@ -24,7 +24,7 @@ PlatformIO `PIO Plus `_ | `PlatformIO IDE `_ | `Project Examples `_ | -`Docs `_ | +`Docs `_ | `Donate `_ | `Contact Us `_ @@ -45,26 +45,26 @@ firmware updates. Get Started ----------- -* `What is PlatformIO? `_ +* `What is PlatformIO? `_ Open Source ----------- * `PlatformIO IDE `_ -* `PlatformIO Core (CLI) `_ -* `Library Management `_ +* `PlatformIO Core (CLI) `_ +* `Library Management `_ * `Project Examples `_ -* `Desktop IDEs Integration `_ -* `Continuous Integration `_ -* `Advanced Scripting API `_ +* `Desktop IDEs Integration `_ +* `Continuous Integration `_ +* `Advanced Scripting API `_ PIO Plus -------- -* `PIO Remote `_ -* `PIO Unified Debugger `_ -* `PIO Unit Testing `_ -* `Cloud IDEs Integration `_ +* `PIO Remote `_ +* `PIO Unified Debugger `_ +* `PIO Unit Testing `_ +* `Cloud IDEs Integration `_ * `Integration Services `_ Registry diff --git a/docs b/docs index 042e123c..cde09707 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 042e123ca1d8365be0f5bed1bde684c5478bde31 +Subproject commit cde097074fdc6cc394f8fc619c01f9f933893080 diff --git a/examples b/examples index 40bdd9e1..caae30b6 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit 40bdd9e1b4829d37923438d76378d9e3eb7584ca +Subproject commit caae30b64ab84daf74b2f1623ccbe708e7c927d9 diff --git a/platformio/__main__.py b/platformio/__main__.py index 85cbd401..1697b9d5 100644 --- a/platformio/__main__.py +++ b/platformio/__main__.py @@ -135,7 +135,7 @@ An unexpected error occurred. Further steps: `pip install -U platformio` command * Try to find answer in FAQ Troubleshooting section - http://docs.platformio.org/page/faq.html + https://docs.platformio.org/page/faq.html * Report this problem to the developers https://github.com/platformio/platformio-core/issues diff --git a/platformio/app.py b/platformio/app.py index 6ace78ed..d4043164 100644 --- a/platformio/app.py +++ b/platformio/app.py @@ -63,7 +63,7 @@ DEFAULT_SETTINGS = { }, "enable_telemetry": { "description": - ("Telemetry service (Yes/No)"), "value": True diff --git a/platformio/builder/main.py b/platformio/builder/main.py index bd2af7e4..6beb92fb 100644 --- a/platformio/builder/main.py +++ b/platformio/builder/main.py @@ -210,5 +210,5 @@ if "idedata" in COMMAND_LINE_TARGETS: "\nUnicodeDecodeError: Non-ASCII characters found in build " "environment\n" "See explanation in FAQ > Troubleshooting > Building\n" - "http://docs.platformio.org/page/faq.html\n\n") + "https://docs.platformio.org/page/faq.html\n\n") env.Exit(1) diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index 04d595b0..a777921a 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -808,7 +808,7 @@ def GetLibBuilders(env): # pylint: disable=too-many-branches if verbose and found_incompat: sys.stderr.write( "More details about \"Library Compatibility Mode\": " - "http://docs.platformio.org/page/librarymanager/ldf.html#" + "https://docs.platformio.org/page/librarymanager/ldf.html#" "ldf-compat-mode\n") DefaultEnvironment()['__PIO_LIB_BUILDERS'] = items diff --git a/platformio/builder/tools/pioupload.py b/platformio/builder/tools/pioupload.py index 8dbceaf7..4163f60c 100644 --- a/platformio/builder/tools/pioupload.py +++ b/platformio/builder/tools/pioupload.py @@ -161,7 +161,7 @@ def AutodetectUploadPort(*args, **kwargs): sys.stderr.write( "\nWarning! Please install `99-platformio-udev.rules` and " "check that your board's PID and VID are listed in the rules." - "\n http://docs.platformio.org/en/latest/faq.html" + "\n https://docs.platformio.org/en/latest/faq.html" "#platformio-udev-rules\n") env.Replace(UPLOAD_PORT=_look_for_serial_port()) diff --git a/platformio/commands/init.py b/platformio/commands/init.py index e7151287..f04abb5b 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -172,7 +172,7 @@ For example, see how can be organized `Foo` and `Bar` libraries: | | |--src | | |- Bar.c | | |- Bar.h -| | |- library.json (optional, custom build options, etc) http://docs.platformio.org/page/librarymanager/config.html +| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html | | | |--Foo | | |- Foo.c @@ -195,7 +195,7 @@ PlatformIO will find your libraries automatically, configure preprocessor's include paths and build them. More information about PlatformIO Library Dependency Finder -- http://docs.platformio.org/page/librarymanager/ldf.html +- https://docs.platformio.org/page/librarymanager/ldf.html """) @@ -205,7 +205,7 @@ def init_ci_conf(project_dir): with open(join(project_dir, ".travis.yml"), "w") as f: f.write("""# 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/page/ci/index.html > +# several times a day < https://docs.platformio.org/page/ci/index.html > # # Documentation: # @@ -213,10 +213,10 @@ def init_ci_conf(project_dir): # < https://docs.travis-ci.com/user/integration/platformio/ > # # * PlatformIO integration with Travis CI -# < http://docs.platformio.org/page/ci/travis.html > +# < https://docs.platformio.org/page/ci/travis.html > # # * User Guide for `platformio ci` command -# < http://docs.platformio.org/page/userguide/cmd_ci.html > +# < https://docs.platformio.org/page/userguide/cmd_ci.html > # # # Please choice one of the following templates (proposed below) and uncomment diff --git a/platformio/commands/lib.py b/platformio/commands/lib.py index 826cd344..358cff08 100644 --- a/platformio/commands/lib.py +++ b/platformio/commands/lib.py @@ -228,7 +228,7 @@ def lib_search(query, json_output, page, noninteractive, **filters): click.echo("For more examples and advanced search syntax, " "please use documentation:") click.secho( - "http://docs.platformio.org/page/userguide/lib/cmd_search.html\n", + "https://docs.platformio.org/page/userguide/lib/cmd_search.html\n", fg="cyan") return diff --git a/platformio/commands/upgrade.py b/platformio/commands/upgrade.py index 019643b3..7f415ad6 100644 --- a/platformio/commands/upgrade.py +++ b/platformio/commands/upgrade.py @@ -63,7 +63,7 @@ def cli(dev): fg="green") click.echo("Release notes: ", nl=False) click.secho( - "http://docs.platformio.org/en/latest/history.html", fg="cyan") + "https://docs.platformio.org/en/latest/history.html", fg="cyan") except Exception as e: # pylint: disable=broad-except if not r: raise exception.UpgradeError("\n".join([str(cmd), str(e)])) diff --git a/platformio/exception.py b/platformio/exception.py index 8a1b43fc..1ae6e2c3 100644 --- a/platformio/exception.py +++ b/platformio/exception.py @@ -241,7 +241,7 @@ class UpgradeError(PlatformioException): * Upgrade using `pip install -U platformio` * Try different installation/upgrading steps: - http://docs.platformio.org/page/installation.html + https://docs.platformio.org/page/installation.html """ @@ -265,7 +265,7 @@ class DebugSupportError(PlatformioException): MESSAGE = ("Currently, PlatformIO does not support debugging for `{0}`.\n" "Please contact support@pioplus.com or visit " - "< http://docs.platformio.org/page/plus/debugging.html >") + "< https://docs.platformio.org/page/plus/debugging.html >") class DebugInvalidOptions(PlatformioException): diff --git a/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl b/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl index b98a0a3f..2497f743 100644 --- a/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl +++ b/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl @@ -1,5 +1,5 @@ { - "!!! WARNING !!!": "PLEASE DO NOT MODIFY THIS FILE! USE http://docs.platformio.org/page/projectconf/section_env_build.html#build-flags", + "!!! WARNING !!!": "PLEASE DO NOT MODIFY THIS FILE! USE https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags", "configurations": [ { % import platform diff --git a/platformio/ide/tpls/vscode/.vscode/launch.json.tpl b/platformio/ide/tpls/vscode/.vscode/launch.json.tpl index 8dbc503b..787e5a58 100644 --- a/platformio/ide/tpls/vscode/.vscode/launch.json.tpl +++ b/platformio/ide/tpls/vscode/.vscode/launch.json.tpl @@ -2,8 +2,8 @@ // PIO Unified Debugger // -// Documentation: http://docs.platformio.org/page/plus/debugging.html -// Configuration: http://docs.platformio.org/page/projectconf/section_env_debug.html +// Documentation: https://docs.platformio.org/page/plus/debugging.html +// Configuration: https://docs.platformio.org/page/projectconf/section_env_debug.html % from os.path import dirname, join % diff --git a/platformio/maintenance.py b/platformio/maintenance.py index 7b1a5f58..2a1bf474 100644 --- a/platformio/maintenance.py +++ b/platformio/maintenance.py @@ -179,7 +179,7 @@ def after_upgrade(ctx): click.secho( "Please remove multiple PIO Cores from a system:", fg="yellow") click.secho( - "http://docs.platformio.org/page/faq.html" + "https://docs.platformio.org/page/faq.html" "#multiple-pio-cores-in-a-system", fg="cyan") click.secho("*" * terminal_width, fg="yellow") @@ -274,7 +274,8 @@ def check_platformio_upgrade(): click.secho("pip install -U platformio", fg="cyan", nl=False) click.secho("` command.", fg="yellow") click.secho("Changes: ", fg="yellow", nl=False) - click.secho("http://docs.platformio.org/en/latest/history.html", fg="cyan") + click.secho( + "https://docs.platformio.org/en/latest/history.html", fg="cyan") click.echo("*" * terminal_width) click.echo("") diff --git a/platformio/projectconftpl.ini b/platformio/projectconftpl.ini index dae59074..ebc510b2 100644 --- a/platformio/projectconftpl.ini +++ b/platformio/projectconftpl.ini @@ -6,4 +6,4 @@ ; Advanced options: extra scripting ; ; Please visit documentation for the other options and examples -; http://docs.platformio.org/page/projectconf.html +; https://docs.platformio.org/page/projectconf.html diff --git a/platformio/util.py b/platformio/util.py index eab6512f..987e4203 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -317,7 +317,7 @@ def get_projectbuild_dir(force=False): with open(dontmod_path, "w") as fp: fp.write(""" [InternetShortcut] -URL=http://docs.platformio.org/page/projectconf/section_platformio.html#build-dir +URL=https://docs.platformio.org/page/projectconf/section_platformio.html#build-dir """) except Exception as e: # pylint: disable=broad-except if not force: diff --git a/scripts/99-platformio-udev.rules b/scripts/99-platformio-udev.rules index 15c09217..99755db1 100644 --- a/scripts/99-platformio-udev.rules +++ b/scripts/99-platformio-udev.rules @@ -16,7 +16,7 @@ # # INSTALLATION # -# Please visit > http://docs.platformio.org/en/latest/faq.html#platformio-udev-rules +# Please visit > https://docs.platformio.org/en/latest/faq.html#platformio-udev-rules # ##################################################################################### diff --git a/scripts/docspregen.py b/scripts/docspregen.py index 1647436e..bfcf814b 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -719,7 +719,7 @@ def update_project_examples(): {description} * [Home](https://platformio.org/platforms/{name}) (home page in PlatformIO Registry) -* [Documentation](http://docs.platformio.org/page/platforms/{name}.html) (advanced usage, packages, boards, frameworks, etc.) +* [Documentation](https://docs.platformio.org/page/platforms/{name}.html) (advanced usage, packages, boards, frameworks, etc.) # Examples @@ -731,7 +731,7 @@ def update_project_examples(): {description} * [Home](https://platformio.org/frameworks/{name}) (home page in PlatformIO Registry) -* [Documentation](http://docs.platformio.org/page/frameworks/{name}.html) +* [Documentation](https://docs.platformio.org/page/frameworks/{name}.html) # Examples @@ -803,7 +803,7 @@ def update_project_examples(): examples="\n".join( framework_examples_md_lines[framework['name']]))) url = campaign_url( - "http://docs.platformio.org/en/latest/frameworks/%s.html#examples" + "https://docs.platformio.org/en/latest/frameworks/%s.html#examples" % framework['name'], source="github", medium="examples") From d109e4756d9f17194df4d83e73ce85d51f2211ff Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 20 Aug 2018 19:37:34 +0300 Subject: [PATCH 008/100] Initial support for Intel MCS-51 (8051) --- README.rst | 1 + docs | 2 +- examples | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index b2f2fc6a..fa295e95 100644 --- a/README.rst +++ b/README.rst @@ -85,6 +85,7 @@ Development Platforms * `Freescale Kinetis `_ * `Infineon XMC `_ * `Intel ARC32 `_ +* `Intel MCS-51 (8051) `_ * `Lattice iCE40 `_ * `Maxim 32 `_ * `Microchip PIC32 `_ diff --git a/docs b/docs index cde09707..5b4cbb0f 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit cde097074fdc6cc394f8fc619c01f9f933893080 +Subproject commit 5b4cbb0fa3c6d81165c4eb3d2466eeb59d2926cb diff --git a/examples b/examples index caae30b6..d4cc2c65 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit caae30b64ab84daf74b2f1623ccbe708e7c927d9 +Subproject commit d4cc2c651d95bd6149fa2cabefd201194305e48e From 476a878733696703365d440650172a707419d239 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 20 Aug 2018 20:54:07 +0300 Subject: [PATCH 009/100] Skip Intel MCS-51 tests for Linux --- tests/test_examples.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_examples.py b/tests/test_examples.py index 1e873dc6..d9588956 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -36,6 +36,9 @@ def pytest_generate_tests(metafunc): p = PlatformFactory.newPlatform(manifest['__pkg_dir']) if not p.is_embedded(): continue + # issue with "version `CXXABI_1.3.9' not found (required by sdcc)" + if "linux" in util.get_systype() and p.name == "intel_mcs51": + continue examples_dir = join(p.get_dir(), "examples") assert isdir(examples_dir) examples_dirs.append(examples_dir) From 78c383eb683b05a16a82fc33957d1f52da525372 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 27 Aug 2018 18:55:08 +0300 Subject: [PATCH 010/100] Use Pre-Debug task by its VSCode defination --- platformio/ide/tpls/vscode/.vscode/launch.json.tpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platformio/ide/tpls/vscode/.vscode/launch.json.tpl b/platformio/ide/tpls/vscode/.vscode/launch.json.tpl index 787e5a58..a69d5017 100644 --- a/platformio/ide/tpls/vscode/.vscode/launch.json.tpl +++ b/platformio/ide/tpls/vscode/.vscode/launch.json.tpl @@ -23,7 +23,10 @@ % if svd_path: "svdPath": "{{ _escape_path(svd_path) }}", % end - "preLaunchTask": "PlatformIO: Pre-Debug", + "preLaunchTask": { + "type": "PlatformIO", + "task": "Pre-Debug" + }, "internalConsoleOptions": "openOnSessionStart" }, { From 8d1ff91af16f04e6740a24fe333fabb9202dcf27 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 27 Aug 2018 18:56:06 +0300 Subject: [PATCH 011/100] Bump version to 3.6.1a1 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index f86af5f0..71020921 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, 0) +VERSION = (3, 6, "1a1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From abbe30ef976c571400c1fbe766494264e773c14c Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 27 Aug 2018 19:21:12 +0300 Subject: [PATCH 012/100] Docs: Add info about drivers to the tutorial requirements // Resolve #1802 --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 5b4cbb0f..5883358f 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 5b4cbb0fa3c6d81165c4eb3d2466eeb59d2926cb +Subproject commit 5883358f770c0b7aa29fa4cd3595b17d096e2c66 From b43f243f6aab74e59705a2dcea36871e6aef4f83 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 28 Aug 2018 22:08:28 +0300 Subject: [PATCH 013/100] Sync docs --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 5883358f..d3ee70cf 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 5883358f770c0b7aa29fa4cd3595b17d096e2c66 +Subproject commit d3ee70cf98e915f99af59f4e990c1c491dd8eff9 From 6caa7f30acb163144397fed076793bf57dab9fc5 Mon Sep 17 00:00:00 2001 From: David Hasenfratz <10196569+dhasenfratz@users.noreply.github.com> Date: Thu, 30 Aug 2018 19:22:36 +0200 Subject: [PATCH 014/100] Fix typos (#1819) --- platformio/commands/init.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/platformio/commands/init.py b/platformio/commands/init.py index f04abb5b..c4900c2f 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -74,7 +74,7 @@ def cli( "\nThe current working directory", fg="yellow", nl=False) click.secho(" %s " % project_dir, fg="cyan", nl=False) click.secho( - "will be used for project.\n" + "will be used for the project.\n" "You can specify another project directory via\n" "`platformio init -d %PATH_TO_THE_PROJECT_DIR%` command.", fg="yellow") @@ -156,13 +156,13 @@ def init_lib_readme(lib_dir): return with open(join(lib_dir, "readme.txt"), "w") as f: f.write(""" -This directory is intended for the project specific (private) libraries. -PlatformIO will compile them to static libraries and link to executable file. +This directory is intended for project specific (private) libraries. +PlatformIO will compile them to static libraries and link them to executable files. -The source code of each library should be placed in separate directory, like +The source code of each library should be placed in separate directories, like "lib/private_lib/[here are source files]". -For example, see how can be organized `Foo` and `Bar` libraries: +For example, see the structure of the following two libraries `Foo` and `Bar`: |--lib | | @@ -219,7 +219,7 @@ def init_ci_conf(project_dir): # < https://docs.platformio.org/page/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose 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). # @@ -247,7 +247,7 @@ def init_ci_conf(project_dir): # -# Template #2: The project is intended to by used as a library with examples +# Template #2: The project is intended to be used as a library with examples. # # language: python From 4f0c60edfa61417778013f47ef3ba3ecb129f494 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 2 Sep 2018 19:32:45 +0300 Subject: [PATCH 015/100] Clean cache on PIO Core update --- docs | 2 +- platformio/commands/update.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs b/docs index d3ee70cf..a9a15392 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit d3ee70cf98e915f99af59f4e990c1c491dd8eff9 +Subproject commit a9a15392b2f344e73f2b0e79c5988ce3f55019bc diff --git a/platformio/commands/update.py b/platformio/commands/update.py index 65c44fac..924fb290 100644 --- a/platformio/commands/update.py +++ b/platformio/commands/update.py @@ -32,14 +32,14 @@ from platformio.managers.lib import LibraryManager help="Do not update, only check for new version") @click.pass_context def cli(ctx, core_packages, only_check): + # cleanup lib search results, cached board and platform lists + app.clean_cache() + update_core_packages(only_check) if core_packages: return - # cleanup lib search results, cached board and platform lists - app.clean_cache() - click.echo() click.echo("Platform Manager") click.echo("================") From ce47b6f69f59f1f6922c2d9c8dab70d8f39b724c Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 6 Sep 2018 01:26:08 +0300 Subject: [PATCH 016/100] Docs: update tutorials --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index a9a15392..acce4656 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit a9a15392b2f344e73f2b0e79c5988ce3f55019bc +Subproject commit acce4656728c293707c3df35ff585819e9b19f9e From f54d32843a62be19ffff35d8d41438fc7d69b8c5 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 6 Sep 2018 02:25:28 +0300 Subject: [PATCH 017/100] Add "debug" target, update docs for "uploads" option // Resolve #1833 --- HISTORY.rst | 12 ++++++++++-- docs | 2 +- platformio/builder/main.py | 1 + platformio/builder/tools/platformio.py | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index ad550843..4ea10ced 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,14 +4,22 @@ Release Notes PlatformIO 3.0 -------------- +3.6.1 (2018-??-??) +~~~~~~~~~~~~~~~~~~ + +* Build project in "Debug Mode" including debug information with a new + ``debug`` target using `platformio run `__ command or `targets `__ option in ``platformio.ini``. + The last option allows to avoid project rebuilding between "Run/Debug" modes. + (`issue #1833 `_) + 3.6.0 (2018-08-06) ~~~~~~~~~~~~~~~~~~ -* `Program Memory Usage `_ +* `Program Memory Usage `_ - Print human-readable memory usage information after a build and before uploading - Print detailed memory usage information with "sections" and "addresses" - in `verbose mode `__ + in `verbose mode `__ - Check maximum allowed "program" and "data" sizes before uploading/programming (`issue #1412 `_) diff --git a/docs b/docs index acce4656..85979eea 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit acce4656728c293707c3df35ff585819e9b19f9e +Subproject commit 85979eea2115729aa0615e1feaf5bb48b8430b76 diff --git a/platformio/builder/main.py b/platformio/builder/main.py index 6beb92fb..7093fd97 100644 --- a/platformio/builder/main.py +++ b/platformio/builder/main.py @@ -191,6 +191,7 @@ env.AddPreAction( env.VerboseAction(lambda source, target, env: env.PrintUploadInfo(), "Configuring upload protocol...")) +AlwaysBuild(env.Alias("debug", DEFAULT_TARGETS)) AlwaysBuild(env.Alias("__debug", DEFAULT_TARGETS)) AlwaysBuild(env.Alias("__test", DEFAULT_TARGETS)) diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index 4a92fb10..9346f235 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -93,7 +93,7 @@ def BuildProgram(env): if not Util.case_sensitive_suffixes(".s", ".S"): env.Replace(AS="$CC", ASCOM="$ASPPCOM") - if "__debug" in COMMAND_LINE_TARGETS: + if set(["__debug", "debug"]) & set(COMMAND_LINE_TARGETS): env.ProcessDebug() # process extra flags from board From e6e629d2c54ca014a7634469d023957289e71b05 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 6 Sep 2018 02:26:14 +0300 Subject: [PATCH 018/100] Bump version to 3.6.1a2 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 71020921..566f4db8 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, "1a1") +VERSION = (3, 6, "1a2") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From 7108b2fdd4db4d886492975fe88e945ec1f05e6f Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 6 Sep 2018 14:42:37 +0300 Subject: [PATCH 019/100] Introduce "Release" and "Debug" Build Configurations --- HISTORY.rst | 1 + docs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 4ea10ced..253ae357 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,7 @@ PlatformIO 3.0 3.6.1 (2018-??-??) ~~~~~~~~~~~~~~~~~~ +* Introduced `"Release" and "Debug" Build Configurations `__ * Build project in "Debug Mode" including debug information with a new ``debug`` target using `platformio run `__ command or `targets `__ option in ``platformio.ini``. The last option allows to avoid project rebuilding between "Run/Debug" modes. diff --git a/docs b/docs index 85979eea..5e6ae4cf 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 85979eea2115729aa0615e1feaf5bb48b8430b76 +Subproject commit 5e6ae4cf29539032a01282025a51afa5468b5633 From a477e8cb23ae115eb49eff1da04a4be4f23d5a84 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 6 Sep 2018 16:34:27 +0300 Subject: [PATCH 020/100] Default VSCode Debug configuration without Pre-Debug --- docs | 2 +- platformio/ide/tpls/vscode/.vscode/launch.json.tpl | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs b/docs index 5e6ae4cf..249e8705 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 5e6ae4cf29539032a01282025a51afa5468b5633 +Subproject commit 249e8705033fced1d028c30d6b312998dbae9c1a diff --git a/platformio/ide/tpls/vscode/.vscode/launch.json.tpl b/platformio/ide/tpls/vscode/.vscode/launch.json.tpl index a69d5017..5c485773 100644 --- a/platformio/ide/tpls/vscode/.vscode/launch.json.tpl +++ b/platformio/ide/tpls/vscode/.vscode/launch.json.tpl @@ -23,21 +23,21 @@ % if svd_path: "svdPath": "{{ _escape_path(svd_path) }}", % end - "preLaunchTask": { - "type": "PlatformIO", - "task": "Pre-Debug" - }, "internalConsoleOptions": "openOnSessionStart" }, { "type": "platformio-debug", "request": "launch", - "name": "PIO Debug (Skip Pre-Debug)", + "name": "PIO Debug (with Pre-Debug)", "executable": "{{ _escape_path(prog_path) }}", "toolchainBinDir": "{{ _escape_path(dirname(gdb_path)) }}", % if svd_path: "svdPath": "{{ _escape_path(svd_path) }}", % end + "preLaunchTask": { + "type": "PlatformIO", + "task": "Pre-Debug" + }, "internalConsoleOptions": "openOnSessionStart" } ] From 4b2a63db1f282d2342f0316ee4f49dc1d72e62f9 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 6 Sep 2018 16:35:03 +0300 Subject: [PATCH 021/100] Bump version to 3.6.1a3 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 566f4db8..b90c8857 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, "1a2") +VERSION = (3, 6, "1a3") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From b7ac59066fb9cda8f290ffda32afca020c9a72a5 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 6 Sep 2018 22:21:46 +0300 Subject: [PATCH 022/100] Revert back "PIO Debug (skip Pre-Debug)" debug configuration for VSCode --- docs | 2 +- .../ide/tpls/vscode/.vscode/launch.json.tpl | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs b/docs index 249e8705..8a149aa1 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 249e8705033fced1d028c30d6b312998dbae9c1a +Subproject commit 8a149aa19d749bde33ace0c4d6de2dc704cc55d8 diff --git a/platformio/ide/tpls/vscode/.vscode/launch.json.tpl b/platformio/ide/tpls/vscode/.vscode/launch.json.tpl index 5c485773..21e2bb41 100644 --- a/platformio/ide/tpls/vscode/.vscode/launch.json.tpl +++ b/platformio/ide/tpls/vscode/.vscode/launch.json.tpl @@ -22,23 +22,23 @@ "toolchainBinDir": "{{ _escape_path(dirname(gdb_path)) }}", % if svd_path: "svdPath": "{{ _escape_path(svd_path) }}", -% end - "internalConsoleOptions": "openOnSessionStart" - }, - { - "type": "platformio-debug", - "request": "launch", - "name": "PIO Debug (with Pre-Debug)", - "executable": "{{ _escape_path(prog_path) }}", - "toolchainBinDir": "{{ _escape_path(dirname(gdb_path)) }}", -% if svd_path: - "svdPath": "{{ _escape_path(svd_path) }}", % end "preLaunchTask": { "type": "PlatformIO", "task": "Pre-Debug" }, "internalConsoleOptions": "openOnSessionStart" + }, + { + "type": "platformio-debug", + "request": "launch", + "name": "PIO Debug (skip Pre-Debug)", + "executable": "{{ _escape_path(prog_path) }}", + "toolchainBinDir": "{{ _escape_path(dirname(gdb_path)) }}", +% if svd_path: + "svdPath": "{{ _escape_path(svd_path) }}", +% end + "internalConsoleOptions": "openOnSessionStart" } ] } \ No newline at end of file From 535048c420607d4c54a705df499e8fe7fa85107b Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 6 Sep 2018 22:26:43 +0300 Subject: [PATCH 023/100] Bump version to 3.6.1a4 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index b90c8857..1088ff94 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, "1a3") +VERSION = (3, 6, "1a4") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From e5fc18fddbf79fc8e44c354573bd5ee8c399bbe7 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 6 Sep 2018 22:50:59 +0300 Subject: [PATCH 024/100] Sync docs --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 8a149aa1..b23d7d38 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 8a149aa19d749bde33ace0c4d6de2dc704cc55d8 +Subproject commit b23d7d38be40d53190a80113eed9c9ebf2d6b206 From 3c4d978c1caf764ae1dcade830a91c3ede7f5907 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 10 Sep 2018 21:20:28 +0300 Subject: [PATCH 025/100] Document URL Handlers for device port monitor // Resolve #1838 --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index b23d7d38..483b70ca 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit b23d7d38be40d53190a80113eed9c9ebf2d6b206 +Subproject commit 483b70ca65f00edda4fac684fb391d39eb8f273d From 421694ce0ccf4bcdda3c9269ad8684ecf1b2c0fe Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 10 Sep 2018 22:37:25 +0300 Subject: [PATCH 026/100] Sync docs --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 483b70ca..3f744e84 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 483b70ca65f00edda4fac684fb391d39eb8f273d +Subproject commit 3f744e847d06a43430407fad19783618b50ee969 From a3e3c30d0d6638c4d0fb608c48ac19185bf539c9 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 19 Sep 2018 16:03:43 +0300 Subject: [PATCH 027/100] Docs: Add "Configuration" group to Library Manager --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 3f744e84..a104151d 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 3f744e847d06a43430407fad19783618b50ee969 +Subproject commit a104151dc2635af9bb0998d2d61a361d31ded399 From f0a91df2cf340abd1be29959ef866b2b099ec025 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 19 Sep 2018 16:12:57 +0300 Subject: [PATCH 028/100] Fix incorrect activation commands for PIO Core Installation (Virtual Environment) --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index a104151d..19c1155b 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit a104151dc2635af9bb0998d2d61a361d31ded399 +Subproject commit 19c1155b6a270fc40408a7d32212c24b0cb7edc4 From 24f97ef768e1224182f070bf1463fe38d006ff9e Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 20 Sep 2018 13:56:42 +0300 Subject: [PATCH 029/100] Introduce RISC-V GAP dev/platform --- docs | 2 +- examples | 2 +- scripts/docspregen.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs b/docs index 19c1155b..a85f7c4b 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 19c1155b6a270fc40408a7d32212c24b0cb7edc4 +Subproject commit a85f7c4b79f2045046de69f495930479217bdcc3 diff --git a/examples b/examples index d4cc2c65..6e5d42b6 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit d4cc2c651d95bd6149fa2cabefd201194305e48e +Subproject commit 6e5d42b63d02b4076b2eb2e6ec54f6c4c7e5d019 diff --git a/scripts/docspregen.py b/scripts/docspregen.py index bfcf814b..ede5d7ef 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -286,7 +286,7 @@ def generate_platform(name, rst_dir): print "Processing platform: %s" % name compatible_boards = [ - board for board in BOARDS if name in board['platform'] + board for board in BOARDS if name == board['platform'] ] lines = [] From e6fa8654ad9254d1c13d3a0fc4a84801cddd38b6 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 20 Sep 2018 14:55:55 +0300 Subject: [PATCH 030/100] YAPF --- platformio/__main__.py | 4 ++-- platformio/app.py | 4 ++-- platformio/builder/tools/pioide.py | 4 ++-- platformio/commands/lib.py | 33 +++++++++++++++--------------- platformio/commands/platform.py | 8 ++++---- platformio/commands/run.py | 13 ++++++------ platformio/commands/upgrade.py | 5 +++-- platformio/maintenance.py | 4 ++-- platformio/managers/lib.py | 18 ++++++++-------- platformio/managers/platform.py | 4 ++-- platformio/telemetry.py | 4 ++-- 11 files changed, 49 insertions(+), 52 deletions(-) diff --git a/platformio/__main__.py b/platformio/__main__.py index 1697b9d5..161acac3 100644 --- a/platformio/__main__.py +++ b/platformio/__main__.py @@ -107,8 +107,8 @@ def configure(): try: click_echo_origin[origin](*args, **kwargs) except IOError: - (sys.stderr.write if kwargs.get("err") else - sys.stdout.write)("%s\n" % (args[0] if args else "")) + (sys.stderr.write if kwargs.get("err") else sys.stdout.write)( + "%s\n" % (args[0] if args else "")) click.echo = lambda *args, **kwargs: _safe_echo(0, *args, **kwargs) click.secho = lambda *args, **kwargs: _safe_echo(1, *args, **kwargs) diff --git a/platformio/app.py b/platformio/app.py index d4043164..57c126a9 100644 --- a/platformio/app.py +++ b/platformio/app.py @@ -352,8 +352,8 @@ def get_cid(): pass cid = str( uuid.UUID( - bytes=hashlib.md5(str(_uid if _uid else uuid.getnode())) - .digest())) + bytes=hashlib.md5(str(_uid if _uid else uuid.getnode())). + digest())) if "windows" in util.get_systype() or os.getuid() > 0: set_state_item("cid", cid) return cid diff --git a/platformio/builder/tools/pioide.py b/platformio/builder/tools/pioide.py index ec1134b2..01e800f0 100644 --- a/platformio/builder/tools/pioide.py +++ b/platformio/builder/tools/pioide.py @@ -97,8 +97,8 @@ def _dump_defines(env): board_mcu = env.BoardConfig().get("build.mcu") if board_mcu: defines.append( - str("__AVR_%s__" % board_mcu.upper() - .replace("ATMEGA", "ATmega").replace("ATTINY", "ATtiny"))) + str("__AVR_%s__" % board_mcu.upper().replace( + "ATMEGA", "ATmega").replace("ATTINY", "ATtiny"))) # built-in GCC marcos # if env.GetCompilerType() == "gcc": diff --git a/platformio/commands/lib.py b/platformio/commands/lib.py index 358cff08..af107d3d 100644 --- a/platformio/commands/lib.py +++ b/platformio/commands/lib.py @@ -307,13 +307,12 @@ def lib_builtin(storage, json_output): def lib_show(library, json_output): lm = LibraryManager() name, requirements, _ = lm.parse_pkg_uri(library) - lib_id = lm.search_lib_id( - { - "name": name, - "requirements": requirements - }, - silent=json_output, - interactive=not json_output) + lib_id = lm.search_lib_id({ + "name": name, + "requirements": requirements + }, + silent=json_output, + interactive=not json_output) lib = get_api_result("/lib/info/%d" % lib_id, cache_valid="1d") if json_output: return click.echo(json.dumps(lib)) @@ -423,16 +422,16 @@ def lib_stats(json_output): click.echo("-" * terminal_width) def _print_lib_item(item): - click.echo((printitemdate_tpl - if "date" in item else printitem_tpl).format( - name=click.style(item['name'], fg="cyan"), - date=str( - time.strftime("%c", util.parse_date(item['date'])) - if "date" in item else ""), - url=click.style( - "https://platformio.org/lib/show/%s/%s" % - (item['id'], quote(item['name'])), - fg="blue"))) + date = str( + time.strftime("%c", util.parse_date(item['date'])) if "date" in + item else "") + url = click.style( + "https://platformio.org/lib/show/%s/%s" % (item['id'], + quote(item['name'])), + fg="blue") + click.echo( + (printitemdate_tpl if "date" in item else printitem_tpl).format( + name=click.style(item['name'], fg="cyan"), date=date, url=url)) def _print_tag_item(name): click.echo( diff --git a/platformio/commands/platform.py b/platformio/commands/platform.py index 394803a1..4ccd65ff 100644 --- a/platformio/commands/platform.py +++ b/platformio/commands/platform.py @@ -273,8 +273,8 @@ def platform_show(platform, json_output): # pylint: disable=too-many-branches if item['type']: click.echo("Type: %s" % item['type']) click.echo("Requirements: %s" % item['requirements']) - click.echo("Installed: %s" % ("Yes" if item.get("version") else - "No (optional)")) + click.echo("Installed: %s" % + ("Yes" if item.get("version") else "No (optional)")) if "version" in item: click.echo("Version: %s" % item['version']) if "originalVersion" in item: @@ -365,8 +365,8 @@ def platform_update(platforms, only_packages, only_check, json_output): if not pkg_dir: continue latest = pm.outdated(pkg_dir, requirements) - if (not latest and not PlatformFactory.newPlatform(pkg_dir) - .are_outdated_packages()): + if (not latest and not PlatformFactory.newPlatform(pkg_dir). + are_outdated_packages()): continue data = _get_installed_platform_data( pkg_dir, with_boards=False, expose_packages=False) diff --git a/platformio/commands/run.py b/platformio/commands/run.py index 4bb74482..3264ded0 100644 --- a/platformio/commands/run.py +++ b/platformio/commands/run.py @@ -210,10 +210,10 @@ class EnvironmentProcessor(object): if is_error or "piotest_processor" not in self.cmd_ctx.meta: print_header( - "[%s] Took %.2f seconds" % - ((click.style("ERROR", fg="red", bold=True) - if is_error else click.style( - "SUCCESS", fg="green", bold=True)), time() - start_time), + "[%s] Took %.2f seconds" % ( + (click.style("ERROR", fg="red", bold=True) if is_error else + click.style("SUCCESS", fg="green", bold=True)), + time() - start_time), is_error=is_error) return not is_error @@ -384,9 +384,8 @@ def print_summary(results, start_time): print_header( "[%s] Took %.2f seconds" % ( - (click.style("SUCCESS", fg="green", bold=True) - if successed else click.style("ERROR", fg="red", bold=True)), - time() - start_time), + (click.style("SUCCESS", fg="green", bold=True) if successed else + click.style("ERROR", fg="red", bold=True)), time() - start_time), is_error=not successed) diff --git a/platformio/commands/upgrade.py b/platformio/commands/upgrade.py index 7f415ad6..47b43304 100644 --- a/platformio/commands/upgrade.py +++ b/platformio/commands/upgrade.py @@ -102,8 +102,9 @@ def get_pip_package(to_develop): pkg_name = os.path.join(cache_dir, "piocoredevelop.zip") try: with open(pkg_name, "w") as fp: - r = util.exec_command( - ["curl", "-fsSL", dl_url], stdout=fp, universal_newlines=True) + r = util.exec_command(["curl", "-fsSL", dl_url], + stdout=fp, + universal_newlines=True) assert r['returncode'] == 0 # check ZIP structure with ZipFile(pkg_name) as zp: diff --git a/platformio/maintenance.py b/platformio/maintenance.py index 2a1bf474..bafe4fa9 100644 --- a/platformio/maintenance.py +++ b/platformio/maintenance.py @@ -319,8 +319,8 @@ def check_internal_updates(ctx, what): if not app.get_setting("auto_update_" + what): click.secho("Please update them via ", fg="yellow", nl=False) click.secho( - "`platformio %s update`" % ("lib --global" if what == "libraries" - else "platform"), + "`platformio %s update`" % + ("lib --global" if what == "libraries" else "platform"), fg="cyan", nl=False) click.secho(" command.\n", fg="yellow") diff --git a/platformio/managers/lib.py b/platformio/managers/lib.py index ba81870a..0c6aa77d 100644 --- a/platformio/managers/lib.py +++ b/platformio/managers/lib.py @@ -237,9 +237,8 @@ class LibraryManager(BasePkgManager): if not isinstance(values, list): values = [v.strip() for v in values.split(",") if v] for value in values: - query.append( - '%s:"%s"' % (key[:-1] - if key.endswith("s") else key, value)) + query.append('%s:"%s"' % + (key[:-1] if key.endswith("s") else key, value)) lib_info = None result = util.get_api_result( @@ -337,13 +336,12 @@ class LibraryManager(BasePkgManager): force=False): _name, _requirements, _url = self.parse_pkg_uri(name, requirements) if not _url: - name = "id=%d" % self.search_lib_id( - { - "name": _name, - "requirements": _requirements - }, - silent=silent, - interactive=interactive) + name = "id=%d" % self.search_lib_id({ + "name": _name, + "requirements": _requirements + }, + silent=silent, + interactive=interactive) requirements = _requirements pkg_dir = BasePkgManager.install( self, diff --git a/platformio/managers/platform.py b/platformio/managers/platform.py index 210dd5f5..04c4d931 100644 --- a/platformio/managers/platform.py +++ b/platformio/managers/platform.py @@ -235,8 +235,8 @@ class PlatformFactory(object): name = pm.load_manifest(platform_dir)['name'] if not platform_dir: - raise exception.UnknownPlatform(name if not requirements else - "%s@%s" % (name, requirements)) + raise exception.UnknownPlatform( + name if not requirements else "%s@%s" % (name, requirements)) platform_cls = None if isfile(join(platform_dir, "platform.py")): diff --git a/platformio/telemetry.py b/platformio/telemetry.py index 769d58eb..90a0a150 100644 --- a/platformio/telemetry.py +++ b/platformio/telemetry.py @@ -112,8 +112,8 @@ class MeasurementProtocol(TelemetryBase): self['cd2'] = "Python/%s %s" % (platform.python_version(), platform.platform()) # self['cd3'] = " ".join(_filter_args(sys.argv[1:])) - self['cd4'] = 1 if (not util.is_ci() - and (caller_id or not util.is_container())) else 0 + self['cd4'] = 1 if (not util.is_ci() and + (caller_id or not util.is_container())) else 0 if caller_id: self['cd5'] = caller_id.lower() From 22ceae014919a427b97a6a51d39c71b1f82f3b55 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 20 Sep 2018 14:57:42 +0300 Subject: [PATCH 031/100] * Do not re-create ".gitignore" and ".travis.yml" files if they were removed from a project --- HISTORY.rst | 2 ++ platformio/commands/init.py | 4 ++-- platformio/ide/projectgenerator.py | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 253ae357..5d4a3c71 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -12,6 +12,8 @@ PlatformIO 3.0 ``debug`` target using `platformio run `__ command or `targets `__ option in ``platformio.ini``. The last option allows to avoid project rebuilding between "Run/Debug" modes. (`issue #1833 `_) +* Do not re-create ".gitignore" and ".travis.yml" files if they were removed + from a project 3.6.0 (2018-08-06) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/commands/init.py b/platformio/commands/init.py index c4900c2f..1275a269 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -138,6 +138,8 @@ def init_base_project(project_dir): copyfile( join(util.get_source_dir(), "projectconftpl.ini"), join(project_dir, "platformio.ini")) + init_ci_conf(project_dir) + init_cvs_ignore(project_dir) with util.cd(project_dir): lib_dir = util.get_projectlib_dir() @@ -147,8 +149,6 @@ def init_base_project(project_dir): makedirs(d) init_lib_readme(lib_dir) - init_ci_conf(project_dir) - init_cvs_ignore(project_dir) def init_lib_readme(lib_dir): diff --git a/platformio/ide/projectgenerator.py b/platformio/ide/projectgenerator.py index f1dcd35e..da3faab0 100644 --- a/platformio/ide/projectgenerator.py +++ b/platformio/ide/projectgenerator.py @@ -130,7 +130,9 @@ class ProjectGenerator(object): file_name = basename(dst_path) # merge .gitignore - if file_name == ".gitignore" and isfile(dst_path): + if file_name == ".gitignore": + if not isfile(dst_path): + return modified = False default = [l.strip() for l in contents.split("\n")] with open(dst_path) as fp: From 18a8b05214e804249112cd71cd3076b29c5ad512 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 21 Sep 2018 19:23:08 +0300 Subject: [PATCH 032/100] Rename "fixed" to "detached" for LDF --- docs | 2 +- platformio/managers/package.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs b/docs index a85f7c4b..d03e8619 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit a85f7c4b79f2045046de69f495930479217bdcc3 +Subproject commit d03e86194024700a89212fc6dce5d83e24a8bc4f diff --git a/platformio/managers/package.py b/platformio/managers/package.py index 33f40f6e..a5cf0647 100644 --- a/platformio/managers/package.py +++ b/platformio/managers/package.py @@ -628,7 +628,7 @@ class BasePkgManager(PkgRepoMixin, PkgInstallerMixin): def outdated(self, pkg_dir, requirements=None): """ Has 3 different results: - `None` - unknown package, VCS is fixed to commit + `None` - unknown package, VCS is detached to commit `False` - package is up-to-date `String` - a found latest version """ @@ -636,7 +636,7 @@ class BasePkgManager(PkgRepoMixin, PkgInstallerMixin): return None latest = None manifest = self.load_manifest(pkg_dir) - # skip fixed package to a specific version + # skip detached package to a specific version if "@" in pkg_dir and "__src_url" not in manifest and not requirements: return None @@ -814,7 +814,7 @@ class BasePkgManager(PkgRepoMixin, PkgInstallerMixin): elif latest is False: click.echo("[%s]" % (click.style("Up-to-date", fg="green"))) else: - click.echo("[%s]" % (click.style("Fixed", fg="yellow"))) + click.echo("[%s]" % (click.style("Detached", fg="yellow"))) if only_check or not latest: return True From c10b8633abeec4847e8418720985d1db30f3a57f Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 23 Sep 2018 01:47:35 +0300 Subject: [PATCH 033/100] Sync docs --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index d03e8619..926d8a10 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit d03e86194024700a89212fc6dce5d83e24a8bc4f +Subproject commit 926d8a1070e355aadfaeddbc773a78ce3633aaf1 From e9f2334e598d61dad5674c22cecf8ea77c06ab24 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 26 Sep 2018 15:25:38 +0300 Subject: [PATCH 034/100] Fix lib test --- tests/commands/test_lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/commands/test_lib.py b/tests/commands/test_lib.py index 4c9705fd..950abedc 100644 --- a/tests/commands/test_lib.py +++ b/tests/commands/test_lib.py @@ -202,7 +202,7 @@ def test_global_lib_update(clirunner, validate_cliresult): # update rest libraries result = clirunner.invoke(cmd_lib, ["-g", "update"]) validate_cliresult(result) - assert result.output.count("[Fixed]") == 6 + assert result.output.count("[Detached]") == 6 assert result.output.count("[Up-to-date]") == 11 assert "Uninstalling RFcontrol @ 77d4eb3f8a" in result.output From ec9fbca181c4d5e682bcc43fe4a936c40264cc30 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 30 Sep 2018 23:32:53 +0300 Subject: [PATCH 035/100] Docs: tutorial for ESP32 --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 926d8a10..a02d4903 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 926d8a1070e355aadfaeddbc773a78ce3633aaf1 +Subproject commit a02d4903b2cec1f0531437108e5ad5101af5933a From 34325dbc4cd2c03722b0fc908b6e1b71871b4843 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 2 Oct 2018 00:11:41 +0300 Subject: [PATCH 036/100] Support in-line comments for multi-line value in platformio.ini --- HISTORY.rst | 27 ++++++++++++++------------- docs | 2 +- platformio/util.py | 17 ++++++++++++----- tests/test_builder.py | 8 +++++++- 4 files changed, 34 insertions(+), 20 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 5d4a3c71..44c43bb7 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -12,6 +12,7 @@ PlatformIO 3.0 ``debug`` target using `platformio run `__ command or `targets `__ option in ``platformio.ini``. The last option allows to avoid project rebuilding between "Run/Debug" modes. (`issue #1833 `_) +* Support in-line comments for multi-line value (``lib_deps``, ``build_flags``, etc) in `“platformio.ini” (Project Configuration File) `__ * Do not re-create ".gitignore" and ".travis.yml" files if they were removed from a project @@ -79,7 +80,7 @@ PlatformIO 3.0 * Simplify configuration for `PIO Unit Testing `__: separate main program from a test build process, drop requirement for ``#ifdef UNIT_TEST`` guard -* Override any option from board manifest in `Project Configuration File "platformio.ini" `__ +* Override any option from board manifest in `“platformio.ini” (Project Configuration File) `__ (`issue #1612 `_) * Configure a custom path to SVD file using `debug_svd_path `__ option @@ -142,7 +143,7 @@ PlatformIO 3.0 (`issue #1274 `_) * Configure a custom firmware/program name in build directory (`example `__) * Renamed ``envs_dir`` option to ``build_dir`` - in `Project Configuration File "platformio.ini" `__ + in `“platformio.ini” (Project Configuration File) `__ * Refactored code without "arrow" dependency (resolve issue with "ImportError: No module named backports.functools_lru_cache") * Improved support of PIO Unified Debugger for Eclipse Oxygen @@ -177,7 +178,7 @@ PlatformIO 3.0 folder for project's header files (`issue #1107 `_) * Depend on development platform using VCS URL (Git, Mercurial and Subversion) - instead of a name in `Project Configuration File "platformio.ini" `__. + instead of a name in `“platformio.ini” (Project Configuration File) `__. Drop support for ``*_stage`` dev/platform names (use VCS URL instead). * Reinstall/redownload package with a new ``-f, --force`` option for `platformio lib install `__ @@ -198,7 +199,7 @@ PlatformIO 3.0 - Parse library source file in pair with a header when they have the same name (`issue #1175 `_) - Handle library dependencies defined as VCS or SemVer in - `Project Configuration File "platformio.ini" `__ + `“platformio.ini” (Project Configuration File) `__ (`issue #1155 `_) - Added option to configure library `Compatible Mode `__ using `library.json `__ @@ -234,7 +235,7 @@ PlatformIO 3.0 * Use a root of library when filtering source code using `library.json `__ and ``srcFilter`` field -* Added ``monitor_*`` options to white-list for `Project Configuration File "platformio.ini" `__ +* Added ``monitor_*`` options to white-list for `“platformio.ini” (Project Configuration File) `__ (`issue #982 `_) * Do not ask for board ID when initialize project for desktop platform * Handle broken PIO Core state and create new one @@ -255,18 +256,18 @@ PlatformIO 3.0 - Integration with `Eclipse `__ and `Sublime Text `__ * Filter `PIO Unit Testing `__ - tests using a new ``test_filter`` option in `Project Configuration File "platformio.ini" `__ + tests using a new ``test_filter`` option in `“platformio.ini” (Project Configuration File) `__ or `platformio test --filter `__ command (`issue #934 `_) * Custom ``test_transport`` for `PIO Unit Testing `__ Engine -* Configure Serial Port Monitor in `Project Configuration File "platformio.ini" `__ +* Configure Serial Port Monitor in `“platformio.ini” (Project Configuration File) `__ (`issue #787 `_) * New `monitor `__ target which allows to launch Serial Monitor automatically after successful "build" or "upload" operations (`issue #788 `_) * Project generator for `VIM `__ -* Multi-line support for the different options in `Project Configuration File "platformio.ini" `__, +* Multi-line support for the different options in `“platformio.ini” (Project Configuration File) `__, such as: ``build_flags``, ``build_unflags``, etc. (`issue #889 `_) * Handle dynamic ``SRC_FILTER`` environment variable from @@ -278,7 +279,7 @@ PlatformIO 3.0 that were installed from repository * Add support for ``.*cc`` extension (`issue #939 `_) -* Handle ``env_default`` in `Project Configuration File "platformio.ini" `__ +* Handle ``env_default`` in `“platformio.ini” (Project Configuration File) `__ when re-initializing a project (`issue #950 `_) * Use root directory for PIO Home when path contains non-ascii characters @@ -376,10 +377,10 @@ PlatformIO 3.0 (`issue #808 `_, `issue #467 `_) * Inject system environment variables to configuration settings in - `Project Configuration File "platformio.ini" `__ + `“platformio.ini” (Project Configuration File) `__ (`issue #792 `_) * Custom boards per project with ``boards_dir`` option in - `Project Configuration File "platformio.ini" `__ + `“platformio.ini” (Project Configuration File) `__ (`issue #515 `_) * Unix shell-style wildcards for `upload_port `_ (`issue #839 `_) @@ -390,7 +391,7 @@ PlatformIO 3.0 * Added new `LDF Modes `__: ``chain+`` and ``deep+`` and set ``chain+`` as default * Added global ``lib_extra_dirs`` option to ``[platformio]`` section for - `Project Configuration File "platformio.ini" `__ + `“platformio.ini” (Project Configuration File) `__ (`issue #842 `_) * Enabled caching by default for API requests and Library Manager (see `enable_cache `__ setting) * Native integration with VIM/Neovim using `neomake-platformio `__ plugin @@ -413,7 +414,7 @@ PlatformIO 3.0 3.1.0 (2016-09-19) ~~~~~~~~~~~~~~~~~~ -* New! Dynamic variables/templates for `Project Configuration File "platformio.ini" `__ +* New! Dynamic variables/templates for `“platformio.ini” (Project Configuration File) `__ (`issue #705 `_) * Summary about processed environments (`issue #777 `_) diff --git a/docs b/docs index a02d4903..3687cf29 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit a02d4903b2cec1f0531437108e5ad5101af5933a +Subproject commit 3687cf293d5fc0470e9d8eeea89ec6b80fd694b2 diff --git a/platformio/util.py b/platformio/util.py index 987e4203..3b89f248 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -349,12 +349,19 @@ def load_project_config(path=None): def parse_conf_multi_values(items): + result = [] if not items: - return [] - return [ - item.strip() for item in items.split("\n" if "\n" in items else ", ") - if item.strip() - ] + return result + inline_comment_re = re.compile(r"\s+;.*$") + for item in items.split("\n" if "\n" in items else ", "): + item = item.strip() + # comment + if not item or item.startswith((";", "#")): + continue + if ";" in item: + item = inline_comment_re.sub("", item).strip() + result.append(item) + return result def change_filemtime(path, mtime): diff --git a/tests/test_builder.py b/tests/test_builder.py index 4048c065..882c8662 100644 --- a/tests/test_builder.py +++ b/tests/test_builder.py @@ -25,7 +25,9 @@ def test_build_flags(clirunner, validate_cliresult, tmpdir): [env:native] platform = native extra_scripts = extra.py -build_flags = %s +build_flags = + ; -DCOMMENTED_MACRO + %s ; inline comment """ % " ".join([f[0] for f in build_flags])) tmpdir.join("extra.py").write(""" @@ -47,6 +49,10 @@ projenv.Append(CPPDEFINES="POST_SCRIPT_MACRO") #error "POST_SCRIPT_MACRO" #endif +#ifdef COMMENTED_MACRO +#error "COMMENTED_MACRO" +#endif + int main() { } """) From 4cd13b9d47370650a2863c83ad93cbcf85d2a034 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 2 Oct 2018 00:12:29 +0300 Subject: [PATCH 037/100] Bump version to 3.6.1a5 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 1088ff94..25833034 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, "1a4") +VERSION = (3, 6, "1a5") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From 94bf067639650f6c8242790be69aab0e4a2f06c6 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 4 Oct 2018 01:33:15 +0300 Subject: [PATCH 038/100] Refactor docs for boards --- docs | 2 +- examples | 2 +- scripts/docspregen.py | 368 +++++++++++++++++++++++++++++------------- 3 files changed, 257 insertions(+), 115 deletions(-) diff --git a/docs b/docs index 3687cf29..7c4a2233 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 3687cf293d5fc0470e9d8eeea89ec6b80fd694b2 +Subproject commit 7c4a2233b7f964132cff7cc3fd38966485ffb6e0 diff --git a/examples b/examples index 6e5d42b6..b47b2a7a 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit 6e5d42b63d02b4076b2eb2e6ec54f6c4c7e5d019 +Subproject commit b47b2a7a945c7b93e098268cd4e53e53445aec32 diff --git a/scripts/docspregen.py b/scripts/docspregen.py index ede5d7ef..cbd71352 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -23,6 +23,18 @@ path.append("..") from platformio import util from platformio.managers.platform import PlatformFactory, PlatformManager +RST_COPYRIGHT = """.. Copyright (c) 2014-present PlatformIO + 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. +""" + API_PACKAGES = util.get_api_result("/packages") API_FRAMEWORKS = util.get_api_result("/frameworks") BOARDS = PlatformManager().get_installed_boards() @@ -32,10 +44,7 @@ DOCS_ROOT_DIR = realpath(join(dirname(realpath(__file__)), "..", "docs")) def is_compat_platform_and_framework(platform, framework): p = PlatformFactory.newPlatform(platform) - for pkg in p.packages.keys(): - if pkg.startswith("framework-%s" % framework): - return True - return False + return framework in (p.frameworks or {}).keys() def campaign_url(url, source="platformio", medium="docs"): @@ -49,20 +58,17 @@ def campaign_url(url, source="platformio", medium="docs"): query, data.fragment)) -def generate_boards(boards, extend_debug=False, skip_columns=None): +def generate_boards_table(boards, skip_columns=None): columns = [ - ("ID", "``{id}``"), - ("Name", "`{name} <{url}>`_"), - ("Platform", ":ref:`{platform_title} `"), + ("Name", ":ref:`board_{platform}_{id}`"), + ("Platform", ":ref:`platform_{platform}`"), ("Debug", "{debug}"), ("MCU", "{mcu}"), ("Frequency", "{f_cpu:d}MHz"), ("Flash", "{rom}"), ("RAM", "{ram}"), ] - platforms = {m['name']: m['title'] for m in PLATFORM_MANIFESTS} lines = [] - lines.append(""" .. list-table:: :header-rows: 1 @@ -72,36 +78,23 @@ def generate_boards(boards, extend_debug=False, skip_columns=None): for (name, template) in columns: if skip_columns and name in skip_columns: continue - prefix = " * - " if name == "ID" else " - " + prefix = " * - " if name == "Name" else " - " lines.append(prefix + name) - for data in sorted(boards, key=lambda item: item['id']): - debug = [":ref:`Yes `" if data['debug'] else "No"] - if extend_debug and data['debug']: - debug_onboard = [] - debug_external = [] - for name, options in data['debug']['tools'].items(): - attrs = [] - if options.get("default"): - attrs.append("default") - if options.get("onboard"): - attrs.append("on-board") - tool = ":ref:`debugging_tool_%s`" % name - if attrs: - tool = "%s (%s)" % (tool, ", ".join(attrs)) - if options.get("onboard"): - debug_onboard.append(tool) - else: - debug_external.append(tool) - debug = sorted(debug_onboard) + sorted(debug_external) + for data in sorted(boards, key=lambda item: item['name']): + has_onboard_debug = (data['debug'] and any( + t.get("onboard") for (_, t) in data['debug']['tools'].items())) + debug = "No" + if has_onboard_debug: + debug = "Yes" + elif data['debug']: + debug = "Yes :sup:`?`" variables = dict( id=data['id'], name=data['name'], platform=data['platform'], - platform_title=platforms[data['platform']], - debug=", ".join(debug), - url=campaign_url(data['url']), + debug=debug, mcu=data['mcu'].upper(), f_cpu=int(data['fcpu']) / 1000000, ram=util.format_filesize(data['ram']), @@ -110,7 +103,7 @@ def generate_boards(boards, extend_debug=False, skip_columns=None): for (name, template) in columns: if skip_columns and name in skip_columns: continue - prefix = " * - " if name == "ID" else " - " + prefix = " * - " if name == "Name" else " - " lines.append(prefix + template.format(**variables)) if lines: @@ -131,12 +124,16 @@ Frameworks * - Name - Description""") + known = set() for framework in API_FRAMEWORKS: + known.add(framework['name']) if framework['name'] not in frameworks: continue lines.append(""" * - :ref:`framework_{name}` - {description}""".format(**framework)) + assert known >= set(frameworks), "Unknown frameworks %s " % ( + set(frameworks) - known) return lines @@ -162,6 +159,9 @@ Platforms def generate_debug_contents(boards, skip_board_columns=None, extra_rst=None): + if not skip_board_columns: + skip_board_columns = [] + skip_board_columns.append("Debug") lines = [] onboard_debug = [ b for b in boards if b['debug'] and any( @@ -192,7 +192,7 @@ Tools & Debug Probes Supported debugging tools are listed in "Debug" column. For more detailed information, please scroll table by horizontal. You can switch between debugging :ref:`debugging_tools` using -:ref:`projectconf_debug_tool` options. +:ref:`projectconf_debug_tool` option in :ref:`projectconf`. .. warning:: You will need to install debug tool drivers depending on your system. @@ -204,27 +204,24 @@ You can switch between debugging :ref:`debugging_tools` using On-Board Debug Tools ^^^^^^^^^^^^^^^^^^^^ -Boards listed below have on-board debug tool and **ARE READY** for debugging! -You do not need to use/buy external debug tool. +Boards listed below have on-board debug probe and **ARE READY** for debugging! +You do not need to use/buy external debug probe. """) lines.extend( - generate_boards( - onboard_debug, - extend_debug=True, - skip_columns=skip_board_columns)) + generate_boards_table( + onboard_debug, skip_columns=skip_board_columns)) if external_debug: lines.append(""" External Debug Tools ^^^^^^^^^^^^^^^^^^^^ Boards listed below are compatible with :ref:`piodebug` but **DEPEND ON** -external debug tool. See "Debug" column for compatible debug tools. +external debug probe. They **ARE NOT READY** for debugging. +Please click on board name for the further details. """) lines.extend( - generate_boards( - external_debug, - extend_debug=True, - skip_columns=skip_board_columns)) + generate_boards_table( + external_debug, skip_columns=skip_board_columns)) return lines @@ -291,18 +288,7 @@ def generate_platform(name, rst_dir): lines = [] - lines.append( - """.. Copyright (c) 2014-present PlatformIO - 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. -""") + lines.append(RST_COPYRIGHT) p = PlatformFactory.newPlatform(name) assert p.repository_url.endswith(".git") github_url = p.repository_url[:-4] @@ -357,8 +343,8 @@ Examples are listed from `%s development platform repository <%s>`_: generate_debug_contents( compatible_boards, skip_board_columns=["Platform"], - extra_rst="%s_debug.rst" % name - if isfile(join(rst_dir, "%s_debug.rst" % name)) else None)) + extra_rst="%s_debug.rst" % name if isfile( + join(rst_dir, "%s_debug.rst" % name)) else None)) # # Development version of dev/platform @@ -437,7 +423,8 @@ Boards for vendor, boards in sorted(vendors.items()): lines.append(str(vendor)) lines.append("~" * len(vendor)) - lines.extend(generate_boards(boards, skip_columns=["Platform"])) + lines.extend( + generate_boards_table(boards, skip_columns=["Platform"])) return "\n".join(lines) @@ -464,19 +451,7 @@ def generate_framework(type_, data, rst_dir=None): lines = [] - lines.append( - """.. Copyright (c) 2014-present PlatformIO - 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. -""") - + lines.append(RST_COPYRIGHT) lines.append(".. _framework_%s:" % type_) lines.append("") @@ -507,8 +482,8 @@ For more detailed information please visit `vendor site <%s>`_. lines.extend( generate_debug_contents( compatible_boards, - extra_rst="%s_debug.rst" % type_ - if isfile(join(rst_dir, "%s_debug.rst" % type_)) else None)) + extra_rst="%s_debug.rst" % type_ if isfile( + join(rst_dir, "%s_debug.rst" % type_)) else None)) if compatible_platforms: # examples @@ -550,7 +525,7 @@ Boards for vendor, boards in sorted(vendors.items()): lines.append(str(vendor)) lines.append("~" * len(vendor)) - lines.extend(generate_boards(boards)) + lines.extend(generate_boards_table(boards)) return "\n".join(lines) @@ -563,27 +538,15 @@ def update_framework_docs(): f.write(generate_framework(name, framework, frameworks_dir)) -def update_embedded_boards(): +def update_boards(): lines = [] - lines.append( - """.. Copyright (c) 2014-present PlatformIO - 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. -""") - - lines.append(".. _embedded_boards:") + lines.append(RST_COPYRIGHT) + lines.append(".. _boards:") lines.append("") - lines.append("Embedded Boards") - lines.append("===============") + lines.append("Boards") + lines.append("======") lines.append(""" Rapid Embedded Development, Continuous and IDE integration in a few @@ -596,28 +559,208 @@ popular embedded boards and IDE. * For more detailed ``board`` information please scroll tables below by horizontal. """) - lines.append(""" -.. contents:: Vendors - :local: - """) - - vendors = {} + platforms = {} for data in BOARDS: - vendor = data['vendor'] - if vendor in vendors: - vendors[vendor].append(data) + platform = data['platform'] + if platform in platforms: + platforms[platform].append(data) else: - vendors[vendor] = [data] + platforms[platform] = [data] - for vendor, boards in sorted(vendors.iteritems()): - lines.append(str(vendor)) - lines.append("~" * len(vendor)) - lines.extend(generate_boards(boards)) + for platform, boards in sorted(platforms.iteritems()): + p = PlatformFactory.newPlatform(platform) + lines.append(p.title) + lines.append("-" * len(p.title)) + lines.append(""" +.. toctree:: + :maxdepth: 1 + """) + for board in sorted(boards, key=lambda item: item['name']): + lines.append(" %s/%s" % (platform, board["id"])) + lines.append("") - emboards_rst = join(DOCS_ROOT_DIR, "platforms", "embedded_boards.rst") + emboards_rst = join(DOCS_ROOT_DIR, "boards", "index.rst") with open(emboards_rst, "w") as f: f.write("\n".join(lines)) + # individual board page + for data in BOARDS: + # if data['id'] != "m5stack-core-esp32": + # continue + rst_path = join(DOCS_ROOT_DIR, "boards", data["platform"], + "%s.rst" % data["id"]) + if not isdir(dirname(rst_path)): + os.makedirs(dirname(rst_path)) + update_embedded_board(rst_path, data) + + +def update_embedded_board(rst_path, board): + platform = PlatformFactory.newPlatform(board['platform']) + board_config = platform.board_config(board['id']) + + board_manifest_url = platform.repository_url + assert board_manifest_url + if board_manifest_url.endswith(".git"): + board_manifest_url = board_manifest_url[:-4] + board_manifest_url += "/blob/master/boards/%s.json" % board['id'] + + variables = dict( + id=board['id'], + name=board['name'], + platform=board['platform'], + url=campaign_url(board['url']), + mcu=board_config.get("build", {}).get("mcu", ""), + mcu_upper=board['mcu'].upper(), + f_cpu=board['fcpu'], + f_cpu_mhz=int(board['fcpu']) / 1000000, + ram=util.format_filesize(board['ram']), + rom=util.format_filesize(board['rom']), + vendor=board['vendor'], + board_manifest_url=board_manifest_url, + upload_protocol=board_config.get("upload.protocol", "")) + + lines = [RST_COPYRIGHT] + lines.append(".. _board_{platform}_{id}:".format(**variables)) + lines.append("") + lines.append(board['name']) + lines.append("=" * len(board['name'])) + lines.append(""" +.. contents:: + :local: + +Platform :ref:`platform_%s`: %s""" % (platform.name, platform.description)) + + lines.append(""" +System +------ + +.. list-table:: + + * - **Microcontroller** + - {mcu_upper} + * - **Frequency** + - {f_cpu_mhz}Mhz + * - **Flash** + - {rom} + * - **RAM** + - {ram} + * - **Vendor** + - `{vendor} <{url}>`__ +""".format(**variables)) + + # + # Configuration + # + lines.append(""" +Configuration +------------- + +Please use ``{id}`` ID for :ref:`projectconf_env_board` option in :ref:`projectconf`: + +.. code-block:: ini + + [env:{id}] + platform = {platform} + board = {id} + +You can override default {name} settings per build environment using +``board_{{JSON.PATH}}`` option, where ``{{JSON.PATH}}`` is a path from +board manifest `{id}.json <{board_manifest_url}>`_. For example, + +.. code-block:: ini + + [env:{id}] + platform = {platform} + board = {id} + + ; change microcontroller + board_build.mcu = {mcu} + + ; change MCU frequency + board_build.f_cpu = {f_cpu}L +""".format(**variables)) + + # + # Uploading + # + upload_protocols = board_config.get("upload.protocols", []) + if len(upload_protocols) > 1: + lines.append(""" +Uploading +--------- +%s supports the next uploading protocols: +""" % board['name']) + for protocol in upload_protocols: + lines.append("* ``%s``" % protocol) + lines.append(""" +Default protocol is ``%s``""" % variables['upload_protocol']) + lines.append(""" +You can change upload protocol using :ref:`projectconf_upload_protocol` option: + +.. code-block:: ini + + [env:{id}] + platform = {platform} + board = {id} + + upload_protocol = {upload_protocol} +""".format(**variables)) + + # + # Debugging + # + lines.append("Debugging") + lines.append("---------") + if not board['debug']: + lines.append( + ":ref:`piodebug` currently does not support {name} board.".format( + **variables)) + else: + default_debug_tool = board_config.get_debug_tool_name() + has_onboard_debug = any( + t.get("onboard") for (_, t) in board['debug']['tools'].items()) + lines.append(""" +:ref:`piodebug` - "1-click" solution for debugging with a zero configuration. + +.. warning:: + You will need to install debug tool drivers depending on your system. + Please click on compatible debug tool below for the further + instructions and configuration information. + +You can switch between debugging :ref:`debugging_tools` using +:ref:`projectconf_debug_tool` option in :ref:`projectconf`. +""") + if has_onboard_debug: + lines.append( + "{name} has on-board debug probe and **IS READY** for " + "debugging. You don't need to use/buy external debug probe.". + format(**variables)) + else: + lines.append( + "{name} does not have on-board debug probe and **IS NOT " + "READY** for debugging. You will need to use/buy one of " + "external probe listed below.".format(**variables)) + lines.append(""" +.. list-table:: + :header-rows: 1 + + * - Compatible Tools + - On-board + - Default""") + for (tool_name, tool_data) in sorted(board['debug']['tools'].items()): + lines.append(""" * - :ref:`debugging_tool_{name}` + - {onboard} + - {default}""".format( + name=tool_name, + onboard="Yes" if tool_data.get("onboard") else "", + default="Yes" if tool_name == default_debug_tool else "")) + + if board['frameworks']: + lines.extend(generate_frameworks_contents(board['frameworks'])) + + with open(rst_path, "w") as f: + f.write("\n".join(lines)) + def update_debugging(): tool_to_platforms = {} @@ -664,7 +807,7 @@ Boards for vendor, boards in sorted(vendors.iteritems()): lines.append(str(vendor)) lines.append("~" * len(vendor)) - lines.extend(generate_boards(boards, extend_debug=True)) + lines.extend(generate_boards_table(boards)) # save with open( @@ -699,9 +842,8 @@ Boards For more detailed ``board`` information please scroll tables below by horizontal. """) lines.extend( - generate_boards( + generate_boards_table( [b for b in BOARDS if b['id'] in tool_to_boards[tool]], - extend_debug=True, skip_columns=None)) with open(tool_path, "r+") as fp: @@ -836,7 +978,7 @@ def update_project_examples(): def main(): update_platform_docs() update_framework_docs() - update_embedded_boards() + update_boards() update_debugging() update_project_examples() From 0a7d6fb8142b0e79625acbf7966386041f157e5c Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 4 Oct 2018 01:46:30 +0300 Subject: [PATCH 039/100] Revert back initial white-space for docs tables --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 7c4a2233..1fb1c9e5 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 7c4a2233b7f964132cff7cc3fd38966485ffb6e0 +Subproject commit 1fb1c9e5673dcb36ba26199601b1d2a2c148c1a8 From 59a3a7dd5589449d33fc678b4fa626c1e0d755a5 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 4 Oct 2018 01:51:21 +0300 Subject: [PATCH 040/100] Minor tweak to docs --- docs | 2 +- scripts/docspregen.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs b/docs index 1fb1c9e5..2d428c47 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 1fb1c9e5673dcb36ba26199601b1d2a2c148c1a8 +Subproject commit 2d428c472c75c73ca8584560590dca48cefb40f5 diff --git a/scripts/docspregen.py b/scripts/docspregen.py index cbd71352..5cadbea5 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -626,7 +626,6 @@ def update_embedded_board(rst_path, board): lines.append("=" * len(board['name'])) lines.append(""" .. contents:: - :local: Platform :ref:`platform_%s`: %s""" % (platform.name, platform.description)) From ba2275fbba5e54cca051bbce2302103069de0531 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 4 Oct 2018 20:20:16 +0300 Subject: [PATCH 041/100] Test windows builds on x86 & x64 --- .appveyor.yml | 10 ++++++++-- scripts/install_devplatforms.py | 5 +++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index fe1b1e8f..a4cc2f40 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,12 +1,18 @@ build: off -environment: +platform: + - x86 + - x64 + +environment: matrix: - TOXENV: "py27" install: - cmd: git submodule update --init --recursive - - cmd: SET PATH=%PATH%;C:\Python27\Scripts;C:\MinGW\bin + - cmd: SET PATH=C:\MinGW\bin;%PATH% + - if %PLATFORM% == x64 SET PATH=C:\Python27-x64;C:\Python27-x64\Scripts;%PATH% + - if %PLATFORM% == x86 SET PATH=C:\Python27;C:\Python27\Scripts;%PATH% - cmd: pip install tox test_script: diff --git a/scripts/install_devplatforms.py b/scripts/install_devplatforms.py index 58d28bd1..90daf6a2 100644 --- a/scripts/install_devplatforms.py +++ b/scripts/install_devplatforms.py @@ -15,6 +15,7 @@ import json import subprocess import sys +from platformio import util def main(): @@ -24,6 +25,10 @@ def main(): for platform in platforms: if platform['forDesktop']: continue + # RISC-V GAP does not support Windows 86 + if (util.get_systype() == "windows_x86" + and platform['name'] == "riscv_gap"): + continue subprocess.check_call( ["platformio", "platform", "install", platform['repository']]) From e83a11d02a80799ae9ee3e3a1383af72f2f6a222 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 5 Oct 2018 00:36:23 +0300 Subject: [PATCH 042/100] More detailed info about debug per board --- docs | 2 +- scripts/docspregen.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs b/docs index 2d428c47..9c6fe4f1 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 2d428c472c75c73ca8584560590dca48cefb40f5 +Subproject commit 9c6fe4f18fe7f5d3c4fbff594aa98b8a7dc7bfe7 diff --git a/scripts/docspregen.py b/scripts/docspregen.py index 5cadbea5..866a13b3 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -86,9 +86,9 @@ def generate_boards_table(boards, skip_columns=None): t.get("onboard") for (_, t) in data['debug']['tools'].items())) debug = "No" if has_onboard_debug: - debug = "Yes" + debug = "On-board" elif data['debug']: - debug = "Yes :sup:`?`" + debug = "External" variables = dict( id=data['id'], From 159cd7c073fe6e3e8c8b9c87fca84aabb3d118b4 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 5 Oct 2018 01:25:33 +0300 Subject: [PATCH 043/100] Better explanation about overriding settings for board --- docs | 2 +- scripts/docspregen.py | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs b/docs index 9c6fe4f1..c44ec58c 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 9c6fe4f18fe7f5d3c4fbff594aa98b8a7dc7bfe7 +Subproject commit c44ec58c6d749a2041b87e786d8450719c0544be diff --git a/scripts/docspregen.py b/scripts/docspregen.py index 866a13b3..d2072ed2 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -608,6 +608,7 @@ def update_embedded_board(rst_path, board): id=board['id'], name=board['name'], platform=board['platform'], + platform_description=platform.description, url=campaign_url(board['url']), mcu=board_config.get("build", {}).get("mcu", ""), mcu_upper=board['mcu'].upper(), @@ -627,18 +628,17 @@ def update_embedded_board(rst_path, board): lines.append(""" .. contents:: -Platform :ref:`platform_%s`: %s""" % (platform.name, platform.description)) - - lines.append(""" System ------ +Platform :ref:`platform_{platform}`: {platform_description} + .. list-table:: * - **Microcontroller** - {mcu_upper} * - **Frequency** - - {f_cpu_mhz}Mhz + - {f_cpu_mhz}MHz * - **Flash** - {rom} * - **RAM** @@ -663,8 +663,9 @@ Please use ``{id}`` ID for :ref:`projectconf_env_board` option in :ref:`projectc board = {id} You can override default {name} settings per build environment using -``board_{{JSON.PATH}}`` option, where ``{{JSON.PATH}}`` is a path from +``board_***`` option, where ``***`` is a JSON object path from board manifest `{id}.json <{board_manifest_url}>`_. For example, +``board_build.mcu``, ``board_build.f_cpu``, etc. .. code-block:: ini From f67cc1770df5e36e22c686465b47fde022797c31 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 10 Oct 2018 02:19:03 +0300 Subject: [PATCH 044/100] Document "Watchpoints" for VSCode --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index c44ec58c..46e65f45 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit c44ec58c6d749a2041b87e786d8450719c0544be +Subproject commit 46e65f45528db9f41f681718e0d3a5c1b0f2743a From aee0c7b9c274cb95d64ebd9602b5802675118038 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 10 Oct 2018 12:58:16 +0300 Subject: [PATCH 045/100] Docs: Fix invalid COMPONENT_EMBED_TXTFILES macro for ESP32 --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 46e65f45..926d38f5 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 46e65f45528db9f41f681718e0d3a5c1b0f2743a +Subproject commit 926d38f5b987f9060410fa3244377e395f985211 From 842db2643de10bc6e5e49c26e418bb6d86d03672 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 10 Oct 2018 16:20:28 +0300 Subject: [PATCH 046/100] Docs: Typos in VSCode Watchpoints --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 926d38f5..df62a034 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 926d38f5b987f9060410fa3244377e395f985211 +Subproject commit df62a03478ee8831e63464b1e66d48db30c28e10 From 13ff30788ee238a184650dba663c1e3a0c473b43 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 12 Oct 2018 15:06:09 +0300 Subject: [PATCH 047/100] Sync docs --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index df62a034..3014a640 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit df62a03478ee8831e63464b1e66d48db30c28e10 +Subproject commit 3014a640d4b5d73c4535e54dafd7af20ae1c99c0 From 00b173f13ff56e634818fdda6cddff175a07bdad Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 12 Oct 2018 15:09:54 +0300 Subject: [PATCH 048/100] Fix an issue when dynamic build flags were not handled correctly // Resolve #1799 --- HISTORY.rst | 2 ++ platformio/builder/tools/platformio.py | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 44c43bb7..7280d349 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -15,6 +15,8 @@ PlatformIO 3.0 * Support in-line comments for multi-line value (``lib_deps``, ``build_flags``, etc) in `“platformio.ini” (Project Configuration File) `__ * Do not re-create ".gitignore" and ".travis.yml" files if they were removed from a project +* Fixed an issue when dynamic build flags were not handled correctly + (`issue #1799 `_) 3.6.0 (2018-08-06) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index 9346f235..27726756 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -142,9 +142,14 @@ def BuildProgram(env): def ParseFlagsExtended(env, flags): - if isinstance(flags, list): - flags = " ".join(flags) - result = env.ParseFlags(str(flags)) + if not isinstance(flags, list): + flags = [flags] + result = {} + for raw in flags: + for key, value in env.ParseFlags(str(raw)).items(): + if key not in result: + result[key] = [] + result[key].extend(value) cppdefines = [] for item in result['CPPDEFINES']: From b77fb79cd6acbfcaa4e930a872e6b56ff6c64b79 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 12 Oct 2018 16:02:35 +0300 Subject: [PATCH 049/100] Sync docs --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 3014a640..97cde4ed 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 3014a640d4b5d73c4535e54dafd7af20ae1c99c0 +Subproject commit 97cde4edd984309d0073d588b7058121a74f8cd4 From ff8fefb7979e4b2d3853ed20bc8e5d12fb5226d5 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 12 Oct 2018 19:35:58 +0300 Subject: [PATCH 050/100] Report about outdated 99-platformio-udev.rules // Resolve #1823 --- HISTORY.rst | 2 ++ docs | 2 +- platformio/builder/tools/pioupload.py | 15 ++++------- platformio/builder/tools/platformio.py | 2 +- platformio/exception.py | 19 +++++++++++++ platformio/util.py | 37 ++++++++++++++++++++++++++ setup.py | 5 +++- 7 files changed, 69 insertions(+), 13 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 7280d349..86bedfbc 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -15,6 +15,8 @@ PlatformIO 3.0 * Support in-line comments for multi-line value (``lib_deps``, ``build_flags``, etc) in `“platformio.ini” (Project Configuration File) `__ * Do not re-create ".gitignore" and ".travis.yml" files if they were removed from a project +* Report about outdated `99-platformio-udev.rules `__ + (`issue #1823 `_) * Fixed an issue when dynamic build flags were not handled correctly (`issue #1799 `_) diff --git a/docs b/docs index 97cde4ed..4d4a5126 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 97cde4edd984309d0073d588b7058121a74f8cd4 +Subproject commit 4d4a51260b1edc9b0f3985aecdad86bb5ab838a7 diff --git a/platformio/builder/tools/pioupload.py b/platformio/builder/tools/pioupload.py index 4163f60c..0614cbd7 100644 --- a/platformio/builder/tools/pioupload.py +++ b/platformio/builder/tools/pioupload.py @@ -25,7 +25,7 @@ from time import sleep from SCons.Script import ARGUMENTS from serial import Serial, SerialException -from platformio import util +from platformio import exception, util # pylint: disable=unused-argument @@ -154,15 +154,10 @@ def AutodetectUploadPort(*args, **kwargs): and not env.subst("$UPLOAD_PROTOCOL"))): env.Replace(UPLOAD_PORT=_look_for_mbed_disk()) else: - if ("linux" in util.get_systype() and not any([ - isfile("/etc/udev/rules.d/99-platformio-udev.rules"), - isfile("/lib/udev/rules.d/99-platformio-udev.rules") - ])): - sys.stderr.write( - "\nWarning! Please install `99-platformio-udev.rules` and " - "check that your board's PID and VID are listed in the rules." - "\n https://docs.platformio.org/en/latest/faq.html" - "#platformio-udev-rules\n") + try: + util.ensure_udev_rules() + except exception.InvalidUdevRules as e: + sys.stderr.write("\n%s\n\n" % e) env.Replace(UPLOAD_PORT=_look_for_serial_port()) if env.subst("$UPLOAD_PORT"): diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index 27726756..41efe79b 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -141,7 +141,7 @@ def BuildProgram(env): return program -def ParseFlagsExtended(env, flags): +def ParseFlagsExtended(env, flags): # pylint: disable=too-many-branches if not isinstance(flags, list): flags = [flags] result = {} diff --git a/platformio/exception.py b/platformio/exception.py index 1ae6e2c3..7ec116fa 100644 --- a/platformio/exception.py +++ b/platformio/exception.py @@ -235,6 +235,25 @@ class CIBuildEnvsEmpty(PlatformioException): "predefined environments using `--project-conf` option") +class InvalidUdevRules(PlatformioException): + pass + + +class MissedUdevRules(InvalidUdevRules): + + MESSAGE = ( + "Warning! Please install `99-platformio-udev.rules`. \nMode details: " + "https://docs.platformio.org/en/latest/faq.html#platformio-udev-rules") + + +class OutdatedUdevRules(InvalidUdevRules): + + MESSAGE = ( + "Warning! Your `{0}` are outdated. Please update or reinstall them." + "\n Mode details: https://docs.platformio.org" + "/en/latest/faq.html#platformio-udev-rules") + + class UpgradeError(PlatformioException): MESSAGE = """{0} diff --git a/platformio/util.py b/platformio/util.py index 3b89f248..d05b6d34 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -786,6 +786,43 @@ def merge_dicts(d1, d2, path=None): return d1 +def ensure_udev_rules(): + + def _rules_to_set(rules_path): + result = set([]) + with open(rules_path, "rb") as fp: + for line in fp.readlines(): + line = line.strip() + if not line or line.startswith("#"): + continue + result.add(line) + return result + + if "linux" not in get_systype(): + return None + installed_rules = [ + "/etc/udev/rules.d/99-platformio-udev.rules", + "/lib/udev/rules.d/99-platformio-udev.rules" + ] + if not any(isfile(p) for p in installed_rules): + raise exception.MissedUdevRules + + origin_path = abspath( + join(get_source_dir(), "..", "scripts", "99-platformio-udev.rules")) + if not isfile(origin_path): + return None + + origin_rules = _rules_to_set(origin_path) + for rules_path in installed_rules: + if not isfile(rules_path): + continue + current_rules = _rules_to_set(rules_path) + if not origin_rules <= current_rules: + raise exception.OutdatedUdevRules(rules_path) + + return True + + def rmtree_(path): def _onerror(_, name, __): diff --git a/setup.py b/setup.py index 4159e183..dc9b7bf4 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ setup( license=__license__, python_requires='>=2.7, <3', install_requires=install_requires, - packages=find_packages(), + packages=find_packages() + ["scripts"], package_data={ "platformio": [ "projectconftpl.ini", @@ -45,6 +45,9 @@ setup( "ide/tpls/*/*.tpl", "ide/tpls/*/*/*.tpl", "ide/tpls/*/.*/*.tpl" + ], + "scripts": [ + "99-platformio-udev.rules" ] }, entry_points={ From d4e553fb5ad9831180dcc8e22b99e36e1f716616 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 12 Oct 2018 21:49:02 +0300 Subject: [PATCH 051/100] Generate an "include" directory with a README file when initializing a new project --- HISTORY.rst | 2 + platformio/builder/tools/pioide.py | 2 +- platformio/commands/init.py | 128 +++++++++++++++++++++-------- 3 files changed, 98 insertions(+), 34 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 86bedfbc..aee00aa2 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,8 @@ PlatformIO 3.0 3.6.1 (2018-??-??) ~~~~~~~~~~~~~~~~~~ +* Generate an `include `__ + directory with a README file when initializing a new project * Introduced `"Release" and "Debug" Build Configurations `__ * Build project in "Debug Mode" including debug information with a new ``debug`` target using `platformio run `__ command or `targets `__ option in ``platformio.ini``. diff --git a/platformio/builder/tools/pioide.py b/platformio/builder/tools/pioide.py index 01e800f0..063ce45d 100644 --- a/platformio/builder/tools/pioide.py +++ b/platformio/builder/tools/pioide.py @@ -25,7 +25,7 @@ from platformio.managers.core import get_core_package_dir def _dump_includes(env): - includes = [] + includes = [env.subst("$PROJECTINCLUDE_DIR"), env.subst("$PROJECTSRC_DIR")] for item in env.get("CPPPATH", []): includes.append(env.subst(item)) diff --git a/platformio/commands/init.py b/platformio/commands/init.py index 1275a269..d754ba95 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -73,21 +73,19 @@ def cli( click.secho( "\nThe current working directory", fg="yellow", nl=False) click.secho(" %s " % project_dir, fg="cyan", nl=False) - click.secho( - "will be used for the project.\n" - "You can specify another project directory via\n" - "`platformio init -d %PATH_TO_THE_PROJECT_DIR%` command.", - fg="yellow") + click.secho("will be used for the project.", fg="yellow") click.echo("") click.echo("The next files/directories have been created in %s" % click.style(project_dir, fg="cyan")) - click.echo("%s - Project Configuration File" % click.style( - "platformio.ini", fg="cyan")) - click.echo( - "%s - Put your source files here" % click.style("src", fg="cyan")) + click.echo("%s - Put your header files here" % click.style( + "include", fg="cyan")) click.echo("%s - Put here project specific (private) libraries" % click.style("lib", fg="cyan")) + click.echo( + "%s - Put your source files here" % click.style("src", fg="cyan")) + click.echo("%s - Project Configuration File" % click.style( + "platformio.ini", fg="cyan")) init_base_project(project_dir) @@ -102,16 +100,25 @@ def cli( pg = ProjectGenerator(project_dir, ide, env_name) pg.generate() - if not silent: + if silent: + return + + project_inited_before = util.is_platformio_project(project_dir) + if ide: click.secho( - "\nProject has been successfully initialized!\nUseful commands:\n" - "`platformio run` - process/build project from the current " - "directory\n" - "`platformio run --target upload` or `platformio run -t upload` " - "- upload firmware to embedded board\n" - "`platformio run --target clean` - clean project (remove compiled " - "files)\n" - "`platformio run --help` - additional information", + "\nProject has been successfully %s including configuration files " + "for `%s` IDE." % + ("updated" if project_inited_before else "initialized", ide), + fg="green") + else: + click.secho( + "\nProject has been successfully %s! Useful commands:\n" + "`pio run` - process/build project from the current directory\n" + "`pio run --target upload` or `pio run -t upload` " + "- upload firmware to a target\n" + "`pio run --target clean` - clean project (remove compiled files)" + "\n`pio run --help` - additional information" % + ("updated" if project_inited_before else "initialized"), fg="green") @@ -142,13 +149,63 @@ def init_base_project(project_dir): init_cvs_ignore(project_dir) with util.cd(project_dir): - lib_dir = util.get_projectlib_dir() - src_dir = util.get_projectsrc_dir() - for d in (src_dir, lib_dir): - if not isdir(d): - makedirs(d) + dir_to_readme = [ + (util.get_projectsrc_dir(), None), + (util.get_projectinclude_dir(), init_include_readme), + (util.get_projectlib_dir(), init_lib_readme), + ] + for (path, cb) in dir_to_readme: + if isdir(path): + continue + makedirs(path) + if cb: + cb(path) - init_lib_readme(lib_dir) + +def init_include_readme(include_dir): + if isfile(join(include_dir, "readme.txt")): + return + with open(join(include_dir, "readme.txt"), "w") as f: + f.write(""" +This directory is intended for project header files. + +A header file is a file containing C declarations and macro definitions +to be shared between several project source files. You request the use of a +header file in your project source file (C, C++, etc) located in `src` folder +by including it, with the C preprocessing directive `#include'. + +```src/main.c + +#include "header.h" + +int main (void) +{ + ... +} +``` + +Including a header file produces the same results as copying the header file +into each source file that needs it. Such copying would be time-consuming +and error-prone. With a header file, the related declarations appear +in only one place. If they need to be changed, they can be changed in one +place, and programs that include the header file will automatically use the +new version when next recompiled. The header file eliminates the labor of +finding and changing all the copies as well as the risk that a failure to +find one copy will result in inconsistencies within a program. + +In C, the usual convention is to give header files names that end with `.h'. +It is most portable to use only letters, digits, dashes, and underscores in +header file names, and at most one dot. + +Read more about using header files in official GCC documentation: + +* Include Syntax +* Include Operation +* Once-Only Headers +* Computed Includes + +https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html +""") def init_lib_readme(lib_dir): @@ -157,12 +214,12 @@ def init_lib_readme(lib_dir): with open(join(lib_dir, "readme.txt"), "w") as f: f.write(""" This directory is intended for project specific (private) libraries. -PlatformIO will compile them to static libraries and link them to executable files. +PlatformIO will compile them to static libraries and link into executable file. -The source code of each library should be placed in separate directories, like -"lib/private_lib/[here are source files]". +The source code of each library should be placed in a an own separate directory +("lib/your_library_name/[here are source files]"). -For example, see the structure of the following two libraries `Foo` and `Bar`: +For example, see a structure of the following two libraries `Foo` and `Bar`: |--lib | | @@ -184,15 +241,20 @@ For example, see the structure of the following two libraries `Foo` and `Bar`: |--src |- main.c -Then in `src/main.c` you should use: - +and a contents of `src/main.c`: +``` #include #include -// rest H/C/CPP code +int main (void) +{ + ... +} -PlatformIO will find your libraries automatically, configure preprocessor's -include paths and build them. +``` + +PlatformIO Library Dependency Finder will find automatically dependent +libraries scanning project source files. More information about PlatformIO Library Dependency Finder - https://docs.platformio.org/page/librarymanager/ldf.html From 69d01c4bc13ee6add806f74375dac5b2b0ef379a Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 12 Oct 2018 21:57:57 +0300 Subject: [PATCH 052/100] Fix an issue when ``pio run -t monitor`` always uses first ``monitor_port`` even with multiple environments // Resolve #1841 --- HISTORY.rst | 3 +++ platformio/commands/run.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index aee00aa2..488f786c 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -21,6 +21,9 @@ PlatformIO 3.0 (`issue #1823 `_) * Fixed an issue when dynamic build flags were not handled correctly (`issue #1799 `_) +* Fixed an issue when ``pio run -t monitor`` always uses first ``monitor_port`` + even with multiple environments + (`issue #1841 `_) 3.6.0 (2018-08-06) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/commands/run.py b/platformio/commands/run.py index 3264ded0..47f14f81 100644 --- a/platformio/commands/run.py +++ b/platformio/commands/run.py @@ -108,7 +108,9 @@ def cli(ctx, environment, target, upload_port, project_dir, silent, verbose, results.append(result) if result[1] and "monitor" in ep.get_build_targets() and \ "nobuild" not in ep.get_build_targets(): - ctx.invoke(cmd_device_monitor) + ctx.invoke( + cmd_device_monitor, + environment=environment[0] if environment else None) found_error = any(status is False for (_, status) in results) From 6294580e25f851e49f2ba5988ca26c2c2c8283d3 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 12 Oct 2018 22:30:28 +0300 Subject: [PATCH 053/100] Show a valid error when Internet is off-line while initializing a new project // Resolve #1784 --- HISTORY.rst | 2 ++ platformio/exception.py | 2 +- platformio/managers/package.py | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 488f786c..37e9edd5 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -19,6 +19,8 @@ PlatformIO 3.0 from a project * Report about outdated `99-platformio-udev.rules `__ (`issue #1823 `_) +* Show a valid error when Internet is off-line while initializing a new project + (`issue #1784 `_) * Fixed an issue when dynamic build flags were not handled correctly (`issue #1799 `_) * Fixed an issue when ``pio run -t monitor`` always uses first ``monitor_port`` diff --git a/platformio/exception.py b/platformio/exception.py index 7ec116fa..48f831c9 100644 --- a/platformio/exception.py +++ b/platformio/exception.py @@ -178,7 +178,7 @@ class InternetIsOffline(PlatformioException): MESSAGE = ( "You are not connected to the Internet.\n" "If you build a project first time, we need Internet connection " - "to install all dependencies and toolchain.") + "to install all dependencies and toolchains.") class LibNotFound(PlatformioException): diff --git a/platformio/managers/package.py b/platformio/managers/package.py index a5cf0647..b8db1f77 100644 --- a/platformio/managers/package.py +++ b/platformio/managers/package.py @@ -414,6 +414,7 @@ class PkgInstallerMixin(object): click.secho("Looking for another mirror...", fg="yellow") if versions is None: + util.internet_on(raise_exception=True) raise exception.UnknownPackage(name) elif not pkgdata: raise exception.UndefinedPackageVersion(requirements or "latest", From 05fe52bda9dca89286e048fdc7c8ec508127e19c Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 12 Oct 2018 22:31:11 +0300 Subject: [PATCH 054/100] Bump version to 3.6.1rc1 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 25833034..fe82eb7a 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, "1a5") +VERSION = (3, 6, "1rc1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From d9dd83e327c65f1f795f67b2f934f83a9ded0294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Antonio=20de=20la=20Torre?= Date: Fri, 12 Oct 2018 21:41:13 +0200 Subject: [PATCH 055/100] Solved issues with vim whitespaces in paths (#1873) When a library has whitespaces in the name the path will contain whitespace too. When vim tries to decode path it will fail. This fix wrap each path with quotes. --- platformio/ide/tpls/vim/.clang_complete.tpl | 4 ++-- platformio/ide/tpls/vim/.gcc-flags.json.tpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platformio/ide/tpls/vim/.clang_complete.tpl b/platformio/ide/tpls/vim/.clang_complete.tpl index bc09ec0d..c00763c8 100644 --- a/platformio/ide/tpls/vim/.clang_complete.tpl +++ b/platformio/ide/tpls/vim/.clang_complete.tpl @@ -1,6 +1,6 @@ % for include in includes: --I{{include}} +-I"{{include}}" % end % for define in defines: -D{{!define}} -% end \ No newline at end of file +% end diff --git a/platformio/ide/tpls/vim/.gcc-flags.json.tpl b/platformio/ide/tpls/vim/.gcc-flags.json.tpl index 5af2ea3a..07acafd0 100644 --- a/platformio/ide/tpls/vim/.gcc-flags.json.tpl +++ b/platformio/ide/tpls/vim/.gcc-flags.json.tpl @@ -3,6 +3,6 @@ "gccDefaultCFlags": "-fsyntax-only {{! cc_flags.replace(' -MMD ', ' ').replace('"', '\\"') }}", "gccDefaultCppFlags": "-fsyntax-only {{! cxx_flags.replace(' -MMD ', ' ').replace('"', '\\"') }}", "gccErrorLimit": 15, - "gccIncludePaths": "{{ ','.join(includes).replace("\\", "/") }}", + "gccIncludePaths": "{{! ','.join("'{}'".format(w.replace("\\", '/')) for w in includes)}}", "gccSuppressWarnings": false } From 0159b1cf7f0314448be0e87cb7db6fbc48b5a01a Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 12 Oct 2018 23:04:12 +0300 Subject: [PATCH 056/100] Fixed an issue with broken includes when generating ``.clang_complete`` and space is used in path // Issue #1873 --- HISTORY.rst | 4 ++++ platformio/ide/tpls/atom/.clang_complete.tpl | 4 ++-- platformio/ide/tpls/emacs/.clang_complete.tpl | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 37e9edd5..0e692fe1 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -26,6 +26,10 @@ PlatformIO 3.0 * Fixed an issue when ``pio run -t monitor`` always uses first ``monitor_port`` even with multiple environments (`issue #1841 `_) +* Fixed an issue with broken includes when generating ``.clang_complete`` and + space is used in path + (`issue #1873 `_) + 3.6.0 (2018-08-06) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/ide/tpls/atom/.clang_complete.tpl b/platformio/ide/tpls/atom/.clang_complete.tpl index bc09ec0d..c00763c8 100644 --- a/platformio/ide/tpls/atom/.clang_complete.tpl +++ b/platformio/ide/tpls/atom/.clang_complete.tpl @@ -1,6 +1,6 @@ % for include in includes: --I{{include}} +-I"{{include}}" % end % for define in defines: -D{{!define}} -% end \ No newline at end of file +% end diff --git a/platformio/ide/tpls/emacs/.clang_complete.tpl b/platformio/ide/tpls/emacs/.clang_complete.tpl index bc09ec0d..c00763c8 100644 --- a/platformio/ide/tpls/emacs/.clang_complete.tpl +++ b/platformio/ide/tpls/emacs/.clang_complete.tpl @@ -1,6 +1,6 @@ % for include in includes: --I{{include}} +-I"{{include}}" % end % for define in defines: -D{{!define}} -% end \ No newline at end of file +% end From 2b53ecb1119b52b5fab9dc45a472f7573d3c707d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 13 Oct 2018 19:32:31 +0300 Subject: [PATCH 057/100] Improve PIO Unified Debugger for "mbed" framework and fix issue with missed local variables --- HISTORY.rst | 5 +++-- platformio/builder/tools/piomisc.py | 11 ++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 0e692fe1..eb4a3795 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -9,12 +9,14 @@ PlatformIO 3.0 * Generate an `include `__ directory with a README file when initializing a new project +* Support in-line comments for multi-line value (``lib_deps``, ``build_flags``, etc) in `“platformio.ini” (Project Configuration File) `__ +* Improved `PIO Unified Debugger `__ + for "mbed" framework and fixed issue with missed local variables * Introduced `"Release" and "Debug" Build Configurations `__ * Build project in "Debug Mode" including debug information with a new ``debug`` target using `platformio run `__ command or `targets `__ option in ``platformio.ini``. The last option allows to avoid project rebuilding between "Run/Debug" modes. (`issue #1833 `_) -* Support in-line comments for multi-line value (``lib_deps``, ``build_flags``, etc) in `“platformio.ini” (Project Configuration File) `__ * Do not re-create ".gitignore" and ".travis.yml" files if they were removed from a project * Report about outdated `99-platformio-udev.rules `__ @@ -30,7 +32,6 @@ PlatformIO 3.0 space is used in path (`issue #1873 `_) - 3.6.0 (2018-08-06) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/builder/tools/piomisc.py b/platformio/builder/tools/piomisc.py index ec565b51..e6628a83 100644 --- a/platformio/builder/tools/piomisc.py +++ b/platformio/builder/tools/piomisc.py @@ -288,10 +288,15 @@ def PioClean(env, clean_dir): def ProcessDebug(env): if not env.subst("$PIODEBUGFLAGS"): env.Replace(PIODEBUGFLAGS=["-Og", "-g3", "-ggdb3"]) - env.Append(PIODEBUGFLAGS=["-D__PLATFORMIO_DEBUG__"]) env.Append( - BUILD_FLAGS=env.get("PIODEBUGFLAGS", []), - BUILD_UNFLAGS=["-Os", "-O0", "-O1", "-O2", "-O3"]) + PIODEBUGFLAGS=["-D__PLATFORMIO_DEBUG__"], + BUILD_FLAGS=env.get("PIODEBUGFLAGS", []) + ) + unflags = ["-Os"] + for level in [0, 1, 2]: + for flag in ("O", "g", "ggdb"): + unflags.append("-%s%d" % (flag, level)) + env.Append(BUILD_UNFLAGS=unflags) def ProcessTest(env): From 8a5b3a90cbac0dd6dea5bbd47f75a7505084f02e Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 13 Oct 2018 19:32:54 +0300 Subject: [PATCH 058/100] Bump version to 3.6.1rc2 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index fe82eb7a..22bc6bcd 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, "1rc1") +VERSION = (3, 6, "1rc2") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From d1e4f22e7fe47fbc63308d02a25b76b3ad92cf62 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 16 Oct 2018 23:01:40 +0300 Subject: [PATCH 059/100] Add docs for JTAG and SWD connectors --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 4d4a5126..af41ae88 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 4d4a51260b1edc9b0f3985aecdad86bb5ab838a7 +Subproject commit af41ae889ac4819c5de7051b0f11317a6f627cbe From 11831055575953bb02e9793f68b1a7cde85cb347 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 17 Oct 2018 01:46:16 +0300 Subject: [PATCH 060/100] Revert back an clang includes list without quotes for Atom --- platformio/ide/tpls/atom/.clang_complete.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/ide/tpls/atom/.clang_complete.tpl b/platformio/ide/tpls/atom/.clang_complete.tpl index c00763c8..3b137e31 100644 --- a/platformio/ide/tpls/atom/.clang_complete.tpl +++ b/platformio/ide/tpls/atom/.clang_complete.tpl @@ -1,5 +1,5 @@ % for include in includes: --I"{{include}}" +-I{{include}} % end % for define in defines: -D{{!define}} From a32c67a0ce7b353f54e7e30b12f0ea74fbd88995 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 17 Oct 2018 01:47:08 +0300 Subject: [PATCH 061/100] Bump version to 3.6.1rc3 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 22bc6bcd..7a5c7150 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, "1rc2") +VERSION = (3, 6, "1rc3") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From 1598b0632aa671580a9ce24bf8cb4a77b7fba74f Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 17 Oct 2018 14:03:19 +0300 Subject: [PATCH 062/100] Sync docs --- docs | 2 +- examples | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs b/docs index af41ae88..e92bc03b 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit af41ae889ac4819c5de7051b0f11317a6f627cbe +Subproject commit e92bc03b7bff8b03eb592d65cc9d3c553a3ebff2 diff --git a/examples b/examples index b47b2a7a..87155e1e 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit b47b2a7a945c7b93e098268cd4e53e53445aec32 +Subproject commit 87155e1eb849fac1dbadb8da4e80718e1a6b620d From 4b588a589d98195ecf45ac3640034b81040cf7d3 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 17 Oct 2018 14:11:54 +0300 Subject: [PATCH 063/100] Add Aceinna dev/platform --- docs | 2 +- examples | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs b/docs index e92bc03b..63024d0d 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit e92bc03b7bff8b03eb592d65cc9d3c553a3ebff2 +Subproject commit 63024d0db199aa1e08fa6401a37ffeaa3d3126de diff --git a/examples b/examples index 87155e1e..eaa5d283 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit 87155e1eb849fac1dbadb8da4e80718e1a6b620d +Subproject commit eaa5d28397ad89edc3300803d1e6e0247e0ed191 From 5b0befef4585999a0aa751ae7cccedb11392b370 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 17 Oct 2018 14:48:53 +0300 Subject: [PATCH 064/100] Drop support for Freescale Kinetis FRDM-KL26Z, include Aceinna in platforms list --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 63024d0d..66c067ca 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 63024d0db199aa1e08fa6401a37ffeaa3d3126de +Subproject commit 66c067cab82f1e337e9e20b69e224c29c9c7d9b9 From 016caa731d0d102a199b85fb03a4e4bac0f3a249 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 17 Oct 2018 19:58:38 +0300 Subject: [PATCH 065/100] Rename "readme.txt" to README for "include" and "lib" project folder; don't create these folders if they were delated before --- platformio/commands/init.py | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/platformio/commands/init.py b/platformio/commands/init.py index d754ba95..9d318e0c 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -141,12 +141,15 @@ def get_best_envname(project_dir, boards=None): def init_base_project(project_dir): - if not util.is_platformio_project(project_dir): - copyfile( - join(util.get_source_dir(), "projectconftpl.ini"), - join(project_dir, "platformio.ini")) - init_ci_conf(project_dir) - init_cvs_ignore(project_dir) + if util.is_platformio_project(project_dir): + return + + copyfile( + join(util.get_source_dir(), "projectconftpl.ini"), + join(project_dir, "platformio.ini")) + + init_ci_conf(project_dir) + init_cvs_ignore(project_dir) with util.cd(project_dir): dir_to_readme = [ @@ -163,9 +166,7 @@ def init_base_project(project_dir): def init_include_readme(include_dir): - if isfile(join(include_dir, "readme.txt")): - return - with open(join(include_dir, "readme.txt"), "w") as f: + with open(join(include_dir, "README"), "w") as f: f.write(""" This directory is intended for project header files. @@ -209,9 +210,7 @@ https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html def init_lib_readme(lib_dir): - if isfile(join(lib_dir, "readme.txt")): - return - with open(join(lib_dir, "readme.txt"), "w") as f: + with open(join(lib_dir, "README"), "w") as f: f.write(""" This directory is intended for project specific (private) libraries. PlatformIO will compile them to static libraries and link into executable file. @@ -235,7 +234,7 @@ For example, see a structure of the following two libraries `Foo` and `Bar`: | | |- Foo.c | | |- Foo.h | | -| |- readme.txt --> THIS FILE +| |- README --> THIS FILE | |- platformio.ini |--src @@ -262,8 +261,6 @@ More information about PlatformIO Library Dependency Finder def init_ci_conf(project_dir): - if isfile(join(project_dir, ".travis.yml")): - return with open(join(project_dir, ".travis.yml"), "w") as f: f.write("""# Continuous Integration (CI) is the practice, in software # engineering, of merging all developer working copies with a shared mainline From 9c304727774c4635feab8a5a878fb86a93b8bc1d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 17 Oct 2018 21:16:09 +0300 Subject: [PATCH 066/100] Generate "test" directory per project --- HISTORY.rst | 3 ++- docs | 2 +- platformio/builder/tools/piomisc.py | 3 +-- platformio/commands/init.py | 23 ++++++++++++++++++++--- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index eb4a3795..dab1ede4 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -8,7 +8,8 @@ PlatformIO 3.0 ~~~~~~~~~~~~~~~~~~ * Generate an `include `__ - directory with a README file when initializing a new project + and `test `__ + directories with a README file when initializing a new project * Support in-line comments for multi-line value (``lib_deps``, ``build_flags``, etc) in `“platformio.ini” (Project Configuration File) `__ * Improved `PIO Unified Debugger `__ for "mbed" framework and fixed issue with missed local variables diff --git a/docs b/docs index 66c067ca..3c9ceca1 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 66c067cab82f1e337e9e20b69e224c29c9c7d9b9 +Subproject commit 3c9ceca1dfc6e84088201c0fc430c0111f2b126c diff --git a/platformio/builder/tools/piomisc.py b/platformio/builder/tools/piomisc.py index e6628a83..ec304382 100644 --- a/platformio/builder/tools/piomisc.py +++ b/platformio/builder/tools/piomisc.py @@ -290,8 +290,7 @@ def ProcessDebug(env): env.Replace(PIODEBUGFLAGS=["-Og", "-g3", "-ggdb3"]) env.Append( PIODEBUGFLAGS=["-D__PLATFORMIO_DEBUG__"], - BUILD_FLAGS=env.get("PIODEBUGFLAGS", []) - ) + BUILD_FLAGS=env.get("PIODEBUGFLAGS", [])) unflags = ["-Os"] for level in [0, 1, 2]: for flag in ("O", "g", "ggdb"): diff --git a/platformio/commands/init.py b/platformio/commands/init.py index 9d318e0c..8b8c7f80 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -78,12 +78,12 @@ def cli( click.echo("The next files/directories have been created in %s" % click.style(project_dir, fg="cyan")) - click.echo("%s - Put your header files here" % click.style( + click.echo("%s - Put project header files here" % click.style( "include", fg="cyan")) click.echo("%s - Put here project specific (private) libraries" % click.style("lib", fg="cyan")) - click.echo( - "%s - Put your source files here" % click.style("src", fg="cyan")) + click.echo("%s - Put project source files here" % click.style( + "src", fg="cyan")) click.echo("%s - Project Configuration File" % click.style( "platformio.ini", fg="cyan")) @@ -156,6 +156,7 @@ def init_base_project(project_dir): (util.get_projectsrc_dir(), None), (util.get_projectinclude_dir(), init_include_readme), (util.get_projectlib_dir(), init_lib_readme), + (util.get_projecttest_dir(), init_test_readme), ] for (path, cb) in dir_to_readme: if isdir(path): @@ -260,6 +261,22 @@ More information about PlatformIO Library Dependency Finder """) +def init_test_readme(test_dir): + with open(join(test_dir, "README"), "w") as f: + f.write(""" +This directory is intended for PIO Unit Testing and project tests. + +Unit Testing is a software testing method by which individual units of +source code, sets of one or more MCU program modules together with associated +control data, usage procedures, and operating procedures, are tested to +determine whether they are fit for use. Unit testing finds problems early +in the development cycle. + +More information about PIO Unit Testing: +- https://docs.platformio.org/page/plus/unit-testing.html +""") + + def init_ci_conf(project_dir): with open(join(project_dir, ".travis.yml"), "w") as f: f.write("""# Continuous Integration (CI) is the practice, in software From 05b656e6b0b72cf02a6b27cb8b1128fc95ab6ee9 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 17 Oct 2018 21:56:27 +0300 Subject: [PATCH 067/100] Update README for "include", "lib", and "test" directories --- examples | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples b/examples index eaa5d283..322e1f2b 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit eaa5d28397ad89edc3300803d1e6e0247e0ed191 +Subproject commit 322e1f2bb79c42ea55a07900c97b70bfd5a7a62f From e344194f86d1b1c4fe6cf8610a265704866078ad Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 19 Oct 2018 15:58:43 +0300 Subject: [PATCH 068/100] Handle first part for package name --- platformio/managers/package.py | 2 +- tests/test_managers.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platformio/managers/package.py b/platformio/managers/package.py index b8db1f77..40bde023 100644 --- a/platformio/managers/package.py +++ b/platformio/managers/package.py @@ -622,7 +622,7 @@ class BasePkgManager(PkgRepoMixin, PkgInstallerMixin): _url = _url[:-1] name = basename(_url) if "." in name and not name.startswith("."): - name = name.rsplit(".", 1)[0] + name = name.split(".", 1)[0] return (name or text, requirements, url) diff --git a/tests/test_managers.py b/tests/test_managers.py index ee2d5df1..56b8fe15 100644 --- a/tests/test_managers.py +++ b/tests/test_managers.py @@ -54,7 +54,7 @@ def test_pkg_input_parser(): ], [ "https://somedomain.com/path/LibraryName-1.2.3.zip", - ("LibraryName-1.2.3", None, + ("LibraryName-1", None, "https://somedomain.com/path/LibraryName-1.2.3.zip") ], [ @@ -69,12 +69,12 @@ def test_pkg_input_parser(): ], [ "https://github.com/user/package/archive/branch.tar.gz", - ("branch.tar", None, + ("branch", None, "https://github.com/user/package/archive/branch.tar.gz") ], [ "https://github.com/user/package/archive/branch.tar.gz@!=5", - ("branch.tar", "!=5", + ("branch", "!=5", "https://github.com/user/package/archive/branch.tar.gz") ], [ From 98a1fd79b62a4b44c402330345487b659470d8f4 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 19 Oct 2018 16:13:55 +0300 Subject: [PATCH 069/100] Revert back "Handle first part for package name" --- platformio/managers/package.py | 2 +- tests/test_managers.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platformio/managers/package.py b/platformio/managers/package.py index 40bde023..b8db1f77 100644 --- a/platformio/managers/package.py +++ b/platformio/managers/package.py @@ -622,7 +622,7 @@ class BasePkgManager(PkgRepoMixin, PkgInstallerMixin): _url = _url[:-1] name = basename(_url) if "." in name and not name.startswith("."): - name = name.split(".", 1)[0] + name = name.rsplit(".", 1)[0] return (name or text, requirements, url) diff --git a/tests/test_managers.py b/tests/test_managers.py index 56b8fe15..ee2d5df1 100644 --- a/tests/test_managers.py +++ b/tests/test_managers.py @@ -54,7 +54,7 @@ def test_pkg_input_parser(): ], [ "https://somedomain.com/path/LibraryName-1.2.3.zip", - ("LibraryName-1", None, + ("LibraryName-1.2.3", None, "https://somedomain.com/path/LibraryName-1.2.3.zip") ], [ @@ -69,12 +69,12 @@ def test_pkg_input_parser(): ], [ "https://github.com/user/package/archive/branch.tar.gz", - ("branch", None, + ("branch.tar", None, "https://github.com/user/package/archive/branch.tar.gz") ], [ "https://github.com/user/package/archive/branch.tar.gz@!=5", - ("branch", "!=5", + ("branch.tar", "!=5", "https://github.com/user/package/archive/branch.tar.gz") ], [ From 7b998c8cdaa2546ab22d64bbb93f0fabf0474757 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 19 Oct 2018 16:37:15 +0300 Subject: [PATCH 070/100] Fix an issue with incorrect handling of a custom package name --- HISTORY.rst | 22 ++---- platformio/managers/package.py | 132 +++++++++++++++++---------------- tests/commands/test_lib.py | 8 +- 3 files changed, 79 insertions(+), 83 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index dab1ede4..15c4acd1 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,31 +7,25 @@ PlatformIO 3.0 3.6.1 (2018-??-??) ~~~~~~~~~~~~~~~~~~ -* Generate an `include `__ - and `test `__ - directories with a README file when initializing a new project +* Generate an `include `__ and `test `__ directories with a README file when initializing a new project * Support in-line comments for multi-line value (``lib_deps``, ``build_flags``, etc) in `“platformio.ini” (Project Configuration File) `__ -* Improved `PIO Unified Debugger `__ - for "mbed" framework and fixed issue with missed local variables +* Improved `PIO Unified Debugger `__ for "mbed" framework and fixed issue with missed local variables * Introduced `"Release" and "Debug" Build Configurations `__ -* Build project in "Debug Mode" including debug information with a new - ``debug`` target using `platformio run `__ command or `targets `__ option in ``platformio.ini``. - The last option allows to avoid project rebuilding between "Run/Debug" modes. +* Build project in "Debug Mode" including debug information with a new ``debug`` target using `platformio run `__ command or `targets `__ option in ``platformio.ini``. The last option allows to avoid project rebuilding between "Run/Debug" modes. (`issue #1833 `_) -* Do not re-create ".gitignore" and ".travis.yml" files if they were removed - from a project +* Do not re-create ".gitignore" and ".travis.yml" files if they were removed from a project * Report about outdated `99-platformio-udev.rules `__ (`issue #1823 `_) * Show a valid error when Internet is off-line while initializing a new project (`issue #1784 `_) * Fixed an issue when dynamic build flags were not handled correctly (`issue #1799 `_) -* Fixed an issue when ``pio run -t monitor`` always uses first ``monitor_port`` - even with multiple environments +* Fixed an issue when ``pio run -t monitor`` always uses first ``monitor_port`` even with multiple environments (`issue #1841 `_) -* Fixed an issue with broken includes when generating ``.clang_complete`` and - space is used in path +* Fixed an issue with broken includes when generating ``.clang_complete`` and space is used in path (`issue #1873 `_) +* Fixed an issue with incorrect handling of a custom package name when using `platformio lib install `__ or `platformio platform install `__ commands + 3.6.0 (2018-08-06) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/managers/package.py b/platformio/managers/package.py index b8db1f77..2f73452d 100644 --- a/platformio/managers/package.py +++ b/platformio/managers/package.py @@ -259,6 +259,69 @@ class PkgInstallerMixin(object): raise e return None + @staticmethod + def parse_pkg_uri( # pylint: disable=too-many-branches + text, requirements=None): + text = str(text) + name, url = None, None + + # Parse requirements + req_conditions = [ + "@" in text, not requirements, ":" not in text + or text.rfind("/") < text.rfind("@") + ] + if all(req_conditions): + text, requirements = text.rsplit("@", 1) + + # Handle PIO Library Registry ID + if text.isdigit(): + text = "id=" + text + # Parse custom name + elif "=" in text and not text.startswith("id="): + name, text = text.split("=", 1) + + # Parse URL + # if valid URL with scheme vcs+protocol:// + if "+" in text and text.find("+") < text.find("://"): + url = text + elif "/" in text or "\\" in text: + git_conditions = [ + # Handle GitHub URL (https://github.com/user/package) + text.startswith("https://github.com/") and not text.endswith( + (".zip", ".tar.gz")), + (text.split("#", 1)[0] + if "#" in text else text).endswith(".git") + ] + hg_conditions = [ + # Handle Developer Mbed URL + # (https://developer.mbed.org/users/user/code/package/) + # (https://os.mbed.com/users/user/code/package/) + text.startswith("https://developer.mbed.org"), + text.startswith("https://os.mbed.com") + ] + if any(git_conditions): + url = "git+" + text + elif any(hg_conditions): + url = "hg+" + text + elif "://" not in text and (isfile(text) or isdir(text)): + url = "file://" + text + elif "://" in text: + url = text + # Handle short version of GitHub URL + elif text.count("/") == 1: + url = "git+https://github.com/" + text + + # Parse name from URL + if url and not name: + _url = url.split("#", 1)[0] if "#" in url else url + if _url.endswith(("\\", "/")): + _url = _url[:-1] + name = basename(_url) + if "." in name and not name.startswith("."): + name = name.rsplit(".", 1)[0] + + return (name or text, requirements, url) + @staticmethod def get_install_dirname(manifest): name = re.sub(r"[^\da-z\_\-\. ]", "_", manifest['name'], flags=re.I) @@ -316,11 +379,13 @@ class PkgInstallerMixin(object): manifest[key.strip()] = value.strip() if src_manifest: - if "name" not in manifest: - manifest['name'] = src_manifest['name'] if "version" in src_manifest: manifest['version'] = src_manifest['version'] manifest['__src_url'] = src_manifest['url'] + # handle a custom package name + autogen_name = self.parse_pkg_uri(manifest['__src_url'])[0] + if "name" not in manifest or autogen_name != src_manifest['name']: + manifest['name'] = src_manifest['name'] if "name" not in manifest: manifest['name'] = basename(pkg_dir) @@ -563,69 +628,6 @@ class BasePkgManager(PkgRepoMixin, PkgInstallerMixin): def print_message(self, message, nl=True): click.echo("%s: %s" % (self.__class__.__name__, message), nl=nl) - @staticmethod - def parse_pkg_uri( # pylint: disable=too-many-branches - text, requirements=None): - text = str(text) - name, url = None, None - - # Parse requirements - req_conditions = [ - "@" in text, not requirements, ":" not in text - or text.rfind("/") < text.rfind("@") - ] - if all(req_conditions): - text, requirements = text.rsplit("@", 1) - - # Handle PIO Library Registry ID - if text.isdigit(): - text = "id=" + text - # Parse custom name - elif "=" in text and not text.startswith("id="): - name, text = text.split("=", 1) - - # Parse URL - # if valid URL with scheme vcs+protocol:// - if "+" in text and text.find("+") < text.find("://"): - url = text - elif "/" in text or "\\" in text: - git_conditions = [ - # Handle GitHub URL (https://github.com/user/package) - text.startswith("https://github.com/") and not text.endswith( - (".zip", ".tar.gz")), - (text.split("#", 1)[0] - if "#" in text else text).endswith(".git") - ] - hg_conditions = [ - # Handle Developer Mbed URL - # (https://developer.mbed.org/users/user/code/package/) - # (https://os.mbed.com/users/user/code/package/) - text.startswith("https://developer.mbed.org"), - text.startswith("https://os.mbed.com") - ] - if any(git_conditions): - url = "git+" + text - elif any(hg_conditions): - url = "hg+" + text - elif "://" not in text and (isfile(text) or isdir(text)): - url = "file://" + text - elif "://" in text: - url = text - # Handle short version of GitHub URL - elif text.count("/") == 1: - url = "git+https://github.com/" + text - - # Parse name from URL - if url and not name: - _url = url.split("#", 1)[0] if "#" in url else url - if _url.endswith(("\\", "/")): - _url = _url[:-1] - name = basename(_url) - if "." in name and not name.startswith("."): - name = name.rsplit(".", 1)[0] - - return (name or text, requirements, url) - def outdated(self, pkg_dir, requirements=None): """ Has 3 different results: diff --git a/tests/commands/test_lib.py b/tests/commands/test_lib.py index 950abedc..7fc6ca90 100644 --- a/tests/commands/test_lib.py +++ b/tests/commands/test_lib.py @@ -61,7 +61,7 @@ def test_global_install_archive(clirunner, validate_cliresult, "http://www.airspayce.com/mikem/arduino/RadioHead/RadioHead-1.62.zip", "https://github.com/bblanchon/ArduinoJson/archive/v5.8.2.zip", "https://github.com/bblanchon/ArduinoJson/archive/v5.8.2.zip@5.8.2", - "http://dl.platformio.org/libraries/archives/0/9540.tar.gz", + "SomeLib=http://dl.platformio.org/libraries/archives/0/9540.tar.gz", "https://github.com/Pedroalbuquerque/ESP32WebServer/archive/master.zip" ]) validate_cliresult(result) @@ -75,7 +75,7 @@ def test_global_install_archive(clirunner, validate_cliresult, items1 = [d.basename for d in isolated_pio_home.join("lib").listdir()] items2 = [ - "RadioHead-1.62", "ArduinoJson", "DallasTemperature_ID54", + "RadioHead-1.62", "ArduinoJson", "SomeLib_ID54", "OneWire_ID1", "ESP32WebServer" ] assert set(items1) >= set(items2) @@ -158,7 +158,7 @@ def test_global_lib_list(clirunner, validate_cliresult): items1 = [i['name'] for i in json.loads(result.output)] items2 = [ "ESP32WebServer", "ArduinoJson", "ArduinoJson", "ArduinoJson", - "ArduinoJson", "AsyncMqttClient", "AsyncTCP", "DallasTemperature", + "ArduinoJson", "AsyncMqttClient", "AsyncTCP", "SomeLib", "ESPAsyncTCP", "NeoPixelBus", "OneWire", "PJON", "PJON", "PubSubClient", "RFcontrol", "RadioHead-1.62", "platformio-libmirror", "rs485-nodeproto" @@ -234,7 +234,7 @@ def test_global_lib_uninstall(clirunner, validate_cliresult, items2 = [ "RadioHead-1.62", "rs485-nodeproto", "platformio-libmirror", "PubSubClient", "ArduinoJson@src-69ebddd821f771debe7ee734d3c7fa81", - "ESPAsyncTCP_ID305", "DallasTemperature_ID54", "NeoPixelBus_ID547", + "ESPAsyncTCP_ID305", "SomeLib_ID54", "NeoPixelBus_ID547", "PJON", "AsyncMqttClient_ID346", "ArduinoJson_ID64", "PJON@src-79de467ebe19de18287becff0a1fb42d", "ESP32WebServer" ] From 058a5e854d29753c814e2052ad8ef067758805af Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 19 Oct 2018 16:50:51 +0300 Subject: [PATCH 071/100] Skip aceinna_imu from linux builds --- scripts/install_devplatforms.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/install_devplatforms.py b/scripts/install_devplatforms.py index 90daf6a2..434ab7cd 100644 --- a/scripts/install_devplatforms.py +++ b/scripts/install_devplatforms.py @@ -29,6 +29,10 @@ def main(): if (util.get_systype() == "windows_x86" and platform['name'] == "riscv_gap"): continue + # unknown issue on Linux + if ("linux" in util.get_systype() + and platform['name'] == "aceinna_imu"): + continue subprocess.check_call( ["platformio", "platform", "install", platform['repository']]) From 98deefc4f58ed18f85f12b576d0fa7d38fa6d37a Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 19 Oct 2018 17:48:00 +0300 Subject: [PATCH 072/100] Bump version to 3.6.1rc4 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 7a5c7150..1fbdc8ce 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, "1rc3") +VERSION = (3, 6, "1rc4") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From e11013189bfde55a7eac70baa69240e8bc92a8bd Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 19 Oct 2018 22:07:00 +0300 Subject: [PATCH 073/100] Docs: Move library manager CLI to userguide --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 3c9ceca1..00a808be 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 3c9ceca1dfc6e84088201c0fc430c0111f2b126c +Subproject commit 00a808be81d9ec73baa21a5f82bb51767252fa6e From 8a1b94b48c413e18054624fc113a1b397249da36 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 22 Oct 2018 16:33:30 +0300 Subject: [PATCH 074/100] Process ``build_unflags`` for cloned environment when building a static library --- HISTORY.rst | 3 ++- platformio/builder/tools/platformio.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 15c4acd1..09c130dc 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -13,11 +13,12 @@ PlatformIO 3.0 * Introduced `"Release" and "Debug" Build Configurations `__ * Build project in "Debug Mode" including debug information with a new ``debug`` target using `platformio run `__ command or `targets `__ option in ``platformio.ini``. The last option allows to avoid project rebuilding between "Run/Debug" modes. (`issue #1833 `_) -* Do not re-create ".gitignore" and ".travis.yml" files if they were removed from a project +* Process ``build_unflags`` for cloned environment when building a static library * Report about outdated `99-platformio-udev.rules `__ (`issue #1823 `_) * Show a valid error when Internet is off-line while initializing a new project (`issue #1784 `_) +* Do not re-create ".gitignore" and ".travis.yml" files if they were removed from a project * Fixed an issue when dynamic build flags were not handled correctly (`issue #1799 `_) * Fixed an issue when ``pio run -t monitor`` always uses first ``monitor_port`` even with multiple environments diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index 41efe79b..321e8ea1 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -324,6 +324,7 @@ def BuildFrameworks(env, frameworks): def BuildLibrary(env, variant_dir, src_dir, src_filter=None): + env.ProcessUnFlags(env.get("BUILD_UNFLAGS")) return env.StaticLibrary( env.subst(variant_dir), env.CollectBuildFiles(variant_dir, src_dir, src_filter)) From 51acd024213bc1f5dbc02af716dacfe2fbb4e45f Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 22 Oct 2018 16:49:08 +0300 Subject: [PATCH 075/100] Bump version to 3.6.1rc5 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 1fbdc8ce..f80850f6 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, "1rc4") +VERSION = (3, 6, "1rc5") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From 8e3020c0f8c0f2725754dfe420d62e068843b41a Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 23 Oct 2018 18:09:43 +0300 Subject: [PATCH 076/100] Sync docs --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 00a808be..ac64653b 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 00a808be81d9ec73baa21a5f82bb51767252fa6e +Subproject commit ac64653b4dd136c20a2fbfc4556708bbf725b95c From 04eb531ac294c3ad8be0c1b4e04c254c0d524c24 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 23 Oct 2018 19:12:02 +0300 Subject: [PATCH 077/100] Add more example with a custom target --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index ac64653b..8a04968a 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit ac64653b4dd136c20a2fbfc4556708bbf725b95c +Subproject commit 8a04968abde6e8e684fae9cf0ffd4fee316cd270 From e4c112608b122e5b1eb2a2f1c0882a415e9f502d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 23 Oct 2018 19:21:25 +0300 Subject: [PATCH 078/100] Docs: Move "Custom target" to upper level --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 8a04968a..977270dc 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 8a04968abde6e8e684fae9cf0ffd4fee316cd270 +Subproject commit 977270dc95c038735efc26058e415871378e27a0 From bfee89637845fc9143f104a2c5a775cba201112f Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 23 Oct 2018 22:27:18 +0300 Subject: [PATCH 079/100] Cache loaded project config --- platformio/util.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/platformio/util.py b/platformio/util.py index d05b6d34..2c05f747 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -334,12 +334,8 @@ def get_projectdata_dir(): "data")) -def load_project_config(path=None): - if not path or isdir(path): - path = join(path or get_project_dir(), "platformio.ini") - if not isfile(path): - raise exception.NotPlatformIOProject( - dirname(path) if path.endswith("platformio.ini") else path) +@memoized() +def _load_project_config(path): cp = ProjectConfig() try: cp.read(path) @@ -348,6 +344,15 @@ def load_project_config(path=None): return cp +def load_project_config(path=None): + if not path or isdir(path): + path = join(path or get_project_dir(), "platformio.ini") + if not isfile(path): + raise exception.NotPlatformIOProject( + dirname(path) if path.endswith("platformio.ini") else path) + return _load_project_config(path) + + def parse_conf_multi_values(items): result = [] if not items: From 4b9e8f0ba43495e2221f55393ada23c68fb3a6f2 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 23 Oct 2018 22:55:26 +0300 Subject: [PATCH 080/100] Added $PROJECT_HASH template variable for `build_dir` --- HISTORY.rst | 13 +++++++------ docs | 2 +- platformio/util.py | 4 ++++ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 09c130dc..46dbcdf7 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -9,21 +9,22 @@ PlatformIO 3.0 * Generate an `include `__ and `test `__ directories with a README file when initializing a new project * Support in-line comments for multi-line value (``lib_deps``, ``build_flags``, etc) in `“platformio.ini” (Project Configuration File) `__ +* Added ``$PROJECT_HASH`` template variable for `build_dir `__. One of the use cases is setting a global storage for project artifacts using `PLATFORMIO_BUILD_DIR `__ system environment variable. For example, ``/tmp/pio-build/$PROJECT_HASH``. * Improved `PIO Unified Debugger `__ for "mbed" framework and fixed issue with missed local variables * Introduced `"Release" and "Debug" Build Configurations `__ -* Build project in "Debug Mode" including debug information with a new ``debug`` target using `platformio run `__ command or `targets `__ option in ``platformio.ini``. The last option allows to avoid project rebuilding between "Run/Debug" modes. +* Build project in "Debug Mode" including debugging information with a new ``debug`` target using `platformio run `__ command or `targets `__ option in ``platformio.ini``. The last option allows avoiding project rebuilding between "Run/Debug" modes. (`issue #1833 `_) -* Process ``build_unflags`` for cloned environment when building a static library -* Report about outdated `99-platformio-udev.rules `__ +* Process ``build_unflags`` for the cloned environment when building a static library +* Report on outdated `99-platformio-udev.rules `__ (`issue #1823 `_) -* Show a valid error when Internet is off-line while initializing a new project +* Show a valid error when the Internet is off-line while initializing a new project (`issue #1784 `_) * Do not re-create ".gitignore" and ".travis.yml" files if they were removed from a project * Fixed an issue when dynamic build flags were not handled correctly (`issue #1799 `_) -* Fixed an issue when ``pio run -t monitor`` always uses first ``monitor_port`` even with multiple environments +* Fixed an issue when ``pio run -t monitor`` always uses the first ``monitor_port`` even with multiple environments (`issue #1841 `_) -* Fixed an issue with broken includes when generating ``.clang_complete`` and space is used in path +* Fixed an issue with broken includes when generating ``.clang_complete`` and space is used in a path (`issue #1873 `_) * Fixed an issue with incorrect handling of a custom package name when using `platformio lib install `__ or `platformio platform install `__ commands diff --git a/docs b/docs index 977270dc..25337cdb 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 977270dc95c038735efc26058e415871378e27a0 +Subproject commit 25337cdba8b585e3adbc3d2768735a6e303dd1b5 diff --git a/platformio/util.py b/platformio/util.py index 2c05f747..4f59b983 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -23,6 +23,7 @@ import sys import time from functools import wraps from glob import glob +from hashlib import sha1 from os.path import (abspath, basename, dirname, expanduser, isdir, isfile, join, normpath, splitdrive) from shutil import rmtree @@ -309,6 +310,9 @@ def get_projectboards_dir(): def get_projectbuild_dir(force=False): path = get_project_optional_dir("build_dir", join(get_project_dir(), ".pioenvs")) + if "$PROJECT_HASH" in path: + path = path.replace("$PROJECT_HASH", + sha1(get_project_dir()).hexdigest()[:10]) try: if not isdir(path): os.makedirs(path) From 92289d373b35da88042b4da8cbcd1bd70c83ae30 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 24 Oct 2018 00:23:10 +0300 Subject: [PATCH 081/100] Add example with $PROJECT_HASH for Windows --- HISTORY.rst | 2 +- docs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 46dbcdf7..90bc844d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -9,7 +9,7 @@ PlatformIO 3.0 * Generate an `include `__ and `test `__ directories with a README file when initializing a new project * Support in-line comments for multi-line value (``lib_deps``, ``build_flags``, etc) in `“platformio.ini” (Project Configuration File) `__ -* Added ``$PROJECT_HASH`` template variable for `build_dir `__. One of the use cases is setting a global storage for project artifacts using `PLATFORMIO_BUILD_DIR `__ system environment variable. For example, ``/tmp/pio-build/$PROJECT_HASH``. +* Added ``$PROJECT_HASH`` template variable for `build_dir `__. One of the use cases is setting a global storage for project artifacts using `PLATFORMIO_BUILD_DIR `__ system environment variable. For example, ``/tmp/pio-build/$PROJECT_HASH`` (Unix) or ``%TEMP%/pio-build/$PROJECT_HASH`` (Windows) * Improved `PIO Unified Debugger `__ for "mbed" framework and fixed issue with missed local variables * Introduced `"Release" and "Debug" Build Configurations `__ * Build project in "Debug Mode" including debugging information with a new ``debug`` target using `platformio run `__ command or `targets `__ option in ``platformio.ini``. The last option allows avoiding project rebuilding between "Run/Debug" modes. diff --git a/docs b/docs index 25337cdb..f5bb6e67 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 25337cdba8b585e3adbc3d2768735a6e303dd1b5 +Subproject commit f5bb6e67da269f4b6ae40fd377cad9abc3674915 From d92349c8f7b772403ef34ee19a6d451a9ede5202 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 24 Oct 2018 01:19:39 +0300 Subject: [PATCH 082/100] Add "reset" support for "memoized" --- platformio/util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platformio/util.py b/platformio/util.py index 4f59b983..9f728128 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -138,8 +138,12 @@ class memoized(object): self.cache[key] = (time.time(), func(*args, **kwargs)) return self.cache[key][1] + wrapper.reset = self._reset return wrapper + def _reset(self): + self.cache = {} + class throttle(object): From 08dc5dec89649252c8ff13f1bd9fec17ea6f5412 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 24 Oct 2018 01:19:54 +0300 Subject: [PATCH 083/100] Revert "Cache loaded project config" This reverts commit bfee89637845fc9143f104a2c5a775cba201112f. --- platformio/util.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/platformio/util.py b/platformio/util.py index 9f728128..c98320d1 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -342,23 +342,18 @@ def get_projectdata_dir(): "data")) -@memoized() -def _load_project_config(path): - cp = ProjectConfig() - try: - cp.read(path) - except ConfigParser.Error as e: - raise exception.InvalidProjectConf(str(e)) - return cp - - def load_project_config(path=None): if not path or isdir(path): path = join(path or get_project_dir(), "platformio.ini") if not isfile(path): raise exception.NotPlatformIOProject( dirname(path) if path.endswith("platformio.ini") else path) - return _load_project_config(path) + cp = ProjectConfig() + try: + cp.read(path) + except ConfigParser.Error as e: + raise exception.InvalidProjectConf(str(e)) + return cp def parse_conf_multi_values(items): From 7cc4e8ce15e883cab33bf00465546bdadf6da646 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 24 Oct 2018 01:21:02 +0300 Subject: [PATCH 084/100] Bump version to 3.6.1rc6 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index f80850f6..53ff96fd 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, "1rc5") +VERSION = (3, 6, "1rc6") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From 3507290a20ff118c55d450774dbab0eb1290dede Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 25 Oct 2018 13:44:41 +0300 Subject: [PATCH 085/100] Shutdown PIO Home server before updating `tool-pioplus`; Update `tool-pioplus` to 1.4.11 --- platformio/commands/home.py | 11 ----------- platformio/commands/upgrade.py | 4 ++-- platformio/managers/core.py | 16 +++++++++++++++- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/platformio/commands/home.py b/platformio/commands/home.py index ae797781..cd6b86f6 100644 --- a/platformio/commands/home.py +++ b/platformio/commands/home.py @@ -15,7 +15,6 @@ import sys import click -import requests from platformio.managers.core import pioplus_call @@ -30,13 +29,3 @@ from platformio.managers.core import pioplus_call @click.option("--no-open", is_flag=True) def cli(*args, **kwargs): # pylint: disable=unused-argument pioplus_call(sys.argv[1:]) - - -def shutdown_servers(): - port = 8010 - while port < 9000: - try: - requests.get("http://127.0.0.1:%d?__shutdown__=1" % port) - port += 1 - except: # pylint: disable=bare-except - return diff --git a/platformio/commands/upgrade.py b/platformio/commands/upgrade.py index 47b43304..98430483 100644 --- a/platformio/commands/upgrade.py +++ b/platformio/commands/upgrade.py @@ -20,7 +20,7 @@ import click import requests from platformio import VERSION, __version__, exception, util -from platformio.commands.home import shutdown_servers +from platformio.managers.core import shutdown_piohome_servers @click.command( @@ -36,7 +36,7 @@ def cli(dev): click.secho("Please wait while upgrading PlatformIO ...", fg="yellow") # kill all PIO Home servers, they block `pioplus` binary - shutdown_servers() + shutdown_piohome_servers() to_develop = dev or not all(c.isdigit() for c in __version__ if c != ".") cmds = (["pip", "install", "--upgrade", diff --git a/platformio/managers/core.py b/platformio/managers/core.py index ef185cf9..3da9e4ec 100644 --- a/platformio/managers/core.py +++ b/platformio/managers/core.py @@ -17,13 +17,15 @@ import subprocess import sys from os.path import dirname, join +import requests + from platformio import __version__, exception, util from platformio.managers.package import PackageManager CORE_PACKAGES = { "contrib-piohome": "^1.0.2", "contrib-pysite": ">=0.3.2,<2", - "tool-pioplus": "^1.4.5", + "tool-pioplus": "^1.4.11", "tool-unity": "~1.20403.0", "tool-scons": "~2.20501.4" } @@ -92,10 +94,22 @@ def update_core_packages(only_check=False, silent=False): if not pkg_dir: continue if not silent or pm.outdated(pkg_dir, requirements): + if name == "tool-pioplus" and not only_check: + shutdown_piohome_servers() pm.update(name, requirements, only_check=only_check) return True +def shutdown_piohome_servers(): + port = 8010 + while port < 9000: + try: + requests.get("http://127.0.0.1:%d?__shutdown__=1" % port) + port += 1 + except: # pylint: disable=bare-except + return + + def pioplus_call(args, **kwargs): if "windows" in util.get_systype() and sys.version_info < (2, 7, 6): raise exception.PlatformioException( From 75105e18ba2d400b6a1f111bdce6fb9eba9977fc Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 25 Oct 2018 13:48:47 +0300 Subject: [PATCH 086/100] Wait 1 seconds on Windows when PIO Home shuts down --- platformio/managers/core.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platformio/managers/core.py b/platformio/managers/core.py index 3da9e4ec..0427ffec 100644 --- a/platformio/managers/core.py +++ b/platformio/managers/core.py @@ -16,6 +16,7 @@ import os import subprocess import sys from os.path import dirname, join +from time import sleep import requests @@ -96,6 +97,8 @@ def update_core_packages(only_check=False, silent=False): if not silent or pm.outdated(pkg_dir, requirements): if name == "tool-pioplus" and not only_check: shutdown_piohome_servers() + if "windows" in util.get_systype(): + sleep(1) pm.update(name, requirements, only_check=only_check) return True From fc8bffdd81302b2edd859d1084d2c0d3f30c08e7 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 25 Oct 2018 14:03:52 +0300 Subject: [PATCH 087/100] Ask user to remove manually a file on exception --- platformio/util.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/platformio/util.py b/platformio/util.py index c98320d1..a7dc6516 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -839,8 +839,10 @@ def rmtree_(path): os.remove(name) except Exception as e: # pylint: disable=broad-except click.secho( - "Please manually remove file `%s`" % name, fg="red", err=True) - raise e + "%s \n\nCould not remove the file `%s`. " + "Please remove it manually." % (str(e), name), + fg="red", + err=True) return rmtree(path, onerror=_onerror) @@ -857,8 +859,7 @@ except ImportError: magic_check_bytes = re.compile(b'([*?[])') def glob_escape(pathname): - """Escape all special characters. - """ + """Escape all special characters.""" # Escaping is done by wrapping any of "*?[" between square brackets. # Metacharacters do not work in the drive part and shouldn't be # escaped. From 8947b63e4187c5c5b96d276c65a21b9062079302 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 25 Oct 2018 14:12:09 +0300 Subject: [PATCH 088/100] Better formatting when asking to remove a file --- platformio/util.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platformio/util.py b/platformio/util.py index a7dc6516..3cb4765f 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -839,8 +839,7 @@ def rmtree_(path): os.remove(name) except Exception as e: # pylint: disable=broad-except click.secho( - "%s \n\nCould not remove the file `%s`. " - "Please remove it manually." % (str(e), name), + "%s \nPlease manually remove the file `%s`" % (str(e), name), fg="red", err=True) From cf2a2395e57d6ec201a789fab2f9105f15c2c663 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 25 Oct 2018 19:52:55 +0300 Subject: [PATCH 089/100] Sync new Atmel AVR boards --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index f5bb6e67..fe57023f 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit f5bb6e67da269f4b6ae40fd377cad9abc3674915 +Subproject commit fe57023f083c73be08efbc42986bdcb2eeac4664 From 2134022565cedc50ca8e3ffbd8a13254db6d30f0 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 26 Oct 2018 01:27:06 +0300 Subject: [PATCH 090/100] Print board's configuration URL --- platformio/builder/tools/pioplatform.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/platformio/builder/tools/pioplatform.py b/platformio/builder/tools/pioplatform.py index 0fe4aeda..13387f41 100644 --- a/platformio/builder/tools/pioplatform.py +++ b/platformio/builder/tools/pioplatform.py @@ -122,8 +122,10 @@ def LoadPioPlatform(env, variables): def PrintConfiguration(env): - platform_data = ["PLATFORM: %s >" % env.PioPlatform().title] + platform = env.PioPlatform() + platform_data = ["PLATFORM: %s >" % platform.title] system_data = ["SYSTEM:"] + configuration_data = ["CONFIGURATION:"] mcu = env.subst("$BOARD_MCU") f_cpu = env.subst("$BOARD_F_CPU") if mcu: @@ -142,11 +144,13 @@ def PrintConfiguration(env): flash = board_config.get("upload", {}).get("maximum_size") system_data.append("%s RAM (%s Flash)" % (util.format_filesize(ram), util.format_filesize(flash))) + configuration_data.append( + "https://docs.platformio.org/page/boards/%s/%s.html" % + (platform.name, board_config.id)) - if platform_data: - print " ".join(platform_data) - if system_data: - print " ".join(system_data) + for data in (configuration_data, platform_data, system_data): + if len(data) > 1: + print " ".join(data) # Debugging if not debug_tools: From 118f22bed309f9d2a66e9de868d187c3bf23e215 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 26 Oct 2018 01:27:57 +0300 Subject: [PATCH 091/100] PyLint fix --- platformio/builder/tools/pioplatform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/builder/tools/pioplatform.py b/platformio/builder/tools/pioplatform.py index 13387f41..512bf58a 100644 --- a/platformio/builder/tools/pioplatform.py +++ b/platformio/builder/tools/pioplatform.py @@ -23,7 +23,7 @@ from SCons.Script import COMMAND_LINE_TARGETS from platformio import exception, util from platformio.managers.platform import PlatformFactory -# pylint: disable=too-many-branches +# pylint: disable=too-many-branches, too-many-locals @util.memoized() From e96078b4e3cb360040069abfeb8c7eea8d56567d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 27 Oct 2018 14:18:47 +0300 Subject: [PATCH 092/100] Exclude upcoming ".pio" from VCS --- platformio/ide/tpls/atom/.gitignore.tpl | 1 + platformio/ide/tpls/clion/.gitignore.tpl | 1 + platformio/ide/tpls/clion/.idea/misc.xml.tpl | 3 +++ platformio/ide/tpls/emacs/.gitignore.tpl | 1 + platformio/ide/tpls/netbeans/nbproject/configurations.xml.tpl | 2 +- platformio/ide/tpls/vim/.gitignore.tpl | 1 + platformio/ide/tpls/vscode/.gitignore.tpl | 1 + 7 files changed, 9 insertions(+), 1 deletion(-) diff --git a/platformio/ide/tpls/atom/.gitignore.tpl b/platformio/ide/tpls/atom/.gitignore.tpl index 5dac9f52..f1520281 100644 --- a/platformio/ide/tpls/atom/.gitignore.tpl +++ b/platformio/ide/tpls/atom/.gitignore.tpl @@ -1,3 +1,4 @@ +.pio .pioenvs .piolibdeps .clang_complete diff --git a/platformio/ide/tpls/clion/.gitignore.tpl b/platformio/ide/tpls/clion/.gitignore.tpl index 081bde01..4c5921e1 100644 --- a/platformio/ide/tpls/clion/.gitignore.tpl +++ b/platformio/ide/tpls/clion/.gitignore.tpl @@ -1,3 +1,4 @@ +.pio .pioenvs .piolibdeps CMakeListsPrivate.txt diff --git a/platformio/ide/tpls/clion/.idea/misc.xml.tpl b/platformio/ide/tpls/clion/.idea/misc.xml.tpl index 2b0c16ca..9b483ee6 100644 --- a/platformio/ide/tpls/clion/.idea/misc.xml.tpl +++ b/platformio/ide/tpls/clion/.idea/misc.xml.tpl @@ -9,6 +9,9 @@ + + + diff --git a/platformio/ide/tpls/emacs/.gitignore.tpl b/platformio/ide/tpls/emacs/.gitignore.tpl index 18d8a15b..2c3fccfb 100644 --- a/platformio/ide/tpls/emacs/.gitignore.tpl +++ b/platformio/ide/tpls/emacs/.gitignore.tpl @@ -1,3 +1,4 @@ +.pio .pioenvs .piolibdeps .clang_complete diff --git a/platformio/ide/tpls/netbeans/nbproject/configurations.xml.tpl b/platformio/ide/tpls/netbeans/nbproject/configurations.xml.tpl index 897d7451..7c43f565 100644 --- a/platformio/ide/tpls/netbeans/nbproject/configurations.xml.tpl +++ b/platformio/ide/tpls/netbeans/nbproject/configurations.xml.tpl @@ -11,7 +11,7 @@ nbproject/private/launcher.properties - ^(nbproject|.pioenvs)$ + ^(nbproject|.pio|.pioenvs)$ . diff --git a/platformio/ide/tpls/vim/.gitignore.tpl b/platformio/ide/tpls/vim/.gitignore.tpl index 5dac9f52..f1520281 100644 --- a/platformio/ide/tpls/vim/.gitignore.tpl +++ b/platformio/ide/tpls/vim/.gitignore.tpl @@ -1,3 +1,4 @@ +.pio .pioenvs .piolibdeps .clang_complete diff --git a/platformio/ide/tpls/vscode/.gitignore.tpl b/platformio/ide/tpls/vscode/.gitignore.tpl index 6a010304..2de98aba 100644 --- a/platformio/ide/tpls/vscode/.gitignore.tpl +++ b/platformio/ide/tpls/vscode/.gitignore.tpl @@ -1,3 +1,4 @@ +.pio .pioenvs .piolibdeps .vscode/.browse.c_cpp.db* From 2007491be919d35c924d858ed84098628486b1e2 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 27 Oct 2018 14:20:33 +0300 Subject: [PATCH 093/100] Don't override existing ".gitignore" file --- platformio/commands/init.py | 31 +++++++++++------------------- platformio/ide/projectgenerator.py | 20 ++----------------- 2 files changed, 13 insertions(+), 38 deletions(-) diff --git a/platformio/commands/init.py b/platformio/commands/init.py index 8b8c7f80..376a9b1e 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -100,6 +100,9 @@ def cli( pg = ProjectGenerator(project_dir, ide, env_name) pg.generate() + init_ci_conf(project_dir) + init_cvs_ignore(project_dir) + if silent: return @@ -148,9 +151,6 @@ def init_base_project(project_dir): join(util.get_source_dir(), "projectconftpl.ini"), join(project_dir, "platformio.ini")) - init_ci_conf(project_dir) - init_cvs_ignore(project_dir) - with util.cd(project_dir): dir_to_readme = [ (util.get_projectsrc_dir(), None), @@ -278,7 +278,10 @@ More information about PIO Unit Testing: def init_ci_conf(project_dir): - with open(join(project_dir, ".travis.yml"), "w") as f: + conf_path = join(project_dir, ".travis.yml") + if isfile(conf_path): + return + with open(conf_path, "w") as f: f.write("""# Continuous Integration (CI) is the practice, in software # engineering, of merging all developer working copies with a shared mainline # several times a day < https://docs.platformio.org/page/ci/index.html > @@ -350,23 +353,11 @@ def init_ci_conf(project_dir): def init_cvs_ignore(project_dir): - ignore_path = join(project_dir, ".gitignore") - default = [".pioenvs\n", ".piolibdeps\n"] - current = [] - modified = False - if isfile(ignore_path): - with open(ignore_path) as fp: - current = fp.readlines() - if current and not current[-1].endswith("\n"): - current[-1] += "\n" - for d in default: - if d not in current: - modified = True - current.append(d) - if not modified: + conf_path = join(project_dir, ".gitignore") + if isfile(conf_path): return - with open(ignore_path, "w") as fp: - fp.writelines(current) + with open(conf_path, "w") as fp: + fp.writelines([".pio\n", ".pioenvs\n", ".piolibdeps\n"]) def fill_project_envs(ctx, project_dir, board_ids, project_option, env_prefix, diff --git a/platformio/ide/projectgenerator.py b/platformio/ide/projectgenerator.py index da3faab0..efec49ad 100644 --- a/platformio/ide/projectgenerator.py +++ b/platformio/ide/projectgenerator.py @@ -127,24 +127,8 @@ class ProjectGenerator(object): @staticmethod def _merge_contents(dst_path, contents): - file_name = basename(dst_path) - - # merge .gitignore - if file_name == ".gitignore": - if not isfile(dst_path): - return - modified = False - default = [l.strip() for l in contents.split("\n")] - with open(dst_path) as fp: - current = [l.strip() for l in fp.readlines()] - for d in default: - if d and d not in current: - modified = True - current.append(d) - if not modified: - return - contents = "\n".join(current) + "\n" - + if basename(dst_path) == ".gitignore" and isfile(dst_path): + return with open(dst_path, "w") as f: f.write(contents) From 5c278b54f7d745962e63340798bdc95c25ac4b22 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 27 Oct 2018 15:24:10 +0300 Subject: [PATCH 094/100] Use "super" when calling parent class // Issue #895 --- platformio/managers/core.py | 11 ++++++----- platformio/managers/lib.py | 2 +- platformio/telemetry.py | 2 +- platformio/unpacker.py | 4 ++-- platformio/util.py | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/platformio/managers/core.py b/platformio/managers/core.py index 0427ffec..755c2134 100644 --- a/platformio/managers/core.py +++ b/platformio/managers/core.py @@ -39,11 +39,12 @@ PIOPLUS_AUTO_UPDATES_MAX = 100 class CorePackageManager(PackageManager): def __init__(self): - PackageManager.__init__(self, join(util.get_home_dir(), "packages"), [ - "https://dl.bintray.com/platformio/dl-packages/manifest.json", - "http%s://dl.platformio.org/packages/manifest.json" % - ("" if sys.version_info < (2, 7, 9) else "s") - ]) + super(CorePackageManager, self).__init__( + join(util.get_home_dir(), "packages"), [ + "https://dl.bintray.com/platformio/dl-packages/manifest.json", + "http%s://dl.platformio.org/packages/manifest.json" % + ("" if sys.version_info < (2, 7, 9) else "s") + ]) def install( # pylint: disable=keyword-arg-before-vararg self, diff --git a/platformio/managers/lib.py b/platformio/managers/lib.py index 0c6aa77d..9042e624 100644 --- a/platformio/managers/lib.py +++ b/platformio/managers/lib.py @@ -32,7 +32,7 @@ class LibraryManager(BasePkgManager): def __init__(self, package_dir=None): if not package_dir: package_dir = join(util.get_home_dir(), "lib") - BasePkgManager.__init__(self, package_dir) + super(LibraryManager, self).__init__(package_dir) @property def manifest_names(self): diff --git a/platformio/telemetry.py b/platformio/telemetry.py index 90a0a150..392c2cbe 100644 --- a/platformio/telemetry.py +++ b/platformio/telemetry.py @@ -61,7 +61,7 @@ class MeasurementProtocol(TelemetryBase): } def __init__(self): - TelemetryBase.__init__(self) + super(MeasurementProtocol, self).__init__() self['v'] = 1 self['tid'] = self.TID self['cid'] = app.get_cid() diff --git a/platformio/unpacker.py b/platformio/unpacker.py index d747ee5e..8f55b42d 100644 --- a/platformio/unpacker.py +++ b/platformio/unpacker.py @@ -48,7 +48,7 @@ class ArchiveBase(object): class TARArchive(ArchiveBase): def __init__(self, archpath): - ArchiveBase.__init__(self, tarfile_open(archpath)) + super(TARArchive, self).__init__(tarfile_open(archpath)) def get_items(self): return self._afo.getmembers() @@ -60,7 +60,7 @@ class TARArchive(ArchiveBase): class ZIPArchive(ArchiveBase): def __init__(self, archpath): - ArchiveBase.__init__(self, ZipFile(archpath)) + super(ZIPArchive, self).__init__(ZipFile(archpath)) @staticmethod def preserve_permissions(item, dest_dir): diff --git a/platformio/util.py b/platformio/util.py index 3cb4765f..680f9fd4 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -78,7 +78,7 @@ class ProjectConfig(ConfigParser.ConfigParser): class AsyncPipe(Thread): def __init__(self, outcallback=None): - Thread.__init__(self) + super(AsyncPipe, self).__init__() self.outcallback = outcallback self._fd_read, self._fd_write = os.pipe() From 729178731cc9c76f06dcd82f7ae46554ebfa1beb Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 27 Oct 2018 20:07:07 +0300 Subject: [PATCH 095/100] Improve a loading speed of PIO Home "Recent News" --- HISTORY.rst | 1 + platformio/managers/core.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 90bc844d..47fe2712 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -10,6 +10,7 @@ PlatformIO 3.0 * Generate an `include `__ and `test `__ directories with a README file when initializing a new project * Support in-line comments for multi-line value (``lib_deps``, ``build_flags``, etc) in `“platformio.ini” (Project Configuration File) `__ * Added ``$PROJECT_HASH`` template variable for `build_dir `__. One of the use cases is setting a global storage for project artifacts using `PLATFORMIO_BUILD_DIR `__ system environment variable. For example, ``/tmp/pio-build/$PROJECT_HASH`` (Unix) or ``%TEMP%/pio-build/$PROJECT_HASH`` (Windows) +* Improved a loading speed of PIO Home "Recent News" * Improved `PIO Unified Debugger `__ for "mbed" framework and fixed issue with missed local variables * Introduced `"Release" and "Debug" Build Configurations `__ * Build project in "Debug Mode" including debugging information with a new ``debug`` target using `platformio run `__ command or `targets `__ option in ``platformio.ini``. The last option allows avoiding project rebuilding between "Run/Debug" modes. diff --git a/platformio/managers/core.py b/platformio/managers/core.py index 755c2134..0ea1cb15 100644 --- a/platformio/managers/core.py +++ b/platformio/managers/core.py @@ -26,7 +26,7 @@ from platformio.managers.package import PackageManager CORE_PACKAGES = { "contrib-piohome": "^1.0.2", "contrib-pysite": ">=0.3.2,<2", - "tool-pioplus": "^1.4.11", + "tool-pioplus": "^1.5.0", "tool-unity": "~1.20403.0", "tool-scons": "~2.20501.4" } From 080369f5979d2315a157782990ab02da4e5145d7 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 27 Oct 2018 20:22:11 +0300 Subject: [PATCH 096/100] Make "print" compatible between Py2 & Py3 --- .pylintrc | 2 +- platformio/builder/main.py | 8 ++++---- platformio/builder/tools/piolib.py | 16 +++++++-------- platformio/builder/tools/piomisc.py | 6 +++--- platformio/builder/tools/pioplatform.py | 4 ++-- platformio/builder/tools/pioupload.py | 26 ++++++++++++------------- platformio/util.py | 2 +- 7 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.pylintrc b/.pylintrc index 66581ace..aad06b28 100644 --- a/.pylintrc +++ b/.pylintrc @@ -20,4 +20,4 @@ confidence= # --disable=W" # disable=import-star-module-level,old-octal-literal,oct-method,print-statement,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating -disable=locally-disabled,missing-docstring,invalid-name,too-few-public-methods,redefined-variable-type,import-error,similarities,unsupported-membership-test,unsubscriptable-object,ungrouped-imports,cyclic-import +disable=locally-disabled,missing-docstring,invalid-name,too-few-public-methods,redefined-variable-type,import-error,similarities,unsupported-membership-test,unsubscriptable-object,ungrouped-imports,cyclic-import,superfluous-parens diff --git a/platformio/builder/main.py b/platformio/builder/main.py index 7093fd97..5f2856ac 100644 --- a/platformio/builder/main.py +++ b/platformio/builder/main.py @@ -135,7 +135,7 @@ if env.GetOption('clean'): env.PioClean(env.subst("$BUILD_DIR")) env.Exit(0) elif not int(ARGUMENTS.get("PIOVERBOSE", 0)): - print "Verbose mode can be enabled via `-v, --verbose` option" + print("Verbose mode can be enabled via `-v, --verbose` option") # Handle custom variables from system environment for var in ("BUILD_FLAGS", "SRC_BUILD_FLAGS", "SRC_FILTER", "EXTRA_SCRIPTS", @@ -198,13 +198,13 @@ AlwaysBuild(env.Alias("__test", DEFAULT_TARGETS)) ############################################################################## if "envdump" in COMMAND_LINE_TARGETS: - print env.Dump() + print(env.Dump()) env.Exit(0) if "idedata" in COMMAND_LINE_TARGETS: try: - print "\n%s\n" % util.path_to_unicode( - json.dumps(env.DumpIDEData(), ensure_ascii=False)) + print("\n%s\n" % util.path_to_unicode( + json.dumps(env.DumpIDEData(), ensure_ascii=False))) env.Exit(0) except UnicodeDecodeError: sys.stderr.write( diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index a777921a..d9e5733c 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -373,7 +373,7 @@ class LibBuilderBase(object): if isfile("%s.%s" % (_f_part, ext)): incs.append( self.env.File("%s.%s" % (_f_part, ext))) - # print path, map(lambda n: n.get_abspath(), incs) + # print(path, map(lambda n: n.get_abspath(), incs)) for inc in incs: if inc not in result: result.append(inc) @@ -851,24 +851,24 @@ def ConfigureProjectLibBuilder(env): project = ProjectAsLibBuilder(env, "$PROJECT_DIR") ldf_mode = LibBuilderBase.lib_ldf_mode.fget(project) - print "Library Dependency Finder -> http://bit.ly/configure-pio-ldf" - print "LDF MODES: FINDER(%s) COMPATIBILITY(%s)" % (ldf_mode, - project.lib_compat_mode) + print("Library Dependency Finder -> http://bit.ly/configure-pio-ldf") + print("LDF MODES: FINDER(%s) COMPATIBILITY(%s)" % + (ldf_mode, project.lib_compat_mode)) lib_builders = env.GetLibBuilders() - print "Collected %d compatible libraries" % len(lib_builders) + print("Collected %d compatible libraries" % len(lib_builders)) - print "Scanning dependencies..." + print("Scanning dependencies...") project.search_deps_recursive() if ldf_mode.startswith("chain") and project.depbuilders: correct_found_libs(lib_builders) if project.depbuilders: - print "Dependency Graph" + print("Dependency Graph") print_deps_tree(project) else: - print "No dependencies" + print("No dependencies") return project diff --git a/platformio/builder/tools/piomisc.py b/platformio/builder/tools/piomisc.py index ec304382..be030f39 100644 --- a/platformio/builder/tools/piomisc.py +++ b/platformio/builder/tools/piomisc.py @@ -274,13 +274,13 @@ def VerboseAction(_, act, actstr): def PioClean(env, clean_dir): if not isdir(clean_dir): - print "Build environment is clean" + print("Build environment is clean") env.Exit(0) for root, _, files in walk(clean_dir): for file_ in files: remove(join(root, file_)) - print "Removed %s" % relpath(join(root, file_)) - print "Done cleaning" + print("Removed %s" % relpath(join(root, file_))) + print("Done cleaning") util.rmtree_(clean_dir) env.Exit(0) diff --git a/platformio/builder/tools/pioplatform.py b/platformio/builder/tools/pioplatform.py index 512bf58a..3033ea25 100644 --- a/platformio/builder/tools/pioplatform.py +++ b/platformio/builder/tools/pioplatform.py @@ -150,7 +150,7 @@ def PrintConfiguration(env): for data in (configuration_data, platform_data, system_data): if len(data) > 1: - print " ".join(data) + print(" ".join(data)) # Debugging if not debug_tools: @@ -172,7 +172,7 @@ def PrintConfiguration(env): if external: data.append("EXTERNAL(%s)" % ", ".join(sorted(external))) - print "DEBUG: %s" % " ".join(data) + print("DEBUG: %s" % " ".join(data)) def exists(_): diff --git a/platformio/builder/tools/pioupload.py b/platformio/builder/tools/pioupload.py index 0614cbd7..f9628085 100644 --- a/platformio/builder/tools/pioupload.py +++ b/platformio/builder/tools/pioupload.py @@ -43,7 +43,7 @@ def FlushSerialBuffer(env, port): def TouchSerialPort(env, port, baudrate): port = env.subst(port) - print "Forcing reset using %dbps open/close on port %s" % (baudrate, port) + print("Forcing reset using %dbps open/close on port %s" % (baudrate, port)) try: s = Serial(port=port, baudrate=baudrate) s.setDTR(False) @@ -54,7 +54,7 @@ def TouchSerialPort(env, port, baudrate): def WaitForNewSerialPort(env, before): - print "Waiting for the new upload port..." + print("Waiting for the new upload port...") prev_port = env.subst("$UPLOAD_PORT") new_port = None elapsed = 0 @@ -146,7 +146,7 @@ def AutodetectUploadPort(*args, **kwargs): return port if "UPLOAD_PORT" in env and not _get_pattern(): - print env.subst("Use manually specified: $UPLOAD_PORT") + print(env.subst("Use manually specified: $UPLOAD_PORT")) return if (env.subst("$UPLOAD_PROTOCOL") == "mbed" @@ -161,7 +161,7 @@ def AutodetectUploadPort(*args, **kwargs): env.Replace(UPLOAD_PORT=_look_for_serial_port()) if env.subst("$UPLOAD_PORT"): - print env.subst("Auto-detected: $UPLOAD_PORT") + print(env.subst("Auto-detected: $UPLOAD_PORT")) else: sys.stderr.write( "Error: Please specify `upload_port` for environment or use " @@ -180,8 +180,8 @@ def UploadToDisk(_, target, source, env): continue copyfile(fpath, join(env.subst("$UPLOAD_PORT"), "%s.%s" % (progname, ext))) - print "Firmware has been successfully uploaded.\n"\ - "(Some boards may require manual hard reset)" + print("Firmware has been successfully uploaded.\n" + "(Some boards may require manual hard reset)") def CheckUploadSize(_, target, source, env): @@ -246,14 +246,14 @@ def CheckUploadSize(_, target, source, env): program_size = _calculate_size(output, env.get("SIZEPROGREGEXP")) data_size = _calculate_size(output, env.get("SIZEDATAREGEXP")) - print "Memory Usage -> http://bit.ly/pio-memory-usage" + print("Memory Usage -> http://bit.ly/pio-memory-usage") if data_max_size and data_size > -1: - print "DATA: %s" % _format_availale_bytes(data_size, data_max_size) + print("DATA: %s" % _format_availale_bytes(data_size, data_max_size)) if program_size > -1: - print "PROGRAM: %s" % _format_availale_bytes(program_size, - program_max_size) + print("PROGRAM: %s" % _format_availale_bytes(program_size, + program_max_size)) if int(ARGUMENTS.get("PIOVERBOSE", 0)): - print output + print(output) # raise error # if data_max_size and data_size > data_max_size: @@ -275,9 +275,9 @@ def PrintUploadInfo(env): available.extend(env.BoardConfig().get("upload", {}).get( "protocols", [])) if available: - print "AVAILABLE: %s" % ", ".join(sorted(set(available))) + print("AVAILABLE: %s" % ", ".join(sorted(set(available)))) if configured: - print "CURRENT: upload_protocol = %s" % configured + print("CURRENT: upload_protocol = %s" % configured) def exists(_): diff --git a/platformio/util.py b/platformio/util.py index 680f9fd4..7e45fb73 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -100,7 +100,7 @@ class AsyncPipe(Thread): if self.outcallback: self.outcallback(line) else: - print line + print(line) self._pipe_reader.close() def close(self): From e94d758131dc1b05847db614a831549ddead9d4f Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 27 Oct 2018 20:51:55 +0300 Subject: [PATCH 097/100] Use "items" instead of "iteritems" (PY2/3) // Issue #895 --- platformio/commands/ci.py | 2 +- platformio/commands/device.py | 6 +++--- platformio/commands/lib.py | 2 +- platformio/managers/platform.py | 2 +- platformio/telemetry.py | 2 +- platformio/util.py | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/platformio/commands/ci.py b/platformio/commands/ci.py index 0db1daa9..0abf72d2 100644 --- a/platformio/commands/ci.py +++ b/platformio/commands/ci.py @@ -86,7 +86,7 @@ def cli( # pylint: disable=too-many-arguments app.set_session_var("force_option", True) _clean_dir(build_dir) - for dir_name, patterns in dict(lib=lib, src=src).iteritems(): + for dir_name, patterns in dict(lib=lib, src=src).items(): if not patterns: continue contents = [] diff --git a/platformio/commands/device.py b/platformio/commands/device.py index 78bb7cdc..450b52bd 100644 --- a/platformio/commands/device.py +++ b/platformio/commands/device.py @@ -55,7 +55,7 @@ def device_list( # pylint: disable=too-many-branches "mdns": "Multicast DNS Services" } - for key, value in data.iteritems(): + for key, value in data.items(): if not single_key: click.secho(titles[key], bold=True) click.echo("=" * len(titles[key])) @@ -85,7 +85,7 @@ def device_list( # pylint: disable=too-many-branches if item['properties']: click.echo("Properties: %s" % ("; ".join([ "%s=%s" % (k, v) - for k, v in item['properties'].iteritems() + for k, v in item['properties'].items() ]))) click.echo("") @@ -182,7 +182,7 @@ def device_monitor(**kwargs): # pylint: disable=too-many-branches kwargs['port'] = ports[0]['port'] sys.argv = ["monitor"] - for k, v in kwargs.iteritems(): + for k, v in kwargs.items(): if k in ("port", "baud", "rts", "dtr", "environment", "project_dir"): continue k = "--" + k.replace("_", "-") diff --git a/platformio/commands/lib.py b/platformio/commands/lib.py index af107d3d..c305dad6 100644 --- a/platformio/commands/lib.py +++ b/platformio/commands/lib.py @@ -203,7 +203,7 @@ def lib_search(query, json_output, page, noninteractive, **filters): if not isinstance(query, list): query = list(query) - for key, values in filters.iteritems(): + for key, values in filters.items(): for value in values: query.append('%s:"%s"' % (key, value)) diff --git a/platformio/managers/platform.py b/platformio/managers/platform.py index 04c4d931..35e842db 100644 --- a/platformio/managers/platform.py +++ b/platformio/managers/platform.py @@ -604,7 +604,7 @@ class PlatformBase( # pylint: disable=too-many-public-methods # 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(): + for name, opts in self.packages.items(): if opts.get("type") == "uploader": self.packages[name]['optional'] = False # skip all packages in "nobuild" mode diff --git a/platformio/telemetry.py b/platformio/telemetry.py index 392c2cbe..7394654c 100644 --- a/platformio/telemetry.py +++ b/platformio/telemetry.py @@ -291,7 +291,7 @@ def measure_ci(): } } - for key, value in envmap.iteritems(): + for key, value in envmap.items(): if getenv(key, "").lower() != "true": continue event.update({"action": key, "label": value['label']}) diff --git a/platformio/util.py b/platformio/util.py index 7e45fb73..c5433ee3 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -413,7 +413,7 @@ def exec_command(*args, **kwargs): if isinstance(kwargs[s], AsyncPipe): result[s[3:]] = "\n".join(kwargs[s].get_buffer()) - for k, v in result.iteritems(): + for k, v in result.items(): if v and isinstance(v, basestring): result[k].strip() From 7a0c1e13f352ae517d17a7ab3dec49424e20066d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 28 Oct 2018 00:39:42 +0300 Subject: [PATCH 098/100] Bump version to 3.6.1rc7 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 53ff96fd..04dd918b 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, "1rc6") +VERSION = (3, 6, "1rc7") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From 8b74b1299007715bb5f5d383acfd66e56ae6052b Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 29 Oct 2018 14:02:29 +0200 Subject: [PATCH 099/100] Don't recreate git ignore and travis configs when project is already inited --- platformio/commands/init.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/platformio/commands/init.py b/platformio/commands/init.py index 376a9b1e..1e3cbeb9 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -87,6 +87,7 @@ def cli( click.echo("%s - Project Configuration File" % click.style( "platformio.ini", fg="cyan")) + is_new_project = util.is_platformio_project(project_dir) init_base_project(project_dir) if board: @@ -100,18 +101,18 @@ def cli( pg = ProjectGenerator(project_dir, ide, env_name) pg.generate() - init_ci_conf(project_dir) - init_cvs_ignore(project_dir) + if is_new_project: + init_ci_conf(project_dir) + init_cvs_ignore(project_dir) if silent: return - project_inited_before = util.is_platformio_project(project_dir) if ide: click.secho( "\nProject has been successfully %s including configuration files " - "for `%s` IDE." % - ("updated" if project_inited_before else "initialized", ide), + "for `%s` IDE." % ("initialized" if is_new_project else "updated", + ide), fg="green") else: click.secho( @@ -121,7 +122,7 @@ def cli( "- upload firmware to a target\n" "`pio run --target clean` - clean project (remove compiled files)" "\n`pio run --help` - additional information" % - ("updated" if project_inited_before else "initialized"), + ("initialized" if is_new_project else "updated"), fg="green") From 331cd0aa0df7c42b20bb8e1fa1668096873f428d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 29 Oct 2018 14:10:42 +0200 Subject: [PATCH 100/100] Bump version to 3.6.1 --- HISTORY.rst | 2 +- docs | 2 +- platformio/__init__.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 47fe2712..5ea68cce 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,7 +4,7 @@ Release Notes PlatformIO 3.0 -------------- -3.6.1 (2018-??-??) +3.6.1 (2018-10-29) ~~~~~~~~~~~~~~~~~~ * Generate an `include `__ and `test `__ directories with a README file when initializing a new project diff --git a/docs b/docs index fe57023f..30c88f62 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit fe57023f083c73be08efbc42986bdcb2eeac4664 +Subproject commit 30c88f624780bd003f105bab7ddfc56f20de850c diff --git a/platformio/__init__.py b/platformio/__init__.py index 04dd918b..b980d065 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, "1rc7") +VERSION = (3, 6, 1) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" @@ -26,8 +26,8 @@ __description__ = ( "FPGA, CMSIS, SPL, AVR, Samsung ARTIK, libOpenCM3") __url__ = "https://platformio.org" -__author__ = "Ivan Kravets" -__email__ = "me@ikravets.com" +__author__ = "PlatformIO" +__email__ = "contact@platformio.org" __license__ = "Apache Software License" __copyright__ = "Copyright 2014-present PlatformIO"