Skip to content

Commit 5a89388

Browse files
committed
Merge branch 'release/v4.1.0'
2 parents 60f0f77 + d043412 commit 5a89388

File tree

119 files changed

+8487
-4113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+8487
-4113
lines changed

.appveyor.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ platform:
66
environment:
77
matrix:
88
- TOXENV: "py27"
9-
PLATFORMIO_BUILD_CACHE_DIR: C:/Temp/PIO_Build_Cache_P2_{build}
9+
PLATFORMIO_BUILD_CACHE_DIR: C:\Temp\PIO_Build_Cache_P2_{build}
1010

1111
- TOXENV: "py36"
12-
PLATFORMIO_BUILD_CACHE_DIR: C:/Temp/PIO_Build_Cache_P3_{build}
12+
PLATFORMIO_BUILD_CACHE_DIR: C:\Temp\PIO_Build_Cache_P3_{build}
1313

1414
install:
1515
- cmd: git submodule update --init --recursive
1616
- cmd: SET PATH=C:\MinGW\bin;%PATH%
17+
- cmd: SET PLATFORMIO_CORE_DIR=C:\.pio
1718
- cmd: pip install --force-reinstall tox
1819

1920
test_script:

.isort.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[settings]
2-
line_length=79
3-
known_third_party=bottle,click,pytest,requests,SCons,semantic_version,serial,twisted,autobahn,jsonrpc,tabulate
2+
line_length=88
3+
known_third_party=SCons, twisted, autobahn, jsonrpc

.pylintrc

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[MESSAGES CONTROL]
22
disable=
3+
bad-continuation,
4+
bad-whitespace,
35
missing-docstring,
46
ungrouped-imports,
57
invalid-name,
@@ -9,4 +11,5 @@ disable=
911
too-few-public-methods,
1012
useless-object-inheritance,
1113
useless-import-alias,
12-
fixme
14+
fixme,
15+
bad-option-value

.readthedocs.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# See https://docs.readthedocs.io/en/stable/config-file/index.html
2+
3+
version: 2
4+
5+
sphinx:
6+
configuration: docs/conf.py
7+
8+
formats:
9+
- pdf
10+
11+
submodules:
12+
include: all

HISTORY.rst

+46-10
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,44 @@ Release Notes
33

44
.. _release_notes_4_0:
55

6-
PlatformIO 4.0
7-
--------------
6+
PlatformIO Core 4.0
7+
-------------------
8+
9+
4.1.0 (2019-11-07)
10+
~~~~~~~~~~~~~~~~~~
11+
12+
* `PIO Check <http://docs.platformio.org/page/plus/pio-check.html>`__ – automated code analysis without hassle:
13+
14+
- Potential NULL pointer dereferences
15+
- Possible indexing beyond array bounds
16+
- Suspicious assignments
17+
- Reads of potentially uninitialized objects
18+
- Unused variables or functions
19+
- Out of scope memory usage.
20+
21+
* `PlatformIO Home 3.0 <http://docs.platformio.org/page/home/index.html>`__ and Project Inspection
22+
23+
- Static Code Analysis
24+
- Firmware File Explorer
25+
- Firmware Memory Inspection
26+
- Firmware Sections & Symbols Viewer.
27+
28+
* Added support for `Build Middlewares <http://docs.platformio.org/page/projectconf/advanced_scripting.html#build-middlewares>`__: configure custom build flags per specific file, skip any build nodes from a framework, replace build file with another on-the-fly, etc.
29+
* Extend project environment configuration in "platformio.ini" with other sections using a new `extends <http://docs.platformio.org/page/projectconf/section_env_advanced.html#extends>`__ option (`issue #2953 <https://github.com/platformio/platformio-core/issues/2953>`_)
30+
* Generate ``.ccls`` LSP file for `Emacs <https://docs.platformio.org/page/ide/emacs.html>`__ cross references, hierarchies, completion and semantic highlighting
31+
* Added ``--no-ansi`` flag for `PIO Core <http://docs.platformio.org/page/userguide/index.html>`__ to disable ANSI control characters
32+
* Added ``--shutdown-timeout`` option to `PIO Home Server <http://docs.platformio.org/page/userguide/cmd_home.html>`__
33+
* Fixed an issue with project generator for `CLion IDE <http://docs.platformio.org/page/ide/clion.html>`__ when 2 environments were used (`issue #2824 <https://github.com/platformio/platformio-core/issues/2824>`_)
34+
* Fixed default PIO Unified Debugger configuration for `J-Link probe <http://docs.platformio.org/page/plus/debug-tools/jlink.html>`__
35+
* Fixed an issue when configuration file options partly ignored when using custom ``--project-conf`` (`issue #3034 <https://github.com/platformio/platformio-core/issues/3034>`_)
36+
* Fixed an issue when installing a package using custom Git tag and submodules were not updated correctly (`issue #3060 <https://github.com/platformio/platformio-core/issues/3060>`_)
37+
* Fixed an issue with linking process when ``$LDSCRIPT`` contains a space in path
38+
* Fixed security issue when extracting items from TAR archive (`issue #2995 <https://github.com/platformio/platformio-core/issues/2995>`_)
39+
* Fixed an issue with project generator when ``src_build_flags`` were not respected (`issue #3137 <https://github.com/platformio/platformio-core/issues/3137>`_)
40+
* Fixed an issue when booleans in "platformio.ini" are not parsed properly (`issue #3022 <https://github.com/platformio/platformio-core/issues/3022>`_)
41+
* Fixed an issue with invalid encoding when generating project for Visual Studio (`issue #3183 <https://github.com/platformio/platformio-core/issues/3183>`_)
42+
* Fixed an issue when Project Config Parser does not remove in-line comments when Python 3 is used (`issue #3213 <https://github.com/platformio/platformio-core/issues/3213>`_)
43+
* Fixed an issue with a GCC Linter for PlatformIO IDE for Atom (`issue #3218 <https://github.com/platformio/platformio-core/issues/3218>`_)
844

