CN103885885A - Method for using WiFi to carry out simulation an ddebugging on embedded software - Google Patents

Method for using WiFi to carry out simulation an ddebugging on embedded software Download PDF

Info

Publication number
CN103885885A
CN103885885A CN201410150187.3A CN201410150187A CN103885885A CN 103885885 A CN103885885 A CN 103885885A CN 201410150187 A CN201410150187 A CN 201410150187A CN 103885885 A CN103885885 A CN 103885885A
Authority
CN
China
Prior art keywords
nfs
debugging
host
wifi
target machine
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
CN201410150187.3A
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.)
ZHUHAI GOTECH ELECTRONIC TECHNOLOGY Co Ltd
Original Assignee
ZHUHAI GOTECH ELECTRONIC TECHNOLOGY 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 ZHUHAI GOTECH ELECTRONIC TECHNOLOGY Co Ltd filed Critical ZHUHAI GOTECH ELECTRONIC TECHNOLOGY Co Ltd
Priority to CN201410150187.3A priority Critical patent/CN103885885A/en
Publication of CN103885885A publication Critical patent/CN103885885A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention relates to a method for using WiFi to carry out simulation and debugging on embedded software. The method includes the first step that a host machine and a target machine are respectively provided with a WiFi transceiver, the WiFi transceiver of the host machine is matched with the WiFi transceiver of the target machine, the host machine and the target machine are connected with the same router through the WiFi transceiver of the host machine and the WiFi transceiver of the target machine respectively, and then WiFi wireless connection is achieved; an NFS is downloaded and installed on the host machine, and a folder on the host machine is used as a shared folder; the target machine accesses the shared folder through the NFS and carries out simulation and debugging. In this way, simulation and debugging on the embedded software can be effectively, conveniently and quickly completed, and a file system on the host machine can be directly mounted on a development board through the NFS, so the programming frequency of a program can be reduced, the service life of a Flash is prolonged, the development rate is increased, and the development cycle is shortened; meanwhile, the target machine is in WiFi wireless connection with the host machine, so simulation and debugging can be carried out without distance limitation.

Description

