Linux(Ubuntu)安装Trace32

  Trace32-ICD是目前功能最强大的仿真器,支持各种CPU,包括ARM/X86等。Trace32是德国lauterbach公司的产品,功能强大,支持各种操作系统调试,如linux/vxworks/wince等,不过价格也比较高,要3-5万RMB,现在也有些仿制的Trace(如Trace32-ICP),价格比较便宜,大概1万多RMB。Trace32由于其功能强大,特别适合大型嵌入式软件开发(包括操作系统的)。

   Trace32仿真器包括硬件仿真器Trace32-ICD和调试软件Trace32, 调试软件Trace32可以支持多种操作系统,包括WINDOWS/LINUX/SOLARIS/HP-UX等。以前其在windows下用过Trace32,安装和使用相对简单; 最近因要在Linux(Ubuntu)下开发,需要在ubuntu下使用Trace32, 这里把Linux下的Trace32安装要点写来,供参考:

 

 1.首先要仔细看安装盘下的readme.txt文件,里面写了在pc_linux下的安装步骤,如下:

INSTALLATION ON PC_LINUX
 
Copy  the  /files  directory structure  from the CD to your disk.
The utility "filecvt" should be used to convert the files to unix format.
The host specific files can be found in the /bin/pc_linux directory.
 
 1.   mount /mnt/cdrom
 2.   mkdir /home/t32        (or similar)
      mkdir /home/t32/bin
      cd    /home/t32
 3.   cp -r /mnt/cdrom/files/*                 .
      cp -r /mnt/cdrom/bin/pc_linux            ./bin
      cp    /mnt/cdrom/bin/pc_linux/config.t32 .
      chmod -R u+w *
 4.   /home/t32/bin/pc_linux/filecvt /home/t32
 5.   Install the Acrobat Reader from http://www.adobe.com if it isn't already installed on the system
 6.   Set the environment variable "ACROBAT_PATH" to the Acrobat installation path
      export ACROBAT_PATH=/opt/Acrobat5
 7.   Copy the Trace32 plugin to the plug_ins folder of Acrobat Reader
      cp /mnt/cdrom/bin/pc_linux/trace32.api $ACROBAT_PATH/Reader/intellinux/plug_ins
 8.   Please refer the installation manual for 
      - TRACE32 font installation 
      - setting of TRACE32 environment variables
      - modifying the TRACE32 configuration file config.t32
      - usage of USB interface (hotplug interface)
 
The steps from point 8. about installing the fonts, setting environment variables, the
modification of file config.t32 and USB interface usage are necessary !!!
Please refer the installation guide in the manual for details.

 

2. 安装好之后还需要安装trace32的usb驱动,这样才能在linux下识别Trace32-ICD,如下:

Trace32ubuntu 上会抓不到USB device ,为ubuntu USB device 默认不会建立相容目录/proc/bus/usb.

修改/etc/init.d/mountdevsubfs.sh , 添加如下脚本:

#
# Magic to make /proc/bus/usb work
#
mkdir -p /dev/bus/usb/.usbfs
domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount --rbind /dev/bus/usb /proc/bus/usb


然后建立system groupusb 的使用者
sudo addgroup --system usbusers
# Output GID 123 //注:GID以实际输出为准

#
加入USERusbusers 群组.
sudo adduser $USER usbusers

#
修改/etc/fstab:
sudo vim /etc/fstab

#
加上这一行.

# 123
"usbusers"GID

none /proc/bus/usb usbfs devgid=123,devmode=664 0 0

重启PC之后, 执行t32usbchecker , 看是否能成功找到trace32


# ./t32usbchecker

Trace32 simple USB Checker

Checking /proc/bus/usb/001/001 ... not useable
Checking /proc/bus/usb/001/004 ... not useable
Checking /proc/bus/usb/001/005 ... not useable
Checking /proc/bus/usb/001/006 ... not useable
Checking /proc/bus/usb/001/007 ... not useable
Checking /proc/bus/usb/002/001 ... not useable
Checking /proc/bus/usb/003/001 ... not useable
Checking /proc/bus/usb/004/001 ... not useable
Checking /proc/bus/usb/004/003 ... useable

Checking USB communication with /proc/bus/usb/004/003 ...
Resetting Trace32...

USB communication OK.

 

3.配置config.t32文件,该文件在安装后的目录下,trace32启动时自动读取该配置文件

详细设置参考帮助文档,这里只是简单说明一下类型配置:

PBI=

这里的PBI是配置trace32仿真器类型的,包括SIM/USB/NET等,SIM表示纯软件仿真,不需要Trace32-ICD; USB表示使用USB接口的仿真器;

而NET表示使用网络接口的仿真器。如:

PBI=

USB

 

4.启动Trace32,先接好Trace32-ICD和JTAG

在安装目录下,如/opt/trace32/bin/pc_linux有各种CPU类型的可执行文件,根据不同的CPU类型来选择对应的文件启动,

如ARM仿真就选择t32marm,如下:

$t32marm &

执行该命令后,程序会自动去读取配置文件config.t32,也可以设置别的文件,如:

$t32marm -c configsim.t32



 

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值