1 Bootloader analysis
When TI Corporation’s DSP chip leaving the plant, the solidification has guidance loading operation Bootloader in internal ROM, its major function is loads the exterior procedure to internal RAM in moves, raises system’s running rate.
TMS320VC5409 is TI a Corporation’s section of fixed-point DSP chip, its instruction cycle may reach 10ns, internal has 32K×16 position RAM, the performance-to-price ratio is extremely high, is widely applied in the embedded system, in the data acquisition system. TMS320VC5409 Bootloacler procedure located at internal ROM 0F800H~0FBFFH space. On when system electricity, DSP will inspect exterior pin MP/MC the condition, if this pin is the high level, then DSP according to microprocessor pattern start; If this pin is the low level, then DSP according to micro computer pattern start. This time, the system starts the executive routine from the 0FF80H address place, 0FF80H is the Bootloader interrupt vector. Therefore, when on system electricity the MP/MC condition will be the low level, DSP will start from the FF80H place skipping to F800H to carry out the TI Bootloader autoloading procedure.
After entering the Bootloader procedure, first inspects DSP pin INT2 the condition, if is the low level, enters the HPI guidance loading pattern, if INT2 is the high level then inspects the INT3 pin. If the INT3 pin is the low level, enters the serial EEPROM guidance loading pattern, if INT3 is the high level enters the parallel guidance loading pattern. After parallel guidance loading pattern defeat, the system will enter the serial port guidance loading pattern automatically. After serial port guidance loading defeat, the system will enter the I/O mouth guidance loading pattern.
After entering the parallel guidance loading pattern, DSl first reads the address is the 0FFFFH I/O space unit, and takes this unit’s value the guidance table the first address. Reads the guidance table in the data address space the first character, if this character’s value is 10AAH, enters 16 guidance patterns, if the low byte is 08H, then again further read next value, if this value’s low byte is AAH, then enters the person 8 guidance patterns. If reads from the I/o address space the guidance table first address corresponds in the guidance table cannot obtain the correct guidance information, then DSP will read a character from the data space 0FFFFH address to take the guidance table first address again, will then read a character again from the guidance table first address. If this character is lOAAH, then enters the l6 position guidance pattern immediately, otherwise, according to 8 way processing: Reads a byte achievement guidance table first address from 0FFFFH the low byte, reads a byte achievement from 0FFFEH to guide the first address the high byte, reads a value again from the guidance table first address, if the low byte is 08H, then reads the guidance table again the next value, if is AAH, then explained that the exterior memory is 8 bit widths, enters 8 guidance loading pattern; If the above step cannot gain the correct guidance information, then DSP will enter the person serial port guidance loading pattern.
If the parallel guidance loads successfully, DSP after loading the new procedure starts the address executive routine. Detailed parallel guidance flow chart as shown in Figure 1.

2 hardware designs
In this system, what FLASH selects is Atmel Corporation’s AT29LVl024, AT29LVl024 capacity for 64K×16 the position, may satisfy the general application request, and its working voltage is 3V~3.6V, may directly with the TMS320VC5409 connection, but does not need to use the voltage connection chip to carry on the transfer again, makes the hardware circuit to be simpler.
From TMS320VC5409 memory space mapping knowing, when MP/M C=0, the exterior memory space mapping’s address range is 8000H-FFFFH altogether 32K, therefore in the Flash program part must be located at 8000H~FFFFH the address range, can guide successfully. Author’s procedure quantity is smaller than 32K×16 the position, therefore may be directly connected Flash address wire A0-A15 with DSP address wire AO~Al5, then records the procedure fever after Flash 32K the position, such procedure just is located at DSP the 8000H~FFFFH scope. If the procedure quantity is bigger than the 32K character, then before may the Flash, 32K address code in the DSP 8000H~FFFFH scope. Uses the paging the way, loads the procedure which gradually needs to move. In this article, uses from the DATA space guidance, concrete electric circuit connection as shown in Figure 2.

Flash address wire AO-A15 is direct and DSP low 16 address wire A0-A15 is connected.
Flash 16 figures
FLASH writes a letter number WE to meet the high level directly (, because uses programmer to the Flash programming to burn record).
Flash selects patches or strips of land as worth saving for seed signal CE to meet the low level directly or to meet DSP the DS pin. Flash reads signal OE to meet DSP the memory to read signal MSTRB.
The DSP MP/MC pin meets the low level.
The DSP INTl-INT3 pin pulls the resistance through on to meet the high level.
3 code designs and data conversion
After the hardware design completes, may compile section of codes to carry on the test.
Establishes engineering project test pjt in TI DSP in development environment CCS, including three documents: test_main.c, test_vector.asm and load.cmd.
What needs to explain, although DSP and Flash are 16, but the common programmer is reads the data according to 8 from the .hex document. Will read a byte every time, the address will increase 1, therefore in the bind command document must memwidth and the romwidth value establishment be 8, when the programmer will read the hex document will present the mistake, this usually causes the guidance process defeat’s primary cause. After the bind command compilation finished, the test.out document, bind command document load.cmd as well as the hex500.exe document copy to the identical table of contents, entered this table of contents under the Windows system order prompt, the execution command line:
hex500 I0ad.cm d
Then produces the test.hex document, meanwhile produces mxp document test.mxp, for examination details.
after test.hex file generation, (what moves the programmer fever to record the software this design with is Cyr special suPERPRO 6 8 0), chooses the component is AT29LVl024. Opens the test.hex document, this time will discover that AT29LVl024 the address range will be 0 0 0 0 0H-1FFFFH altogether 128K, but will not be 0000H-FFFFH, why will this be needs to be 8 as well as records the memory data width hypothesis the procedure fever the start address bootorg establishment is the 0xl8000 reason. 0×18000 divides 2 is 0×0C000, also namely, burns records address Oxl8OOO in system’s address is OxOC000, located in 8000H~FFFFH exterior memory mapping scope.
Moreover, but also discovered the programmer software opens in the test.hex document, two bytes are not finally guide the table the first address (this are probably HEX500 have any bug reason), must therefore change the 1FFFEH content COH, changes 00H, C000H the 1FFFFH content is in this example guides the table in the actual DSP system’s first address. Changes 10H the 18000H content from 08H, here is 08H is because in the bind command document’s data width establishment is 8, but in the system DSP and the Flash actual data width is 16, the guidance process should use 16 guidance loading. Therefore needs to change 08H 10H. After the revision completes, but must carry on the entire document height byte the exchange, because the programmer opens .hex document high byte before, low byte, but 16 Flash programming are the low byte before the high byte after. After so revises and the adjustment, then to the Flash component carries on programs.
After will program Flash installs to the system, examines DSP with the oscilloscope pin XF, if has the square-wave to appear, then the showing guidance loading already succeeded, the procedure code has been called in moves to internal RAM.
Conclusion
This article narrates the bootstrap technique obtained the effective confirmation in the tubing cross magical skill according to the gathering system, and the entire process operates very conveniently quickly.