Adding a forked framework to support an old chip (LPC1114)

I’m building a code for old LPC1114 chip on latest PIO (6.1.11). I actually managed to do that, but would like to know “better” way to understand how PIO works.

The problem with supporting this old chip (LPC1114) is that

  • mbed-os fails to build with a linker error after 5.10.1 (or somewhere around that version)
  • PlatformIO repository now only keeps mbed-os 5.15.6 (6.51506.230421) for mbed-os 5

We used to have an access to mbed-os 5.10.1 (5.51001.181029) referenced in platform-nxplpc@3.5.0, so

platform = nxplpc@3.5.0

was all I needed to build one. After presumed removal of 5.10.1 from the PIO repo, this does not work anymore.

I managed to build the code by copying packages/framework-mbed@5.51001.181029/ folder I happen to found in other machine, but this certainly is a kludge.

I first thought something like

platform_packages = framework-mbed @

was all I need to build one, but this does not work as genuine mbed-os repo does not contain PIO-related metadata.

I added PIO-related metadata (package.json, platformio/ folder) to my fork of mbed-os, and did

platform_packages = framework-mbed @

This now builds fine, but occupies packages/framework-mbed/ folder which I want to keep for latest mbed-os 6.

How can I make PIO use older version of mbed-os (5.10.1) which is not in PIO repository anymore? Also, I want it to use versioned packages/framework-mbed@blah folder so it won’t conflict with latest mbed-os 6.