[go: up one dir, main page]

CN104503905B - The adjustment method and debugging system of a kind of embedded system - Google Patents

The adjustment method and debugging system of a kind of embedded system Download PDF

Info

Publication number
CN104503905B
CN104503905B CN201410776567.8A CN201410776567A CN104503905B CN 104503905 B CN104503905 B CN 104503905B CN 201410776567 A CN201410776567 A CN 201410776567A CN 104503905 B CN104503905 B CN 104503905B
Authority
CN
China
Prior art keywords
debugging
debugged
debugging mode
program file
embedded system
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
Application number
CN201410776567.8A
Other languages
Chinese (zh)
Other versions
CN104503905A (en
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.)
Zhaoyi Innovation Technology Group Co ltd
Original Assignee
GigaDevice Semiconductor Beijing Inc
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 GigaDevice Semiconductor Beijing Inc filed Critical GigaDevice Semiconductor Beijing Inc
Priority to CN201410776567.8A priority Critical patent/CN104503905B/en
Publication of CN104503905A publication Critical patent/CN104503905A/en
Application granted granted Critical
Publication of CN104503905B publication Critical patent/CN104503905B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses the adjustment method and debugging system of a kind of embedded system, this method includes setting debugging mode;The download address space of program file to be debugged is changed to map to random access memory by mapping to fast flash memory bank according to the debugging mode;The program file to be debugged is received, and the program file to be debugged is stored into the random access memory;Debugging instruction is received, and runs the debugging instruction, the program file to be debugged is debugged.The adjustment method and debugging system of embedded system of the present invention improve the speed that program file to be debugged is downloaded in debugging process, and improve the service life of embedded system.

Description

The adjustment method and debugging system of a kind of embedded system
Technical field
The present invention relates to embedded systems debugging field more particularly to a kind of adjustment method of embedded system and debugging systems System.
Background technology
Software development and test phase in embedded system can all debug the program write.In debugging process In, it is necessary to which program file to be debugged is downloaded in embedded system.
In the prior art, the download address space of program file to be debugged is the fast flash memory bank of embedded system (FLASH) address space of mapping.At this point, existing adjustment method will can continually write, amended program file is downloaded Into the FLASH.Since erasable FLASH is relatively time-consuming, if program file is bigger, downloading may need to expend every time Tens of seconds.In addition debugging is downloaded every time, all can erasable FLASH, and FLASH has certain service life, therefore existing adjustment method The service life of FLASH can be shortened, so as to influence the service life of entire embedded system.
The content of the invention
It is an object of the invention to propose a kind of adjustment method of embedded system and debugging system, existing skill can be solved Program file speed of download to be debugged is slow in art and FLASH short lifes caused by erasable FLASH repeatedly, entire embedding so as to influence The problem of service life of embedded system.
For this purpose, the present invention uses following technical scheme:
In a first aspect, the invention discloses a kind of adjustment method of embedded system, including:
Debugging mode is set;
The download address space of program file to be debugged is changed to by mapping to fast flash memory bank according to the debugging mode Map to random access memory;
The program file to be debugged is received, and the program file to be debugged is stored to the random access memory In;
Debugging instruction is received, and runs the debugging instruction, the program file to be debugged is debugged.
Further, further included before the setting debugging mode:
Send debugging mode change request;
The debugging mode change request is received,
It is described setting debugging mode be specially:
Request is changed according to the debugging mode, debugging mode is set.
Further, further included before the transmission debugging mode change request:
The download address space reflection of the program file to be debugged is set to fast flash memory bank, and links and is treated described in completion Debugger file.
Second aspect, the invention discloses a kind of debugging system of embedded system, including:Control host, debug circuit And embedded system,
The control host is connected by the debug circuit with the embedded system;
The control host sends control instruction and program to be debugged by the debug circuit to the embedded system File;
The embedded system performs the control instruction for receiving the control instruction.
Further, the control instruction includes debugging mode change request and debugging instruction, the embedded system bag It includes:Bus, debugging interface, debugging mode register, debugging mode control module, fast flash memory bank, random access memory and Controller,
The debugging interface, the debugging mode register, the debugging mode control module and controller difference It is connected with the bus, the debugging mode control module connects the fast flash memory bank by corresponding selective connecting component Or the random access memory;
The debugging interface is used to receive the control instruction and the program file to be debugged;
The debugging mode register is used for the value changed request according to the debugging mode and set debugging mode;
The debugging mode control module be used for according to the selection of the value of the debugging mode connect the fast flash memory bank or The random access memory;
The controller debugs the program file to be debugged for running the debugging instruction.
Further, the debugging mode register is arranged to the download address space reflection of the program file to be debugged To the debugging mode of random access memory, can only be resetted by cold start-up, it is described to be reset to the program file to be debugged Download address space reflection is to fast flash memory bank.
The adjustment method and debugging system of embedded system of the present invention are by by the download of program file to be debugged Address space is changed to map to random access memory by mapping to fast flash memory bank, eliminates the consumption of erasable fast flash memory bank When, the speed that program file to be debugged is downloaded in embedded system is improved, and due to eliminating erasable fast flash memory bank, The service life of fast flash memory bank is improved, and then improves the service life of embedded system.
Description of the drawings
In order to clearly illustrate the technical solution of exemplary embodiment of the present, below to required in description embodiment The attached drawing to be used does a simple introduction.Obviously, the attached drawing introduced is the part of the embodiment of the invention to be described The attached drawing of attached drawing rather than whole, for those of ordinary skill in the art, without creative efforts, may be used also To obtain other attached drawings according to these attached drawings.
Fig. 1 is the flow chart of the adjustment method for the embedded system that the embodiment of the present invention one provides.
Fig. 2 is the structure chart of the debugging system of embedded system provided by Embodiment 2 of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below with reference to attached in the embodiment of the present invention Figure, by specific embodiment, is fully described by technical scheme.Obviously, described embodiment is of the invention Part of the embodiment, instead of all the embodiments, based on the embodiment of the present invention, those of ordinary skill in the art are not doing The every other embodiment obtained on the premise of going out creative work, each falls within protection scope of the present invention.
Embodiment one:
Fig. 1 is the flow chart of the adjustment method for the embedded system that the embodiment of the present invention one provides.As shown in Figure 1, the party Method includes:
Step 101 sets debugging mode.
In this step, the purpose for setting debugging mode is will to download under the program file to be debugged in embedded system Set address is arranged to map in random access memory.Random access memory can be written and read at any time, read or write speed compared with Soon, and the speed of read-write is unrelated with its position.Although random access memory can abandon the content of storage when power is off, It is the state being powered always in entire debugging process.Even if since uncontrollable extraneous factor powers off, due to its read or write speed very Soon, the too many time will not be expended by re-writing program file to be debugged again.
Step 102, according to debugging mode by the download address space of program file to be debugged by mapping to fast flash memory bank It is changed to map to random access memory.
In this step, the download address of program file to be debugged is arranged to map to random access memory by embedded system Device, so as to avoid erasable fast flash memory bank.The read or write speed of fast flash memory bank is slower, and frequently carry out it is erasable after can influence it Service life, and then influence the service life of entire embedded system.This step is by the download address space of program file to be debugged by mapping It is changed to map to random access memory to fast flash memory bank, avoid to the erasable of fast flash memory bank, wait to adjust so as to improve Examination program file is downloaded to the speed in embedded system, and improves the service life of fast flash memory bank, and then improves embedded System lifetim.
Step 103 receives program file to be debugged, and program file to be debugged is stored into random access memory.
In this step, embedded system receives program file to be debugged, and according to the setting of step 102, by what is received Program file to be debugged is stored into random access memory.
Step 104 receives debugging instruction, and runs debugging instruction, treats debugger file and is debugged.This step In, embedded system receives debugging instruction, and runs debugging instruction, to the program to be debugged text stored in random access memory Part is debugged.
Preferably, before step 101 sets debugging mode, the method further includes:
Step 111 sets the download address space reflection of program file to be debugged to fast flash memory bank, and links completion and treat Debugger file.
In this step, the download address space of the program file to be debugged downloaded in embedded system is arranged to map To the fast flash memory bank of embedded system.
Step 121 sends debugging mode change request.
It in this step, changes and asks to embedded system sending mode, pattern change request is by program file to be debugged Download address space be revised as mapping to random access memory.
Step 131 receives debugging mode change request.
In this step, embedded system receives debugging mode change request.Debugging mode change request is by journey to be debugged The download address of preface part is changed to map to random access memory by mapping to fast flash memory bank.Debugging is set in step 101 Pattern is configured according to the pattern change request in this step.
The adjustment method for the embedded system that the embodiment of the present invention one provides is by by the download of program file to be debugged Location space is changed to map to random access memory by mapping to fast flash memory bank, eliminates taking for erasable fast flash memory bank, The speed that program file to be debugged is downloaded in embedded system is improved, and due to eliminating erasable fast flash memory bank, is carried The high service life of fast flash memory bank, and then improve the service life of embedded system.
Embodiment two:
Fig. 2 is the structure chart of the debugging system of embedded system provided by Embodiment 2 of the present invention.As shown in Fig. 2, the tune Test system includes sequentially connected control host 201, debug circuit 202 and embedded system 203.Control host 201 passes through tune It tries circuit 202 and sends control instruction and program file to be debugged to embedded system 203.Embedded system 203 receives control Control instruction is performed after the control instruction that host 201 is sent.
In the present embodiment, control host includes debugging mode change request to the control instruction that embedded system is sent and adjusts Examination instruction.
As shown in Fig. 2, embedded system 203 includes:
Bus 213.
Debugging interface 223 is connected with bus 213, for receiving control instruction and the journey to be debugged that control host 201 is sent Preface part.
Debugging mode register 233 is connected with bus 213, for the control instruction debugging received according to debugging interface 223 Pattern change request sets the value of debugging mode.
In the present embodiment, debugging mode is there are two value, and one of value is corresponding to the download address of program file to be debugged For space reflection to fast flash memory bank, another value corresponds to the download address space reflection of program file to be debugged to arbitrary access Memory.When download address space reflection to the arbitrary access that the value of debugging mode register is arranged to program file to be debugged is deposited It after the debugging mode of reservoir, can only be resetted by cold start-up, be reset to the download address space reflection of program file to be debugged to fast Dodge memory body.
Debugging mode control module 243 is connected with bus 213, and passes through corresponding selective connecting component connection quick flashing Memory body 253 or random access memory 263, for the value selection of the debugging mode set according to debugging mode register 233 Connect fast flash memory bank 253 or random access memory 263.
Controller 273 is connected with bus 213, fast to being stored in for the debugging instruction received according to debugging interface 223 The program file to be debugged dodged in memory body 253 or random access memory 263 is debugged.
The debugging system of embedded system provided by Embodiment 2 of the present invention is by being adjusted treating debugger file During examination, the download address space of program file to be debugged is changed to map to random access memory by mapping to fast flash memory bank Device eliminates taking for erasable fast flash memory bank, improves the speed that program file to be debugged is downloaded in embedded system, and And due to eliminating erasable fast flash memory bank, the service life of fast flash memory bank is improved, and then improves the service life of embedded system.
The technical principle that above are only presently preferred embodiments of the present invention and used.The invention is not restricted to spies described here Determine embodiment, the various significant changes that can carry out for a person skilled in the art, readjust and substitute all without departing from Protection scope of the present invention.Therefore, although being described in further detail by above example to the present invention, this hair It is bright to be not limited only to above example, without departing from the inventive concept, other more equivalence enforcements can also be included Example, and the scope of the present invention is determined by the scope of claim.

