forked from platformio/platformio-core
Merge branch 'release/v5.2.2'
This commit is contained in:
9
.github/workflows/core.yml
vendored
9
.github/workflows/core.yml
vendored
@ -8,14 +8,19 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
python-version: [3.6, 3.7, 3.8, 3.9]
|
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
|
||||||
|
exclude:
|
||||||
|
- os: macos-latest
|
||||||
|
python-version: "3.6"
|
||||||
|
- os: windows-latest
|
||||||
|
python-version: "3.10"
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: "recursive"
|
submodules: "recursive"
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
@ -8,6 +8,14 @@ PlatformIO Core 5
|
|||||||
|
|
||||||
**A professional collaborative platform for embedded development**
|
**A professional collaborative platform for embedded development**
|
||||||
|
|
||||||
|
5.2.2 (2021-10-20)
|
||||||
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
- Override debugging firmware loading mode using ``--load-mode`` option for `pio debug <https://docs.platformio.org/en/latest/core/userguide/cmd_debug.html>`__ command
|
||||||
|
- Added support for CLion IDE 2021.3 (`pull #4085 <https://github.com/platformio/platformio-core/issues/4085>`_)
|
||||||
|
- Removed debugging "legacy Click" message from CLI (`issue #4083 <https://github.com/platformio/platformio-core/issues/4083>`_)
|
||||||
|
- Fixed a "TypeError: sequence item 1: expected str instance, list found" issue when extending configuration option in `"platformio.ini" <https://docs.platformio.org/page/projectconf.html>`__ with the multi-line default value (`issue #4082 <https://github.com/platformio/platformio-core/issues/4082>`_)
|
||||||
|
|
||||||
5.2.1 (2021-10-11)
|
5.2.1 (2021-10-11)
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
2
docs
2
docs
Submodule docs updated: 8a61343095...66f67cb335
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
VERSION = (5, 2, 1)
|
VERSION = (5, 2, 2)
|
||||||
__version__ = ".".join([str(s) for s in VERSION])
|
__version__ = ".".join([str(s) for s in VERSION])
|
||||||
|
|
||||||
__title__ = "platformio"
|
__title__ = "platformio"
|
||||||
|
@ -76,7 +76,6 @@ try:
|
|||||||
|
|
||||||
|
|
||||||
except (AttributeError, TypeError): # legacy support for CLick > 8.0.1
|
except (AttributeError, TypeError): # legacy support for CLick > 8.0.1
|
||||||
print("legacy Click")
|
|
||||||
|
|
||||||
@cli.resultcallback()
|
@cli.resultcallback()
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
import os
|
import os
|
||||||
|
import signal
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
import click
|
import click
|
||||||
@ -31,6 +32,7 @@ from platformio.debug.process.gdb import GDBClientProcess
|
|||||||
from platformio.project.config import ProjectConfig
|
from platformio.project.config import ProjectConfig
|
||||||
from platformio.project.exception import ProjectEnvsNotAvailableError
|
from platformio.project.exception import ProjectEnvsNotAvailableError
|
||||||
from platformio.project.helpers import is_platformio_project
|
from platformio.project.helpers import is_platformio_project
|
||||||
|
from platformio.project.options import ProjectOptions
|
||||||
|
|
||||||
|
|
||||||
@click.command(
|
@click.command(
|
||||||
@ -54,11 +56,21 @@ from platformio.project.helpers import is_platformio_project
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
@click.option("--environment", "-e", metavar="<environment>")
|
@click.option("--environment", "-e", metavar="<environment>")
|
||||||
|
@click.option("--load-mode", type=ProjectOptions["env.debug_load_mode"].type)
|
||||||
@click.option("--verbose", "-v", is_flag=True)
|
@click.option("--verbose", "-v", is_flag=True)
|
||||||
@click.option("--interface", type=click.Choice(["gdb"]))
|
@click.option("--interface", type=click.Choice(["gdb"]))
|
||||||
@click.argument("__unprocessed", nargs=-1, type=click.UNPROCESSED)
|
@click.argument("__unprocessed", nargs=-1, type=click.UNPROCESSED)
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
def cli(ctx, project_dir, project_conf, environment, verbose, interface, __unprocessed):
|
def cli(
|
||||||
|
ctx,
|
||||||
|
project_dir,
|
||||||
|
project_conf,
|
||||||
|
environment,
|
||||||
|
load_mode,
|
||||||
|
verbose,
|
||||||
|
interface,
|
||||||
|
__unprocessed,
|
||||||
|
):
|
||||||
app.set_session_var("custom_project_conf", project_conf)
|
app.set_session_var("custom_project_conf", project_conf)
|
||||||
|
|
||||||
# use env variables from Eclipse or CLion
|
# use env variables from Eclipse or CLion
|
||||||
@ -104,7 +116,7 @@ def cli(ctx, project_dir, project_conf, environment, verbose, interface, __unpro
|
|||||||
|
|
||||||
rebuild_prog = False
|
rebuild_prog = False
|
||||||
preload = debug_config.load_cmds == ["preload"]
|
preload = debug_config.load_cmds == ["preload"]
|
||||||
load_mode = debug_config.load_mode
|
load_mode = load_mode or debug_config.load_mode
|
||||||
if load_mode == "always":
|
if load_mode == "always":
|
||||||
rebuild_prog = preload or not helpers.has_debug_symbols(
|
rebuild_prog = preload or not helpers.has_debug_symbols(
|
||||||
debug_config.program_path
|
debug_config.program_path
|
||||||
@ -155,6 +167,7 @@ def cli(ctx, project_dir, project_conf, environment, verbose, interface, __unpro
|
|||||||
client = GDBClientProcess(project_dir, debug_config)
|
client = GDBClientProcess(project_dir, debug_config)
|
||||||
coro = client.run(__unprocessed)
|
coro = client.run(__unprocessed)
|
||||||
try:
|
try:
|
||||||
|
signal.signal(signal.SIGINT, signal.SIG_IGN)
|
||||||
loop.run_until_complete(coro)
|
loop.run_until_complete(coro)
|
||||||
if IS_WINDOWS:
|
if IS_WINDOWS:
|
||||||
# an issue with `asyncio` executor and STIDIN,
|
# an issue with `asyncio` executor and STIDIN,
|
||||||
|
@ -75,7 +75,7 @@ set(CMAKE_CXX_STANDARD {{ cxx_stds[-1] }})
|
|||||||
|
|
||||||
if (CMAKE_BUILD_TYPE MATCHES "{{ env_name }}")
|
if (CMAKE_BUILD_TYPE MATCHES "{{ env_name }}")
|
||||||
% for define in defines:
|
% for define in defines:
|
||||||
add_definitions(-D'{{!re.sub(r"([\"\(\)#])", r"\\\1", define)}}')
|
add_definitions(-D{{!re.sub(r"([\"\(\)#])", r"\\\1", define)}})
|
||||||
% end
|
% end
|
||||||
|
|
||||||
% for include in filter_includes(includes):
|
% for include in filter_includes(includes):
|
||||||
@ -99,7 +99,7 @@ endif()
|
|||||||
% for env, data in ide_data.items():
|
% for env, data in ide_data.items():
|
||||||
if (CMAKE_BUILD_TYPE MATCHES "{{ env }}")
|
if (CMAKE_BUILD_TYPE MATCHES "{{ env }}")
|
||||||
% for define in data["defines"]:
|
% for define in data["defines"]:
|
||||||
add_definitions(-D'{{!re.sub(r"([\"\(\)#])", r"\\\1", define)}}')
|
add_definitions(-D{{!re.sub(r"([\"\(\)#])", r"\\\1", define)}})
|
||||||
% end
|
% end
|
||||||
|
|
||||||
% for include in filter_includes(data["includes"]):
|
% for include in filter_includes(data["includes"]):
|
||||||
|
@ -30,7 +30,10 @@
|
|||||||
% "type": "PlatformIO",
|
% "type": "PlatformIO",
|
||||||
% "task": ("Pre-Debug (%s)" % env_name) if len(config.envs()) > 1 else "Pre-Debug",
|
% "task": ("Pre-Debug (%s)" % env_name) if len(config.envs()) > 1 else "Pre-Debug",
|
||||||
% }
|
% }
|
||||||
% return [debug, predebug]
|
% noloading = predebug.copy()
|
||||||
|
% noloading["name"] = "PIO Debug (without uploading)"
|
||||||
|
% noloading["loadMode"] = "manual"
|
||||||
|
% return [debug, predebug, noloading]
|
||||||
% end
|
% end
|
||||||
%
|
%
|
||||||
% def _remove_comments(lines):
|
% def _remove_comments(lines):
|
||||||
|
@ -295,7 +295,10 @@ class ProjectConfigBase(object):
|
|||||||
section, option = match.group(1), match.group(2)
|
section, option = match.group(1), match.group(2)
|
||||||
if section == "sysenv":
|
if section == "sysenv":
|
||||||
return os.getenv(option)
|
return os.getenv(option)
|
||||||
return self.getraw(section, option)
|
value = self.getraw(section, option)
|
||||||
|
if isinstance(value, list):
|
||||||
|
return "\n".join(value)
|
||||||
|
return value
|
||||||
|
|
||||||
def get(self, section, option, default=MISSING):
|
def get(self, section, option, default=MISSING):
|
||||||
value = None
|
value = None
|
||||||
|
@ -63,6 +63,10 @@ targets =
|
|||||||
[env:test_extends]
|
[env:test_extends]
|
||||||
extends = strict_settings
|
extends = strict_settings
|
||||||
|
|
||||||
|
[env:inject_base_env]
|
||||||
|
debug_build_flags =
|
||||||
|
${env.debug_build_flags}
|
||||||
|
-D CUSTOM_DEBUG_FLAG
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -150,13 +154,20 @@ def test_sections(config):
|
|||||||
"custom",
|
"custom",
|
||||||
"env:base",
|
"env:base",
|
||||||
"env:test_extends",
|
"env:test_extends",
|
||||||
|
"env:inject_base_env",
|
||||||
"env:extra_1",
|
"env:extra_1",
|
||||||
"env:extra_2",
|
"env:extra_2",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def test_envs(config):
|
def test_envs(config):
|
||||||
assert config.envs() == ["base", "test_extends", "extra_1", "extra_2"]
|
assert config.envs() == [
|
||||||
|
"base",
|
||||||
|
"test_extends",
|
||||||
|
"inject_base_env",
|
||||||
|
"extra_1",
|
||||||
|
"extra_2",
|
||||||
|
]
|
||||||
assert config.default_envs() == ["base", "extra_2"]
|
assert config.default_envs() == ["base", "extra_2"]
|
||||||
|
|
||||||
|
|
||||||
@ -274,6 +285,14 @@ def test_get_value(config):
|
|||||||
assert config.get("env:extra_2", "monitor_speed") == 9600
|
assert config.get("env:extra_2", "monitor_speed") == 9600
|
||||||
assert config.get("env:base", "build_flags") == ["-D DEBUG=1"]
|
assert config.get("env:base", "build_flags") == ["-D DEBUG=1"]
|
||||||
|
|
||||||
|
# get default value from ConfigOption
|
||||||
|
assert config.get("env:inject_base_env", "debug_build_flags") == [
|
||||||
|
"-Og",
|
||||||
|
"-g2",
|
||||||
|
"-ggdb2",
|
||||||
|
"-D CUSTOM_DEBUG_FLAG",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def test_items(config):
|
def test_items(config):
|
||||||
assert config.items("custom") == [
|
assert config.items("custom") == [
|
||||||
@ -445,4 +464,13 @@ def test_dump(tmpdir_factory):
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
("env:test_extends", [("extends", ["strict_settings"])]),
|
("env:test_extends", [("extends", ["strict_settings"])]),
|
||||||
|
(
|
||||||
|
"env:inject_base_env",
|
||||||
|
[
|
||||||
|
(
|
||||||
|
"debug_build_flags",
|
||||||
|
["${env.debug_build_flags}", "-D CUSTOM_DEBUG_FLAG"],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
Reference in New Issue
Block a user