Some simple SAMD21 ARM test programs to verify toolchain, programmer, and chip.
The programs are in C and may be compiled with GCC and 'make' on Linux. Alternatively, Microchip MPLAB X and 'xc32' may be used on Linux or Windows.
Note that access to the chip registers in the source must be coded differently between GCC and MPLAB X. For the differences, compare 'blinky.c' in the root of the repo (GCC) with 'blinky.c' in the subdirectory 'blinky.X' (MPLAB X). The registers themselves are of course the same, but the way that they're named and the data structures used to access them are different.
At present, there's only support for the SAMD21G17D on the SAMD21 Curiosity Nano.
I have a SAMD21E18A on a break-out board that I'd like to get working too.
A recent version of MPLAB X and the 'xc32' compiler. The source code and IDE setup files are in the subdirectory 'blinky.X'. Tested with MPLAB X V6.05 and xc32 V4.30.
We can borrow the compiler, header files, startup files, and linker scripts from the Arduino installation. Source code 'blinky.c' and the usual 'Makefile' in the root of the repo. Only compilation and linking is working at the moment; programming the chip is not yet possible (what programming tool should we use?). Also, the 'blinky.c' file is at an early stage of development and does not set up very much of the hardware yet.