Skip to content

Releases: Moddable-OpenSource/moddable

March 30, 2022

17 May 03:50
Compare
Choose a tag to compare

This is the first release in a little while. These release notes cover February 28, 2022 to April 1, 2022. Moving forward, the goal is to provide release notes at least once a month.

There's a lot of great work in this release – new features, updates to existing features, and the inevitable bug fixes. The release notes contain extensive links to make it convenient for you to explore the changes.

Thank you to everyone who reported an issue or contributed a PR. We appreciate you sharing your time and expertise.

  • Tools

    • Simulator
      • mcsim is now the default simulator in the Moddable SDK on macOS, Windows, and Linux. The original simulator, Screen Test, is still available but not recommended and will eventually be removed.
      • mcsim simulator updates instrumentation dynamically when stepping, consistent with screen test
      • Add M5StickC target to mcsim simulator. Contributed by @wilberforce.
      • Dark mode now available in xsbug and mcsim
      • mcsim now calls setup/* modules in the same way as device targets. Contributed by @FWeinb.
      • M5Paper simulator now shows power-pin status. Contributed by @FWeinb.
      • mcsim has simulators for Pico Display and Pico Display 2
    • The compileDataView tool has been integrated into the Moddable SDK. This tool simplifies working with binary data structures in JavaScript. It converts C language data structures to JavaScript implementations. The js/views example shows how to use compileDataView in a project manifest to share a C header between JavaScript and C source code.
    • Fix duplicate path problem building TypeScript modules. Reported by @MKGaru. #869.
    • xst (XS Test Tool) now contains support for fuzzing XS with Fuzzilli. Based on contribution by @jessysaurusrex. #817
    • Improvements to test262 tool to avoid buffer overflows when transferring test script source code to target
  • Devices

    • Raspberry Pi Pico is now a supported platform! Check out the Pico documentation for supported features, set-up instructions, and a list of supported device targets.
    • Added support for Wemos OLED Lolin32 (based on Heltec WiFi Kit 32 port). Contributed by @costa-victor.
  • Examples

  • XS

    • Fix JavaScript language conformance issues reported by @gibson042
      • "TypedArrays incorrectly write to 'NaN' properties". #886
      • "ToNumber incorrectly accepts 'INFINITY'". #885
      • "Change Date.parse to round milliseconds down". #879
      • "function name is set incorrectly on a method for a property key that is a registered symbol". #876
    • Fix crash in Compartment Function eval after lockdown
    • Unhandled Promise rejection now reports reason
    • Fix stack overflow in degenerate Array sort cases
  • Runtime

    • Network
      • Add implementation of proposed Ecma-419 standard WebSocket client, with example.
      • Add implementation of HTML5 WebSocket class built on Ecma-419 standard WebSocket client, with example. Tested on macOS, ESP32, and ESP8266.
      • WebSocket server now supports creating a server from an existing socket. This allows one listener to be shared by HTTP and WebSocket servers. #755
      • Socket implementation on Windows supports reading outside of the callback, as on other platforms.#755
      • SecureSocket now propagates error state to client
      • Socket implementation on macOS, Linux, and Windows now detects receive error correctly to avoid infinite loop. Reported by @michaelfig.
      • Ecma-419 TCP implementation for lwip (ESP32 and ESP8266) now clears all native callbacks when socket is closed or disconnected
    • Base
      • Timer.clear may now be passed undefined without throwing an exception
      • Timer module times now correctly schedule when millisecond wraps 32-bit value. Reported by @Arorar3. #875
      • WebWorker instrumentation now guarded by semaphore to prevent debugger cross-talk with multiple threads
      • Merge updates to File module type declarations from @cmidgley
      • File module rename function handles slashes consistently across flat and hierarchical file systems. #878
      • Flash module updated to accept any kind of buffer for write
    • Fix Outline module compilation on Windows
    • Ecma-419 provider for Moddable One had SPI in and out pins reversed
  • Documentation

    • CRC8 and CRC16 classes added to Data reference documentation.
    • Fix mix-up with PICO_SDK_DIR in Raspberry Pi Pico docs. By @HipsterBrown.

August 26, 2021

27 Aug 00:01
Compare
Choose a tag to compare

This release of the Moddable SDK moves to ESP-IDF 4.3 from 4.2. Developers building for microcontrollers in the ESP32 family 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.

The ESP-IDF 4.3 has many changes. Here are some highlights for developers using the Moddable SDK:

  • Latest stable release from Espressif
  • Supports ESP32-S3 Beta SoC. This is supported in the Moddable SDK with the esp32s3 build target. (Let us know if you try this out on ESP32-S3 hardware!)
  • FreeRTOS v10.2.0
  • Over-The-Air updates no longer block for several seconds when starting (more information below)

If you have questions or comments about this update, the Moddable SDK in general, or using JavaScript for embedded development in general, please join us on our Discussions page on GitHub. Follow @moddabletech on Twitter to keep up with our latest releases and news.

  • XS
    • Metering support added for TypedArray
    • Support for marshalling alien arrays across workers
  • Modules
    • TextDecoder rejects overlong UTF-8 sequences
    • OTA module for ESP32 sets OTA_WITH_SEQUENTIAL_WRITES to avoid erasing more blocks than required and blocking for several seconds when starting an update. (This uses an enhancement to the ESP-IDF contributed by Moddable)
    • File and Preference modules work in WebAssembly runtime (without persistence)
    • Wi-Fi module simulator implements access point mode (contributed by @wilberforce)
    • mDNS module adds debug logging of additionals
    • mDNS module performs case insensitive compares as required by the specification (fixes some failures)
    • wificonnection module supports alternate access points and ending connection attempts using new getAP message
    • lwip socket module on ESP32 joins multicast group on all active network interfaces
    • Remove unused ca-subject data from TLS manifest #691 (fix by @gavrilyak)
  • Examples
    • New httpzip module and example shows how to serve static web site from a an embedded ZIP file, including compressed data and ETAG caching. Uses WebSocket for dynamic two-way communication. Based on an idea by @wilberforce, developed by @wilberforce with help from @phoddie.
    • New Over-the-Air (OTA) Update example using OTA module for ESP32
    • New continuous servo rotation example (contributed by @stc1988)
    • New IR send and receive examples for ESP32 using RMT module (contributed by @stc1988)
    • mDNS http server example publishes http service in addition to claiming name
    • Digital monitor example fix to detect falling edges (fix by @Frida854)
  • Documentation
    • Update documentation on how sdkconfig files are processed (contributed by @jparker324)
    • Removed unnecessary slashes in paths in ESP8266 documentation (fix by @danhellem)
  • TypeScript

August 5, 2021

07 Aug 14:33
Compare
Choose a tag to compare
  • XS
    • Array instances over-allocate when growing in certain circumstances. This improves performance when an array is populated by repeatedly calling push or unshift. The over-allocation is reclaimed on the next run of the garbage collector.
    • pop and shift operations on Array instances do not resize the array allocation. The garbage collector shrinks the block as needed.
    • XS implements the Stage 3 at proposal for Array.prototype.at, String.prototype.at and TypedArray.prototype.at. This allows the use of negative index values to get values from the end of an array, for example array.at(-1) is equivalent to array[array.length - 1].
    • Map and Set instances dynamically grow and shrink their hash table based on the number of elements they contain. This provides consistent performance independent of the element count. XS uses better hash functions for better distribution and ease in resizing the table.
    • Map and Set iterators have been rewritten and now pass 4 additional test262 tests.
    • XS now properly handles Unicode white-space characters above the Latin-1 range #665 (reported by @gibson042)
    • Number.prototype.toLocaleString now conforms to the specification #674 (reported by @mathiasbynens)
  • Raspberry Pico
    • Our preview pico branch is fully up-to-date with this release of the Moddable SDK and is working well. Give it try.
  • ECMAScript® Embedded Systems API Specification
    • Conformance improvements and/or documentation updates for CCS881, LM75, URM09, MLX90614, and QWIC moisture sensor
    • New accelerometer sensors: LIS3DH, LSM303DLHC, MPU6050, MPU9250
    • New magnetometer sensor: AK8963
    • New capacitive moisture sensor: SEN0193
    • New touch driver: FT6206
    • Add required delay after soft reset of BMP280 sensor
    • Add default analog input to built-in providers for Moddable Three, ESP8266 NodeMCU, ESP32 Thing, and ESP32 Wrover Kit
    • Disallow providing undefined for a pin specifier. Now throws an exception rather than coercing to pin 0.
  • Modules
    • TextDecoder supports stream option and implementation of ignoreBOM fixed to match specification.
    • TextEncoder implements encodeInto
    • wificonnection module adds support for cycling through a list of access points to find on that is available
    • lwip socket - don't call tcp_output to flush pending write after socket is closed (fixes crash if write made immediately before closing socket)
    • Wi-Fi on ESP32 can now be set to mode zero to disable fully
    • Wi-Fi on ESP32 operating a soft access point delivers "station_connect" and "station_disconnect" messages
    • Net module on ESP32 can now return information about the Ethernet connection
  • Hardware
    • Option to play start-up vibration on M5stack core2 (contributed by @stc1988)
    • Fix hardware rotation in ILI9341 (broken when GRAM offsets added)
    • Added pinout diagram to Moddable Three documentation
  • Graphics
    • Added spiffy new Moddable Three window display demo app (coming soon to the front window at Moddable HQ)
    • Giphy app rotates landscape screens to portrait
    • Piu texture constructor now has option to accept separate paths for alpha and color images
  • Mods
    • ESP8266 and ESP32 hosts return the preferred block size for install mods. mcrun/serial2xsbug now use the preferred block size. This allows for faster installs when the MCU has more free memory and avoids install failures when memory is tight.
    • mcrun/serial2xsbug now report an error before trying to install a mod bigger than the available installation space
    • Eliminated spurious traces about fatal mod installs
  • Tools
    • mcbundle tool is now available on Windows
  • TypeScript
    • Add declaration for playback of tones in Piu (contributed by @stc1988)

July 12, 2021

13 Jul 02:54
Compare
Choose a tag to compare
  • XS
    • Metering cost for BigInt, RegExp, and string/numeric conversion operations now scale based on relative complexity of operation
    • After creating a snapshot, the VM can continue to be used (previously chunks were left in a bad state)
    • Add fx_Function_prototype_bound to native callback list in snapshots so bound functions work in snapshots
    • Error stack capture fixes (handles when no function name available)
    • BigInt values under construction are now fully initialized before the garbage collector runs to fix elusive failures and crashes
    • Remove reference to handler of resolved promises to fix memory leak
    • Fix to UTF-8 validation in String.fromArrayBuffer
    • WeakMap support re-written to use fully transposed internal representation to improve performance, especially for large maps
    • Use stdint.h to define sized integers (was already used in most places, this replaces the last hold-out)
    • Better error handling when installing mods. When a mod uses more keys (symbols) than the host supports, an error is traced in the xsbug console rather than silent failure.
  • ECMAScript® Embedded Systems API Specification
    • Add PulseCount module for ESP32
    • Add rotary-encoder example for PulseCount
    • SPI support for ESP32-S2
    • Start of support for providers based on sub-platform (esp32/moddable_two, not only platform (esp32)
    • Add providers for Moddable Three, ESP32 Thing, ESP32 Thing Plus, Kaluga, LilyGo TTGO, M5Atom Echo, M5 Atom Lite, M5Atom Matrix, M5Stack, M5Stack Core2, M5Stack Fire, M5Stick C, Saola Wroom, Saola Wrover, and ESP32 Wrover Kit
    • Added experimental sensor drivers with example apps
  • Audio playback
    • AudioOut supports playback of SBC encoded audio (embedded decoder by Peter Barrett). (example pending)
    • AudioOut supports Tone (square wave) and Silence commands for rendering. Documentation updated.
  • QRCode
    • Custom renderer for QRCode allows rendering more complex QRCodes faster with much smaller display lists (less memory). Previously version 3 was a practical limit, now limited by display resolution.
    • QRCode Example updated to use new drawQRCode.
    • Piu module added to render QRCodes.
  • Modules
    • Add TextDecoder and TextEncoder modules. These implementations are subsets of the web versions, supporting only UTF-8 and not implementing streaming mode. Throws on attempts to use unsupported features.
    • ZIP module provides CRC and and compression method, is compatible with output of more ZIP file writers
    • zlib inflate module now accepts TypedArray arguments
    • PocoDrawExternal API added xphase to allow rendering plug-ins to support 4-bit pixels
  • TLS
    • Fix TLS edge case that caused failure with secure connections to test.mosquitto.org
    • TLS now always sends Signature Algorithms extensions as part of HELLO (required by some servers)
  • Documentation
    • Wasm build documentation updated for Apple M1 Silicon
    • Update XS in C documentation to explain how to implement a native getter accessor function.
  • GIF
    • Optimize GIF decoding for images with 16 to 32 colors (5-bit special case) to reduce memory required for backing store
    • GIF example updated to work with latest GIF rendering API (poco.drawBitmapWithKeyColor)
    • Giphy app shows an error when no search results are returned
  • Piu
    • Piu Text object now line-breaks Chinese characters correctly
    • Piu Sound object updated to support playback of tones.
  • Tools
    • Added documentation for new mcbundle tool to batch build projects for multiple device targets
    • Simulators report reason for abort (fxAbort) in dialog
    • Add device target for esp32/esp32_thing_plus

June 3, 2021

03 Jun 21:19
Compare
Choose a tag to compare

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

May 4, 2021

04 May 22:45
Compare
Choose a tag to compare

This release contains major updates to the XS JavaScript engine. After updating, please be sure to do a full, clean build of both the Moddable SDK tools and all your projects. Details are in the Update sections of the Getting Started guide for macOS, Windows, and Linux.

There is a new branch for on-going work to support ESP-IDF v4.3. The port is already stable and usable, with all major features confirmed to be working. This branch will updated as needed while ESP-IDF v4.3 is still pre-release. When it is final, we expect to switch over from ESP-ESP v4.2.

  • XS
    • JavaScript global variables defined during preload are now stored in ROM (Flash) until modified
      • Saves at least 1300 bytes per virtual machine, up to 2100 bytes for projects using Piu
      • Reduces memory required for a new Secure ECMAScript compartment to 624 bytes
    • Changes to XS IDs
      • Default 16-bit ID values now use all 16-bits (previously limited to 15-bits) allowing for up to 65535 unique property names
      • Option to use 32-bit ID values (#define mx32bitID 1) for non-embedded builds
      • xsGet now only works for property ID values, not indices. To get by index use xsGetIndex. Similar changes to xsSet and xsHas.
    • Fixes
      • Fix memory allocator bug that unintentionally caused buffers to be allocated at minimal size, leading to thrashing. Introduced recently with changes to detect overflow in buffer size calculations. #637 (reported by @warner at Agoric)
      • Symbol.for('bar').toString() did not include the symbol name. #621 (reported by @dckc at Agoric)
      • Fix injection attack in Function constructor #623 (reported by @dckc at Agoric)
      • Fix garbage collector interaction when invoking hasProperty in the run loop #627 (reported by @dckc at Agoric)
  • ECMAScript® Embedded Systems API Specification
    • Updates to io.md to synchronize with final draft of ECMAScript® Embedded Systems API Specification (Ecma TC53) (requested by @stc1988)
    • Fix build conflicts with IO modules and Pins modules
  • Graphics: Commodetto and Piu
    • New Piu GIF Image object to directly embed animated GIF in Piu screen
    • Animated GIF decoding directly to black and white (1-bit), gray scale (4-bit), and 256 index color to reduce memory required for back-buffer when possible
    • Add indexed 256 color bitmap format to Commodetto to support animated GIF
    • In Piu Port, fix obscure potential problems with garbage collection timing
    • Change function name from convert to process in Commodetto pixel format conversion document. #637 (reported by @stc1988)
  • PWM on ESP32
    • Supports manifest defines for the off value and frequency
    • Checks error on pwm.write and explicitly sets additional configuration struct members
  • Crypto and TLS
    • Optimize Montgomery and Jacobian functions.
    • Reduce memory allocations in cryptographic functions
    • Optimize fxBigInt_uadd_prim using GCC built-ins
    • TLS client implementation now always replies to CERTIFICATE request, even if the response is empty. Fixes compatibility with servers build with Java 10.
  • Optimizations to BLE implementation focused on reducing how often garbage collector runs

April 6, 2021

06 Apr 20:21
Compare
Choose a tag to compare
  • XS
    • Error Stack now captured at time of creation rather than when used with throw to be more consistent with browser engines.
    • Marshalling objects between virtual machines now supports most built-ins including instances of TypedArray, RegExp, Map, Set, Proxy, DataView and Date. Objects with cyclic references, references to objects in ROM, and private fields may also be marshalled between virtual machines cloned from the same image. Details in new XS Marshalling document.
    • WeakMap no longer corrupted during garbage collection. #592 #608 (report by @dckc at Agoric)
    • Fix native stack overflows in parser. #586 and #587 (reported by @rain6851)
    • Fix invalid access on exception when reading uninitialized variable. #585 (reported by @rain6851)
    • Fix string buffer overflow in fxIDToString. #583 (reported by @rain6851)
    • Detect chunk math size overflow. #580 #581 #582 #587 (reported by @dckc and @rain6851)
    • Gathering of a function's rest arguments to an Array no longer invalidates the byte-code pointer (if garbage collector runs at exactly the wrong moment). #604 (reported and isolated by @dckc at Agoric)
    • Add mxNoChunks debug build option to use malloc to allocate chunks instead of the XS internal chunk allocator. This gives more visibility to Address Sanitizer into memory accesses by XS.
    • Issues with RegExp flags and invalid JSON characters detected by Address Sanitizer fixed
    • xsl (linker) only strips runProgramEnvironment when eval is stripped. Fixes REPL example.
  • Implementation of ECMAScript® Embedded Systems API Specification (Ecma TC53)
    • Implemented SPI controller on ESP8266 and ESP32. Includes ILI9341 display and XPT2046 touch examples.
    • GPIO 16 now works with Digital and DigitalBank on ESP8266
  • Graphics and UI
    • Animated GIF decoding is now supported in Commodetto. The implementation builds on the GIF Animator core by Larry Bank. See the example and documentation for details. Usable now with more improvements planned.
    • Piu Texture constructor accepts color and alpha bitmap arguments to allow bitmaps created outside Piu as textures
    • Color cell encoded images no longer crash when clipped on the left edge
  • Devices
    • Backlight on Moddable Two can be configured to be initially off to eliminate flicker at start-up
    • TTGO LilyGo ST7789 1.14" LED Screen display support. #576, #601 (requested by @louisvangeldrop)
    • Microphone support for M5StackCore2 and M5StickC (contributed by @stc1988)
    • Espressif hosts use c_read* macros in place of direct espRead* function calls allowing direct reads (faster) on ESP32.
    • Some large chunk allocations on embedded targets now succeed because chunk allocator includes free space in current chunk heap when determining if there is enough free space
  • Examples
    • Remove stray character from CLI. #597 (reported by @dbhaig)
    • Instrumentation examples now explicitly include the JavaScript instrumentation module (which is not always built-in). #598 (reported by @dbhaig)
    • MQTTConnection module now supports changing the client ID after instantiation because MAC address may not be available at instantiation. (reported by @Frida854)
  • Tools
    • When building tools on Linux, explicitly include pthread library
    • mcconfig merges release SDKCONFIG fragment on ESP32 build rather than replacing
  • Modules
    • Add Modules module to synchronously check for presence of modules, synchronously load modules, and enumerate installed modules in host and mods. Replaces LoadMod used in IoT Development for ESP32 and ESP8266 with JavaScript examples.
    • Add manifest for microseconds module
    • GCM mode in TLS reduces peak memory by re-using buffers like CDC mode
  • Documentation
    • Getting Started documentation updates based on user feedback, including how to create shell start-up file

March 2, 2021

02 Mar 23:56
Compare
Choose a tag to compare
  • New modules
  • XS
    • BigInt values supported as keys for Maps and Sets #577 (reported by @dckc at Agoric)
    • First attempt at Error Stacks (subset of the Stage 1 proposal)
    • xsbug now reports exception when a Promise rejection is unhandled
    • Module specifiers may now have a namespace prefix (e.g. "embedded:io/serial")
    • Fix keywords as property names in object binding variable statements #565 (reported by @dckc at Agoric)
    • Fix Object.prototype.hasOwnProperty when called with no arguments (also fixed similar unreported issue with several other methods of Object - __defineGetter__, __defineSetter__, __lookupGetter__, __lookupSetter__, propertyIsEnumerable) #556 (reported by @YaoHouyou)
    • Unsafe optimizations enabled with mxBoundsCheck set to 0 (OFF) handled consistently. Note that mxBoundsCheck defaults to OFF in release builds. Projects running untrusted code should set turn mxBoundsCheck on.
  • Implementation of ECMAScript® Embedded Systems API Specification (Ecma TC53)
    • Implement banks to support more than 32 pins
    • Implement IO for ESP32: DigitalBank, Analog, PWM, I2C, Serial, UDP, TCP, Listener. (works with J5e!)
    • Switch to "embedded:" module namespace from original "builtin:" placeholder
    • Update examples to match latest specification draft and to use Host Provider Instance
    • Add I2C example driver for AMG8833 Grid-EYE infrared camera
  • Fixes and improvements
    • Fix Piu sound on devices without a Host global. #558 (reported by @stc1988)
    • Fix Poco color cell crash when rendering clipped narrow widths using drawFrame
    • Piu Timeline object can again be built independently of Piu #559 (reported by @zombeej)
    • Analog audio output now works on M5Stack with ESP-IDF 4.2. ESP-IDF changes broke this by reversing the channels. #560 (reported by @stc1988)
    • Fix race condition when closing audio output on ESP-IDF 4.2 Caused static to be placed on some M5 devices #560
    • Fix exception in auto-rotate for M5Stack Fire and Core2
    • Fix ESP32 build issue on Windows when building projects on a different drive than the drive that holds the ESP-IDF
    • Remove unneeded dependency on display driver in pngdisplay and image-frames examples #571 (reported by @dbhaig)
    • Eliminate warning when building audio input on ESP32 #561
    • Implement display brightness control for M5Stack Core2 (contributed by @stc1988)

February 3, 2021

04 Feb 03:08
Compare
Choose a tag to compare

This focus of this release is updating the Moddable SDK to use ESP-IDF version 4.2. Developers using the Moddable SDK with ESP32 will need to update. Links to instructions are provided below.

  • ESP-IDF version 4.2
    • ESP32 builds now require ESP-IDF version 4.2, upgrading from version 3.3.2.
    • Instructions for updating the ESP-IDF are available for macOS, Windows, and Linux.
    • Additional information about the update is available in our blog post.
    • Higher speed SPI output on all ESP32 MCUs
    • Support for ESP32-S2 chips
    • Support for Saola development boards from Espressif
    • Support for the Kaluga development board from Espressif. This includes support for high-speed rendering to the display, audio playback, touch panel button, physical buttons, and the color NeoPixel LED.
    • Support for external PSRAM on ESP32-S2 which significantly increases memory available to JavaScript
  • ESP32 runtime
    • Fix misinterpretation of servo parameters on ESP32. #541 (reported by @MKGaru)
    • ESP32 PWM implementation now allows PWM to be completely disabled and automatically stops when closed
    • ESP32 preferences now implements Preference.keys. #368 (contributed by @wilberforce)
  • Build
    • Windows build works with lowercase drive letters
    • Added clean option to Windows build #546
    • mcrun on Windows now respects UPLOAD_PORT environment variable
    • mcrun now automatically uses correct baud-rate for target device
    • ESP32 build now puts all generated sdkconfig files into build results
  • XS
    • Language conformance document updated with latest results from test262
    • Show contents of function closures and promise status in xsbug as shown in this screen capture. #127 (Suggested by @bmeck)
    • Improve debugging with tail call optimization by checking for valid function early (reported by @Agoric)
    • Fixed bug where variables declared with let behaved as if declared with const under obscure circumstances. #540 (reported by @MKGaru)
    • Removed obsolete fxMarkHost and fxSweepHost from documentation
    • Strip feature of the XS linker now works correctly on Windows
  • TypeScript
    • Update declaration files to export previously internal-only types
    • Set forceConsistentCasingFileNames to avoid case-sensitive issues in the future
    • Fix property name in Monitor constructor. (contributed by @meganetaaan)
  • Examples
  • Documentation

December 30, 2020

31 Dec 00:05
Compare
Choose a tag to compare

Welcome to the final Moddable SDK release of 2020.

  • XS JavaScript engine
    • Debugging support for source text parsed by eval! Watch the demo. It is still not recommended to use eval in embedded projects. (requested by @Agoric)
    • Remove unused historic features thanks to a very through review of runtime properties by @erights (see #523 and #524 for details)
    • Fix dead-strip bug introduced by removing historic features #530, #531 (independently reported by @cmidgley and @menway)
    • Closing braces } in the body of a script or a module were parsed as EOF. The bug was probably there for a decade or so! #526 (reported by @YaoHouyou)
    • Fixes for several obscure new issues reported by test262:
      • Sloppy direct eval that defines arguments in the default value of a parameter of an arrow function: (x, y = eval("var arguments = x")) => { print(arguments) }
      • Most Atomics methods can be used on TypedArray based on ArrayBuffer now (instead of only TypedArray based on SharedArrayBuffer).
      • The prototype of GeneratorFunction and AsyncGeneratorFunction is not a function.
      • Proxies can be created with revoked proxy as target or handler.
      • If the length of a function is Infinite, the length of its bound functions is also Infinite.
      • Function.prototype.toString behaves correctly if the function name is no identifier.
      • Setting or defining the length of an array coerce the length before checking if the length property is read-only.
    • Add documentation on static size allocations in XS (requested by @chances)
  • New HX711 driver. Supports digital scales. (contributed by @meganetaaan)
  • New module allows preferences to work on the simulator on Linux. Pure JavaScript implementation. (contributed by @cmidgley)
  • Add native API to get and set preference values for ESP32 (matches ESP8266)
  • BLE
    • Removed bonded property passed to client onConnected callback. Code should check bonded state from the onAuthenticated callback.
  • Graphics
    • Poco renderer's clip function return value indicates when fully clipped out to optimize drawing code
    • Commodetto's ReadPNG module now properly decodes PNG images that use a filter on the first scan line
  • Audio
    • AudioOut instances no longer crash when closed from a callback
    • M5Stack host waits for start-up sound to finishing playing before running app. (Same behavior as all other hosts with a start-up sound)
  • FT2606 touch driver
    • Implement calibration for FT2606 touch driver
    • Add calibration app for FT2606 running on Moddable One and Moddable Two
    • Add default touch calibration settings for Moddable One and Moddable Two
  • TypeScript support
    • Fixed case of piu/MC.d.ts and Resource.d.ts files for case sensitive file systems
    • Include Piu declarations in manifest_typings.json #527 (reported by @stc1988)
    • Add global declarations for Piu's Skin, Texture, Style, Behavior, Content, Container, Application, Scroller, Row, Column, Layout, Die, Port, Label, and Transition
    • Add declarations for the interpolators Piu adds to Math
    • Add declarations for piu/CombTransition and piu/WipeTransition
    • Add ArrayBuffer.prototype.concat, BigInt.fromArrayBuffer, and BigInt.bitLength to XS typings (found as result of @erights review in #523)
    • Remove DOM typings from build (the Moddable SDK does not provide a browser runtime!)

Note: Several of these changes are to the Moddable SDK tools. Therefore, after updating it is necessary to rebuild Moddable SDK tools and perform a clean build of your project. Details on how to do that are in the Update sections of the Getting Started guide for macOS, Windows, and Linux.