summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/board.json21
-rw-r--r--ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/mpconfigboard.h4
-rw-r--r--ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/mpconfigboard.mk8
-rw-r--r--ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/pins.csv42
-rw-r--r--ports/samd/boards/samd51x20a.ld20
5 files changed, 95 insertions, 0 deletions
diff --git a/ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/board.json b/ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/board.json
new file mode 100644
index 000000000..af643f5c5
--- /dev/null
+++ b/ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/board.json
@@ -0,0 +1,21 @@
+{
+ "deploy": [
+ "../deploy.md"
+ ],
+ "docs": "",
+ "features": [
+ "Battery Charging",
+ "Breadboard Friendly",
+ "Micro USB",
+ "QWIIC",
+ "SPI Flash"
+ ],
+ "images": [
+ "sparkfun_samd51_thing_plus.jpg"
+ ],
+ "mcu": "samd51",
+ "product": "Sparkfun SAMD51 Thing Plus",
+ "thumbnail": "",
+ "url": "https://www.sparkfun.com/products/14713",
+ "vendor": "Sparkfun"
+}
diff --git a/ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/mpconfigboard.h b/ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/mpconfigboard.h
new file mode 100644
index 000000000..e797ccca9
--- /dev/null
+++ b/ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/mpconfigboard.h
@@ -0,0 +1,4 @@
+#define MICROPY_HW_BOARD_NAME "Sparkfun SAMD51 Thing Plus"
+#define MICROPY_HW_MCU_NAME "SAMD51J20A"
+
+#define MICROPY_HW_XOSC32K (1)
diff --git a/ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/mpconfigboard.mk b/ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/mpconfigboard.mk
new file mode 100644
index 000000000..9e5cf887d
--- /dev/null
+++ b/ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/mpconfigboard.mk
@@ -0,0 +1,8 @@
+MCU_SERIES = SAMD51
+CMSIS_MCU = SAMD51J20A
+LD_FILES = boards/samd51x20a.ld sections.ld
+TEXT0 = 0x4000
+
+# The ?='s allow overriding in mpconfigboard.mk.
+# MicroPython settings
+MICROPY_VFS_LFS1 ?= 1
diff --git a/ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/pins.csv b/ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/pins.csv
new file mode 100644
index 000000000..b60fb9097
--- /dev/null
+++ b/ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/pins.csv
@@ -0,0 +1,42 @@
+# Pin rows contain Pin number and pin name.
+# Pin rows start with PIN_
+# LED rows start with LED_
+# If the pin name is omitted, the pin number is added as name.
+# Rows for empty entries have to start with '-'
+# Empty lines and lines not starting with PIN_ or LED_ are ignored
+
+PIN_PA13,D0
+PIN_PA12,D1
+PIN_PB23,RXD
+PIN_PB22,TXD
+PIN_PA06,D4
+PIN_PA15,D5
+PIN_PA20,D6
+PIN_PA21,D7
+-
+PIN_PA07,D9
+PIN_PA18,D10
+PIN_PA16,D11
+PIN_PA19,D12
+PIN_PA17,D13
+PIN_PA02,A0
+PIN_PB08,A1
+PIN_PB09,A2
+PIN_PA04,A3
+PIN_PA05,A4
+PIN_PB02,A5
+PIN_PA22,SDA
+PIN_PA23,SCL
+PIN_PB12,MOSI
+PIN_PB11,MISO
+PIN_PB13,SCK
+PIN_PA08,FLASH_MOSI
+PIN_PA09,FLASH_SCK
+PIN_PA10,FLASH_CS
+PIN_PA11,FLASH_MISO
+PIN_PA30,SWDCLK
+PIN_PA31,SWDIO
+
+LED_PA17,LED
+LED_PB03,RXLED
+LED_PA27,TXLED
diff --git a/ports/samd/boards/samd51x20a.ld b/ports/samd/boards/samd51x20a.ld
new file mode 100644
index 000000000..f0d5e5c6a
--- /dev/null
+++ b/ports/samd/boards/samd51x20a.ld
@@ -0,0 +1,20 @@
+/*
+ GNU linker script for SAMD51x20
+*/
+
+/* Specify the memory areas */
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0x00004000, LENGTH = 1024K - 16K
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 256K
+}
+
+/* Top end of the stack, with room for double-tap variable */
+_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
+_sstack = _estack - 16K;
+
+_oflash_fs = ORIGIN(FLASH) + 384K - 16K;
+_sflash_fs = LENGTH(FLASH) - 384K + 16K - 1;
+
+_sheap = _ebss;
+_eheap = _sstack;