Font Size: a A A

Research And Improvement Of Embedded System Debugging Method

Posted on:2010-02-17Degree:MasterType:Thesis
Country:ChinaCandidate:R ZhangFull Text:PDF
GTID:2178360272997572Subject:Computer system architecture
Abstract/Summary:PDF Full Text Request
With the development of information, intelligence and network technology, embedded system relative technology is gaining more and more broad space for deeper developing. American futurist Nicholas Negroponte predicted that in the coming 4,5 years, the embedded intelligence tools will be the next one of the greatest inventions following the PC and the Internet's, in January 1999 during his visit to China. In 20th century 90's, embedded technology improved much, it has been widely used in communications product and consumer product developing field,and almost completely replaced the analog technology. Therefore, there's very large and practical significance researching embedded systems technology.Debugging is very important in developing process, the efficient methods and tools of debugging can provide a strong protection for development. There is obviously different in the debugging environment of embedded operating system and common desktop operating system, naturally cause different debug methods. In this paper, firstly did comprehensive study and summed up all the methods can be used in embedded system debugging, introduced them one by one, which included both the common methods and the ones can be only used in embedded system, analyzing their advantages and disadvantages, and made the result into form, clearly demonstrated all these to the reader. After this, began to study real-time embedded system debugging program. For demanding real-time systems, the difficulty of debugging will be greatly increased, some methods of the embedded system debugging introduced above disabled in real-time system, therefore, it's necessary to put forward a viable real-time system debugging scheme, which has great practical significance. In this article, three real-time embedded system debugging schemes put forward, and pointed out their advantages and disadvantages respectively. In order to adapt to the future development trends of embedded system, this article also done a brief introduction on the multi-core debugging technology. As we all know, there are a lot of choice in the current embedded software development platform, Linux is the most attractive. Linux is a complete memory protection, multi-tasking, multi-threaded operating system. Linux supports a wide range of hardware platforms, including X86, Alpha, MIPS, PPC, ARM, NEC, MOTOROLA, etc. All source codes of Linux are opened, and with the improvement of Linux development tools, almost all UNIX systems applications have been ported to Linux. Its strong language compiler as gcc, g++, can also be easily obtained. Therefore, the focus of this article studied the debugging of embedded Linux technology, especially the Linux kernel debug technology, giving a comprehensive and holistic approach of all available debug kernel methods, comparing their advantages and disadvantages, and finally also made the conclusions a form so that readers can catch them easily.The article has the first part of a comprehensive, detailed description of debugging embedded systems involve a variety of methods and programs, but in the actual testing process, which needs to be a variety of methods, techniques used in combination, in accordance with modifications to the actual situation, each method and the scheme is not a panacea, there are shortcomings and limitations, which requires developers the flexibility to use these methods, to learn and concluded, finally leads to the eventual realization of an accurate and efficient debugging. However, in the field of embedded system debugging, there are still some problems plaguing development staff all the time, the latter part of this paper will be to improve the program on two types of such problems.In the area of embedded development now days, C/C++ is the most widely used. C/C++ not only has the advantage of high-level language, but also has the ability as low-level language (such as assembly language) to control the hardware. However, the use of C/C++ language is on the existence of the risk of memory leaks. To address the issue of memory leaks, the industry had a lot of related tools. Linux has some built-in memory leak detection tools such as'mtrace'and'memwatch'and so on, however, the realization of these tools are used to run a separate thread to record and manage memory allocation and release information, its operation will affect the main process speed, especially at the time of the release of memory, a large number of checking jobs for threads to do. In response to this defect, this paper presents an improved algorithm for memory leak, including its realization and verifying the correctness through an example. This improved algorithm is responsible for memory allocation through reloading the new and delete operators to monitor the memory usage, developers can directly use the following overloaded operator to replace the original new and delete, when program running the memory usage will be recorded, and who do not need a separate thread to do about this matter, and thus make a high efficiency, low consumption of system resources algorithm.Another improvement is on the debugging of embedded systems in another important technology—remote debugging technology. Comparing embedded operating system with a common computer system in the debug environment, there is an obvious difference. The former, the debugger with the debug process is running on the same hardware platform, the same operating system on top of the two processes. But debugging embedded systems (also known as remote debugging), developers want debugger running on general-purpose operating system which has flexible, user-friendly debugging interface, while testing procedures run on specific hardware platforms, embedded operating system (the target operating system), which creates difficulties for debugging. This paper first introduces the two most commonly used remote debugging program- Instrumentation and chip debugging. Instrumentation Program, however changes to the target operating system, this must have increased the workload for the software development process. The on-chip debugging program, would like to add the debugger on the target multi-tasking operating system identification modules and control modules, but also need to program for ROM, RAM initialization procedures for the different developing board of the same chip, these will also increase a lot workload. In view of this, this article will use the Linux open-source gdb debugger tools to achieve an easy-to-use remote debugging program. gdb debugging tools as open source is easy to use and efficient, but we tend to use it as a local debugging tool, to track the procedures of running program, the use of the programs described in this article, there are no need for developers to transplanted gdb to board and directly use it through remote debugging. It is necessary to know that gdb transplantation is not an easy task, because its realization depends on the hardware, then reduced the transplantation job no doubt greatly enhance the work efficiency. Above comments are the main elements of the framework of this article, I hope the developers in the field of embedded development has been harvested in the process of reading this article, and I hope that the methods in this article can help developers to debug more efficiently, fast and accurate positioning.
Keywords/Search Tags:Embedded System, Debugging Methods, Memory Leak, Remote Debugging
PDF Full Text Request
Related items