summaryrefslogtreecommitdiff
path: root/hw/bsp/d5035_01/board.mk
diff options
context:
space:
mode:
authorJean Gressmann <[email protected]>2020-10-07 19:12:34 +0200
committerJean Gressmann <[email protected]>2020-10-07 19:19:30 +0200
commitf02b5bfdfaf20a76054dc2f57d37c46de4be6534 (patch)
tree4e034b89507cd63f90ab3682380ac4d159f1a5eb /hw/bsp/d5035_01/board.mk
parentf92fe1e23e3e8689b6f001c5232a5960acdb3b7f (diff)
Address various issues raised by TinyUSB maintainers
- remove OPT_MCU_SAME51 in favor of OPT_MCU_SAME5X and working around differences in the Atmel bsp locally in the D5035-01 bsp. - rename board folder to d5035_01 for consistency with other boards
Diffstat (limited to 'hw/bsp/d5035_01/board.mk')
-rw-r--r--hw/bsp/d5035_01/board.mk63
1 files changed, 63 insertions, 0 deletions
diff --git a/hw/bsp/d5035_01/board.mk b/hw/bsp/d5035_01/board.mk
new file mode 100644
index 000000000..1f2b467a0
--- /dev/null
+++ b/hw/bsp/d5035_01/board.mk
@@ -0,0 +1,63 @@
+CFLAGS += \
+ -mthumb \
+ -mabi=aapcs \
+ -mlong-calls \
+ -mcpu=cortex-m4 \
+ -mfloat-abi=hard \
+ -mfpu=fpv4-sp-d16 \
+ -nostdlib -nostartfiles \
+ -D__SAME51J19A__ \
+ -DCONF_CPU_FREQUENCY=80000000 \
+ -DCONF_GCLK_USB_FREQUENCY=48000000 \
+ -DCFG_TUSB_MCU=OPT_MCU_SAME5X \
+ -DD5035_01=1 \
+ -DBOARD_NAME="\"D5035-01\"" \
+ -DSVC_Handler=SVCall_Handler
+
+HWRED ?= 1
+
+CFLAGS += -DHWREV=$(HWREV)
+
+
+# All source paths should be relative to the top level.
+LD_FILE = hw/bsp/$(BOARD)/same51j19a_flash.ld
+
+SRC_C += \
+ hw/mcu/microchip/same51/gcc/gcc/startup_same51.c \
+ hw/mcu/microchip/same51/gcc/system_same51.c \
+
+ifdef SYSCALLS
+ifneq ($(SYSCALLS),0)
+ SRC_C += hw/mcu/microchip/same51/hal/utils/src/utils_syscalls.c
+endif
+endif
+
+ifdef LOG
+ifneq ($(LOG),0)
+ SRC_C += hw/mcu/microchip/same51/hal/utils/src/utils_syscalls.c
+endif
+endif
+
+INC += \
+ $(TOP)/hw/mcu/microchip/same51/ \
+ $(TOP)/hw/mcu/microchip/same51/config \
+ $(TOP)/hw/mcu/microchip/same51/include \
+ $(TOP)/hw/mcu/microchip/same51/hal/include \
+ $(TOP)/hw/mcu/microchip/same51/hal/utils/include \
+ $(TOP)/hw/mcu/microchip/same51/hpl/port \
+ $(TOP)/hw/mcu/microchip/same51/hri \
+ $(TOP)/hw/mcu/microchip/same51/CMSIS/Core/Include
+
+# For TinyUSB port source
+VENDOR = microchip
+CHIP_FAMILY = samd
+
+# For freeRTOS port source
+FREERTOS_PORT = ARM_CM4F
+
+# For flash-jlink target
+JLINK_DEVICE = ATSAME51J19
+JLINK_IF = swd
+
+# flash using jlink
+flash: flash-jlink