Skip to content

Commit

Permalink
update make build for ra
Browse files Browse the repository at this point in the history
  • Loading branch information
hathach committed Dec 13, 2024
1 parent ec2f2f3 commit 4b39ecc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
2 changes: 0 additions & 2 deletions hw/bsp/ra/boards/portenta_c33/board.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
CPU_CORE = cortex-m33
MCU_VARIANT = ra6m5

LD_FILE = ${BOARD_PATH}/${BOARD}.ld

# Port 1 is highspeed
PORT ?= 1

Expand Down
2 changes: 0 additions & 2 deletions hw/bsp/ra/boards/uno_r4/board.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
CPU_CORE = cortex-m4
MCU_VARIANT = ra4m1

LD_FILE = ${BOARD_PATH}/${BOARD}.ld

# For flash-jlink target
JLINK_DEVICE = R7FA4M1AB

Expand Down
2 changes: 1 addition & 1 deletion hw/bsp/ra/family.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ function(add_board_target BOARD_TARGET)
${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
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/boards/${BOARD}/ra_gen/pin_data.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/boards/${BOARD}/ra_gen/common_data.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/boards/${BOARD}/ra_gen/pin_data.c
)

target_compile_options(${BOARD_TARGET} PUBLIC
Expand Down
16 changes: 9 additions & 7 deletions hw/bsp/ra/family.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
DEPS_SUBMODULES += hw/mcu/renesas/fsp lib/CMSIS_5

FSP_RA = hw/mcu/renesas/fsp/ra/fsp
include $(TOP)/$(BOARD_PATH)/board.mk

Expand Down Expand Up @@ -37,6 +35,8 @@ SRC_C += \
src/portable/renesas/rusb2/dcd_rusb2.c \
src/portable/renesas/rusb2/hcd_rusb2.c \
src/portable/renesas/rusb2/rusb2_common.c \
${BOARD_PATH}/ra_gen/common_data.c \
${BOARD_PATH}/ra_gen/pin_data.c \
$(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 \
Expand All @@ -53,10 +53,11 @@ SRC_C += \
$(FSP_RA)/src/r_ioport/r_ioport.c \

INC += \
$(TOP)/lib/CMSIS_5/CMSIS/Core/Include \
$(TOP)/$(BOARD_PATH) \
$(TOP)/$(BOARD_PATH)/fsp_cfg \
$(TOP)/$(BOARD_PATH)/fsp_cfg/bsp \
$(TOP)/$(BOARD_PATH)/ra_cfg/fsp_cfg \
$(TOP)/$(BOARD_PATH)/ra_cfg/fsp_cfg/bsp \
$(TOP)/$(BOARD_PATH)/ra_gen \
$(TOP)/lib/CMSIS_6/CMSIS/Core/Include \
$(TOP)/$(FSP_RA)/src/bsp/cmsis/Device/RENESAS/Include \
$(TOP)/$(FSP_RA)/inc \
$(TOP)/$(FSP_RA)/inc/api \
Expand All @@ -65,10 +66,11 @@ INC += \
$(TOP)/$(FSP_RA)/src/bsp/mcu/$(MCU_VARIANT) \

ifndef LD_FILE
LD_FILE = $(FAMILY_PATH)/linker/gcc/$(MCU_VARIANT).ld
LD_FILE = $(BOARD_PATH)/script/fsp.ld
endif

LDFLAGS += -L$(TOP)/$(FAMILY_PATH)/linker/gcc
LDFLAGS += -L$(TOP)/$(BOARD_PATH)/script
LDFLAGS += -Wl,--defsym=end=__bss_end__

# For freeRTOS port source
# hack to use the port provided by renesas
Expand Down

0 comments on commit 4b39ecc

Please sign in to comment.