Skip to content

Moddable SDK 3.9.1

Compare
Choose a tag to compare
@mkellner mkellner released this 04 May 22:59
· 2049 commits to public since this release

This release contains improvements to the Moddable SDK made between April 1, 2023 and May 4, 2023.

Highlights of this release include:

May Community Call

The monthly Moddable Community Call is this Friday, May 12 at 8:00 PM PDT. We hope this time will be convenient for our community members in Asia and parts of the United States. Join us live on Zoom to learn more about this month's release and chat with the Moddable community.

Our special guest this month is Shinya Ishikawa, creator of the award-winning super-kawaii Stack-chan robot. Ishikawa-san recently taught Stack-chan how to have conversations using ChatGPT. Join us to learn how Ishikawa-san achieved this amazing milestone using the Moddable SDK.

Community News

  • Our ESP-IDF 5 preview has been updated to Moddable SDK 3.9.0. Please help test this ahead of planned cutover to ESP-IDF 5.1. Details are in our release notes for Moddable SDK 3.8.0.
  • A new book on Node-RED MCU Edition has been published in Japan. Written by Ayachika Kitazaki, Masahiro Shioji, and Yashushi Tauchi, this is a great place to get started with this visual IoT programming environment powered by the Moddable SDK.
  • An ESP32 module for working with SD Cards in the Moddable SDK has been published by @salarizadi. The SD Card is accessible through the File module, so it is very easy to get started with.
  • There's a new port of the popular Cron module from Node.js now available for the Embedded JavaScript. Cron makes it easy to schedule callbacks at specific intervals (e.g. each Tuesday and Thursday at 3 PM).
  • Stack-chan, the award-winning super-kawaii robot implemented in TypeScript and powered by the Moddable SDK, has its own Discord server! Check out the announcement and invitation from @meganetaaan.

If you have a community news item for our next update, please let us know.

Release details

  • XS
    • XS 14 has arrived with support for the ECMAScript 2023 standard. This includes new convenience methods for working with Arrays and TypedArrays. The new "by copy" methods are helpful for embedded developers to simultaneously move and transform arrays from frozen immutable flash memory into RAM.
    • ECMAScript 2023
    • Improved conformance
      • As part of updating to ECMAScript 2023 we have also run the latest test262 against XS and fixed issues identified by recently added tests
      • Of note, new tests related identified issues with the expected ticks with async generators that have been fixed
    • Explicit Resource Management proposal. XS has implemented this Stage 3 proposal early to explore how it may be useful in managing resources on embedded devices and how it may be integrated into ECMA-419. It is enabled in the xst command line tool. In all other environments, it is disabled by default and can be enabled by setting the mxExplicitResourceManagement build flag.
    • For uses of XS in non-embedded environments, the alias feature to allow changes to objects stored in immutable flash memory is unused. Aliasing is now disabled at build time when mxAliasInstance is not set. This reduces the surface area available for exploits and improves performance marginally.
    • Other fixes
      • Fixed match failure in certain Regular Expressions that contain nulls #1089 (reported by @salarizadi)
      • Fixes for issues identified by fuzz testing with Fuzzilli and oss-fuzz. Thank you to @Agoric for their ongoing assistance with this work.
  • Modules
    • New ECMA-419 sensor driver for the popular Bosch BME680 for air pressure, temperature, and humidity. (Requested by @Sineos, @mshioji, and others)
    • New ECMA-419 peripheral driver for Renesas X9C Series digital potentiometers (contributed by @dabdoue)
    • New ECMA-419 peripheral driver for Tontek TTP223 capacitive touch switch (contributed by @dabdoue)
    • fetch implementation updated to handle responses with content-length of 0. #1080 (reported by @NextWorldLab)
    • ECMA-419 mqttclient implementation fixed to correctly handle messages received with 0 in low byte of length. phoddie/node-red-mcu#112 (reported by @colinl)
    • Fix stall in SNTP client on receipt of certain malformed packets
    • Empty outline paths no longer crash #1092 (reported by @salarizadi)
    • WAVStreamer and SBCStreamer modules updated to fix edge case that sometimes caused them to allocate more buffers than needed. Improves memory stability when streaming.
    • OTA module manifest added for easier integration into projects
    • debug module manifest added for easier integration into projects
    • DFRobot oxygen sensor module specifier corrected to embedded:sensor/Oxygen/SEN0322
  • Devices
    • M5Stack Core2 port updated to use 16 MB flash (previously limited to 4 MB) and improve quality of audio playback by outputting 32-bit samples (instead of of 16-bit samples)
    • ESP32
      • Wi-Fi and Ethernet modules updated so that both can be active simultaneously #1079 (reported by @bartbutenaers)
      • ECMA-419 Digital and DigitalBank updated to use ESP-IDF constants to check for pin availability for better portability across the ESP32 silicon family
      • Uses i2s_write_expand for 32-bit output to eliminate memory buffer used for expanding samples
      • Added MIXERBYTES to audio output configuration to allow projects to tune the size of memory buffers used to render audio
      • Improvements to build flow for programming USB-only development boards
      • Support for programming and debugging ESP32-S2 over USB
      • Port for Adafruit QT Py ESP32-S2
      • Port for Wemos S2 mini
      • Device ports for ESP32 now include creation section in manifest to allow for easier support for ESP32 development boards with different RAM sizes
      • Fix paths in ports for M5 Atom S3 #1096 (contributed by @NextWorldLab)
  • Tools
    • Flash partitioning for ESP32 may now be performed by mcconfig, eliminating the need for most projects to manually partition flash. Flash partitions are created for mods, files, and Over-the-Air updates if that feature is used in the project. Details are available in the announcement and documentation.
    • Manifests for ESP32 device ports may now set C_FLAGS_SUBPLATFORM to define additional flags for builds of C files in the Moddable SDK. Documentation here. Useful in relatively obscure circumstances like working around silicon bugs. #1069 (motivated by report from @beckerzito)
    • mcconfig now resolves relative paths in the build section of manifests. This avoids a dependency on paths, which is particularly useful for device ports.
    • Fixes for incremental builds on Windows
  • Testing
    • testmc updated image checksum now includes the image bounds to detect location changes
    • All tests with image checksums synced with new checksum algorithm
    • Create dedicated flash partition for flash tests rather than relying on mods partition
  • Examples
    • httpzip example updated to simplify creation of ZIP archives. httpzip is an easy and efficient way, created by @wilburforce, to embed a web site in your device using a ZIP file and then use a WebSocket connection to communicate between the device and web page. #1099 (reported by @Frida854)

Contact Us

If you have questions or suggestions about anything here, please reach out: