CN101546268B - Method for loading executable file for digital signal processor and device thereof - Google Patents

Method for loading executable file for digital signal processor and device thereof Download PDF

Info

Publication number
CN101546268B
CN101546268B CN2008101027256A CN200810102725A CN101546268B CN 101546268 B CN101546268 B CN 101546268B CN 2008101027256 A CN2008101027256 A CN 2008101027256A CN 200810102725 A CN200810102725 A CN 200810102725A CN 101546268 B CN101546268 B CN 101546268B
Authority
CN
China
Prior art keywords
dsp
file
address information
memory mapped
symbol
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
CN2008101027256A
Other languages
Chinese (zh)
Other versions
CN101546268A (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.)
Datang Mobile Communications Equipment Co Ltd
Original Assignee
Datang Mobile Communications Equipment 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 Datang Mobile Communications Equipment Co Ltd filed Critical Datang Mobile Communications Equipment Co Ltd
Priority to CN2008101027256A priority Critical patent/CN101546268B/en
Publication of CN101546268A publication Critical patent/CN101546268A/en
Application granted granted Critical
Publication of CN101546268B publication Critical patent/CN101546268B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method for loading an executable file for a digital signal processor and relates to a DSP program loading technology, which aims to solve the problem of inconvenient debugging of the present DSP. The method adopts the technical scheme that an executable file is generated after the DSP program of the digital signal processor is compiled; the executable file is transformed into a DSP memory mapped file and stored in an analog storage area, and the address information of symbols in the memory mapped file is obtained and stored in the reserved address field of the analog storage area; and both the memory mapped file and the symbol address information in the analog storage area are loaded to a DSP memory. The invention also discloses a device for realizing the method. After the technical scheme is adopted, the DSP supports the on-line checking of functions, and the developer can easily input the command to realize various functions during the debugging process such as function call, symbolic variable checking, and the like, thereby facilitating the debugging work. The technical scheme is simple in realization and is practical.

Description

