Skip to content

Releases: atomvm/AtomVM

v0.6.4

18 Aug 08:49
v0.6.4
00ff986
Compare
Choose a tag to compare

v0.6.4 release.

Please, read the getting started guide for flashing instructions.

Added

  • Implement gpio:init/1 on esp32 to initialize pins for GPIO usage, which some pins
    require depending on default function and bootloader code
  • Implement missing opcode 161 (raw_raise), that looks more likely to be generated with Elixir code
  • Support for Elixir Map.replace/3 and Map.replace!/3
  • Support for Elixir Kernel.struct and Kernel.struct!
  • Support for Elixir IO.iodata_to_binary/1
  • Support for Elixir exceptions: Exception module and the other error related modules such as
    ArgumentError, UndefinedFunctionError, etc...
  • Support for Elixir Enumerable and Collectable protocol
  • Support for Elixir Enum functions: split_with, join, map_join, into, reverse,
    slice and to_list
  • Support for Elixir MapSet module
  • Support for Elixir Range module
  • Support for Elixir Kernel.min and Kernel.max
  • Support (as stub) for erlang:error/3 (that is required from Elixir code)

v0.6.3

20 Jul 21:36
v0.6.3
3a107ae
Compare
Choose a tag to compare

v0.6.3 release.

Please, read the getting started guide for flashing instructions.

Added

  • Simple http client, that can be used for different use case such as downloading OTA updates
  • Elixir support for Keyword.merge Keyword.take Keyword.pop(!) Keyword.keyword? Keyword.has_key? functions.
  • Support for ESP32-H2
  • lists:keytake/3 implemented.
  • Support for setting channel used by network driver wifi access point.
  • Support for maps:iterator/2 and ~kp with io_lib:format/2 that were introduced with OTP26.
  • Support for erlang:apply/2
  • Support for lists:keystore/4
  • Support for erlang:size/1 bif
  • Support for USB serial output on ESP32 (needs to be manually enabled)
  • Support for lists:filtermap/2
  • Support for standard library queue module
  • Support for maps:from_keys/2 NIF
  • Support for standard library sets module

Changed

  • ESP32 network driver messages for event 40 (home channel change events) are now suppressed, but the
    details for the channel changes can be observed in the console log if "debug" level logging is enabled
    in ESP-IDF Kconfig options.
  • Default size of ESP32 RTC slow memory from 4086 to 4096, except on ESP32-H2 where it's 3072
  • Update byte_size/1 and bit_size/1 to implement OTP27 match context reuse optimization OTP-18987.

Fixed

  • Fix bug (with code compiled with OTP-21) with binary pattern matching: the fix introduced with
    02411048 was not completely right, and it was converting match context to bogus binaries.
  • Fix creation of multiple links for the same process and not removing link at trapped exits.
    See issue #1193.
  • Fix error that is raised when a function is undefined
  • Fix a bug that could yield crashes when functions are sent in messages
  • Fix bug where failing guards would corrupt x0 and x1
  • Fix a memory leak when raising out of memory error while executing PUT_MAP_ASSOC instruction

v0.6.2

26 May 14:34
v0.6.2
1a52db9
Compare
Choose a tag to compare

v0.6.2 release.

Please, read the getting started guide for flashing instructions.

CHANGELOG

Added

  • Support for DragonFly BSD (generic_unix platform).
  • Added guards is_even and is_odd to the Integer module
  • Add a number of functions to proplists module, such as delete/2, from/to_map/1, etc...
  • Add esp:deep_sleep_enable_gpio_wakeup/2 to allow wakeup from deep sleep for ESP32C3 and ESP32C6.
  • Obtain RSSI of the current connection with network:sta_rssi/0 on ESP32.
  • Pico-W support for network:sta_rssi/0.
  • Add support to ESP32C2

Fixed

  • Fix invalid read after free in ssl code, see also issue
    #1115.
  • Fix semantic of ssl:recv(Socket, 0) to return all available bytes, matching what OTP does.
  • Fix binary option handling in ssl:connect/3 so binary can be used instead of
    {binary, true}.
  • Fix scheduling of trapped process that were wrongly immediately rescheduled before being signaled.
  • Fix gen_tcp and ssl types.
  • Fix documentation and specification of esp:sleep_enable_ext0_wakeup/2 and esp:sleep_enable_ext1_wakeup/2.

