Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: test against upcoming arduino-esp32 3.0 #113

Closed
wants to merge 1 commit into from

Conversation

thijstriemstra
Copy link
Contributor

@thijstriemstra thijstriemstra commented Nov 8, 2023

@thijstriemstra
Copy link
Contributor Author

thijstriemstra commented Nov 8, 2023

Not sure why the build fails with:

KeyError: 'framework-arduinoespressif32-libs':
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/platformio/builder/main.py", line 173:
    env.SConscript("$BUILD_SCRIPT")
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 598:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 285:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/home/runner/.platformio/platforms/espressif32@src-5f117260f75b328038ec9d3fd0e14a68/builder/main.py", line 346:
    target_elf = env.BuildProgram()
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Util/envs.py", line 242:
    return self.method(*nargs, **kwargs)
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/platformio/builder/tools/piobuild.py", line 61:
    env.ProcessProgramDeps()
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Util/envs.py", line 242:
    return self.method(*nargs, **kwargs)
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/platformio/builder/tools/piobuild.py", line 121:
    env.BuildFrameworks(env.get("PIOFRAMEWORK"))
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Util/envs.py", line 242:
    return self.method(*nargs, **kwargs)
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/platformio/builder/tools/piobuild.py", line 342:
    SConscript(env.GetFrameworkScript(name), exports="env")
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 662:
    return method(*args, **kw)
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 598:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 285:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/home/runner/.platformio/platforms/espressif32@src-5f117260f75b328038ec9d3fd0e14a68/builder/frameworks/arduino.py", line 41:
    SConscript(
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 662:
    return method(*args, **kw)
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 598:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 285:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/home/runner/.platformio/packages/framework-arduinoespressif32/tools/platformio-build.py", line 40:
    FRAMEWORK_LIBS_DIR = platform.get_package_dir("framework-arduinoespressif32-libs")
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/platformio/platform/_packages.py", line 32:
    pkg = self.get_package(name)
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/platformio/platform/_packages.py", line 29:
    return self.pm.get_package(spec or self.get_package_spec(name))
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/platformio/platform/_packages.py", line 21:
    owner=self.packages[name].get("owner"),

Looks like it's not supported by platformio yet: platformio/platform-espressif32#1225

@thijstriemstra thijstriemstra marked this pull request as ready for review November 8, 2023 13:17
@thijstriemstra thijstriemstra changed the title build: test against upcoming arduino-esp32 build: test against upcoming arduino-esp32 3.0 Nov 8, 2023
@corrados
Copy link
Owner

corrados commented Nov 8, 2023

I'm looking forward to ESP-IDF 5.x since I hope it will support native USB on ESP32-S3. But I fear that we may run into compatibility issues with running Edrumulus on the old ESP32 chip. But let's see...

There's also a migration guide for 2.x to 3.x

Would be interesting to see if changes are necessary. At least we should avoid using the new API since then we would not be compatible to the old IDF anymore.

Looks like it's not supported by platformio yet: platformio/platform-espressif32#1225

Ok, I guess in this case you should close this pull request and create a new one as soon as it is supported?

@thijstriemstra
Copy link
Contributor Author

Ok, I guess in this case you should close this pull request and create a new one as soon as it is supported?

I'll make it a draft PR if that's ok so I can use this to test.

@thijstriemstra thijstriemstra marked this pull request as draft November 8, 2023 21:25
@sgryphon
Copy link

sgryphon commented Jan 14, 2024

I have a pull request up for platform-espressif32 that fixes the error: KeyError: 'framework-arduinoespressif32-libs':

platformio/platform-espressif32#1281

You can use the branch in that PR with arduino-esp32#master, but also need to add the location of the library to platform packages overrides as well. (The changes are quite small, to just add the library to the list of dependencies)

platform = https://github.com/sgryphon/platform-espressif32.git#sgryphon/add-esp32-arduino-libs
platform_packages =
    platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#master
    platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1

You can see if your test branch gets past the libs error with the above.

Note that alpha v3.0.0 has breaking changes, so old code might not work or even compile, the above branch will at least get past the missing libs to the actual compile stage.

@corrados
Copy link
Owner

@thijstriemstra do you have time to check the new code provided by sgryphon?

corrados added a commit that referenced this pull request Jun 9, 2024
@corrados
Copy link
Owner

@thijstriemstra, I have created a new Pull Request #144 based on your code and the patch from sgryphon which replaces your Pull Request here.

@sgryphon, thank you for your patch. It works fine :-)

I'll close this Pull Request now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants