Skip to content

Moddable SDK 4.8.0

Compare
Choose a tag to compare
@mkellner mkellner released this 05 Jun 19:22
· 234 commits to public since this release

The Moddable SDK 4.8.0 release contains improvements made between May 5, 2024 and June 5, 2024.

This release features very low-level improvements to the Moddable SDK. Highlights include:

  • Updated to ESP-IDF v5.2.2 for ESP32 family MCUs
  • ECMA-419 Files API on embedded using LittleFS
  • Reliability improvements for BLE using NimBLE

Important: The Moddable SDK now recommends using ESP-IDF v5.2.2, the most recent production version of the Espressif SDK. This version contains major improvements to BLE and Wi-Fi compared to the previously recommended v5.1.2. Updating to ESP-IDF v5.2.2 is straightforward. For the vast majority of Moddable SDK projects, no JavaScript code are required. The Moddable SDK contains instructions for updating on macOS, Linux, and Windows.

Release Details

  • XS JavaScript engine
    • Fix ModuleSource instance bindings property for modules imported only for side-effects (reported by @kriskowal)
    • Add xsBeginHostExit and xsEndHostExit to allow catching fatal exceptions
    • Default for mxBoundsCheck is now enabled to favor reliable execution (catching stack overflows, for example)
    • Consistent definitions of xsNewHost* functions between xs.h and xsAll.h, needed for WebAssembly builds (contributed by @SMotaal)
    • Add callbacks for new Base64 functions for compatibility with snapshots (contributed by @SMotaal)
    • Lockdown creates secure functions with length that matches original (for test262 compatibility)
    • Metering
      • Implement for JavaScript parser
      • Array, RegExp, String, and TypedArray loops that don't invoke scripts
    • Fixes for issues uncovered through extensive fuzz testing. Thank you to @Agoric for their support of this work.
      • ArrayBuffer.fromBigInt range check fixed
      • Hostile mapper function that detaches buffer no long crashes TypedArray
  • ECMA-419
    • nRF52 Serial
      • Restart receive after read error
      • Enable useCount to avoid exceptions after closing
      • Reliability improvements
    • Files
      • Embedded
        • Implementation using LittleFS. Passes all unit tests on ESP32 family.
      • Linux
        • POSIX file support available on Linux
        • Linux uses RESOLVE_BENEATH to fully sandbox file access
      • Implement link support for POSIX file systems
    • PWM
      • PWM on ESP-IDF v5.2.x doesn't support low frequencies as fully as previous versions of ESP-IDF. An exception is thrown if an unsupported frequency is requested.
    • ESP32 H2, ESP32 C6, and ESP32 C3 now support ECMA-419 builds
      • ESP32 C6 and ESP32 H2 do not provide Pulse Count IO
      • ESP32 RISC-V devices do not provide GCC atomics. IO modules now work around this.
  • Modules
    • HTML5 WebSocket implementation supports optional options object to include full ECMA-419 ws: or wss: configuration
    • HTML5 EventSource implementation reports status and statusText so scripts can detect/handle errors (contributed by @stc1988)
    • Piu supports slow motion rendering (60x slower than real-time)
  • Devices
    • ESP32
      • Add Wi-Fi station_connect and station_disconnect events for ESP32 targets (contributed by @stc1988)
      • Audio Output amplifier control on ESP32 improvements
        • Turns off sooner after audio completes
        • Doesn't toggle if new audio queued while playing
      • BLE for NimBLE on ESP-32
        • Improvements to reliability, especially after closing, motivated by behavior changes in ESP-IDF 5.2.x
        • Bug fix in read descriptors. Previously some descriptor look-ups failed resulting in values being provided in an incorrect format. In some rare cases, this may require updating project code.
        • In rare cases, scan results could be delivered after terminating scan. This has been fixed.
      • ILI9341 parallel driver
        • Trigger transmit simplifications
        • Larger default rendering buffer (32 scan lines)
        • Eliminate potential tear on first frame after rendering pause
    • nRF52
      • Option to read User Information Configuration Registers (UICR) to a file using J-Link with the -t readuicr option to mcconfig
      • Only enable QSPI in build when USE_QSPI is set (off by default)
  • TypeScript
    • Add Wi-Fi station_connect and station_disconnect events (contributed by @stc1988)
    • Wi-Fi bssid is ArrayBuffer (contributed by @cmidgley)
    • Add typings for QRCode module (contributed by @stc1988)
  • Tools
    • xst
      • Support saving and loading test results as configurations to easily compare results between test runs
      • Adjust memory limit for oss-fuzz to reduce out-of-memory errors
      • Patches to limit memory use now thread safe
    • ble2gatt
      • Requires array values to be arrays, not single values
  • Tests
    • Add unit tests for draft ECMA-419 Files API
    • BLE client and server tests updated
      • Fix tests related to descriptors now that look-up is working correctly
      • If service look-up fails (rare, but happens) provide descriptive error message
      • NimBLE doesn't provide RSSI immediately after connection, so wait for services to be polled before requesting RSSI

Contact Us

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