ARM tips - yszheda/wiki GitHub Wiki

References


CPU Comparison

32-bit / 64-bit

# Check CPU
cat /proc/cpuinfo
lscpu

# Check Linux kernel
arch
uname -m

# Check OS
getconf LONG_BIT

Simulator


Architect

register

GIC (Generic Interrupt Controller)

Tightly-coupled memory (TCM)


GPU

关于GPU的性能测试,可以跑一些benchmark的评测程序,比如GfxBench 3.0/3.1等,还有国内的Antutu也有一些测试GPU性能的指标。


interrupt


cross compile

EABI

$NDK_ROOT/build/tools/make-standalone-toolchain.sh --arch=arm --install-dir=/opt/android-toolchain

ldd

#!/bin/sh
arm-none-linux-gnueabi-readelf -a $1 | grep "Shared library:"

Assembler Error: register stride must be 1 or 2

invalid -march= option: `armv7-a'

Compiler is tooold. Update the compiler.

GLIBCXX_3.4.20 not found

The device uses a older libc. Use an older host cross-compiler instead. 查看设备glibc版本,找到libstdc++.so后执行:

strings /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.19 | grep GLIBCXX

libgomp.spec: No such file or directory

glibc

boost

No such file or directory

没有找到interpreter,exec系统调用失败。检查方式:

$ readelf -a <executable file> | grep interpreter
      [Requesting program interpreter: /lib/ld-linux-armhf.so.3]

selected processor does not support ARM mode

uses VFP register arguments, output does not

编译单元有的是用hardfp的EABI,有的不是(如soft、softfp),导致传参方式不一致(hardfp使用VFP寄存器传参)。改用同样EABI的交叉编译器和-mfloat-abi来编译这些编译单元即可。

ARM version

Linux kernel

debug

BKPT

gdb

$ gdbserver localhost:6000 <prog> <arg>
  • On host:
$ adb forward tcp:6000 tcp:6000
$ gdb <prog>
(gdb) target remote :6000

registers

# Display NEON registers also
info all-registers

strace

profile

DS-5

gator

gprof

SystemTap

Perf

time measuring

clock cycle

PMU

ASIMD

⚠️ **GitHub.com Fallback** ⚠️