The path environment under Windows Subsystem for Linux typically
contains paths with spaces.
Error Manifests as: -
Setting IDF_PATH and re-invoking...
/bin/sh: 1: Syntax error: "(" unexpected
Makefile:21: recipe for target 'flash' failed
Tested on Ubuntu 18.04 both on Linux proper and WSL.
The repo we download from only has x86_64 anyway currently, but a
download error will be much more informative than bogus errors from
an incompatible compiler.
node.dsleep() no longer takes options.
node.output() not yet supported (needs syscall registration/chaining support)
Dynamic CPU frequency changing not currently supported in the IDF.
Various chip IDs not currently available/obtainable.
Boot reason completely revamped in ESP32, will need new code.
RTOS driver evicted as it did not play nice with stdio etc.
Implemented a minimal driver to fully support Lua console on UART0. Output
on UART0 done via stdout (provided by the IDF). Input and setup handled
via driver_console/console.c. In addition to the direct input function
console_getc(), the driver also registers in the syscall tables to enable
regular stdio input functions to work (yay!). The Lua VM is still using the
direct interface since it's less overhead, but does also work when going
through stdin/fd 0.
Auto-bauding on the console is not yet functional; revisit when the UART docs
are available.
Module registration/linking/enabling moved over to be Kconfig based. See
updates to base_nodemcu/include/module.h and base_nodemcu/Kconfig for
details.
The sdk-overrides directory/approach is no longer used. The IDF is simply
too different to the old RTOS SDK - we need to adapt our code directly instead.
Everything in app/ is now unused, and will need to be gradually migrated
into components/ though it is probably better to migrate straight from the
latest dev branch.
New driver is a three-way merger between Espressif's esp8266-rtos-sdk example
driver, Espressif's esp32-rtos-sdk not-example driver, and the previous
NodeMCU driver, plus some general clean-ups.
Basic interactivity is now available on the ESP32!
A fair bit of reshuffling with include paths and overrides was necessary, as
the two RTOS SDKs (ESP8266 and ESP32) don't have the same header structure
(or even libraries for that matter). Uses the xtensa-esp108-elf toolchain
to build.
Completely untested beyond linking, as I still can't flash the ESP32 module
I have :( I'd be most surprised if it does anything useful at this point
considering I've spent almost no time on the linker script or UART setup.
Anything using espconn has been ifdef'd out since espconn is not (and
probably will not be) available. Notably this includes the entire net module
as well as coap, mqtt and enduser_setup.
Many (most?) hardware bus drivers and related modules are also ifdef'd
out for now due to hardware differences. Functions surrounding sleep,
rtc and RF modes have also been hit by the ifdef hammer. Grep'ing for
__ESP8266__ and/or FIXME is a quick way of finding these places. With
time I hope all of these will be reinstated.
This compiles, links, and starts the RTOS without crashing and burning.
Lua environment does not yet start due to the different task architecture.
Known pain points:
- task implementation needs to be rewritten for RTOS (next up on my TODO)
- secure espconn does not exist, all secure espconn stuff has been #if 0'd
- lwip now built from within the RTOS SDK, but does not appear to include
MDNS support. Investigation needed.
- there is no access to FRC1 NMI, not sure if we ever actually used that
however. Also #if 0'd out for now.
- new timing constraints introduced by the RTOS, all use of ets_delay_us()
and os_delay_us() needs to be reviewed (the tsl2561 driver in particular).
- even more confusion with ets_ vs os_ vs c_ vs non-prefixed versions.
In the long run everything should be switched to non-prefixed versions.
- system_set_os_print() not available, needs to be reimplemented
- all the RTOS rodata is loaded into RAM, as it apparently uses some
constants while the flash isn't mapped, so our exception handler can't
work its magic. This should be narrowed down to the minimum possible
at some point.
- with each task having its own stack in RTOS, we probably need change
flash-page buffers from the stack to the heap in a bunch of places.
A single, shared, page buffer *might* be possible if we limit ourselves
to running NodeMCU in a single task.
- there's a ton of junk in the sdk-overrides now; over time the core code
should be updated to not need those shims
Squashed commit of the following:
commit 4439b8c45192f6dee1222df78bbb59f74509e0ee
Author: philip <philip@gladstonefamily.net>
Date: Sun Mar 6 20:23:21 2016 -0500
Fix the ignore
commit a07ee5acdf91286607c3e2dce128c9b8bfd7bd80
Author: philip <philip@gladstonefamily.net>
Date: Sun Mar 6 20:20:41 2016 -0500
Remove uneeded stuff
commit b3604ace92fc13b30161d385c354b0f1c5fe4046
Author: philip <philip@gladstonefamily.net>
Date: Sun Mar 6 20:15:26 2016 -0500
Remove client cert auth
commit 6e48c633569630736a986cd07a59a12de954391e
Author: philip <philip@gladstonefamily.net>
Date: Sun Mar 6 20:11:42 2016 -0500
More cleanup
commit d40eade405ef071d0d1b60d038566b5b8f2cafa3
Author: philip <philip@gladstonefamily.net>
Date: Sat Mar 5 10:56:56 2016 -0500
Move to almost working version
commit 1860a2d90afa94461c53bd41251d4870d6527f9d
Author: philip <philip@gladstonefamily.net>
Date: Fri Mar 4 08:04:09 2016 -0500
Changed the naem to server-ca.crt
commit e7a315660843273fe62943b7fe8ee6c0541dada2
Author: philip <philip@gladstonefamily.net>
Date: Thu Mar 3 21:16:26 2016 -0500
Update gitignores
commit 2b037d185c396209b64381399c40821c15e1840e
Author: philip <philip@gladstonefamily.net>
Date: Thu Mar 3 08:56:17 2016 -0500
Getting better
commit 763255cffba8e279158cd7f43391a3573efdeca8
Author: philip <philip@gladstonefamily.net>
Date: Wed Mar 2 22:28:21 2016 -0500
Works a bit better
commit a38325d1a47dbad255cb3e681da8415e8cf699ea
Author: philip <philip@gladstonefamily.net>
Date: Wed Mar 2 09:11:04 2016 -0500
First building version
commit 4aef13da33470ed954f2eaf5f7ac0ac3dcdf3774
Merge: 180e147 ebb0c33
Author: philip <philip@gladstonefamily.net>
Date: Tue Mar 1 22:03:06 2016 -0500
Merge remote-tracking branch 'upstream/dev' into ssl-client
commit 180e147c1abdcf4046ad9be9b3c1a48f4a875312
Author: philip <philip@gladstonefamily.net>
Date: Sun Feb 28 21:34:21 2016 -0500
Missing files from espressif
Try to imporve layout
Align the file names with the contents
Missing file
Review comments
More review coments
Renamed the main linker script to make it clear it is customised for NodeMCU
and not to be confused with the standard linker SDK linker scripts.
Changed to using the eagle.rom.addr.v6.ld file from the SDK.