Description
Configuration
Operating system:
Any
PlatformIO Version (platformio --version
):
abc0489
Description of problem
Original issues:
platformio/platform-espressif8266#224
esp8266/Arduino#6294
From the platform/espressif8266 issue, this is the local configuration for the current development version for esp8266 Core:
platformio.ini
[env]
platform = espressif8266
board = d1_mini
framework = arduino
platform_packages =
framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git
toolchain-xtensa @ https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/x86_64-linux-gnu.xtensa-lx106-elf-0474ae9.200706.tar.gz
[env:test]
src_build_flags = -DTEST
While this configuration is valid on Linux x86_64, it is not possible to re-use the same environment options on Windows.
My proposal is to either:
- add
platform_repositories = ...
setting with file:///... (or just filename, same directory), https:///... syntax, allowing the user to create the package manifest manually (as described in the https://docs.platformio.org/en/latest/platforms/creating_platform.html), thus allowing to specify multiple package options which could be filtered by OS. - allow 'framework' package to somehow override package versions. For example, esp8266/Arduino already maintains Arduino IDE manifests, which could be read by PIO (or, read directly). Current implementation uses tools/get.py external script to read it's contents, which it turn downloads OS-specific package to be used with the arduino-cli
- edit: allow to also specify the
"system"
clause (linux_x86_64, darwin_x86_64 etc.). idk how this would happen in .ini though
As discussed in the esp8266/Arduino issue, this also creates problems with their CI system while building development versions. Current implementation simply re-uses tools/get.py result and replaces the ~/.platformio/packages/toolchain-xtensa with the up-to-date version, preserving the old package.json to avoid version conflicts
esp8266/Arduino#6294 (comment)
Additional info
It is possible to create a custom platform and provide a correct manifest.json. However this would also require maintaining differences between the real platform and the fork, as there is also python code shipped with the platform:
https://github.com/Jason2866/platform-espressif8266/tree/new_gcc