Learn to use Skyeye simulation

xiaoxiao2021-03-06  14

Learn to use Skyeye simulation

Skyeye is a hardware simulation tool that can run embedded operating systems, which can be developed without hardware conditions.

The following operations are passed in Fedora Core 1.0.

Skyeye project resource list

http://gro.clinux.org/projects/skyeye/

Documentation Summary:

1, what is Skyeye?

2, what can Skyeye do?

3, install Skyeye

4, install the ARM-ELF cross-compiler

5, test your ARM-ELF-GCC compiler

6, execute your Hello program

7, compile and run uClinux-dist 20030909.tar.gz

8, join the network function

9. After installing Skyeye, what will be done next?

1, what is Skyeye?

Skyeye is an item of open source software, Skyeye's goal is to provide a complete simulation environment in Linux and Windows operating systems. The SkyEye simulation environment is equivalent to an embedded computer system, you can run some embedded Linux operating systems in Skyeye, such as Armlinux, Uclinux, UC / OS-II (UCOS-II), etc., and can analyze and debug their source code .

If you want to know more detailed information about SkyEye and embedded systems, please visit the following sites:

www.skyeye.org

http://www.skyeye.org/index_cn.html

Can simulate the following hardware through Skyeye:

CPU core: ARM7TDMI, ARM720T, ARM9, STRONGARM, XSCALE

CPU: Atmel AT91 / X40, Cirrus Cirrus Logic EP7312, Intel SA1100 / SA1110, Intel Xscale PXA 250/255, CS89712, Samsung 4510b, Samsung 44B0 (Not All)

Memory: RAM, ROM, FLASH

Peripheral equipment: Timer, UART, NE2K network chip, LCD, touch screen, etc.

Currently running the following operating system and system software on Skyeye:

UC / OSII-2.5.x (support network)

Uclinux (based on Linux2.4.x kernel, support network)

ARM Linux 2.4.x / 2.6.x

LWIP ON UC / OSII

Based on UC / OSII, UCLinux, ARM Linux applications

2. What can I do in SkyEye?

1. With SkyEye, you can help promote the learning of embedded systems, learn and analyze the UCLinux operating system and other embedded operating systems without additional hardware, such as UCOSII.

2. Skyeye can be used for teaching in embedded systems.

3. I hope to promote the research of operating systems through Skyeye, such as ucosii, uclinux rtai, uclinux2.5.x, etc.

4. Research of simulation specific hardware modules can be performed based on Skyeye.

5. Skyeye can develop embedded systems as an embedded integrated development environment (of course, you need a lot of work to Skyeye).

Note: from Chen Yu "Skyeye Project FAQ"

3, install Skyeye

Until

Http://gro.clinux.org/projects/skyeye/ download SkyEye-0.7.0.tar.bz2 package:

TAR JXVF Skyeye-v0.7.0.tar.bz2

Enter the decompressed skyeye directory, if the version of Skyeye is below 0.6.0, run the following command:

./configure - Target = ARM-ELF --PREFIX = / usr / local --without-gtk-prefix --without-gtk-exec-prefix - Disable-gtktest If the version of Skyeye is above 0.6.0, then Run the following command:

./configure --target = arm-Elf --Prefix = / usr / local

Next:

Make

Make Install

Execute Skyeye after installation

note:

a. If you use the Mandrake Linux distribution, then you have an error when compiling Skyeye, and error is related to Readline, NCurse, Termcap, etc. You can try the following:

Ln -s /usr/include/ncurses/termcap.h /usr/local/include/termcap.h

Then make Make and Make Install can be successful!

b. If your Linux distribution is debian Linux, do not use GCC 2.95 or GCC 3.0, please use GCC 3.2

C.GCC version is in 2.96 or more

d. If the version of Skyeye is greater than 0.6.0, then use the LCD simulation to install the GTK software in the Linux system.

4, install the ARM-ELF cross-compiler

Download arm-elf-tools-20030314.sh

ftp://166.111.68.183/pub/embed/uclinux/soft/tools/Arm

Or

ftp://166.111.8.229/os/embeded

carried out:

CHMOD A X arm-elf-tools-20030314.sh

then:

./ARM-elf-tools-20030314.sh

LS / usr / local / bin /

You should be able to see the executable of ARM-ELF, where ARM-ELF-GCC is used to compile your target platform, of course, there are some gadgets, followed by one by one.

