• TMS320C6713 software automatic renewal project design

    The abstract through to the COFF document and the TMS320C6713 guidance process’s analysis, this article proposed in system realizes the automatic software update plan based on TMS320C6713 on the DSP, this plan only needs when the software update downloads the CCS translation and the link production’s COFF document to the DSP system, then may complete the renewal automatically; Finally also simply introduced the plan on TMS320VC5409 system’s realization.
    The key word software renews the COFF document to analyze two level of vectoring procedure TMS320C6713 automatically

    Introduction
        At present in the market condition exists massively based on the DSP embedded system, along with system’s consummation and the function enhancement, the nearly all DSP system is facing the software update question, by now, the renewal method simple and highly effective appeared specially important. In based on DSP (digital signal processor) in the embedded system, the software update usually needs to draw support from the simulator the newest procedure to download to the goal board on, then reads in the procedure in the non-volatile memory. At the same time, after because new program compiling, link, produces each section’s size and the movement space will change, the system vectoring procedure also need to make blood’s modification. For example: The previous edition’s procedure correspondence’s .text section’s movement space is located at Ox80000000~0×80000100, but the new procedure correspondence’s .text section’s movement space is located at Ox80001000~Ox80001110, the .text section’s movement space and the length has had the change. Moreover, one of vectoring procedure’s duties is duplicates the .text section data from Flash to its movement space, must therefore revise the vectoring procedure, changes 0×80001000 the .text section duplication’s start address by Ox80000000, and will duplicate the length to change OxllO, each software update can duplicate the above step. In the remote system control application, this renewal method appears very inconvenient; In needs simultaneously to carry on the software update to the massive DSP system or to need the software update frequently in the situation, this method’s efficiency is also low.
        The author through to TMS320C6713 the DSP system guidance process’s analysis and COFF (public object file form) document format’s analysis, proposed a software automatic renewal’s plan, and in chip and SST Corporation’s SST39VFl601 in the parallel Flash chip composition’s hardware platform realizes based on TI Corporation’s TMS320C6713; Finally also simply introduced this plan on TMS320VC5409 system’s realization. Realizes this plan premise is on the DSP hardware system has some kind of connection, may download the COFF document from the computer to the local system on, the author uses the platform is through the UART connection connection computer, uses the Windows bringing in the super terminal, downloads through the Xmodem agreement the COFF document to the target system on, when after downloading completes, will renew automatically will complete. On after DSP again electricity or replacement, moves is the newest procedure. This plan mainly includes two processes: First, through analyzes the data which the COFF document obtains needs and burns into Flash; Second, on after system electricity, acts according to automatically Flash the most recent data guidance, the movement. Below describes two processes to realize the method in detail.

    1 COFF document analysis
        C or assembly program after translation will produce the multistage (for example .text, .bss, .switch, .cinit, .data and so on), the section which these sections may divide into needs to initialize Duan He who do not need to initialize. Here, needs to initialize with does not need to initialize aims at the system guidance. For example: .text is the procedure code data, on after the system the electricity, needs the vectoring procedure to duplicate from Flash to its movement space, is called “section which needs to initialize”; .bss is the initialization is 0 data spaces, this initialization is the O movement when the C language environment establishment carries on, belongs to a system program part, has nothing to do with the vectoring procedure, is called “the section which does not need to initialize”. Thus, only needs to preserve the initialization in Duan Dao Flash, but does not need to distinguish the section which through the section name which sections are need to initialize, which don’t need to initialize the section, two types may differentiate through the COFF document in section information table part.
    1.1 COFF document synopsis
        The COFF document is the DSP assembler and the link foundation object file, usually for in the project table of contents’s under Debug table of contents the suffix is the .out document. Contains the head information which, the section information table, each initialization section data and the heavy localization information, the symbol table, the string of character table in the COFF document the article article, may choose. May see, in the COFF document has contained many redundancy information ingredients. In order to save the space, to raise the efficiency, burns not directly in here the COFF document Flash, but only preserves the information which needs, namely each initialization section data and procedure entry point address. How does below describe in detail obtains these information from the COFF document.
    1.2 COFF document format
        In the COFF document, the document forehead minute will provide the section integer which in this document contained, the analysis procedure will scan each section according to the section integer the information and preserves the initialization section the data; May choose the head information has contained the procedure entry point address, after the system guidance had ended will skip directly to this address, the system starts the normal work. The section information table’s form showed that like table l arranges in order. And, the section physical address is this section execution address, when is the program run this section of institutes are at space; Primary data file pointer direction section data in COFF document position, if this section is the initialization section, then may obtain from here needs to read in Flash the data position. Calculates as follows:
    Section data address =COFF document start address primary data file pointer

        The symbol information uses in judging this section whether for needs to initialize the section, like Table 2 arrange in order. Needs to initialize the section sign is Ox40 and 0×20, like this obtains all need vectoring procedure duplication the section data. This time cannot enter these data direct firing Flash, if the direct firing enters Flash, then the vectoring procedure will know the section data without knowing where to begin the reference, the movement space address and the length. Before this project design simple construction of data has placed the section data, is called “the section head”. The construction of data is as follows:

       
    1.3 Flash storage space arrangement
        After obtaining data which needs, next step is burns into these data Flash. The Flash space’s data format is as follows:

       
        Except preserves Duan Tou and the section data, but also needs the recording program entry point address and behind all section integer. The procedure entry point address is the address which the target program first step starts to carry out, when after the vectoring procedure duplicates all data, directly jumps to this address starts to move. The section integer uses in the vectoring procedure judging whether all section’s data has duplicated.
        Before the fever writes Flash also to need to carry on the division to the Flash space. Take this system as the example, the Flash space is Ox90000000~Ox90400000, altogether 4MB. Divides as follows:
        what ◆ the first part saves is the first level of vectoring procedure. To the TMS320C6713 system, after this part of code translation, after having all initialization section size to be smaller than 1KB (its multianalysis sees), therefore this part of spatial size fixed is 1KB, namely 0×90000000~0×900003ff.
        what ◆ the second part saves is the second level of vectoring procedure, this part writes according to the above data format fever. Its length limit, only cannot act according to specially preserves the biggest geometry which the second level of vectoring procedure needs. Because the Flash each sector’s size is 8KB, for ease to the previous part of cleaning operation, lengthens the second part of start address to the Flash second sector start address, its space is Ox90002000~0×90003fff, altogether 8KB.
        ◆ the third part is the system program, its length basis preservation system program must the biggest geometry. The data format and second part of same, the corresponding address is 0×90004000~Ox90103fff, altogether 1MB. The surplus Flash space makes other uses.
        Entire Flash space division as shown in Figure 1. Attention: Once the above 3 parts plan, each partial positions cannot modify. Regarding the second part, so long as the second level of guidance writes, this part needs the space also determined; But the third part in each time software update time must also renew, therefore needs to reserve the enough big space.

        Entire COFF document analysis flow as shown in Figure 2.

    2 system vectoring procedure design
        TMS320C6713 supports 3 guidance ways: Main engine guidance, simulation guidance and EMIF guidance. This plan uses the EMIF guidance, under this pattern, passes the EDMA copy located at the exterior storage space CEl Flash in 1 KB code to internal RAM address 0. Because the majority vectoring procedure code is bigger than 1 KB, therefore this plan selects two level of guidance methods. The compilation vectoring procedure’s goal is, will possess the initialization section the data from Flash the copy to time its corresponding movement storage space.
    2.1 first level of vectoring procedure design
        Regarding based on TMS820C6713 system, first level of vectoring procedure size by strict limit in l KB, therefore can only use the assembly language write program. After system electricity the first level of vectoring procedure to internal RAM and starts from EDMA from Flash copy lKB to carry out, therefore after first level of vectoring procedure translation, all strong beginning section’s length cannot be bigger than 1 KB. Procedure which provides regarding the author, after this section of program compiling, produces initialization section only then .text section. Its duty was finds the section data and the copy according to the data format to the corresponding physical address, then jumped to the second level of vectoring procedure entrance. First level of vectoring procedure flow as shown in Figure 3.

    2.2 second level of vectoring procedure design
        The second level of vectoring procedure size has not limited, therefore this plan uses the C language to realize. In this hardware system, the system program moves in SDRAM, therefore before second level of vectoring procedure copy section data also needs to initialize EMIF. If also used other peripheral devices on the hardware, might also complete the initialization in here. After the initialization completes, starts the copy data process, this and the first level of vectoring procedure’s copy process is identical. Second level of vectoring procedure flow as shown in Figure 3.
        How does here work with the simple example interpretive system vectoring procedure. In the Flash space, all Duan Tou and the section data is the compact arrangement. That is, behind upside is following closely the section data, after this section of data had ended, is next section of Duan Tou. This kind of arrangement is must, otherwise, the vectoring procedure after duplicating on a section data is unable I to the next Duan Tou address. Duplicates in Flash take the first level of vectoring procedure the second level of vectoring procedure as the example explanation. Second level of vectoring procedure’s each section of data in the Flash start address are 0×90002000, first from the beginning in two characters read-routine entry point address, all data size and section integer; Then the read section head, the section size uses in determining this section of data length; Jumped over this section of data area to start the position for next section, the section physical address explained the section data reproduction destination address. If duplicates the section integer was equal to that starts section integer which reads out, then indicated that all data reproduction has completed, then skips to the procedure entry point address. May see from this process, vectoring procedure’s copy process is completely comes according to the section head’s information. When software update, section information correspondingly will also renew, will have nothing to do with the vectoring procedure. Therefore, the vectoring procedure may the auto-adapted new segment change, but does not need to revise the vectoring procedure.

    3 on TMS320VC5409 system’s realization
        The majority DSP system’s guidance process is mostly the same except for minor differences, author also this plan application in based on TMS320VC5409 hardware platform. Regarding the COFF document’s analysis, two kind of platforms have not distinguished, the analysis obtains the section data also similarly is adds an upside after-burning to enter Flash. TMS320VC5409 and the TMS320C6713 only difference lies in its guidance process. The TMS320VC5409 guidance way are many, realizes to this plan also many and varied, here only simply introduced the author uses method.
        Pulls high the MP/MC pin, causes TMS320VC5409 is the microprocessor pattern. Such procedure space 0xff80~0xffff maps exterior, simultaneously on the hardware connects the Flash space DSP in the 0×8000~0xfff procedure space. On after DSP electricity replacement, PC starts from procedure space’s 0xff80 to carry out, what needs to do is space reads in a skipping sentence in 0xff80 in the corresponding Flash, skips the position which DSP starts to the vectoring procedure. May see, because the vectoring procedure does not have the length limit, therefore uses the first-level pre-computed course. Attention: This time’s vectoring procedure has not duplicated in internal RAM, but is carries out directly on Flash, therefore in translation vectoring procedure time must pay attention to the chained file writing. After the vectoring procedure starts the execution, is establishing in the good Flash space to act according to 1.2 sections in advance directly the syntagmas to seek for the section data and to duplicate, after the duplication completes, skips to the system program entrance.
        Editor note: Realizes the code to see this publication website www.mesnet.cm.cn.

    4 conclusions
        This article introduced one kind based on the TMS320C6713 system’s software automatic renewal plan. This plan has realizes simply, the efficiency high merit, once and realizes, each time when software update does not need to modify the vectoring procedure. At present this plan has applied in the State Natural Sciences Foundation project automatic fingerprint recognition system, has received the very good effect. The practice indicated that this plan has the very good probability, may platform obtain the application in TI in Corporation’s many kinds of DSP.

    Share/Save/Bookmark

    Tuesday, November 11th, 2008 at 13:23
No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

TOP
Copyright © 51 Research and Design, Electronic Engineers website - Embedded Systems, MCU, DSP, EDA, Test and Measurement, Components, Communications, Power, Microelectronics, Semiconductors
Powered by WordPress | Theme by mg12 | Valid XHTML 1.1 and CSS 3