CN109634618B - TMS320C 674X-based serial boot loader loading self-starting method for processor secondary boot loader - Google Patents

TMS320C 674X-based serial boot loader loading self-starting method for processor secondary boot loader Download PDF

Info

Publication number
CN109634618B
CN109634618B CN201811339005.1A CN201811339005A CN109634618B CN 109634618 B CN109634618 B CN 109634618B CN 201811339005 A CN201811339005 A CN 201811339005A CN 109634618 B CN109634618 B CN 109634618B
Authority
CN
China
Prior art keywords
program
application program
burning
flash
serial
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
CN201811339005.1A
Other languages
Chinese (zh)
Other versions
CN109634618A (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.)
707th Research Institute of CSIC
Original Assignee
707th Research Institute of CSIC
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 707th Research Institute of CSIC filed Critical 707th Research Institute of CSIC
Priority to CN201811339005.1A priority Critical patent/CN109634618B/en
Publication of CN109634618A publication Critical patent/CN109634618A/en
Application granted granted Critical
Publication of CN109634618B publication Critical patent/CN109634618B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to a TMS320C674X processor-based two-stage BootLoader serial loading self-starting method, which can allow the influence of accidental interruption on a system in a burning process while considering the advantages of software program updating and maintenance through serial communication under the condition of not disassembling a strapdown inertial navigation system, and adopts a UBL (user BootLoader) two-stage BootLoader mode after FLASH burning is finished.

Description

