Doug Abbott - Embedded Linux development using Eclipse

Здесь есть возможность читать онлайн «Doug Abbott - Embedded Linux development using Eclipse» весь текст электронной книги совершенно бесплатно (целиком полную версию без сокращений). В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Год выпуска: 2009, ISBN: 2009, Издательство: Elsevier, Жанр: Программирование, ОС и Сети, Программы, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.

Embedded Linux development using Eclipse: краткое содержание, описание и аннотация

Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «Embedded Linux development using Eclipse»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.

• Details the Eclipse Integrated Development Environment (IDE) essential to streamlining your embedded development process
• Overview of the latest C/C++ Development toolkit
• Includes case studies of eclipse use including Monta Vista, LynuxWorks, and WindRiver

Embedded Linux development using Eclipse — читать онлайн бесплатно полную книгу (весь текст) целиком

Ниже представлен текст книги, разбитый по страницам. Система сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «Embedded Linux development using Eclipse», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Run/Debug. Manages the process of running and debugging code under Eclipse, including things like console appearance, breakpoint behavior, and what happens when a program is launched.

Team. Offers preferences for using CVS and team synchronization. Note the circle icon with the question mark in the lower left corner. Clicking this icon brings up a context-sensitive help screen to the right of the dialog. This is, in fact, a common feature of virtually every Eclipse dialog and is a useful way to get more detailed information about the dialog options.

At this point it would be useful to browse around the preferences menus to get a better feel for what’s there. Earlier, we saw that by default, Eclipse does not save changed files before building. The option to change that behavior is in General→Workspace. It’s called Save automatically before build.

3.5.1 C/C++ Preferences

Code Style

The CDT text editor incorporates “smart typing” features, that include things like autoindentation and formatting, that are controlled by the Code Style preference shown in Figure 3.20. You can select from among four built-in code styles that include:

• KR

• BSD/Allman

• GNU

• Whitesmiths

Figure 320 Code Style preference The primary difference among the four seems - фото 40

Figure 3.20: Code Style preference.

The primary difference among the four seems to be the location and indentation of opening and closing braces. The default is KR, where the opening brace is on the same line as the expression or key word that introduces the block. This seems to be the preferred style among Linux programmers.

For what it’s worth, my personal preference is BSD/Allman, where the opening brace is on the next line and indented to line up with the introductory expression. There are options to edit the built-in styles, import a style, and to create a completely new one.

Among the features you can edit in the built-in styles are Tab policyand Tab size. Tab policy specifies whether tabs are represented in the file by tab characters, 0x9, or spaces.

Editor Preferences

General editor preferences include the ability to change various colors. I find the default color for highlighting matching braces to be a bit “subtle.” To change it, select Matching brackets highlightunder Appearance color options: and then click on the Color: button.

A few of the more interesting editor preference subcategories are described here.

Content Assist With Content Assist, the C/C++ editor can offer suggestions about key words and phrases commonly used in C. Type part of a keyword followed by Ctrl+Spaceto bring up a list of suggestions. When the list has been reduced to one item, the editor can automatically insert that item into your code.

The related auto-completion feature can use “.”, “->”, and “::” as triggers to invoke auto-completion on structures and class definitions.

Content Assist is based on templates that can be specified under Template preferences (see below).

Folding Folding hides the detailed contents of selected regions in a source file. This can be a useful strategy for browsing through large files. Figure 3.21 is an example of a file with functions and macros folded. Click on the “+” icon next to the name to see the contents of a specific function or macro.

Figure 321 Folded source file Folding preferences let you select if folding - фото 41

Figure 3.21: Folded source file.

Folding preferences let you select if folding is enabled when a new editor is opened, and which sections of code will be folded.

Syntax Coloring There are a large number of semantic elements to which specific coloring and font styles can be assigned. Many of these are not enabled by default and among those that are enabled many share the same coloring. Here’s your chance to “go wild,” if you’re so inclined, and create some exciting color schemes.

TemplatesTemplates are the basis for Content Assist. There’s a default set of templates representing common C/C++ code snippets. You can add your own templates with New, and Editexisting templates.

Typing Typing preferences are another way in which the editor provides assistance. You can tell the editor to automatically close quoted strings, parentheses, brackets, and braces. When you type an opening parenthesis or bracket, the editor automatically inserts the matching close and positions the cursor between them. Type what should be enclosed, then hit Enter to position the cursor just beyond the matching close.

Summary

This chapter has been a quick tour of basic Eclipse concepts and operation with an emphasis on the C/C++ Development Tools (CDT) environment. We began by examining the relationship among Perspectives, Views, and Editors. A Perspective is a collection of Views and Editors organized to accomplish a specific function. Editors allow files to be opened, modified, and saved. Views support Editors by providing additional information and functionality. The selection and arrangement of Views in a Perspective can be changed at will.

The basic functionality of Eclipse, like all windowing programs, is embodied in a set of menus. We looked in detail at many menu, or action, items that are specific to Eclipse. Many of these action items also appear in the tool bar and in Context menus. Items in the tool bar may change or become active or inactive depending on which view has the focus.

Finally, we looked at some of the many configuration and customization options available in Eclipse with particular attention to some of the interesting features of the CDT editor.

The next chapter goes into more detail about the CDT environment and the nature of projects.

CHAPTER 4

C/C++ Developers’ Toolkit (CDT)

With a good basic understanding of Eclipse concepts as a background, this chapter looks at the C Developers’ Toolkit in more detail. It covers how to create, configure, and build projects.

4.1 Obtaining the Sample Source Code

Source code and data files for all the examples in this book are available from http://www.intellimetrix.us/downloads.html in the file EclipseSamples.tar.gz. Download this file to your home directory and untar it. You’ll find a new directory called EclipseSamples/with subdirectories for each of the projects described in the book.

4.2 Creating a New Project

For this exercise we’ll create a fairly straightforward record sorting application. The records to be sorted consist of a name and an ID number. To simplify the code a bit, we’ll replace any spaces in the name field with underscores. The program will sort a file of records in ascending order, either by name or ID number, as specified on the command line thusly:

record_sort [1 | 2]

Where “1” means sort by name and “2” means sort by ID. Sort by name is the default if no sorting argument is given.

In the Eclipse C/C++ perspective, create a new C Projectand call it “record_sort.” The project type is Executableand we’ll use the default workspace location. Clicking Nextbrings up the Select Configurations dialog where you can select either or both of the Debug and Release configurations. Later you’ll have the choice of building either of these configurations. The primary difference between them is that the Debug configuration is built with the compiler’s debug flag, “-g”, turned on to provide information to GDB. The Release configuration leaves out the debug flag.

Читать дальше
Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Похожие книги на «Embedded Linux development using Eclipse»

Представляем Вашему вниманию похожие книги на «Embedded Linux development using Eclipse» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё непрочитанные произведения.


Отзывы о книге «Embedded Linux development using Eclipse»

Обсуждение, отзывы о книге «Embedded Linux development using Eclipse» и просто собственные мнения читателей. Оставьте ваши комментарии, напишите, что Вы думаете о произведении, его смысле или главных героях. Укажите что конкретно понравилось, а что нет, и почему Вы так считаете.

x