Claims (4)

1. a kind of adjustment method of embedded system, which is characterized in that including:
Debugging mode is set;
The download address space of program file to be debugged is changed to map by mapping to fast flash memory bank according to the debugging mode To random access memory;
The program file to be debugged that control host is sent is received, and the program file to be debugged is stored to the arbitrary access In memory;
Debugging instruction is received, and runs the debugging instruction, the program file to be debugged is debugged;
Wherein, further included before the setting debugging mode:
Send debugging mode change request;
The debugging mode change request is received,
It is described setting debugging mode be specially:
Request is changed according to the debugging mode, debugging mode is set;
Wherein, further included before the transmission debugging mode change request:
The download address space reflection of the program file to be debugged is set to fast flash memory bank, and it is described to be debugged to link completion Program file.
2. a kind of debugging system of embedded system, which is characterized in that including:Host, debug circuit and embedded system are controlled,
The control host is connected by the debug circuit with the embedded system;
The control host sends control instruction and program file to be debugged by the debug circuit to the embedded system;
The embedded system performs the control instruction for receiving the control instruction;
The embedded system includes:Debugging mode control module, fast flash memory bank and random access memory,
The debugging mode control module connects the fast flash memory bank or described random by corresponding selective connecting component Access memory;
The debugging mode control module is used to connect the fast flash memory bank or described random according to the selection of the value of debugging mode Access memory;
The embedded system is used for the download address space of program file to be debugged according to the debugging mode by mapping to The fast flash memory bank is changed to map to the random access memory, receives the program file to be debugged, and is treated described Debugger file is stored into the random access memory;Wherein, the control host is sent to the embedded system Debugging mode change request further includes before the transmission debugging mode change request:The program file to be debugged is set Download address space reflection links to fast flash memory bank and completes the program file to be debugged.
3. the debugging system of embedded system according to claim 2, the control instruction includes debugging mode change please Summation debugging instruction, which is characterized in that the embedded system further includes:Bus, debugging interface, debugging mode register and Controller,
The debugging interface, the debugging mode register, the debugging mode control module and the controller respectively with institute State bus connection;
The debugging interface is used to receive the control instruction and the program file to be debugged;
The debugging mode register is used for the value changed request according to the debugging mode and set debugging mode;
The controller debugs the program file to be debugged for running the debugging instruction.
4. the debugging system of embedded system according to claim 3, which is characterized in that the debugging mode register is set It, only can be cold after being set to download address space reflection to the debugging mode of random access memory of the program file to be debugged Start and reset, the download address space reflection for being reset to the program file to be debugged to fast flash memory bank.
CN201410776567.8A 2014-12-15 2014-12-15 The adjustment method and debugging system of a kind of embedded system Active CN104503905B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410776567.8A CN104503905B (en) 2014-12-15 2014-12-15 The adjustment method and debugging system of a kind of embedded system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410776567.8A CN104503905B (en) 2014-12-15 2014-12-15 The adjustment method and debugging system of a kind of embedded system

