Skip to content

Commit

Permalink
Merge branch 'release/v4.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Feb 12, 2020
2 parents 5a89388 + 176cf17 commit f7d4bf5
Show file tree
Hide file tree
Showing 81 changed files with 2,354 additions and 782 deletions.
44 changes: 43 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,47 @@ Release Notes
PlatformIO Core 4.0
-------------------

4.2.0 (2020-02-12)
~~~~~~~~~~~~~~~~~~

* `PlatformIO Home 3.1 <http://docs.platformio.org/page/home/index.html>`__:

- Project Manager
- Project Configuration UI for `"platformio.ini" <https://docs.platformio.org/page/projectconf.html>`__

* `PIO Check <http://docs.platformio.org/page/plus/pio-check.html>`__ – automated code analysis without hassle:

- Added support for `PVS-Studio <https://docs.platformio.org/page/plus/check-tools/pvs-studio.html>`__ static code analyzer

* Initial support for `Project Manager <https://docs.platformio.org/page/userguide/project/index.html>`_ CLI:

- Show computed project configuration with a new `platformio project config <https://docs.platformio.org/page/userguide/project/cmd_config.html>`_ command or dump to JSON with ``platformio project config --json-output`` (`issue #3335 <https://github.com/platformio/platformio-core/issues/3335>`_)
- Moved ``platformio init`` command to `platformio project init <https://docs.platformio.org/page/userguide/project/cmd_init.html>`_

* Generate `compilation database "compile_commands.json" <https://docs.platformio.org/page/faq.html#compilation-database-compile-commands-json>`_ (`issue #2990 <https://github.com/platformio/platformio-core/issues/2990>`_)
* Control debug flags and optimization level with a new `debug_build_flags <https://docs.platformio.org/page/projectconf/section_env_debug.html#debug-build-flags>`__ option
* Install a dev-platform with ALL declared packages using a new ``--with-all-packages`` option for `pio platform install <https://docs.platformio.org/page/userguide/platforms/cmd_install.html>`__ command (`issue #3345 <https://github.com/platformio/platformio-core/issues/3345>`_)
* Added support for "pythonPackages" in `platform.json <https://docs.platformio.org/page/platforms/creating_platform.html#manifest-file-platform-json>`__ manifest (PlatformIO Package Manager will install dependent Python packages from PyPi registry automatically when dev-platform is installed)
* Handle project configuration (monitor, test, and upload options) for PIO Remote commands (`issue #2591 <https://github.com/platformio/platformio-core/issues/2591>`_)
* Added support for Arduino's library.properties ``depends`` field (`issue #2781 <https://github.com/platformio/platformio-core/issues/2781>`_)
* Autodetect monitor port for boards with specified HWIDs (`issue #3349 <https://github.com/platformio/platformio-core/issues/3349>`_)
* Updated SCons tool to 3.1.2
* Updated Unity tool to 2.5.0
* Made package ManifestSchema compatible with marshmallow >= 3 (`issue #3296 <https://github.com/platformio/platformio-core/issues/3296>`_)
* Warn about broken library manifest when scanning dependencies (`issue #3268 <https://github.com/platformio/platformio-core/issues/3268>`_)
* Do not overwrite custom items in VSCode's "extensions.json" (`issue #3374 <https://github.com/platformio/platformio-core/issues/3374>`_)
* Fixed an issue when ``env.BoardConfig()`` does not work for custom boards in extra scripts of libraries (`issue #3264 <https://github.com/platformio/platformio-core/issues/3264>`_)
* Fixed an issue with "start-group/end-group" linker flags on Native development platform (`issue #3282 <https://github.com/platformio/platformio-core/issues/3282>`_)
* Fixed default PIO Unified Debugger configuration for `J-Link probe <http://docs.platformio.org/page/plus/debug-tools/jlink.html>`__
* Fixed an issue with LDF when header files not found if "libdeps_dir" is within a subdirectory of "lib_extra_dirs" (`issue #3311 <https://github.com/platformio/platformio-core/issues/3311>`_)
* Fixed an issue "Import of non-existent variable 'projenv''" when development platform does not call "env.BuildProgram()" (`issue #3315 <https://github.com/platformio/platformio-core/issues/3315>`_)
* Fixed an issue when invalid CLI command does not return non-zero exit code
* Fixed an issue when Project Inspector crashes when flash use > 100% (`issue #3368 <https://github.com/platformio/platformio-core/issues/3368>`_)
* Fixed a "UnicodeDecodeError" when listing built-in libraries on macOS with Python 2.7 (`issue #3370 <https://github.com/platformio/platformio-core/issues/3370>`_)
* Fixed an issue with improperly handled compiler flags with space symbols in VSCode template (`issue #3364 <https://github.com/platformio/platformio-core/issues/3364>`_)
* Fixed an issue when no error is raised if referred parameter (interpolation) is missing in a project configuration file (`issue #3279 <https://github.com/platformio/platformio-core/issues/3279>`_)