Changed

  • Stacktraces are included by default on Pico devices.
  • Changed ssl default from {active, false} to {active, true} in order to have same behavior as
    OTP. Since active mode is not supported right now, active must be explicitly set to false:
    ssl:connect(..., ..., [{active, false}, ...]), otherwise it will crash.

v0.6.1

20 Apr 16:11
v0.6.1
bc9b6e1
Compare
Choose a tag to compare

v0.6.1 release.

Please, read the getting started guide for flashing instructions.

CHANGELOG

Added

  • Added experimental optimized GC mode that makes use of C realloc instead of copying data around, it can be enabled with -DENABLE_REALLOC_GC=On.

Fixed

  • Fix bug in erlang:ref_to_list/1 and erlang:display/1: the unique integer was truncated on some 32-bit architectures
  • Stop hardcoding erl_eval as module name in both display and fun_to_list
  • Correctly display and convert to list funs such as fun m:f/a
  • Fixed bug in STM32 cmake that could cause builds with multiple jobs to fail due to incorrect artifact dependency
  • Fix crash on macOS due to missing call to psa_crypto_init for TLS 1.3
  • Fix crypto test on rp2040

v0.6.0

05 Mar 17:33
v0.6.0
5208cbb
Compare
Choose a tag to compare

First v0.6.x series stable release!

Please, read the getting started guide for flashing instructions.

This release introduces a lot of new features compared to v0.5.x: such as support for multiple cores, support for beam files compiled with OTP 26, OTP lower level socket API, resources and a richer standard library, etc...

It is very hard to make a complete list of changes, so I suggest to take a look to the changelog file.

Also special thanks to all the contributors for their amazing work, that made this release possible.

v0.6.0-rc.0

03 Mar 22:19
v0.6.0-rc.0
27351a2
Compare
Choose a tag to compare
v0.6.0-rc.0 Pre-release
Pre-release

v0.6.0-rc.0 release.

Please, read the getting started guide for flashing instructions.

CHANGELOG

Added

  • BOOTLOADER_OFFSET for all current Esp32 models.
  • Added API to send messages from FreeRTOS tasks or pthreads, typically to
    easily support integration with Esp32 callbacks

Fixed

  • BOOTLOADER_OFFSET was incorrect for Esp32-C6 and Esp32-S2.
  • Fixed a bug that would fail to set DHCP hostname in STA+AP mode on all ESP32 platforms.
  • ESP32-S3: crash in network driver caused by a smaller stack size for scheduler threads, when
    calling esp_wifi_init(). See also issue #1059.
  • Fixed Esp32 network driver on non-SMP builds
  • ESP32: fixed bug in gpio:stop/0 and gpio:close/1 that would cause the VM to crash.

v0.6.0-beta.1

28 Feb 17:41
v0.6.0-beta.1
84edf91
Compare
Choose a tag to compare
v0.6.0-beta.1 Pre-release
Pre-release

v0.6.0-beta.1 release.

Please, read the getting started guide for flashing instructions.

CHANGELOG

Added

  • Support for utf8 encoding to *_to_atom and atom_to_* functions
  • binary_to_atom/1 and atom_to_binary/1 that default to utf8 (they were introduced with OTP23)
  • Added Pico cmake option AVM_WAIT_BOOTSEL_ON_EXIT (default ON) to allow tools to use automated BOOTSEL mode after main application exits
  • Use UTF-8 encoding for atoms when using erlang:term_to_binary/1, in conformance with OTP-26
  • Pico: Wait for USB serial connection cmake configuration option AVM_USB_WAIT_SECONDS added with 20 second default.
  • Support for code that makes use of more than 16 live registers, such as functions with > 16
    parameters and complex pattern matchings.

