CN102999422A - Efficient embedded system debugging method - Google Patents
Efficient embedded system debugging method Download PDFInfo
- Publication number
- CN102999422A CN102999422A CN2012104366713A CN201210436671A CN102999422A CN 102999422 A CN102999422 A CN 102999422A CN 2012104366713 A CN2012104366713 A CN 2012104366713A CN 201210436671 A CN201210436671 A CN 201210436671A CN 102999422 A CN102999422 A CN 102999422A
- Authority
- CN
- China
- Prior art keywords
- bootloader
- starter
- flash
- initialization
- program
- 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.)
- Granted
Links
Images
Landscapes
- Stored Programmes (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses an efficient embedded system debugging method which comprises the steps of: 1, first editing a starter program, wherein the starter program can carry out initialization on system hardware; 2, adopting kermit, xmodem or zmodem to develop a serial-port based protocol; 3, carrying out initialization on the system hardware via the starter program, if successful, implementing step 4, and if not successful, referring to the execution process of OSS (open source software) code uboot in the initialization process; and step 4, carrying out detection. With the method disclosed by the invention, bootloader can be loaded for debugging by starter. Even if bootloader fails, only the bootloader needs to be reloaded, and burning of starter is not needed.
Description
Technical field
The present invention relates to the software development technical field of measurement and test, more particularly, particularly a kind of high-efficiency embedded type system debug method.
Background technology
In the informationized society of high speed development, there are every day new technology and new product to be invented release, various embedded devices are deployed to every field.In the process of research and development new product, particularly debug the bootloader stage, new function of every debugging or when solving a new bug and losing efficacy, we must tear flash again open, burning flash, welding flash; Perhaps we have high-tech debugging acid such as Trace etc., but we must be in the face of the price of their costliness and impaired uncertainty etc., for this reason, finding one, how important avoid often dismantling the method that flash can also direct burning be, but also can reducing development cost.
Summary of the invention
The technical problem to be solved in the present invention is for providing a kind of high-efficiency embedded type system debug method, and this high-efficiency embedded type system debug method can be avoided occurring again tearing flash open, burning flash, and the situation of welding flash occurs.
For solving the problems of the technologies described above, the invention provides a kind of high-efficiency embedded type system debug method, comprise step:
S1, at first write the starter program, described starter program can be carried out initialization to system hardware;
S2, employing kermit, xmodem or zmodem exploitation serial port protocol;
S3, by in the starter program system hardware being carried out initialization, if initialization success then carry out S4; If initialization is unsuccessful, then initialization procedure can be with reference to the implementation of open source software code uboot;
S4, detect.
Preferably, in the starter program, increase the function by serial ports upgrading bootloader, and define function keys, the function key of before system hardware powers on, setting out, when moving, the starter program can whether be triggered by the automatic detection function key: if function key triggers, then load bootloader; If function key does not trigger, acquiescence continues to carry out from flash.
Preferably, bootloader is unsuccessful when loading, and then need again debug bootloader, is carrying out above same steps as; When loading the bootloader success, then by order bootloader is burnt to flash.
Preferably, when the starter program is moved, do not trigger if do not detect function key, if also do not have burning good bootloader among the flash this moment, then starter can give tacit consent to the interface of bootloader to be loaded such as resting on; If had burning good bootloader among the flash this moment, then directly start bootloader from flash.
The objective of the invention is to avoid often dismantling flash and can efficient and the reducing development cost of direct burning flash to improve debugging embedded system.Mainly be before the bootloader operation, carry out the starter program that we write ourselves, this program is mainly to the device (cpu of system's necessity, ddr, serial etc.) carry out initialization, and must support serial port protocol, such as kermit/xmodem/zmodem etc., and provide the function of serial ports upgrading Bootloader.After only needing the good starter of a burning, just can load debugging to bootloader by starter.Even the bootloader failure also only need to be reloaded Bootloader and be got final product, record starter does not need to reburn.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, the below will do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art, apparently, accompanying drawing in the following describes only is embodiments of the invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to the accompanying drawing that provides other accompanying drawing.
Fig. 1 is the process flow diagram of high-efficiency embedded type system debug method in an embodiment of the present invention;
Fig. 2 is the FB(flow block) of high-efficiency embedded type system debug method among the another kind of embodiment of the present invention.
Embodiment
Core of the present invention is for providing a kind of high-efficiency embedded type system debug method, and this high-efficiency embedded type system debug method can be avoided occurring again tearing flash open, burning flash, and the situation of welding flash occurs.
In order to make those skilled in the art understand better technical scheme of the present invention, the present invention is described in further detail below in conjunction with the drawings and specific embodiments.
Please refer to Fig. 1 and Fig. 2, wherein, Fig. 1 is the process flow diagram of high-efficiency embedded type system debug method in an embodiment of the present invention; Fig. 2 is the FB(flow block) of high-efficiency embedded type system debug method among the another kind of embodiment of the present invention.
The invention provides a kind of high-efficiency embedded type system debug method, comprise step:
S1, at first write the starter program, described starter program can be carried out initialization to system hardware;
S2, employing kermit, xmodem or zmodem exploitation serial port protocol;
S3, by in the starter program system hardware being carried out initialization, if initialization success then carry out S4; If initialization is unsuccessful, then initialization procedure can be with reference to the implementation of open source software code uboot;
S4, detect.
Particularly, in the starter program, increase the function by serial ports upgrading bootloader, and define function keys, the function key of before system hardware powers on, setting out, when moving, the starter program can whether be triggered by the automatic detection function key: if function key triggers, then load bootloader; If function key does not trigger, acquiescence continues to carry out from flash.
Particularly, bootloader is unsuccessful when loading, and then need again debug bootloader, is carrying out above same steps as; When loading the bootloader success, then by order bootloader is burnt to flash.
Particularly, when the starter program is moved, do not trigger if do not detect function key, if also do not have burning good bootloader among the flash this moment, then starter can give tacit consent to the interface of bootloader to be loaded such as resting on; If had burning good bootloader among the flash this moment, then directly start bootloader from flash.
The objective of the invention is to avoid often dismantling flash and can efficient and the reducing development cost of direct burning flash to improve debugging embedded system.Mainly be before the bootloader operation, carry out the starter program that we write ourselves, this program is mainly to the device (cpu of system's necessity, ddr, serial etc.) carry out initialization, and must support serial port protocol, such as kermit/xmodem/zmodem etc., and provide the function of serial ports upgrading Bootloader.After only needing the good starter of a burning, just can load debugging to bootloader by starter.Even the bootloader failure also only need to be reloaded Bootloader and be got final product, record starter does not need to reburn.
The technical matters that the present invention solves and the scheme of employing are: when general debugging new product, at first to debug bootloader, and in debug process, need multiple reversal to review the card debugging, this just inevitably goes repeatedly to dismantle flash and burning, so not only lose time, and can often integrated circuit board occur or flash is damaged.When debugging with simulator, must must bear its fancy price and impaired possibility.Propose my scheme: at first write an initialize routine starter.bin who simplifies most, only the device to cpu/ddr/serial/clock necessity carries out initialization in this program for this reason, and supports the function of serial port protocol and loading bootloader.When the debugging new product, need only starter.bin of burning, follow-uply just can debug bootloader by the function of the loading bootloader among the starter, when avoiding directly debugging bootloader, dismounting burning flash, and the instrument of using other, can improve debugging efficiency, reducing development cost like this.
Beneficial effect of the present invention is exactly: the starter burning program once after, just no longer change starter.How no matter how hardware adaptor device conversion, can load bootloader by starter and go debug hardware, can avoid causing because of debugging mistake or hardware adaptor problem dismantling that flash removes direct burning bootloader and time of wasting also can be saved the cost of buying simulation research and development device and be reduced cost.
In a specific embodiment of the present invention, its concrete operations comprise step:
1. system for writing and compiling initialize routine starter.bin, the similar general bootloader of this program, but more simplify the main necessary general device of initialization system: cpu/ddr/serial/clock than bootloader; Other devices to integrated circuit board do not operate;
2. in starter, increase the support to serial port protocol, and provide the function that loads bootloader according to serial port protocol.Can pass through this function debugging bootloader;
3. starter.bin is burnt to flash, before starter starts, press certain key as ' K '; After starter starts, whether pushing button according to detecting ' K ' determines whether to need to load bootloader; If have, then by serial ports instrument such as teraterm commonly used bootloader is loaded in the internal memory, make the Bootloader operation, if do not have, then directly from flash operation bootloader;
4. if when loading bootloader from starter, bootloader not operation gets up, failure when some external device of bootloader initialization or initialization function are described, again debugging compiling Bootloader also presses as above method loading bootloader, this saves many times than direct dismounting flash and burning bootloader, has improved efficiency of research and development.
Claims (4)
1. a high-efficiency embedded type system debug method is characterized in that, comprising:
Step 1, at first write the starter program, described starter program can be carried out initialization to system hardware;
Step 2, employing kermit, xmodem or zmodem exploitation serial port protocol;
Step 3, by in the starter program system hardware being carried out initialization, if initialization success then carry out step 4; If initialization is unsuccessful, then initialization procedure can be with reference to the implementation of open source software code uboot;
Step 4, detect.
2. high-efficiency embedded type system debug method according to claim 1, it is characterized in that, in the starter program, increase the function by serial ports upgrading bootloader, and define function keys, the function key of before system hardware powers on, setting out, when moving, the starter program can whether be triggered by the automatic detection function key: if function key triggers, then load bootloader; If function key does not trigger, acquiescence continues to carry out from flash.
3. high-efficiency embedded type system debug method according to claim 2 is characterized in that, bootloader is unsuccessful when loading, and then need again debug bootloader, is carrying out above same steps as; When loading the bootloader success, then by order bootloader is burnt to flash.
4. high-efficiency embedded type system debug method according to claim 3, it is characterized in that, when the starter program is moved, if not detecting function key triggers, if also do not have burning good bootloader among the flash this moment, then starter can give tacit consent to the interface of bootloader to be loaded such as resting on; If had burning good bootloader among the flash this moment, then directly start bootloader from flash.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210436671.3A CN102999422B (en) | 2012-11-06 | 2012-11-06 | A kind of high-efficiency embedded type system debug method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210436671.3A CN102999422B (en) | 2012-11-06 | 2012-11-06 | A kind of high-efficiency embedded type system debug method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102999422A true CN102999422A (en) | 2013-03-27 |
CN102999422B CN102999422B (en) | 2015-11-25 |
Family
ID=47928019
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210436671.3A Active CN102999422B (en) | 2012-11-06 | 2012-11-06 | A kind of high-efficiency embedded type system debug method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102999422B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103699467A (en) * | 2013-12-27 | 2014-04-02 | 无锡致新电子科技有限公司 | SOC chip burning and debugging method |
CN103761124A (en) * | 2014-01-06 | 2014-04-30 | 武汉烽火富华电气有限责任公司 | Method for starting embedded-type Linux system used for protection measuring and controlling device |
US9766899B2 (en) | 2015-12-28 | 2017-09-19 | Google Inc. | Bootloader control via device identifier |
CN114691227A (en) * | 2022-04-25 | 2022-07-01 | 紫光计算机科技有限公司 | Multi-mode starting method and device of BIOS (basic input output System), electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030033592A1 (en) * | 2001-08-06 | 2003-02-13 | Shintaro Tsubata | Software debugger and software development support system |
CN101639786A (en) * | 2009-09-08 | 2010-02-03 | 中兴通讯股份有限公司 | Method and device for guiding starting of embedded operation system |
CN101819552A (en) * | 2010-01-04 | 2010-09-01 | 深圳市共进电子有限公司 | Method for improving debugging speed during process of system development |
-
2012
- 2012-11-06 CN CN201210436671.3A patent/CN102999422B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030033592A1 (en) * | 2001-08-06 | 2003-02-13 | Shintaro Tsubata | Software debugger and software development support system |
CN101639786A (en) * | 2009-09-08 | 2010-02-03 | 中兴通讯股份有限公司 | Method and device for guiding starting of embedded operation system |
CN101819552A (en) * | 2010-01-04 | 2010-09-01 | 深圳市共进电子有限公司 | Method for improving debugging speed during process of system development |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103699467A (en) * | 2013-12-27 | 2014-04-02 | 无锡致新电子科技有限公司 | SOC chip burning and debugging method |
CN103699467B (en) * | 2013-12-27 | 2015-05-27 | 常州新超电子科技有限公司 | SOC chip burning and debugging method |
CN103761124A (en) * | 2014-01-06 | 2014-04-30 | 武汉烽火富华电气有限责任公司 | Method for starting embedded-type Linux system used for protection measuring and controlling device |
CN103761124B (en) * | 2014-01-06 | 2017-03-01 | 武汉烽火富华电气有限责任公司 | Embedded Linux system for protection supervisory equipment starts method |
US9766899B2 (en) | 2015-12-28 | 2017-09-19 | Google Inc. | Bootloader control via device identifier |
CN114691227A (en) * | 2022-04-25 | 2022-07-01 | 紫光计算机科技有限公司 | Multi-mode starting method and device of BIOS (basic input output System), electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN102999422B (en) | 2015-11-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102693144B (en) | A kind of method of capacitance plate firmware upgrade of Android mobile terminal | |
WO2013007068A1 (en) | Automatic test system and method oriented to functions of hardware apparatus | |
CN100461105C (en) | Update and repair method of intellectualized equipment and system thereof | |
CN102819442B (en) | A kind of method and system of embedded device program burn writing | |
CN103150188A (en) | Quick initialization method for x86 compatible display card of non-x86 instruction set computer | |
CN101634960A (en) | Method for revising BIOS parameter and regenerating checksum | |
TW200723107A (en) | Power-on error detection system and method | |
CN105760191A (en) | Embedded system equipment programming mass production method | |
CN102999422A (en) | Efficient embedded system debugging method | |
TW201407343A (en) | Test system and test method thereof | |
CN104951328A (en) | Embedded equipment and starting method thereof | |
JP2008009721A (en) | Evaluation system and evaluation method thereof | |
CN101267623A (en) | A booting construction method for a mobile phone | |
CN106066453A (en) | String line debugging bridge | |
CN105117255A (en) | Boot method and apparatus for BootLoader program | |
CN102520961A (en) | Off-chip online programmable SOC (system on a chip) and control method for same | |
US20030120977A1 (en) | Debugging method through serial port under system shutdown and standby conditions | |
CN105573913A (en) | Program debugging method and program debugging system in optical network unit (ONU) system | |
CN101950265A (en) | Method for CPU board card program downloading and hardware online detection and plug-in connector | |
CN105677429A (en) | Program burning method, processor and electronic circuit | |
CN106909382B (en) | Method and device for outputting different types of system starting information | |
CN104765626A (en) | Firmware program writing method and device | |
JP4940757B2 (en) | Mobile radio communication terminal, information collecting method and program when abnormality occurs | |
US9619355B2 (en) | Booting verification method of computer and electronic device | |
CN105045624A (en) | PowerPC mainboard and program writing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |