GDB simulation UCLinux run

xiaoxiao2021-03-06  18

1 Get Uclinux, GDB, ARM-elfTools-20030314.SH (or other versions).

2 GDB:

1 bunzip2

Gunzip

2 CD GDB-5.0

./configure -target = ARM-ELF

3 Make && make Install

Note: The appearance during the installation: "GDB / 62: GDB / RDI-Share / Devsw.c: 39: Storage Size of` LT 'isn't known. "

>: / GDB-5.0 / GDB / RDI-Share / Devsw.c Join "#include "

> FIX:

Missing include file in GDB-5.0 / GDB / RDI-Share / Devsw.c:

#include

3 Install UClinux. Generate uclinux-dist folder; install arm-elftools-20030314.sh

4 Compile the kernel:

1 Make Menuconfig / Make Xconfig

Make menuconfig.

After configuring the kernel, the article will mention it.

2 Make Dep

Dependence depends. Make DEP means: If you use program A (such as supporting special devices), and A needs to use B (such as B is a module / subroutine). When you do make config, change the driver of a device by kernel support to module, or cancel support, which will affect the setting of a parameter of B, you need to recompile B, recompile or connect A .... If the number of procedures is large, you are hard to manually do this. So, you want Make Dep. If you make Menu or make config or make Xconfig, it will directly Reboot will be faster. It's just that your kernel does not have any changes. ^ = ^

3 Make Clean

Will clear all files to be cleared

4 Make Lib_only

Compile user program

5 Make Romfs

Generate a ROMFS file system

6 Make Image

Generate a romfs.o file, the first execution will prompt the error, do not pay attention to it, will not report an error later.

7 MAKE

After completing success, generate images directories in uclinux-dist / directory, 3 of which files: image.ram, image.rom and romfs.img are the binaries we need to use.

Nuclear core: such as /linux-2.4.x Generates a file called Linux.

5 Compile the generated kernel configuration:

The romfs.img file under the copy / image directory is below the catalog of the compiled kernel version, such as: /linux-2.4.x, then renamed Boot.ROM; or use ln -s to associate

Rename Linux -> Linux.2.4.x

6 GDB simulation:

# ARM-ELF-GDB Linux.2.4.x (gdb) #ttarget SIM

(GDB) #LOAD

(GDB) RUN

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

New Post(0)