-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sketch emulation on host #5342
Sketch emulation on host #5342
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great stuff, but I haven't had a chance to try it myself yet. This weekend I'm home and will make time, though!
I think maybe defining what the end goal is would help. I think my idea of why we'd want this (run more of core through host-based testing and code analysis) is different than yours (allow people to build working copies of ESP8266 sketches on their PCs), so some of my comments spring from that.
This is cool - top work. Running on a pi you could even support real gpio, spi, i2c, i2s for much quicker dev cycles (with much less flash wear !) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just able to build and run BearSSL_Validation against valgrind on my host. Very cool and useful! Approving, even though there's much left to go.
One suggestion might be to have some sort of "host_exit()" call which will end the app when run on the host but cause the built app to sleep forever. Makes it simple to run one-and-done examples as test cases.
libraries/DNSServer/examples/CaptivePortalAdvanced/CaptivePortalAdvanced.ino
Outdated
Show resolved
Hide resolved
easier to clean, and IDE don't like them
Per: https://en.wikipedia.org/wiki/Printf_format_string , "%zd"/"%zu" === size_t format specifier, if there are still issues w/printfs. |
Sketch emulation on host
This environment let compile esp8266/Arduino sketches into native
environment. Network (tcp, udp, including ssl and multicast) is linked to
local host interfaces. WiFi is trivialy emulated and reported as "just"
already connected and usable.
Currently network emulation is a complete rewrite of
WiFiClient+WiFiServer/ClientContext and WifiUdp/UdpContext using socket
posix API. Further work will optionally propose native lwIP library
instead.
(readme)