Forum: ARM programming with GCC/GNU tools ndk r10d support for ARM SMC

von Shahin A. (Company: Infosecure) (shahin)

Rate this post
0 useful
not useful
I have seen threads about this issue here, and I have tried the 
suggested fixes but I still get the same error. Basically I am using 
above version of ndk to compile a sample project composed of C and 
assembly files. I get the following error:

/tmp/ccEEI8oF.s: Assembler messages:
/tmp/ccEEI8oF.s:16: Error: selected processor does not support ARM mode 
`smc #0'
make: *** [obj/local/armeabi/objs/hello_tz/main_normal.o] Error 1

I have tried changing the -march=armv7-a. But I still get the error. 
Here is a copy of my Android.mk file:

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# give module name
APP_PLATFORM := android-18
LOCAL_MODULE := hello_tz
$(warning This is in NDK_ROOT $(NDK_ROOT))
APP_ABI := armeabi-v7a
#LOCAL_CFLAGS := -mcpu=cortex-m3 -mthumb -march=armv7-a 
#LOCAL_CFLAGS := -mcpu=cortex-a15 -march=armv7-a
LOCAL_CFLAGS := -march=armv7-a -D__ASSEMBLY__ -mabi=aapcs-linux 
-gdwarf-2 -Wall -Wundef -Wstrict-prototypes -Wno-trigrap
hs -fno-strict-aliasing -fno-common 
-Werror-implicit-function-declaration -Wno-format-security 
checks -Os -Wno-maybe-uninitialized -marm -fno-dwarf2-cfi-asm 
-fstack-protector -mabi=aapcs-linux -mno-thumb-interwork -
funwind-tables -D__LINUX_ARM_ARCH__=7 -mcpu=cortex-a15 -msoft-float 
-Uarm -Wframe-larger-than=1024 -Wno-unused-but-set-v
ariable -fomit-frame-pointer -g -Wdeclaration-after-statement 
-Wno-pointer-sign -fno-strict-overflow -fconserve-stack -D
# list your C files to compile
FILE_LIST := $(patsubst %.c,%.c.arm,$(wildcard $(LOCAL_PATH)/*.c))
#$(warning here is what is in FILE_LIST after an attempt to collect all 
the C files$(FILE_LIST))
FILE_LIST += $(wildcard $(LOCAL_PATH)/*.s)
#$(warning here is what is in FILE_LIST after an attempt to collect all 
the S files$(FILE_LIST))
# this option will build executables instead of building library for 
android application.


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.