Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By Barnabybear
#23223 Hi, I’ve looked around but haven’t seen this done (could mean it can’t be).
For a project using ESP8266-01s as sensors, it would be useful for development to be able to flash the units in their test locations rather than physically being there.
The question is, could I use one ESP8266-01 to flash another remotely?
The two units would be connected as follows:

Main unit________________Flash unit.
Vcc ->3.3V________________Vcc ->3.3V
CH_PD ----------------------------> GPIO 0 with pull up resistor
GPIO 0 ----------------------------> GPIO 2 with pull up resistor
GPIO 2 -> sensor
TX ----------------------------------> RX
RX ----------------------------------> TX
________________________CH_PD -> 3.3V
GND -> GND______________GND -> GND

I accept that this would use twice the power, may reduce the wifi range and with the ESP8266-01 only leave one GPIO for sensing.
The thought is that on normal power up both would enter the normal run state.
Should the main unit be required to be updated, the Flash unit would be sent the code, take GPIO 2 low (putting the Main unit into flash mode when next reset), take GPIO 0 momentarily low (to reset the main unit in flash mode), send the code over TX RX, take GPIO 2 high (putting the main unit in normal mode when next reset), take GPIO 0 momentarily low (to reset the main unit in normal mode), both units should now be in run mode.
This is where I get out of my depth, can any of the compilers / terminals send the code over the internet as opposed to a serial port?
Thanks for any help an advice in advance.
EDIT: it appears that my use of 'flash mode' may be incorrect, it should be taken as 'the mode in which the ESP8266 can be flashed with new code'.
Looks like 'esp-link' may have some of the answers (the internet is a big place and it's sometimes not easy to see the obvious) comments still welcome.