I built a clone of Nucleo L476RG myself using STM32L476RG IC. Surprisingly, after some tests, I found out that the clone (which is exact replica of STM32 Nucleo L476RG) can’t run Mbed.
It does work, I use the same Target MCU on my custom boards.
Take a look here:
This is for a different target but the process is exactly the same.
You can use any STM32 board with ST-LINK/V2-1 to program the clone board.
Use the online-compiler with a ‘blinky’ program to test, it’s quicker and easier, just add the STM32L476RG board to you board list.
You can use OS2 or OS5 both libraries will work.