rocky234

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Problem in compiling ARM code in Visual GDB #3032
    rocky234
    Participant

    Hi ,
    i have pasted the .s file,error message and make file…kindly go through the same.
    ARM_ASM_CODE is a macro which switch’s between the c-code and arm code .

    and about the flags in make file…
    kindly check which all flags to be include in make file and let me know….

    plz do the need full help

    bac.s

    CODE32
    AREA IAREAC,CODE,READONLY

    Function_1 PROC
    STMFD sp!,{r4-r8,lr}

    LDR r4, [r1]
    LDRB r7, [r3]

    ;some code

    LDR lr, |Table1|
    MOV r5, r8, ASL r5 ;r5 = b
    RSB r8, r5, r4 ;a -= b

    ;some

    MOVHI r0, r7
    LDMFDHI sp!, {r4-r8, pc}

    LDRB r3, [r4, #0]
    LDRB r5, [r4, #1]
    LDRB lr, [r4, #2]
    ADD r4, r4, #3
    STR r4, [r2, #40]
    ADD lr, lr, r5, ASL #8
    ADD lr, lr, r3, ASL #16

    ;some code

    ADD lr, lr, r12, ASL #24
    STR lr, [r0,#0]

    MOV r0, r7
    LDMFD sp!,{r4-r8, pc}

    |Table1|
    DCD array1

    |Table2|
    DCD array2

    IMPORT array1
    IMPORT array2

    EXPORT Function_1

    END

    ERROR

    1> [armeabi-v7a] Compile thumb : jniplayer <= bac.s
    1> jni/jniplayer/bac.s: Assembler messages:
    1>C:folderProjectjnijniplayerbac.s(6): error : bad instruction `code32′
    1>C:folderProjectjnijniplayerbac.s(7): error : bad instruction `area IAREAC,CODE,READONLY’
    1>C:folderProjectjnijniplayerbac.s(9): error : bad instruction `Function_1 PROC’
    1> jni/jniplayer/bac.s:17: Warning: missing operand; zero assumed
    1> jni/jniplayer/bac.s:23: Warning: missing operand; zero assumed
    1>C:folderProjectjnijniplayerbac.s(25): error : bad instruction `a -=b’
    1>C:folderProjectjnijniplayerbac.s(42): error : bad instruction `ldmfdhi sp!,{r4-r8,pc}’
    1>C:folderProjectjnijniplayerbac.s(76): error : junk at end of line, first unrecognized character is `|’
    1>C:folderProjectjnijniplayerbac.s(77): error : bad instruction `dcd TabLE1′
    1>C:folderProjectjnijniplayerbac.s(79): error : junk at end of line, first unrecognized character is `|’
    1>C:folderProjectjnijniplayerbac.s(80): error : bad instruction `dcd TabLE2′
    1>C:folderProjectjnijniplayerbac.s(83): error : bad instruction `import TabLE1′
    1>C:folderProjectjnijniplayerbac.s(84): error : bad instruction `import TabLE2′
    1>C:folderProjectjnijniplayerbac.s(86): error : bad instruction `export Function_1′
    1> jni/jniplayer/bac.s.s:77: Warning: partial line at end of file ignored
    1> make.exe: *** [obj/local/armeabi-v7a/objs-debug/jniplayer/bac.s.o] Error 1

    make file

    LOCAL_PATH := $(call my-dir)

    #
    # jniplayer.so
    #
    include $(CLEAR_VARS)

    ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
    #staticlib: $(LIB)

    #CC := armcc
    #AR := ar
    #AS := as
    LENT_CFLAGS := -DARCH_ARM=1 -DHAVE_NEON=1 -DARM_ASM_CODE=1
    #OBJDIR_ASM := obj_asm
    endif
    ifeq ($(TARGET_ARCH_ABI), x86)
    LENT_CFLAGS := -DARCH_X86_32=1
    endif

    LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lenthevcdec/ $(LOCAL_PATH)/../../../../../../ $(LOCAL_PATH)/../ffmpeg-2.0/ $(LOCAL_PATH)/../jniplayer/

    LOCAL_SRC_FILES := jniplayer.cpp jni_utils.cpp yuv2rgb565.cpp gl_renderer.cpp f1.c f2.c

    LOCAL_SRC_FILES := bac.s cas.s

    LOCAL_LDLIBS := -llog -lz -ljnigraphics -lGLESv2 #-larmar_lib

    OBJS_ASM := ${LOCAL_SRC_FILES:%.s=%.o}
    OBJS_ASM := ${OBJS_ASM:%=$(OBJDIR_ASM)/%}

    LOCAL_CFLAGS += $(LENT_CFLAGS)
    LOCAL_CFLAGS += -mfpu=neon
    #LOCAL_CFLAGS += CC := gcc
    #LOCAL_CFLAGS += AR = ar
    #LOCAL_CFLAGS += armcc

    LOCAL_SHARED_LIBRARIES := ffmpeg lenthevcdec

    LOCAL_MODULE := jniplayer

    include $(BUILD_SHARED_LIBRARY)

Viewing 1 post (of 1 total)