A kind of WiFi of use carries out the method for artificial debugging to embedded software
Technical field
The invention belongs to debugging embedded software technical field, relate in particular to a kind of WiFi of use embedded software is carried out the method for artificial debugging.
Background technology
At present, be unable to do without debugging in embedded software developing process, the importance of program debug not second to writing code, because one is designed to obtain good program again, also there will be mistake unavoidably, and these mistakes need to be got rid of by debugging.
General debugging is by program burn writing is entered to Flash, then allow development board move proving program to mistake.This method has not only reduced the life-span of Flash (because programming program is to wipe Flash, and then Burning flash, and the number of times of wiping and read and write of Flash is limited), and seriously reduced efficiency, need the regular hour because wipe Flash and write Flash.
Summary of the invention
For solving the above-mentioned problems in the prior art, the invention provides a kind of emulation, debugging that can complete effectively, quickly and easily embedded software, the programming number of times of minimizing program, extend the Flash life-span, tempo of development is high, construction cycle is short, is not subject to the use WiFi of distance limit embedded software to be carried out to the method for artificial debugging in artificial debugging simultaneously.
For solving the problems of the technologies described above, the present invention adopts following technical scheme:
Use WiFi embedded software to be carried out to a method for artificial debugging, first on host and target machine, be respectively equipped with the WiFi transceiver matching, and be connected on same router by WiFi transceiver each other, realize WiFi wireless connections; Then on host, download, network file system(NFS) NFS is installed, and using a file on it as Shared Folders; Ideal machine is accessed this Shared Folders by network file system(NFS) NFS, and carries out emulation, debugging.
Further, institute's " emulation " specifically includes following steps:
A. host is restarted network file system(NFS) NFS;
B. the self-starting script of modifying target machine, allows it not want automatic carry;
C. carry out carry order, make target machine carry to the network file system(NFS) NFS of host;
D. target machine operation starts the order of gdbserver, sends signal to application program, and application program is stopped so that the signal that the gdb on host sends is debugged;
E. host sends debug command to the gdbserver on target machine, completes emulation.
Further, described " debugging " be mainly by insertion debug stake mode carry out, be specially by adding respectively some functional module in destination OS and debugger, the two exchanges information to debug.
Further, described debugger is Gdb Techniques of Cross Debugger, comprises GdbServer and Gdb two parts, and described GdbServer is arranged on target machine as debugging stake, and described Gdb is as residing in local Gdb debugger.
The invention has the beneficial effects as follows:
The present invention passes through technique scheme, can be effectively, convenient, complete quickly the emulation of embedded software, debugging, and by the directly file system on carry host on development board of network file system(NFS) NFS, the programming number of times of minimizing program, not only extend the life-span of Flash, also improve tempo of development, shorten the construction cycle, between target machine and host, adopt WiFi wireless connections simultaneously, allow the artificial debugging of some resource-constrained products become possibility, avoid the limited problem of artificial debugging middle distance, further improve development efficiency, the speed of having accelerated searching problem and having dealt with problems.
In addition, between target machine and host, adopt Gdb Techniques of Cross Debugger, in the time of artificial debugging, can realize effective tracking, the speed of also further having accelerated searching problem and having dealt with problems, development efficiency is higher.
Brief description of the drawings
Fig. 1 is a kind of WiFi of use of the present invention carries out the embodiment of the method for artificial debugging schematic flow sheet to embedded software;
Fig. 2 is a kind of WiFi of use of the present invention carries out emulation in the embodiment of the method for artificial debugging schematic flow sheet to embedded software.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
As shown in Figures 1 and 2,
A kind of WiFi of use described in the embodiment of the present invention carries out the method for artificial debugging to embedded software, first on host and target machine, be respectively equipped with the WiFi transceiver matching, and be connected on same router by WiFi transceiver each other, realize WiFi wireless connections; Then on host, download, network file system(NFS) NFS is installed, and using a file on it as Shared Folders; Ideal machine is accessed this Shared Folders by network file system(NFS) NFS, and carries out emulation, debugging.
Wherein, institute's " emulation " specifically includes following steps:
Steps A 1. hosts are restarted network file system(NFS) NFS;
The self-starting script of steps A 2. modifying target machines, allows it not want automatic carry;
Steps A 3. is carried out carry order, makes target machine carry to the network file system(NFS) NFS of host;
Steps A 4. target machine operations start the order of gdbserver, send signal to application program, and application program is stopped so that the signal that the gdb on host sends is debugged;
Steps A 5. hosts send debug command to the gdbserver on target machine, complete emulation.
Described " debugging " be mainly by insertion debug stake mode carry out, be specially by adding respectively some functional module in destination OS and debugger, the two exchanges information to debug, and debugger is Gdb Techniques of Cross Debugger, comprise GdbServer and Gdb two parts, described GdbServer is arranged on target machine as debugging stake, and described Gdb is as residing in local Gdb debugger.
Taking ubantu system as example, the method for artificial debugging of the present invention is described below.
Network file system(NFS) NFS:$ sudo apt-get install nfs-kernel-server nfs-common portmap is downloaded and installed to a1.ubantu main frame (host).A2. configure shared file: using a file/work/nfs_root on host as Shared Folders.A3. open configuration file: $ sudo gedit/etc/exports, and general/work/nfs_root * (rw, sync, no_root_squash) to be added on this file last, and between nfs_root and *, must have space, and No. * with just there is no space below; Wherein represent ip address (can be also a definite network segment) for No. *, * representative allows all network segment access, and rw is read-write authority, and preservation can be upgraded this file by sudo exportfs-rv.
A4. restart NFS service: sudo/etc/init.d/portmap restart, sudo/etc/init.d/nfs-kernel-server restart.
A5. test the NFS service of host no build whether correct: local test: $ sudo mount 192.168.1.1:/home/workspace/nfs/root/mnt; After execution, before can finding under mnt catalogue, shared catalogue builds successfully; The IP that wherein 192.168.1.1 is host.
A6. host is plugged wireless network card (host that carries wireless network card can be with the wireless network card carrying), be connected to that on a router, (target machine also must be connected on this router, be that host and target machine must be at the same network segments, could realize like this mutual of host and target machine).
A7. host is restarted NFS service: sudo/etc/init.d/portmap restart.
A8. (this file is an example to the self-starting script/nfs/etc/rcS.d/S01mount of modifying target machine, can be the different files in different path, must determine according to actual conditions), the order of automatic carry is commented out, to carry out ensuing carry order.
A9. carry out carry order: mount-t nfs-o tcp, nolock, rw 192.168.1.1:/home/workspace/nfs/root/app.
A10. the order of operation startup gdbserver on target machine: ./gdbserver 192.168.1.1:2345 ./app/out.elf starts.
A11. on host, move arm-linux-gdb ./app/out.elf target remote192.168.1.1:2345, the gdbserver on target machine sends debug command.
A12. target machine and host by destination OS and respectively GdbServer and the Gdb of Gdb Techniques of Cross Debugger mounted thereto exchange information, complete the debugging of functional module.
Like this, the method of embedded software being carried out to artificial debugging by use WiFi of the present invention gets final product effectively, convenient, complete quickly the emulation of embedded software, debugging, and by the directly file system on carry host on development board of network file system(NFS) NFS, the programming number of times of minimizing program, not only extend the life-span of Flash, also improve tempo of development, shorten the construction cycle, between target machine and host, adopt WiFi wireless connections simultaneously, allow the artificial debugging of some resource-constrained products become possibility, avoid the limited problem of artificial debugging middle distance, further improve development efficiency, the speed of having accelerated searching problem and having dealt with problems.
In addition, between target machine and host, adopt Gdb Techniques of Cross Debugger, in the time of artificial debugging, can realize effective tracking, the speed of also further having accelerated searching problem and having dealt with problems, development efficiency is higher.
The above is the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications are also considered as protection scope of the present invention.