5, test your ARM-ELF-GCC compiler

Write a small program Hello.c

PHP code:

#include int main (void) {INT i; for (i = 0; i <6; i ) {printf ("i =% D", I); Printf ("Hello, Embedded Linux! / n ");} return 0;}

Then execute:

ARM-ELF-GCC -WL, -Elf2flt -o Hello Hello.c

The -elf2flt parameter is to convert the ELF file format to a FLAT file format, which is generated in your installation cross compiler.

Or you can write a Makefile file, execute:

Make

Here is my Makefile file, for reference only:

PHP code:

# Begin CC = ARM-ELF-GCC CFLAGS = -d__pic__ -fpic -msingle-pic-base -O2 -Pipe -wall -g ldflags = -wl, -elf2flt libs = objs = Hello.o All: Hello Hello: $ ( OBJS $ (CC) $ (CFLAGS) $ (LDFLAGS) -O Hello $ (OBJS) $ (LIBS) Clean: rm -rf * .o * .elf * .gdb hello # end

If compiled passes, a Hello executable will be generated. Use the following command: File Hello

You will find that it is bflt (binary flat), the file format supported by your target platform.

6, execute your Hello program

Here, we will use the GenRomfs gadget to complete the test. This tool is generated when you install the cross-compiler, you can use it directly.

Until

http://gro.clinux.org/projects/skye...0.4.tar.bz2 Pack:

TAR JXVF SKYEYE-BINARY-TESTUTILS-1.0.4.tar.bz2

CD testsuits / at91 / uclinux2 (of course you can use other)

MKDIR ROMFS (built a directory, use)

Mount -o loop boot.ROM / MNT / XXX

CP -R / MNT / XXX / * ROMFS

In addition, copy your compiled executable to / romfs / bin directory, here is Hello!

GenRomfs -f boot.rom -d romfs /

Note: You can get help with GenRomf -h!

OK! Execute the following command:

Skyeye Linux

(Skyeye) Target SIM

(Skyeye) LOAD

(Skyeye) Run

Kernel Start .....

Very familiar. . .

CD / BIN

Hello

Can you see the result?

In fact, you can develop your own procedure!

7, compile and run uClinux-dist 20030909.tar.gz

Until

ftp://166.111.68.183/pub/embed/uclinux/soft/

Or

FTP: //166.111.8.229/os/embeded/uclinux/pub/uclinux/dist download

Uclinux-dist-20030909.tar.gz

Suppose it is downloaded to the / usr / src / directory, then perform the following command:

TAR ZXVF UCLINUX-DIST-20030909.TAR.GZ

CD UClinux-dist /

Use the command Make Xconfig in a graphic mode

or

Use the command Make MenuConfig in the command line mode

Select GDB / Armulator in Vendor / Product

KERNEL version selection 2.4

Then Save and Exit

Run the following two hits:

Make Dep

Make

At this point, executable Linux is generated in the /usr/src/uclinux-dist/linux-2.4.x directory.

In / usr / src / uclinux-dist / image, generate files such as romfs.img

Establish simulation AT91 SkyEye configuration file SkyEye.conf in the uclinux-dist catalog, as follows:

CPU: ARM7TDMI

Mach: AT91

MEM_BANK: MAP = M, TYPE = RW, ADDR = 0x00000000, size = 0x00004000

MAP = M, TYPE = RW, AddR = 0x01000000, size = 0x00400000

MAP = m, type = r, addr = 0x01400000, size = 0x00400000, File = images / romfs.img

MAP = M, TYPE = RW, addr = 0x02000000, size = 0x00400000

MEM_BANK: MAP = M, TYPE = RW, ADDR = 0x02400000, size = 0x00008000Mem_Bank: Map = M, Type = RW, AddR = 0x04000000, size = 0x00400000

MAP = I, TYPE = RW, addr = 0xf0000000, size = 0x10000000

At this time, you can use SkyEye to debug the run Kernel, and execute the following command in / usr / src / uclinux-dist:

Skyeye Linux-2.4.x / linux

(Skyeye) Target SIM

(Skyeye) LOAD

(Skyeye) Run

Kernel Start .....

note:

To perform SkyEye Linux-2.4.x / Linux in the directory where Skyeye.conf is located

8, join the network function

a. Use the root user.

b. You have to see your / lib / modules / 'uname -r' / kernel / drivers / net / directory has tun.o

If you don't have, you need to compile your Linux kernel to get tun.o.