4.1.0 (2019-11-07)
~~~~~~~~~~~~~~~~~~

Expand All @@ -18,8 +59,9 @@ PlatformIO Core 4.0
- Unused variables or functions
- Out of scope memory usage.

* `PlatformIO Home 3.0 <http://docs.platformio.org/page/home/index.html>`__ and Project Inspection
* `PlatformIO Home 3.0 <http://docs.platformio.org/page/home/index.html>`__:

- Project Inspection
- Static Code Analysis
- Firmware File Explorer
- Firmware Memory Inspection
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include LICENSE
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ isort:
isort -rc ./platformio
isort -rc ./tests

black:
format:
black --target-version py27 ./platformio
black --target-version py27 ./tests

test:
py.test --verbose --capture=no --exitfirst -n 3 --dist=loadscope tests --ignore tests/test_examples.py
py.test --verbose --capture=no --exitfirst -n 6 --dist=loadscope tests --ignore tests/test_examples.py

before-commit: isort black lint test
before-commit: isort format lint test

clean-docs:
rm -rf docs/_build
Expand Down
24 changes: 13 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ PlatformIO
.. image:: https://raw.githubusercontent.com/platformio/platformio-web/develop/app/images/platformio-ide-laptop.png
:target: https://platformio.org?utm_source=github&utm_medium=core

`PlatformIO <https://platformio.org?utm_source=github&utm_medium=core>`_ an open source ecosystem for embedded development
`PlatformIO <https://platformio.org?utm_source=github&utm_medium=core>`_ a new generation ecosystem for embedded development

* **Cross-platform IDE** and **Unified Debugger**
* **Static Code Analyzer** and **Remote Unit Testing**
* **Multi-platform** and **Multi-architecture Build System**
* **Firmware File Explorer** and **Memory Inspection**.
* Open source, maximum permissive Apache 2.0 license
* Cross-platform IDE and Unified Debugger
* Static Code Analyzer and Remote Unit Testing
* Multi-platform and Multi-architecture Build System
* Firmware File Explorer and Memory Inspection.

Get Started
-----------
Expand Down Expand Up @@ -91,10 +92,10 @@ Development Platforms
* `Microchip PIC32 <https://platformio.org/platforms/microchippic32?utm_source=github&utm_medium=core>`_
* `Nordic nRF51 <https://platformio.org/platforms/nordicnrf51?utm_source=github&utm_medium=core>`_
* `Nordic nRF52 <https://platformio.org/platforms/nordicnrf52?utm_source=github&utm_medium=core>`_
* `Nuclei <https://platformio.org/platforms/nuclei?utm_source=github&utm_medium=core>`_
* `NXP LPC <https://platformio.org/platforms/nxplpc?utm_source=github&utm_medium=core>`_
* `RISC-V <https://platformio.org/platforms/riscv?utm_source=github&utm_medium=core>`_
* `RISC-V GAP <https://platformio.org/platforms/riscv_gap?utm_source=github&utm_medium=core>`_
* `Samsung ARTIK <https://platformio.org/platforms/samsung_artik?utm_source=github&utm_medium=core>`_
* `Shakti <https://platformio.org/platforms/shakti?utm_source=github&utm_medium=core>`_
* `Silicon Labs EFM32 <https://platformio.org/platforms/siliconlabsefm32?utm_source=github&utm_medium=core>`_
* `ST STM32 <https://platformio.org/platforms/ststm32?utm_source=github&utm_medium=core>`_
Expand All @@ -108,24 +109,25 @@ Frameworks
----------

