summaryrefslogtreecommitdiff
path: root/hw/bsp/rx/family.mk
blob: a357460e8c20c087cbb65bc70340c6e763aff49c (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
# Cross Compiler for RX
CROSS_COMPILE = rx-elf-

include $(TOP)/$(BOARD_PATH)/board.mk

CFLAGS += \
  -nostartfiles \
  -ffunction-sections \
  -fdata-sections \
  -fshort-enums \
  -mlittle-endian-data \
  -DSSIZE_MAX=__INT_MAX__

# suppress warning caused by vendor mcu driver
CFLAGS += -Wno-error=redundant-decls

LDFLAGS += -specs=nosys.specs -specs=nano.specs

SRC_C += \
	src/portable/renesas/rusb2/dcd_rusb2.c \
	src/portable/renesas/rusb2/hcd_rusb2.c \
	src/portable/renesas/rusb2/rusb2_common.c \
	$(MCU_DIR)/vects.c \
	$(FAMILY_PATH)/family.c

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

SRC_S += $(MCU_DIR)/start.S

$(BUILD)/$(PROJECT).mot: $(BUILD)/$(PROJECT).elf
	@echo CREATE $@
	$(OBJCOPY) -O srec -I elf32-rx-be-ns $^ $@

# flash using rfp-cli
flash-rfp: $(BUILD)/$(PROJECT).mot
	rfp-cli -device rx65x -tool e2l -if fine -fo id FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -auth id FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -auto $^