Announcing AtomVM v0.6.5
October 2024 (584 Words, 4 Minutes)
2024/10/14 Announcing AtomVM v0.6.5
We are pleased to announce the release of v0.6.5 of the AtomVM virtual machine!
First and foremost our apologies to ESP32 users wanting to use all the great new Elixir features added in the V0.6.4 release. The binary images were corrupted and may Elixir features were unavailable. We have fixed the problem and now publish an Elixir flavored image that has a larger library partition. This change necessitates changing the application partition offset to 0x250000. The ExAtomVM mix
plugin repository has already been updated with the correct default offset, a new release should be available in the very near future.
Note: We are investigating a bug in the ESP32
i2c
driver, that was reported hours before this release,i2c:write_bytes
on ESP32 seems to be causing a hard fault, as a workaround usei2c:write_byte
instead.
Expanded Erlang support includes:
erlang:atom_to_binary/1
that is equivalent toerlang:atom_to_binary(Atom, utf8)
is_bitstring/1
maps:merge_with/3
lists:keytake/3
,lists:last/1
,lists:mapfoldl/3
, andlists:nthtail/2
support for handle_continue callback in gen_server
gen_server:start_monitor/3,4
code:ensure_loaded/1
io_lib:latin1_char_list/1
io:put_chars/2
erlang:list_to_integer/2
binary_to_integer/2
binary:copy/1,2
,binary:split/3
,binary:decode_hex/1
, andbinary:encode_hex/1,2
string:find/2,3
- Support for directory listing using POSIX APIs: (
atomvm:posix_opendir/1
,atomvm:posix_readdir/1
,atomvm:posix_closedir/1
)
Expanded Elixir support features:
String.Chars
protocol, now functions such asEnum.join
are able to take also non string parameters; e.g.Enum.join([1, 2], ",")
Enumerable
protocolProcess.send/2
,Process.send_after/3/4
, andProcess.cancel_timer/1
List.Chars
protocolList.duplicate/2
Keyword.split/2
IO.chardata_to_string/1
Base.decode16/2
andBase.encode16/2
Enum.find_index
andEnum.find_value
support Enumerable and not just lists
Enhancements to the ESP32 platform:
- The ESP32 platform now includes the
esp_adc
driver module for using the ADC peripheral to measure analog voltages. Building from source, and including the atomvm_adc component is no longer necessary (or even supported, now that ESP-IDF v4.4.x has been deprecated). - Support for mounting/unmounting storage on ESP32 (such as SD or internal flash) using
esp:mount/4
andesp:umount/1
- Made the device_config properties list in
spi:open/1
optional (defaults to[]
), so you can use the function with only abus_config
- The network driver supports a callback for beacon lost events (usually encountered when signal quality is poor or network congestion),
network:stop/0
works as expected.
Many bugs have been fixed in addition to the previously mentioned fix for ESP32 images, including:
- Fixed memory corruption in
unicode:characters_to_binary
- Fixed handling of large literal indexes and large extended literal indexes
- Fixed bogus out_of_memory error when using
unicode:characters_to_list
on some platforms such as ESP32 - Fix crash in Elixir library when doing
inspect(:atom)
- General
inspect()
compliance with Elixir behavior (but there are still some minor differences) - On ESP32
uart:open/1,2
now works with uppercase peripheral names - Several edge case memory bugs were fixed in the ESP32 network driver, ans when stopped all resources are freed.
- Fixed a bug in decoding terms that led to some pin numbers being rejected when setting GPIO interrupts on the ESP32 platform.
For the full set of bug fixes, changes and additions consult the Changelog.
Download images and binaries are available for most platforms, except STM32, are available from
AtomVM Releases on GitHub. STM32 users as
well as anyone needing to build a generic_unix port for a device without release binaries should
consult the Build Instructions. MacOS
users also have the option of
installing with macports
.
The git repository and tarballs of the AtomVM source release for all platforms can be found on our GitHub AtomVM page.
Documentation for the v0.6.5 release of the AtomVM virtual machine, including a Getting Started Guide, can be found in the AtomVM Documentation.
As always, tools, drivers, and modules are available on the GitHub AtomVM Project page.
Many thanks go to Davide Bettio, for creating and maintaining such a fine work of software. Special thanks to first time contributors Yuto Oguchi, Rafał Trójniak, Jakub Gonet, and Kevin Schweikert, as well as the rest of the contributors and bug reporters who have helped make this release possible.
The AtomVM team