Publications (2)

Publication Number Publication Date
CN104503905A CN104503905A (en) 2015-04-08
CN104503905B true CN104503905B (en) 2018-05-25

Family

ID=52945304

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410776567.8A Active CN104503905B (en) 2014-12-15 2014-12-15 The adjustment method and debugging system of a kind of embedded system

Country Status (1)

Country Link
CN (1) CN104503905B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106485894B (en) * 2015-08-31 2020-12-11 霍尼韦尔国际公司 Security system, method and device for commissioning a security system
CN105573910B (en) * 2015-12-11 2018-06-19 北京元心科技有限公司 Application program debugging method of protected system and intelligent terminal
US20220155746A1 (en) * 2019-04-16 2022-05-19 Mitsubishi Electric Corporation Program creation support device, program creation support method, and storage medium
CN114035920B (en) * 2021-11-11 2025-07-25 天津市英贝特航天科技有限公司 Method and device for symmetrically loading and running DSP program

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6588010B1 (en) * 1998-03-31 2003-07-01 Sanyo Electric Co., Ltd. Computer system and method of modifying program in the computer system
CN1627254A (en) * 2003-12-10 2005-06-15 华为技术有限公司 Method for debuging embedded system and equipment
CN101266568A (en) * 2007-03-16 2008-09-17 上海燃料电池汽车动力系统有限公司 MPC555 on-line artificial debugging minimum system
CN102117243A (en) * 2010-12-29 2011-07-06 杭州晟元芯片技术有限公司 Method for high efficiently debugging by using software breakpoint in Flash memory
CN102662847A (en) * 2012-04-23 2012-09-12 中颖电子股份有限公司 System and method for program debugging of embedded system based on flash memory application
CN204423360U (en) * 2014-12-15 2015-06-24 北京兆易创新科技股份有限公司 A kind of debug system of embedded system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080126862A1 (en) * 2006-08-25 2008-05-29 Microchip Technology Incorporated System and Method for Testing Software Code for Use on a Target Processor

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6588010B1 (en) * 1998-03-31 2003-07-01 Sanyo Electric Co., Ltd. Computer system and method of modifying program in the computer system
CN1627254A (en) * 2003-12-10 2005-06-15 华为技术有限公司 Method for debuging embedded system and equipment
CN101266568A (en) * 2007-03-16 2008-09-17 上海燃料电池汽车动力系统有限公司 MPC555 on-line artificial debugging minimum system
CN102117243A (en) * 2010-12-29 2011-07-06 杭州晟元芯片技术有限公司 Method for high efficiently debugging by using software breakpoint in Flash memory
CN102662847A (en) * 2012-04-23 2012-09-12 中颖电子股份有限公司 System and method for program debugging of embedded system based on flash memory application
CN204423360U (en) * 2014-12-15 2015-06-24 北京兆易创新科技股份有限公司 A kind of debug system of embedded system

