Chat about current Lua tools and IDEs

User avatar
By Markus Gritsch
#12332
GeoNomad wrote: I will look at changing to setting the defaults when connect is done manually. Or, perhaps, restoring the last state before the disconnect.


Any progress on this?

To make use of the automatically-enter-flash-mode feature of esptool.py, I connected RTS to RESET and DTR to GPIO0. This works perfectly fine when developing any native firmware (e.g. NodeMcu), except that LuaLoader now holds the chip in reset-mode when manually disconnecting and connecting to it :(
User avatar
By GeoNomad
#12337
Markus Gritsch wrote:
GeoNomad wrote: I will look at changing to setting the defaults when connect is done manually. Or, perhaps, restoring the last state before the disconnect.


Any progress on this?

To make use of the automatically-enter-flash-mode feature of esptool.py, I connected RTS to RESET and DTR to GPIO0. This works perfectly fine when developing any native firmware (e.g. NodeMcu), except that LuaLoader now holds the chip in reset-mode when manually disconnecting and connecting to it :(


Hi Markus,

can you describe the workflow and the way you would prefer it to work so I am clear what you need.

Peter
User avatar
By MK1888
#12339 @Markus: I use esptool and LuaLoader and don't have a problem with disconnect. On connect I do. And the workaround is to change the state of DTR and RTS via the buttons in the top-right corner.

I can think of three solutions for the source code (SerialNG.pas), but I'm not sure which would be best:
1. Remove the code that alters DTR and RTS on connect.
2. Change DTR and RTS to the saved default values on connect.
3. Change DTR and RTS to the typical (expected?) state of those pins on connect.
User avatar
By Markus Gritsch
#12347
GeoNomad wrote:can you describe the workflow and the way you would prefer it to work so I am clear what you need.

I think I have the same use case as MK1888: When Windows opens a COM port, DTR and RTS are set to 0. If one has those signals connected to GPIO0 and RESET, the ESP8266 is held in reset. esptool.py then sets RTS (connected to RESET) to 1, and after 100 ms also DTR (connected to GPIO0). This way the ESP8266 enters flash update mode and esptool.py can start sending the firmware.

When LuaLoader starts, it sets DTR and RTS to the configured default values. It should do this not only at at startup, but also when selecting the 'Connect' menu entry.