# Yonder D51 The ATSAMD51 is an ARM Cortex-M4F microcontroller manufactured by Microchip (Atmel). As of Oct 13 2019, -> CBA :heart: D51 <- ## Circuits using the D51  [Adafruit Feather M4](https://www.adafruit.com/product/3857)  [squidworks module](https://gitlab.cba.mit.edu/squidworks/moduleboard-atsamd51/) ## Bare(ish) Metal Toolchains [OpenOCD](blink-openocd) ## Bootloader Based Toolchains Since [Adafruit](https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51) has adopted the SAMD51, it is well supported by the open source community, and we can borrow their development tools. For instructions on how to burn your board with a bootloader, see the [bootloader](bootloader) directory. Once you've got a bootloader on your board, you have a lot of options for programming it. ### Platformio To write code and load it, Jake uses [PlatformIO](https://platformio.org/platformio-ide), which is an open source 'IOT' (embedded) programming tool written as a package for either [atom](https://atom.io/) code-editor, or [vscode](https://code.visualstudio.com/). See their doc for setting up a new project for the D51 / Feather M4. ### Arduino IDE We're not going to beat Adafruit's documentation on setting up the Arduino IDE, so just take a gander over [here](https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51/using-with-arduino-ide). It's their bootloader, after all. ### Real Registers in an Arduino World One of the troubles with Arduino is that people forget that it is just a big C++ library. This means that everything under the sun (that compiles) is legal here. *That* means that we can use Arduino as a crutch, but write really nice Special Function Register code inside of the same executable. Great! Indeed, in the PlatformIO environment, we even have wonderful autocomplete handles on the D51's core register map. For some examples of this kind of manipulation, check out the `hunks` in the [ponyo](https://gitlab.cba.mit.edu/squidworks/ponyo) project.