refactor rx6x bsp

This commit is contained in:
hathach
2021-06-28 12:49:30 +07:00
parent 17137bbfff
commit 8c4641fc05
3 changed files with 29 additions and 58 deletions
+29
View File
@@ -12,6 +12,35 @@ CFLAGS += \
-fshort-enums \
-mlittle-endian-data \
RX_NEWLIB ?= 1
ifeq ($(CMDEXE),1)
OPTLIBINC="$(shell for /F "usebackq delims=" %%i in (`where rx-elf-gcc`) do echo %%~dpi..\rx-elf\optlibinc)"
else
OPTLIBINC=$(shell dirname `which rx-elf-gcc`)../rx-elf/optlibinc
endif
ifeq ($(RX_NEWLIB),1)
CFLAGS += -DSSIZE_MAX=__INT_MAX__
else
# setup for optlib
CFLAGS += -nostdinc \
-isystem $(OPTLIBINC) \
-DLWIP_NO_INTTYPES_H
LIBS += -loptc -loptm
endif
SRC_C += \
src/portable/renesas/usba/dcd_usba.c \
$(MCU_DIR)/vects.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 $^ $@