Moddable SDK 3.9.7
This release contains improvements to the Moddable SDK made between June 1, 2023 and July 7, 2023.
Highlights of this release include:
- New development boards supported including the M5Stack CoreS3
- Additional display and touch controller support
- Enhanced TypeScript support
- New abort hook gives scripts control of unhandled exceptions
News
- Moddable @ Sensors Converge - Moddable took part in the Sensors Converge 2023 trade show in Santa Clara, California. We demonstrated how a display with thoughtfully designed visuals adds value to sensors and sensor data. Our own Andy Carle took to the stage to talk about how industry standard sensor drivers can grow the market for sensor hardware. Read about our demonstrations and Andy's talk on our blog.
- ECMA-419 2nd Edition - The 2nd Edition of ECMA-419, ECMAScript® embedded systems API specification, was recently approved by the Ecma General Assembly! This is a major update to the standard that underpins much of the Moddable SDK. Nick Hehr shared an excellent summary on Twitter. You can read the full text of the standard on the Ecma site. Significant parts of ECMA-419 are already supported in the Moddable SDK today. We'll be writing more about this in the coming weeks and months.
- Securing your IoT product - Everyone knows they need to secure their IoT products. But it isn't always obvious what needs to be done. Our new IoT Security blog post shares practical advice based on Moddable's experience working with clients to secure their products.
- June community call replay - The replay of our June community call is available now. It features a great talk by the co-founders of Juniper Garden introducing their new Twig an agricultural monitoring IoT product.
- SDK documentation - All Moddable SDK documentation is now available for reading on the Moddable web site. This is much faster to browse than GitHub. The documentation is formatted using the GitHub markdown to HTML converter, so it will look the same whether you are browsing on the Moddable web site or our repository on GitHub. There's an incredible amount of detailed documentation available. If you haven't taken a look in a little while, now's a great time.
July Community Call
The Moddable community call is taking a summer vacation for July. It'll be back in August.
Release Details
- New development boards
- Waveshare RP2040-LCD-1.28 Raspberry Pi Pico using round GC9A01 display -
pico/ws_round
- LilyGo TDisplay S3 utilizing 8-bit parallel display. Great set of tweets from @mkellner documenting the bring-up.
- M5Stack CoreS3. Contributed by @magenetaan. This is a large undertaking. It is usable but not yet complete. The details are here. Help testing and completing the port would be appreciated. Thank you to @kairos0ne for testing help.
- Lolin C3mini (ESP32-C3)
- Lolin C3Pico (ESP32-C3)
- XIAO ESP32S3 (ESP32-S3)
- Waveshare RP2040-LCD-1.28 Raspberry Pi Pico using round GC9A01 display -
- Modules
- ILI9341 (MIPI) display driver supports writing to register 255. This enables support for additional display controllers (e.g. GC9A01)
- GalaxyCore GC9A01 display driver
- Hynitron CST816S capacitive touch driver
- PWM support for Raspberry Pi Pico using
pins/pwm
module - Add
Time.delta()
to calculate differences inTime.ticks
values correctly and efficiently. Suggested by @tve. #1162 fetch()
now accepts an object literal for headers. Improves web compatibility.pins/servo
module works on more ESP32 family silicon devices including ESP32S3. Contributed by @washishi. #1144- ESP32 PDM audio input defaults to I2S unit 0. This is required in more recent ESP-IDFs (but used to work).
- Enable VFS on all ESP32 family builds (adds ESP32-C3 and ESP32-S3). Reported by @tve. #1164
- Runtime
- New abort hook allows scripts to catch fatal errors. See new
js/aborthook
example for details and example uses. Suggested by @linfan68. #1139 - Devices that play a start-up sound now wait for the audio output to be completely closed to eliminate resource conflicts with projects that immediately play audio.
- Instrumented ESP32-C3 builds log to serial / UART
- New abort hook allows scripts to catch fatal errors. See new
- ECMA-419
- BME68x ECMA-419 sensor driver now correctly handles all I/O errors
- SMBus ECMA-419 I/O provides
read()
andwrite()
methods from I2C. Reported by @tve. #1153 - ECMA-419 some Digital input implementations allowed write and some Digital outputs implementations allowed read. These now consistently throw. Reported by @bartmichu. #1129
- XS JavaScript engine
- xs macros disabled when using xsmc are now marked as poisoned when building with GCC to generate errors early (suggested by @tve)
- Add
xsmcToReference()
, but don't yet require its use in place ofxsToReference()
- Fix for "XS returns the wrong result for expressions that assign to array length". Reported by @gibson042. #1123
- xsbug debugger no longer displays internal implementation global properties
- xsbug debugger correctly displays class closures
- New option to canonicalize
NaN
values. JavaScript permits multiple representations of NaN beacuse it uses IEEE-754 for floating point values. Scripts that look at the binary representaion of NaN may observe different results depending on the host plaform. This flag enforces a single binary representation of NaN across all XS ports, preventing scripts from observing different binary representations of NaN. This is valuable when deterministic execution is required. Enable by settingmxCanonicalNaN
build flag. - Fixes for issues identified by fuzz testing with Fuzzilli and oss-fuzz. Thank you to @Agoric for their ongoing assistance with this work.
- TypeScript
mcconfig
andmcrun
now correctly build TypeScript modules that use a namespace prefix (e.g.embedded:
). Reported by @tve. #1137- Update default language target to es2022 target. This allows TypeScript code to use the native private field support in XS. Reported by @tve. #1138
mcconfig
now properly builds a module that consists of a .js implementation, a .c implementation, and a .d.ts TypeScript declaration file. Reported by @tve. #1140- Fix extension of
commodetto/PixelsOut.d.ts
so it is only a declaration, not an implementation System.resolve
has no return valueweight
argument toOutline.stroke()
is optional- More type declarations
- Integer math proposal methods implemented in XS. Contributed by @tve.
- One Wire module. Contributed by @tve.
- DS18X20 (One Wire temperature sensor) module. Contributed by @tve.
- Tools
- Environment variables defined in manifests for mods are consistent with host builds. Reported by @tve. #1024
- mcsim simulator now can display round screens on macOS
- Eliminate dependency on debug tools for all Moddable SDK builds.
- Moddable SDK tools builds now create only release tools by default. To build debug tools use
make debug
. - Moddable SDK builds now always locate tools using the active search path. There are no more paths hard coded into the Moddable SDK build results. This gives flexibility in where tools are installed.
- Documentation
- Update "XS in C"
- Preload document now notes that preloaded objects cannot be passed directly to
JSON.stringify()
and suggests workaround. Reported by @tve and earlier by @takeru. #1145 & #340 - Web Worker documentation has additional details on memory allocation motivated by feedback from @tve. #1146
- xsbug documentation links to resources on using and understanding the performance profiler
- Document subtleties of values provided by
Time.ticks
and how to correctly use them. - Document how to remove a setup module installed by a host. This addresses a frequently asked question.
- Tests
- Add test for
Timer.repeat()
called with single argument Reported by @salarizadi. #1135
- Add test for
Contact Us
If you have questions or suggestions about anything here, please reach out:
- Start a new Discussion on our GitHub repository
- Drop by our Gitter to chat
- Contact us on Twitter at @moddabletech