Development of embedded systems without hardware conditions

xiaoxiao2021-03-06  76

Author: bobdos time 2004-8-24 14:55:49 Number: 684

Learning to use SkyEye simulation SkyEye is a hardware simulation tool that can run an embedded operating system, which can be developed in an embedded system 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 Skyeye4, 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.gz8, 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 sites: www.skyeye.orghttp: //www.skyeye.org/index_cn.html Energy through SkyEye Easy The following hardware: CPU core: ARM7TDMI , ARM720T, ARM9, StrongARM, XScaleCPU: 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 surrounding Equipment: Timer, UART, NE2K network chip, LCD, touch screen, etc. Currently run 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.xlwip 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: Makemake Install after installation is complete, Skyeye pay attention: a. If you use the Mandrake Linux release, then you have an error when compiling Skyeye, and error is related to Readline, NCurse, Termcap, etc. You can try it. Method: ln -s /usr/include/ncurses/termcap.h /usr/local/include/termcap.h then makes it to make success! 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 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.SHFTP: //1666.111.68.183/pub/embed/uclinux/soft/tools/Arm or to ftp://166.11.8.229/os/embeded Execution: chmod a x arm-elf-tools-20030314.sh then: ./ arm-elf-tools-20030314.SH ls / usr / local / bin / You should see executable files starting with ARM-ELF Among them, the 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 PHP source 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 -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 source: ------------------------- -------------------------------------------------- ----- # Begin CC = ARM-ELF-GCC CFLAGS = -d__pic__ -fpic -msingle-pic-base -O2 -Pipe -wall -gldflags = -wl, -elf2flt libs = objs = hello.o all: Hello HELLO: $ (OBJS) $ (CFLAGS) $ (LDFLAGS) -O Hello $ (LIBS) Clean: rm -rf * .o * .elf * .gdb hello # end ---- -------------------------------------------------- -------------------------- If compiling, you will generate a Hello executable. With 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-testils-1.0.4.tar.bz2 cd testsuits / at91 / ucrinux2 (of course you can Use another) mkdir romfs (built a directory, back) mount -o loop boot.ROM / MNT / XXX CP -R / MNT / XXX / * ROMFS, copy your compiled executable copy to / ROMFS / In the bin directory, here is Hello! Genromfs -f boot.rom -d romfs / Note: You can use GenRomf -h to get help! OK! Execute the following command: Skyeye Linux (Skyeye) Target Sim (Skyeye) Load (Skyeye) Run Kernel Start ..... very familiar. . .

Can CD / BIN HELLO see the result? In fact, you can develop your own procedure! 7. Compile and run uClinux-dist-20030909.tar.gz to 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 assumes to download it to / usr / src / directory, then perform the following command: TAR ZXVF UCLINUX-DIST-20030909.TAR.GZCD Uclinux-Dist / in graphics mode Use the command Make Xconfig or in the command line mode to select GDB / Armulatorkernel version selection 2.4 and save and exit runs the following two hits: make Depmake At this time / usr / src / uclinux-dist /LINUX-2.4.X Directory Generates executable Linux in / usr / src / uclinux-dist / images / generates romfs.img and other files to establish simulation AT91 SkyEye configuration file SkyEye.conf, etc. in the uclinux-dist directory. as follows: cpu: arm7tdmimach: at91mem_bank: map = M, type = RW, addr = 0x00000000, size = 0x00004000mem_bank: map = M, type = RW, addr = 0x01000000, size = 0x00400000mem_bank: map = M, type = R, addr = 0x01400000, size = 0x00400000, file = images / romfs.imgmem_bank: map = M, type = RW, addr = 0x02000000, size = 0x00400000mem_bank: map = M, type = RW, addr = 0x02400000, size = 0x00008000mem_bank: map = M , TYPE = RW, AddR = 0x04000000, size = 0x00400000Mem_Bank: map = I, TYPE = RW, addr = 0xf0000000, size = 0x10000000 This time you can use SKYE YE to debug the run kernel, 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 8 in the directory where Skyeye.conf is located, 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 the 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 creates a vNet.o # make vNet.o insert module vNet.o # insmod vnet.o Enter the test directory, use Test to measure VNET.O # CD Test # make .. # / testvnet1 d skyeye.conf configuration file cpu: arm7tdmimach: at91mem_bank: map = M, type = RW, addr = 0x00000000, size = 0x00004000mem_bank: map = M, type = RW, addr = 0x01000000, size = 0x00400000mem_bank: map = M, type = r, addr = 0x01400000, size = 0x00400000, file = images / romfs.imgmem_bank: map = m, type = rw, addr = 0x02000000, size = 0x00400000MEM_BANK: MAP = M, TYPE = RW, addr = 0x02400000 , size = 0x00008000Mem_Bank: map = m, type = rw, addr = 0x04000000, size = 0x00400000Mem_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.ddnet: State = ON, MAC = 0: 4: 3: 2: 1: f, Ethmod = tun, Hostip = 10.0.0.1 Will describe some of the above parameters: state = on / off means simulating NIC (network interface board) is wired Wireless; mac = mac address for the simulation adapter; Ethmod = Tuntap / VNET in the host environment; hostip = meaning the host environment and keyeye interactive IP format: state = on / off mac = xx: xx : xx: xx: xx: xx ethmod = tuntap / vnet hostip = dd.dd.dd.dd for example = ON / OFF MAC = xx: xx: xx: xx: xx: xx ethmod = tuntap / vnet hostip = dd.dd.dd.ddnet: 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:

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

New Post(0)