Monsoon的专栏

uClinux/streaming

用户操作
[即时聊天] [发私信] [加为好友]
gstreamerID:gstreamer
6307次访问,排名15523(1)好友0人,关注者1
gstreamer的文章
原创 3 篇
翻译 0 篇
转载 6 篇
评论 24 篇
最近评论
文章分类
收藏
相册
存档
软件项目交易
订阅我的博客
XML聚合  FeedSky
订阅到鲜果
订阅到Google
订阅到抓虾
订阅到BlogLines
订阅到Yahoo
订阅到GouGou
订阅到飞鸽
订阅到Rojo
订阅到newsgator
订阅到netvibes

转载 Installation instructions for gdb & gdbserver on ARM7TDMI收藏

新一篇: Cross compile gdbserver and use it in ARM linux (在ARM uClinux下编译和使用gdbserver) | 旧一篇: 用 GStreamer 简化 Linux 多媒体开发(转载)

[uClinux-dev] Installation instructions for gdb & gdbserver on ARM7TDMI

Bernhard Kuhn bkuhn at lineo.com
Fri Sep 20 17:59:50 EDT 2002

 


Hi everybody!

It took me quite some time to figure out how to get gdb and gdbserver
combiled for an ARM7TDMI based uClinux target. Below, you will find
a detailed installation instruction. BTW.: Thanks to Ho Lee for
providing
usefull hints!

I have briefly tested gdb and gdbserver with a simple target program
and it seems to work fine (breakpoint setting, single stepping etc.),
but as always YMMV :-) Feedback appreciated!

best regards

Bernhard



arm-elf-gdb installation
========================

This document describes how to compile gdb and gdbserver
for ARM7TDMI uClinux targets. This desciption was tested
on RedHat 6.2 with an Atmel AT75C220-DK but should work
with other ARM7TDMI target as well - feedback appreciated!

It is assumed that you already have an arm-elf cross-compilation
toolchain installed and a recent uClinux-distribution (20010701)
running on your target.


Installation procedure
----------------------

At the very beginning, you need to define where the kernel
sources are located, i.e.:

  export KERNEL_SOURCE=$HOME/uClinux-dist/linux-2.4.x


Then, create some working directories:

  export GDB_DEVEL_PREFIX=$HOME/arm-elf-gdb
  export DEVEL_PREFIX=$GDB_DEVEL_PREFIX/usr
  export PKGDIR=$GDB_DEVEL_PREFIX/packages
  export SRCDIR=$GDB_DEVEL_PREFIX/src
  install -d $PKGDIR
  install -d $SRCDIR


Download the following files to $PKGDIR:

 
http://www.uclinux.org/~bkuhn/Toolchain/20020920/uClibc-0.9.15-Config.armnommu
  http://www.us.kernel.org/pub/linux/libs/uclibc/uClibc-0.9.15.tar.bz2
  ftp://sources.redhat.com/pub/gdb/releases/gdb-5.2.1.tar.bz2
 
http://www.uclinux.org/~bkuhn/Toolchain/20020920/patch-gdb-5.2.1-arm7tdmi-20020920
 
http://www.uclinux.org/~bkuhn/Toolchain/20020920/patch-uClinux-2.4.17-ptrace


Now, you need to patch the kernel sources:

  cd $KERNEL_SOURCE/arch/armnommu/kernel
  patch ptrace.c < $PKGDIR/patch-uClinux-2.4.17-ptrace

Recompile the kernel and deploy it to your target.


Then, build uClibc with libm disabled:

  cd $SRCDIR
  tar -xIf $PKGDIR/uClibc-0.9.15.tar.bz2
  cd uClibc-0.9.15
  cp $PKGDIR/uClibc-0.9.15-Config.armnommu Config
  make
  make install


Build gdb for arm-elf:

  cd $SRCDIR
  tar -xIf $PKGDIR/gdb-5.2.1.tar.bz2
  cd gdb-5.2.1
  patch -p1 < $PKGDIR/patch-gdb-5.2.1-arm7tdmi-20020920
  ./configure --target=arm-elf --host=i386-linux --build=i386-linux
  make

Now, strip gdb/gdb and copy it to a convenient location, i.e. to
/usr/local/bin/arm-elf-gdb


Build gdbserver for arm-elf:

  cd $SRCDIR/gdb-5.2.1/gdb/gdbserver

  chmod u+x configure
  ./configure --target=arm-linux --host=arm-linux --build=i386-linux

  mv Makefile Makefile.orig
  cat Makefile.orig | sed -e "s/CC = gcc/# CC = gcc/" | sed -e "s/CFLAGS
= -g -O2/# CFLAGS = -g -O2/" > Makefile

  mv config.h config.h.orig
  cat config.h.orig | sed -e "s/#define HAVE_SYS_REG_H 1/\/\* #undef
HAVE_SYS_REG_H 1 \/\*/" > config.h

  CC=arm-elf-gcc CFLAGS="-g -Os -nostdinc -I$DEVEL_PREFIX/include
-I/opt/uClinux/toolchain-arm-elf/lib/gcc-lib/arm-elf/2.95.3/include
-D__linux__ -D__uClinux__ -D__linux__ -D__ELF__ -DNO_MM"
XM_CLIBS="-nostdlib -L$DEVEL_PREFIX/lib -nostartfiles
$DEVEL_PREFIX/lib/crt0.o $DEVEL_PREFIX/lib/crti.o
$DEVEL_PREFIX/lib/crtn.o -lc -lgcc  -Wl,-elf2flt" make

Admitidly, this line locks ugly but works fine :-)

Finaly, deploy the gdbserver binary to your target filesystem.


Precomopiled binaries
---------------------

If you are not successfull with compiling gdb and gdbserver
yourself, you may download some precompiled binaries:

  http://www.uclinux.org/~bkuhn/Toolchain/20020920/arm-elf-gdb.bz2
  http://www.uclinux.org/~bkuhn/Toolchain/20020920/gdbserver.bz2


Bernhard Kuhn, Senior Software Engineer, Embedix Inc.
Fri Sep 20 16:42:41 CEST 2002


-- 
Bernhard Kuhn, Senior Software Engineer, Lineo Inc. (Where Open Meets
Smart)

This message resent by the uclinux-dev at uclinux.org list server http://www.uClinux.org/


 


More information about the uClinux-dev mailing list

发表于 @ 2006年09月04日 15:38:00|评论(loading...)|编辑

新一篇: Cross compile gdbserver and use it in ARM linux (在ARM uClinux下编译和使用gdbserver) | 旧一篇: 用 GStreamer 简化 Linux 多媒体开发(转载)

评论:没有评论。

发表评论  


当前用户设置只有注册用户才能发表评论。如果你没有登录,请点击登录
Csdn Blog version 3.1a
Copyright © gstreamer