945
4.0.3 (2019-08-30)
1046
~~~~~~~~~~~~~~~~~~
@@ -104,8 +140,8 @@ PlatformIO 4.0
104140
- Fixed "systemd-udevd" warnings in `99-platformio-udev.rules <http://docs.platformio.org/page/faq.html#platformio-udev-rules>`__ (`issue #2442 <https://github.com/platformio/platformio-core/issues/2442>`_)
105141
- Fixed an issue when package cache (Library Manager) expires too fast (`issue #2559 <https://github.com/platformio/platformio-core/issues/2559>`_)
106142

107-
PlatformIO 3.0
108-
--------------
143+
PlatformIO Core 3.0
144+
-------------------
109145

110146
3.6.7 (2019-04-23)
111147
~~~~~~~~~~~~~~~~~~
@@ -705,8 +741,8 @@ PlatformIO 3.0
705741
(`issue #742 <https://github.com/platformio/platformio-core/issues/742>`_)
706742
* Stopped supporting Python 2.6
707743

708-
PlatformIO 2.0
709-
--------------
744+
PlatformIO Core 2.0
745+
--------------------
710746

711747
2.11.2 (2016-08-02)
712748
~~~~~~~~~~~~~~~~~~~
@@ -1491,8 +1527,8 @@ PlatformIO 2.0
14911527
* Fixed bug with creating copies of source files
14921528
(`issue #177 <https://github.com/platformio/platformio-core/issues/177>`_)
14931529

1494-
PlatformIO 1.0
1495-
--------------
1530+
PlatformIO Core 1.0
1531+
-------------------
14961532

14971533
1.5.0 (2015-05-15)
14981534
~~~~~~~~~~~~~~~~~~
@@ -1682,8 +1718,8 @@ PlatformIO 1.0
16821718
error (`issue #81 <https://github.com/platformio/platformio-core/issues/81>`_)
16831719
* Several bug fixes, increased stability and performance improvements
16841720

1685-
PlatformIO 0.0
1686-
--------------
1721+
PlatformIO Core 0.0
1722+
-------------------
16871723

16881724
0.10.2 (2015-01-06)
16891725
~~~~~~~~~~~~~~~~~~~

Makefile

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ isort:
55
isort -rc ./platformio
66
isort -rc ./tests
77

8-
yapf:
9-
yapf --recursive --in-place platformio/
8+
black:
9+
black --target-version py27 ./platformio
10+
black --target-version py27 ./tests
1011

1112
test:
12-
py.test --verbose --capture=no --exitfirst -n 3 --dist=loadscope tests --ignore tests/test_examples.py --ignore tests/test_pkgmanifest.py
13+
py.test --verbose --capture=no --exitfirst -n 3 --dist=loadscope tests --ignore tests/test_examples.py
1314

14-
before-commit: isort yapf lint test
15+
before-commit: isort black lint test
1516

1617
clean-docs:
1718
rm -rf docs/_build

README.rst

+10-6
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,19 @@ PlatformIO
3434
.. image:: https://raw.githubusercontent.com/platformio/platformio-web/develop/app/images/platformio-ide-laptop.png
3535
:target: https://platformio.org?utm_source=github&utm_medium=core
3636

