Collection: Learn to use Skyeye Simulation

xiaoxiao2021-03-06  37

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. 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, perform your Hello program 7, compile and run uClinux-Dist-20030909.tar.gz 8, join the network Function 9, after installing Skyeye, what will I do 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 site: www.skyeye.org http://www.skyeye.org/index_cn.html Via SkyEye can simulate the following hardware: 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 full) memory: RAM, ROM, FLASH 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 core Support network) ARM Linux 2.4.x / 2.6.x LWIP ON UC / OSII based on UC / OSII, UCLinux, ARM Linux application 2. Skyeye can do? 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 to http://gro.clinux.org/projects/skyeye/ download Skyeye-0.7.0.tar.bz2 package: TAR JXVF Skyeye-V0.7.0. TAR.BZ2 enters 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 higher than 0.6.0, run the following command: ./configure --target = arm-Elf --prefix = / usr / local pick Down to execute: Make make install installation is completed after the installation is complete: a. If you use the Mandrake Linux release, then you have an error when compiling Skyeye, and error is related to Readline, NCurse, Termcap, you can try The following method: ln -s /usr/include/ncurses/termcap.h /usr/local/include/termcap.h then makes it easier to see if Make and make install can be successful! b. If your Linux release is debian Linux, do not use GCC 2.95 or GCC 3.0, please use GCC 3.2 C.GCC version to 2.96 or more d. If SkyEye's version is greater than 0.6.0, then use LCD simulation needs to install GTK software in the Linux system. 4, install the ARM-ELF cross compiler to download ARM-elf-tools-20030314.SH ftp://166.111.68.183/pub/embed/uclinux/soft/tools/Arm or to ftp://166.111.8.229/OS/OS/ Embeded execution: chmod a x arm-elf-tools-20030314.sh then: ./ARM-elf-tools-20030314.sh ls / usr / local / bin / You should see the executable of ARM-ELF File, 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 first write a small program Hello.c #includeint 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:

# 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, hello executable file. 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, 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.

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

TAR JXVF SKYEYE-BINARY-TESTUTILS-1.0.4.tar.bz2 CD Testsuits / AT91 / UCLinux2 (of course you can use another)

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 to 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 or in the command line mode to select the GDB / Armulator Kernel version selection 2.4 and save and exit runs 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 MEM_BANK: MAP = M, TYPE = RW, ADDR = 0x01000000, Size = 0x00400000 MEM_BANK: MAP = M, TYPE = R, addr = 0x01400000, size = 0x00400000, file = images / romfs.img mem_bank: map = M, type = RW, addr = 0x02000000, size = 0x00400000 mem_bank: map = M, type = RW, addr = 0x02400000, size = 0x00008000 mem_bank : map = m, type = rw, addr = 0x04000000, size = 0x00400000 MEM_BANK: MAP = I, TYPE = RW, addr = 0xf0000000, Size = 0x10000000 This time you can use Skyeye to debug the run Kernel, in / usr / src / uClinux-distth is executed as follows:

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 look at your / lib / modules / 'uname -r' / kernel / drivers / net / directory If you don't have 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 have to create it with the following command: #mkdir / dev / net #MKNOD / DEV / NET / TUN C 10 200 (2) Run VNET (Virtual Hub) device module (this step is not required): Get the source code of the VNET, then create the device: #mknod / dev / NET / VNET C 10 201 #CHMOD 666 / DEV / NET / VNET Create vNet.o #Make vNet.o Insert Module VNET.O #insmod VNET.O Enters the Test Directory, with Test to Measure VNET.O #CD Test #MAKE #. / testvnet1 d. Configure Skyeye.conf file CPU: ARM7TDMI MACH: AT91 MEM_BANK: MAP = M, TYPE = RW, ADDR = 0x00000000, Size = 0x00004000 MEM_BANK: MAP = M, Type = RW, AddR = 0x01000000, size = 0x00400000 MEM_BANK: MAP = M, TYPE = R, AddR = 0x01400000, size = 0x00400000, file = iMages / Romfs.img MEM_BANK: MAP = M, TYPE = RW, AddR = 0x02000000, size = 0x00400000 MEM_BANK: MAP = M, TYPE = Rw, addr = 0x02400000, size = 0x00008000 MEM_BANK: MAP = M, TYPE = RW, ADDR = 0x04000000, size = 0x00400000 MEM_BANK: 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 a wireless or wireless; mac = simulation adapter MAC address; 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 ximod = 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 different skyeye.conf e. Run SkyEye Linux-2.4.x / linux9, after installing Skyeye, what will you do 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: One Chinese document in 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/ Download document, You can get more knowledge and experience in SkyEye and embedded Linux development.

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

New Post(0)