Commit Graph

9 Commits

Author SHA1 Message Date
TerryE 49733f6f6d Add New Tasking I/F and rework GPIO, UART, etc to support it
As with the last commit this rolls up the follwowing, but include the various
review comments on the PR.

-   **Documentation changes**. I've added the taks FAQ as a stub new Extension
developer FAQ, and split the old FAQ into a Lua Developer FAQ and a Hardware
FAQ.

-   **Tasking I/F**.  New `app/task/Makefile`, `app/task/task.c`,
`app/include/task/task.h` and `app/Makefile` as per previous commit.  Cascade
changes to `app/driver/uart.c`, `app/include/driver/uart.h`,
`app/user/user_main.c` and `app/modules/node.c`

-   **GPIO Rework** to `app/modules/gpio.c` and `pin_map.[hc]`, `platform.[hc]`
in `app/platform`

-   **Other Optimisations** Move the `platform_*_exists()` from
`app/platform/common.c` to static inline declarations in `platform.h` as
this generates faster, smaller code. Move lgc.a routines out of iram0.
2016-02-17 17:13:17 +00:00
Johny Mattsson d5f71eb0c6 Simplified linker script handling of libc.
Having ascertained that the SDK itself has no (zero, zilch, nada) dependencies
on the standard C library, the NodeMCU linker script now puts any and all
libc functions into irom, rather than carefully picking the ones that
were used by NodeMCU some months ago. This should help keep iram free for
the things which really need to be in iram (such as ISRs).
2016-01-28 17:56:01 +11:00
Johny Mattsson a6c0873a28 Upgrade to SDK 1.5.0 + Espressif's Open LWIP 1.5.0.
Removed earlier TCP port randomisation fix - the new SDK has its own fix
even though Espressif told me they wouldn't fix it. Yay?
2015-12-23 11:17:05 +11:00
Johny Mattsson 9003d3e8fb Rework NODEMCU_MODULE() to not pull in extra gunk.
Third time lucky. I hope. Hi Terry.
2015-12-18 13:10:48 +11:00
Johny Mattsson 4e8ef87d03 Reworked module registration, removed modules.h
Module creation & registration now made a lot simpler. In essence,
each module file is now self-contained and only needs a

  NODEMCU_MODULE(MYNAME, "myname", myname_map, luaopen_myname);

line to both be automatically recognised by the Lua initialization
as well as honor the LUA_USE_MODULES_MYNAME #define.
2015-12-16 16:09:16 +11:00
Johny Mattsson 4888c5fc62 Ensure ld-provided port alias is properly aligned. 2015-11-17 11:49:10 +11:00
Johny Mattsson f82415f6b9 Fix to do TCP port number randomization at boot.
This addresses the issue where a server would otherwise reject a valid
connection attempt from a rebooted node, due to the server thinking that
packet belonged to a recently closed session. By starting off the local
TCP port numbers at random* points each boot the risk of port reuse
across a reboot is significantly reduced.

*) As random as can be had via the lower 12 bits of the ccounter.
2015-11-05 14:40:57 +11:00
Johny Mattsson fe6289a6c2 Switch Lua input to event driven instead of polled.
The Lua input timer has been the thorn in the side which prevents a lot of
potential sleeping, unnecessarily.
2015-10-12 13:26:05 +11:00
Johny Mattsson 30380f6cff Further cleanup of ld directory.
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.
2015-10-12 13:26:04 +11:00