37-
`PlatformIO <https://platformio.org?utm_source=github&utm_medium=core>`_ is an open source ecosystem for IoT
38-
development. Cross-platform IDE and unified debugger. Remote unit testing and
39-
firmware updates.
37+
`PlatformIO <https://platformio.org?utm_source=github&utm_medium=core>`_ an open source ecosystem for embedded development
38+
39+
* **Cross-platform IDE** and **Unified Debugger**
40+
* **Static Code Analyzer** and **Remote Unit Testing**
41+
* **Multi-platform** and **Multi-architecture Build System**
42+
* **Firmware File Explorer** and **Memory Inspection**.
4043

4144
Get Started
4245
-----------
4346

4447
* `What is PlatformIO? <https://docs.platformio.org/en/latest/what-is-platformio.html?utm_source=github&utm_medium=core>`_
4548

46-
Open Source
49+
Instruments
4750
-----------
4851

4952
* `PlatformIO IDE <https://platformio.org/platformio-ide?utm_source=github&utm_medium=core>`_
@@ -57,11 +60,10 @@ Open Source
5760
PIO Plus
5861
--------
5962

63+
* `PIO Check <https://docs.platformio.org/page/plus/pio-check.html?utm_source=github&utm_medium=core>`_
6064
* `PIO Remote <https://docs.platformio.org/page/plus/pio-remote.html?utm_source=github&utm_medium=core>`_
6165
* `PIO Unified Debugger <https://docs.platformio.org/page/plus/debugging.html?utm_source=github&utm_medium=core>`_
6266
* `PIO Unit Testing <https://docs.platformio.org/en/latest/plus/unit-testing.html?utm_source=github&utm_medium=core>`_
63-
* `Cloud IDEs Integration <https://docs.platformio.org/en/latest/ide.html?utm_source=github&utm_medium=core#solution-pio-delivery>`_
64-
* `Integration Services <https://platformio.org/pricing?utm_source=github&utm_medium=core#enterprise-features>`_
6567

6668
Registry
6769
--------
@@ -93,6 +95,7 @@ Development Platforms
9395
* `RISC-V <https://platformio.org/platforms/riscv?utm_source=github&utm_medium=core>`_
9496
* `RISC-V GAP <https://platformio.org/platforms/riscv_gap?utm_source=github&utm_medium=core>`_
9597
* `Samsung ARTIK <https://platformio.org/platforms/samsung_artik?utm_source=github&utm_medium=core>`_
98+
* `Shakti <https://platformio.org/platforms/shakti?utm_source=github&utm_medium=core>`_
9699
* `Silicon Labs EFM32 <https://platformio.org/platforms/siliconlabsefm32?utm_source=github&utm_medium=core>`_
97100
* `ST STM32 <https://platformio.org/platforms/ststm32?utm_source=github&utm_medium=core>`_
98101
* `ST STM8 <https://platformio.org/platforms/ststm8?utm_source=github&utm_medium=core>`_
@@ -117,6 +120,7 @@ Frameworks
117120
* `mbed <https://platformio.org/frameworks/mbed?utm_source=github&utm_medium=core>`_
118121
* `PULP OS <https://platformio.org/frameworks/pulp-os?utm_source=github&utm_medium=core>`_
119122
* `Pumbaa <https://platformio.org/frameworks/pumbaa?utm_source=github&utm_medium=core>`_
123+
* `Shakti <https://platformio.org/frameworks/shakti?utm_source=github&utm_medium=core>`_
120124
* `Simba <https://platformio.org/frameworks/simba?utm_source=github&utm_medium=core>`_
121125
* `SPL <https://platformio.org/frameworks/spl?utm_source=github&utm_medium=core>`_
122126
* `STM32Cube <https://platformio.org/frameworks/stm32cube?utm_source=github&utm_medium=core>`_

docs

Submodule docs updated 155 files

platformio/__init__.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,19 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
VERSION = (4, 0, 3)
15+
VERSION = (4, 1, 0)
1616
__version__ = ".".join([str(s) for s in VERSION])
1717