TMS320C 674X-based serial boot loader loading self-starting method for processor secondary boot loader
Technical Field
The invention belongs to the technical field of embedded basic software platforms, relates to a strapdown inertial navigation system, and particularly relates to a secondary BootLoader serial loading self-starting method based on a TMS320C674X processor.
Background
The TMS320C674X series high-performance floating-point DSP (digital Signal processing) processor of TI company has the advantages of low power consumption, rich interfaces, strong floating-point arithmetic capability and the like, and is widely applied to a strapdown inertial navigation system as a system CPU. The TMS320C674X series processor applied in engineering practice necessarily involves a chip start-up guide link, and the TMS320C674X processor guide mode commonly used at present mainly comprises an emulator JTAG interface + FLASH loading mode and a serial interface + FLASH loading mode. The simulator JTAG interface and FLASH loading mode is that the application simulator is connected with the TMS320C674X chip JTAG interface, the binary codes of the application program are programmed in FLASH through the CCS integrated development environment, and after the application program is electrified again, the processor automatically guides the application program to the SDRAM to run; the serial interface and FLASH loading mode integrates a serial burning program and an application program together to be burned into a continuous FLASH address space, the serial burning program is called under specific conditions, the serial burning program receives a new application program binary code through the serial interface and burns the code into FLASH, the system is electrified and started again, and the processor automatically guides the new application program to SDRAM to run.
No matter the mode of a simulator JTAG interface + FLASH loading or the mode of a serial interface + FLASH loading, aiming at a TMS320C674X series DSP processor, the method utilizes the processor to guide the loading and starting process, and belongs to a mode of one-level BootLoader, namely RBL (rom BootLoader). For the method of loading the JTAG interface of the simulator and the FLASH, as the DSP chip is integrated in a system circuit, the strapdown inertial navigation system needs to be disassembled every time a software program is updated, and then the chip JTAG interface is connected through the simulator to update the software program, in a relatively complex navigation system, the disassembling or disassembling of the strapdown inertial navigation system is a relatively complicated process in the aspect of involvement, so that a plurality of inconveniences obviously exist in the practical use through the method of loading the program by the JTAG interface of the simulator and the FLASH; for the serial interface and FLASH loading method, after a serial burning program is firstly burnt into FLASH through a JTAG interface, a subsequent updating application program can update software through the serial interface, so that the strapdown inertial navigation can not be disassembled any more, the operability is obviously improved compared with the simulator JTAG interface and FLASH loading method, but the serial interface and FLASH loading method also has the defects that the operation cannot be interrupted in the serial burning process, for example, the system is not allowed to be powered off and cannot tolerate the burning error and the like, if the burning fails, the system needs to be disassembled again to be connected with the simulator JTAG interface to update the serial burning program, and meanwhile, the system needs to be powered on or reset again after the burning succeeds, the new application program can be loaded to normally run, and the method has activity in some application occasions.
Through the search of patent documents, only one relevant published patent document is found as follows:
the self-starting serial bootstrap loading and reading system (101770373A) comprises a system-on-chip and an external SPI interface memory, wherein the system-on-chip comprises a CPU, an internal program memory, a self-starting serial bootstrap loading module, a two-way multiplexer and a standard SPI protocol interface. The self-starting serial bootstrap loading module is respectively connected with the input ends I, CPU of the two-way duplex, and is connected with an external SPI interface memory through a standard SPI protocol interface, the input end II of the two-way duplex is connected with the CPU, and the output end is connected with the RAM; the self-starting serial bootstrap loading module consists of a self-starting loading circuit, a working mode switching circuit and an SPI main mode circuit. After the power is on, the self-starting serial bootstrap loading module directly reads the algorithm program in the external memory and quickly loads the algorithm program to the internal program memory.
Through comparison of technical characteristics, the self-starting serial mode of the patent document disclosed in the above is completely different from that of the present invention in technical structure, and therefore, the creativity of the present invention is not affected.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a TMS320C 674X-based serial boot loader serial loading self-starting method for a processor, which can update and maintain software programs through serial communication by using a two-level boot loader (UBL) technology under the condition of not detaching a strapdown inertial navigation system, can avoid the influence on the system caused by unexpected interruption in the updating process, can load application programs automatically and directly guide the starting operation, omits the process of restarting and loading the processor, and is suitable for being applied to the strapdown inertial navigation system.
The technical scheme for realizing the purpose of the invention is as follows:
a TMS320C 674X-based processor secondary BootLoader serial loading self-starting method comprises the following steps:
the method comprises the steps of respectively storing a serial port burning program and an application program in irrelevant address spaces of FLASH;
secondly, the system is powered On, the processor detects a starting mode, the Chip analyzes and transports the AIS script of the serial programming program software in the FLASH to a corresponding On-Chip RAM address space through the first-level BootLoader, and automatically calls a serial programming program c _ Int00() entry function to run;
thirdly, the serial port burning program judges the burning program mark in the FLASH, if the serial port burning program mark is not set, the serial port burning program analyzes the AIS script of the application program, and transports the initialized section code of the application program to a corresponding L2RAM address space, namely a secondary boot loader process, and finally the burning program controls the PC pointer to jump to the application program entry address, so that the application program can normally run;
fourthly, if the burning program mark is set, the serial port burning program only erases an AIS format code of an application program address space in the FLASH, and then receives a new application program script file through a serial interface and burns the new application program script file into a corresponding space of the FLASH;
after the burning is finished, the serial port burning program carries the updated AIS script of the application program in the FLASH to the L2RAM address space through the analysis of the secondary BootLoader; after the burning mark is cleared, the burning program controls the pointer of the processor PC to jump to the entry address of the application program, and the new application program can directly and normally run.
Further, the FLASH is NOR FLASH.
The invention has the advantages and positive effects that:
1. the invention can tolerate the influence of accidental interruption on the system in the burning process while considering the advantages of updating and maintaining a software program through serial communication without disassembling a strapdown inertial navigation system, and simultaneously adopts a UBL (user BootLoader) two-stage BootLoader mode after the FLASH burning is finished, so that an application program code is carried into SDRAM and directly driven to run by replacing a chip with a serial burning program instead of the chip without the chip, thereby saving the operation process of electrifying the system again and having certain flexibility and practicability in the actual use process.
2. Compared with a serial interface and FLASH loading method, the secondary BootLoader serial loading self-starting method only erases and writes an application program code space in NORFLASH when updating a program, and does not influence a burning program AIS script in NORFLASH; meanwhile, due to the adoption of the two-level BootLoader technology, the AIS script of the application program is analyzed and carried to the corresponding address space by a serial port burning program instead of a chip, and the application program automatically jumps to the entry of the application program to run, so that the running process of the new application program which needs external intervention (such as power-on again or DSP reset) is omitted, and the engineering use is very convenient.
Drawings
FIG. 1 is an AISGen tool interface diagram of the present invention;
FIG. 2 is a flow chart of the serial interface + FLASH according to the present invention;
FIG. 3 is a Section Load command word of the present invention;
FIG. 4 is a schematic diagram of a two-level BootLoader serial loading self-starting method according to the present invention;
FIG. 5 is a flow chart of a two-level BootLoader of the present invention;
FIG. 6 is a flow chart of the serial loading self-starting system of the present invention.
Detailed Description
The embodiments of the present invention will be described in detail with reference to the accompanying drawings; the present examples are illustrative and not restrictive, and the scope of the invention is not limited thereto.
In order to make the technical scheme for achieving the purpose of the present invention clearer, the Boot process of the TMS320C674X processor and the ais (application Image script) application mirror Image script related to the present invention are described first, and finally the secondary Boot loader serial loading self-starting method of the present invention is described, so that the technical innovation scheme of the present invention can be understood more quickly.
Firstly, a Boot process of a TMS320C674X processor:
the TMS320C674X processor supports a plurality of Boot startup modes based on ais (application Image script) script format, such as NAND FLASH, NOR FLASH, HPI, I2C, SPI, UART, MMC/SD, and various Boot startup modes are different from the TMS320C674X processor only in the form of hardware interfaces during startup, but the chip Boot startup principle is basically the same.
1. The loading method of the simulator JTAG interface and FLASH.
Although this method has some inconveniences in daily use, it is the most common way of application in engineering practice. An emulator is connected with a processor JTAG interface to burn AIS format application program codes into NOR FLASH through a CCS integrated development environment, after the TMS320C674X processor system is powered on and reset, a chip automatically detects the state of BOOT [7:0] pins, and locks the input state mapping of the BOOT [7:0] pins in a BOOTCFG register of the system to judge the system starting mode (for the NOR FLASH starting mode, the state of the BOOT [7:0] pins is 0x 02). After the starting mode is detected, the processor analyzes an AIS format application program in NOR FLASH by using a BootLoader (RBL) bootstrap program which is resident in a ROM in the Chip when the processor leaves a factory, firstly, the processor is subjected to system configuration according to an AIS file, wherein the system configuration comprises PLL, SDRAM, PSC, DDR, FLASH, Pinmux configuration and the like, then initialized section codes of text, data, switch, control and the like are copied and carried to corresponding addresses of SDRAM, for TMS320C674X, the SDRAM can be an On-Chip L2RAM, an On-Chip RAM or an SDRAM or a DDR of an external EMIF interface, and finally, the processor assigns an application program entry function C _ Int00 address () to a processor PC pointer to operate according to an Ais format skip command, so that the application program can normally operate.
2. The serial interface + FLASH loading method comprises the following steps:
the AISGen tool is used for merging the serial port burning program and the application program out file to generate an Ais format binary code file, as shown in figure 1, the file is firstly burnt into NORFLASH continuous address space in a mode of an emulator JTAG interface and FLASH, after the system is electrified again, the processor detects a starting mode, the Chip carries initialized section codes of the serial port burning program and the application program in NORFLASH to the corresponding SDRAM address space, generally speaking, the application program is stored in an L2RAM space with the higher operation speed of the processor in consideration of the system operation speed, and the serial port burning program is stored in an On-Chip RAM address space of the processor. After the transfer is finished, the processor automatically calls a serial port burning program c _ Int00() entry function, the serial port burning program can normally run, then the serial port burning program judges whether a burning program mark is in other block addresses of NORFLASH, if the burning program mark is not set, the burning program controls a PC pointer of the processor to jump to an application program entry address, and the application program can normally run; if the serial port burning program is set, the serial port burning program erases the original burning program and the AIS format code of the NORFLASH, the new AIS format data file is received through the serial port and is burnt into the NORFLASH, the burning mark is cleared after burning is finished, the system is electrified again, the new application program can be updated, and the system flow schematic diagram is shown in FIG. 2.
As described above, the Boot process of the TMS320C674X processor is a process of transferring and running application program codes to corresponding SDRAM address spaces by a Boot loader program residing in a ROM of a chip itself, and belongs to the category of a first-level Boot loader.
Second, AIS (application Image script) application mirror script
The second-level BootLoader is a process (UBL) of carrying the application program codes to a specified SDRAM address space and driving the operation by a bootstrap program written by a designer on the basis of first-level boot without using a processor after a DSP system is powered on and started. For TMS320C674X DSP processors, the burned program codes are data files in the AIS script format, and the application of the secondary BootLoader necessarily involves the AIS script parsing, so the AIS script files need to be further understood.
Application Image Scripts (AIS) are a data script format file defined by the TI company that stores system command words, program codes in binary data format in files, and such script files have been widely used in TI new generation processors. The AIS script file contains a series of command words and code data, which are called Opcode in the profession, and whether the Opcode is a first-level BootLoader (RBL) or a second-level BootLoader (UBL), the Opcode is analyzed and then further processed. The Opcode command word is shown in the table below.
TABLE 1 Opcode Command words
Figure BDA0001862020250000051
The Opcode Command word is most frequently used and most importantly, the mac word, the Section Load Command, the Function execution Command, and the Jump & Close Command, which are defined below.
Figure BDA0001862020250000052
A magic word: magic code, script header identification, AIS script files are all started with magic word, namely from 0x 41504954;
Figure BDA0001862020250000053
function execution Command: function execution commands, typically present at the beginning of the AIS file, by which the RBL or UBL initializes the DSP processor by parsing the command, such as PLL, PSC, EMIF, DDR initialization, etc.;
Figure BDA0001862020250000055
Jump&close Command: a jump ending command which represents the end of the AIS script file, the following 32-Bit data is the address of the guided program entry c _ Init00(), and the guide program sets a PC pointer according to the address to drive the program to be guided to run;
Figure BDA0001862020250000054
section Load Command: a segment load command identifying the initialized segment binary code. In the AIS script file, the initialized codes of the programs are all stored behind the Section Load, as shown in FIG. 3, wherein address designates the code to be loaded to the specific address of SDRAM, SIZE designates the code length, and DATA is the binary code of the program.
Based on the above technical basis, the following describes specific embodiments of the present invention:
a TMS320C 674X-based processor secondary BootLoader serial loading self-starting method comprises the following steps:
the method comprises the steps of respectively storing a serial port burning program and an application program in two independent address spaces of NORFLASH;
after the system is powered On, the processor detects a starting mode, the Chip analyzes and transports the AIS script of the serial programming program software in NORFLASH to a corresponding On-Chip RAM address space through the primary BootLoader, and automatically calls a serial programming program c _ Int00() entry function to run;
thirdly, the serial port burning program judges the burning program mark in NORFLASH, if the serial port burning program mark is not set, the serial port burning program written by a designer can analyze the AIS script of the application program and transport the initialized section code of the application program to the corresponding L2RAM address space, namely, the secondary boot loader process, and finally the burning program controls the PC pointer of the processor to jump to the entry address of the application program, so that the application program can normally run;
if the burning program mark is set, the serial port burning program only erases an AIS format code of an application program address space in NORFLASH, receives a new application program script file through a serial interface and burns the new application program script file into a corresponding space of the NORFLASH;
after the burning is finished, the serial port burning program carries the updated application program AIS script in NORFLASH to the L2RAM address space through secondary BootLoader analysis; after the burning mark is cleared, the burning program controls the pointer of the processor PC to jump to the entry address of the application program, and the new application program can directly and normally run.
The method for the serial loading and self-starting of the secondary BootLoader is shown in fig. 4, the flow chart of the secondary BootLoader is shown in fig. 5, and the flow chart of the system is shown in fig. 6.
It should be noted that: as shown in fig. 2, since the serial interface + FLASH loading method is to combine the serial port burning program and the application program out file to generate an Ais format script file, burn the file into the NOR FLASH continuous address space, when updating the application program, the burning program and the application program script residing in the NOR FLASH are erased, and then the newly generated original burning program and the new application program Ais script file are received through serial port communication, and the burning of the Ais file into the NOR FLASH space. However, this method cannot cause an interruption operation during erasing or rewriting, and if the intermediate process is interrupted and the processor is powered on again and started, the processor cannot recognize an incomplete AIS script, so that the effects of parsing a script file and driving the application program to run cannot be achieved.
Compared with the serial interface and FLASH loading method, the secondary BootLoader serial loading self-starting method only erases and writes an application program code space in the NOR FLASH (as shown in fig. 4) when updating the program, and does not affect the burning program AIS script in the NOR FLASH. Meanwhile, the two-level BootLoader technology is adopted, the AIS script of the application program is analyzed and carried to the corresponding address space by a serial port burning program instead of a chip, and the application program automatically jumps to the entry of the application program to run, so that the process that a new application program can run only by external intervention (such as power-on again or DSP reset) is omitted, and the engineering use is very convenient.

