This is a very simple example to blink the on-board LED on the Adafruit Trinket M0 with a pure C program. The Trinket M0 uses an ARM Cortex M0+ processor (ATSAMD21E18A).
- Install the cross-compiling toolchain for ARM processors (
arm-none-eabi-gcc
andarm-none-eabi-binutils
) - Install the flashing utiliy bossa for your platform (for Arch Linux: Bossa AUR)
-
Plug in your Trinket and check the port (e.g. /dev/ttyACM0 or /dev/ttyACM1)
-
Adjust the port in the Makefile accordingly
-
Then do the building and flashing:
make build make flash
- This example has been put together by looking at the following very helpful resources: