PlatformIO Community

Platform_packages not installing when using git reference

Configuration

Operating system: MacOS
PlatformIO Version (platformio --version): PlatformIO Core, version 5.2.5

Description of problem

When trying to install platform package from git, nothing happens and it get stuck indefinitely. If I comment the package trying to be fetched from git, it works just fine.

This is the problematic part:

platform_packages =
	framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#cbcba53

Steps to Reproduce

  1. Create new PIO project
  2. Replace platformio.ini with this
[env:s2]
platform = espressif32
platform_packages =
	framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#cbcba53
	platformio/tool-esptoolpy @ ~1.30100
	toolchain-xtensa32s2
framework = arduino
board = esp32dev
  1. Run pio run

Actual Results

It get stuck processing:

CyanideBook:s2test noda$ pio run
Processing s2 (platform: espressif32; framework: arduino; board: esp32dev)
------------------------------------------------------------------------------------------------

(nothing more happens)

Expected Results

platform_package gets fetched and my project builds.

If problems with PlatformIO Build System:

The content of platformio.ini:

[env:s2]
platform = espressif32
platform_packages =
	framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#cbcba53
	platformio/tool-esptoolpy @ ~1.30100
	toolchain-xtensa32s2
framework = arduino
board = esp32dev

Source file to reproduce issue:

void setup(){
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial);
  Serial.println("Hello Arduino!");
}

void loop {
}

Thanks for you help.

I don’t know why it’s stuck, but it seems you’re trying to use newer Arduino core. platform = espressif32 is not suitable for that, replace it e.g. with https://github.com/Jason2866/platform-espressif32.git.

If the hangup continues, clear out all your PlatformIO folders, that is

rm -rf ~/.platformio/.cache
rm -rf ~/.platformio/packages/*
rm -rf ~/.platformio/platforms/*

Just this lines works to me for Arduino-Espressif32 v2.0.3rc1.

[env:esp32dev]
platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.3rc1/platform-espressif32-2.0.3.zip
board = esp32dev
framework = arduino
1 Like

Continuing the discussion from platform_packages not installing when using git reference:

Thanks for your help!

Actually I was able to fix the hanging issue just by changing
framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#cbcba53 to framework-arduinoespressif32@git+https://github.com/espressif/arduino-esp32.git#cbcba53 (adding git+ before https).

Now I need to firgure out how to make uploading work :smiley:

I think your answer was not so much friendly.

It won’t work because Espressif repository is not compatible with PIO.

How about try using a specific commit from here?

@maxgerhardt , Jason repository is being merged in Tasmota repository.

Sorry if my answer felt out of place, that wasn’t my intention.

I was trying to make a working configuration for my Lolin S2 pico board based on some other configuration from others on this board. I actually got it working fully just with the solution I shared, using master branch I have an error at linking, but using that specific commit worked.

1 Like

To clarify things a bit, neither using

platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.3rc1/platform-espressif32-2.0.3.zip

nor

platform = https://github.com/Jason2866/platform-espressif32.git

worked for me as I got this error in linking (it downloaded fine though)

xtensa-esp32s2-elf/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
*** [.pio/build/esp32s2/firmware.elf] Error 1

I got the same thing with

platform_packages =
	framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#master

I tried many different releases starting from July 21 (the date of the #cbcba53 commit), with no luck :frowning:

But then I took @maxgerhardt 's advice and clean up everything in PIO folders, and now:

platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.3rc1/platform-espressif32-2.0.3.zip

Works fine, linking included :tada:

With that it’s much simpler and now at least I’ll be able to upgrade in the future :slightly_smiling_face:
Thank you so much for your help, PlatformIO is an amazing tool, it seems I still need to understand better how it works :wink: