Andes Workshop
https://forum.andestech.com/

Virtual hosting on FreeRTOS
https://forum.andestech.com/viewtopic.php?f=12&t=1040
Page 1 of 1

Author:  Hubert Chung [ Fri Aug 31, 2018 2:22 pm ]
Post subject:  Virtual hosting on FreeRTOS

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)

Page 1 of 1 All times are UTC + 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/