README.md 2.23 KB
Newer Older
Jake Read's avatar
Jake Read committed
1
# Yonder D51
Jake Read's avatar
scratch  
Jake Read committed
2

Jake Read's avatar
Jake Read committed
3
The ATSAMD51 is an ARM Cortex-M4F microcontroller manufactured by Microchip (Atmel).  
Jake Read's avatar
scratch  
Jake Read committed
4

Jake Read's avatar
Jake Read committed
5
As of Oct 13 2019, -> CBA :heart: D51 <-
Jake Read's avatar
Jake Read committed
6

Erik Strand's avatar
Erik Strand committed
7

Jake Read's avatar
Jake Read committed
8
## Circuits using the D51
Jake Read's avatar
Jake Read committed
9

Jake Read's avatar
Jake Read committed
10 11
![feather m4 pic](https://cdn-shop.adafruit.com/970x728/3857-00.jpg)
[Adafruit Feather M4](https://www.adafruit.com/product/3857)
Jake Read's avatar
Jake Read committed
12

Jake Read's avatar
Jake Read committed
13 14
![module pic](https://gitlab.cba.mit.edu/squidworks/moduleboard-atsamd51/raw/master/moduleboard-atsamd51/2019-10-13_module-fab.jpg)
[squidworks module](https://gitlab.cba.mit.edu/squidworks/moduleboard-atsamd51/)
Jake Read's avatar
Jake Read committed
15 16


Erik Strand's avatar
Erik Strand committed
17
## Bare(ish) Metal Toolchains
Jake Read's avatar
Jake Read committed
18

Erik Strand's avatar
Erik Strand committed
19
[OpenOCD](blink-openocd)
Jake Read's avatar
Jake Read committed
20 21


Erik Strand's avatar
Erik Strand committed
22
## Bootloader Based Toolchains
Jake Read's avatar
Jake Read committed
23

Erik Strand's avatar
Erik Strand committed
24 25 26 27
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.
Jake Read's avatar
Jake Read committed
28

Erik Strand's avatar
Erik Strand committed
29
Once you've got a bootloader on your board, you have a lot of options for programming it.
Jake Read's avatar
Jake Read committed
30

31

Jake Read's avatar
Jake Read committed
32 33
### Platformio

Erik Strand's avatar
Erik Strand committed
34
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.
Jake Read's avatar
Jake Read committed
35 36


Erik Strand's avatar
Erik Strand committed
37
### Arduino IDE
Jake Read's avatar
Jake Read committed
38

Erik Strand's avatar
Erik Strand committed
39 40 41
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
Erik Strand's avatar
Erik Strand committed
42 43
their bootloader, after all. An example sketch lives in the [blink-arduino](blink-arduino)
directory.
44

45

Erik Strand's avatar
Erik Strand committed
46
### Real Registers in an Arduino World
47

Erik Strand's avatar
Erik Strand committed
48 49 50
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.