CN108062274A - A kind of adjustment method for starting code for embedded system compilation - Google Patents

A kind of adjustment method for starting code for embedded system compilation Download PDF

Info

Publication number
CN108062274A
CN108062274A CN201610983786.2A CN201610983786A CN108062274A CN 108062274 A CN108062274 A CN 108062274A CN 201610983786 A CN201610983786 A CN 201610983786A CN 108062274 A CN108062274 A CN 108062274A
Authority
CN
China
Prior art keywords
input
code
breakpoint
control program
high level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610983786.2A
Other languages
Chinese (zh)
Inventor
刘炯钟
赵国开
涂岩恺
池炜宾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Yaxon Networks Co Ltd
Original Assignee
Xiamen Yaxon Networks Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Yaxon Networks Co Ltd filed Critical Xiamen Yaxon Networks Co Ltd
Priority to CN201610983786.2A priority Critical patent/CN108062274A/en
Publication of CN108062274A publication Critical patent/CN108062274A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3624Software debugging by performing operations on the source code, e.g. via a compiler
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3648Software debugging using additional hardware

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention proposes a kind of adjustment method for starting code for embedded system compilation, including:In the external LED light of the hardware circuit of embedded system and the lead of low and high level can be inputted;Control program is inserted into the corresponding position of code to be debugged, the control program is according to the breakpoint number of input, with the light on and off of binary-coded form control LED light, the control program read (CP read) takes the input state of the lead of input low and high level, input high level then jump out the control program and continue to run with by program, input low level is then rested in control program, until input state then jumps out Xun Huan for input high level;After insertion control program, input breakpoint number is treated debugging code and is debugged;The implementation status of breakpoint is obtained by the light on and off situation of LED light, and passes through lead input low level and code to be debugged is controlled to stop at breakpoint, input high level controls code to be debugged to be continued to run at breakpoint.The present invention solves the problems, such as that the assembly code debugging of embedded system startup stage is difficult.

Description

