In the makefile, I modified some of them so that you could just change the value of VH to support virtual hosting. The key ideas are 1) Add -mvh to LDFLAGS 2) Comment/Remove the code for do_printf.c annd printf.c --------------------------- In the makefile, at around line 8, add # VH --> virtual hosting feature, could be 0 or 1 VH := 0 ---------------------------- At LD_FLAGS line, the name may be LD_FLAGS or LDFLAGS ifeq ($(VH),1) LD_FLAGS := $(OPTIM) -fno-builtin -nostartfiles -mvh -static $(CMODEL) else LD_FLAGS := $(OPTIM) -fno-builtin -nostartfiles -static $(CMODEL) endif --------------------------- take do_printf.c and printf.c off LIBC_SRC. Add another PRINTF_SRC below LIBC_SRC ifneq ($(VH),1) PRINTF_SRC := \ $(LIBC_PATH)/stdio/do_printf.c \ $(LIBC_PATH)/stdio/printf.c endif ---------------- Add PRINTF_SRC to SRCS:= SRCS := \ ${NDS32_SRC} \ ${RTOS_SRC} \ ${LIBC_SRC} \ ${${APP}_DRIVER_SRC} \ ${${APP}_LIB_SRC} \ $(PRINTF_SRC)
|