Skip to content

Commit

Permalink
Merge branch 'release/v6.1.17'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Feb 13, 2025
2 parents 67b2759 + 4c697d9 commit fc946ba
Show file tree
Hide file tree
Showing 39 changed files with 200 additions and 175 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.11", "3.12", "3.13.0-rc.2"]
python-version: ["3.11", "3.12", "3.13"]

runs-on: ${{ matrix.os }}

Expand All @@ -27,6 +27,12 @@ jobs:
python -m pip install --upgrade pip
pip install tox
- name: Run "codespell" on Linux
if: startsWith(matrix.os, 'ubuntu')
run: |
python -m pip install codespell
make codespell
- name: Core System Info
run: |
tox -e py
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
with:
submodules: "recursive"
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Save artifact
if: ${{ github.event_name == 'push' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: docs
path: ./docs.tar.gz
Expand All @@ -57,15 +57,15 @@ jobs:
if: ${{ github.event_name == 'push' }}
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: docs
- name: Unpack artifact
run: |
mkdir ./${{ env.LATEST_DOCS_DIR }}
tar -xzf ./docs.tar.gz -C ./${{ env.LATEST_DOCS_DIR }}
- name: Delete Artifact
uses: geekyeggo/delete-artifact@v2
uses: geekyeggo/delete-artifact@v5
with:
name: docs
- name: Select Docs type
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
exit 1
fi
- name: Deploy to Github Pages
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.DEPLOY_GH_DOCS_TOKEN }}
external_repository: ${{ env.DOCS_REPO }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: |
# Free space
sudo apt clean
docker rmi $(docker image ls -aq)
# docker rmi $(docker image ls -aq)
df -h
tox -e testexamples
Expand Down
11 changes: 11 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ Unlock the true potential of embedded software development with
PlatformIO's collaborative ecosystem, embracing declarative principles,
test-driven methodologies, and modern toolchains for unrivaled success.

6.1.17 (2025-02-13)
~~~~~~~~~~~~~~~~~~~

* Introduced the `PLATFORMIO_RUN_JOBS <https://docs.platformio.org/en/latest/envvars.html#envvar-PLATFORMIO_RUN_JOBS>`__ environment variable, allowing manual override of the number of parallel build jobs (`issue #5077 <https://github.com/platformio/platformio-core/issues/5077>`_)
* Added support for ``tar.xz`` tarball dependencies (`pull #4974 <https://github.com/platformio/platformio-core/pull/4974>`_)
* Ensured that dependencies of private libraries are no longer unnecessarily re-installed, optimizing dependency management and reducing redundant operations (`issue #4987 <https://github.com/platformio/platformio-core/issues/4987>`_)
* Resolved an issue where the ``compiledb`` target failed to properly escape compiler executable paths containing spaces (`issue #4998 <https://github.com/platformio/platformio-core/issues/4998>`_)
* Resolved an issue with incorrect path resolution when linking static libraries via the `build_flags <https://docs.platformio.org/en/latest/projectconf/sections/env/options/build/build_flags.html>`__ option (`issue #5004 <https://github.com/platformio/platformio-core/issues/5004>`_)
* Resolved an issue where the ``--project-dir`` flag did not function correctly with the `pio check <https://docs.platformio.org/en/latest/core/userguide/cmd_check.html>`__ and `pio debug <https://docs.platformio.org/en/latest/core/userguide/cmd_debug.html>`__ commands (`issue #5029 <https://github.com/platformio/platformio-core/issues/5029>`_)
* Resolved an issue where the |LDF| occasionally excluded bundled platform libraries from the dependency graph (`pull #4941 <https://github.com/platformio/platformio-core/pull/4941>`_)

6.1.16 (2024-09-26)
~~~~~~~~~~~~~~~~~~~

Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ format:
black ./platformio
black ./tests

codespell:
codespell --skip "./build,./docs/_build" -L "AtLeast,TRE,ans,dout,homestate,ser"

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

before-commit: isort format lint
before-commit: codespell isort format lint

clean-docs:
rm -rf docs/_build
Expand Down
2 changes: 1 addition & 1 deletion docs
Submodule docs updated 72 files
+2 −2 advanced/unit-testing/frameworks/custom/runner.rst
+10 −10 boards/atmelsam/adafruit_metro_m0.rst
+168 −0 boards/espressif32/freenove_esp32_s3_wroom.rst
+164 −0 boards/espressif32/freenove_esp32_wrover.rst
+1 −1 boards/espressif32/lilygo-t-display.rst
+168 −0 boards/espressif32/lilygo-t3-s3.rst
+27 −27 boards/espressif32/minimain_esp32s2.rst
+168 −0 boards/espressif32/rymcu-esp32-c3-devkitm-1.rst
+164 −0 boards/espressif32/rymcu-esp32-devkitc.rst
+168 −0 boards/espressif32/rymcu-esp32-s3-devkitc-1.rst
+168 −0 boards/espressif32/weactstudio_esp32c3coreboard.rst
+11 −0 boards/index.rst
+2 −2 boards/renesas-ra/uno_r4_wifi.rst
+142 −0 boards/ststm32/blues_cygnet.rst
+143 −0 boards/ststm32/blues_swan_r5.rst
+5 −2 boards/ststm32/nucleo_f439zi.rst
+4 −1 boards/ststm32/nucleo_u575zi_q.rst
+142 −0 boards/ststm32/rymcu_f407ve.rst
+142 −0 boards/ststm32/rymcu_nebulapi_f103ve.rst
+3 −5 conf.py
+1 −2 core/installation/shell-commands.rst
+1 −1 core/migration.rst
+6 −4 core/userguide/cmd_run.rst
+4 −4 core/userguide/cmd_test.rst
+1 −1 core/userguide/lib/cmd_list.rst
+1 −1 core/userguide/platforms/cmd_frameworks.rst
+4 −0 envvars.rst
+207 −9 frameworks/arduino.rst
+89 −9 frameworks/cmsis.rst
+135 −2 frameworks/espidf.rst
+25 −7 frameworks/fsp.rst
+86 −6 frameworks/libopencm3.rst
+15 −2 frameworks/mbed.rst
+82 −2 frameworks/stm32cube.rst
+1 −1 integration/ci/github-actions.rst
+1 −1 librarymanager/dependencies.rst
+2 −2 manifests/library-json/fields/build/extrascript.rst
+1 −1 manifests/library-json/fields/scripts.rst
+1 −1 platforms/atmelsam.rst
+119 −3 platforms/espressif32.rst
+1 −1 platforms/freescalekinetis.rst
+1 −1 platforms/index.rst
+1 −1 platforms/nordicnrf51.rst
+1 −1 platforms/nordicnrf52.rst
+1 −1 platforms/nxpimxrt.rst
+1 −1 platforms/nxplpc.rst
+1 −1 platforms/openhw.rst
+23 −6 platforms/renesas-ra.rst
+1 −1 platforms/sifive.rst
+1 −1 platforms/siliconlabsefm32.rst
+73 −3 platforms/ststm32.rst
+1 −1 platforms/ststm8.rst
+1 −1 platforms/teensy.rst
+2 −0 platforms/teensy_extra.rst
+29 −1 plus/debug-tools/blackmagic.rst
+79 −2 plus/debug-tools/cmsis-dap.rst
+49 −0 plus/debug-tools/esp-prog.rst
+49 −0 plus/debug-tools/iot-bus-jtag.rst
+79 −2 plus/debug-tools/jlink.rst
+49 −0 plus/debug-tools/minimodule.rst
+49 −0 plus/debug-tools/olimex-arm-usb-ocd-h.rst
+49 −0 plus/debug-tools/olimex-arm-usb-ocd.rst
+49 −0 plus/debug-tools/olimex-arm-usb-tiny-h.rst
+49 −0 plus/debug-tools/olimex-jtag-tiny.rst
+29 −1 plus/debug-tools/stlink.rst
+49 −0 plus/debug-tools/tumpa.rst
+123 −4 plus/debugging.rst
+2 −1 projectconf/build_configurations.rst
+3 −3 projectconf/sections/env/options/build/build_flags.rst
+1 −1 projectconf/sections/env/options/platform/platform.rst
+2 −2 scripting/construction_environments.rst
+17 −0 scripting/launch_types.rst
2 changes: 1 addition & 1 deletion examples
2 changes: 1 addition & 1 deletion platformio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

VERSION = (6, 1, 16)
VERSION = (6, 1, 17)
__version__ = ".".join([str(s) for s in VERSION])

__title__ = "platformio"
Expand Down
6 changes: 3 additions & 3 deletions platformio/builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@
if not int(ARGUMENTS.get("PIOVERBOSE", 0)):
click.echo("Verbose mode can be enabled via `-v, --verbose` option")

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

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

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

env.LoadProjectOptions()
env.LoadPioPlatform()

Expand Down
47 changes: 26 additions & 21 deletions platformio/builder/tools/piobuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def GetBuildType(env):


def BuildProgram(env):
env.ProcessCompileDbToolchainOption()
env.ProcessProgramDeps()
env.ProcessProjectDeps()

Expand Down Expand Up @@ -90,6 +91,26 @@ def BuildProgram(env):
return program


def ProcessCompileDbToolchainOption(env):
if "compiledb" not in COMMAND_LINE_TARGETS:
return
# Resolve absolute path of toolchain
for cmd in ("CC", "CXX", "AS"):
if cmd not in env:
continue
if os.path.isabs(env[cmd]) or '"' in env[cmd]:
continue
env[cmd] = where_is_program(env.subst("$%s" % cmd), env.subst("${ENV['PATH']}"))
if " " in env[cmd]: # issue #4998: Space in compilator path
env[cmd] = f'"{env[cmd]}"'

if env.get("COMPILATIONDB_INCLUDE_TOOLCHAIN"):
print("Warning! `COMPILATIONDB_INCLUDE_TOOLCHAIN` is scoping")
for scope, includes in env.DumpIntegrationIncludes().items():
if scope in ("toolchain",):
env.Append(CPPPATH=includes)


def ProcessProgramDeps(env):
def _append_pio_macros():
core_version = pepver_to_semver(__version__)
Expand Down Expand Up @@ -126,27 +147,6 @@ def _append_pio_macros():
# remove specified flags
env.ProcessUnFlags(env.get("BUILD_UNFLAGS"))

env.ProcessCompileDbToolchainOption()


def ProcessCompileDbToolchainOption(env):
if "compiledb" in COMMAND_LINE_TARGETS:
# Resolve absolute path of toolchain
for cmd in ("CC", "CXX", "AS"):
if cmd not in env:
continue
if os.path.isabs(env[cmd]):
continue
env[cmd] = where_is_program(
env.subst("$%s" % cmd), env.subst("${ENV['PATH']}")
)

if env.get("COMPILATIONDB_INCLUDE_TOOLCHAIN"):
print("Warning! `COMPILATIONDB_INCLUDE_TOOLCHAIN` is scoping")
for scope, includes in env.DumpIntegrationIncludes().items():
if scope in ("toolchain",):
env.Append(CPPPATH=includes)


def ProcessProjectDeps(env):
plb = env.ConfigureProjectLibBuilder()
Expand Down Expand Up @@ -219,6 +219,11 @@ def ParseFlagsExtended(env, flags): # pylint: disable=too-many-branches
if os.path.isdir(p):
result[k][i] = os.path.abspath(p)

# fix relative LIBs
for i, l in enumerate(result.get("LIBS", [])):
if isinstance(l, FS.File):
result["LIBS"][i] = os.path.abspath(l.get_path())

# fix relative path for "-include"
for i, f in enumerate(result.get("CCFLAGS", [])):
if isinstance(f, tuple) and f[0] == "-include":
Expand Down
2 changes: 2 additions & 0 deletions platformio/builder/tools/piolib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,8 @@ def _correct_found_libs(lib_builders):
for lb in lib_builders:
if lb in found_lbs:
lb.search_deps_recursive(lb.get_search_files())
# refill found libs after recursive search
found_lbs = [lb for lb in lib_builders if lb.is_dependent]
for lb in lib_builders:
for deplb in lb.depbuilders[:]:
if deplb not in found_lbs:
Expand Down
9 changes: 4 additions & 5 deletions platformio/check/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import os
import shutil
from collections import Counter
from os.path import dirname, isfile
from time import time

import click
Expand Down Expand Up @@ -77,7 +76,7 @@ def cli( # pylint: disable=too-many-positional-arguments
app.set_session_var("custom_project_conf", project_conf)

# find project directory on upper level
if isfile(project_dir):
if os.path.isfile(project_dir):
project_dir = find_project_dir_above(project_dir)

results = []
Expand Down Expand Up @@ -150,7 +149,7 @@ def cli( # pylint: disable=too-many-positional-arguments
print_processing_header(tool, envname, env_dump)

ct = CheckToolFactory.new(
tool, project_dir, config, envname, tool_options
tool, os.getcwd(), config, envname, tool_options
)

result = {"env": envname, "tool": tool, "duration": time()}
Expand Down Expand Up @@ -250,12 +249,12 @@ def _append_defect(component, defect):
components[component].update({DefectItem.SEVERITY_LABELS[defect.severity]: 1})

for defect in result.get("defects", []):
component = dirname(defect.file) or defect.file
component = os.path.dirname(defect.file) or defect.file
_append_defect(component, defect)

if component.lower().startswith(get_project_dir().lower()):
while os.sep in component:
component = dirname(component)
component = os.path.dirname(component)
_append_defect(component, defect)

return components
Expand Down
2 changes: 1 addition & 1 deletion platformio/commands/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,5 @@ def settings_set(ctx, name, value):
@click.pass_context
def settings_reset(ctx):
app.reset_settings()
click.secho("The settings have been reseted!", fg="green")
click.secho("The settings have been reset!", fg="green")
ctx.invoke(settings_get)
4 changes: 2 additions & 2 deletions platformio/debug/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def cli( # pylint: disable=too-many-positional-arguments

if not interface:
return helpers.predebug_project(
ctx, project_dir, project_config, env_name, False, verbose
ctx, os.getcwd(), project_config, env_name, False, verbose
)

configure_args = (
Expand All @@ -106,7 +106,7 @@ def cli( # pylint: disable=too-many-positional-arguments
else:
debug_config = _configure(*configure_args)

_run(project_dir, debug_config, client_extra_args)
_run(os.getcwd(), debug_config, client_extra_args)

return None

Expand Down
18 changes: 6 additions & 12 deletions platformio/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import platform

from platformio.compat import is_proxy_set


Expand All @@ -30,8 +28,7 @@ def get_core_dependencies():

def get_pip_dependencies():
core = [
'bottle == 0.12.*; python_version < "3.7"',
'bottle == 0.13.*; python_version >= "3.7"',
"bottle == 0.13.*",
"click >=8.0.4, <9",
"colorama",
"marshmallow == 3.*",
Expand All @@ -45,19 +42,16 @@ def get_pip_dependencies():
home = [
# PIO Home requirements
"ajsonrpc == 1.2.*",
"starlette >=0.19, <0.40",
'uvicorn == 0.16.0; python_version < "3.7"',
'uvicorn >=0.16, <0.31; python_version >= "3.7"',
"starlette >=0.19, <0.46",
"uvicorn >=0.16, <0.35",
"wsproto == 1.*",
]

extra = []

# issue #4702; Broken "requests/charset_normalizer" on macOS ARM
if platform.system() == "Darwin" and "arm" in platform.machine().lower():
extra.append(
'chardet >= 3.0.2,<6; platform_system == "Darwin" and "arm" in platform_machine'
)
extra.append(
'chardet >= 3.0.2,<6; platform_system == "Darwin" and "arm" in platform_machine'
)

# issue 4614: urllib3 v2.0 only supports OpenSSL 1.1.1+
try:
Expand Down
2 changes: 1 addition & 1 deletion platformio/package/commands/exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def package_exec_cmd(obj, package, call, args):
os.environ["PIO_PYTHON_EXE"] = get_pythonexe_path()

# inject current python interpreter on Windows
if args[0].endswith(".py"):
if args and args[0].endswith(".py"):
args = [os.environ["PIO_PYTHON_EXE"]] + list(args)
if not os.path.exists(args[1]):
args[1] = where_is_program(args[1])
Expand Down
6 changes: 5 additions & 1 deletion platformio/package/commands/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,11 @@ def _install_project_private_library_deps(private_pkg, private_lm, env_lm, optio
if not spec.external and not spec.owner:
continue
pkg = private_lm.get_package(spec)
if not pkg and not env_lm.get_package(spec):
if (
not pkg
and not private_lm.get_package(spec)
and not env_lm.get_package(spec)
):
pkg = env_lm.install(
spec,
skip_dependencies=True,
Expand Down
2 changes: 1 addition & 1 deletion platformio/package/commands/uninstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def uninstall_project_env_dependencies(project_env, options=None):
uninstalled_conds.append(
_uninstall_project_env_custom_tools(project_env, options)
)
# custom ibraries
# custom libraries
if options.get("libraries"):
uninstalled_conds.append(
_uninstall_project_env_custom_libraries(project_env, options)
Expand Down
2 changes: 1 addition & 1 deletion platformio/package/commands/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def update_project_env_dependencies(project_env, options=None):
# custom tools
if options.get("tools"):
updated_conds.append(_update_project_env_custom_tools(project_env, options))
# custom ibraries
# custom libraries
if options.get("libraries"):
updated_conds.append(_update_project_env_custom_libraries(project_env, options))
# declared dependencies
Expand Down
2 changes: 1 addition & 1 deletion platformio/package/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(self, url, dest_dir=None):
url,
stream=True,
)
if self._http_response.status_code != 200:
if self._http_response.status_code not in (200, 203):
raise PackageException(
"Got the unrecognized status code '{0}' when downloaded {1}".format(
self._http_response.status_code, url
Expand Down
2 changes: 1 addition & 1 deletion platformio/package/manifest/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def validate_license(self, value):
@staticmethod
@memoized(expire="1h")
def load_spdx_licenses():
version = "3.24.0"
version = "3.26.0"
spdx_data_url = (
"https://raw.githubusercontent.com/spdx/license-list-data/"
f"v{version}/json/licenses.json"
Expand Down
Loading

0 comments on commit fc946ba

Please sign in to comment.