Thanks a lot @Dust. I also had a look at those schematics and the fysetc esp8266 my boss gave me wasn't working, (I couldn't get the Com port to show up). I did end up using a esp8266-01 board that I had and got it up and running. Although I did have to make the following changes-
1. The port I used was port 3, i.e. SERIAL_PORT_2 3.
2. The connection diagram was a little different, since my esp board required only 3.3v. I connected it according to the schematic you have linked and I also had to connect the enable pin to the 3.3v line.
once again thanks a lot for helping.