diff options
author | joeycastillo <joeycastillo@utexas.edu> | 2021-08-30 14:42:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-30 14:42:11 -0400 |
commit | eb3d9b26cbda2d2612f11eb39843b221224f1fa7 (patch) | |
tree | 7a514b4d21dd0d2a324a5e1313a144f26bf20799 /tinyusb/hw/bsp/samd21/family.mk | |
parent | ee9cc322d301631c9ff0751d9bed717c6492b6a5 (diff) | |
parent | b0845cc3f1a8234a30c980eccf10e44765e4e105 (diff) | |
download | Sensor-Watch-eb3d9b26cbda2d2612f11eb39843b221224f1fa7.tar.gz Sensor-Watch-eb3d9b26cbda2d2612f11eb39843b221224f1fa7.tar.bz2 Sensor-Watch-eb3d9b26cbda2d2612f11eb39843b221224f1fa7.zip |
Merge pull request #9 from joeycastillo/usb-refactor
USB refactor / Makefile simplification
Diffstat (limited to 'tinyusb/hw/bsp/samd21/family.mk')
-rwxr-xr-x | tinyusb/hw/bsp/samd21/family.mk | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/tinyusb/hw/bsp/samd21/family.mk b/tinyusb/hw/bsp/samd21/family.mk new file mode 100755 index 00000000..f1b063f2 --- /dev/null +++ b/tinyusb/hw/bsp/samd21/family.mk @@ -0,0 +1,46 @@ +UF2_FAMILY_ID = 0x68ed2b88 +DEPS_SUBMODULES += hw/mcu/microchip + +include $(TOP)/$(BOARD_PATH)/board.mk + +CFLAGS += \ + -flto \ + -mthumb \ + -mabi=aapcs \ + -mcpu=cortex-m0plus \ + -nostdlib -nostartfiles \ + -DCONF_DFLL_OVERWRITE_CALIBRATION=0 \ + -DCFG_TUSB_MCU=OPT_MCU_SAMD21 + +SRC_C += \ + src/portable/microchip/samd/dcd_samd.c \ + hw/mcu/microchip/samd21/gcc/gcc/startup_samd21.c \ + hw/mcu/microchip/samd21/gcc/system_samd21.c \ + hw/mcu/microchip/samd21/hpl/gclk/hpl_gclk.c \ + hw/mcu/microchip/samd21/hpl/pm/hpl_pm.c \ + hw/mcu/microchip/samd21/hpl/sysctrl/hpl_sysctrl.c \ + hw/mcu/microchip/samd21/hal/src/hal_atomic.c + +INC += \ + $(TOP)/$(BOARD_PATH) \ + $(TOP)/hw/mcu/microchip/samd21/ \ + $(TOP)/hw/mcu/microchip/samd21/config \ + $(TOP)/hw/mcu/microchip/samd21/include \ + $(TOP)/hw/mcu/microchip/samd21/hal/include \ + $(TOP)/hw/mcu/microchip/samd21/hal/utils/include \ + $(TOP)/hw/mcu/microchip/samd21/hpl/pm/ \ + $(TOP)/hw/mcu/microchip/samd21/hpl/port \ + $(TOP)/hw/mcu/microchip/samd21/hri \ + $(TOP)/hw/mcu/microchip/samd21/CMSIS/Include + +# For freeRTOS port source +FREERTOS_PORT = ARM_CM0 + +# flash using bossac at least version 1.8 +# can be found in arduino15/packages/arduino/tools/bossac/ +# Add it to your PATH or change BOSSAC variable to match your installation +BOSSAC = bossac + +flash-bossac: $(BUILD)/$(PROJECT).bin + @:$(call check_defined, SERIAL, example: SERIAL=/dev/ttyACM0) + $(BOSSAC) --port=$(SERIAL) -U -i --offset=0x2000 -e -w $^ -R |