There is a MBED OS for LPC40xx:
https://github.com/ARMmbed/mbed-os/tree/master/targets/TARGET_NXP/TARGET_LPC408X
LPC407x/8x is pin-to-pin compatible with LPC177x/8x, the major difference is LPC177x uses M3 core while LPC407x uses M4 core.
Here is a app-note for porting from LPC177x to LPC407x:
http://host.lpcware.com/content/nxpfile/an11335-migrating-lpc177x8x-lpc407x8x
You shouldn't use LPC176x as the base and port it to LPC177x, they are quite different although they use the same M3 core. Instead, you should use LPC407x as the base and port it to LPC177x. Regardless, pay attention to the CMSIS header file (core_cm3.h vs core_cm4.h) and the startup file during the porting.