Flashing with RPi
You need get esptool and wire your Pi like so (if it doesn't work, connect ESP's GPIO2 to it's VCC as well):
pi@raspberrypi ~ $ sudo python esptool/esptool.py --port /dev/ttyAMA0 write_flash 0x000000 nodemcu_latest.bin Connecting... Erasing flash... Writing at 0x00062000... (100 %) Leaving...