plerup/makeEspArduino

native builds

Closed this issue · 3 comments

d-a-v commented

There is a prelimary support to build sketches in native environment.
It would be great if your makefile could handle that in the proper arduino way.

https://github.com/esp8266/Arduino/tree/master/tests/host/README.txt#L54

Could you please elaborate on this, not quite sure I understand.

I think the point is to build a native Linux binary that can be started like an command line program. AFAIK, there are now compatible APIs that wrap standard POSIX functions for that purpose. I guess all that is needed is call the right toolchain and set some paths. I would happily test the hell out of it. ;-)

d-a-v commented

Yes.

tests/host$ make ../../libraries/ESP8266WiFi/examples/WiFiClient/WiFiClient
[...]
tests/host$ ./bin/WiFiClient/WiFiClient 
mock: TODO: wifi_set_event_handler_cb set


Connecting to your-ssid

WiFi connected
IP address: 
xx.xx.xx.xx
connecting to djxmmx.net:17
mock: TODO ClientContext::setSync()
mock: TODO setNoDelay(0)
sending data to server
receiving from remote server
"My spelling is Wobbly.  It's good spelling but it Wobbles, and the letters
 get in the wrong places." A. A. Milne (1882-1958)
closing connection
^C

mDNS and tcp servers are also working.

(running currently from a slightly modified version, fix will come at least for release 2.5.0)(fixed)

The included Makefile is poor and does not use any kind of arduino builder, so some examples will not compile.