Fixed

  • ESP32: fix i2c_driver_acquire and i2c_driver_release functions, that were working only once.
  • Sending messages to registered processes using the ! operator now works.
  • Fixed bug in OP_SEND that would accept sending a message to any integer or term without raising an error.
  • binary_to_term checks atom encoding validity, and fix latin1 support (when non-ASCII chars are
    used)
  • ESP32: fixed bug in gpio:set_pin_mode/2 and gpio:set_direction/3 that would accept any atom for the mode parameter without an error.
  • ESP32: GPIO driver fix bug that would accept invalid pull direction, and silently set pull direction to floating without issuing an error.
  • ESP32: fixed bug in gpio driver that would accept invalid pin numbers (either negative, or too large)
  • RP2040: fixed bug in gpio:set_pin_pull/2 that would accept any parameter as a valid pull mode.
  • Support to function with 10 or more parameters
  • Very unlikely but possible corruption caused by generated code that uses 16 live registers

Changed

  • binary_to_atom/2 validates utf8 strings
  • *_to_atom and atom_to_* properly convert latin1 (not just ASCII) to utf8 and viceversa
  • ESP32: use esp-idf v5.1.3 for building release binaries

v0.6.0-beta.0

08 Feb 18:39
v0.6.0-beta.0
ba8b531
Compare
Choose a tag to compare
v0.6.0-beta.0 Pre-release
Pre-release

v0.6.0-beta.0 release.

Please, read the getting started guide for flashing instructions.

CHANGELOG

Added

  • Added esp:get_default_mac/0 for retrieving the default MAC address on ESP32.
  • Added support for pico and poci as an alternative to mosi and miso for SPI
  • ESP32: Added support to SPI peripherals other than hspi and vspi
  • Added gpio:set_int/4, with the 4th parameter being the pid() or registered name of the process to receive interrupt messages
  • Added support for lists:split/2
  • Added ESP32 API for allowing coexistence of native and Erlang I2C drivers

Changed

  • Shorten SPI config options, such as sclk_io_num -> sclk
  • Shorten I2C config options, such as scl_io_num -> scl
  • Shorten UART config options, such as tx_pin -> tx
  • Introduced support to non-integer peripheral names, "i2c0", "uart1" (instead of just 0 and
  • 1, which now they are deprecated)
  • New atom table, which uses less memory, has improved performances and better code.
  • SPI: when gpio number is not provided for miso or mosi default to disabled
  • Change port call tuple format to the same format as gen_server, so casts can be supported too

Fixed

  • Fix several missing memory allocation checks in libAtomVM.
  • Fixed a possible memory leak in libAtomVM/module.c module_destroy.
  • Fix possibile bug in random number generator on ESP32 and RPi2040
  • Fixed interpretation of live for opcodes, thus altering GC semantics for nifs. See also UPDATING.

v0.6.0-alpha.2

10 Dec 23:20
v0.6.0-alpha.2
9b1396a
Compare
Choose a tag to compare
v0.6.0-alpha.2 Pre-release
Pre-release

v0.6.0-alpha.2 release.

Please, read the getting started guide for flashing instructions.

A number of Linux artifacts has not been published with this release, since they require a very specific Mbed-TLS version.

CHANGELOG

Fixed

  • Fixed a bug where guards would raise exceptions instead of just being false
  • Fixed support for big endian CPUs (such as some MIPS CPUs).
  • Fixed STM32 not aborting when AVM_ABORT() is used
  • Fixed a bug that would leave the STM32 trapped in a loop on hard faults, rather than aborting
  • Fixed a bug that would make the VM to loop and failing to process selected fds on Linux
  • Fixed classes of exceptions in estdlib.
  • Fixed STM32 code that was hard coded to the default target device, now configured based on the cmake -DDEVICE= parameter
  • Fixed hard fault on STM32 durung malloc on boards with more than one bank of sram
  • Fixed invalid src_clk error on ESP-IDF >= 5.0
  • Fixed changed default to AVM_USE_32BIT_FLOAT=on for STM32 platform to enable use of single precision hardware FPU on F4/F7 devices.
  • Fixed a bug where emscripten register_*_callback/1 functions would use x[1] as second argument
  • Fixed precision of integers used with timers which could yield to halts and wait times smaller than expected
  • Add support for ESP32-C6

