Commit Graph

31 Commits

Author SHA1 Message Date
Terry Ellison 1f2e5bba4a
Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
Terry Ellison bbeb09b695 Squashed updates do get Lua51 and Lua53 working (#3075)
-  Lots of minor but nasty bugfixes to get all tests to run clean
-  core lua and test suite fixes to allow luac -F to run cleanly against test suite
-  next tranch to get LFS working
-  luac.cross -a options plus fixes from feedback
-  UART fixes and lua.c merge
-  commit of wip prior to rebaselining against current dev
-  more tweaks
2020-06-09 22:26:52 +02:00
Terry Ellison e7c29fe38e Lua 5.1 to 5.3 realignement phase 1 2020-06-09 22:26:06 +02:00
Johny Mattsson f7a545b951
Evict c_types.h, tidy up a other c_prefixes. (#2841) 2019-07-23 14:22:38 +10:00
Johny Mattsson 526d21dab4 Major cleanup - c_whatever is finally history. (#2838)
The PR removed the bulk of non-newlib headers from the NodeMCU source base.  
app/libc has now been cut down to the bare minimum overrides to shadow the 
corresponding functions in the SDK's libc. The old c_xyz.h headerfiles have been 
nuked in favour of the standard <xyz.h> headers, with a few exceptions over in 
sdk-overrides. Again, shipping a libc.a without headers is a terrible thing to do. We're 
still living on a prayer that libc was configured the same was as a default-configured
xtensa gcc toolchain assumes it is. That part I cannot do anything about, unfortunately, 
but it's no worse than it has been before.

This enables our source files to compile successfully using the standard header files, 
and use the typical malloc()/calloc()/realloc()/free(), the strwhatever()s and 
memwhatever()s. These end up, through macro and linker magic, mapped to the 
appropriate SDK or ROM functions.
2019-07-22 00:58:21 +03:00
Terry Ellison 1990f95740
Updated ROTables 1st tranch (#2742)
Updated ROTables
2019-05-08 14:08:20 +03:00
sergio d77666c0e8 trailing spaces cleanup (#2659) 2019-02-17 18:26:29 +00:00
Arnim Läuger fc2f325029 add missing NULLification of serout.delay_table after luaM_freearray() (#2220) 2018-01-10 21:25:35 +01:00
Philip Gladstone 77fe51050a Addition of gpio.pulse functions (#2190) 2018-01-10 21:08:39 +01:00
Philip Gladstone 9aebc84b72 Add support of counting of interrupts (#2149)
* Add support of counting of interrupts

* Update the timestamp when interrupt happens during dispatch. Also
clear out interrupts when setting up a new callback
2017-12-17 21:42:54 +01:00
philip f17b5ebf59 Make it build without INTERRUPT_ENABLE 2017-10-29 10:35:24 -04:00
Philip Gladstone 00bc9403fe Fix the adjusting of the time when there is a rollover (#1788) 2017-02-09 21:53:12 +01:00
ffedoroff 52aa1f7e3d Fix typo (#1715) 2017-01-10 21:05:48 +01:00
Philip Gladstone feab8b2208 Various minor bits of cleanup (#1647)
* Check the return code of the read function when doing crypto.fhash so that we don't pass negative lengths to the hashing functions
*  Fix various assert failures in the LVM arising from rotables. No functional change
* Add the gpio interrupt time to the callback (and pass it from the interrupt handler)
* Get the PC right in the perf module
* Make the headers static in the websocket module
* Fix the documentation
2016-12-25 10:45:34 +11:00
Philip Gladstone 025805b0e8 Fixes the gpio.serout problem from #1534 (#1535)
* Fix some issues in gpio.serout
* Minor cleanup
2016-10-11 21:51:00 +09:00
vsky f2d0195732 gpio.serout going asynchronous (#1359)
* gpio.serout going asynchronous

* fixing several issues following PR comments
2016-06-16 20:33:26 +02:00
Philip Gladstone 6822116d64 Merge pull request #1136 from TerryE/dev-quick-gpio-bugfix
one line bugfix to GPIO.c -- Oops!  (Finally!)
2016-03-19 10:02:55 -04:00
devsaurus 23137b4ed1 Add support for GPIO open-drain output mode. 2016-03-17 00:21:28 +01:00
TerryE 20465dd30f Updates to gpio.c and documentation to reflect review comments 2016-03-14 01:11:09 +00:00
TerryE 5595ca35cb Small bugfix to GPIO.c -- Oops! 2016-03-09 00:06:09 +00:00
philip ad3f267da6 Fix review comments 2016-02-26 09:07:06 -05:00
philip 72d8c73763 Made level triggers work better than before
Move the level trigger to be after the callback
2016-02-25 08:38:25 -05:00
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 182d45f928 Enable -std=gnu11 for modules dir.
Plus boat-load of fixes to actually make that build.
2016-01-20 19:40:47 +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
TerryE b773290b8c Major cleanup of module registration pass 2.
carrying on Johny's edits as per my comments on #810
2015-12-16 11:21:40 +11:00
Johny Mattsson 6b6456be47 Major cleanup of module registration.
As per #810 & #796, only LUA_OPTIMIZE_MEMORY=2 & MIN_OPT_LEVEL=2 are
supported when building. This commit effects that limitation.

With this change modules/auxmods.h no longer needs to be updated for
every new module, nor do module writers need to cater for a hypothetical
LUA_OPTIMIZE_MEMORY < 2 scenario.
2015-12-12 15:03:40 +11:00
Johny Mattsson d2ac5f1712 Changed os_intr_xxx to ets_intr_xxx.
The os_intr_xxx macros no longer exist in the SDK.
2015-10-12 13:26:04 +11:00
funshine 8558641190 add gpio.serout() api to help serialize bit out 2015-04-03 16:05:14 +08:00
HuangRui c04f2578ec Updated SDK to v0.9.5 and optimized memory. 2015-01-05 10:09:51 +08:00
funshine cdd13b1af3 source file first commit, folder structure refact 2014-12-22 19:35:05 +08:00