Do a browser www search using term nxp class b cortex m3 or on www.nxp.com for AN10918
The libraries for CortexM3 can be found in AN10918: NXP LPC Cortex-M3 IEC60335 Class B library
Please note - Check the code. Friend noted that RTC_CLK is defined as 32000UL for in system_LPC17xx