Changed

  • Crypto functions on generic_unix platform now rely on MbedTLS instead of OpenSSL
  • Platform function providing time used by timers was changed from sys_monotonic_millis to sys_monotonic_time_u64, sys_monotonic_time_u64_to_ms and sys_monotonic_time_ms_to_u64.
  • Implement atomvm:random/0 and atomvm:rand_bytes/1 on top of crypto:strong_rand_bytes/1 on
    generic_unix, ESP32 and RP2040 platforms.
  • Performance improvements

Added

  • Added support for the OTP socket interface.
  • Enhancd performance of STM32 by enabling flash cache and i-cache with branch prediction.
  • Added cmake configuration option AVM_CONFIG_REBOOT_ON_NOT_OK for STM32
  • New gpio driver for STM32 with nif and port support for read and write functions.
  • Added support for interrupts to STM32 GPIO port driver.
  • Added suppoprt for PicoW extra gpio pins (led) to the gpio driver.
  • Added support for net:getaddrinfo/1,2
  • Added minimal support for the OTP ssl interface.
  • Added support for crypto:one_time/4,5 on Unix and Pico as well as for crypto:hash/2 on Pico
  • Added ability to configure STM32 Nucleo boards onboard UART->USB-COM using the -DBOARD=nucleo cmake option
  • Added STM32 cmake option -DAVM_CFG_CONSOLE= to select a different uart peripheral for the system console
  • Added crypto:strong_rand_bytes/1 using Mbed-TLS (only on generic_unix, ESP32 and RP2040
    platforms)
  • Added support for setting the default receive buffer size for sockets via socket:setopt/3
  • Added support for pattern matching binaries containing 32 and 64 bit floating point values, but
    only when aligned to byte boundaries (e.g. <<0:4, F:32/float>> = Bin is not supported).
  • Added experimental backend to get_tcp and get_udp based on the new socket interface
  • Added API for managing ESP32 watchdog (only on esp-idf >= v5.x)

Removed

  • OpenSSL support, Mbed-TLS is required instead.

v0.6.0-alpha.1

09 Oct 11:51
v0.6.0-alpha.1
c239678
Compare
Choose a tag to compare
v0.6.0-alpha.1 Pre-release
Pre-release

v0.6.0-alpha.1 release.

Please, read the getting started guide for flashing instructions.

This release includes some changes that may require manual update steps, please read UPDATING.md for more information.

CHANGELOG

Added

  • Added erlang:spawn_link/1,3
  • Added erlang:exit/2
  • Added links to process_info/2
  • Added lists:usort/1,2
  • Added missing documentation and specifications for available nifs
  • Added configurable logging macros to stm32 platform
  • Added support for ULP wakeup on ESP32
  • Added heap growth strategies as a fine-tuning option to spawn_opt/2,4
  • Added crypto:crypto_one_time/4,5 on ESP32
  • Improved nif and port support on STM32
  • Added support for atomvm:posix_clock_settime/2
  • Added support for creations of binaries with unaligned strings
  • Added -h and -v flags to generic_unix AtomVM command
  • Removed support to ESP32 NVS from network module in order to make it generic. See also [UPDATING.md].
  • Added initial support for Pico-W: on-board LED, Wifi (STA and AP modes).

Changed

  • Changed offset of atomvmlib and of program on Pico. See also [UPDATING.md].

Fixed

  • Fixed incorrect exit reason for exceptions of class exit
  • Fixed several incorrect type specifications
  • Fixed esp:nvs_set_binary functions.
  • Fixed monotonic_time/1 and system_time/1 functions for Raspberry Pi Pico
  • Fixed race conditions in atoms table.
  • Fixed a bug in the STM32 port that caused the final result to never be returned.
  • Fix bug when building a binary using a 64-bit integer on a 32-bit CPU.
  • Fix (using 'auto' option) SPI on ESP32 models other than ESP32, such as ESP32S2, ESP32C3, ...