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

User avatar
By berniem
#5457 peteben, THANK YOU for doing the work to mod the necessary files and for doing this great write up! I've just about finished setting up this environment and I'm excited to be able to quickly and easily build ESP code and upload it.

Just like you, I'm usually "efficient" (aka "lazy"), and I was wondering whether you thought the following idea might be worth implementing in your system. For many (or most) setups, what you have is just fine. However, there's a small tweak that can be made that reduces initial setup a tiny bit but, on setups like mine, it will also make overall use easier and less frustrating. I often have to plug my USB-to-RS232 adapter into different USB ports. When I do so, Windows thinks it's a different device and so assigns a different COMx port number. For example, if I'm using the adapter in one USB port right now, the adapter shows up as COM11 but tomorrow I plug it in a different USB port, it will show up as COM9. So, since your setup can't know, a priori, what the COMx number will be, but we can be certain that I, the user, will have fired up TERMIE and will have pointed TERMIE at the correct port, how about having the first part of the named pipe communication between ESPTOOL-PY and TERMIE be a query from ESPTOOL-PY asking what COMx number to use?

The case where this has a potential flaw is when I'm talking to two ESP devices on my computer with two different USB-RS232 adapters. This does already seem like an issue because if I'm running two TERMIEs, the pipe setup stuff will fail. The answer seems to be running TERMIE only on the device for which I'm currently writing code and running a different terminal program for the other device.

Another case/question to which I don't know the answer is how often people will use this setup -without- TERMIE running. Is that a popular use case? Obviously, in that scenario, ESPTOOL-PY can't dynamically get the COMx number... then, I guess, you get into requiring a hardcoded COMx number in ESPTOOL-PY and ESPTOOL-PY looking for TERMIE to dynamically get the COMx port number to override the embedded number and that doesn't sound particularly elegant....

Thoughts?

Thanks!
- berniem