The loading method of executable file for digital signal processor and device
Technical field
The present invention relates to digital signal processor (DSP, Digital Signal Processor) program loading technique, relate to the loading method and the device of executable file for digital signal processor or rather.
Background technology
When carrying out the program compilation of DSP, generally all can generate one of two file behind the compiling link is the symbol table information file xx.map file after executable file xx.out file (or elf formatted file) and the link.Wherein, the xx.out file is the DSP load document, and the xx.map file is to supply xx.out file debugging usefulness, generally only supplies the developer to use.Before being loaded into DSP, prior art becomes DSP to go up the binary file xx.bin of memory mapping executable file xx.out file conversion usually, again with the load content of xx.bin file in the storer of DSP, concrete steps are following:
A. will convert the DSP memory mapped file into to the executable file that the DSP compiling link generates.This step is accomplished through the file conversion instrument that uses compiler, does not comprise symbol table information in the memory mapped file.
B. pass through for example HPI (Host Port Interface of various hardware interfaces; HPI), DSI (Distributed System Interface; The distributed system interface), sRIO (serial Rapid IO, serial high-speed bus interface) or Ethernet (ETH) interface etc. are loaded into the DSP memory mapped file in the storer of DSP.
Loaded the DSP memory mapped file, triggered the dsp processor operation through hardware interface and get final product.Because the xx.bin file is not comprise symbol table information, so does not also comprise any symbol table information in the storer on the DSP.This has caused the program on the DSP can not the online query symbolic information, and debug function such as the Telnet dsp processor that much needs the support of symbol table query function carries out online query, carries out order input etc. through control desk and be difficult to realize its named variable value.To the DSP on-line debugging time; The common hope of tester can be inquired about the value of some global variable in program operation process; Or the operation of mode intervention program through order; Realize these functions, need the support of symbol table function, could inquire the global variable or the address of command functions of tester's appointment and carry out variables corresponding inquiry and command functions calling function through debugging proxy like this.Do not have the support of symbol table function, these debug functioies all are difficult to realize.When debugging was analyzed to DSP program off-line, the corresponding relation of symbolic information file and DSP memory content snapshot document can not guarantee.In need content stores to a snapshot document with the DSP storer, mapping (map) file that generates when searching compiling link DSP program again, query tokens information therefrom, the value of query tokens in the memory content snapshot document is carried out off-line analysis again.Because the corresponding relation of memory content snapshot document and symbolic information file is artificial the maintenance, its one-to-one relationship is difficult to guarantee.Simultaneously since symbolic information separate with the memory content snapshot document and also be unfavorable for the DSP program is carried out automated analysis.
Summary of the invention
In view of this, fundamental purpose of the present invention is to provide a kind of loading method and device of executable file for digital signal processor, makes DSP support on-line debugging, makes things convenient for the developer that DSP is debugged.
For achieving the above object, technical scheme of the present invention is achieved in that
A kind of loading method of executable file for digital signal processor comprises:
To generating executable file after the digital signal processor DSP program compilation;
Said executable file is converted into the DSP memory mapped file and is stored in the analog storage district, obtain the address information of symbol in the said memory mapped file and be stored in the reservation address field in said analog storage district; And
Memory mapped file in the said analog storage district and symbolic address information all are loaded in the said DSP storer.
Preferably, obtain the address information of symbol in the said memory mapped file, be specially:
Compiling DSP has also generated the map file during program, records the address information of each symbol in said memory mapped file in the said map file.
Preferably, said memory mapped file and symbolic address information are loaded in the DSP storer through HPI HPI, distributed system interface DSI, serial high-speed bus interface sRIO or Ethernet ETH interface.
Preferably, said symbolic address information is loaded into specified memory in the said DSP storer.
Preferably, said designated storage area is positioned at the DSP external memory storage.
Preferably, said symbol comprises: variable, function and parameter.
A kind of charger of executable file for digital signal processor comprises:
The executable file generation unit is used for generating executable file after the DSP program compilation;
The memory mapped file converting unit is used for converting said executable file into the DSP memory mapped file;
The symbolic address information acquisition unit is used for obtaining the address information of said memory mapped file symbol;
Storage unit, be used for memory mapped file be stored in the analog storage district, with the reservation address field of symbolic address information stores in the analog storage district; And
Loading unit is used for the memory mapped file and the symbolic address information in said analog storage district all are loaded in the DSP storer.
Preferably; Said executable file generation unit has also generated the map file when compiling the DSP program; Record the address information of each symbol in memory mapped file in the said map file, said symbolic address information acquisition unit is obtained the address information of symbol from said map file.
Preferably, said loading unit is loaded into said memory mapped file and symbolic address information in the DSP storer through HPI, DSI, sRIO or ETH interface.
Preferably, said loading unit is loaded into specified memory in the said DSP storer with symbolic address information.
Preferably, said designated storage area is disposed at the external memory storage of DSP.
Preferably, said symbol comprises: variable, function and parameter.
The present invention specified the dedicated memory in the DSP storer before loading the DSP memory mapped file, be used for storing symbolic address information in the DSP program; The developer is when debugging DSP; Can inquire the variate-value in the DSP program through the corresponding relation of symbolic address information and symbol, some function of online query, the developer can pass through control desk command calls function easily in debug process; Check symbolic variable etc., greatly facilitate debugging work.Technical scheme of the present invention realizes simple, practical.
Description of drawings
Fig. 1 is the process flow diagram of the loading method of executable file for digital signal processor of the present invention;
Fig. 2 is the composition structural representation of the charger of executable file for digital signal processor of the present invention.
Embodiment
Below in conjunction with accompanying drawing technical scheme of the present invention is elaborated.
Fig. 1 is the process flow diagram of the loading method of executable file for digital signal processor of the present invention, and as shown in Figure 1, the loading method of executable file for digital signal processor of the present invention may further comprise the steps:
Step 101: to generating executable file after the digital signal processor DSP program compilation.DSP program development personnel carry out the DSP program compilation through DSP program specific compiler under development environment, obtain executable file such as xx.out file (or elf formatted file) behind the compiling link and writing down the map file of symbolic address information.When generating executable file, compiler will generate the map file automatically.
Step 102: said executable file is converted into the DSP memory mapped file and is stored in the analog storage district, obtain the address information of symbol in the said memory mapped file and be stored in the reservation address field in said analog storage district.
The debugging enironment of DSP program is set, the analog storage district of analog D SP memory environment is set,, convert the executable file that generates in the step 101 into the DSP memory mapped file to realize external debug to the DSP program.Compiler is generally all supported the conversion of executable file, like the executable instruction pattern that executable file is supported for DSP such as reflection binary file or hex file.Simultaneously, a part of dedicated memory is set in the analog storage district, the address information with symbol in the storage DSP memory mapped file is the memory address section of reserving.Record the address information of each symbol in said memory mapped file in the map file, the address information of symbol from map file extraction DSP memory mapped file.The symbol here mainly is symbol, function and some important parameters of the global variable in the DSP program.The extraction of symbol can only be extracted the symbolic information of global variable according to the decision of debugging demand, also can only extract the symbolic information of function.Need to prove that in the DSP storer, be provided with the dedicated memory of storage DSP memory mapped file symbol address information equally, the DSP routine data is not stored in this zone.Dedicated memory in the DSP storer needs to be provided with in advance, and its size is determined by the size of symbolic address information to be stored.
Step 103: memory mapped file in the said analog storage district and symbolic address information all are loaded in the said DSP storer.
Load mode is through hardware interface such as HPI, DSI, sRIO or ETH interface etc. memory mapped file in the analog storage district and symbolic address information to be loaded in the DSP storer.Particularly, the DSP memory mapped file is loaded in the DSP internal memory, and symbolic address information is loaded in the designated storage area of DSP internal memory or the designated storage area in the storer of peripheral hardware.
Symbolic address information in the DSP internal memory or the storage mode of the designated storage area of the storer of peripheral hardware shown in table one, can the header and the symbol content information of each symbol be stored respectively, can locate the content information of this symbol rapidly through the header of symbol.The present invention stores the address information of symbol in the DSP memory mapped file in the DSP storer purpose is to make things convenient for the developer to search corresponding symbol, not the storage mode of qualifier and symbolic address information.
The symbol first address Symbol takies address size
Symbol 1 address The variable-length of symbol 1
Symbol 2 addresses The variable-length of symbol 2
…… ……
Symbol n address The variable-length of symbol n
Symbol 1 content information Symbol 2 content informations
…… ……
Symbol n-1 content information Symbol n content information
Table one
The present invention has added the relevant symbol table information of DSP memory mapped file in the DSP storer, guaranteed that the DSP program can query tokens information after loading, and DSP supports online debug function, and the DSP program can the online query global variable, function etc.On this basis,, can support commissioning staff's online query variate-value through the debugging proxy that moves on the exploitation DSP program, and through abilities such as control desk fill order functions.Made things convenient for the debugging of DSP program.When carrying out the off-line debugging; Because symbol table information has been stored in the storer of DSP; Off-line is debugged in the required DSP snapshot document and has also been comprised symbolic information, needn't rely on the former map file of DSP program again, needn't safeguard the one-to-one relationship of map file and memory content snapshot document.
Fig. 2 is the composition structural representation of the charger of executable file for digital signal processor of the present invention; As shown in Figure 2; The charger of executable file for digital signal processor of the present invention comprises executable file generation unit 20, memory mapped file converting unit 21, symbolic address information acquisition unit 22, storage unit 23 and loading unit 24; Wherein, Executable file generation unit 20 is used for generating executable file after the DSP program compilation, and also generating simultaneously has the map file, records the address information of each symbol in memory mapped file in the map file.The symbol here mainly is symbol, function and some important parameters of the global variable in the DSP program.Memory mapped file converting unit 21 is used for converting said executable file into the DSP memory mapped file.Symbolic address information acquisition unit 22 is used for obtaining the address information of said memory mapped file symbol, specifically from said map file, obtains.Storage unit 23 be used for memory mapped file be stored in the analog storage district, with the reservation address field of symbolic address information stores in the analog storage district.Loading unit 24 is used for the memory mapped file in said analog storage district and symbolic address information all are loaded in the DSP storer.Particularly, the DSP memory mapped file is loaded in the DSP internal memory, and symbolic address information is loaded in the designated storage area of DSP internal memory or the designated storage area in the storer of peripheral hardware.Dedicated memory in the DSP storer needs to be provided with in advance, and its size is determined by the size of symbolic address information to be stored.Loading unit 24 specifically is loaded into memory mapped file and symbolic address information in the DSP storer through hardware interfaces such as HPI, DSI, sRIO or ETH interfaces.
It will be appreciated by those skilled in the art that above-mentioned each unit can realize described function through corresponding software, also can realize through corresponding circuit.
The above is merely preferred embodiment of the present invention, is not to be used to limit protection scope of the present invention.

