Christopher Hallinan offers practical solutions for the real-world challenges embedded developers face - whether they are experienced legacy embedded systems developers moving to Linux or experienced Linux developers moving to embedded systems. Hallinan introduces Linux in embedded environments, covers all major systems and development issues, and offers dozens of valuable tips, tools and problem-solving techniques.
His extensive code examples have been assembled from operational hardware running current versions of embedded Linux using the latest development and debugging tools. This book's wide-ranging, practical coverage includes: Linux kernel initialization; the special role of bootloaders and U-Boot in embedded Linux; the use of embedded Linux file systems, including JFFS2; building Flash-resident file systems; using the Memory Technology Devices MTD subsystem with today's popular flash memory devices; and much more.
Readers will also find a detailed introduction to multi-core, one of the hottest trends in embedded computing. Hallinan, C: Embedded Linux Primer. This is the eBook version of the printed book. This is used to tailor BusyBox to your If you want to get to know Windows Vista fast but don't want to get bogged down in the details, you need a Visual Qui c kProject Guide!
You don't need to know every fea ture --you just want to get your work done. Full-color illustratio ns show you how to perform each step of your project from start to finish. If you want to get to know Windows Vista fast but don't want to get bogged down in the details, you Fedora Unleashed, Edition presents comprehensive coverage of Fedora 8, the popular Linux distribution developed by the Red Hat-sponsored Fedora Project. This book provides detailed information on installing, using, and administering Fedora.
Fedora Unleashed, Edition presents comprehensive coverage of Fedora 8, the popular Linux Running Windows on your Mac explains how this simple technology works and walks you through every phase of the process of setting up Windows on your Mac. Are you a The latest Macs from Apple can run Toggle navigation.
There are a few other open source revision control systems as well as commercial options. The version control system pro- vides a central repository to store individual files. A typical software project may contain any- where from hundreds to thousands of files. In large and complex projects, someone also needs to decide directory hierarchy so that files are stored in appropriate locations. During the develop- ment cycle, multiple persons may modify files.
If everyone is not following the rules, this may easily break the whole compilation and building process. For example, duplicate definitions of the same variables may cause problems. Similarly, if included files are not written properly, you can easily cause the creation of loops. Other problems pop up when multiple files are included in a single file with conflicting definitions of variables and functions. Coding guidelines should also be defined by architects or senior software developers. For example, if software is intended to be ported to some other platform as well, it should be written on a standard like ANSI.
Writing good comments is very important as all other documents, no mat- ter how good they are, will be lost eventually. Ten years after the initial work, you may find only that information which is present inside the code in the form of comments. Development tools also play an important role in this phase of the project. Good develop- ment tools save a lot of time for the developers, as well as saving money in terms of improved productivity. The most important development tools for time saving are editors and debuggers.
A good editor helps a developer to write code quickly. A good debugger helps make the written code operational in a short period of time. Before starting the coding process, you should spend some time choosing good development tools. Review meetings during the development phase also prove helpful. Potential problems are caught earlier in the development. These meeting are also helpful to keep track of whether the product is on time or if more effort is needed complete it in the required time frame.
Review meetings are a great tool to convey these new requirements. If you don't control the quality of the software, it will not be able to com- pete with other products on the market. If software crashes at the customer site, your customer loses productivity as well money and you lose credibility. Sometimes these losses are huge.
- About This Item.
- DistroWatch Weekly.
- Calaméo - qujunatedano.gqn?
- New Releases?
Unhappy customers will not buy your other products and will not refer other customers to you. You can avoid this situation by doing extensive testing. This testing is referred to as Quality Assurance, or QA, in most of the software world. Usually testing starts as soon as the initial parts of the software are available. There are multiple types of testing and these are explained in this section. Each of these has its own importance. This makes sure that the component is doing what it is intended to do. This also saves a lot of time for software testers as well as developers by eliminating many cycles of software being passed back and forth between the developer and the tester.
The component is then for- warded to the software testing people who run test cases to make sure that the unit is working properly. This is just to make sure that developers have not defined conflicting or multiple functions or global variable definitions. This type of testing is used to determine behavior of a product when used continuously over a period of time.
It can reveal some bugs in software related to memory leak- age. In some cases developers allocate memory but forget to release it. This problem is known as memory leakage. When a test is conducted for many days or weeks, this problem results in allo- cation of all of the available memory until no memory is left. This is the point where your soft- ware starts showing abnormal behavior. Life Cycle of a Software Development Project 7 Another potential problem in long-term operation is counter overflow. This occurs when you increment a counter but forget to decrement, it resulting in an overflow when the product is used for longer periods.
The regression testing may be started as soon as some components are ready. This testing process requires a very long period of time by its very nature. The process should be continued as more components of the product are integrated. The integration process and communication through interfaces may create new bugs in the code. This type of testing is a must before any software is released to customers. Func- tional testing is done by people whose primary job is software testing, not the developers them- selves.
In small software projects where a company can't afford dedicated testers, other developers may do functional testing also. The key point to keep in mind is that the person who wrote a software component should not be the person who tested it. The software testers need to prepare a testing plan for each component of the software. A testing plan consists of test cases that are run on the software. The software tester can prepare these test cases using functional specifications documents.
The tester may also get help from the developer to create test cases. Each test case should include methodology used for testing and expected results. In addition to test cases, the tester may also need to create a certain infrastructure or envi- ronment to test the functionality of a piece of code. For example, you may simulate a network to test routing algorithms that may be part of a routing product. The next important job of the tester is to create a service request if an anomaly is found.
The tester should include as much information in the service request as possible. Many software packages are available in the market to track bugs and fix prob- lems in software. There are many web-based tools as well. You can find software packages that work with CVS also. CVS is explained in Chapter 6 of this book. This means that you create a state of the software in your repository, make sure that it has been tested for functional- ity and freeze the code.
A version number is assigned to released software. After releasing the software, development may continue but it will not make any change in the released software. The development is usually carried on in a new branch and it may contain new features of the product. The released software is updated only if a bug fixed version is released.
Usually companies assign incremental version numbers following some scheme when the next release of the software is sent to market. The change in version number depends on whether the new software contains a major change to the previous version or it contains bug fixes and enhancement to existing functionality. Releases are also important because they are typically compiled versions of a particular version of the code, and thus provide a stable set of binaries for testing. This version control system keeps a record of changes in source code files and is usually built in a tree-like structure.
When software is released, the state of each file that is part of the release should be recorded. Future developments are made by creating branches to this state. Sometimes special branches may also be created that are solely used for bug fixing.
CVS is dis- cussed in detail in Chapter 6. These release notes are prepared by people releasing the software version with the help of developers. Release notes show what happened in this software version. Life Cycle of a Software Development Project 9 1. Technical documentation developed during the development process. This includes architecture, functional and design documents. Technical documentation prepared for technical support staff.
This includes technical manuals that support staff use to provide customer support. End-user manuals and guides. This is the documentation for the end user to assist the user getting started with the product and using it. All three types of documents are necessary for different aspects of product support.
Tech- nical documents are necessary for future development, bug fixes, and adding new features. Tech- nical documentation for technical support staff contains information that is too complicated for the end user to understand and use. The support staff needs this information in addition to user manuals to better support customers. Finally each product must contain user manuals. Technical writers usually develop user manuals which are based on functional specifica- tions. In the timelines of most software development projects, functional specifications are pre- pared before code development starts.
So the technical writers can start writing user manuals while developers are writing code. By the time the product is ready, most of the work on user manuals has already been completed.
This is true regardless of the size of the product, and even for products that are not software related. In addition to that, you may also want to add new features to the product for the next release because competitor products have other features. Better support will increase your cus- tomer loyalty and will create referral business for you. You may adopt two strategies to add new features.
You may provide an upgrade to the cur- rent release as a patch, or wait until you have compiled and developed a list of new features and make a new version. Both of these strategies are useful depending how urgent the requirement for new features is. Depending upon the requirements of a project, different types of components can be chosen.
Many commercial companies also sell comprehensive development tools. On Linux systems, all of the develop- ment tools are available and you can choose some of these depending upon your level of exper- tise with these tools and your requirements. A hardware platform is the choice of your hardware, PC or workstation, for the development system. You can choose a particular hardware platform depending upon different factors as listed below: Cost Depending upon budget, you may chose different types of hardware.
Usually UNIX workstations are costly to buy and maintain. On the other hand, PC-based workstations are cheap and the maintenance cost is also low. Tools You also need to keep in mind availability of development tools on a particular platform. Development Type If the target system is the same as the host system on which develop- ment is done, the development is relatively easy and native tools are cheap as well, compared to cross-platform development tools. Depending upon these factors, you may make a choice from the available hardware plat- forms for development.
Linux is an excellent choice, as far as cost is concerned. Linux is also a very good operating system as it has all of the development tools available. It provides stability and most of the people are familiar with development tools. You can also use the operating system for cross-platform development using GNU tools.
Easy-to-use and feature rich edi- tors, like Emacs, increase developers' productivity. You should look at a few things while select- ing editors. The most commonly used editors are Jed, Emacs and Xemacs. However, many other variants of these editors are also available. You can also use X-Windows-based editors available on Linux platform. A lot of people also edit in vi or vim, both of these have been very popular historically. Quality of compilers does affect the output code. For example, some compilers can do much better code optimization compared to others.
If you are doing some cross-platform development, then your compiler should support code generation for the target machine as well. Some of these are introduced in Chapter 3. GNU utilities set, also known as binutils, includes GNU assembler and other utilities that can be used for many tasks. You can't write a program that is free of bugs.
Debugging is a continuous part of software development and you need good tools for this purpose. Many other debuggers are also built on this debugger. The GNU debugger and some other debuggers will be introduced later in this book. CVS allows many people to work on files at the same time and provides a central repository to store files. Developers can check out files from this repository, make changes and check the files back into the repository.
When multiple developers are modifying the same file at the same time, conflict may occur between different changes made by multiple developers. When a conflict is detected in the files being checked in, CVS provides a mechanism to merge the files appropriately. CVS can be used over secure links as well. This is required when developers are not phys- ically located at the same place. A server on the Internet can be used to provide secure access to the central software repository.
Selection Criteria for Hardware Platform 13 There are other version control systems as well which are popular in the software develop- ment community. The objective can be achieved in many ways. Probably e-mail is the most efficient and cheapest way. Some collaboration tools provide more functionality than just e-mailing.
This is especially useful for editors like Emacs. However the important hardware decision is the selection of PCs and workstations for developers. There is no hard and fast rule about how to select a particular hardware platform. It depends upon the requirements of a development project. However, keep in mind that reliability of hardware is one major factor that people usually over- look.
If you buy cheap systems that decrease productivity of developers, you lose a lot of money. Selection of software development tools depends upon the choice of hardware and operating system. In many cases GNU tools are very well suited. Selection of development tools also has a major effect on the productivity of the whole develop- ment team.
A development manager usually acts as a binding and coordinating force among different parties with conflict- ing interests. Coordinating all of these parties is not an easy task. The manager has to convince senior management that a new feature needs that much time for development.
At the same time he has to push developers to meet the deadlines. Some of the important tasks of software management in a real-life project are as follows. These deadlines must conform to the product delivery time lines. The manager may have to arrange additional resources to complete feature development in the allotted time. Project management software can help a manager to set and meet deadlines and track completion of different components. If part of the product is behind schedule, she has to re-arrange resources to get it back on track.. She may also need to hire new people to finish the development of a particular component on schedule.
If the development of one component is lagging behind, it may affect development of other components. The develop- ment manager needs to keep an eye on these dependencies and how these may affect the over- all progress of the project. Well-known project management methods are usually helpful for this task. The specifications define components and packages that must be present on Linux development workstations.
Lhtml web site. LSB specifications 1. LSB compliant applications can run on any LSB compliant distribution without any modification or recompilation process. While developing applications for Linux, the developer can assume presence of these libraries on target machines, provided the target is LSB compliant. These editors offer a wide variety of functionality from simple editing features to syntax highlighting and reading e-mail. In this chapter, we will focus on a couple of editors that offer features that will be of interest to developers, Jed, vim, and Emacs.
All of these editors offer extended features beyond simple text editing. Emacs utilizes a full-featured Lisp language called Elisp to provide users with the ability to add just about any functionality they might require to the editor. The original Lisp language was written in the late s as part of MIT's research into artificial intelligence. Elisp is derived from the original Lisp and provides surprising flexibility in extending Emacs for those who take the time to learn it. Davis as a generic macro language that would become the basis for a number of differ- ent programs.
S-lang programs resemble C in syntax and layout. Such functions include jumping to the beginning of a stanza in the code, highlighting that stanza, automatic indenting, highlighting syntax, and quickly inserting comments and comment- ing on entire sections of code. Not all information is available for all languages. Emacs uses the output from etags, while vi uses ctags.
- Join Kobo & start eReading today!
- Got Shaving Bumps and Ingrown Hairs? The Art To Fighting Shaving Bumps and Ingrown Hairs.
- Ubuy Oman Online Shopping For busybox in Affordable Prices.;
For example, all of the functions or subroutines in the code can be folded so that only the names of the functions are seen until the programmer unfolds that routine to work on it. From within the editor a user can read and send mail, perform research on the Inter- net, and even send out for coffee to RFC compliant coffee makers.
Configuration of Emacs is accomplished via the. If the configuration does not exist, Emacs will use its built-in defaults. This file consists of a series of elisp expressions that the editor evaluates when the application runs. If Emacs is started from within X-Windows, it will automatically open a new window in the desktop.
To prevent this behavior, you can use the -nw option from the command line. Alter- nately, you can tell Emacs how large to make the window by specifying the size of the window, in characters, that you wish to create. The menu bar and scroll bar are sufficient for basic editing with the mouse. Getting New Versions How to obtain the latest version of Emacs. GNU Emacs Figure The initial Emacs screen. This tutorial covers many of the functions that are available within Emacs and takes you step-by- step through them. The primary one is the Meta key.
The Meta key is signified by M-. What works will depend on if you are logged in locally, accessing the console directly or using X-Windows. Entering text into the buffer is accomplished in the default mode simply by typing on the keyboard. To abort a command that's currently running or asking for input, type A G. This will return you to the current buffer. Simple commands can be repeated by prefacing them with the key sequence ESC. By pressing the escape key and typing any number, the next command that is issued will be repeated that number of times.
Moving around In additional to the basic functionality provided by the arrow keys on the keyboard, the key combinations shown in Table may be used to move the pointer one character at a time in a given direction. Table Simple Movement Commands. Release both keys and then press the 't' key. Emacs 21 Movement can also be accomplished a word or a page at a time.
This is accomplished by referring to Table In addition, there are ways to delete words, lines and portions of lines. There are also methods for blocking text and deleting entire sections of the buffer. For more information on working with blocks of text, see Cutting and Pasting below. Table shows the various commands used to perform these functions.
Each buffer may be edited sepa- rately and the changes saved back to the disk. Files may also be opened into new or existing buffers as shown in Table The first one simply does a sim- ple search case insensitive by default for the character string provided by the user. The second, more complex search function does a search and replace on regular expressions. See Table for a list of these commands. With the search string still active, typing A S again to search for the next occurrence of that string in the current buffer.
If the search string is found in the current buffer, you will be presented with the options shown in Table Replace globally from the pointer forward in the buffer. Replace the string at the pointer and then exit search and replace mode. A Move point back to previous match. The more complex search and replace feature is available by default, only from the prompt and is not bound to a particular key combination.
To access this feature, you need to type in the name of the mode, which in this case is "query-match-regex". Emacs has an auto-completion option that you can use instead of typing the entire com- mand shown above. Emacs supports the use of parenthetical statements in regex search and replace commands. A portion of the search string may be used as part of the replacement string. These commands include copying, cutting and pasting text. When the pointer is moved, the text from the marked point to the current pointer position will be highlighted. Once the region is selected, issue the cut or copy command.
Table shows a list of the various selection commands. To navigate between buffers, press A Xb and type the name of the buffer that you wish to switch to. Buffers may be opened and closed by using the File Commands listed earlier in this chapter.
To see a list of buffers, use A X A B. As shown in Figure , each window may be split into two windows by using the A X2 command. This will create a horizontal divide in the middle of the current window. The same file will be present in each pane, but they may be scrolled separately.
To move between win- dows, press A Xo. Windows may be split multiple times. To close all other buffer, use A X1. The current buffer may be closed with A X0. Emacs 25 See Table for a complete list of window commands and Figure for an example of using multiple buffers. These buffers are 'main. When you load a recognized source code file, Emacs will assume certain defaults and enter the appropriate mode for editing that file. For example, when you load a file with a. When a language mode is on, Emacs can automatically indent code as you type.
To turn this mode on, type A C A A. The same command is used to turn this mode back off. With this mode active, auto-indenting takes place when certain characters are entered from the keyboard. These characters are the semi-colon, curly braces, and under certain circum- stances, the comma and colon. As the number of subroutines, variables, functions and files increases, it becomes much more difficult to keep track of every piece and to quickly find the portion of code that one needs to work on. To address this issue, Emacs has the ability to read a file that contains a table of tags that reference various parts of an application.
These tags are stored in a TAGS file that is created by the etags command. Once this file is built, Emacs can read this table and use it to quickly locate a specific portion of code, regard- less of whether it is in a currently open file or not. The output file is, by default, called TAGS. Simply type ESC! The default value for the location is the current working directory, and the default tags file name is "TAGS". Once the TAGS file has been read in, you may issue search commands against the table. There are several commands that can be used. The one most commonly used is ESC.
The default search parameter is the word at the current pointer position. If you are not sure of the name of the function that you are looking for, you can type the first few characters of the function name and press the TAB key. This invokes the completion function of Emacs and, if the function is unique, it will display that function name. If the func- tion name is not unique, Emacs will complete as much of the function name as it can and then prompt you for the rest.
If Emacs finds a function that matches your search string, it will replace the current buffer with the contents of the first file in which it found the search string and the pointer will be posi- tioned at the first line of that function.
This is shown in Figure Alternatively, you can initiate the search with the command ESC x find-tag- other-window and rather than replacing the current buffer with the found function, a new buffer will be opened instead. Remember that Emacs has a completion function, so after typing the first few characters of a function, you can press the TAB key and Emacs will fill in the rest of the command if it is unique.
Rather than searching for functions by name, you can also search all of the files referenced in the tags file for a regular expression. To accomplish this, type ESC x tags-search and Emacs will prompt you for a regular expression to search for. If it finds a match, the first occur- rence of the string found will be displayed in the current buffer. You can search for the next occurrence of the string by issuing the ESC , command. By moving the pointer around this buffer, you can place it on the function that you are looking for and use the ESC. As the results are displayed, the programmer can then move forward and backward through any error or warnings.
As each error or warning is displayed, the appropriate line in the code is displayed and may be edited. To invoke the compiler from Emacs, type M-X compile; in response, Emacs will ask you for the command to use to compile the program for application. You can either specify make or the command line compiler with all the options. The default is to invoke make with the -k option in order to continue as far into the make as it can when encountering errors.
For example, assume that the following broken bit of code is in a buffer entitled 'main. Emacs 31 The main. As indicated by Figure , typing A X- " the first error in the bottom buffer is highlighted and the pointer in the top buffer is positioned in the line of code that caused the error.
Repeating that command moves the pointer forward in the code to the next error. Figure Using the built-in functions to debug code. Table lists the commands used to aid in debugging compiled code. In many ways it still resembles its ancestor, but when it is run it includes additional features that make use of the X-Window interface. These include toolbars, font faces, image embedding and editing, and similar features. As you can see in Figure , the Xemacs interface has taken many commonly used func- tions and created a tool bar across the top of the display that makes them accessible to the mouse.
In addition, most of the user interface is customizable. Copyright Cf San Microsystems, Inc. All Sights Reserved.
FLOSS Project Planets | FLOSShub
It has many of the functions required by applica- tion programmers and can be set up with one of several different key bindings to aid people tran- sitioning from other editors. This file contains the default values for all users, but it is only read if the user does not have a local configuration file present in the home directory. Jed 33 2. Other than condi- tional statements, all entries must end in a semi-colon ;. One of the first options that a user may wish to change is the emulation mode of the editor. By default Jed uses Emacs-like key bindings for entering commands.
To select a new emulation, edit the. Below, the user has changed the application to use the IDE mode instead of the default. These key bindings resemble those used by in Borland's IDE.
This is because Jed may also be run in batch mode for processing files unattended. Statements within this block will only be processed if the application is run in interactive mode, not when run in batch mode. While having the statements outside of this block would not effect the application when run in batch mode, having them separated speeds up the load time of the application when they are not needed.
There are many other configuration options available in the. Some of them are generic to all modes and others are used in only one mode. Jed also has the capability of calling a compiler directly and examining the output. The standard compiler is assumed to be gcc. If Jed is called without an argument, it will prompt you for the name of the file before you may do any editing. Jed may be called with one or more command line arguments. A -n argument forces Jed to ignore the users' local.
There is also an X version of Jed that allows you to use the mouse to select text and options from the menu. The menu across the top is accessed by pressing the F key. This scratch buffer will dis- appear when you begin to type and if a filename is given on the command line you will be taken immediately to that buffer to begin editing. The basic editing features of Jed will be dependent upon the emulation mode that is selected.
In this section, it is assumed that you will be using the Emacs emulation mode. Copyright C , John E. Jed 0. Jed 35 2. In order for folding to be used, special markers must be put in the file at the appropriate points. There are two markers, one to denote the beginning of a section to be folded and one to denote the end. In plain text files, these markers must be in the leftmost column; but when an application language that is recognized by Jed is used, they may be inserted in comments.
The ellipsis at the end of the line indicates that this line may be unfolded. Figure shows a section of Perl code with the fold markers in place. The comments are placed before and after each section of code and a description of the code included in that fold has been added. Figure shows the same file folded. Several sections from different parts of the program may be unfolded at once. Jed treats each folded section as a subroutine and it can be edited as such.
In order to use the folding mode, it must be activated from within Jed. This will turn the folding mode on and immediately fold up the current buffer. See Table for a list of the available commands in this mode. It is based on the function- ality of the original, non-open source vi editor. While most open source software is also free- ware, VIM is distributed as Charity ware. In exchange for using the program, the authors request that users consider donating to the Kibaale Children's Center KCC , a charity providing food, health care and education for the children in the area.
The graphical version, shown in Fig- ure , has the same functionality as the text-based version, but also provides easy access to many functions through pull-down menus and a button bar. To start the text-based version, use the command vim. The graphical version is started by typing gvim.