maxgerhardt / platform-raspberrypi

Raspberry Pi: development platform for PlatformIO
Apache License 2.0
118 stars 57 forks source link

How to use earlier version #85

Closed jhmaloney closed 17 hours ago

jhmaloney commented 1 week ago

I upgraded my PlatformIO package today to version 1.40200.0 (version string from package.json).

I had been running a version from before the 4.0.0 update to the arcuino-pico framework that introduced support for the Raspberry Pi Pico 2 (RP2350) and SDK 2.0.0. I'm sure there are many improvements in that, but a few things in my system got broken by that update so I'd like to temporarily revert until I can fix the issues.

Could you remind me how to build with an earlier version in PlatformIO?

I tried using this line in the platformio.ini environment:

platform = https://github.com/maxgerhardt/platform-raspberrypi.git@3.9.5

but I got this error:

Submodule path 'builder/frameworks/arduino/mbed-core': checked out '66ff9c5ecf64e0ce6360cbf2d8769228bb1294b4' PackageException: Package version 1.14.0+sha.19e3012 doesn't satisfy requirements 4.0.0 based on PackageMetadata <type=platform name=raspberrypi version=1.14.0+sha.19e3012 spec={'owner': None, 'id': None, 'name': 'platform-raspberrypi', 'requirements': '4.0.0', 'uri': 'git+https://github.com/maxgerhardt/platform-raspberrypi.git'}

What am I doing wrong?

jhmaloney commented 1 week ago

Another failed attempt that may provide useful info:

Platform Manager: Installing git+https://github.com/maxgerhardt/platform-raspberrypi.git @ 3.7.0 git version 2.45.2 Cloning into '/Users/johnmaloney/.platformio/.cache/tmp/pkg-installing-eahr3ddn'... remote: Enumerating objects: 192, done. remote: Counting objects: 100% (192/192), done. remote: Compressing objects: 100% (165/165), done. remote: Total 192 (delta 123), reused 52 (delta 8), pack-reused 0 (from 0) Receiving objects: 100% (192/192), 355.53 KiB | 2.82 MiB/s, done. Resolving deltas: 100% (123/123), done. Submodule 'builder/frameworks/arduino/mbed-core' (https://github.com/platformio/builder-framework-arduino-core-mbed.git) registered for path 'builder/frameworks/arduino/mbed-core' Cloning into '/Users/johnmaloney/.platformio/.cache/tmp/pkg-installing-eahr3ddn/builder/frameworks/arduino/mbed-core'... remote: Enumerating objects: 43, done.
remote: Counting objects: 100% (43/43), done.
remote: Compressing objects: 100% (32/32), done.
remote: Total 43 (delta 12), reused 33 (delta 10), pack-reused 0 (from 0)
Receiving objects: 100% (43/43), 13.70 KiB | 4.57 MiB/s, done. Resolving deltas: 100% (12/12), done. Submodule path 'builder/frameworks/arduino/mbed-core': checked out '66ff9c5ecf64e0ce6360cbf2d8769228bb1294b4' PackageException: Package version 1.14.0+sha.19e3012 doesn't satisfy requirements 3.7.0 based on PackageMetadata <type=platform name=raspberrypi version=1.14.0+sha.19e3012 spec={'owner': None, 'id': None, 'name': 'platform-raspberrypi', 'requirements': '3.7.0', 'uri': 'git+https://github.com/maxgerhardt/platform-raspberrypi.git'}

So it seems to be failing when it attempts to checkout the mbed-core submodule?

Thanks for your help!

maxgerhardt commented 5 days ago

This repo doesn't have any "3.7.0" or "3.9.5" tags at all. I think what you mean is to set the used Arduino-Pico version to 3.7.0 or 3.9.5 respectively? That's just a package within this platform, but not the version of this platform.

You can get a platform version that is pointing at Arduino-Pico 3.9.3 by setting

platform = https://github.com/maxgerhardt/platform-raspberrypi.git#1ab176cd4d4edd38a156e0c25e12e86ad96b21ef

Further, you can influence or override the version of a package as documented

platform_packages =
  framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#3.9.5

but with that you also have to take care that the toolchain package used by the platform (toolchain-rp2040-earlephilhower) matches what that version of the Arduino core expects. For example, using the latest version of this platform (GCC 14.2) won't be able to build an older Arduino-Pico 3.9.5 core. So, you always have to pair it up with a platform version that used the right toolset.

maxgerhardt commented 17 hours ago

Reopen with build log and platformio.ini if you still need help.