c. (1) Run the TUN device module:

#insmod / lib / modules / 'uname -r' / kernel / Drivers / Net / Tun.o

If you don't have the device, you will use the following command to create it:

#mkdir / dev / net

#MKNOD / DEV / NET / TUN C 10 200

(2) Run the VNET (virtual hub) device module (this step is not required):

Get the source code of the VNET and create a device:

#MKNOD / DEV / NET / VNET C 10 201

#CHMOD 666 / DEV / NET / VNET

Create a vNet.o

#make vnet.o

Insert module VNET.O

#insmod vnet.o

Enter the Test directory, measure VNET.O with Test .o

#CD Test

#make

#. / testvnet1

d. Configure SkyEye.conf files

CPU: ARM7TDMI

Mach: AT91

MEM_BANK: MAP = M, TYPE = RW, ADDR = 0x00000000, size = 0x00004000

MAP = M, TYPE = RW, AddR = 0x01000000, size = 0x00400000

MAP = m, type = r, addr = 0x01400000, size = 0x00400000, File = images / romfs.img

MAP = M, TYPE = RW, addr = 0x02000000, size = 0x00400000

MEM_BANK: MAP = M, TYPE = RW, ADDR = 0x02400000, size = 0x00008000

MAP = M, TYPE = RW, addr = 0x04000000, size = 0x00400000

MAP = I, TYPE = RW, addr = 0xf0000000, size = 0x10000000

# Format: state = on / off mac = xx: xx: xx: xx: xx: xx ethmod = tuntap / vnet hostip = dd.dd.dd.dd

Net: State = ON, MAC = 0: 4: 3: 2: 1: f, Ethmod = tun, Hostip = 10.0.0.1 The following parameters will be described below:

State = on / off means simulation NIC (network interface board) is wired or wireless;

Mac = mac address of the simulation adapter;

Ethmod = Tuntap / VNET in the host environment;

Hostip = meaning the host environment and keyeye interaction IP

Format: State = ON / OFF MAC = xx: xx: xx: xx: xx: xx ethmod = tuntap / vnet hostip = dd.dd.dd.dd

For example:

#set nic info state = on / off mac = xx: xx: xx: xx: xx: xx ethmod = tuntap / vnet hostip = dd.dd.dd.dd

Net: State = ON, MAC = 0: 4: 3: 2: 1: f, Ethmod = tun, Hostip = 10.0.0.1

or

Net: State = ON, MAC = 0: 4: 3: 2: 1: f, Ethmod = VNET, Hostip = 10.0.0.1

note:

If you want to run two or more Skyeye at the same time, please use a different skyeye.conf for every Skyeye.

e. Run skyeye linux-2.4.x / linux

9. After installing Skyeye, what will be done next?

1. For beginners with embedded operating systems and entry, they can first see some textbooks and books on operating systems and embedded operating systems, such as UC / OS, Minix, Uclinux, Linux. Related books, etc. You can then develop some simple application examples (such as process communication, process priority, dead lock, network application, etc.) on Skyeye, for some operating system functions (such as process schedules, memory management, network subsystems, files) Subsystems, etc.) make simple modifications and expansion, and run and debug through Skyeye to see what happens.

2. For software engineers with some experience, the development of certain application system prototypes on Skyeye is worth making something. For example, transplantation or development of a file subsystem or an network subsystem into a specific operating system, I believe it is easier than the development of a real development board. There are also challenging work on Skyeye porting and development (such as other operating systems such as transplant RTLinux, RTAI to Skyeye).

3. For hardware engineers, Skyeye is expanded, design new hardware simulation (such as USB, IDE hard drive, etc.) makes Skyeye hardware simulation functions, support more features software, is a meaningful thing.

reference:

A Chinese document in the Skyeye project site;

Chen Yu "SkyEye Project FAQ";

The ReadME document in SkyEye-0.7.0.

postscript:

In order to make everyone player quickly, I have a practical development work, I caught a document, very rough. But I firmly believe that with more experienced people; with our own level, there will be more, better articles. Let us take action!

Finally, I will suggest that everyone will look at "Embedded Linux Technology and Application" book.

Can

http://www.skyeye.org/document.htm or

ftp://166.111.68.183/pub/embed/skyeye/document/ or

http://www.huihoo.org/mirrors/skyeye/

转载请注明原文地址:https://www.9cbs.com/read-47854.html

New Post(0)