Skip to content

June 3, 2021

Compare
Choose a tag to compare
@phoddie phoddie released this 03 Jun 21:19
· 4889 commits to public since this release

This release of the Moddable SDK moves to ESP-IDF 4.21 from 4.2. Developers working with ESP32 and ESP32-S2 must update their ESP-IDF to use this release of the Moddable SDK. Details on how to update your ESP-IDF build are available for macOS, Windows, and Linux.

If you have questions or comments about this update, the Moddable SDK, or using JavaScript for embedded development in general, please join us on our Discussions page on GitHub.

  • XS
    • String.fromArrayBuffer improvements
      • Ensures input bytes are valid UTF-8
      • Stops copying on first null byte
      • Optional byteOffset and byteLength arguments
    • Add xsmcGetBuffer to retrieve data pointer and length of ArrayBuffer, TypedArray, DataView, and host buffer instances
    • Abort execution when native stack is nearly exhausted to prevent native stack overflow (support varies by platform)
    • Fix bug in Map/Set implementation triggered by garbage collection at unanticipated time
    • Fix bug in FinalizationRegistry triggered by garbage collection at unanticipated time
    • Fix memory corruption by some BigInt conversions to string (5n ** 5n ** 6n) (#642 reported by @dckc at @Agoric)
    • Internal changes to support more accurate metering of JavaScript byte-code execution
  • GIPHY app now available in contributed directory
    • Yes, GIPHY
    • Search GIPHY for GIFs on ESP32 powered devices
    • Download and view GIFs on your Moddable Two (or other compatible device)
  • ECMAScript® Embedded Systems API Specification
    • Migrate to device global from Host to conform with proposed standard draft
    • ESP32 implementation allows access to all GPIOs in the lower 32-bit bank
    • Analog IO on ESP32 supports ADC2 and correctly initializes all installed channels
    • I2C implementations now support read and write with a buffer length of 0. This is necessary for SMBus operations.
    • SMBus implementation adds readQuick, writeQuick, receiveByte, and sendByte as defined by SMBus v3.1 sections 6.5.1 - 6.5.3.
    • Added experimental sensor drivers with example apps
      • AM2320 (humidity and temperature)
      • BMP180 (barometric pressure and temperature)
      • BMP280 (barometric pressure and temperature)
      • CCS811 (digital gas sensor)
      • HTU21D (humidity and temperature)
      • LM75 (temperature)
      • MLX90614 (infrared temperature)
      • SHT3x (humidity and temperature)
      • Si7020 (humidity and temperature)
      • TMP102 (temperature)
      • TMP117 (high accuracy temperature)
  • The Moddable REPL has been significantly reworked to be more functional and more familiar to users of Node.js
    • Inspection of all values
    • Result of last execution result stored in _ global
    • Serial IO rewritten to use ECMAScript® Embedded Systems API on ESP32 and ESP8266
    • Integrates support for CLI commands using . prefix
    • Listing and load available modules
    • Displays XS version
    • Supports for mods. Runs "setup" mod automatically at launch. and loads all "cli/*" mods.
    • Example REPL mod
  • Crypto and TLS
    • TLS support for connecting with TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
    • httpsgetjson example works again and allows https://howsmyssl.com to report that your TLS connection is "Probably Okay" (which is their highest rating).
    • Reduce JavaScript stack used by TLS implementation
    • Fix error building BigInt crypto extensions natively on Windows (for simulator)
  • CRC module
    • Newly added
    • Implements 8-bit and 16-bit CRCs
    • Example app shows how to use module for most common CRC calculations
    • Supports incremental CRC calculations across multiple input buffers
  • Drivers
    • Wi-Fi connection module has timeout on total time to establish connection to catch silent failures (inspired by #595 report by @bartmichu)
    • GT911 touch driver supports downloading of configuration values
  • ESP32 and ESP32-S2
    • Update to ESP-IDF 4.2.1 for ESP32 and ESP32-S2 builds (latest from Espressif on 4.2 branch)
    • Reduce IRAM uses ESP-IDF on ESP32 (#647, reported by @mauroForlimpopoli)
    • Custom bootloaders now supported as part of the ESP32 and ESP32-S2 builds
      • To use a custom bootloader, add the BOOTLOADERPATH environment variable to the build section of an app or target manifest
      • BOOTLOADERPATH must be a pathname to a directory containing an ESP-IDF bootloader component
  • Documentation
  • Simulator
    • Implement Time.ticks for Windows simulator