mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-19 19:21:05 +00:00
Merge pull request #2133 from greatscottgadgets/cynthion_support
Update support for Cynthion boards
This commit is contained in:
commit
bbdc879995
@ -175,7 +175,7 @@ SAMD11 & SAMD21
|
|||||||
- `Adafruit Feather M0 Express <https://www.adafruit.com/product/3403>`__
|
- `Adafruit Feather M0 Express <https://www.adafruit.com/product/3403>`__
|
||||||
- `Adafruit ItsyBitsy M0 Express <https://www.adafruit.com/product/3727>`__
|
- `Adafruit ItsyBitsy M0 Express <https://www.adafruit.com/product/3727>`__
|
||||||
- `Adafruit Metro M0 Express <https://www.adafruit.com/product/3505>`__
|
- `Adafruit Metro M0 Express <https://www.adafruit.com/product/3505>`__
|
||||||
- `Great Scott Gadgets LUNA <https://greatscottgadgets.com/luna/>`__
|
- `Great Scott Gadgets Cynthion <https://greatscottgadgets.com/cynthion/>`__
|
||||||
- `Microchip SAMD11 Xplained Pro <https://www.microchip.com/developmenttools/ProductDetails/atsamd11-xpro>`__
|
- `Microchip SAMD11 Xplained Pro <https://www.microchip.com/developmenttools/ProductDetails/atsamd11-xpro>`__
|
||||||
- `Microchip SAMD21 Xplained Pro <https://www.microchip.com/DevelopmentTools/ProductDetails/ATSAMD21-XPRO>`__
|
- `Microchip SAMD21 Xplained Pro <https://www.microchip.com/DevelopmentTools/ProductDetails/ATSAMD21-XPRO>`__
|
||||||
- `Seeeduino Xiao <https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html>`__
|
- `Seeeduino Xiao <https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html>`__
|
||||||
|
@ -36,7 +36,13 @@
|
|||||||
#define LED_STATE_ON 0
|
#define LED_STATE_ON 0
|
||||||
|
|
||||||
// Button
|
// Button
|
||||||
|
#if ((_BOARD_REVISION_MAJOR_ == 0) && (_BOARD_REVISION_MINOR_ < 6))
|
||||||
#define BUTTON_PIN PIN_PA16 // pin PB22
|
#define BUTTON_PIN PIN_PA16 // pin PB22
|
||||||
|
#define BUTTON_PULL_MODE GPIO_PULL_UP
|
||||||
|
#else
|
||||||
|
#define BUTTON_PIN PIN_PA02
|
||||||
|
#define BUTTON_PULL_MODE GPIO_PULL_OFF
|
||||||
|
#endif
|
||||||
#define BUTTON_STATE_ACTIVE 0
|
#define BUTTON_STATE_ACTIVE 0
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
22
hw/bsp/samd11/boards/cynthion_d11/board.mk
Normal file
22
hw/bsp/samd11/boards/cynthion_d11/board.mk
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
BOARD_REVISION_MAJOR ?= 1
|
||||||
|
BOARD_REVISION_MINOR ?= 0
|
||||||
|
|
||||||
|
CFLAGS += -D__SAMD11D14AM__ \
|
||||||
|
-D_BOARD_REVISION_MAJOR_=$(BOARD_REVISION_MAJOR) \
|
||||||
|
-D_BOARD_REVISION_MINOR_=$(BOARD_REVISION_MINOR)
|
||||||
|
|
||||||
|
# All source paths should be relative to the top level.
|
||||||
|
LD_FILE = $(BOARD_PATH)/samd11d14am_flash.ld
|
||||||
|
|
||||||
|
# Default bootloader size is now 2K, allow to specify other
|
||||||
|
ifeq ($(BOOTLOADER_SIZE), )
|
||||||
|
BOOTLOADER_SIZE := 0x800
|
||||||
|
endif
|
||||||
|
LDFLAGS += -Wl,--defsym=BOOTLOADER_SIZE=$(BOOTLOADER_SIZE)
|
||||||
|
|
||||||
|
# For flash-jlink target
|
||||||
|
JLINK_DEVICE = ATSAMD11D14
|
||||||
|
|
||||||
|
# flash using dfu-util
|
||||||
|
flash: $(BUILD)/$(PROJECT).bin
|
||||||
|
dfu-util -a 0 -d 1d50:615c -D $< || dfu-util -a 0 -d 16d0:05a5 -D $<
|
@ -35,7 +35,7 @@ SEARCH_DIR(.)
|
|||||||
/* Memory Spaces Definitions */
|
/* Memory Spaces Definitions */
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
rom (rx) : ORIGIN = 0x00000000 + 4K, LENGTH = 0x00004000 - 4K
|
rom (rx) : ORIGIN = 0x00000000 + BOOTLOADER_SIZE, LENGTH = 0x00004000 - BOOTLOADER_SIZE
|
||||||
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000
|
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +0,0 @@
|
|||||||
CFLAGS += -D__SAMD11D14AM__
|
|
||||||
|
|
||||||
# All source paths should be relative to the top level.
|
|
||||||
LD_FILE = $(BOARD_PATH)/samd11d14am_flash.ld
|
|
||||||
|
|
||||||
# For flash-jlink target
|
|
||||||
JLINK_DEVICE = ATSAMD11D14
|
|
||||||
|
|
||||||
# flash using dfu-util
|
|
||||||
flash: $(BUILD)/$(PROJECT).bin
|
|
||||||
dfu-util -a 0 -d 1d50:615c -D $< || dfu-util -a 0 -d 16d0:05a5 -D $<
|
|
@ -38,6 +38,7 @@
|
|||||||
// Button
|
// Button
|
||||||
#define BUTTON_PIN PIN_PA14 // pin PB22
|
#define BUTTON_PIN PIN_PA14 // pin PB22
|
||||||
#define BUTTON_STATE_ACTIVE 0
|
#define BUTTON_STATE_ACTIVE 0
|
||||||
|
#define BUTTON_PULL_MODE GPIO_PULL_UP
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ void board_init(void)
|
|||||||
|
|
||||||
// Button init
|
// Button init
|
||||||
gpio_set_pin_direction(BUTTON_PIN, GPIO_DIRECTION_IN);
|
gpio_set_pin_direction(BUTTON_PIN, GPIO_DIRECTION_IN);
|
||||||
gpio_set_pin_pull_mode(BUTTON_PIN, GPIO_PULL_UP);
|
gpio_set_pin_pull_mode(BUTTON_PIN, BUTTON_PULL_MODE);
|
||||||
|
|
||||||
/* USB Clock init
|
/* USB Clock init
|
||||||
* The USB module requires a GCLK_USB of 48 MHz ~ 0.25% clock
|
* The USB module requires a GCLK_USB of 48 MHz ~ 0.25% clock
|
||||||
|
@ -2,6 +2,12 @@ CFLAGS += -D__SAMD21G18A__ -DCFG_EXAMPLE_VIDEO_READONLY
|
|||||||
|
|
||||||
LD_FILE = $(BOARD_PATH)/samd21g18a_flash.ld
|
LD_FILE = $(BOARD_PATH)/samd21g18a_flash.ld
|
||||||
|
|
||||||
|
# Default bootloader size is now 2K, allow to specify other
|
||||||
|
ifeq ($(BOOTLOADER_SIZE), )
|
||||||
|
BOOTLOADER_SIZE := 0x800
|
||||||
|
endif
|
||||||
|
LDFLAGS += -Wl,--defsym=BOOTLOADER_SIZE=$(BOOTLOADER_SIZE)
|
||||||
|
|
||||||
# For flash-jlink target
|
# For flash-jlink target
|
||||||
JLINK_DEVICE = ATSAMD21G18
|
JLINK_DEVICE = ATSAMD21G18
|
||||||
|
|
@ -35,7 +35,7 @@ SEARCH_DIR(.)
|
|||||||
/* Memory Spaces Definitions */
|
/* Memory Spaces Definitions */
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
rom (rx) : ORIGIN = 0x00000000 + 4K, LENGTH = 0x00040000 - 4K
|
rom (rx) : ORIGIN = 0x00000000 + BOOTLOADER_SIZE, LENGTH = 0x00040000 - BOOTLOADER_SIZE
|
||||||
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000
|
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000
|
||||||
}
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user