Claims (12)

1. the loading method of an executable file for digital signal processor is characterized in that, this method comprises:
To generating executable file after the digital signal processor DSP program compilation;
Said executable file is converted into the DSP memory mapped file and is stored in the analog storage district, obtain the address information of symbol in the said memory mapped file and be stored in the reservation address field in said analog storage district; And
Memory mapped file in the said analog storage district and symbolic address information all are loaded in the DSP storer.
2. method according to claim 1 is characterized in that, obtains the address information of symbol in the said memory mapped file, is specially:
Also generate mapping map file during compiling DSP program, recorded the address information of each symbol in said memory mapped file in the said map file.
3. method according to claim 1 is characterized in that, said memory mapped file and symbolic address information are loaded in the DSP storer through HPI HPI, distributed system interface DSI, serial high-speed bus interface sRIO or Ethernet ETH interface.
4. method according to claim 1 is characterized in that, said symbolic address information is loaded into specified memory in the said DSP storer.
5. method according to claim 4 is characterized in that said specified memory is positioned at the DSP external memory storage.
6. according to each described method in the claim 1 to 5, it is characterized in that said symbol comprises: variable, function and parameter.
7. the charger of an executable file for digital signal processor is characterized in that, this device comprises:
The executable file generation unit is used for generating executable file after the DSP program compilation;
The memory mapped file converting unit is used for converting said executable file into the DSP memory mapped file;
The symbolic address information acquisition unit is used for obtaining the address information of said memory mapped file symbol;
Storage unit, be used for memory mapped file be stored in the analog storage district, with the reservation address field of symbolic address information stores in the analog storage district; And
Loading unit is used for the memory mapped file and the symbolic address information in said analog storage district all are loaded in the DSP storer.
8. device according to claim 7; It is characterized in that; Said executable file generation unit has also generated the map file when compiling the DSP program; Record the address information of each symbol in memory mapped file in the said map file, said symbolic address information acquisition unit is obtained the address information of symbol from said map file.
9. device according to claim 7 is characterized in that, said loading unit is loaded into said memory mapped file and symbolic address information in the DSP storer through HPI, DSI, sRIO or ETH interface.
10. device according to claim 7 is characterized in that, said loading unit is loaded into specified memory in the said DSP storer with symbolic address information.
11. device according to claim 10 is characterized in that, said specified memory is disposed at the external memory storage of DSP.
12., it is characterized in that said symbol comprises: variable, function and parameter according to each described device in the claim 7 to 11.
CN2008101027256A 2008-03-25 2008-03-25 Method for loading executable file for digital signal processor and device thereof Active CN101546268B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008101027256A CN101546268B (en) 2008-03-25 2008-03-25 Method for loading executable file for digital signal processor and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101027256A CN101546268B (en) 2008-03-25 2008-03-25 Method for loading executable file for digital signal processor and device thereof