Claims (2)

1. A TMS320C 674X-based processor secondary BootLoader serial loading self-starting method is characterized in that: the method comprises the following steps:
the method comprises the steps of respectively storing a serial port burning program and an application program in irrelevant address spaces of FLASH;
secondly, the system is powered On, the processor detects a starting mode, the Chip analyzes and transports the AIS script of the serial programming program software in the FLASH to a corresponding On-Chip RAM address space through the first-level BootLoader, and automatically calls a serial programming program c _ Int00() entry function to run;
thirdly, the serial port burning program judges the burning program mark in the FLASH, if the serial port burning program mark is not set, the serial port burning program analyzes the AIS script of the application program, and transports the initialized section code of the application program to a corresponding L2RAM address space, namely, a secondary boot loader process, and finally the burning program controls the PC pointer to jump to the entry address of the application program, so that the application program can normally run;
fourthly, if the burning program mark is set, the serial port burning program only erases an AIS format code of an application program address space in the FLASH, and then receives a new application program script file through a serial interface and burns the new application program script file into a corresponding space of the FLASH;
after the burning is finished, the serial port burning program transfers the updated AIS script of the application program in the FLASH to the address space of the L2RAM through the analysis of the secondary BootLoader; after the burning mark is cleared, the burning program controls the pointer of the processor PC to jump to the entry address of the application program, and the new application program can directly and normally run.
2. The TMS320C674X processor-based two-level BootLoader serial loading self-starting method according to claim 1, wherein: the FLASH is NOR FLASH.
CN201811339005.1A 2018-11-12 2018-11-12 TMS320C 674X-based serial boot loader loading self-starting method for processor secondary boot loader Active CN109634618B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811339005.1A CN109634618B (en) 2018-11-12 2018-11-12 TMS320C 674X-based serial boot loader loading self-starting method for processor secondary boot loader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811339005.1A CN109634618B (en) 2018-11-12 2018-11-12 TMS320C 674X-based serial boot loader loading self-starting method for processor secondary boot loader

