How to upgrade/downgrade the mbed framework?

Just recently my SPI code stopped working on a Nucleo F401RE board. I think this coincided with the mbed framework being upgraded to v121, although I’m not 100% sure. A github issue seems to indicate that there is some problem with SPI in v120 and v121, so I would like to try upgrading to v122 or downgrading to an earlier version to check.

Is there some way that I can manually upgrade/downgrade mbed? Looking at the mbed github repo the file layout it very different from what is in ~/.platformio/packages/framework-mbed, so it’s not clear to me how to manually upgrade. I assume the platformio devs do some packaging to make the mbed source code available as a platformio framework.

As an easier option that will help me test my hypothesis, are previous versions of platformio’s packaging of mbed available online somewhere?

Thanks for the great work,

Hi, David!
Indeed we have special framework package and a bit tricky build script for mbed, but we are going to rewrite it from scratch in PlatformIO 3.0. From previous versions, we have only v117.
Also, this topic about framework-mbed package may be useful.

Thanks @valeros. The problem turned out to be something else, but being able to downgrade to v117 helped eliminate the mbed library as the cause.

As an aside, I wasn’t able to get to work when downloading just this script, due to a failed import. Does it need to be run from within the full platformio source directory after cloning from github? I can’t find where it is included in my platformio version installed by pip.

Yes, it depends on some modules from PlatformIO package, so you should clone entire PlatformIO repository and run it from scripts directory. Unfortunately, I don’t think it will work with v122 because they’ve changed the entire repository structure.