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.

Makefile for Codec Engine

For DM355 platform (dvsdk 3.1), I am trying to add Codec Engine functions to compress YUV data into a JPEG picture. Currently, my program generates a YUV data file (2048x1536x2 bytes). Could anybody suggest on how to modify my make file so I could use CE functions like IMGENC1_control() and CERuntime_init()?

My current Make file is shown below.

KERNEL_DIR=../git
CROSS_COMPILE=arm-none-linux-gnueabi-
CMEMLIB=cmem.a470MV
INSTALL_DIR=../ramdiskfs/opt/

INCLUDES += -I$(KERNEL_DIR)/include


CC = $(CROSS_COMPILE)gcc $(INCLUDES)

all:    hirespicture

hirespicture: hirespicture.o
    $(CC) -o  hirespicture $^ $(CMEMLIB)

install:
    cp hirespicture $(INSTALL_DIR)

clean:
    rm -f *.o *~
    rm -f hirespicture

If it matters, I have added the following two #include lines to my code (taken from dvtb).


#include <ti/sdo/ce/image1/imgenc1.h>
#include <ti/sdo/codecs/jpegenc/ijpegenc.h>

 

  • OK. I've followed an example and got this version of makefile... and it does not work.

    # Makefile for IPIPE applications

    include ../dvsdk_3_10_00_19/Rules.make

    KERNEL_DIR=../git
    CROSS_COMPILE=arm-none-linux-gnueabi-
    CMEMLIB=cmem.a470MV
    INSTALL_DIR=../ramdiskfs/opt/

    # [CE] add the examples repository to the package path.
    # This is necessary because this application's configuration uses the codecs
    # in the examples repository
    XDC_PATH = $(CE_INSTALL_DIR)/examples;$(FC_INSTALL_DIR)/packages;$(CE_INSTALL_DIR)/packages;$(XDAIS_INSTALL_DIR)/packages;$(CMEM_INSTALL_DIR)/packages;$(CODEC_INSTALL_DIR)/packages;

    #XDC_PATH := $(EXAMPLES_ROOTDIR);$(XDC_PATH)

    # [CE] Configuro settings.  CONFIGPKG is the basename of your application's
    # config script
    CONFIGPKG = local
    CONFIG_BLD := ./config.bld
    # [CE] Name the xdc platform
    XDCPLATFORM = ti.platforms.evmDM355

    # [CE] configuro-generated files
    COMPILER_FILE = $(CONFIGPKG)/compiler.opt
    LINKER_FILE = $(CONFIGPKG)/linker.cmd

    # [CE] The path to the configuro utility
    CONFIGURO = XDCPATH="$(XDC_PATH)" $(XDC_INSTALL_DIR)/xs xdc.tools.configuro

    #CONFIGURO = XDCPATH="$(XDC_PATH)" XDCARGS=$(XDCARGS) $(XDC_INSTALL_DIR)/xs xdc.tools.configuro


    #INCLUDES += -I$(KERNEL_DIR)/include

    INCLUDES += -I $(LINUXKERNEL_INSTALL_DIR)/include -I $(XDAIS_INSTALL_DIR)/packages/ti/xdais/include -I $(LINUXLIBS_INSTALL_DIR)/include

    INCLUDES += -I$(FC_INSTALL_DIR)/packages -I$(CE_INSTALL_DIR)/packages -I $(XDAIS_INSTALL_DIR)/packages -I$(LINK_INSTALL_DIR)/packages



    # [CE] Augment the standard $(CPPFLAGS) variable, adding the
    # Configuro-generated compiler file.
    CPPFLAGS +=  $(shell cat $(COMPILER_FILE)) -g -Wall -Os

    CC = $(CROSS_COMPILE)gcc $(INCLUDES)
    #$(INCLUDES) $(shell cat $(COMPILER_FILE)) -g -Wall -Os

    all:    hirespicture


    # [CE] The generated linker and compiler files depend on the generated
    # config package
    $(LINKER_FILE) $(COMPILER_FILE) : $(CONFIGPKG)

    # [CE] The generated config package depends on the config script
    # Only need to set platform (-p option).  The target (-t) and codegen (-c) are
    # set in config.bld (-b)
    $(CONFIGPKG) : $(CONFIGPKG).cfg
        $(CONFIGURO) -o $(CONFIGPKG) \
            -p $(XDCPLATFORM) -b $(CONFIG_BLD) $<

    %.o : %.c $(COMPILER_FILE)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<

    hirespicture: hirespicture.o $(LINKER_FILE)
        $(CC) -o $@ $^ -lpthread

    #hirespicture: hirespicture.o
    #    $(CC) -o  hirespicture $^ $(CMEMLIB)

    install:
        cp hirespicture $(INSTALL_DIR)

    clean:
        rm -f *.o *~
        rm -f hirespicture

     

    I get the following message (see below). What's wrong?

    XDCPATH="/home/vmplanet/dvsdk/dvsdk_3_10_00_19/codec_engine_2_25_05_16/examples;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/framework_components_2_25_02_06/packages;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/codec_engine_2_25_05_16/packages;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/xdais_6_25_02_11/packages;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/linuxutils_2_25_04_10/packages;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/dm355_codecs_03_10_00_02/packages;" /home/vmplanet/dvsdk/dvsdk_3_10_00_19/xdctools_3_16_01_27/xs xdc.tools.configuro -o local \
        -p ti.platforms.evmDM355 -b ./config.bld local.cfg
    making package.mak (because of package.bld) ...
    js: "./config.bld", line 3: Error: Can't find import file: '/home/vmplanet/dvsdk/example355/config.bld' (not found along '/home/vmplanet/dvsdk/example355/local/;.;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/codec_engine_2_25_05_16/examples;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/framework_components_2_25_02_06/packages;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/codec_engine_2_25_05_16/packages;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/xdais_6_25_02_11/packages;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/linuxutils_2_25_04_10/packages;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/dm355_codecs_03_10_00_02/packages;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/xdctools_3_16_01_27/packages;..;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/xdctools_3_16_01_27;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/xdctools_3_16_01_27/etc;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/xdctools_3_16_01_27/include;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/xdctools_3_16_01_27/packages')
    making package.mak (because of package.bld) ...
    js: "./config.bld", line 3: Error: Can't find import file: '/home/vmplanet/dvsdk/example355/config.bld' (not found along '/home/vmplanet/dvsdk/example355/local/;.;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/codec_engine_2_25_05_16/examples;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/framework_components_2_25_02_06/packages;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/codec_engine_2_25_05_16/packages;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/xdais_6_25_02_11/packages;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/linuxutils_2_25_04_10/packages;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/dm355_codecs_03_10_00_02/packages;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/xdctools_3_16_01_27/packages;..;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/xdctools_3_16_01_27;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/xdctools_3_16_01_27/etc;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/xdctools_3_16_01_27/include;/home/vmplanet/dvsdk/dvsdk_3_10_00_19/xdctools_3_16_01_27/packages')
    gmake: *** No rule to make target `.configuro'.  Stop.
    js: "/home/vmplanet/dvsdk/dvsdk_3_10_00_19/xdctools_3_16_01_27/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    make: *** [local] Error 1
  • Hi, I have encountered the similar error. Did you fix it?

  • Could you offer more details of the issue you faced and the error you got ?