2013年9月3日 星期二

Arm Linux Debug IDE Eclipse

////////////////////// All unbuntu fourm ////////////////////////////////////
http://wiki.ubuntu-tw.org/

//////////install Vmware7.1 + Ubuntu 10.4 install Guide ////////////////////////////////////////////
http://www.vcbeta.net/read.php/424.htm
http://releases.ubuntu.com/

http://os.51cto.com/art/200901/104983.htm
http://www.cnitblog.com/aimilo2008/archive/2009/07/22/60286.html (reference red hat install)

///////// Gcc install recommand use root to work ////////////////////////////////////////////
sudo passwd root
then logout and login with root
apt-get install build-essential

/////// eclipse IDE ///////
1. install java jre
apt-get install eclipse
Prepare jdk and jre packages for c/c++ eclipse only, so go to synaptic remove contain name with eclipse package

or
add-apt-repository ppa:sun-java-community-team/sun-java6
apt-get update
apt-get install sun-java6-jdk

If meet "ca-certificates-java depends on openjdk-6-jre-headless"
then
sudo dpkg --purge bleachbit ca-certificates-java icedtea-6-plugin icedtea-netx
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer


2. download c++ eclipse
http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/SR2/eclipse-cpp-galileo-SR2-linux-gtk.tar.gz
then extact to /usr/local/eclipse,and add path to /etc/environment

/////////// eclipse arm cross compiler (recommand) ////////////////////////////////////////////
GNU ARM Eclipse Plugin software is an Eclipse CDT-managed build extension for the GNU ARM toolchain.
1.Help -> Software Updated
2.Uncheck "Group items by category"
3.http://gnuarmeclipse.sourceforge.net/updates

http://www.friendlyarm.net/downloads (arm-linux-gcc-4.3.2.tgz)

http://www.cnblogs.com/xubing/archive/2010/06/02/1749798.html
http://www.cnblogs.com/xubing/archive/2010/06/07/1752405.html
http://www.cnblogs.com/xubing/archive/2010/06/07/1753257.html

ARM GDB MODIFY
1. tar xvzf ./arm-linux-gcc-4.3.2.tgz --directory=/
extract to system root

2. setting /etc/environment add /usr/local/arm/4.3.2/bin/

Extract gdb-7.1 to /root/xxxx/gdb-7.1
1.
apt-get install build-essential libncurses5-dev
2.
./configure --target=arm-linux --prefix=/usr/local/arm-gdb
make
make install
3.
cd /xxx/gdb-7.1/gdb/gdbserver
./configure --target=arm-linux --host=arm-linux
make CC=/usr/local/arm/4.3.2/bin/arm-linux-gcc ;//use arm-linux-gcc build this project
cp gdbserver /usr/local/arm-gdb/bin

4. gdbserver 192.168.1.123:1234 mytest

http://blog.chinaunix.net/u3/104447/showart_2244531.html
http://blog.csdn.net/chinacodec/archive/2009/02/11/3877901.aspx
http://www.lupaworld.com/273398/viewspace-204220.html
http://www.fish888.com/Linux-eclipse-arm-t159746

///////FIX ECLIPSE CONSOLE WARNING///////
go to properties discovery options
compiler invocation command chnage to "arm-linux-gcc"

/////debuging gdbserver error refrence////////////////////////
1. copy
libpthread.so
libpthread.so.0
libpthread-0.10.so
libthread_db-1.0.so
libthread_db.so
libthread_db.so.1
to board /lib

2. Program received signal SIG32, Real-time event 32:
its mean
libpthread.so
libpthread.so.0
libpthread-0.10.so
libthread_db-1.0.so
libthread_db.so
libthread_db.so.1
Those are stripped files, you need not stripped files and the six arm linux file version must match, copy to /lib

3. Cannot access memory at address:
The best way is to add tracing code, so you can see how far it gets.

////////BUILD libpthread libthread_db//////////////////////////////
tar xzvf glibc-2.3.5.tar.bz2 //(tar jxvf glibc-2.3.5.tar.gz)
cd glibc-2.9
tar jxvf ../glibc-linuxthreads-2.3.5.tar.gz
cd ..
mkdir glibcsdk
cd glibcsdk
CC=arm-linux-gcc AS=arm-linux-as LD=arm-linux-ld ../glibc-2.3.5/configure --with-float=soft --without-fp --enable-shared --prefix=/usr/local/glibc-thread --build=i686-pc-linux-gnu --host=arm-linux --enable-add-ons=linuxthreads --with-headers=/usr/local/arm/arm-linux/include

make
make install

(--with-float=soft --without-fp if your arm chip not support hardware float point, using software simulator float point)

1. error: Modify configure

if test -z "$AS"; then
ac_verc_fail=yes
else
# Found it, now check the version.
{ echo "$as_me:$LINENO: checking version of $AS" >&5
echo $ECHO_N "checking version of $AS... $ECHO_C" >&6; }
ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
2.1[3-9]*)
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;

if test -z "$LD"; then
ac_verc_fail=yes
else
# Found it, now check the version.
{ echo "$as_me:$LINENO: checking version of $LD" >&5
echo $ECHO_N "checking version of $LD... $ECHO_C" >&6; }
ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
2.1[3-9]*)
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;

modify 2.1[3-9]*) to 2.[1-2][0-9]*)

2. error: version-info.h missing terminating " character
mark all glibcsdk/csu/version-info.h

3. error: `BUS_ISA' undeclared
glibc-2.x.x/sysdeps/unix/sysv/linux/arm/ioperm.c
using CTL_BUS_ISA instead of BUS_ISA

http://www.ibm.com/developerworks/cn/linux/l-embcmpl/
http://blog.chinaunix.net/u1/45185/showart_527681.html
http://blog.udn.com/panda76721/3403495
http://hi.baidu.com/linuxle/blog/item/bfa2c863ae9ebcdbe6113a77.html
http://hi.baidu.com/zzqr/blog/item/0d842d19f169f04f42a9aded.html
http://www.cublog.cn/u2/67519/showart_585985.html
http://szricky.blog.hexun.com/8738772_d.html
http://blog.csdn.net/crazyss/archive/2010/03/30/5434286.aspx
http://hi.baidu.com/balefire/blog/item/64e0dbb476e9a47f8bd4b2cf.html
http://scottmcpeak.com/memory-errors/
http://blog.chinaunix.net/u3/111323/showart_2255725.html
http://groups.google.com/group/gnu.gcc.help/browse_thread/thread/bf57821386ab800a/78d6cd3b803c2706?pli=1

/////////////////////////////////////// source download /////////////////////////////////////
http://ftp.gnu.org/gnu/

///////// apt-get command ////////////////////
apt-get install
When we know the rpm name , you can use this command to install packages such as: apt-get install httpd, so apt will automatically come back online download httpd rpm installation package if the httpd when there are dependencies, apt will automatically download and install

apt-get clean
When using apt-get install command to install package, downloaded the rpm will be placed in /var/cache/apt/archives, use apt-get clean command can be the clear, avoid taking up hard disk space

apt-get remove
If we want to remove a rpm when you can use this command, for example: apt-get remove httpd, httpd will be removed, and if the rpm package, when there are dependencies, apt will be remove

///////////////// switch user path to english path ////////////////////////
export LANG=en_US
xdg-user-dirs-gtk-update

沒有留言:

張貼留言