About getting started with ARM MBED


I have recently started working on EV-COG-4050LZ. Basically I am expected to develop a WiFi driver for this project which interfaces COG 4050 with WIFI module ESP8266 and this should be running on ARM MBED OS. 

Presently I got the wifi driver code for ADICUP3029 which i successfully ported to run on COG4050. So the bare metal application is being implemented.

Now I want this application to run on MBED. Can I have the same project and run it on MBED compiler or I should write a fresh driver on MBED? I am not understanding how to use MBED to build my application. 

Any Inputs would be helpful regarding MBED and how to use it for my application.

Thanks & Regards