A kind of adjustment method for starting code for embedded system compilation
Technical field
The present invention relates to field of computer technology, and in particular to a kind of debugging for starting code for embedded system compilation Method.
Background technology
Kernel is unziped to one by the start-up course of embedded Linux operating system, the gunzip in kernel mirror image After on specific address, the inlet for just jumping to kernel is performed.What kernel performed is most initially that a paragraph assembly code carries out The initial work of chip-scale, the performing environment of the assembly code are divided into two parts, and first half is that CPU does not open page table also Mapping, latter half are that CPU opens page table mapping.
When changing and debugging the assembler before opening page table, when the execution for needing tracking assembler and register Situation is needed under normal conditions using JTAG emulators, but some equipment do not have jtag interface or have jtag interface still There is no JTAG emulators, result in the trace debug that can not complete this partial code.Simultaneously because CPU, which is in initialization, starts rank Section, most of peripheral hardware can not use, can not be by type information come trace routine progress.
The content of the invention
The present invention provide it is a kind of for embedded system compilation start code adjustment method, this method use LED light with The method that binary-coded form is shown starts to debug the compilation before tracking embedded system opens page table mapping Code.
Concrete scheme is as follows:
A kind of adjustment method for starting code for embedded system compilation, including:
In the external LED light of the hardware circuit of embedded system and the lead of low and high level can be inputted;
Control program is inserted into the corresponding position of code to be debugged, which is compiled according to the breakpoint number of input with binary system The light on and off of the form control LED light of code, the control program read (CP read) take the input state of the lead of input low and high level, input high level Then program is jumped out the control program and is continued to run with, and input low level is then rested in control program, until input state is defeated Enter high level and then jump out Xun Huan;
After insertion control program, input breakpoint number is treated debugging code and is debugged;
The implementation status of breakpoint is obtained by the light on and off situation of LED light, and passes through lead input low level and controls code to be debugged Stop at breakpoint, input high level controls code to be debugged to be continued to run at breakpoint.
Wherein, the quantity of the external LED light is determined according to the quantity of breakpoint.
Advantageous effect of the present invention:The present invention is by external LED light and using the display methods of binary coded form, embedding Enter and added in formula Linux system compilation startup program to the control method of the LED light, can very easily play set breakpoint and The effect of Break point operation, the assembly code for solving the embedded systems startup stage such as linux well debug difficult ask Topic.
Description of the drawings
Fig. 1 is flow chart of the one embodiment of the invention to the control method of LED light.
Specific embodiment
To further illustrate each embodiment, the present invention is provided with attached drawing.These attached drawings are that the invention discloses one of content Point, mainly to illustrate embodiment, and the associated description of specification can be coordinated to explain the operation principles of embodiment.Cooperation ginseng These contents are examined, those of ordinary skill in the art will be understood that other possible embodiments and advantages of the present invention.Now tie Closing the drawings and specific embodiments, the present invention is further described.
A kind of adjustment method for starting code for embedded system compilation of the present invention, including:
In the external LED light of the hardware circuit of embedded system and the lead of low and high level can be inputted;
Control program is inserted into the corresponding position of code to be debugged, which is compiled according to the breakpoint number of input with binary system The light on and off of the form control LED light of code, the control program read (CP read) take the input state of the lead of input low and high level, input high level Then program is jumped out the control program and is continued to run with, and input low level is then rested in control program, until input state is defeated Enter high level and then jump out Xun Huan;
After insertion control program, input breakpoint number is treated debugging code and is debugged;
The implementation status of breakpoint is obtained by the light on and off situation of LED light, and passes through lead input low level and controls code to be debugged Stop at breakpoint, input high level controls code to be debugged to be continued to run at breakpoint.
In the present embodiment, the quantity of external LED light is determined according to the quantity of breakpoint.
In one embodiment, first in external 2 LED light of hardware circuit pin(LED_1,LED_2;The number of LED light It is determined according to required breakpoint number, here by taking 2 LED as an example)The lead that can input low and high level with one (Line_onoff).
When debugging the assembly code before opening page table, the control program implemented function such as is inserted into corresponding position:Root According to the number (breakpoint number) of input, by the light on and off of binary-coded form control LED;The state of line_onoff is read, it is high Level then jump out this control program and continue to run forward by program, and low level is then rested in the control instruction, until line_ Onoff then jumps out for height.Control flow chart is as shown in Figure 1.In the present embodiment, 2 LED can make a call to 3 breakpoints, 3 breakpoints The light on and off of LED light are as follows:
Breakpoint 1(01):LED_1 goes out, and LED_2 is bright;
Breakpoint 2(10):LED_1 is bright, and LED_2 goes out;
Breakpoint 3(11):LED_1 is bright, and LED_2 is bright.
By setting breakpoint number, and according to the combination light on and off situation of LED, it can be easily tracked what code to be debugged performed Sequentially.Simultaneously line_onoff is made to connect low and high level and can go to control routine at breakpoint whether to continue to execute, it is defeated in lead Enter low level control code to be debugged at breakpoint to stop, input high level controls code to be debugged to continue to run at breakpoint.
In other one embodiment, it can achieve the effect that make a call to 7 breakpoints by external 3 LED etc., it is other real Existing step is same as the previously described embodiments.
The present invention is converged by external LED light and using the display methods of binary coded form in Embedded Linux System It compiles in startup program and calls the LED light control method, can very easily play the role of setting breakpoint and Break point operation, Solve the problems, such as that the assembly code debugging of the embedded systems startup stage such as linux is difficult well.
Although specifically showing and describing the present invention with reference to preferred embodiment, those skilled in the art should be bright In vain, do not departing from the spirit and scope of the present invention that the appended claims are limited, it in the form and details can be right The present invention makes a variety of changes, and is protection scope of the present invention.

Claims (2)

1. a kind of adjustment method for starting code for embedded system compilation, which is characterized in that including:
In the external LED light of the hardware circuit of embedded system and the lead of low and high level can be inputted;
Control program is inserted into the corresponding position of code to be debugged, which is compiled according to the breakpoint number of input with binary system The light on and off of the form control LED light of code, the control program read (CP read) take the input state of the lead of input low and high level, input high level Then program is jumped out the control program and is continued to run with, and input low level is then rested in control program, until input state is defeated Enter high level and then jump out Xun Huan;
After insertion control program, input breakpoint number is treated debugging code and is debugged;
The implementation status of breakpoint is obtained by the light on and off situation of LED light, and passes through lead input low level and controls code to be debugged Stop at breakpoint, input high level controls code to be debugged to be continued to run at breakpoint.
2. the adjustment method according to claim 1 for starting code for embedded system compilation, which is characterized in that described The quantity of external LED light is determined according to the quantity of breakpoint.
CN201610983786.2A 2016-11-09 2016-11-09 A kind of adjustment method for starting code for embedded system compilation Pending CN108062274A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610983786.2A CN108062274A (en) 2016-11-09 2016-11-09 A kind of adjustment method for starting code for embedded system compilation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610983786.2A CN108062274A (en) 2016-11-09 2016-11-09 A kind of adjustment method for starting code for embedded system compilation

Publications (1)

Publication Number Publication Date
CN108062274A true CN108062274A (en) 2018-05-22

Family

