PlatformIO Community

Error when specifying framework version

Hi Everyone!

I’m trying to build some code for stm32 using the arduino framework (stm32duino). I want to specify the version of this framework, and I don’t want to use the latest one (because they changed some interfaces in the latest one and unfortunately I don’t have time to update my code). The latest tag is 1.9.0 and I want to use 1.8.0 instead.

Here is the part of my platformio.ini:

[env:bluepill_f103c8_128k]
platform = ststm32
board = bluepill_f103c8_128k
framework = arduino

platform_packages =
    framework-arduinoststm32@https://github.com/stm32duino/Arduino_Core_STM32#1.8.0

This approach worked previosly but now it doesn’t work. Here is the output of pio run --verbose:

Processing bluepill_f103c8_128k (platform: ststm32; board: bluepill_f103c8_128k; framework: arduino; platform_packages: framework-arduinoststm32@https://github.com/stm32duino/Arduino_Core_STM32#1.8.0; build_flags: -D USBD_USE_CDC, -D USBCON, -D USBD_VID=0x0483, -D USB_PRODUCT="\"MyDevice\"")
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Tool Manager: Installing git+https://github.com/stm32duino/Arduino_Core_STM32#1.8.0
git version 2.21.0.windows.1
Cloning into 'C:\Users\Anton\.platformio\.cache\tmp\pkg-installing-k6wfdv7n'...
remote: Enumerating objects: 4524, done.
remote: Counting objects: 100% (4524/4524), done.
remote: Compressing objects: 100% (2951/2951), done.
remote: Total 4524 (delta 3036), reused 2331 (delta 1479), pack-reused 0
Receiving objects: 100% (4524/4524), 13.39 MiB | 3.90 MiB/s, done.
Resolving deltas: 100% (3036/3036), done.
Note: checking out '16f3644e7b9f8225dcb01f48bd857bdc3a978580'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

Checking out files: 100% (4177/4177), done.
Error: Could not find one of 'package.json' manifest files in the package

Output of pio --version:

PlatformIO, version 5.0.0

Please help me :slight_smile: Even some ideas on how to debug this problem would be helpful.

Weird, that repo in that tag does have a package.json… though with 0.0.0 as the version. Hm.

First you should try

platform = ststm32@6.1.1

(see https://github.com/platformio/platform-ststm32/releases), because this is the version before the Arudino core was updated to 1.9.0 in platform version 7.0.0.

Alternatively you should refer to the officially uploaded bintray packages and version numbers for the package you want, aka here: https://bintray.com/platformio/dl-packages/framework-arduinoststm32#files

There you can see that you can also specifiy

[env:bluepill_f103c8_128k]
platform = ststm32
board = bluepill_f103c8_128k
framework = arduino
platform_packages =
    framework-arduinoststm32@4.10800.200207
2 Likes

Wow, your answer is extremely helpful! Both your suggestions work. Thank you so much!

Just one thing is not clear for me, it’s about the second option:

I don’t understand, what is version number for these packages. For example, what does “4.10800.200207” mean? How was this string generated? And how should I understand which version of stm32duino does it contain? Of course, I can try to extract the archive and look inside, but maybe there is some another “smart” way to understand it?

This is some semantic versioning stuff used by the PlatformIO devs. I’m not really sure myself but from the middle part 108000 you can read it as x.y.z with all fields being two digits. So thats 1.8.0 as the underlying package version of the Arduino core. The first digit might by PIO internal numbering and the last one… a build number? Doesn’t look like a date.

Maybe @valeros can shed some light here on the versioning semantics of the packages.

1 Like

Oh yeah 200707 should mean year-month-day, so 2020, February 7th. Agrees with the “publishes 7 months ago” thing and other versions released in 2019.

Then the first digit should signify that it was targeted against at least PlatformIO version 4. PIO 5 is the newest, released recently.

2 Likes

Cool, now it’s completely clear. Thank you @maxgerhardt!