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.

Compilation of an ARM+DSP application on Rowboat Froyo for DM3730

Other Parts Discussed in Thread: OMAP3530, DM3730

After installing rowboat-android and ti-dvsdk_dm3730-evm_4_01_00_09 under /rowboat-android/external/ti-dsp, I've compiled the whole framework with the appropriate patches.

I've realized that in the Makefile inside /rowboat-android/external/ti-dsp the compilation line related to the codec_engine examples ("make -C $(DVSDK_INSTALL_DIR) ce_examples) is commented. When I try to comment it out, the compilation ends with different errors.

Actually, I would like just to compile and test an example application  using the ARM + DSP on my target dm3730-android. Could anyone provide me the makefile require to compile the two binary files (.xv5T and .x64P)?

Thanks in advance!

  • That portion of the Makefile for ce_examples is inherited from Linux, which and the example applications are not ported to Android.

  • Thanks for the clarification.

    Is there any other simple example ported to Android and which uses ARM+DSP?

  • There is nothing I am aware of. Currently there is no such JNI available for applications to use DSP.

  • In the youtube video "Rowboat Android on OMAP35x" (http://www.youtube.com/watch?v=AIWo1YSi6ng) we can see the application "decode" running on a development board based on OMAP35x ("DSP Accelerated Video Decode").

    I can find this application under "/ti-dvsdk_dm3730-evm_4_01_00_09/dvsdk-demos_4_00_00_21/omap3530/decode", but when I try to compile it with  a modified Makefile (see below) to cross-compile with Android toolchain, I get the following error:

    Linking decode from audio.o codecs.o display.o loader.o main.o speech.o video.o ../ctrl.o ../ui.o decode_config/linker.cmd..
    /home/pazosn/rowboat-android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/../lib/gcc/arm-eabi/4.4.0/../../../../arm-eabi/bin/ld: crt0.o: No such file: No such file or directory
    collect2: ld returned 1 exit status
    make: *** [decode] Error 1

    Could anybody help me to cross-compile this application for Android to launch it on a DM3730/OMAP3530 together with the server cs.x64P?

    Thanks in advance!

    -- Makefile used --

    ANDROID_ROOT_DIR := $(HOME)/rowboat-android

    DVSDK_INSTALL_DIR := $(ANDROID_ROOT_DIR)/external/ti-dsp/ti-dvsdk_dm3730-evm_4_01_00_09

    include $(DVSDK_INSTALL_DIR)/Rules.make

    #-------------- Bionic tools -----------------

    ANDROID_TOOLCHAIN := $(ANDROID_ROOT_DIR)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0
    ANDROID_TOOLCHAIN_PREFIX := arm-eabi-
    ANDROID_TOOLCHAIN_PATH := $(ANDROID_ROOT_DIR)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0
    ANDROID_TOOLCHAIN_LONGNAME := bin/$(ANDROID_TOOLCHAIN_PREFIX)gcc

    BIONIC_PATH := $(ANDROID_ROOT_DIR)/bionic
    BIONIC_LIBC_INCS := \
        -I$(BIONIC_PATH)/libc/arch-arm/include      \
        -I$(BIONIC_PATH)/libc/include          \
        -I$(BIONIC_PATH)/libstdc++/include      \
        -I$(BIONIC_PATH)/libc/kernel/common      \
        -I$(BIONIC_PATH)/libc/kernel/arch-arm      \
        -I$(BIONIC_PATH)/libm/include          \
        -I$(BIONIC_PATH)/libm/arch/arm/include      \
        -I$(BIONIC_PATH)/libthread_db/include

    ANDROID_PRODUCT_PATH=$(ANDROID_ROOT_DIR)/out/target/product
    ANDROID_OUT_DIR=$(ANDROID_PRODUCT_PATH)/$(TARGET_PRODUCT)


    ANDROID_CC_FLAGS :=                  \
        -DHAVE_ARM_TLS_REGISTER              \
        -DANDROID                  \
        -D_ANDROID_                  \
        -DSK_RELEASE                  \
        -DNDEBUG                  \
        -UDEBUG                      \
        -fpic                      \
        -ffunction-sections              \
        -funwind-tables                  \
        -fstack-protector              \
        -fno-short-enums              \
        -finline-functions              \
        -fno-inline-functions-called-once     \
        -fgcse-after-reload              \
        -frerun-cse-after-loop              \
        -frename-registers              \
        -fomit-frame-pointer              \
        -fno-strict-aliasing              \
        -finline-limit=64              \
        -fno-exceptions                  \
        -fmessage-length=0              \
        -march=armv7-a                  \
        -mfloat-abi=softfp              \
        -msoft-float                  \
        -mfpu=neon                  \
        -mthumb                      \
        -mthumb-interwork              \
        -W                      \
        -Wall                      \
        -Wno-unused                  \
        -Winit-self                  \
        -Wpointer-arith                  \
        -Werror=return-type              \
        -Werror=non-virtual-dtor          \
        -Werror=address                  \
        -Werror=sequence-point              \
        -Wstrict-aliasing=2              \
        -Wno-multichar                  \
        -Wno-missing-field-initializers       \
        -Os                      \
        -g

    ANDROID_CPP_FLAGS :=                  \
        $(ANDROID_CC_FLAGS)              \
        -fvisibility-inlines-hidden          \
        -fno-rtti                  \
        -Wsign-promo

    ANDROID_LD_FLAGS := \
        -lc -lstdc++ -nostdlib -Bdynamic -Wl,-rpath-link=$(ANDROID_OUT_DIR)/obj/lib -L$(ANDROID_OUT_DIR)/obj/lib -Wl,-T,$(ANDROID_ROOT_DIR)/build/core/armelf.x -Wl,-dynamic-linker,/system/bin/linker -Wl,--gc-sections -Wl,-z,nocopyreloc $(ANDROID_ROOT_DIR)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/../lib/gcc/arm-eabi/4.4.0/interwork/libgcc.a -L$(ANDROID_ROOT_DIR)/out/target/product/$(TARGET_PRODUCT)/obj/STATIC_LIBRARIES/libasound_intermediates

    ANDROID_CFLAGS=$(BIONIC_LIBC_INCS) $(ANDROID_CC_FLAGS)

    export ANDROID_TOOLCHAIN_PATH ANDROID_TOOLCHAIN_PREFIX ANDROID_TOOLCHAIN_LONGNAME ANDROID_TOOLCHAIN BIONIC_LIBC_INCS ANDROID_ROOT_DIR ANDROID_CC_FLAGS ANDROID_LD_FLAGS ANDROID_CFLAGS

    DECODE_CFLAGS = "-I.. \
        $(BIONIC_LIBC_INCS)    \
        $(ANDROID_CPP_FLAGS) \
        -DENABLE_SHAREDFD_PLAYBACK -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_CML2_CONFIG -DHAS_OSCL_LIB_SUPPORT -MD"

    DECODE_LDFLAGS = -nostdlib -Wl,-soname,libagl.so \
        -Wl,-T,$(ANDROID_ROOT_DIR)/build/core/armelf.xsc \
        -Wl,--gc-sections -Wl,-shared,-Bsymbolic -Wl,--no-whole-archive \
        -L$(ANDROID_ROOT_DIR)/out/target/product/$(TARGET_PRODUCT)/obj/lib \
        -lstdc++ -lc -lm


    ROOTDIR = ../../..
    TARGET = $(notdir $(CURDIR))

    include $(ROOTDIR)/Rules.make

    # Comment this out if you want to see full compiler and linker output.
    override VERBOSE = @

    # 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);$(XDAIS_INSTALL_DIR)/packages;$(CMEM_INSTALL_DIR)/packages;$(CODEC_INSTALL_DIR)/packages;$(LPM_INSTALL_DIR)/packages;$(C6ACCEL_INSTALL_DIR)/soc/packages;$(EDMA3_LLD_INSTALL_DIR)/packages

    # 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 (board) to build for
    XDC_PLATFORM = ti.platforms.evm3530

    # Target tools
    XDC_TARGET = gnu.targets.arm.GCArmv5T

    export CSTOOL_DIR

    # The XDC configuration tool command line
    CONFIGURO = $(XDC_INSTALL_DIR)/xs xdc.tools.configuro
    CONFIG_BLD = ../../config.bld

    CPP_FLAGS += -I$(LINUXKERNEL_INSTALL_DIR)/include -I$(LINUXKERNEL_INSTALL_DIR)/arch/arm/include -I$(ANDROID_CPP_FLAGS) -I$(DECODE_CFLAGS)
    C_FLAGS += -I$(ANDROID_CFLAGS) -I$(DECODE_CFLAGS) -Wall -g

    LD_FLAGS += -L$(LINUXLIBS_INSTALL_DIR)/lib -L$(ANDROID_LDFLAGS) -L$(DECODE_LDFLAGS) -lpthread -lasound

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

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

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

    .PHONY: clean install

    all:    o3530

    o3530:    o3530_al

    o3530_al:    $(TARGET)

    install:    $(if $(wildcard $(TARGET)), install_$(TARGET))

    install_$(TARGET):
        @install -d $(EXEC_DIR)
        @install $(TARGET) $(EXEC_DIR)
        @install $(TARGET).txt $(EXEC_DIR)
        @echo
        @echo Installed $(TARGET) binaries to $(EXEC_DIR)..

    $(TARGET):    $(OBJFILES) $(XDC_LFILE)
        @echo
        @echo Linking $@ from $^..
        $(LINK.c) -o $@ $^

    $(OBJFILES):    %.o: %.c $(HEADERS) $(XDC_CFLAGS)
        @echo Compiling $@ from $<..
        $(COMPILE.c) $(shell cat $(XDC_CFLAGS)) -o $@ $<

    $(XDC_LFILE) $(XDC_CFLAGS):    $(XDC_CFGFILE)
        @echo
        @echo ======== Building $(TARGET) ========
        @echo Configuring application using $<
        @echo
        $(VERBOSE) XDCPATH="$(XDC_PATH)" $(CONFIGURO) -o $(XDC_CFG) -t $(XDC_TARGET) -p $(XDC_PLATFORM) -b $(CONFIG_BLD) $(XDC_CFGFILE)


    clean:
        @echo Removing generated files..
        $(VERBOSE) -$(RM) -rf $(XDC_CFG) $(OBJFILES) $(TARGET) *~ *.d .dep