Adafruit QT-Py and Seeduino XIAO
The ARM version of uLisp now supports two diminuitive ARM-based boards: the Adafruit QT-Py  and the Seeduino XIAO . The boards are both based on ARM M0 SAMD21 processors running at 48MHz, with 256 Kbytes of flash and 32 Kbytes of RAM. They both have USB type C connectors, and identical form factors and pinouts:
Saving and loading the workspace
On the QT-Py and XIAO you can save the entire workspace to flash on the ATSAMD21 chip using save-image.
Adafruit QT-Py M0
The Adafruit QT-Py M0  is based on the 32-pin ATSAMD21E18A, and is similar to the XIAO:
It has the following additional features:
- NeoPixel RGB LED.
- Stemma QT connector for connecting to I2C sensors and peripherals.
- Reset button.
Use the Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex M4) Boards core, and the Adafruit QT PY (SAMD21) board option.
The QT-Py has 9 analogue inputs, on pins 0 to 3 and 6 to 10, with up to 12-bit resolution. Pin 1 can be used as AREF.
The QT-Py has 9 PWM analogue outputs, on pins 2 to 10, and a 10-bit DAC output, on pin 0.
NeoPixel RGB display
For information about driving the NeoPixel display from an assembler routine see: ARM NeoPixel driver using assembler.
The Seeduino XIAO  is based on the 48-pin SAMD21G18:
Use the Seeed SAMD (32-bits ARM Cortex-M0+ and Cortex M4) Boards core, and the Seeeduino XIAO board option.
The XIAO doesn't have a reset button; instead you have to short together two pads marked RST on the top of the board. Short them once to reset the board, or twice in quick succession to enter bootloader mode, when the orange LED will light up.
The XIAO has the following LED indicators:
The XIAO has an orange LED connected to digital pin 13 which you can flash with the following program:
(defun blink (&optional x) (pinmode :led-builtin t) (digitalwrite :led-builtin x)
(delay 1000) (blink (not x)))
Run it by typing:
Exit from the program by entering ~.
The XIAO has 11 analogue inputs, on pins 0 to 10, with up to 12-bit resolution. If you want to stay compatible with the QT-Py you should avoid using pins 4 and 5 for analogue input.
The XIAO has 10 PWM analogue outputs, on pins 1 to 10, and a 10-bit DAC output, on pin 0.