Skip to content

Moddable SDK 4.5.0

Compare
Choose a tag to compare
@mkellner mkellner released this 05 Mar 07:52
· 72 commits to public since this release

This release contains improvements to the Moddable SDK made between February 2, 2024 and March 4, 2024.

Highlights of this release include:

  • XS 15, the latest version of our embedded JavaScript engine is here! It supports all the new capabilities of the latest revision of the JavaScript language, ECMAScript 2024!
  • Energy savings. ESP32 now has the option to power-off Wi-Fi when not in use and nRF52 uses significantly less energy when in idle, extending battery life.
  • New M5Stack simulator lets you use the Moddable SDK's simulator to more accurately develop your M5Stack projects.
M5Stack clock

New Hardware: Moddable recently launched the Moddable Display product line. Moddable Display is the beautiful way to bring your latest embedded JavaScript project from the workbench to the real world.

Moddable Display product family

Reminder: ESP-IDF v5.1.2 is now recommended for ESP32 development. Please see the January 2024 Release Notes for details on how to update.

Release Details

  • XS
    • XS 15 is here, with full support for ECMAScript 2024 (ES2024)! Conformance with the standard for all new features is 100%. Overall conformance is 99.92% for language tests and 99.88% for built-ins tests (see the XS Conformance document for details). New features in ECMAScript 2024 include:
    • Optimizations for String getOwnProperty, String.prototype.at(), and String.prototype.replaceAll()
    • Handle out of memory errors safely in xsdtoa.c
    • Fixes for issues uncovered through fuzz testing. Thank you to @Agoric for their support of this work.
    • XS reports syntax error for try without either catch or finally
    • Module specifiers with an arbitrary number of "../" are now supported
  • ESP32
    • 8-bit parallel ILI9341 driver
      • CS pin optional
      • frameRate accessor to set hardware refresh rate
      • Uses binary semaphore to synchronize with tearing-effect ISR to eliminate spin loop
    • Using Serial JTAG debugger port with xsbug is now much more reliable. Worked around bug in the ROM that caused occasional hangs when writing. #1299 (reported by @NW-Lab)
    • Audio output supports optional GPIO to enable/disable an external audio amplifier
    • Clean-up watch-dog timer settings in sdkconfig files
  • nRF52
    • Default to PowerMode.LowPower instead of PowerMode.ConstantLatency for (much) lower energy use during system sleep
      • New example showing how to set PowerMode
    • Hardware supports misaligned writes, so no need to set mxMisalignedSettersCrash (slightly faster 32-bit TypedArray writes)
    • When done using pin, reset to default state to reduce energy use
  • Modules
    • New WiFi.Mode enumeration of constants for Wi-Fi operating modes
    • Wi-Fi implements new off mode to disable the Wi-Fi stack #1295
      • This frees memory (about 60 KB on ESP32) and reduces energy use
      • Implemented on ESP32 and Raspberry Pi Pico
      • Check for availability with if ("off" in WiFi.Mode)
      • Requested by @beckerzito, thanks to @tve for input.
    • OpenAI Audio streaming now supports Wave files in additional to previous MP3 support. (Contributed by @stc1988) #1316
    • Easing equation functions split out from Piu to their own module to be more generally useful (suggested by @stc1988) #1309
    • MQTT client handles write error while sending initial connect message
  • Drivers
    • GT911 touch interrupt now triggers on rising edge (lower latency)
    • AM2320 temperature and humidity sensor - more reliable read timing and general clean-up. (contributed by @louisvangeldrop) #1311
  • Tools
    • M5Stack simulator! (contributed by @stc1988). Use mcconfig -d -m -p sim/m5stack to try it out.
    • mcpack fixes for module aliasing to allow more npm modules to work correctly. (Reported by @FWeinb who is now using protobuf for protocol buffers)
    • xst
      • On Linux no longer sets -fsanitize-recover=undefined (contributed by @raphdev)
      • Hooks memory allocators (malloc, etc) to be able to force failures when fuzzing
    • mcchex now available in Linux binary distribution (contributed by @ethos-jgreenwood) #1315
  • TypeScript
    • Typing for Time.delta() (contributed by @meganetaaan)
    • Typing for Outline.scale single scale factor overload (contributed by @stc1988)
    • Typing for easing (contributed by @stc1988)
  • Examples
    • ECMA-419 blink and button examples report missing pin configuration
    • Color-Picker example manifest updated to include Commodetto explicitly #1303 (reported by @stc1988)
    • Wi-Fi examples updated to use new WiFi.Mode enumeration to improve readability
    • SomaFM app uses much less memory on station list screen, improving reliability

Contact Us

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