File tree Expand file tree Collapse file tree 10 files changed +39
-15
lines changed
samd21/boards/cynthion_d21 Expand file tree Collapse file tree 10 files changed +39
-15
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ SAMD11 & SAMD21
175
175
- `Adafruit Feather M0 Express <https://www.adafruit.com/product/3403 >`__
176
176
- `Adafruit ItsyBitsy M0 Express <https://www.adafruit.com/product/3727 >`__
177
177
- `Adafruit Metro M0 Express <https://www.adafruit.com/product/3505 >`__
178
- - `Great Scott Gadgets LUNA <https://greatscottgadgets.com/luna / >`__
178
+ - `Great Scott Gadgets Cynthion <https://greatscottgadgets.com/cynthion / >`__
179
179
- `Microchip SAMD11 Xplained Pro <https://www.microchip.com/developmenttools/ProductDetails/atsamd11-xpro >`__
180
180
- `Microchip SAMD21 Xplained Pro <https://www.microchip.com/DevelopmentTools/ProductDetails/ATSAMD21-XPRO >`__
181
181
- `Seeeduino Xiao <https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html >`__
Original file line number Diff line number Diff line change 36
36
#define LED_STATE_ON 0
37
37
38
38
// Button
39
+ #if ((_BOARD_REVISION_MAJOR_ == 0 ) && (_BOARD_REVISION_MINOR_ < 6 ))
39
40
#define BUTTON_PIN PIN_PA16 // pin PB22
41
+ #define BUTTON_PULL_MODE GPIO_PULL_UP
42
+ #else
43
+ #define BUTTON_PIN PIN_PA02
44
+ #define BUTTON_PULL_MODE GPIO_PULL_OFF
45
+ #endif
40
46
#define BUTTON_STATE_ACTIVE 0
41
47
42
48
#ifdef __cplusplus
Original file line number Diff line number Diff line change
1
+ BOARD_REVISION_MAJOR ?= 1
2
+ BOARD_REVISION_MINOR ?= 0
3
+
4
+ CFLAGS += -D__SAMD11D14AM__ \
5
+ -D_BOARD_REVISION_MAJOR_=$(BOARD_REVISION_MAJOR ) \
6
+ -D_BOARD_REVISION_MINOR_=$(BOARD_REVISION_MINOR )
7
+
8
+ # All source paths should be relative to the top level.
9
+ LD_FILE = $(BOARD_PATH ) /samd11d14am_flash.ld
10
+
11
+ # Default bootloader size is now 2K, allow to specify other
12
+ ifeq ($(BOOTLOADER_SIZE ) , )
13
+ BOOTLOADER_SIZE := 0x800
14
+ endif
15
+ LDFLAGS += -Wl,--defsym=BOOTLOADER_SIZE=$(BOOTLOADER_SIZE )
16
+
17
+ # For flash-jlink target
18
+ JLINK_DEVICE = ATSAMD11D14
19
+
20
+ # flash using dfu-util
21
+ flash : $(BUILD ) /$(PROJECT ) .bin
22
+ dfu-util -a 0 -d 1d50:615c -D $< || dfu-util -a 0 -d 16d0:05a5 -D $<
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ SEARCH_DIR(.)
35
35
/* Memory Spaces Definitions */
36
36
MEMORY
37
37
{
38
- rom (rx) : ORIGIN = 0x00000000 + 4K , LENGTH = 0x00004000 - 4K
38
+ rom (rx) : ORIGIN = 0x00000000 + BOOTLOADER_SIZE , LENGTH = 0x00004000 - BOOTLOADER_SIZE
39
39
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000
40
40
}
41
41
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 38
38
// Button
39
39
#define BUTTON_PIN PIN_PA14 // pin PB22
40
40
#define BUTTON_STATE_ACTIVE 0
41
+ #define BUTTON_PULL_MODE GPIO_PULL_UP
41
42
42
43
#ifdef __cplusplus
43
44
}
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ void board_init(void)
78
78
79
79
// Button init
80
80
gpio_set_pin_direction (BUTTON_PIN , GPIO_DIRECTION_IN );
81
- gpio_set_pin_pull_mode (BUTTON_PIN , GPIO_PULL_UP );
81
+ gpio_set_pin_pull_mode (BUTTON_PIN , BUTTON_PULL_MODE );
82
82
83
83
/* USB Clock init
84
84
* The USB module requires a GCLK_USB of 48 MHz ~ 0.25% clock
File renamed without changes.
Original file line number Diff line number Diff line change @@ -2,6 +2,12 @@ CFLAGS += -D__SAMD21G18A__ -DCFG_EXAMPLE_VIDEO_READONLY
2
2
3
3
LD_FILE = $(BOARD_PATH ) /samd21g18a_flash.ld
4
4
5
+ # Default bootloader size is now 2K, allow to specify other
6
+ ifeq ($(BOOTLOADER_SIZE ) , )
7
+ BOOTLOADER_SIZE := 0x800
8
+ endif
9
+ LDFLAGS += -Wl,--defsym=BOOTLOADER_SIZE=$(BOOTLOADER_SIZE )
10
+
5
11
# For flash-jlink target
6
12
JLINK_DEVICE = ATSAMD21G18
7
13
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ SEARCH_DIR(.)
35
35
/* Memory Spaces Definitions */
36
36
MEMORY
37
37
{
38
- rom (rx) : ORIGIN = 0x00000000 + 4K , LENGTH = 0x00040000 - 4K
38
+ rom (rx) : ORIGIN = 0x00000000 + BOOTLOADER_SIZE , LENGTH = 0x00040000 - BOOTLOADER_SIZE
39
39
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000
40
40
}
41
41
You can’t perform that action at this time.
0 commit comments