Also Published As

Publication number Publication date
CN104503905A (en) 2015-04-08

Similar Documents

Publication Publication Date Title
CN104503905B (en) The adjustment method and debugging system of a kind of embedded system
CN105354070B (en) A method of passing through I2C updating apparatus firmware
KR100988157B1 (en) A computer readable medium comprising methods and apparatus for detecting a memory device configuration and instructions for performing a method for detecting the memory device configuration.
CN102053850A (en) Method for on-line FPGA logic upgrade
CN105955781B (en) An EMMC upgrade method, upgrade device and terminal
CN107807624B (en) Method for refreshing application program in controller
US9477579B2 (en) Embedded software debug system with partial hardware acceleration
CN104407882B (en) A kind of board card device
CN113553081A (en) FPGA loading method based on ZYNQ chip
MX2007005250A (en) Flash programmer for programming nand flash and nor/nand combined flash.
WO2016197883A1 (en) Method and system for updating program of microcontroller online
CN105468390B (en) BOOT online upgrading device and method
CN103336701B (en) Intelligent guiding upgrade method
US8397217B2 (en) Integrating templates into tests
CN100383737C (en) Method and system for online loading and upgrading of single-chip microcomputer
JP2005070949A (en) Program processing apparatus
CN103309741B (en) Call the method and apparatus of pin function
CN105373422B (en) Controlling terminal equipment enters method, terminal device and the computer equipment of downloading mode
CN109885331A (en) Method for upgrading software, control method, system, storage medium and electronic equipment
CN104461633A (en) Single-chip offline programming unit and offline programming method
CN103560934A (en) Power line modem production testing method and device
CN109428936B (en) APP upgrade method, device, system, electronic device and storage medium
CN204423360U (en) A kind of debug system of embedded system
EP3891594B1 (en) Memory control system with a sequence processing unit
CN109697077B (en) Method, device and equipment for starting hard disk firmware

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Room 101, Floor 1-5, Building 8, Yard 9, Fenghao East Road, Haidian District, Beijing 100094

Patentee after: Zhaoyi Innovation Technology Group Co.,Ltd.

Address before: 100083 12 Floors, Block A, Tiangong Building, Science and Technology University, 30 College Road, Haidian District, Beijing

Patentee before: GIGADEVICE SEMICONDUCTOR(BEIJING) Inc.

CP03 Change of name, title or address