ID=62137587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610983786.2A Pending CN108062274A (en) 2016-11-09 2016-11-09 A kind of adjustment method for starting code for embedded system compilation

Country Status (1)

Country Link
CN (1) CN108062274A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112000375A (en) * 2020-07-13 2020-11-27 深圳市智微智能软件开发有限公司 Starting stage judgment method, device, equipment and storage medium of android system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1752946A (en) * 2005-10-31 2006-03-29 大唐微电子技术有限公司 Debugging method of embedded system and its system
CN101739322A (en) * 2008-11-14 2010-06-16 鸿富锦精密工业(深圳)有限公司 Test device and method of embedded system
CN102253859A (en) * 2010-05-21 2011-11-23 康佳集团股份有限公司 Embedded device system deadlock debugging device and method
CN102902624A (en) * 2012-11-09 2013-01-30 上海斐讯数据通信技术有限公司 Software debugging system and method
US20160292057A1 (en) * 2014-02-21 2016-10-06 Segger Microcontroller Gmbh & Co. Kg Real time terminal for debugging embedded computing systems

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1752946A (en) * 2005-10-31 2006-03-29 大唐微电子技术有限公司 Debugging method of embedded system and its system
CN101739322A (en) * 2008-11-14 2010-06-16 鸿富锦精密工业(深圳)有限公司 Test device and method of embedded system
CN102253859A (en) * 2010-05-21 2011-11-23 康佳集团股份有限公司 Embedded device system deadlock debugging device and method
CN102902624A (en) * 2012-11-09 2013-01-30 上海斐讯数据通信技术有限公司 Software debugging system and method
US20160292057A1 (en) * 2014-02-21 2016-10-06 Segger Microcontroller Gmbh & Co. Kg Real time terminal for debugging embedded computing systems

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WOWO: "通过点亮LED的方法调试嵌入式代码", 《HTTP://WWW.WOWOTECH.NET/SOFT/DEBUG_USING_LED.HTML》 *
王云飞: "嵌入式实时操作系统内核设计与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112000375A (en) * 2020-07-13 2020-11-27 深圳市智微智能软件开发有限公司 Starting stage judgment method, device, equipment and storage medium of android system
CN112000375B (en) * 2020-07-13 2023-12-26 深圳市智微智能软件开发有限公司 Method, device, equipment and storage medium for judging startup stage of android system

Similar Documents

Publication Publication Date Title
US7185321B1 (en) Method and system for debugging through supervisory operating codes and self modifying codes
US9836384B2 (en) Testing device for real-time testing of a virtual control unit
CN102236621B (en) Computer interface information configuration system and method
Gurdeep Singh et al. WARDuino: a dynamic WebAssembly virtual machine for programming microcontrollers
CN110580226B (en) Object code coverage rate testing method, system and medium for operating system level program
US20080133897A1 (en) Diagnostic apparatus and method
JPH08272648A (en) Method for automatically generating debugging command file and device for automatically regenerating break point in debugging command file
US9898388B2 (en) Non-intrusive software verification
WO2005111801A3 (en) Apparatus and method for improving emulation speed of high-level languages in on-chip emulation systems
CN105159738A (en) Hot patch implementation method and system
RU2010114709A (en) METHOD FOR AUTOMATIC GENERATION SCENARIO FOR CHECKING THE CORRECTNESS OF THE FUNCTIONAL SOFTWARE OF THE SYSTEM INSTALLED ON THE BOARD OF THE AIRCRAFT AND THE DEVICE FOR APPLICATION OF THE METHOD
CN104699523B (en) For the adjustment method and system of the application program that hardware platform is developed
CN101630258A (en) Embedded Linux software integration development system on Windows platform and construction method thereof
US9477579B2 (en) Embedded software debug system with partial hardware acceleration
WO2022227410A1 (en) Embedded terminal remote software debugging method
US8230402B2 (en) Testing and debugging of dynamic binary translation
CN105740139B (en) A kind of debugging embedded software method based on virtual environment
CN112084113A (en) Configurable automatic test method and system based on embedded simulation verification software
US9639343B2 (en) Method for altering execution of a program, debugger, and computer-readable medium
CN111400997B (en) Processor verification method, system and medium based on synchronous execution
JP2008033849A (en) Fault analysis system
CN105824750B (en) A kind of soft breakpoint analogy method in the debugging of the NorFlash program spaces
CN108062274A (en) A kind of adjustment method for starting code for embedded system compilation
CN109144849B (en) Embedded software debugging method
US8914274B1 (en) Method and system for instruction set simulation with concurrent attachment of multiple debuggers

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180522

RJ01 Rejection of invention patent application after publication