This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

编译dvsdk_demos出现的错误无法理解,求解答,谢谢!!



我想修改demos里的示例代码,然后重新编译,现在还没修改,计划先看重新编译的情况:

先是make编译提示:

======== Building encode ========
Configuring application using encode.cfg

/bin/sh: /xs: not found
make: *** [encode_config/compiler.opt] Error 127

看Makefile文件如下:

TARGET = $(notdir $(CURDIR))

ifeq ($(VERBOSE), true)
override VERBOSE =
else
override VERBOSE = @
endif

-include $(DMAI_INSTALL_DIR)/Platform.make

# Package path for the XDC tools

XDC_PATH = $(USER_XDC_PATH);../../packages;$(DMAI_INSTALL_DIR)/packages;$(CE_INSTALL_DIR)/packages;$(FC_INSTALL_DIR)/packages;$(LINK_INSTALL_DIR)/packages;$(LINK_INSTALL_DIR);$(XDAIS_INSTALL_DIR)/packages;$(CMEM_INSTALL_DIR)/packages;$(CODEC_INSTALL_DIR)/packages;$(CE_INSTALL_DIR)/examples

# Where to output configuration files
XDC_CFG = $(TARGET)_config

# Output compiler options
XDC_CFLAGS = $(XDC_CFG)/compiler.opt

# Output linker file
XDC_LFILE = $(XDC_CFG)/linker.cmd

# Input configuration file
XDC_CFGFILE = $(TARGET).cfg

PLATFORM_OS = $(strip $(PLATFORM_OS_dm6467_al))
PLATFORM_DEVICE = $(strip $(PLATFORM_DEVICE_dm6467_al))
PLATFORM_PERIPHERALS = $(strip $(PLATFORM_PERIPHERALS_dm6467_al))
PLATFORM_XDC_TARGET = $(strip $(PLATFORM_XDC_TARGET_dm6467_al))
PLATFORM_XDC = $(strip $(PLATFORM_XDC_dm6467_al))

# The XDC configuration tool command line
#CONFIGURO = /home/dm6467t/dvsdk_3_10_00_19/xdctools_3_16_01_27/xs xdc.tools.configuro
# change by TEST
CONFIGURO = $(XDC_INSTALL_DIR)/xs xdc.tools.configuro

C_FLAGS += -Wall -g

LD_FLAGS += -lpthread -lpng -lz -ljpeg -lfreetype -lasound
LD_FLAGS += -L$(LINUXLIBS_INSTALL_DIR)/lib

COMPILE.c = $(VERBOSE) $(CC) $(C_FLAGS) $(CPP_FLAGS) -c
LINK.c = $(VERBOSE) $(CC) $(LD_FLAGS)

SOURCES = $(wildcard *.c) $(wildcard ../*.c)
HEADERS = $(wildcard *.h) $(wildcard ../*.h)

OBJFILES = $(SOURCES:%.c=%.o)

可能是上面CONFIGURO = $(XDC_INSTALL_DIR)/xs xdc.tools.configuro 的原因,但是XDC_INSTALL_DIR的设置并没有错,而且xdctools目录里也确实有xs 这个可执行文件。

于是把CONFIGURO = $(XDC_INSTALL_DIR)/xs xdc.tools.configuro改成真是无替代的脚本:

#CONFIGURO = /home/dm6467t/dvsdk_3_10_00_19/xdctools_3_16_01_27/xs xdc.tools.configuro

结果运行出现了下面的错误:

Usage: xs xdc.tools.configuro [--help]
[-v]
[-@ optionsfile]
[-o outdir]
[-b config_bld | -c codegen_dir | --cb]
[-t target] [-p platform[:instance]] [-r profile]
[-Dname=value]
[-w | -x regexp]
[--rtsName pkg_name]
[--cfgArgs args_string]
[--linkTemplate linker_template]
[--tcf] [--bios5] [--pkg]
[--compileOptions compile_options_string]
[--oc compiler.opt] [--ol linker.cmd]
infile.cfg
cat: encode_config/compiler.opt: No such file or directory
audio.c:42: fatal error: xdc/std.h: No such file or directory
compilation terminated.
make: *** [audio.o] Error 1

请教,该怎么才能重新编译demos里的源代码呢?哪里有帮助文档可以参考?

谢谢

  • Shi Gaotao,

    看起来是路径的问题。请问你是在最上层编译的demo么?

    我建议你看看Rules.make同级目录下的makefile,看能否在这一个目录下编译demo。

    http://processors.wiki.ti.com/index.php/DVSDK_3.10_Makefile_usage

  • 我是在最底层,也就是encode目录下编译的。

    如果是路径错误,为什么我把Makefile中的路径改成

    #CONFIGURO = /home/dm6467t/dvsdk_3_10_00_19/xdctools_3_16_01_27/xs xdc.tools.configuro

    却出现下面的错误?这个错误感觉像是 xs xdc.tools.configuro运行参数不对给的提示?

    Usage: xs xdc.tools.configuro [--help]
    [-v]
    [-@ optionsfile]
    [-o outdir]
    [-b config_bld | -c codegen_dir | --cb]
    [-t target] [-p platform[:instance]] [-r profile]
    [-Dname=value]
    [-w | -x regexp]
    [--rtsName pkg_name]
    [--cfgArgs args_string]
    [--linkTemplate linker_template]
    [--tcf] [--bios5] [--pkg]
    [--compileOptions compile_options_string]
    [--oc compiler.opt] [--ol linker.cmd]

    谢谢提供的资料。

  • 按照您给的这个方法已编译通过,谢谢。