Commit Graph

238 Commits

Author SHA1 Message Date
Johny Mattsson 088d2c3820 Reimplemented esp_init_data_default.
To work around the pesky "rf_cal[0] !=0x05" hang when booting on a chip
which doesn't have esp_init_data written to it.

It is no longer possible to do the writing of the esp_init_data_default
from within nodemcu_init(), as the SDK now hangs long before it gets
there.  As such, I've had to reimplement this in our user_start_trampoline
and get it all done before the SDK has a chance to look for the init data.
It's unfortunate that we have to spend IRAM on this, but I see no better
alternative at this point.
2016-10-04 12:04:09 +11:00
Philip Gladstone 04e93b2433 Add the esp-gdbstub to enable debugging (#1506)
* Initial version of gdbstub support

* Add DEBUG argument to Makefile to add more debug data and turn off -Os

* Add the output redirection handling

* Added documentation

* Cleaned up the english a bit

* Make gdboutput actually trap all the output

* Review comments
2016-09-21 11:38:12 +10:00
Arnim Läuger ecf8bd98d6 Add FatFs and SD card support (#1397)
* Add FatFs
* enable BUILD_FATFS for all-module build
* push vfs into rest of firmware
* align maximum filename length
* increase timeout for acmd41 during card initialization
* switch from DOS to Unix path semantics chdrive() is substituted by chdir()
* update to fatfs R.012a incl. patches 1-6
* add callback for rtc provisioning in file
* update docs
2016-09-05 20:17:13 +02:00
Yury Popov be263dacde Set espconn's secure buffer size once at initialization (#1466)
Fixes #1457
2016-09-04 22:45:46 +02:00
Marcel Stör 5e01b51123 Make DNS engine RFC 5452 compliant (#1324)
The original code did not deal with UDP binding failures, this new code
does one random port attempt and then sets port to 0 to get 'OS
default' behaviour, and ASSERTs that that has to work.

Patch also moves the local UDP port range definition to udp.h from
udp.c.
2016-08-20 22:19:31 +02:00
Luís Fonseca 16051d51d6 Implement initial version for websocket module (#1433) 2016-08-18 13:59:44 +02:00
Marcel Stör 07aa210c50 Remove DEVKIT_VERSION_0_9 and deprecated functions (#1439) 2016-08-04 23:03:37 +02:00
Arnim Läuger ff46abe61f Fix DHCP server heap corruption per recommendation by Espressif (#1421)
To avoid crash in DHCP big packages modify option length from 312 to MTU - IPHEAD(20) - UDPHEAD(8) - DHCPHEAD(236).
2016-08-02 22:30:11 +02:00
Arnim Läuger 84c005e85c Update to SDK 1.5.4.1 (#1390) 2016-07-22 23:18:47 +02:00
Arnim Läuger 56839fb20b Add rtctime.epoch2cal() (#1386) 2016-07-19 22:01:26 +02:00
Yury Popov 549f42107e Update to SDK 1.5.4 (#1377) 2016-07-10 15:18:46 +02:00
Jonathan Karras 04b86b80f6 Fix open drain level issues when _not_ using parasitic power mode. (#1291)
Port of @pstolarz work on PaulStoffregen/OneWire#8
2016-06-28 22:51:55 +02:00
Philip Gladstone 4a8abc2060 Add support for driving instrument gauge stepper motors (#1355) 2016-06-26 14:19:06 +02:00
Arnim Läuger d416648990 Add pcm module. (#1255)
* Add pcm module.
* Add network streaming example.
* document hw_timer dependency with pwm
* Add vu peak callback.
2016-06-05 23:21:36 +02:00
Philip Gladstone af39a0bc25 Upgrade to latest SPIFFS and add building of file systems (#1226)
Fixes #1164 and thus also #1150, #1149, #1147 and #898.

* Move to latest version of SPIFFS
* Add SPIFFS porting layer for NodeMCU
* Add option to delete output if it doesn't fit
* Change FLASHSIZE to be in bits by default: default 4mb 32mb
* Add SPIFFS_MAX_FILESYSTEM_SIZE override
* Add notes on SPIFFS_FIXED_LOCATION
* Add 1M boundary
* Include the current version of the LICENSE
2016-06-05 23:10:58 +02:00
Jason Schmidlapp e3f7e6321f Added support for STM L3G4200D digital gyroscope (#1251) 2016-06-05 23:00:37 +02:00
Jason Schmidlapp be10ccdb6b Added support for Analog Devices ADXL345 accelerometer (#1252) 2016-06-05 22:59:55 +02:00
Jason Schmidlapp bb9e210441 Added support for Honeywell HMC5883L digital compass (#1253) 2016-06-05 22:59:39 +02:00
Sebastian ecf74e5004 Added support for tm1829 baed led controllers (#1330) 2016-06-03 23:47:36 +02:00
Johny Mattsson 30d354c290 Rework ADC mode setting approach (#1285)
- Stop fighting against the SDK in terms of owning/writing the init_data block.
  NodeMCU included a default init_data block because originally the SDK did
  not, but by now it's not needed.

- Expose a way to reconfigure the ADC mode from Lua land. With most people
  using the cloud builder and not able to change the #define for byte 107
  this has been a pain point.

- Less confusion about which init_data has been used. Lua code can now simply
  state what mode it wants the ADC to be in, and not worry about the rest of
  the init_data complexities such as the init_data changing location due to
  flashing with wrong flash_size setting, or doing/not doing a chip-erase
  before loading new NodeMCU firmware.
2016-05-18 21:45:15 +02:00
Johny Mattsson 9a7a2c4dc3 Merge pull request #1184 from devsaurus/user-gnu11
Enable -std=gnu11 for user dir
2016-04-30 13:26:09 +10:00
devsaurus 8e11e895f5 move SPIRead to rom.h 2016-04-29 19:57:31 +02:00
Philip Gladstone 5b4b1e0388 Autobaudrate detection by default -- to reduce problems with speed change (#1215)
* Auto autobaud detection by default

* Added stopping the autobaud if explicitly configured

* Add note about auto-baud to the uart.md
2016-04-17 23:44:18 +02:00
Philip Gladstone 3a5e5f10e2 Take 2: Add regular sends to mdns. Check for (some) buffer overflows. Make it handle unicast
Merging as suggested by @TerryE (and squashing at the same time. Turns out that this feature is enabled for this repo).

* Squashed commit of the following:

commit f985f10d9d2ee035f5a6ee6245c60d9904d98cc1
Author: philip <philip@gladstonefamily.net>
Date:   Sun Mar 27 21:52:46 2016 -0400

    Better mdns code

commit 6ee49ee106
Author: philip <philip@gladstonefamily.net>
Date:   Fri Mar 25 23:25:11 2016 -0400

    Update the docs

commit 7e455541c6
Author: philip <philip@gladstonefamily.net>
Date:   Thu Mar 24 21:58:16 2016 -0400

    Add retries and buffer checking to mdns

    Get the length right

    Now it seems to work

* Might work for combined mode

* Fix crash

* Simplified various bits of code. Changed the LUA interface

Added checking (to some degree) incoming quyery types

Move the defaults to the right place

Added reference to the RFC`
2016-04-03 14:10:52 -04:00
dnc40085 5e9ab01523 Modified wifi module
Implement SDK event monitor
Move wifi status event monitor code into seperate file
(app/modules/wifi_eventmon.c)
Modify wifi lua callback registration code.
Add Functions wifi.ap.deauth and wifi.sta.getrssi
Rework wifi event monitor to use tasking interface
fix for Lua coroutine compatibility issue
Made changes Suggested by TerryE

Also, moved code that sets the default host name out of
luaopen_wifi_init and into a separate function and added a post_task_low
entry in it's place.

Replaced some if test then return error lines with
luaL_argcheck
Add check for malloc null return in wifi.eventmon 
to catch out of memory errors
2016-03-31 19:01:41 -07:00
Philip Gladstone bff75bc0f4 Merge pull request #1132 from pjsg/devtool
Merging on @TerryE say-so. No spurious output seen.
2016-03-25 23:36:41 -04:00
devsaurus f768e22293 shorten ucg constructors to keep them below LUA_MAX_ROTABLE_NAME 2016-03-25 23:49:22 +01:00
philip 84487d300b Remove unusedcode 2016-03-20 12:54:16 -04:00
Terry Ellison 1b3d8d4815 Merge pull request #1127 from marcelstoer/dev-new-default-config
Change a number of default values
2016-03-09 22:24:14 +00:00
Marcel Stör bcbf49f275 Change a number of default values 2016-03-09 23:16:43 +01:00
Terry Ellison 76f2654f82 Merge pull request #1105 from TerryE/dev-node-task
Extend the node library to include a Lua implementation of task posting
2016-03-06 17:17:55 +00:00
Johny Mattsson 5684392911 Merge pull request #1111 from TerryE/dev-fix-luac-compile
Fix break in luac.cross build and add some documentation
2016-03-04 01:22:41 +11:00
TerryE f2ea3df8a4 Fix break in luac.cross build and add some documentation 2016-03-03 02:03:23 +00:00
Terry Ellison ebb0c33364 Merge pull request #1040 from pjsg/struct
Direct port of the struct module
2016-03-02 01:57:17 +00:00
TerryE 4f8f192cbe Extend the node library to include a Lua implementation of task posting 2016-03-01 23:37:41 +00:00
Marcel Stör f087908d62 Disable SmartConfig by default 2016-03-01 21:32:24 +01:00
Terry Ellison 00cc4b42dc Merge pull request #1067 from pjsg/rotarymod
Module to handle rotary decoders
2016-03-01 16:36:24 +00:00
Terry Ellison d883f2c4be Merge pull request #1088 from TerryE/dev-dis-smart-wifi
Make the wifi.smart functions options and remove wofs and upgrade
2016-03-01 16:34:00 +00:00
philip d40ee50a8e Squashed commit of the following:
commit 2c7c3fc3985cc32866e8af496abea9971eaee90a
Merge: 9179dae 41022c3
Author: philip <philip@gladstonefamily.net>
Date:   Sun Feb 28 14:47:47 2016 -0500

    Merge remote-tracking branch 'upstream/dev' into rotary_2

commit 9179dae0824e6b35ad09e5113aacc26dc91692c0
Author: philip <philip@gladstonefamily.net>
Date:   Fri Feb 26 20:53:27 2016 -0500

    Review comments

commit 67741170e20ccb2b636e701f0664feff2aafbb4c
Author: philip <philip@gladstonefamily.net>
Date:   Fri Feb 26 20:59:49 2016 -0500

    Squashed commit of the following:

    commit 8c9a64731c4a8b9aedda18a399b433b173d2199f
    Merge: 085935f 19d3c1d
    Author: philip <philip@gladstonefamily.net>
    Date:   Fri Feb 26 20:58:10 2016 -0500

        Merge remote-tracking branch 'upstream/dev' into rotarymod

        Conflicts:
        	app/platform/platform.c

    commit 085935fc56986d607ff5e05d1663970331959c34
    Author: philip <philip@gladstonefamily.net>
    Date:   Fri Feb 26 20:53:27 2016 -0500

        Review comment

    commit 7732fd2d1044f28b8fcf5b0aa0f76d76fe80f449
    Author: philip <philip@gladstonefamily.net>
    Date:   Sat Feb 20 12:10:38 2016 -0500

        Module to handle rotary decoders

        Eliminate ROTARY_DEBUG

        Remove unused file

Eliminate a malloc call

Cleaned up the register code. Now 0x114 bytes

Fix bug with clearing bits in one case

Fix the type in the #define name
2016-02-29 08:21:12 -05:00
Arnim Läuger 19d3c1d581 Merge pull request #1041 from pjsg/performance
Simple low level performance monitoring tool as a module
2016-02-26 22:20:25 +01:00
TerryE 46ea2aa42e Make the wifi.smart functions options and remove wofs and upgrade
AFAIK no one uses the wifi.startsmart() and wifi.stopsmart().  Removing
them frees up an extra 20-25K of Flash to use as filesystem.  So I have
added a new config define WIFI_SMART_ENABLE which is enabled by default
so the default functionality is the same, but if this is commented out
then this code is omitted.

I have also removed wofs and upgrade from this build as we no longer
support these.
2016-02-26 17:23:38 +00:00
Johny Mattsson 88369a5bd3 Merge pull request #1072 from TerryE/dev-encoder
Addition of encoder module with base64 and hex encode/decode as per #925
2016-02-26 12:35:02 +11:00
Arnim Läuger 78e9873d33 Merge pull request #988 from pjsg/mdns
Simple mdns implementation using the Espressif code
2016-02-24 22:54:39 +01:00
philip e516a0e9a2 Performance monitoring tool.
Squashed commit of the following:

commit f1820af82bb5467d0c79c03290fca809b0273030
Author: philip <philip@gladstonefamily.net>
Date:   Sun Feb 21 15:08:31 2016 -0500

    Now uses userdata

commit 74a2298f5f2d2b07097a9501046efb8d4061ec5e
Merge: 4ffab15 716e682
Author: philip <philip@gladstonefamily.net>
Date:   Sun Feb 21 13:54:40 2016 -0500

    Merge remote-tracking branch 'upstream/dev' into performance

    Conflicts:
    	app/platform/hw_timer.c
    	app/platform/hw_timer.h

commit 4ffab15a2a15e0c6b2d7e93611a02be47bafdc79
Author: philip <philip@gladstonefamily.net>
Date:   Fri Feb 12 17:36:12 2016 -0500

    Simple low level performance monitoring tool

    Make it work with the new hw_timer code

commit 944db2bdb8
Author: philip <philip@gladstonefamily.net>
Date:   Sun Feb 14 10:32:41 2016 -0500

    Initial version of the hw_timer as part of the platform

Addressed review comments

Add the binsize return
2016-02-22 08:50:07 -05:00
Arnim Läuger b171ca35ba Merge pull request #1008 from vsky279/bme280
BME280/BMP280 Digital Pressure Sensor module
2016-02-21 20:58:37 +01:00
vsky 6bd0ec4480 BME280/BMP280 Digital Pressure Sensor module 2016-02-21 19:51:08 +01:00
TerryE ffa7ee9b67 Addition of encoder module with bas64 and hex encode/decode as per #925 2016-02-21 04:18:27 +00:00
Arnim Läuger 8743319b02 Merge pull request #1000 from devsaurus/sigma_delta
Add sigma_delta module.
2016-02-20 20:11:42 +01:00
devsaurus 8982650df9 Add sigma_delta module. 2016-02-18 21:35:58 +01:00
philip 669543bbf2 Hardware timer support and convert the PWM module to use it 2016-02-17 21:07:33 -05:00