Retrieve mbed2 repository

I have an old project based on mbed2 libraries. Several products are still based on this.

Firmware useds version 161 of mbed library. If I got it right, mbed2 development stopped at version 172.

I’d like to retrieve the repository, both for archive purpose (given the altogether EOF) and for managing any “update” (using inverted commas here since I’m talking about updating to a ~10 years old library…).

I’ve read here and there, and was able to start the cloning process with the command

hg clone https://os.mbed.com/users/mbed_official/code/mbed/

Actually, the command as is fails. I followed this hint to clone an early revision of the repository, then pull revision by revision. Awfully, I’m not able to pull further than revision 127. The command

hg pull -r 128

hags for a while, then returns

abort: HTTP Error 504: Gateway Time-out

I’ve tested on a couple of PC, Windows and Linux OS. Same network, but quite a reliable and fast one.

Is there any workaround on this? Does anyone know an alternative approach to download this?

I’m aware about the zip archive that can be downloaded from the MBED page, but I need to have the source code, not a precompiled version.

I looked at mbed-dev and mbed-os git repositories. The first commits looks like mbed2 history. After a while, I noticed that the string

#define MBED_LIBRARY_VERSION xxx

in file mbed.h gets removed, while in mbed repository its used until version 172 (last version/revision, if I got it right). Looks like the project forked from mbed2 and then walked its own path.

I remember I looked into this a few years ago, and I also made the observation that the latest version of Mbed 2 did not seem to successfully be able to download via the normal method. I did some digging and found version r163, which seemed to be the latest. I archived it in my repo here: mbed-cmake/mbed-src at paleo · USCRPL/mbed-cmake · GitHub