Publications (2)

Publication Number Publication Date
CN109634618A CN109634618A (en) 2019-04-16
CN109634618B true CN109634618B (en) 2021-12-31

Family

ID=66067787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811339005.1A Active CN109634618B (en) 2018-11-12 2018-11-12 TMS320C 674X-based serial boot loader loading self-starting method for processor secondary boot loader

Country Status (1)

Country Link
CN (1) CN109634618B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110727450A (en) * 2019-10-11 2020-01-24 上海元城汽车技术有限公司 Method and device for updating boot loader
CN111026420A (en) * 2019-11-14 2020-04-17 天津航空机电有限公司 Online loading method based on TMS320C6000 series processor
CN110990041A (en) * 2019-12-16 2020-04-10 杭州涂鸦信息技术有限公司 Bootloader upgrading method and bootloader upgrading system
CN114816273B (en) * 2022-06-27 2023-06-09 杭州优智联科技有限公司 Norflash-oriented adaptive optimal configuration method, device and medium

Also Published As

Publication number Publication date
CN109634618A (en) 2019-04-16

Similar Documents

Publication Publication Date Title
CN109634618B (en) TMS320C 674X-based serial boot loader loading self-starting method for processor secondary boot loader
US9916145B2 (en) Utilizing special purpose elements to implement a FSM
US9189248B2 (en) Specialized boot path for speeding up resume from sleep state
WO2021115477A1 (en) Program upgrade method and apparatus, electronic device and storage medium
JP5218568B2 (en) Information processing apparatus having configuration change function, system configuration change method, and system configuration change program
CN1825283A (en) Method for implementing hardware image starting optimizing of embedded operating system
WO2021258692A1 (en) Multi-chip compatible compiling method and device
CN102364433B (en) Method for realizing Wine construction tool transplanting on ARM (Advanced RISC Machines) processor
CN108182079B (en) TMS320C6748 program loading method based on serial port
US20040181654A1 (en) Low power branch prediction target buffer
CN101334737A (en) Embedded equipment start-up or reset method
TW201426547A (en) Electronic device for bios updatable and bios updating method thereof
US10198544B2 (en) Method for improving OpenCL hardware execution efficiency
CN110716721A (en) TMS320C6748 program loading method compatible with network port and serial port
Sha et al. Design optimization and implementation of bootloader in embedded system development
US9110657B2 (en) Flowchart compiler for a compound complex instruction set computer (CCISC) processor architecture
CN102169446B (en) BIOS (basic input/output system) system and method based on basic input/output system of open source system
CN105630530A (en) Multilevel boot method and system of digital signal processor
KR20020030669A (en) Computer system and a method of automatically setting an operating system thereof
JP2005267445A (en) Debug system
CN105204896A (en) BootLoader design method of digital storage oscilloscope
CN112667544A (en) Method, device, system and medium for controlling mainboard slot enabling
CN117931532B (en) Multi-granularity recovery method for embedded system program supported by on-chip hardware
KR20030060342A (en) Booting method for personal digital assistant
CN113311931B (en) Double-reset vector 8-bit MCU (microprogrammed control Unit) architecture convenient for IAP (inter Access Point) and method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant