1. 11 Aug, 2021 1 commit
    • Johny Mattsson's avatar
      Add ESP32C3 support/coexistence. · f123d462
      Johny Mattsson authored
      The uzlib and parts of Lua had to be switched over to use the
      C standard int types, as their custom typedefs conflicted with
      RISC-V toolchain provided typedefs.
      
      UART console driver updated to do less direct register meddling
      and use the IDF uart driver interface for setup. Still using our
      own ISR rather than the default driver ISR. Down the line we
      might want to investigate whether the IDF ISR would be a better
      fit.
      
      Lua C modules have been split into common and ESP32/ESP32-S
      specific ones. In the future there might also be ESP32-C3
      specific modules, which would go into components/modules-esp32c3
      at that point.
      
      Our old automatic fixup of flash size has been discarded as it
      interferes with the checksumming done by the ROM loader and
      results in unbootable systems. The IDF has already taken on
      this work via the ESPTOOL_FLASHSIZE_DETECT option, which handles
      this situation properly.
      f123d462
  2. 15 Jul, 2021 1 commit
  3. 07 Oct, 2018 1 commit
  4. 04 Apr, 2018 1 commit
  5. 02 Apr, 2018 1 commit
  6. 13 Apr, 2017 1 commit
  7. 17 Nov, 2016 1 commit
    • Johny Mattsson's avatar
      Improved flash size detection. · 2b454abf
      Johny Mattsson authored
      With the recent flash layout changes, it became very possible to misdetect the
      flash size. We're now using the partition table as the guard marker, since
      that really shouldn't be all 0xff. Also, we now don't clobber the flash
      device id (and keep block/sector/page/mask values).
      2b454abf
  8. 16 Nov, 2016 1 commit
  9. 12 Nov, 2016 1 commit
    • Johny Mattsson's avatar
      Updated to latest IDF. · 5c1bb4c6
      Johny Mattsson authored
      WiFi STA module updated to reflect IDF name changes.
      
      Platform flash and partition api updated to reflect IDF name changes.
      Eventually these (and the SPIFFS module) will likely need to be updated
      to exclusively work with the esp_partition_xxx() functions in order to
      support working with encrypted flash.
      5c1bb4c6
  10. 23 Sep, 2016 1 commit
  11. 22 Sep, 2016 1 commit
  12. 20 Sep, 2016 1 commit
    • Johny Mattsson's avatar
      Successfully boot barebones NodeMCU on ESP32 (only). · 9bbf8f43
      Johny Mattsson authored
      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.
      9bbf8f43
  13. 16 Sep, 2016 1 commit
  14. 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
  15. 30 May, 2016 1 commit
    • 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
  16. 26 May, 2016 1 commit
  17. 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
  18. 23 Feb, 2016 1 commit
  19. 22 Jan, 2016 1 commit
  20. 30 Dec, 2015 1 commit
  21. 12 Dec, 2015 1 commit
    • Johny Mattsson's avatar
      Cleaned up all uses of INTERNAL_FLASH_START_ADDRESS. · c4e8b04f
      Johny Mattsson authored
      There was only one genuine use of this macro, all other places were
      using it only as a necessary compensation. While this was fine as long as
      it was the first meg of flash which was mapped, it became incorrect and
      quite dangerous whenever this assumption did not hold (such as when
      running from the second slot in an OTA scenario).
      
      The flash API now uses actual addresses, not translated/mapped
      addresses, and the users of this API have been adjusted accordingly.
      This makes the flash API work correctly regardless of what flash mapping
      is in use.
      
      The old macro is still available under the new name
      INTERNAL_FLASH_MAPPED_ADDRESS, and this is used to detect flash writes
      where the source is mapped flash (and thus has to be bounced), and to
      adjust the _flash_used_end linker symbol when used with
      flassh_find_sector() by the filesystem code. The latter usage is not
      OTA-proof, but in an OTA scenario the filesystem needs a fixed location
      anyway and thus would not use this code path.
      c4e8b04f
  22. 12 Nov, 2015 1 commit
  23. 29 May, 2015 1 commit
  24. 21 May, 2015 1 commit
  25. 05 May, 2015 1 commit
  26. 24 Mar, 2015 1 commit
  27. 22 Mar, 2015 1 commit
  28. 15 Mar, 2015 3 commits
  29. 14 Feb, 2015 2 commits
  30. 11 Feb, 2015 1 commit
  31. 06 Jan, 2015 2 commits
  32. 05 Jan, 2015 4 commits
  33. 02 Jan, 2015 1 commit