Problem in uploading code from ESP12E to Arduino UNO (ATMEGA328P)

I am trying to upload HEX file code from esp12e to Arduino UNO for my project. I have studied stk500 protocol through which uploading of code is done. I have implemented it through my code but the problem I am facing is that after successfully uploading the hex file to Arduino Uno it does not respond to the uploaded code in spite of it keeps on resetting itself after that.

There is a bug in the code you wrote to upload the hex file to the '328p.

Connect the chip you attempted to program to an ISP programmer and dump the flash to a hex file using avrdude.

Compare that hex file to the one you attempted to upload - presumably there will be a difference; examine your code to see what it is doing wrong.

One other thing you can do is connect two USB serial adapters' RX lines to the two serial lines, connect to both of these from a terminal app (I use hTerm). Then use your sketch to upload. Save the recorded data. Then do the same with a normal upload from a computer. This was incredibly helpful when I was doing work with serial bootloaders a couple of years back.

These two comparisons should allow you to see what your code is doing wrong. If you've gotten that far, you're close.

were you able to do it successfully, if yes guide me the steps,and the following link which made it possible.

My problem is the same i want to program my atmega328p using the nodemcu or esp8266-12e module using SPI, I2C or UART which ever possible.