Research and Improvement of Embedded System Debugging Method

Author
ZhangRong
Advisor
FangZhiYi
School
Jilin University
Major
Computer System Architecture
Classification
TP368.12 Microprocessor
Degree
Master's thesis
Year
2009
Downloads
201
Citations
2

Request the full text

Abstract

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.

Table of contents

Summary 4-7 Chapter 1 Introduction 7-9 1.1 research background 7 1.2 research of theoretical and practical significance 7 1.3 of major work 7-8 1.4 chapters arranged 8-9 Chapter 2 embedded system debugging method 9-33 2.1 Embedded Systems 9-14 2.1.1 embedded system applications 10-11 2.1.2 embedded systems and general-purpose computer system 11 2.1.3 Embedded operating systems and hardware platforms 11-13 2.1.4 Embedded Software Development Overview 13-14 2.2 embedded system debugging method 14-17 2.2.1 output necessary debugging information 15 2.2.2 dichotomy narrow positioning range 15 2.2.3 exclusion 15-16 2.2.4 condition detection method 16 2.2.5-depth understanding of hardware features to analyze abnormal provenance 16 2.2.6 simulation debugging environment 16 2.2.7 using debugging tools 16-17 2.2.8 various Linux system debugging Comparison 17 2.3 real-time embedded system debugging programs 17-18 2.4 multicore environment debugging method 18-23 2.4.1 The basic framework of multi-core chips 19 2.4.2 debugging multicore environment 19-23 2.5 Embedded Linux debugging techniques 23-33 2.5.1 Embedded Linux 23-27 2.5.2 Linux kernel debugging techniques 27-31 2.5.3 Various Linux kernel debugging techniques compare 31-33 Chapter 3 Memory leak detection algorithm and its implementation 33-45 3.1 Embedded systems programming language comparison 33-35 3.1.1 Assembly Language 33-34 3.1.2 C / C language 34 3.1.3 Java language 34-35 3.1.4 Comparison Conclusion 35 3.2 memory leak detection tools and existing 35-40 3.2.1 memory leak 35-36 3.2.2 existing memory debugging methods and tools 36-37 3.2.3 Linux memory leak detection tools 37-40 3.3 Improved memory leak detection algorithm 40-45 3.3.1 memory leak detection algorithm 40-41 3.3.2 Improved algorithm 41-43 3.3.3 Case Study 43-45 Chapter 4 Embedded Remote Debugging Improvement 45-53 4.1 remote debugging embedded systems commonly used means 45-49 4.1.1 Instrumentation 45-47 4.1.2-chip debug 47-49 4.2 Embedded Remote debugging program improvement 49 4.3 improvement program using embedded remote debugging 49-53 4.3.1 improve program implementation 49-50 4.3.2 Case Study 50-53 Chapter 5 Summary and Outlook 53-54 5.1 Summary 53 5.2 Prospects 53-54 References 54-56 Thanks 56-57 Summary 57-59 Abstract 59-62

Related dissertations

  1. Research and Realization of Video Surveillance and Play Based on ARM9Hardware Platform
    PanZuoZuo ·Dalian Polytechnic University ·2010 ·Master's thesis
  2. The Study of Remote Video Monitor System Baced on ARM
    GuoZuo ·Hebei University of Technology ·2012 ·Master's thesis
  3. Design and Implementation of Intelligent Video Surveillance System Based on Embedded Linux
    JinPing ·Central South University ·2013 ·Master's thesis
  4. Video Surveillance System Based on Embedded Technology Research
  5. Design of Video Monitoring System Based on the Embedded
  6. The Design of Embedded Network Video Surveillance System Based on ARM9
  7. Research and implementation of remote monitor system of ship based on the technology of the Internet of things
  8. Design of Video Surveillance Software Based on Ti Dm6446Processor
    YuanWei ·Zhejiang University of Technology ·2013 ·Master's thesis
  9. Data Acquisition System of Cavern Based on Embedded Web Server
  10. Research and Realization of Embedded Data Acquisition and Recording System for Industrial Process Based on ARM
    LiuDaoLin ·Dalian Polytechnic University ·2008 ·Master's thesis
  11. Research on the Indoor Air Monitoring System Based on Embedded Linux
  12. Research and Realization on the Key Technology of Monitoring System about Granary Environment Based on ARM9
    SunZuoLi ·Hunan University ·2013 ·Master's thesis
  13. Automatic Switcher Based on Embedded System Design and Implementation of Test Platform
  14. Research on Meteorological Data Acquisition and Processing System
    ZhaoSheng ·Wuhan University of Technology ·2013 ·Master's thesis
  15. The Research of the Design and Application for Embedded Remote Terminal Unit
    XiaRui ·Northeastern University ·2013 ·Master's thesis
  16. Design and Implementation of Magnetic Card Detection System Based on Embedded System
  17. Design of distributed control system based on embedded platform
    JieZhouKai ·Xi'an Optics and Fine Mechanics ·2010 ·Master's thesis
  18. Design and Implementation of Car Embedded Systems to Multimedia Intelligent Terminal
    LiShun ·Northeastern University ·2012 ·Master's thesis
  19. The Research of CANopen Protocol Based on Embedded Systems
  20. The Research and Design of Smart Home System Based on Zigbee Technology
    ZhangZhiDong ·Liaoning Normal University ·2013 ·Master's thesis