Claims (4)

1. a method that uses WiFi embedded software to be carried out to artificial debugging, it is characterized in that, first on host and target machine, be respectively equipped with the WiFi transceiver matching, and be connected on same router by WiFi transceiver each other, realize WiFi wireless connections; Then on host, download, network file system(NFS) NFS is installed, and using a file on it as Shared Folders; Ideal machine is accessed this Shared Folders by network file system(NFS) NFS, and carries out emulation, debugging.
2. use WiFi according to claim 1 carries out the method for artificial debugging to embedded software, it is characterized in that, described " emulation " specifically includes following steps:
A. host is restarted network file system(NFS) NFS;
B. the self-starting script of modifying target machine, allows it not want automatic carry;
C. carry out carry order, make target machine carry to the network file system(NFS) NFS of host;
D. target machine operation starts the order of gdbserver, sends signal to application program, and application program is stopped so that the signal that the gdb on host sends is debugged;
E. host sends debug command to the gdbserver on target machine, completes emulation.
3. use WiFi according to claim 1 and 2 carries out the method for artificial debugging to embedded software, it is characterized in that, described " debugging " be mainly by insertion debug stake mode carry out, be specially by adding respectively some functional module in destination OS and debugger, the two exchanges information to debug.
4. use WiFi according to claim 3 carries out the method for artificial debugging to embedded software, it is characterized in that, described debugger is Gdb Techniques of Cross Debugger, comprise GdbServer and Gdb two parts, described GdbServer is arranged on target machine as debugging stake, and described Gdb is as residing in local Gdb debugger.
CN201410150187.3A 2014-04-15 2014-04-15 Method for using WiFi to carry out simulation an ddebugging on embedded software Pending CN103885885A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410150187.3A CN103885885A (en) 2014-04-15 2014-04-15 Method for using WiFi to carry out simulation an ddebugging on embedded software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410150187.3A CN103885885A (en) 2014-04-15 2014-04-15 Method for using WiFi to carry out simulation an ddebugging on embedded software

Publications (1)

Publication Number Publication Date
CN103885885A true CN103885885A (en) 2014-06-25

Family

ID=50954793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410150187.3A Pending CN103885885A (en) 2014-04-15 2014-04-15 Method for using WiFi to carry out simulation an ddebugging on embedded software

Country Status (1)

