1. 09 Feb, 2023 1 commit
  2. 17 Nov, 2022 1 commit
  3. 04 Jun, 2022 1 commit
  4. 04 Nov, 2021 1 commit
    • Johny Mattsson's avatar
      Make node.output() RTOS thread safe. · a0c9085c
      Johny Mattsson authored
      Also removed old, very unsafe node.osoutput(). We're now integrating cleanly
      with the IDF/newlib way of redirecting stdout.
      
      Added necessary depends in Kconfig to ensure VFS support is enabled, as
      otherwise you'd only get a mysterious crash when attempting to enable
      output redirection.
      a0c9085c
  5. 20 Oct, 2021 1 commit
    • Johny Mattsson's avatar
      Switch to IDF-provided VFS and standard `io` module. · a2ba49e3
      Johny Mattsson authored
      The IDF-provided VFS resolves several issues:
      
       - The IDF components having a different view of the (virtual) file system
         compared to the Lua environment.
      
       - RTOS task/thread safety. Our legacy VFS was only ever safe to use
         from the LVM thread, which limited its usability. Upgrading it
         would have effectively required a reimplementation of the IDF VFS,
         which would have been a bigger task with larger on-going maintenance
         issues.
      
       - We're no longer needing to maintain our own SPIFFS component.
      
       - We're no longer needing to maintain our own FATFS component.
      
       - The legacy of the 8266's lack of standard C interface to the file system
         is no longer holding us back, meaning that we can use the standard
         Lua `io` module rather than the cobbled-together swiss army knife
         also known as the file module.
      
      Of course, the downside is that we'll either have to declare a backwards
      breakage in regard to the file module, or provide a Lua shim for the old
      functions, where applicable.
      
      Also included is some necessary integer type fixups in unrelated code,
      which apparently had depended on some non-standard types in either the
      SPIFFS or FATFS headers.
      
      A memory leak issue in the sdmmc module was also found and fixed while
      said module got switched over to the Espressif VFS.
      
      Module documentation has been updated to match the new reality (and I
      discovered in some places it wasn't even matching the old reality).
      a2ba49e3
  6. 16 Sep, 2021 1 commit
    • Johny Mattsson's avatar
      Fixup LROT_MASKs for all modules. · ea968de6
      Johny Mattsson authored
      Search-and-replace considered harmful. I completely missed the need to
      explicitly declare "fast" tag functions (__xyz) in the mask field to
      LROT_BEGIN()/LROT_END() when I brought over the 5.1+5.3 support.
      Without those flags set properly, the LVM doesn't even bother going
      looking for those methods, which in this case led to garbage collection
      not calling the __gc functions, among other horrible things.
      
      Mea culpa.
      ea968de6
  7. 30 Aug, 2021 5 commits
  8. 25 Aug, 2021 3 commits
  9. 23 Aug, 2021 2 commits
    • Johny Mattsson's avatar
      Fixed panic handling on REPL input. · 46f5079a
      Johny Mattsson authored
      The Lua debug module is mandatory now.
      46f5079a
    • Johny Mattsson's avatar
      Discard old console driver. · fbef7fea
      Johny Mattsson authored
      The IDF provides all we need these days, and the old driver was just
      needlessly conflicting with the IDF settings and setup.
      
      This also simplifies our uart input path as we no longer need to
      duplicate the raw byte handling for when "run_input" is false.
      fbef7fea
  10. 21 Aug, 2021 1 commit
    • Johny Mattsson's avatar
      Port Terry's Lua 5.1 + 5.3 work from the esp8266 branch. · 17df207a
      Johny Mattsson authored
      Changes have been kept to a minimum, but a serious chunk of work was
      needed to move from 8266isms to IDFisms.
      
      Some things got refactored into components/lua/common, in particular
      the LFS location awareness.
      
      As part of this work I also evicted our partition table manipulation
      code, as with the current IDF it kept breaking checksums and rendering
      things unbootable, which is the opposite of helpful (which was the
      original intent behind it).
      
      The uart module got relocated from base_nodemcu to the modules component
      properly, after I worked out how to force its inclusion using Kconfig alone.
      17df207a
  11. 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
  12. 04 Aug, 2021 1 commit
  13. 29 Jul, 2021 1 commit
  14. 15 Jul, 2021 1 commit
  15. 02 Apr, 2021 1 commit
  16. 22 Jul, 2019 1 commit
  17. 15 Jan, 2019 1 commit
  18. 04 Nov, 2018 1 commit
  19. 13 Jun, 2017 1 commit
    • zelll's avatar
      ESP32: uart 1/2 supports (#1982) · 329bd73b
      zelll authored
      * uart 1/2
      
      * call -> pcall in uart_on_* functions
      
      * fix docs
      
      * fixed console driver when using custom console uart
      
      * fixed line_inverse and error callback
      
      * fixed a crash when uart.start() called more than one time
      329bd73b
  20. 19 Apr, 2017 1 commit
  21. 29 Mar, 2017 1 commit
  22. 27 Nov, 2016 1 commit
  23. 16 Nov, 2016 1 commit
  24. 04 Oct, 2016 2 commits
  25. 26 Sep, 2016 1 commit
    • Johny Mattsson's avatar
      Most of the node module from dev. · 6349fc86
      Johny Mattsson authored
      node.dsleep() no longer takes options.
      node.output() not yet supported (needs syscall registration/chaining support)
      
      Dynamic CPU frequency changing not currently supported in the IDF.
      Various chip IDs not currently available/obtainable.
      Boot reason completely revamped in ESP32, will need new code.
      6349fc86
  26. 22 Sep, 2016 1 commit
  27. 21 Sep, 2016 2 commits
  28. 20 Sep, 2016 2 commits
    • Johny Mattsson's avatar
      Fixed NodeMCU boot banner. · 51fabc74
      Johny Mattsson authored
      Build for ESP32 on Travis.
      51fabc74
    • 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
  29. 16 Sep, 2016 1 commit