2022-03-09 12:58:15 +00:00
|
|
|
DEPS_SUBMODULES += hw/mcu/renesas/fsp lib/CMSIS_5
|
|
|
|
|
2023-06-30 14:52:04 +07:00
|
|
|
FSP_RA = hw/mcu/renesas/fsp/ra/fsp
|
2022-03-09 12:58:15 +00:00
|
|
|
include $(TOP)/$(BOARD_PATH)/board.mk
|
|
|
|
|
2023-08-01 15:33:15 +07:00
|
|
|
# Don't include options setting in .bin file since it create unnecessary large file due to padding
|
2023-08-01 13:16:37 +07:00
|
|
|
OBJCOPY_BIN_OPTION = --only-section .text --only-section .data --only-section .rodata --only-section .bss
|
|
|
|
|
2023-07-07 16:24:22 +07:00
|
|
|
# Default to port 0 fullspeed, board with port 1 highspeed should override this in board.mk
|
|
|
|
PORT ?= 0
|
|
|
|
|
2022-03-09 12:58:15 +00:00
|
|
|
CFLAGS += \
|
2023-08-01 15:33:15 +07:00
|
|
|
-flto \
|
2023-06-24 18:38:41 +07:00
|
|
|
-DCFG_TUSB_MCU=OPT_MCU_RAXXX \
|
2023-07-07 16:24:22 +07:00
|
|
|
-DBOARD_TUD_RHPORT=$(PORT) \
|
2022-03-09 12:58:15 +00:00
|
|
|
-Wno-error=undef \
|
|
|
|
-Wno-error=strict-prototypes \
|
|
|
|
-Wno-error=cast-align \
|
|
|
|
-Wno-error=cast-qual \
|
|
|
|
-Wno-error=unused-but-set-variable \
|
|
|
|
-Wno-error=unused-variable \
|
|
|
|
-nostdlib \
|
|
|
|
-nostartfiles \
|
|
|
|
-ffreestanding
|
|
|
|
|
2023-07-07 16:24:22 +07:00
|
|
|
ifeq ($(PORT), 1)
|
|
|
|
CFLAGS += -DBOARD_TUD_MAX_SPEED=OPT_MODE_HIGH_SPEED
|
|
|
|
$(info "Using PORT 1 HighSpeed")
|
|
|
|
else
|
|
|
|
CFLAGS += -DBOARD_TUD_MAX_SPEED=OPT_MODE_FULL_SPEED
|
|
|
|
$(info "Using PORT 0 FullSpeed")
|
|
|
|
endif
|
|
|
|
|
2022-03-09 12:58:15 +00:00
|
|
|
SRC_C += \
|
2023-03-16 11:03:08 +07:00
|
|
|
src/portable/renesas/rusb2/dcd_rusb2.c \
|
|
|
|
src/portable/renesas/rusb2/hcd_rusb2.c \
|
2023-08-01 17:03:07 +07:00
|
|
|
src/portable/renesas/rusb2/rusb2_common.c \
|
2023-06-30 14:52:04 +07:00
|
|
|
$(FSP_RA)/src/bsp/cmsis/Device/RENESAS/Source/startup.c \
|
|
|
|
$(FSP_RA)/src/bsp/cmsis/Device/RENESAS/Source/system.c \
|
|
|
|
$(FSP_RA)/src/bsp/mcu/all/bsp_clocks.c \
|
|
|
|
$(FSP_RA)/src/bsp/mcu/all/bsp_common.c \
|
|
|
|
$(FSP_RA)/src/bsp/mcu/all/bsp_delay.c \
|
|
|
|
$(FSP_RA)/src/bsp/mcu/all/bsp_group_irq.c \
|
|
|
|
$(FSP_RA)/src/bsp/mcu/all/bsp_guard.c \
|
|
|
|
$(FSP_RA)/src/bsp/mcu/all/bsp_io.c \
|
|
|
|
$(FSP_RA)/src/bsp/mcu/all/bsp_irq.c \
|
|
|
|
$(FSP_RA)/src/bsp/mcu/all/bsp_register_protection.c \
|
|
|
|
$(FSP_RA)/src/bsp/mcu/all/bsp_rom_registers.c \
|
|
|
|
$(FSP_RA)/src/bsp/mcu/all/bsp_sbrk.c \
|
|
|
|
$(FSP_RA)/src/bsp/mcu/all/bsp_security.c \
|
|
|
|
$(FSP_RA)/src/r_ioport/r_ioport.c \
|
2022-03-09 12:58:15 +00:00
|
|
|
|
|
|
|
INC += \
|
2023-03-11 08:23:21 +07:00
|
|
|
$(TOP)/lib/CMSIS_5/CMSIS/Core/Include \
|
2022-03-09 12:58:15 +00:00
|
|
|
$(TOP)/$(BOARD_PATH) \
|
|
|
|
$(TOP)/$(BOARD_PATH)/fsp_cfg \
|
2023-07-01 17:08:20 +07:00
|
|
|
$(TOP)/$(BOARD_PATH)/fsp_cfg/bsp \
|
2023-07-01 12:40:56 +07:00
|
|
|
$(TOP)/$(FSP_RA)/src/bsp/cmsis/Device/RENESAS/Include \
|
2023-06-30 14:52:04 +07:00
|
|
|
$(TOP)/$(FSP_RA)/inc \
|
|
|
|
$(TOP)/$(FSP_RA)/inc/api \
|
|
|
|
$(TOP)/$(FSP_RA)/inc/instances \
|
2023-07-03 13:09:43 +07:00
|
|
|
$(TOP)/$(FSP_RA)/src/bsp/mcu/all \
|
2023-06-30 14:52:04 +07:00
|
|
|
$(TOP)/$(FSP_RA)/src/bsp/mcu/$(MCU_VARIANT) \
|
2022-03-09 12:58:15 +00:00
|
|
|
|
2023-07-01 16:40:47 +07:00
|
|
|
ifndef LD_FILE
|
|
|
|
LD_FILE = $(FAMILY_PATH)/linker/gcc/$(MCU_VARIANT).ld
|
|
|
|
endif
|
2022-03-09 12:58:15 +00:00
|
|
|
|
2023-07-28 19:01:12 +07:00
|
|
|
LDFLAGS += -L$(TOP)/$(FAMILY_PATH)/linker/gcc
|
|
|
|
|
2022-03-09 12:58:15 +00:00
|
|
|
# For freeRTOS port source
|
|
|
|
# hack to use the port provided by renesas
|
2023-06-30 14:52:04 +07:00
|
|
|
FREERTOS_PORTABLE_SRC = $(FSP_RA)/src/rm_freertos_port
|