Country Link
CN (1) CN103885885A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104683475A (en) * 2015-03-16 2015-06-03 小米科技有限责任公司 Method and device for configuring shared folder
CN105530126A (en) * 2015-12-11 2016-04-27 浪潮电子信息产业股份有限公司 Redhat system series-based nfs service construction method
WO2016169079A1 (en) * 2015-04-23 2016-10-27 中兴通讯股份有限公司 Mobile terminal wireless storage method and system
CN106878100A (en) * 2015-12-11 2017-06-20 全球能源互联网研究院 A kind of method of testing and system of ellipse curve public key cipher security coprocessor
CN108989295A (en) * 2018-06-28 2018-12-11 郑州云海信息技术有限公司 A kind of nfs client carry authority control method
CN110673961A (en) * 2018-07-03 2020-01-10 山东华软金盾软件股份有限公司 Remote debugging method based on NFS service

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6987961B1 (en) * 2004-06-28 2006-01-17 Neomagic Corp. Ethernet emulation using a shared mailbox between two processors in a feature phone
CN101741765A (en) * 2008-11-21 2010-06-16 联创汽车电子有限公司 vehicle-mounted gateway
CN103577210A (en) * 2012-08-06 2014-02-12 广州三星通信技术研究有限公司 System and method for mounting between mobile terminals

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6987961B1 (en) * 2004-06-28 2006-01-17 Neomagic Corp. Ethernet emulation using a shared mailbox between two processors in a feature phone
CN101741765A (en) * 2008-11-21 2010-06-16 联创汽车电子有限公司 vehicle-mounted gateway
CN103577210A (en) * 2012-08-06 2014-02-12 广州三星通信技术研究有限公司 System and method for mounting between mobile terminals

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
邓华文: "ARM嵌入式Linux系统研究与开发", 《中国优秀硕士学位论文数据库信息科技辑》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104683475A (en) * 2015-03-16 2015-06-03 小米科技有限责任公司 Method and device for configuring shared folder
CN104683475B (en) * 2015-03-16 2018-06-12 小米科技有限责任公司 Shared Folders configuration method and device
WO2016169079A1 (en) * 2015-04-23 2016-10-27 中兴通讯股份有限公司 Mobile terminal wireless storage method and system
CN105530126A (en) * 2015-12-11 2016-04-27 浪潮电子信息产业股份有限公司 Redhat system series-based nfs service construction method
CN106878100A (en) * 2015-12-11 2017-06-20 全球能源互联网研究院 A kind of method of testing and system of ellipse curve public key cipher security coprocessor
CN108989295A (en) * 2018-06-28 2018-12-11 郑州云海信息技术有限公司 A kind of nfs client carry authority control method
CN110673961A (en) * 2018-07-03 2020-01-10 山东华软金盾软件股份有限公司 Remote debugging method based on NFS service

Similar Documents

Publication Publication Date Title
CN103885885A (en) Method for using WiFi to carry out simulation an ddebugging on embedded software
CN103744695B (en) Operating system remote installation method and system based on PXE
CN103150188B (en) The compatible video card fast initializing method of the x86 of non-x 86 instruction set computer
CN110618903A (en) Electronic equipment testing method and device
WO2021129551A1 (en) Method and system for testing pcba board, and test device and micro control unit
CN102346235A (en) Automatic test system and method for hardware device function
CN103164523A (en) Inspection method, device and system of data consistency inspection
CN109783340B (en) SoC test code programming method, IP test method and device
WO2016078263A1 (en) Upgrading control device and terminal, terminal upgrading method and system, and storage medium
CN104317618A (en) Firmware partitioning method and device
US12008171B2 (en) Program download method for intelligent terminal with memory card identifier and intelligent terminal with memory card identifier
CN103677885A (en) ARM FLASH simple program programming method
CN103593269A (en) Automatic cyclic test method of restart pressure of multiple PCIe devices
CN113900693B (en) Firmware upgrading method, device and system, electronic equipment and storage medium
CN103123605A (en) Android platform automation integration testing method and device
CN106569854B (en) Method and system for setting equipment firmware and realizing factory test
CN107770299A (en) A kind of MAC Address writes with a brush dipped in Chinese ink method, system, device and storage medium
CN109460359A (en) A kind of software version test method and system for embedded device
CN106789409A (en) The detection method and device of a kind of server slot
CN106020869B (en) The method of the CAN bus based multiple single-chip microcontroller node procedures of selectively burning
CN110941520B (en) Hardware function test system and method based on two-out-of-two safety control unit
CN105743707A (en) Method for testing BMC log analysis function based on Redhat system
CN104731617A (en) Server starting device determining method
CN111371610A (en) Network card firmware batch refreshing method, system, terminal and storage medium
WO2024113571A1 (en) Polarity inversion method and apparatus, and storage medium and electronic apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 519000 Guangdong city in Zhuhai Province town of Red Bay Area Yongda Road No. 66 No. 2 building

Applicant after: ZHUHAI MAIKE INTELLIGENT TECHNOLOGY CO., LTD.

Address before: 519000 Guangdong city in Zhuhai Province town of Red Bay Area Yongda Road No. 66

Applicant before: Zhuhai Gotech Electronic Technology Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: ZHUHAI GOTECH ELECTRONIC TECHNOLOGY CO., LTD. TO: ZHUHAI MAIKE INTELLIGENT TECHNOLOGY CO., LTD.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20140625