kmpm / nodemcu-uploader

Upload files to your esp8266 running nodeMcu
MIT License
320 stars 89 forks source link

Impact of SDK 3.0 and Lua 5.3 updates to NodeMCU #89

Closed TerryE closed 3 years ago

TerryE commented 5 years ago

Hi @kmpm Peter, I just wanted to reach out and coordinate what we are doing on the NodeMCU project itself. This might interact with your uploaded tool, as @joysfera has raised in nodemcu/nodemcu-firmware#2948.

With effect from SDK 3.0, the Lua runtime uses pipes to buffer Lua input and output. The SDK 2.x and prior versions only used the H/W uart buffers to buffer input whilst parsing input streams so it was extremely easy to overrun these. Now the input driver dumps the interactive input lines into a fifo (in the Lua registry at stdin) using a high priority SDK task, and the interpreter reads this at low priority. Likewise redirected output is also spooled to stdout. This change has a few advantages:

This makes the user experience a lot easier. The downside of the input and output being buffered by default is that automated uploaders might get out of sync.

This is really just a heads-up, and to open a channel to the NodeMCU team.

kmpm commented 5 years ago

Thanks for the info. Really great. Just wish I had more time for this project :)

kmpm commented 4 years ago

@TerryE, if you would be so kind, have a look at the lua parts in https://github.com/kmpm/nodemcu-uploader/blob/master/nodemcu_uploader/luacode.py It works, but that is not the same as being correct :-)