1. 22 Jun, 2016 1 commit
    • Johny Mattsson's avatar
      Disabled -Wl,--gc-sections for SDK libs. · f9c65b94
      Johny Mattsson authored
      Running without interrupt vectors not considered all that useful...
      
      Disabled flash-size-byte-setting and SPIFFS formatting on ESP32, for now
      at least, as both of these appeared to corrupt the flash and prevent
      subsequent boots.
      
      Disabled UART init on ESP32 until the driver gets updated.
      
      This now gets us to a banner on ESP32, but not yet a prompt.
      f9c65b94
  2. 09 Jun, 2016 1 commit
    • Johny Mattsson's avatar
      Make NodeMCU compile and link for ESP32. · 224788b6
      Johny Mattsson authored
      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.
      224788b6
  3. 03 Jun, 2016 1 commit
  4. 02 Jun, 2016 3 commits
  5. 01 Jun, 2016 3 commits
  6. 31 May, 2016 3 commits
  7. 30 May, 2016 3 commits
    • Johny Mattsson's avatar
      Boot to (nonresponsive) Lua prompt on RTOS! · 56789592
      Johny Mattsson authored
      Uart driver currently disabled as it's not (yet) compatible with RTOS.
      
      Running Lua task with excessive stack to avoid smashing it; need to work out
      what's using so much stack space.
      
      Changed some flash reading functions to not attempt to drop an entire 4k
      flash page onto the stack.
      
      Ensure the task pump doesn't attempt to retrieve from uninitialised queues.
      56789592
    • Johny Mattsson's avatar
      97568e98
    • Johny Mattsson's avatar
      Rewrite of exception handler, take 2. · 4995bcb9
      Johny Mattsson authored
      Turns out ets_printf() lied to me. When handed an aligned string in flash it
      did 32bit loads on it instead of the expected 8bit loads, so just silencing
      the exception was enough to give the appearance of it working.
      4995bcb9
  8. 27 May, 2016 1 commit
  9. 26 May, 2016 4 commits
  10. 24 May, 2016 2 commits
    • Johny Mattsson's avatar
      Reimplemented the NodeMCU task interface on top of RTOS. · 5c39a1f6
      Johny Mattsson authored
      Not yet hooked up to an RTOS task, however.
      5c39a1f6
    • Johny Mattsson's avatar
      Initial pass at switching to RTOS SDK. · f3e2a3af
      Johny Mattsson authored
      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
      f3e2a3af
  11. 21 May, 2016 1 commit
  12. 18 May, 2016 1 commit
    • Johny Mattsson's avatar
      Rework ADC mode setting approach (#1285) · 30d354c2
      Johny Mattsson authored
      - 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.
      30d354c2
  13. 13 May, 2016 1 commit
    • dnc40085's avatar
      Updated tmr module and documentation · 17443720
      dnc40085 authored
      * Change upper limit for timer in `tmr_register` and `tmr_interval` to reflect new limit in SDK 1.5.3.
      * Change documentation for `tmr.alarm()`, `tmr.interval()` and `tmr.register()` to match source.
      * Improve error reporting to be more descriptive.
      17443720
  14. 12 May, 2016 1 commit
  15. 10 May, 2016 1 commit
  16. 09 May, 2016 1 commit
    • Thomas Soëte's avatar
      Finalize work on ws2812 module · 0577c8af
      Thomas Soëte authored
      * Fix bug on first write
      	Pin is 'HIGH' at reset, so we need to pull it down and generate a
      	reset.
      
      * Move init code to flash section, not needed to be in iram.
      
      * Remove pin choice in API
      
      * Remove lock in ws2812_buffer_write
      
      * Remove naked malloc
      
      * Drop ws2812_writergb
      
      * Drop support of ws2812.buffers to ws2812_writegrb should use ws2812.buffers:write
      
      * Add support for <>3 colors per leds strips (RGBW)
      
      * Remove ICACHE_FLASH_ATTR
      
      * Add static const on _uartData to avoid initialization penalty
      0577c8af
  17. 29 Apr, 2016 1 commit
  18. 24 Apr, 2016 1 commit
  19. 17 Apr, 2016 1 commit
  20. 15 Apr, 2016 1 commit
    • Johny Mattsson's avatar
      SNTP module enhancements (#1243) · f4288978
      Johny Mattsson authored
      * Provide an error code to SNTP error callback.
      
      * Switch SNTP to use ephemeral port.
      
      In case we're being hit by ISP-level thou-shall-not-run-NTP silliness.
      f4288978
  21. 09 Apr, 2016 1 commit
  22. 03 Apr, 2016 1 commit
    • Philip Gladstone's avatar
      Take 2: Add regular sends to mdns. Check for (some) buffer overflows. Make it handle unicast · 3a5e5f10
      Philip Gladstone authored
      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 6ee49ee106274bc63f6309047e57f7bc9828523e
      Author: philip <philip@gladstonefamily.net>
      Date:   Fri Mar 25 23:25:11 2016 -0400
      
          Update the docs
      
      commit 7e455541c6f2531824cfb2419d051f1306935fdf
      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`
      3a5e5f10
  23. 02 Apr, 2016 1 commit
    • Jason Follas's avatar
      Corrected SPI CPOL/CPHA relationships · e16204d4
      Jason Follas authored
      * Corrected CPOL/CPHA relationships
      
      * Simplified to remove duplicated code
      
      * Removed comments about when MISO is sampled. ESP seems to sample MISO on same clock edge as when MOSI is set.
      e16204d4
  24. 01 Apr, 2016 2 commits
    • dnc40085's avatar
      Modified wifi module · 5e9ab015
      dnc40085 authored
      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
      5e9ab015
    • Robert Foss's avatar
  25. 31 Mar, 2016 1 commit
  26. 30 Mar, 2016 2 commits