1818
__title__ = "platformio"
1919
__description__ = (
20-
"An open source ecosystem for IoT development. "
21-
"Cross-platform IDE and unified debugger. "
22-
"Remote unit testing and firmware updates. "
20+
"An open source ecosystem for embedded development. "
21+
"Cross-platform IDE and Unified Debugger. "
22+
"Static Code Analyzer and Remote Unit Testing. "
23+
"Multi-platform and Multi-architecture Build System. "
24+
"Firmware File Explorer and Memory Inspection. "
2325
"Arduino, ARM mbed, Espressif (ESP8266/ESP32), STM32, PIC32, nRF51/nRF52, "
24-
"FPGA, CMSIS, SPL, AVR, Samsung ARTIK, libOpenCM3")
26+
"RISC-V, FPGA, CMSIS, SPL, AVR, Samsung ARTIK, libOpenCM3"
27+
)
2528
__url__ = "https://platformio.org"
2629

2730
__author__ = "PlatformIO"

platformio/__main__.py

+34-22
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,42 @@
2323
from platformio.compat import CYGWIN
2424

2525

26-
@click.command(cls=PlatformioCLI,
27-
context_settings=dict(help_option_names=["-h", "--help"]))
26+
@click.command(
27+
cls=PlatformioCLI, context_settings=dict(help_option_names=["-h", "--help"])
28+
)
2829
@click.version_option(__version__, prog_name="PlatformIO")
29-
@click.option("--force",
30-
"-f",
31-
is_flag=True,
32-
help="Force to accept any confirmation prompts.")
33-
@click.option("--caller", "-c", help="Caller ID (service).")
30+
@click.option("--force", "-f", is_flag=True, help="DEPRECATE")
31+
@click.option("--caller", "-c", help="Caller ID (service)")
32+
@click.option("--no-ansi", is_flag=True, help="Do not print ANSI control characters")
3433
@click.pass_context
35-
def cli(ctx, force, caller):
34+
def cli(ctx, force, caller, no_ansi):
35+
try:
36+
if (
37+
no_ansi
38+
or str(
39+
os.getenv("PLATFORMIO_NO_ANSI", os.getenv("PLATFORMIO_DISABLE_COLOR"))
40+
).lower()
41+
== "true"
42+
):
43+
# pylint: disable=protected-access
44+
click._compat.isatty = lambda stream: False
45+
elif (
46+
str(
47+
os.getenv("PLATFORMIO_FORCE_ANSI", os.getenv("PLATFORMIO_FORCE_COLOR"))
48+
).lower()
49+
== "true"
50+
):
51+
# pylint: disable=protected-access
52+
click._compat.isatty = lambda stream: True
53+
except: # pylint: disable=bare-except
54+
pass
55+
3656
maintenance.on_platformio_start(ctx, force, caller)
3757

3858

3959
@cli.resultcallback()
4060
@click.pass_context
41-
def process_result(ctx, result, force, caller): # pylint: disable=W0613
61+
def process_result(ctx, result, *_, **__):
4262
maintenance.on_platformio_end(ctx, result)
4363

4464

@@ -50,21 +70,12 @@ def configure():
5070
# https://urllib3.readthedocs.org
5171
# /en/latest/security.html#insecureplatformwarning
5272
try:
53-
import urllib3
73+
import urllib3 # pylint: disable=import-outside-toplevel
74+
5475
urllib3.disable_warnings()
5576
except (AttributeError, ImportError):
5677
pass
5778

58-
try:
59-
if str(os.getenv("PLATFORMIO_DISABLE_COLOR", "")).lower() == "true":
60-
# pylint: disable=protected-access
61-
click._compat.isatty = lambda stream: False
62-
elif str(os.getenv("PLATFORMIO_FORCE_COLOR", "")).lower() == "true":
63-
# pylint: disable=protected-access
64-
click._compat.isatty = lambda stream: True
65-
except: # pylint: disable=bare-except
66-
pass
67-
6879
# Handle IOError issue with VSCode's Terminal (Windows)
6980
click_echo_origin = [click.echo, click.secho]
7081

@@ -73,7 +84,8 @@ def _safe_echo(origin, *args, **kwargs):
7384
click_echo_origin[origin](*args, **kwargs)
7485
except IOError:
7586
(sys.stderr.write if kwargs.get("err") else sys.stdout.write)(
76-
"%s\n" % (args[0] if args else ""))
87+
"%s\n" % (args[0] if args else "")
88+
)
7789

7890
click.echo = lambda *args, **kwargs: _safe_echo(0, *args, **kwargs)
7991
click.secho = lambda *args, **kwargs: _safe_echo(1, *args, **kwargs)
@@ -87,7 +99,7 @@ def main(argv=None):
8799
sys.argv = argv
88100
try:
89101
configure()
90-
cli(None, None, None)
102+
cli() # pylint: disable=no-value-for-parameter
91103
except SystemExit:
92104
pass
93105
except Exception as e: # pylint: disable=broad-except

0 commit comments

Comments
 (0)