CN107341079B - Automatic serial port debugging system and method - Google Patents
Automatic serial port debugging system and method Download PDFInfo
- Publication number
- CN107341079B CN107341079B CN201710529665.5A CN201710529665A CN107341079B CN 107341079 B CN107341079 B CN 107341079B CN 201710529665 A CN201710529665 A CN 201710529665A CN 107341079 B CN107341079 B CN 107341079B
- Authority
- CN
- China
- Prior art keywords
- debugging
- feedback information
- serial port
- information
- control module
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2205—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
- G06F11/221—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test buses, lines or interfaces, e.g. stuck-at or open line faults
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Programmable Controllers (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses an automatic serial port debugging system and method, and belongs to the technical field of embedded system serial port debugging. The VxWorks system control module is connected with the debugging bottom plate through an intensive connector; one side of the debugging bottom plate is connected with the PC through an RS232 serial port line and a network cable respectively; the other side of the debugging bottom plate is connected with a power supply through a power line; the PC is provided with a serial port setting module, and the serial port setting module comprises a port selection unit and a baud rate selection unit and can control the port to be closed or opened; the PC is provided with a receiving module, receives the echoed data information from the VxWorks system control module, and can automatically judge and select the display mode and the sending mode of the information. The invention can automatically complete the debugging task, does not generate input errors, greatly reduces the debugging workload, and has a striking reminding mark after completion.
Description
Technical Field
The invention belongs to the technical field of embedded system serial port debugging, and particularly relates to an automatic serial port debugging system and method.
Background
The operating system of the PowerPC processor in the main control module of some electronic equipment is VxWorks6.8, before debugging, the debugging computer is connected with the PowerPC hardware system by using RS232 serial port lines and network cables, and the connection block diagram is shown in figure 1. And then burning configuration files of the CPLD and the FPGA and a BootROM program of the FLASH, then setting an FTP network loading tool and an RS232 serial port debugging tool and powering up again, wherein after the PowerPC processor starts to operate, a debugging computer loads VxWorks system files to the PowerPC through a network port and the FTP tool to operate on line, and then the serial port debugging of the VxWorks6.8 system can be started.
And receiving VxWorks system information and sending instructions through a debugging computer RS232 serial port terminal, and completing debugging tasks such as FALSH storage space formatting, system information checking, VxWorks file copying, starting parameter modification and the like. The manual input of various English instructions is needed for completing the debugging tasks, the number of the English instructions is as many as 20, the character format is complex and difficult to remember, and the defects of the manual input are as follows:
1) the input quantity of characters is large, visual fatigue is easy to generate, and errors are easy to make;
2) the debugging time is long, and the production efficiency is low;
3) and no prompt of 'debugging is completed' after debugging is completed.
Disclosure of Invention
The purpose of the invention is as follows: in order to solve the problems, the invention provides an automatic serial port debugging system and method, which can automatically complete the debugging task, avoid input errors, greatly reduce the debugging workload and have a striking reminding mark after completion.
The technical scheme of the invention is that the serial port automatic debugging system comprises: the VxWorks system control module, the debugging bottom plate, the RS232 serial port line, the network cable PC, the power supply and the power supply line;
the VxWorks system control module is connected with the debugging bottom plate through an intensive connector;
one side of the debugging bottom plate is connected with the PC through an RS232 serial port line and a network cable respectively;
the other side of the debugging bottom plate is connected with the power supply through a power line;
the PC is provided with a serial port setting module, the serial port setting module comprises a port selection unit and a baud rate selection unit, and can control the port to be closed or opened;
the PC is provided with a receiving module, the receiving module receives feedback information from the VxWorks system control module, and can automatically judge and select a display mode and a sending mode of the information.
Preferably, the receiving module information display mode is an additional mode or an overlay mode.
Preferably, when the feedback information of the VxWorks system control module continuously received by the receiving module is the same as the previous feedback information, the receiving module sends a command different from the previous command to the VxWorks system control module.
An automatic serial port debugging method comprises the following steps:
initializing a serial port setting module, including setting a port and a baud rate;
step two, the receiving module automatically receives command feedback information of the VxWorks system control module;
step three, the receiving module analyzes the command feedback information of the VxWorks system control module;
searching keywords for the feedback information, and if the keywords appear, displaying the information of the row where the keywords are located in a covering manner; otherwise, additional display is carried out;
carrying out keyword retrieval on the feedback information, and automatically sending corresponding command information if the keyword appears;
and step four, when the keywords of the end mark are searched, the system automatically completes debugging in a default mode and gives a prompt that the debugging is completed.
Preferably, in the third step, the feedback information is retrieved, and if the nth received information is the same as the nth-1 received information, the VxWorks system control module sends a different command after receiving the nth and sending a different command after receiving the nth-1.
Preferably, in the third step, if there are multiple lines of received feedback information, the keyword is located at the end of the last line of the feedback information;
if the received feedback information has only one line, searching all the feedback information;
and if the received feedback information is less than one line, searching the existing information of the current line.
Preferably, the feedback information is determined to be correct if the feedback information detects a corresponding keyword.
The technical scheme of the invention has the beneficial effects that: the automatic serial port debugging system and the automatic serial port debugging method are developed by adopting C # language, and have the advantages of higher efficiency, lower cost and stronger function; the input of the instruction is not sent at regular time, but is executed downwards only if the returned information is correct according to the information returned by the main control board, so that the correctness of the finished result can be ensured; the operation workload of debugging personnel is greatly reduced, no input error occurs, and the debugging production efficiency is improved.
Drawings
Fig. 1 is a schematic diagram illustrating a preferred embodiment of an automatic serial port debugging system according to the present invention;
FIG. 2 is a schematic flow chart of a preferred embodiment of an automatic serial port debugging method according to the present invention;
the system comprises a 1-VxWorks system control module, a 2-debugging bottom plate, a 3-network cable, a 4-RS232 serial port line, a 5-PC, a 6-power supply and a 7-power supply line.
Detailed Description
In order to make the implementation objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be described in more detail below with reference to the accompanying drawings in the embodiments of the present invention. In the drawings, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The described embodiments are only some, but not all embodiments of the invention. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate orientations or positional relationships based on those shown in the drawings, and are used merely for convenience in describing the present invention and for simplifying the description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the scope of the present invention.
The following detailed description of the embodiments of the present invention is made with reference to the accompanying drawings, referring to fig. 1 to 2;
an automatic serial port debugging system comprises: the VxWorks system comprises a VxWorks system control module 1, a debugging bottom plate 2, an RS232 serial port line 3, a network cable 4, a PC (personal computer) 5, a power supply 6 and a power line 7;
the PC 5 is provided with a serial port setting module which comprises a port selection unit and a baud rate selection unit and can control the port to be closed or opened;
the PC 5 is provided with a receiving module, the receiving module receives feedback information from the VxWorks system control module, and can automatically judge and select a display mode and a sending mode of the information;
the receiving module information display mode is an additional mode or an overlay mode, and when the feedback information of the VxWorks system control module is received to be the same as the previous received information, a command different from the previous command is sent to the VxWorks system control module;
the VxWorks system control module 1 is connected with the debugging bottom plate 2 through an intensive connector, one side of the debugging bottom plate 2 is connected with the PC 5 through an RS232 serial port line 3 and a network cable 4, and the other side of the debugging bottom plate 2 is connected with the power supply 6 through a power line 7.
An automatic serial port debugging method comprises the following steps:
initializing a serial port setting module, setting a corresponding port and selecting a corresponding baud rate;
step two, the receiving module automatically receives command feedback information of the VxWorks system control module;
step three, the receiving module analyzes the command feedback information of the VxWorks system control module;
searching keywords for the feedback information, and if the keywords appear, displaying the information of the row where the keywords are located in a covering manner; otherwise, additional display is carried out;
carrying out keyword retrieval on the feedback information, and automatically sending corresponding command information if the keyword appears;
and step four, when the keywords of the end mark are searched, the system automatically defaults to finish debugging and gives a prompt.
In the embodiment, the feedback information is retrieved, and if the Nth received information is the same as the Nth-1 th received information, the VxWorks system control module sends a different command after receiving the Nth time than the Nth-1 th time;
if the received feedback information has a plurality of lines, the keyword is positioned at the tail of the last line of the feedback information;
if the received feedback information has only one line, searching all the feedback information;
and if the received feedback information is less than one line, searching the existing information of the current line.
It can be understood that: and if the feedback information detects the corresponding keyword, judging that the feedback information is correct.
The debugging system has the following use method:
the debugging system interface comprises a serial port setting area, a debugging system interface and a debugging interface, wherein the serial port setting area comprises a port and a baud rate selection frame, and buttons of opening the port and closing the port; a serial port sending button; a serial port receiving area; a serial port sending area;
the method comprises the steps that firstly, an external power supply 6 to be debugged is prepared, a PC 5 provided with a debugging system and an FTP network loading tool, a VxWorks system control board 1 and a debugging bottom board 2 of the debugging system are installed, a PC end and an RS232 serial port on a target board are connected through an RS232 serial port line 4, and the PC end and a network port on the target board are connected through a network cable 3.
Step two, opening FTP (the path of the FTP is the path of the VxWorks file to be copied) and the serial port debugging tool at the PC 5;
selecting a serial port number (the baud rate is default 9600) corresponding to the debugging tool and clicking a button for opening a port;
step four, electrifying the VxWorks target board, automatically receiving the VxWorks system operation information by the serial port receiving area, automatically detecting and judging whether the information is correct or not, automatically sending a corresponding command if the information is correct, and debugging personnel only need to wait for the automatic completion of the VxWorks target board, if: the returned information is automatically received according to the VxWorks protocol requirement, the VxWorks system is formatted, the file is copied, each parameter of the system is checked, the parameter modification is started and the like, after the completion, the center position of the tool page jumps out of a prompt box, the VxWorks system debugging is completed, and the debugging is completed after the vehicle returns is confirmed.
The method has simple serial port setting, shortens the debugging time from more than thirty minutes to 10 minutes, avoids complicated manual keyboard input operation, ensures the quality and improves the debugging production efficiency.
The automatic serial port debugging system and the automatic serial port debugging method are developed by adopting C # language, and have the advantages of higher efficiency, lower cost and stronger function; the input of the instruction is not sent at regular time, but is executed downwards only if the returned information is correct according to the information returned by the main control board, so that the correctness of the finished result can be ensured; the operation workload of debugging personnel is greatly reduced, no input error occurs, and the debugging production efficiency is improved.
Finally, it should be pointed out that: the above examples are only for illustrating the technical solutions of the present invention, and are not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (1)
1. An automatic serial port debugging method is characterized in that: the method comprises the following steps:
initializing a serial port setting module, including setting a port and a baud rate;
step two, the receiving module automatically receives command feedback information of the VxWorks system control module;
step three, the receiving module analyzes the command feedback information of the VxWorks system control module;
searching keywords for the feedback information, and if the keywords appear, displaying the information of the row where the keywords are located in a covering manner; otherwise, additional display is carried out;
carrying out keyword retrieval on the feedback information, and automatically sending corresponding command information if the keyword appears;
step four, when the keywords of the end mark are searched, the system automatically defaults to finish debugging and gives a prompt of finishing debugging;
in the third step, the feedback information is retrieved, and if the Nth received information is the same as the Nth-1-time received information, a different command is sent after the Nth receiving and sending of the VxWorks system control module than the Nth-1-time receiving;
in the third step, if the received feedback information has multiple lines, the keyword is located at the end of the last line of the feedback information;
if the received feedback information has only one row, searching all the feedback information of the whole row;
if the received feedback information is less than one line, searching the existing information of the current line;
and if the feedback information retrieves the corresponding keyword, the feedback information is judged to be correct.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710529665.5A CN107341079B (en) | 2017-07-02 | 2017-07-02 | Automatic serial port debugging system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710529665.5A CN107341079B (en) | 2017-07-02 | 2017-07-02 | Automatic serial port debugging system and method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107341079A CN107341079A (en) | 2017-11-10 |
CN107341079B true CN107341079B (en) | 2021-06-18 |
Family
ID=60219313
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710529665.5A Active CN107341079B (en) | 2017-07-02 | 2017-07-02 | Automatic serial port debugging system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107341079B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101566953A (en) * | 2009-02-12 | 2009-10-28 | 山东超越数控电子有限公司 | Method for transplanting VXWORKS operating system |
CN102495781A (en) * | 2011-11-30 | 2012-06-13 | 青岛海信信芯科技有限公司 | Debugging method and debugging system of SOC chip |
CN102541709A (en) * | 2010-12-27 | 2012-07-04 | 佛山市顺德区顺达电脑厂有限公司 | Serial port debugging tool and method |
-
2017
- 2017-07-02 CN CN201710529665.5A patent/CN107341079B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101566953A (en) * | 2009-02-12 | 2009-10-28 | 山东超越数控电子有限公司 | Method for transplanting VXWORKS operating system |
CN102541709A (en) * | 2010-12-27 | 2012-07-04 | 佛山市顺德区顺达电脑厂有限公司 | Serial port debugging tool and method |
CN102495781A (en) * | 2011-11-30 | 2012-06-13 | 青岛海信信芯科技有限公司 | Debugging method and debugging system of SOC chip |
Non-Patent Citations (3)
Title |
---|
VxWorks下的串口调试;谢李李;《2004年全国第五届嵌入式系统学术交流会论文集》;20041231;第125-129页 * |
基于ARM的嵌入式电阻层析成像测量系统设计;李涛;《中国优秀硕士学位论文全文数据库 信息科技辑》;20111115;正文第14-15,56-64页 * |
谢李李.VxWorks下的串口调试.《2004年全国第五届嵌入式系统学术交流会论文集》.2004,第125-129页. * |
Also Published As
Publication number | Publication date |
---|---|
CN107341079A (en) | 2017-11-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111310934B (en) | Model generation method and device, electronic equipment and storage medium | |
CN111080170B (en) | Workflow modeling method and device, electronic equipment and storage medium | |
US20060282248A1 (en) | Integrated simulation system | |
US20210089279A1 (en) | Code Generation And Simulation For Graphical Programming | |
CN104750514B (en) | Configure the system and safety relay program configuration method of industry security relay | |
CN113360144B (en) | Auxiliary processing method, device, storage medium and program product for software development | |
CN110427459B (en) | Visual generation method, system and platform of voice recognition network | |
CN111722842A (en) | Pipeline arranging method and device, electronic equipment and storage medium | |
CN109598427A (en) | Management method, device and the electronic equipment of robot | |
CN114153477B (en) | PCIE driving card firmware upgrading method, device, system, equipment and medium | |
CN111475188A (en) | Power module firmware updating method, device, equipment and storage medium | |
CN107341079B (en) | Automatic serial port debugging system and method | |
US20110098988A1 (en) | Methods and Apparatus for Designing Device-to-Device Configurations Suitable to be used in a Power System | |
CN106201790B (en) | A kind of adjustment method and debugging system based on DSDT table | |
CN110413515A (en) | A kind of bios code walks checking method, system and code walkthrough tool automatically | |
CN114398290B (en) | Program debugging method, device, equipment and medium | |
CN112363874B (en) | Equipment debugging method and device, heating and ventilation equipment and computer readable storage medium | |
CN210804398U (en) | Interactive interface testing device based on artificial vision and independent of public network system | |
CN107679264B (en) | Method for assisting in checking dislocation of bit numbers in PCB design | |
CN112099779B (en) | Method and related device for generating visual operation interface | |
CN112204480B (en) | Information processing apparatus and computer-readable recording medium | |
CN110778349B (en) | Automatic control method, storage medium and system for fully mechanized coal mining face support | |
US20210018888A1 (en) | Automated programming of a programmable-logic controller (plc) of a microcontroller using an expert system | |
US11762364B2 (en) | Automated programming of a programmable-logic controller (PLC) of a microcontroller using an expert system | |
EP4174639A1 (en) | Auxiliary processing method and device for software development, storage medium and program product |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |