分类: LINUX
2010-05-27 22:41:21
在写论文的过程中产生了如下疑问:
1.GDB/ARMulator分别指GDB和ARMulator,还是GDB/ARMulator就是一个仿真器
2.configure uClinux for GDB/ARMulator后,为什么后面使用的是skyeye. Skyeye就是某一种GDB/ARMulator吗?
3.GDB/ARMulator或者skyeye到底是用来模拟CPU的还是来模拟板子上的硬件的。
通过在网上查找资料后,帮我明确了很多概念,同时问题也得到了解答。可以总结如下:
l 从第五章build uClinux/资料/why use an emulator 0519中学习到:
1.a good emulator choice should closely emulate the target CPU
2.the closer an emulator is to the target hardware the better.
也就是说一个模拟器/仿真器不仅仅可以模拟CPU,还可以模拟硬件
l 通过:GDB/ARMulator学习笔记学习到。网址如下:
linuxforum.net/forum/showthreaded.php?Cat=&Board=program&Number=499014&page=0&view=collapsed&sb=5&o=all
GDB/ARMulator是GDB自带的一个Armulator(ARM模拟器,实际上应该是有不止一个软件包含这个功能,例如ADS,他们都叫Armulator),不过我查看GDB的源代码都是对ARM6的模拟,而现在比较常见的是打过uclinux开发组patch的GDB/ARMulator,这样这个模拟器主要就是对Atmel AT91扳进行了模拟。
1.GDB/ARMulator编译安装和基本使用
1.1.编译安装
首先是在上面提到的地址下载到GDB代码以及patch,然后:
tar vxjf gdb-5.0.tar.bz2
gunzip < gdb-5.0-uclinux-armulator-20021127.patch.gz | patch -p0
cd gdb-5.0
./configure --target=arm-elf --prefix=/usr/local --without-gtk-prefix --without-gtk-exec-prefix --disable-gtktest
make
make install
1.2.基本使用
将你做好的文件系统镜象文件改名为boot.rom,做软连接也可以,然后在这个目录中:
arm-elf-gdb linux.2.6.x -----------读入linux kernel
target sim -----------启动GDB自带的simulator
load ----------- 将linux kernel加载到simulator的内存中
run ----------- 开始模拟
这样你就能看见uclinux在模拟器上跑起来了。
###########################################################################
而在我们的毕设中,并没有采用GDB自带的simulator。因为下载了GDB后直接编译安装并没有打过补丁。GDB是单纯的作为debugger来使用。而后安装的skyeye是作为单独的simulator来使用。不过区别的是要启动skyeye这个simulator,需要再GDB下运行target remote localhost:12345。而不是target sim。如果是用GDB+SKYEYE,执行方法如下:
arm-elf-gdb /home/ciuciu/test5/uClinux-dist/linux-2.6.x/linux ------------读入linux kernel
target remote localhost:12345 ---------连接上已经启动的skyeye
load ---------将内核加载到skyeye的内存中
run ---------开始模拟
而之所以用skyeye的原因是skyeye也能非常好模拟AT91。而且这个软件更加成熟。
l 从skyeye官网学习到:
SkyEye is origin from GDB/Armulator, The goal of SkyEye is to provide an integrated simulation environment in Linux and Windows. SkyEye environment simulates/emulates typical Embedded Computer Systems (Now it supports a series ARM, MIPS, , Blackfin, Coldfire, and SPARC architecture based microprocessors). You can run some Embedded Operation System such as Embedded Linux, uClinux, uc/OS-II (ucos-ii) etc. in SkyEye, and analysis or debug them at source level.
Processor List supported by
Processor name |
Core |
Architecture |
Current status |
Running OS |
S3C4510 |
ARM7TDMI |
ARM |
stable |
uClinux |
S3C44B0 |
ARM7TDMI |
ARM |
stable |
uClinux |
AT91 |
ARM7TDMI |
ARM |
stable |
|
S3C3410 |
ARM7TDMI |
ARM |
stable |
uClinux |
LPC2210 |
ARM7TDMI |
ARM |
not finished |
|
EP7312 |
ATM720T |
ARM |
stable |
linux |
Ep9312 |
ARM9 |
ARM |
stable |
linux |
AT91RM9200 |
ARM9 |
ARM |
stable |
|
S3C2410 |
ARM9 |
ARM |
stable |
|
CS89712 |
ARM9 |
ARM |
stable |
linux |
SA1100 |
StrongArm |
ARM |
stable |
linux |
PXA25x |
XSCALE |
ARM |
stable |
|
PXA27x |
XSCALE |
ARM |
stable |
|
bf533 |
bf53x |
Blackfin |
testing |
|
bf537 |
bf53x |
Blackfin |
testing |
uClinux |
CF5249 |
|
Coldfire |
stable |
uClinux |
CF5272 |
|
Coldfire |
testing |
uClinux |
Au1100 |
R4K |
MIPS |
not finished |
linux |
MPC8560 |
E500 |
PowerPC |
testing |
|
MPC8572 |
E500 |
PowerPC |
testing |
linux |
leon2 |
Sparc v8 |
Sparc |
testing |
RTEMS |
通过上表可知,LPC2210和AT91的内核都是ARM7TDMI。但是skyeye对于AT91的仿真是支持的,但是对于LPC2210的仿真还没有开发好,更别说LPC2468。由于内核是一样的,仿真AT91等效于仿真LPC2468。
Now the following hardwares can be simulated by SkyEye:
· CPU CORE: ARM7TDMI, ARM720T,StrongARM, XScale, Blackfin
· APPLICATION CPU: Atmel AT91X40/AT91RM9200,Cirrus CIRRUS LOGIC EP7312/EP9312 CS89712,Intel SA1100/SA1110, Intel PXA 25x/27x, Samsung 4510B/44B0/2410/2440 , Sharp LH7xxxx, NS9750, Philips LPC22xx, BF533
· MEMORY: RAM, ROM, Flash
· Peripheral: Timer, UART,NIC chip,LCD, TouchScreen, etc.
由此可以看出,skyeye不仅可以模拟CPU,还可以模拟内存和外设,基本上相当于可以模拟一个嵌入式的板子。
Now the following Operating Systems and system softwares can run in SkyEye:
· uC/OSII-2.x with network support
· uClinux based on Linux2.4.x/2.6.x with Network/LCD/TouchScreen/Flash Mem support
· ARM Linux 2.4.x/2.6.x with Network/LCD/TouchScreen/Flash Mem support
· Nucleus
· Rtems
· Ecos
· lwIP on uC/OSII
· applications on uC/OSII, uClinux, ARM Linux
uClinux以及uClinux自带的应用程序都可以在skyeye上运行。
总的来说,就是skyeye可以模拟目标板,并且uClinux可以在其上运行。使用skyeye就相当于将uClinux下载到真正的板子上运行。但是使用skyeye更方便而且可以用于调试。