aboutsummaryrefslogtreecommitdiff
path: root/circuitpython/lib/tinyusb/hw/bsp/f1c100s/board.mk
blob: 5fe26a9ea2564099cd1a5f6a2f6759293ca05b1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
DEPS_SUBMODULES += hw/mcu/allwinner

DEFINES += -D__ARM32_ARCH__=5 -D__ARM926EJS__

CFLAGS += \
  -ffreestanding \
  -std=gnu99 \
  -march=armv5te \
  -mtune=arm926ej-s \
  -mfloat-abi=soft \
  -marm \
  -mno-thumb-interwork \
  -Wno-unused-parameter \
  -Wno-float-equal \
  -DCFG_TUSB_MCU=OPT_MCU_F1C100S \
  -Wno-error=cast-align \
  -Wno-error=address-of-packed-member \
  $(DEFINES)

LD_FILE = hw/mcu/allwinner/f1c100s/f1c100s.ld
LDFLAGS += -nostdlib -lgcc
MCU_DIR = hw/mcu/allwinner/f1c100s

SRC_C += \
	src/portable/sunxi/dcd_sunxi_musb.c \
	$(MCU_DIR)/machine/sys-uart.c \
	$(MCU_DIR)/machine/exception.c \
	$(MCU_DIR)/machine/sys-clock.c \
	$(MCU_DIR)/machine/sys-copyself.c \
	$(MCU_DIR)/machine/sys-dram.c \
	$(MCU_DIR)/machine/sys-mmu.c \
	$(MCU_DIR)/machine/sys-spi-flash.c \
	$(MCU_DIR)/machine/f1c100s-intc.c \
	$(MCU_DIR)/lib/malloc.c \
	$(MCU_DIR)/lib/printf.c 

SRC_S += \
  $(MCU_DIR)/machine/start.S \
	$(MCU_DIR)/lib/memcpy.S \
	$(MCU_DIR)/lib/memset.S

INC += \
	$(TOP)/$(MCU_DIR)/include \
	$(TOP)/$(BOARD_PATH)

# flash target using xfel
flash: flash-xfel

exec: $(BUILD)/$(PROJECT).bin
	xfel ddr 
	xfel write 0x80000000 $<
	xfel exec 0x80000000