* `Arduino <https://platformio.org/frameworks/arduino?utm_source=github&utm_medium=core>`_
* `ARTIK SDK <https://platformio.org/frameworks/artik-sdk?utm_source=github&utm_medium=core>`_
* `CMSIS <https://platformio.org/frameworks/cmsis?utm_source=github&utm_medium=core>`_
* `Energia <https://platformio.org/frameworks/energia?utm_source=github&utm_medium=core>`_
* `ESP-IDF <https://platformio.org/frameworks/espidf?utm_source=github&utm_medium=core>`_
* `ESP8266 Non-OS SDK <https://platformio.org/frameworks/esp8266-nonos-sdk?utm_source=github&utm_medium=core>`_
* `ESP8266 RTOS SDK <https://platformio.org/frameworks/esp8266-rtos-sdk?utm_source=github&utm_medium=core>`_
* `Freedom E SDK <https://platformio.org/frameworks/freedom-e-sdk?utm_source=github&utm_medium=core>`_
* `GigaDevice GD32V SDK <https://platformio.org/frameworks/gd32vf103-sdk?utm_source=github&utm_medium=core>`_
* `Kendryte Standalone SDK <https://platformio.org/frameworks/kendryte-standalone-sdk?utm_source=github&utm_medium=core>`_
* `Kendryte FreeRTOS SDK <https://platformio.org/frameworks/kendryte-freertos-sdk?utm_source=github&utm_medium=core>`_
* `libOpenCM3 <https://platformio.org/frameworks/libopencm3?utm_source=github&utm_medium=core>`_
* `mbed <https://platformio.org/frameworks/mbed?utm_source=github&utm_medium=core>`_
* `Mbed <https://platformio.org/frameworks/mbed?utm_source=github&utm_medium=core>`_
* `Nuclei SDK <https://platformio.org/frameworks/nuclei-sdk?utm_source=github&utm_medium=core>`_
* `PULP OS <https://platformio.org/frameworks/pulp-os?utm_source=github&utm_medium=core>`_
* `Pumbaa <https://platformio.org/frameworks/pumbaa?utm_source=github&utm_medium=core>`_
* `Shakti <https://platformio.org/frameworks/shakti?utm_source=github&utm_medium=core>`_
* `Shakti SDK <https://platformio.org/frameworks/shakti-sdk?utm_source=github&utm_medium=core>`_
* `Simba <https://platformio.org/frameworks/simba?utm_source=github&utm_medium=core>`_
* `SPL <https://platformio.org/frameworks/spl?utm_source=github&utm_medium=core>`_
* `STM32Cube <https://platformio.org/frameworks/stm32cube?utm_source=github&utm_medium=core>`_
* `Tizen RT <https://platformio.org/frameworks/tizenrt?utm_source=github&utm_medium=core>`_
* `WiringPi <https://platformio.org/frameworks/wiringpi?utm_source=github&utm_medium=core>`_
* `Zephyr <https://platformio.org/frameworks/zephyr?utm_source=github&utm_medium=core>`_

Contributing
------------
Expand Down
2 changes: 1 addition & 1 deletion docs
Submodule docs updated 445 files
2 changes: 1 addition & 1 deletion examples
Submodule examples updated 48 files
+5 −4 README.md
+95 −74 frameworks/arduino/README.md
+24 −19 frameworks/cmsis/README.md
+4 −4 frameworks/esp8266-nonos-sdk/README.md
+4 −4 frameworks/esp8266-rtos-sdk/README.md
+11 −11 frameworks/espidf/README.md
+8 −5 frameworks/freedom-e-sdk/README.md
+1 −1 frameworks/gd32vf103-sdk/README.md
+1 −1 frameworks/kendryte-freertos-sdk/README.md
+1 −1 frameworks/kendryte-standalone-sdk/README.md
+26 −21 frameworks/libopencm3/README.md
+90 −66 frameworks/mbed/README.md
+18 −0 frameworks/nuclei-sdk/README.md
+9 −9 frameworks/pulp-os/README.md
+11 −11 frameworks/pumbaa/README.md
+29 −26 frameworks/simba/README.md
+27 −22 frameworks/spl/README.md
+24 −19 frameworks/stm32cube/README.md
+1 −1 frameworks/wiringpi/README.md
+131 −0 frameworks/zephyr/README.md
+1 −1 platforms/aceinna_imu/README.md
+6 −6 platforms/atmelavr/README.md
+14 −0 platforms/atmelmegaavr/README.md
+9 −6 platforms/atmelsam/README.md
+11 −11 platforms/espressif32/README.md
+4 −4 platforms/espressif8266/README.md
+7 −4 platforms/freescalekinetis/README.md
+1 −1 platforms/gd32v/README.md
+5 −5 platforms/infineonxmc/README.md
+1 −1 platforms/intel_arc32/README.md
+1 −1 platforms/intel_mcs51/README.md
+1 −1 platforms/kendryte210/README.md
+1 −1 platforms/lattice_ice40/README.md
+1 −1 platforms/linux_arm/README.md
+3 −3 platforms/maxim32/README.md
+7 −4 platforms/nordicnrf51/README.md
+12 −8 platforms/nordicnrf52/README.md
+16 −0 platforms/nuclei/README.md
+7 −4 platforms/nxplpc/README.md
+9 −9 platforms/riscv_gap/README.md
+8 −5 platforms/sifive/README.md
+5 −2 platforms/siliconlabsefm32/README.md
+24 −19 platforms/ststm32/README.md
+3 −3 platforms/ststm8/README.md
+3 −3 platforms/teensy/README.md
+1 −1 platforms/timsp430/README.md
+2 −2 platforms/titiva/README.md
+3 −3 platforms/wiznet7500/README.md
4 changes: 2 additions & 2 deletions platformio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

