-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile.opta-analog
45 lines (36 loc) · 1.57 KB
/
Makefile.opta-analog
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
TOP ?= $(TINYUSB_ROOT)
BOARD ?= uno_r4
# run
# python tools/get_deps.py ra
# once in the tinyusb root folder
include $(TOP)/examples/build_system/make/make.mk
INC += \
src \
$(TOP)/hw \
EXAMPLE_SOURCE += $(wildcard src/*.c)
FSP_SOURCE += $(TOP)/hw/mcu/renesas/fsp/ra/fsp/src/r_flash_lp/r_flash_lp.c
CFLAGS += -DFLASH_LP_CFG_CODE_FLASH_PROGRAMMING_ENABLE -DFLASH_LP_CFG_DATA_FLASH_PROGRAMMING_ENABLE
CFLAGS += -DUSB_PID=0x0171 -DBOARD_NAME=\"OPTA\ ANALOG\ V2.0\"
CFLAGS += -DLED_FADE_PWM_OUT_A=1 -DLED_FADE_PWM_OUT_B=0 -DLED_FADE_PWM_CHANNEL=6 -DLED_TIMER_SOURCE_DIV=2
CFLAGS += -DLED_FADE_GPIO=BSP_IO_PORT_04_PIN_11
CFLAGS += -DCODE_FLASH_DESCRIPTOR=\"@CodeFlash\ /0x00000000/8*2Ka,120*2Kg\"
CFLAGS += -DBOSSA_LOADER=1
CFLAGS += -DDFU_LOADER
CFLAGS += -DOVERRIDE_VECTOR_TABLE=1
CFLAGS += -DBOSSA_TX_PIN=BSP_IO_PORT_03_PIN_02
CFLAGS += -DBOSSA_RX_PIN=BSP_IO_PORT_03_PIN_01
CFLAGS += -DBOSSA_UART_CHANNEL=2
CFLAGS += -DBOSSA_PERIPHERAL_FLAGS=IOPORT_PERIPHERAL_SCI0_2_4_6_8
FSP_SOURCE += $(TOP)/hw/mcu/renesas/fsp/ra/fsp/src/r_gpt/r_gpt.c
FSP_SOURCE += $(TOP)/hw/mcu/renesas/fsp/ra/fsp/src/r_sci_uart/r_sci_uart.c
FSP_SOURCE += $(TOP)/hw/mcu/renesas/fsp/ra/fsp/src/r_dtc/r_dtc.c
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
SRC_C += $(FSP_SOURCE)
CFLAGS += -Os -flto
CFLAGS += -ffunction-sections -fdata-sections
LDFLAGS += -Wl,--gc-sections -flto
CFLAGS += --warn-no-undef
# because compiled with BOSSA_LOADER some usb initializion are missing
CFLAGS += -Wno-error=null-dereference
include $(TOP)/examples/build_system/make/rules.mk
LD_FILE = $(FAMILY_PATH)/linker/gcc/$(MCU_VARIANT).ld