Publications (2)

Publication Number Publication Date
CN101546268A CN101546268A (en) 2009-09-30
CN101546268B true CN101546268B (en) 2012-03-14

Family

ID=41193416

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101027256A Active CN101546268B (en) 2008-03-25 2008-03-25 Method for loading executable file for digital signal processor and device thereof

Country Status (1)

Country Link
CN (1) CN101546268B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502225B (en) * 2019-08-29 2024-01-23 合肥格易集成电路有限公司 Development board routine demonstration method and device, development board and storage medium
CN113849245B (en) * 2021-09-23 2023-09-12 武汉深之度科技有限公司 Application program running method, computing device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6154826A (en) * 1994-11-16 2000-11-28 University Of Virginia Patent Foundation Method and device for maximizing memory system bandwidth by accessing data in a dynamically determined order
CN1667585A (en) * 2004-03-09 2005-09-14 华为技术有限公司 A digit signal processor software debugging information output method
CN101067789A (en) * 2007-06-05 2007-11-07 上海微电子装备有限公司 Program dynamic loading method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6154826A (en) * 1994-11-16 2000-11-28 University Of Virginia Patent Foundation Method and device for maximizing memory system bandwidth by accessing data in a dynamically determined order
CN1667585A (en) * 2004-03-09 2005-09-14 华为技术有限公司 A digit signal processor software debugging information output method
CN101067789A (en) * 2007-06-05 2007-11-07 上海微电子装备有限公司 Program dynamic loading method

Also Published As

Publication number Publication date
CN101546268A (en) 2009-09-30

Similar Documents

Publication Publication Date Title
CN107391653B (en) Distributed NewSQL database system and picture data storage method
CN107122368B (en) Data verification method and device and electronic equipment
CN102789416B (en) Memory fault injection method and simulator thereof for software built-in test (BIT)
CN101587455B (en) Method for checking memory leak for vxWorks operating system
CN103577310A (en) Method and device for recording software debugging logs
CN110737594B (en) Database standard conformance testing method and device for automatically generating test cases
JP5912018B2 (en) Dynamic equipment management system
US9535687B2 (en) Audited builds based upon separate class dependency records
CN105956772A (en) Equipment transaction analysis method based on power distribution network model data
CN102722438B (en) Kernel debugging method and equipment
US8489652B2 (en) Tracking object fields using relocatable object watchpoints
CN115391427A (en) System, method, medium, and apparatus for automatic scaling of Impala
CN101546268B (en) Method for loading executable file for digital signal processor and device thereof
CN106250429A (en) A kind of data pick-up method based on sqoop
CN100489781C (en) Method and apparatus for positioning target file
CN110502735B (en) Method and system for quickly manufacturing universal process file of electronic equipment
CN111309740A (en) Data processing method, device, equipment and storage medium
CN105700931A (en) Code injection method and device
CN105868092A (en) Log file processing method and device
US10789166B2 (en) Computer system
CN112000405A (en) Method, equipment and storage medium for conveniently acquiring system logs
CN105511815A (en) Segment table based PLC (programmable logic controller) runnable file storage and analysis method and storage system
JPWO2015141150A1 (en) Source code generation apparatus, source code generation method, and recording medium
CN105809577B (en) Power plant informatization data classification processing method based on rules and components
CN116610656B (en) Portable cross-network data acquisition method and device

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