CN112346746A - TMS32C6748 program burning method based on serial port high reliability - Google Patents

TMS32C6748 program burning method based on serial port high reliability Download PDF

Info

Publication number
CN112346746A
CN112346746A CN202011188026.5A CN202011188026A CN112346746A CN 112346746 A CN112346746 A CN 112346746A CN 202011188026 A CN202011188026 A CN 202011188026A CN 112346746 A CN112346746 A CN 112346746A
Authority
CN
China
Prior art keywords
sector
program
serial port
burning
mark
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.)
Pending
Application number
CN202011188026.5A
Other languages
Chinese (zh)
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 CN202011188026.5A priority Critical patent/CN112346746A/en
Publication of CN112346746A publication Critical patent/CN112346746A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (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 TMS32C6748 program burning method based on serial port high reliability, which is technically characterized in that: the invention plans 18 sectors of Flash; generating a user bootstrap program; when a user bootstrap program UBL is started in a planned Flash storage address for pre-burning and recording, judging a burning mark of the SA18 sector pair, if the burning mark is the burning mark, burning, and otherwise, loading a working program. The functions of realizing communication and completing writing in FLASH by using the debugging interface of the system in real time without dismounting and mounting of a simulator are realized. Compared with the method that the simulator is directly used for programming, the method saves the step of frequent disassembly; meanwhile, when the program is started, the programming inquiry is actively sent to each serial port address, and the program can be directly used in each project without debugging different modified codes of the serial port aiming at each project, so that the universality and the code safety are improved.

Description

TMS32C6748 program burning method based on serial port high reliability
Technical Field
The invention belongs to the technical field of embedded basic software platforms, and particularly relates to a TMS32C6748 program burning method based on serial port high reliability.
Background
With the continuous improvement and improvement of the performance of the strapdown inertial navigation system, the strapdown inertial navigation system is widely applied to the fields of ship, land, aviation and the like, so that the requirements on the miniaturization and the reliability of the system are increasingly improved. Firstly, the compact structural design leads to the dismouting of system to worsen, and dismouting system can lead to the calibration parameter of earlier stage to become invalid, and some mounted position even do not allow the dismouting many times. Secondly, the current universal burning method is a technology that an online simulator carries out program burning on a DSP chip, software upgrading can be completed only by disconnecting the equipment and connecting a downloading line, burning time is long, and system parameters of the equipment can be erased during each burning. The technology is suitable for continuously debugging software in the initial stage of product development. Thirdly, in the traditional program burning mode, the burning is often failed due to the problems of a computer or a cable, a simulator, an operation space and the like in the operation process, and the burning reliability is greatly reduced. In the test and software evaluation process, program updating and burning FLASH frequently occur. Therefore, the system does not need to be disassembled and assembled, does not need a simulator, uses the debugging interface of the system quickly and in real time to realize communication and finish writing in the FLASH.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, and provides a TMS32C6748 program burning method based on serial port high reliability, which can realize communication and complete writing in FLASH by using a debugging interface of a system in real time without dismounting and mounting a simulator.
The technical problem to be solved by the invention is realized by adopting the following technical scheme:
a TMS32C6748 program burning method based on serial port high reliability comprises the following steps:
step 1, planning a Flash storage address;
step 2, generating a user guide program;
and 3, pre-burning a user bootstrap program UBL at the Flash storage address, judging a burning mark of the SA18 sector pair when the user bootstrap program UBL is started, burning if the burning mark is the burning mark, and otherwise, loading a working program.
Moreover, the specific implementation method of the step 1 is as follows: the SA0 sector, the SA1 sector, the SA2 sector and the SA3 sector are divided into a boot loader area, and the space size of the boot loader area is 64 KB; dividing the SA4 sector, the SA5 sector, the SA6 sector and the SA7 sector into user program areas, wherein the space size of the user program areas is 4 × 64 KB; the SA8 sector, the SA9 sector, the SA10 sector and the SA11 sector are divided into serial port program temporary storage areas, and the space size of the serial port program temporary storage areas is 256 KB; the SA12 sector is a parameter area with a space size of 64 KB; the SA13 sector, the SA14 sector, the SA15 sector, the SA16 sector and the SA17 sector are divided into spare areas, and the space size of the spare areas is 5 × 64 KB; the SA18 sector is divided into serial port burning mark areas, and the space size of the serial port burning mark areas is 64 KB.
Moreover, the specific implementation method of the step 2 is as follows: compiling and linking the working code to generate an out file; generating a corresponding automatic bin file by the AISGen from the generated automatic out file; and finally, adding a frame format to the bin file to generate the comburn bin file.
Moreover, the specific implementation method for performing the burning in the step 3 is as follows:
step 3.1, after the UBL program is started, sending a command of whether a new program needs to be burned to each serial port address, receiving a serial port address which determines that the serial port address returned by burning is the serial port used by the program to be burned, and sending a request for selecting a burning file to the serial port;
step 3.2, erasing and writing the SA8 sector and the SA9 sector, reading a comburn.bin file through a serial port according to the stipulation of a comburn.bin file protocol, writing the xbin file which does not contain a frame header and checked bytes into the SA8 sector and the SA9 sector, erasing the SA4 sector, the SA5 sector, the SA6 sector and the SA7 sector after all reading is finished and checking is finished, and writing the contents of the SA8 sector and the SA9 sector into the SA4 sector, the SA5 sector, the SA6 sector and the SA7 sector; erasing the mark to be programmed in the sector SA 18;
and 3.3, sending a programming completion notification to the serial port.
And moreover, the modification of the working code needs to add a command for receiving whether to program or not in the working code debugging serial port code, and if the programming is determined to be required, a programming mark is written into the SA18 sector, and the system is reset by software.
The invention has the advantages and positive effects that:
1. the invention plans 18 sectors of Flash; generating a user bootstrap program; when a user bootstrap program UBL is started in a planned Flash storage address for pre-burning and recording, judging a burning mark of the SA18 sector pair, if the burning mark is the burning mark, burning, and otherwise, loading a working program. Compared with the method of directly programming by using the simulator, the method saves the step of frequently disassembling, realizes the functions of realizing communication and completing writing in FLASH by using the debugging interface of the system in real time without disassembling and assembling the simulator.
2. The invention actively sends programming inquiry to each serial port address when the program is started, and the programming inquiry can be directly used in each project without debugging different modified codes of the serial port aiming at each project, thereby increasing the universality and the code safety.
3. If the communication is interrupted due to power failure or other reasons in the programming process, the programming mark in the SA18 sector of the FALSH is not erased, and the programming mark can still be normally loaded after being electrified again. The content of the burning mark can jump to different BIN mirror image C language entry addresses.
4. The invention only erases the sector of the working code after modifying the working program each time, and the parameter content is preserved.
Drawings
FIG. 1 is a flow chart of burning FLASH according to the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings.
A TMS32C6748 program burning method based on serial port high reliability comprises the following steps:
step 1, planning a Flash storage address. In the step, a storage space FLASH chip S29AL008J is divided outside a TMS320C6748, the storage space of the S29AL008J chip is 1M, and the total number of sectors is 19, and the specific planning is as shown in Table 1:
TABLE 1 FLASH memory Programming
Serial number Sector area Name (R) Size of space
1 SA0-SA3 Boot startup area 64KB
2 SA4-SA7 User program area 4*64KB
3 SA8-SA11 Temporary storage area for serial port programs 256KB
4 SA12 Parameter area 64KB
5 SA13-SA17 Spare area 5*64KB
6 SA18 Serial port burning mark area 64KB
And 2, generating a user guide program. The specific implementation method of the step is as follows: compiling and linking the working code to generate an out file; generating a corresponding automatic bin file by the generated automatic out file through the AISGen provided by the TI; and finally, in order to prevent the checking and reading-writing errors of the bin file, compiling a special bin file reading conversion program into a frame format of the bin file plus frame head and frame tail checking, and generating the bin file.
And 3, pre-burning a user bootstrap program UBL at the Flash storage address, judging a burning mark of the SA18 sector pair when the user bootstrap program UBL is started, burning if the burning mark is the burning mark, and otherwise, loading a working program.
The specific implementation method for burning comprises the following steps:
step 3.1, after the UBL program is started, sending a command of whether a new program needs to be burned to each serial port address, receiving a serial port address which determines that the serial port address returned by burning is the serial port used by the program to be burned, and sending a request for selecting a burning file to the serial port;
step 3.2, erasing and writing the SA8 sector and the SA9 sector, reading a comburn.bin file through a serial port according to the stipulation of a comburn.bin file protocol, writing the xbin file which does not contain a frame header and checked bytes into the SA8 sector and the SA9 sector, erasing the SA4 sector, the SA5 sector, the SA6 sector and the SA7 sector after all reading is finished and checking is finished, and writing the contents of the SA8 sector and the SA9 sector into the SA4 sector, the SA5 sector, the SA6 sector and the SA7 sector; erasing the mark to be programmed in the sector SA 18;
and 3.3, sending a programming completion notification to the serial port.
As shown in fig. 1, the flow of the data diagram for burning FLASH is as follows:
firstly, electrifying;
secondly, RBL automatically reads the contents of bltest. bin, SA0 sector, SA1 sector, SA2 sector and SA3 sector and assigns the contents to a designated RAM;
thirdly, reading the contents of the user image, SA4 sector, SA5 sector, SA6 sector and SA7 sector to a designated RAM by the developed UBL function;
fourthly, whether the serial port burning mark is 0x6666 or not is checked, if the serial port burning mark is 0x6666 or not, the operation is carried out, and otherwise, the selection is carried out;
fifthly, checking whether the first two bytes of the SA4 sector are 0x7E7E, whether the file length is not 0, and whether the last byte is OxBF, if the first two bytes of the SA4 sector are 0x7E7E, the file length is not 0, and the last byte is OxBF, then sixthly, otherwise, performing the operation;
sixthly, prompting: if yes, completing a normal programming process, and not accepting the condition;
quietening, erasing temporary area contents of SA8 sector, SA9 sector, SA10 sector and SA11 sector and accepting serial port data;
and, checking if correct, performing a self-tapping if correct, otherwise performing ⒄
A user program area for a self-check, carry SA8 sector, SA9 sector, SA10 sector, and SA11 sector from temporary area contents to SA4 sector, SA5 sector, SA6 sector, and SA7 sector;
(10) judging whether the transportation is finished or not, if so, carrying out the self-adaptive self;
the serial port programming mark is clear;
taking a water pump to prompt success;
the method has the advantages that the method is good in selection and capable of automatically jumping to the C language entry address of the user mirror image to execute reset, and software self-reset is achieved;
first, DSP works normally, finishes
The method comprises the following steps: ask if FLASH is to be programmed? A selection is yes or no;
judging whether the reply is yes or not, if so, performing the peace, otherwise, performing the pull;
⒄, prompting: and checking errors, and enabling the user to power off and restart the device for two seconds.
Meanwhile, the modification of the working code needs to add a command for receiving whether to program or not in the working code debugging serial port code, if the programming is determined to be required, a programming mark is written into an SA18 sector, and the system is reset by software.
By the TMS32C6748 program burning method based on the serial port high reliability, testing is carried out on a PCL171 type 122 mm vehicle-mounted grenade gun fire control subsystem positioning and orienting device, repeated successful burning is completed without disassembling and assembling a system, and reliability and rapidity are strictly checked and verified from a prototype to design and finalization.
It should be emphasized that the embodiments described herein are illustrative rather than restrictive, and thus the present invention is not limited to the embodiments described in the detailed description, but also includes other embodiments that can be derived from the technical solutions of the present invention by those skilled in the art.

Claims (5)

1. A TMS32C6748 program burning method based on serial port high reliability is characterized by comprising the following steps:
step 1, planning a Flash storage address;
step 2, generating a user guide program;
and 3, pre-burning a user bootstrap program UBL at the Flash storage address, judging a burning mark of the SA18 sector pair when the user bootstrap program UBL is started, burning if the burning mark is the burning mark, and otherwise, loading a working program.
2. The TMS32C6748 program burning method based on the serial port high reliability as claimed in claim 1, wherein: the specific implementation method of the step 1 comprises the following steps: the SA0 sector, the SA1 sector, the SA2 sector and the SA3 sector are divided into a boot loader area, and the space size of the boot loader area is 64 KB; dividing the SA4 sector, the SA5 sector, the SA6 sector and the SA7 sector into user program areas, wherein the space size of the user program areas is 4 × 64 KB; the SA8 sector, the SA9 sector, the SA10 sector and the SA11 sector are divided into serial port program temporary storage areas, and the space size of the serial port program temporary storage areas is 256 KB; the SA12 sector is a parameter area with a space size of 64 KB; the SA13 sector, the SA14 sector, the SA15 sector, the SA16 sector and the SA17 sector are divided into spare areas, and the space size of the spare areas is 5 × 64 KB; the SA18 sector is divided into serial port burning mark areas, and the space size of the serial port burning mark areas is 64 KB.
3. The TMS32C6748 program burning method based on the serial port high reliability as claimed in claim 1, wherein: the specific implementation method of the step 2 comprises the following steps: compiling and linking the working code to generate an out file; generating a corresponding automatic bin file by the AISGen from the generated automatic out file; and finally, adding a frame format to the bin file to generate the comburn bin file.
4. The TMS32C6748 program burning method based on the serial port high reliability as claimed in claim 1, wherein: the specific implementation method for burning in the step 3 is as follows:
step 3.1, after the UBL program is started, sending a command of whether a new program needs to be burned to each serial port address, receiving a serial port address which determines that the serial port address returned by burning is the serial port used by the program to be burned, and sending a request for selecting a burning file to the serial port;
step 3.2, erasing and writing the SA8 sector and the SA9 sector, reading a comburn.bin file through a serial port according to the stipulation of a comburn.bin file protocol, writing the xbin file which does not contain a frame header and checked bytes into the SA8 sector and the SA9 sector, erasing the SA4 sector, the SA5 sector, the SA6 sector and the SA7 sector after all reading is finished and checking is finished, and writing the contents of the SA8 sector and the SA9 sector into the SA4 sector, the SA5 sector, the SA6 sector and the SA7 sector; erasing the mark to be programmed in the sector SA 18;
and 3.3, sending a programming completion notification to the serial port.
5. The TMS32C6748 program burning method based on the serial port high reliability as claimed in claim 3, wherein: and the modification of the working code needs to add a command for receiving whether to program or not in the working code debugging serial port code, and if the programming is determined to be required, a programming mark is written into the SA18 sector, and the system is reset by software.
CN202011188026.5A 2020-10-30 2020-10-30 TMS32C6748 program burning method based on serial port high reliability Pending CN112346746A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011188026.5A CN112346746A (en) 2020-10-30 2020-10-30 TMS32C6748 program burning method based on serial port high reliability

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011188026.5A CN112346746A (en) 2020-10-30 2020-10-30 TMS32C6748 program burning method based on serial port high reliability

Publications (1)

Publication Number Publication Date
CN112346746A true CN112346746A (en) 2021-02-09

Family

ID=74356724

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011188026.5A Pending CN112346746A (en) 2020-10-30 2020-10-30 TMS32C6748 program burning method based on serial port high reliability

Country Status (1)

Country Link
CN (1) CN112346746A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902556A (en) * 2012-09-06 2013-01-30 深圳市共进电子股份有限公司 Multistage boot load method of embedded equipment
CN105183523A (en) * 2015-09-29 2015-12-23 国网智能电网研究院 Method for remote upgrade of digital signal processor (DSP) program
CN108108179A (en) * 2017-12-15 2018-06-01 中国船舶重工集团公司第七0七研究所 A kind of TMS32C6713 burning program FLASH methods based on serial ports
CN110045968A (en) * 2019-04-16 2019-07-23 广东欧谱曼迪科技有限公司 A kind of method of the STM32 across single-chip microcontroller burning program
CN110716721A (en) * 2019-08-27 2020-01-21 中国船舶重工集团公司第七0七研究所 TMS320C6748 program loading method compatible with network port and serial port
CN111209021A (en) * 2020-01-03 2020-05-29 杭州涂鸦信息技术有限公司 Batch automatic burning method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902556A (en) * 2012-09-06 2013-01-30 深圳市共进电子股份有限公司 Multistage boot load method of embedded equipment
CN105183523A (en) * 2015-09-29 2015-12-23 国网智能电网研究院 Method for remote upgrade of digital signal processor (DSP) program
CN108108179A (en) * 2017-12-15 2018-06-01 中国船舶重工集团公司第七0七研究所 A kind of TMS32C6713 burning program FLASH methods based on serial ports
CN110045968A (en) * 2019-04-16 2019-07-23 广东欧谱曼迪科技有限公司 A kind of method of the STM32 across single-chip microcontroller burning program
CN110716721A (en) * 2019-08-27 2020-01-21 中国船舶重工集团公司第七0七研究所 TMS320C6748 program loading method compatible with network port and serial port
CN111209021A (en) * 2020-01-03 2020-05-29 杭州涂鸦信息技术有限公司 Batch automatic burning method and system

Similar Documents

Publication Publication Date Title
CN110231952B (en) ECU program backup and cyclic upgrade control method and device
CN111124550B (en) Program dynamic loading method and device and storage medium
CN109189405B (en) Method and system for verifying Flash data consistency of program
CN112506535A (en) Method for updating Bootloader software by automobile ECU controller
US20070168793A1 (en) Device and method capable of verifying program operation of non-volatile memory and method card including the same
CN104407878A (en) On-line upgrading method of C6000 digital signal processor
CN108920168B (en) Bootloader method supporting simultaneous upgrading of multiple similar ECUs and having function of preventing program mismatching
CN102360569A (en) Burning method, system and apparatus for nand flash chips
CN111679839B (en) On-line programming method of MCU FLASH
CN108845823B (en) Software online upgrading method based on F2812 chip
CN112346746A (en) TMS32C6748 program burning method based on serial port high reliability
CN110716721A (en) TMS320C6748 program loading method compatible with network port and serial port
CN107657153B (en) Code protection method and device for flash area in chip
CN109766116B (en) Multi-core control assembly online guiding and upgrading method based on CAN communication
CN111158660B (en) Multi-mode on-orbit programming method for on-board software EEPROM (electrically erasable programmable read-Only memory)
CN100359485C (en) Testing device and method for flush-bonding system
CN114996717A (en) Upgrade program design method for preventing error erasure
CN111796839B (en) Controller program management method and device
CN110119284B (en) Flash memory programming system and method
US20100083073A1 (en) Data processing apparatus, memory controlling circuit, and memory controlling method
CN111309350A (en) Bootload updating method
CN117215619B (en) Online upgrading method of application program, chip and intelligent device
US20230418591A1 (en) Firmware update method of a flash bootloader in a micro controller unit for a vehicle
CN112463197A (en) Offline loading method based on DSP serial port
CN116301974A (en) Labview-based multi-board online upgrading method for single-board voltage inspection device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210209

RJ01 Rejection of invention patent application after publication