Merge branch 'refs/heads/master' into fork/ChrisDeadman/hcd-samd-support

This commit is contained in:
hathach
2025-07-09 13:07:13 +07:00
1307 changed files with 52543 additions and 41317 deletions

View File

@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
/* metadata:
name: SAMD21 Xplained Pro
url: https://www.microchip.com/DevelopmentTools/ProductDetails/ATSAMD21-XPRO
*/
#ifndef BOARD_H_
#define BOARD_H_

View File

@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
/* metadata:
name: Adafruit Circuit Playground Express
url: https://www.adafruit.com/product/3333
*/
#ifndef BOARD_H_
#define BOARD_H_

View File

@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
/* metadata:
name: SAMD21 Curiosty Nano
url: https://www.microchip.com/en-us/development-tool/dm320119
*/
#ifndef BOARD_H_
#define BOARD_H_

View File

@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
/* metadata:
name: Great Scott Gadgets Cynthion
url: https://greatscottgadgets.com/cynthion/
*/
#ifndef BOARD_H_
#define BOARD_H_

View File

@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
/* metadata:
name: Adafruit Feather M0 Express
url: https://www.adafruit.com/product/3403
*/
#ifndef BOARD_H_
#define BOARD_H_

View File

@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
/* metadata:
name: Adafruit ItsyBitsy M0
url: https://www.adafruit.com/product/3727
*/
#ifndef BOARD_H_
#define BOARD_H_

View File

@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
/* metadata:
name: Adafruit Metro M0 Express
url: https://www.adafruit.com/product/3505
*/
#ifndef BOARD_H_
#define BOARD_H_

View File

@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
/* metadata:
name: Adafruit QT Py
url: https://www.adafruit.com/product/4600
*/
#ifndef BOARD_H_
#define BOARD_H_

View File

@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
/* metadata:
name: Seeeduino XIAO
url: https://wiki.seeedstudio.com/Seeeduino-XIAO/
*/
#ifndef BOARD_H_
#define BOARD_H_

View File

@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
/* metadata:
name: SparkFun SAMD21 Mini
url: https://www.sparkfun.com/products/13664
*/
#ifndef BOARD_H_
#define BOARD_H_

View File

@@ -23,6 +23,11 @@
*
*/
/* metadata:
name: Adafruit Trinket M0
url: https://www.adafruit.com/product/3500
*/
#pragma once
// LED

View File

@@ -24,6 +24,10 @@
* This file is part of the TinyUSB stack.
*/
/* metadata:
manufacturer: Microchip
*/
#include "sam.h"
#include "bsp/board_api.h"
#include "board.h"

View File

@@ -6,7 +6,7 @@ set(SDK_DIR ${TOP}/hw/mcu/microchip/samd21)
include(${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake)
# toolchain set up
set(CMAKE_SYSTEM_PROCESSOR cortex-m0plus CACHE INTERNAL "System Processor")
set(CMAKE_SYSTEM_CPU cortex-m0plus CACHE INTERNAL "System Processor")
set(CMAKE_TOOLCHAIN_FILE ${TOP}/examples/build_system/cmake/toolchain/arm_${TOOLCHAIN}.cmake)
set(FAMILY_MCUS SAMD21 CACHE INTERNAL "")
@@ -96,15 +96,12 @@ function(family_configure_example TARGET RTOS)
)
# Add TinyUSB target and port source
family_add_tinyusb(${TARGET} OPT_MCU_SAMD21 ${RTOS})
target_sources(${TARGET}-tinyusb PUBLIC
family_add_tinyusb(${TARGET} OPT_MCU_SAMD21)
target_sources(${TARGET} PUBLIC
${TOP}/src/portable/microchip/samd/dcd_samd.c
${TOP}/src/portable/microchip/samd/hcd_samd.c
)
target_link_libraries(${TARGET}-tinyusb PUBLIC board_${BOARD})
# Link dependencies
target_link_libraries(${TARGET} PUBLIC board_${BOARD} ${TARGET}-tinyusb)
target_link_libraries(${TARGET} PUBLIC board_${BOARD})
# Flashing
family_add_bin_hex(${TARGET})