question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot use generic platform_packages = $URL with different OS

See original GitHub issue

Configuration

Operating system: Any

PlatformIO Version (platformio --version): abc0489

Description of problem

Original issues: https://github.com/platformio/platform-espressif8266/issues/224 https://github.com/esp8266/Arduino/pull/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 https://github.com/esp8266/Arduino/pull/6294#issuecomment-641513627

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:23 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
Jason2866commented, Nov 4, 2020

Can confirm. It does work 😃 Thx @ivankravets for your help (again!) and @mcspr for the doing (i thought to much complicated…)

0reactions
ivankravetscommented, Nov 4, 2020

The root of package is a place where manifest exists.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to resolve “Board generic (platform esp8266, package ...
To prevent it from happening, if you are changing between staging and stable, first press Remove button to delete currently used installation. There...
Read more >
GitLab Generic Packages Repository
Publish generic files, like release binaries, in your project's Package Registry. Then, install the packages whenever you need to use them as a...
Read more >
How do I install a pip package globally instead of locally?
First of all, in windows (I will be taking Windows as the OS here), if you do pip install ... pip is installing...
Read more >
Generic System Image - Android Developers
A Generic System Image (GSI) is a pure Android implementation with unmodified Android Open Source Project (AOSP) code, runnable on a variety ...
Read more >
How To Use Generics in Go | DigitalOcean
In programming, a generic type is a type that can be used in conjunction with multiple other types. Typically in Go, if you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found