Source insight build project uboot

Source: Internet
Author: User

For embedded learning, we often have to deal with uboot and kernel,Source insightThat is, I think it is a very good source code viewing tool. For Viewing uboot and kernel source code, it has a very good indexing method and a very convenient shortcut key operation method. It is best to build a project to manage a huge source code tree. However, when you search for a keyword, many related files will appear, and different CPUs and boards will have files of the same name, obviously, not all files need to be viewed. How can we establish a "economical" and appropriate project? Here, I will share my experience.

1. Create a project folder

It is best to create a folder for managing all projects of source insight (for example, create a folder in D: \D: \ sourinproject), And then create separate project folders. Here we are building a Uboot-2010.03 project, then create a folder named:Uboot-2010.03Pro, Put in itUboot-2010.03Source package, and a Uboot-2010.03 engineering package that is ready to be placed on the source insightSourinpro. This makes it clear that the source code and project package are put separately namedUboot-2010.03ProUnder, that is, different projects carry a source code package and a created project package.

Ii. How to Create a project

(1) first open the source Insight software, configure the file suffix recognized by the software, click Options-> document options on the menu bar, and select C source file from the document type drop-down list, then add some important file suffixes to the file filter: text box on the right.; *. S; *. LDS; * defconfig; makefile(Otherwise, click Add.
When a tree is added to a directory tree, if some important files are not added to the project, manually add them one by one. Of course, the simplest way is to add one;*.*). Click project> new project on the menu bar.New projectDialog window, New project name(Project name) Fill in hereUboot-2010.03, Where
Do you want to store the project data files? (Where do you want to store your project files ?)D: \ sourinproject \ Uboot-2010.03Pro \ sourinpro. Then, all the way to OK, there is a name:Add and remove project filesDialog Box. Next we will operate on this dialog box;

(2) In the add and remove project files dialog box, clickDirectoryWe pre-placed Uboot-2010.03 source package, at this time on the right sideFile NameAll source code directory files are displayed. So how do we select which files are more closely related to the source code? There is a board. C under the lib_arm directory, and a board. C will also exist under the lib_i386 directory. Obviously, we do not want to have so many unnecessary files of the same name in the project. For example, some directories are related to Boards (such as lib_arm, lib_i386, and lib_avr32). Obviously, we only care aboutLib_armDirectory. All we need to add files related to the boards we care about;

(3) first, we can add all the files to the project. After all, most of the Directory files are still generic. Then we can remove some directories and files that we don't care about. Click on the rightFile Name(An up arrow ),Show only known document types(Well-known file types). Otherwise, many important files, such as start. s and config. mk, are not added. Click Add all. In the dialog box, add
To add lower sub-directories to recursively on the project hook (meaning recursively adding sub-directory files );

(4) Remove directories and files that we don't care about. First, we can see from the directory name that those directories are related to the Board. For example, the Board directory is a board Directory, which contains many different board directory files, then, we first remove the entire directory tree, and then add the Board directory we care about. Here we goBoard/Samsung/smdk2410Click Add all;

(5) go back to the top-level directory and let's look down and findCPUDirectory. From the name, we know that there must be many different CPUs. Here, our single board is S3C2410, which belongs to the ARM920T architecture and enters/CPU/ARM920T, first, we can see many separate files (such as makefile and start. s, U-boot.lds, etc., the general top-level files are universal), we clickAdd allInAdd to projectRemove from the dialog boxInclude top
Level sub-directories,
Then enterS3c24x0Directory click Add all to add all;

(6) go back to the top-level directory and enterIncludeDirectory, found manyASM-xxxFrom the name,ASM-armIs the header file related to arm,Asm-i386Is the header file related to x86. Obviously we do not need so many irrelevant directories. We will return to the top-level directory, select the include directory, and clickRemove treeRemove the entire directory, and then enter the Directory and file for adding our link. As you can see many separate files, clickAdd
All
InAdd to projectRemove from the dialog boxInclude top level sub-DirectoriesTo process these subdirectories. Enter/Include/ASM-armDirectory, add the separate files here first, as in the previous step. The same ARM architecture also has different architectures. Here we find thatArch-s3c24x0It is our link./Include/ASM-arm/Arch-s3c24x0Directory, click Add
All is added to the file. Return/Include/ASM-armThe directory hasProc-armvDirectory. Click Add all to add all files. In this case, the/include/ASM-xxx directory is ready for ASM-arm. Go back to the/include directory and find the bedbug directory. We don't know it. It doesn't matter if we don't join it./Include/bedbug, Click Add
All OK. Then we found the configs Directory, which is obviously some configuration files. There are different configuration files for different CPUs and boards. Here we useSmdk2410.hAnd click Add. Finally, there are some common directories and files. Start from the cramfs directory, press shift, select the last directory, and click Add tree to add the remaining directories. In this case, the/include directory is all done;

(7), back to the U-boot-2010.03 top-level directory, then/include directory is some lib_xxxx, apparently some library files of different architectures. First, we will remove all lib_xxx directories, select all lib_xxx directories (except the lib_generic common library files), and click remove tree to remove all. Then we enter/Lib_armDirectory, just some library files. Click Add all to add them all. In this case, we select the lib_arm directory for the/lib_xxx directory and solve it all;

(8), and finally back to the U-boot-2010.03 top directory, the rest fromNand_spiThe directories are common at the beginning and end, and we have added them all in the first step. Close the add and remove project files dialog box;

(9) Finally, click Project> Synchronize files in the menu bar of source insight to synchronously generate indexes. So far, a satisfactory project has been established.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.