VERSION = (4, 1, 0)
VERSION = (4, 2, 0)
__version__ = ".".join([str(s) for s in VERSION])

__title__ = "platformio"
__description__ = (
"An open source ecosystem for embedded development. "
"A new generation ecosystem for embedded development. "
"Cross-platform IDE and Unified Debugger. "
"Static Code Analyzer and Remote Unit Testing. "
"Multi-platform and Multi-architecture Build System. "
Expand Down
5 changes: 3 additions & 2 deletions platformio/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ def main(argv=None):
try:
configure()
cli() # pylint: disable=no-value-for-parameter
except SystemExit:
pass
except SystemExit as e:
if e.code and str(e.code).isdigit():
exit_code = int(e.code)
except Exception as e: # pylint: disable=broad-except
if not isinstance(e, exception.ReturnErrorCode):
maintenance.on_platformio_exception(e)
Expand Down
5 changes: 3 additions & 2 deletions platformio/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import os
import uuid
from os import environ, getenv, listdir, remove
from os.path import abspath, dirname, isdir, isfile, join
from os.path import dirname, isdir, isfile, join, realpath
from time import time

import requests
Expand All @@ -34,7 +34,7 @@

def projects_dir_validate(projects_dir):
assert isdir(projects_dir)
return abspath(projects_dir)
return realpath(projects_dir)


DEFAULT_SETTINGS = {
Expand Down Expand Up @@ -199,6 +199,7 @@ def _unlock_dbindex(self):
return True

def get_cache_path(self, key):
assert "/" not in key and "\\" not in key
key = str(key)
assert len(key) > 3
return join(self.cache_dir, key[-2:], key)
Expand Down
25 changes: 19 additions & 6 deletions platformio/builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
DEFAULT_ENV_OPTIONS = dict(
tools=[
"ar",
"gas",
"gcc",
"g++",
"gnulink",
"as",
"cc",
"c++",
"link",
"platformio",
"pioplatform",
"pioproject",
Expand All @@ -72,6 +72,7 @@
BUILD_DIR=join("$PROJECT_BUILD_DIR", "$PIOENV"),
BUILD_SRC_DIR=join("$BUILD_DIR", "src"),
BUILD_TEST_DIR=join("$BUILD_DIR", "test"),
COMPILATIONDB_PATH=join("$BUILD_DIR", "compile_commands.json"),
LIBPATH=["$BUILD_DIR"],
PROGNAME="program",
PROG_PATH=join("$BUILD_DIR", "$PROGNAME$PROGSUFFIX"),
Expand Down Expand Up @@ -134,6 +135,10 @@
elif not int(ARGUMENTS.get("PIOVERBOSE", 0)):
click.echo("Verbose mode can be enabled via `-v, --verbose` option")

# Dynamically load dependent tools
if "compiledb" in COMMAND_LINE_TARGETS:
env.Tool("compilation_db")

if not isdir(env.subst("$BUILD_DIR")):
makedirs(env.subst("$BUILD_DIR"))

Expand Down Expand Up @@ -161,14 +166,19 @@
##############################################################################

# Checking program size
if env.get("SIZETOOL") and "nobuild" not in COMMAND_LINE_TARGETS:
if env.get("SIZETOOL") and not (
set(["nobuild", "sizedata"]) & set(COMMAND_LINE_TARGETS)
):
env.Depends(["upload", "program"], "checkprogsize")
# Replace platform's "size" target with our
_new_targets = [t for t in DEFAULT_TARGETS if str(t) != "size"]
Default(None)
Default(_new_targets)
Default("checkprogsize")

if "compiledb" in COMMAND_LINE_TARGETS:
env.Alias("compiledb", env.CompilationDatabase("$COMPILATIONDB_PATH"))

# Print configured protocols
env.AddPreAction(
["upload", "program"],
Expand All @@ -188,7 +198,10 @@
env.Exit(0)

if "idedata" in COMMAND_LINE_TARGETS:
Import("projenv")
try:
Import("projenv")
except: # pylint: disable=bare-except
projenv = env
click.echo(
"\n%s\n"
% dump_json_to_unicode(
Expand Down
Loading

0 comments on commit f7d4bf5

Please sign in to comment.