The context is that I have the ESP8266 (Sunfounder 8 pin breakout) connected to a headless Raspberry Pi, and I wanted to be able to use the ESP in normal mode on the UART and flash it remotely without rearranging anything. To that end I have CH_PD and GPIO0 connected to GPIOs on the Pi.
When the ESP is reset with GPIO0 high, I can see the boot log with minterm.py -b 74880, then reconnect at 115200 and test AT commands as described on the Sunfounder page. I can also find an AI_THINKER ESSID.
When I set GPIO0 low and reset, nothing happens. I was presuming at this point I should be able to use esptool.py to flash boot, but I get "Failure to connect". I compiled the firmware using the open SDK and toolchain on another machine, but I do not think it is the problem as all esptool.py commands fail the same way, e.g.
esptool.py -p /dev/ttyAMA0 read_mac
And so on. The python serial library obviously works well enough for miniterm.py to using the same port.