CN112363736A - Method, device and storage medium for burning product serial number - Google Patents

Method, device and storage medium for burning product serial number Download PDF

Info

Publication number
CN112363736A
CN112363736A CN202011256442.4A CN202011256442A CN112363736A CN 112363736 A CN112363736 A CN 112363736A CN 202011256442 A CN202011256442 A CN 202011256442A CN 112363736 A CN112363736 A CN 112363736A
Authority
CN
China
Prior art keywords
data
file
serial number
address
burning
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
CN202011256442.4A
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.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group 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 BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202011256442.4A priority Critical patent/CN112363736A/en
Publication of CN112363736A publication Critical patent/CN112363736A/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method, a device and a storage medium for burning a product serial number, which are used for solving the technical problems of low efficiency and low accuracy of burning the product serial number in the prior art, and the method comprises the following steps: when a serial number burning command of an electronic product is received, a first product serial number is obtained from a database and is converted into a second product serial number which is the same as the data type in a second file containing firmware, and meanwhile, a first file containing the second product serial number and a first burning address is generated; merging the first file and a second file containing firmware to obtain a third file; and burning the third file into a specified storage position of a Micro Control Unit (MCU) of the electronic product.

Description

Method, device and storage medium for burning product serial number
Technical Field
The present invention relates to the field of serial number burning, and in particular, to a method, an apparatus, and a storage medium for burning a product serial number.
Background
In order to distinguish uniqueness of a specific electronic product during production of the electronic product, a Serial Number (SN) is usually written in a designated storage location of the electronic product.
However, with the development of technology, the storage space of a Micro Control Unit (MCU) is larger, and the SN of most products is stored in the Flash inside the MCU.
In the prior art, after the MCU burns in a formal Firmware (Firmware), the upper computer sends the SN to the MCU in the electronic product using an agreed communication protocol, and after receiving and checking the SN, the MCU writes the SN into a corresponding Flash address in a self-programming manner.
However, burning SN into an electronic product in this way not only requires the addition of a communication serial port between the host computer and the MCU, but also requires the addition of data communication and Flash internal data erasing and writing functions in the MCU program. This makes it necessary to modify the firmware again in this way when the firmware is produced in mass, which not only increases the workload of the developer, but also requires testing of the firmware, resulting in a lower efficiency of burning the serial number of the product.
Disclosure of Invention
The invention provides a method, a device and a storage medium for burning a product serial number, which are used for solving the technical problems of low efficiency and low accuracy of burning the product serial number in the prior art.
In a first aspect, to solve the above technical problem, a technical solution of a method for burning a serial number of a product according to an embodiment of the present invention is as follows:
when a serial number burning command of an electronic product is received, a first product serial number is obtained from a database and is converted into a second product serial number which is the same as the data type in a second file containing firmware, and meanwhile, a first file containing the second product serial number and a first burning address is generated;
merging the first file with a second file containing firmware to obtain a third file;
and burning the third file into a specified storage position of a Micro Control Unit (MCU) of the electronic product.
One possible implementation, generating a first file containing a second product serial number and a first burned address, includes:
and constructing each line of data according to a preset data format from the lowest byte of the first burning address to the end of the lowest byte of the first burning address to obtain the first file.
In one possible embodiment, the constructing each line of data according to a preset data format from the lowest byte of the first burning address to the end of the highest byte of the first burning address to obtain the first file includes:
sequentially acquiring sub-address data with the first preset number of bytes from the lowest byte to the highest byte;
constructing a first row of data before a row of an end command in the first file according to the preset data format by using the first sub-address data and the second product serial number;
sequentially constructing a line of data in a first file from the second sub-address data according to the preset data format, and directly obtaining the last sub-address data to obtain the first file; wherein the row containing the sub-address data of the high byte is located before the row containing the sub-address data of the low byte.
One possible implementation manner, sequentially constructing a line of data in a first file according to the preset data format, includes:
and when the byte data contained in the last sub-address data is smaller than the first preset value, filling the upper bits of the sub-address data with 0.
In one possible embodiment, the preset data format includes:
the length of the data of the line, the initial address of the line, the type of the data of the line, the data of the line and the checksum of the data of the line.
One possible implementation manner, the line of data includes:
the other sub-address data except the first sub-address data and the second product serial number;
when the data type of the current row is the other sub-address data, the data type of the current row is an extended linear address;
and when the data of the line is the second product serial number, the initial address of the line is the second sub-address data, and the data type of the line is a data record.
One possible implementation, merging the first file with a second file containing firmware to obtain a third file, includes:
removing the data of the line where the ending command is located in the third file to obtain intermediate data;
and inserting the intermediate data into any row before the row of the ending command in the second file to obtain the third file.
In a second aspect, an embodiment of the present invention provides an apparatus for burning a product serial number, including:
the generating unit is used for acquiring a first product serial number from the database when a serial number burning command of an electronic product is received, converting the first product serial number into a second product serial number which is the same as the data type in a second file containing firmware, and generating a first file containing the second product serial number and a first burning address;
the merging unit is used for merging the first file and a second file containing firmware to obtain a third file;
and the burning unit is used for burning the third file into a specified storage position of the micro control unit MCU of the electronic product.
In a possible implementation, the generating unit is further configured to:
and constructing each line of data according to a preset data format from the lowest byte of the first burning address to the end of the lowest byte of the first burning address to obtain the first file.
In a possible implementation, the generating unit is further configured to:
sequentially acquiring sub-address data with the first preset number of bytes from the lowest byte to the highest byte;
constructing a first row of data before a row of an end command in the first file according to the preset data format by using the first sub-address data and the second product serial number;
sequentially constructing a line of data in a first file from the second sub-address data according to the preset data format, and directly obtaining the last sub-address data to obtain the first file; wherein the row containing the sub-address data of the high byte is located before the row containing the sub-address data of the low byte.
In a possible implementation, the generating unit is further configured to:
and when the byte data contained in the last sub-address data is smaller than the first preset value, filling the upper bits of the sub-address data with 0.
In one possible embodiment, the preset data format includes:
the length of the data of the line, the initial address of the line, the type of the data of the line, the data of the line and the checksum of the data of the line.
One possible implementation manner, the line of data includes:
the other sub-address data except the first sub-address data and the second product serial number;
when the data type of the current row is the other sub-address data, the data type of the current row is an extended linear address;
and when the data of the line is the second product serial number, the initial address of the line is the second sub-address data, and the data type of the line is a data record.
In a possible embodiment, the merging unit is configured to:
removing the data of the line where the ending command is located in the third file to obtain intermediate data;
and inserting the intermediate data into any row before the row of the ending command in the second file to obtain the third file.
In a third aspect, an embodiment of the present invention further provides a device for burning a product serial number, including:
at least one processor, and
a memory coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, and the at least one processor performs the method according to the first aspect by executing the instructions stored by the memory.
In a fourth aspect, an embodiment of the present invention further provides a readable storage medium, including:
a memory for storing a plurality of data to be transmitted,
the memory is for storing instructions that, when executed by the processor, cause an apparatus comprising the readable storage medium to perform the method as described in the first aspect above.
Through the technical solutions in one or more of the above embodiments of the present invention, the embodiments of the present invention have at least the following technical effects:
in the embodiment provided by the invention, when a serial number burning command of an electronic product is received, a first product serial number is obtained from a database and is converted into a second product serial number which is the same as the data type in a second file containing firmware, and a first file containing the second product serial number and a first burning address is generated at the same time; merging the first file and a second file containing firmware to obtain a third file; and burning the third file into a specified storage position of a Micro Control Unit (MCU) of the electronic product. Because the first file containing the second product serial number and the first burning address is merged with the second file containing the firmware, the second product serial number and the firmware can be simultaneously written into the appointed storage position of the micro control unit MCU of the electronic product through one-time burning, so that the firmware is not required to be modified and tested after burning, and the technical effects of reducing the workload and improving the burning efficiency are achieved. Moreover, because the second product serial number and the firmware are combined and then are burned in the electronic equipment together, only one communication interface can be used for burning, and an independent communication interface is not needed to be configured for independently burning the product serial number in the prior art, and the functions of data communication and Flash internal data erasing and writing are not needed to be added in the MCU, so that the batch burning of the product serial number and the firmware of the electronic product is facilitated.
Drawings
FIG. 1 is a flowchart illustrating a method for burning a product serial number according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a preset data format according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a product serial number recording device according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method, a device and a storage medium for burning a product serial number, which are used for solving the technical problems of low efficiency and low accuracy of burning the product serial number in the prior art.
In order to better understand the technical solutions of the present invention, the following detailed descriptions of the technical solutions of the present invention are provided with the accompanying drawings and the specific embodiments, and it should be understood that the specific features in the embodiments and the examples of the present invention are the detailed descriptions of the technical solutions of the present invention, and are not limitations of the technical solutions of the present invention, and the technical features in the embodiments and the examples of the present invention may be combined with each other without conflict.
Referring to fig. 1, an embodiment of the invention provides a method for burning a product serial number, and the method includes the following steps.
Step 101: when a serial number burning command of an electronic product is received, a first product serial number with a character type of data acquired from a database is converted into a second product serial number with the same data type as that in a second file containing firmware, and a first file containing the second product serial number and a first burning address is generated.
In order to burn electronic products in batch, a first product serial number corresponding to each electronic device and a first burning address to be burned into the electronic device by the first product serial number can be stored in a database of the burning device, the first product serial number is usually stored in a character type data type in the database, but can also be stored in other data types, and the first burning address is stored in a hexadecimal data type without limitation.
When the burning device receives a serial number burning command of the electronic product, the first product serial number is obtained from the database and is converted into a second product serial number which is the same as the data type in a second file containing the firmware.
For example, the first product serial number of the electronic device 1 in the database is BA120001 (character type), and the data type of the data in the second file containing the firmware is hexadecimal data, and at this time, the first product serial number (BA120001) needs to be converted into the second product serial number (hexadecimal data): 0x 420 x 410 x 310 x 320 x 300 x 300 x 300 x31(0x represents hexadecimal) for the second product serial number to have the same data type as the data in the second file.
If the data type of the first product serial number is the same as that of the data in the second file, conversion is not needed, and the first product serial number is directly used for replacing the second product serial number in a subsequent scheme.
Then, a first file containing the second product serial number and the first burning address can be generated, and the following method can be adopted:
starting from the second product serial number and ending to the high address data of the first burning address, constructing each line of data according to a preset data format to obtain a first file, wherein the method can be realized by adopting the following modes:
sequentially acquiring sub-address data with a first preset number of bytes from the lowest byte to the highest byte, and constructing the first sub-address data and the second product serial number into a row of data before the row of the ending command in the first file according to a preset data format; sequentially constructing a line of data in a first file from the second sub-address data according to a preset data format, and directly obtaining the last sub-address data to obtain the first file; the row containing the sub-address data of the high byte is positioned before the row containing the sub-address data of the low byte.
And when the byte data contained in the last sub-address data is smaller than the first preset value, filling the upper bits of the sub-address data with 0.
For example, with the second product serial number as: 0x 420 x 410 x 310 x 320 x 300 x 300 x 300 x31, the first burnt address is: for example, 0x07a120, the first preset value is 2, and the second preset value is 1.
Starting from the lowest byte (0x20) of the first burned address (0x07a120), sub-address data having 2 bytes is acquired in the direction of the highest byte, with the result that: the first sub-address data is 0xA120, and since 0xA1 has only 1 byte and less than 2 bytes, the upper bits of the last sub-address data are filled with 0, that is, the last sub-address data is 0x 0007.
Since the first burned address (0x07a120) actually includes only 2 sub-address data, the first is 0xA120, and the second is 0x 0007.
Therefore, the first sub-address data 0xA120 and the second product serial number are constructed into a row of data before the row of the ending command in the first file according to a preset data format; and constructing the second sub-address data into a line of data in the first file according to a preset data format to obtain the first file.
The constructed first file content is as follows:
:020000040007F3
:09A120004241313230303030315F
:00000001FF
fig. 2 is a schematic structural diagram of a preset data format according to an embodiment of the present invention.
Presetting a data format, including: the length of the data of the line, the initial address of the line, the type of the data of the line, the data of the line and the checksum of the data of the line.
The line data may be sub-address data other than the first sub-address data, or may be a second product serial number.
When the data type of the line is other sub-address data, the data type of the line is an extended linear address.
And when the data of the line is the second product serial number, the initial address of the line is the second sub-address data, and the data type of the line is the data record.
For example, taking the above-mentioned interior of the first file as an example, in the first file, the first line: the first byte (0x02) represents the data length of the current line; the second, three bytes (0x000 x00) represent the start address of the line data; the fourth word byte (0X04) represents the data type of the line, since the data of the line in the first line is the sub Address data (0X0007), the corresponding data type is identified by '04' and represents the Extended Linear Address Record:); since the sub-address data of the present row includes all the fifth and sixth bytes of the present row data (0X0007) of 2 bytes, it represents an extended linear address; the last byte (i.e. the seventh byte) is the checksum (0xF3) of the data of this line, wherein the algorithm of the checksum is: the checksum is 0x 100-cumulative sum, and the cumulative sum (not counting carry) is the value of all 16-system data before the checksum (0xF3) after byte accumulation without counting carry.
Second line in the first file: the first byte (0x09) represents the data length of the current line; the second, three bytes (0xA 10 x20) represent the present line start address; the fourth byte 0x00 represents the data type of the current row, and since the second product serial number in the second row is the data of the current row, '00' is used to represent the data type of the current row; the fifth to thirteenth bytes represent the present line data (i.e., the second product serial number). Through the sub-address data in the first row and the second row, the address to be written in the second product serial number is 0x 07000000 plus 0xA120, namely the actual address is 0x07a 120; the last byte (i.e., the fourteenth byte) is the checksum of the data in the row, and the checksum is calculated in the same manner as the checksum in the first row.
The last line (00000001FF) of the first file is the line where the end command is located, that is, the data length of the line of the third line is 00, the address is 0000, the data type is 01, and the checksum is the line where the FF end command is located and is used for identifying the end of the second file. The data format used by the line where the end command is located may also be understood as a preset data format, and since the data length of the line in the line where the end command is located is 00, the data of the line is not included in the last line, that is, the data format used by the line where the end command is located includes the following: the length of the data of the line, the address of the data of the line, the type of the data of the line and the checksum of the line.
As another example, the second product serial number is: 0x 420 x 410 x 310 x 320 x 300 x 300 x 300 x31, the first burnt address is: for example, 0x020507a120, the first preset value is 2, and the second preset value is 1.
The sub-address data corresponding to the first burning address (in order from the first one) is: 0xA120, 0x0507, 0x 0002.
:020000040002F8
:020000040507FE
:09A120004241313230303030315F
:00000001FF
After the first file is obtained in the above manner, step 102 may be performed.
Step 102: and merging the first file and a second file containing the firmware to obtain a third file.
Merging the first file with the second file containing the firmware may be accomplished in the following manner:
removing the data of the line where the ending command is located in the third file to obtain intermediate data; and inserting the intermediate data into any line in the second file before the line where the ending command is located to obtain a third file.
For example, the content of the first file is:
:020000040007F3
:09A120004241313230303030315F
:00000001FF
assume that the firmware to be written to the electronic device is the content of the second file, which is (in the following file content, the omitted file content is represented by X for economy):
:020000040000FA
:1000000020EB00208D04000095040000AD020000EC
:10001000990400009B0400009D0400000000000003
:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
:105CE0002A1A8D041AEF041B412B0419181AA50453
:105CF0001A4D1C1AED0451041890D003A339C200A8
:00000001FF
the intermediate data (the following data with a line being slid down) after the line of the ending command in the first file is inserted into the second file before the line of the ending command (i.e. the last line), and then the third file is obtained:
:020000040000FA
:1000000020EB00208D04000095040000AD020000EC
:10001000990400009B0400009D0400000000000003
:1000200000000000000000000000000015020000B9
:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
:105CE0002A1A8D041AEF041B412B0419181AA50453
:105CF0001A4D1C1AED0451041890D003A339C200A8
:020000040007F3
:09A120004241313230303030315F
:00000001FF
it should be noted that the above-mentioned intermediate data may be inserted into any row before the row of the ending command of the second file, and is not illustrated herein for saving space.
Step 103: and burning the third file into a specified storage position of a Micro Control Unit (MCU) of the electronic product.
The designated storage location may be Flash inside the MCU, or other storage space, and is not limited specifically.
In the embodiment provided by the invention, when a serial number burning command of an electronic product is received, a first product serial number is obtained from a database and is converted into a second product serial number which is the same as the data type in a second file containing firmware, and a first file containing the second product serial number and a first burning address is generated at the same time; merging the first file and a second file containing firmware to obtain a third file; and burning the third file into a specified storage position of a Micro Control Unit (MCU) of the electronic product. Because the first file containing the second product serial number and the first burning address is merged with the second file containing the firmware, the second product serial number and the firmware can be simultaneously written into the appointed storage position of the micro control unit MCU of the electronic product through one-time burning, so that the firmware is not required to be modified and tested after burning, and the technical effects of reducing the workload and improving the burning efficiency are achieved. Moreover, because the second product serial number and the firmware are combined and then are burned in the electronic equipment together, only one communication interface can be used for burning, and an independent communication interface is not needed to be configured for independently burning the product serial number in the prior art, and the functions of data communication and Flash internal data erasing and writing are not needed to be added in the MCU, so that the batch burning of the product serial number and the firmware of the electronic product is facilitated.
Based on the same inventive concept, an embodiment of the present invention provides a device for burning a product serial number, and the specific implementation of the method for burning a product serial number of the device can be described in the method embodiment, and repeated descriptions thereof are omitted, please refer to fig. 3, and the device includes:
the generating unit 301 is configured to, when a serial number burning instruction of an electronic product is received, obtain a first product serial number from a database, convert the first product serial number into a second product serial number of the same data type as that in a second file containing firmware, and generate a first file containing the second product serial number and a first burning address;
a merging unit 302, configured to merge the first file with a second file containing firmware to obtain a third file;
and the burning unit 303 is used for burning the third file into a specified storage position of the micro control unit MCU of the electronic product.
In a possible implementation, the generating unit 301 is further configured to:
and constructing each line of data according to a preset data format from the lowest byte of the first burning address to the end of the lowest byte of the first burning address to obtain the first file.
In a possible implementation, the generating unit 301 is further configured to:
sequentially acquiring sub-address data with the first preset number of bytes from the lowest byte to the highest byte;
constructing a first row of data before a row of an end command in the first file according to the preset data format by using the first sub-address data and the second product serial number;
sequentially constructing a line of data in a first file from the second sub-address data according to the preset data format, and directly obtaining the last sub-address data to obtain the first file; wherein the row containing the sub-address data of the high byte is located before the row containing the sub-address data of the low byte.
In a possible implementation, the generating unit 301 is further configured to:
and when the byte data contained in the last sub-address data is smaller than the first preset value, filling the upper bits of the sub-address data with 0.
In one possible embodiment, the preset data format includes:
the length of the data of the line, the initial address of the line, the type of the data of the line, the data of the line and the checksum of the data of the line.
One possible implementation manner, the line of data includes:
the other sub-address data except the first sub-address data and the second product serial number;
when the data type of the current row is the other sub-address data, the data type of the current row is an extended linear address;
and when the data of the line is the second product serial number, the initial address of the line is the second sub-address data, and the data type of the line is a data record.
In a possible implementation, the merging unit 302 is configured to:
removing the data of the line where the ending command is located in the third file to obtain intermediate data;
and inserting the intermediate data into any row before the row of the ending command in the second file to obtain the third file.
Based on the same inventive concept, the embodiment of the invention provides a device for burning a product serial number, which comprises: at least one processor, and
a memory coupled to the at least one processor;
the memory stores instructions executable by the at least one processor, and the at least one processor executes the instructions stored in the memory to perform the method for burning the product serial number.
Based on the same inventive concept, an embodiment of the present invention further provides a readable storage medium, including:
a memory for storing a plurality of data to be transmitted,
the memory is used for storing instructions which when executed by the processor cause the device comprising the readable storage medium to complete the method for burning the product serial number as described above.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method for burning a product serial number is characterized by comprising the following steps:
when a serial number burning command of an electronic product is received, a first product serial number is obtained from a database and is converted into a second product serial number which is the same as the data type in a second file containing firmware, and meanwhile, a first file containing the second product serial number and a first burning address is generated;
merging the first file with a second file containing firmware to obtain a third file;
and burning the third file into a specified storage position of a Micro Control Unit (MCU) of the electronic product.
2. The method of claim 1, wherein generating a first file containing a second product serial number and a first burned address comprises:
and constructing each line of data according to a preset data format from the lowest byte of the first burning address to the end of the lowest byte of the first burning address to obtain the first file.
3. The method of claim 2, wherein constructing each row of data in a predetermined data format starting from a lowest byte of the first burning address and ending at a highest byte of the first burning address to obtain the first file comprises:
sequentially acquiring sub-address data with the first preset number of bytes from the lowest byte to the highest byte;
constructing a first row of data before a row of an end command in the first file according to the preset data format by using the first sub-address data and the second product serial number;
sequentially constructing a line of data in a first file from the second sub-address data according to the preset data format, and directly obtaining the last sub-address data to obtain the first file; wherein the row containing the sub-address data of the high byte is located before the row containing the sub-address data of the low byte.
4. The method as claimed in claim 3, wherein the constructing a line of data in the first file according to the preset data format comprises:
and when the byte data contained in the last sub-address data is smaller than the first preset value, filling the upper bits of the sub-address data with 0.
5. The method according to any one of claims 2-4, wherein the predetermined data format comprises:
the length of the data of the line, the initial address of the line, the type of the data of the line, the data of the line and the checksum of the data of the line.
6. The method of claim 5, wherein the local line of data comprises:
the other sub-address data except the first sub-address data and the second product serial number;
when the data type of the current row is the other sub-address data, the data type of the current row is an extended linear address;
and when the data of the line is the second product serial number, the initial address of the line is the second sub-address data, and the data type of the line is a data record.
7. The method of claim 1, wherein merging the first file with a second file containing firmware to obtain a third file comprises:
removing the data of the line where the ending command is located in the third file to obtain intermediate data;
and inserting the intermediate data into any row before the row of the ending command in the second file to obtain the third file.
8. A device for burning a product serial number is characterized by comprising:
the generating unit is used for acquiring a first product serial number from the database when a serial number burning command of an electronic product is received, converting the first product serial number into a second product serial number which is the same as the data type in a second file containing firmware, and generating a first file containing the second product serial number and a first burning address;
the merging unit is used for merging the first file and a second file containing firmware to obtain a third file;
and the burning unit is used for burning the third file into a specified storage position of the micro control unit MCU of the electronic product.
9. A device for burning a product serial number is characterized by comprising:
at least one processor, and
a memory coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the at least one processor performing the method of any one of claims 1-7 by executing the instructions stored by the memory.
10. A readable storage medium, comprising a memory,
the memory is for storing instructions that, when executed by the processor, cause an apparatus comprising the readable storage medium to perform the method of any of claims 1-7.
CN202011256442.4A 2020-11-11 2020-11-11 Method, device and storage medium for burning product serial number Pending CN112363736A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011256442.4A CN112363736A (en) 2020-11-11 2020-11-11 Method, device and storage medium for burning product serial number

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011256442.4A CN112363736A (en) 2020-11-11 2020-11-11 Method, device and storage medium for burning product serial number

Publications (1)

Publication Number Publication Date
CN112363736A true CN112363736A (en) 2021-02-12

Family

ID=74515222

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011256442.4A Pending CN112363736A (en) 2020-11-11 2020-11-11 Method, device and storage medium for burning product serial number

Country Status (1)

Country Link
CN (1) CN112363736A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113778471A (en) * 2021-09-10 2021-12-10 昆山丘钛微电子科技股份有限公司 Camera module burning method and device and readable storage medium
CN114296754A (en) * 2021-11-30 2022-04-08 深圳市广和通无线股份有限公司 Chip platform upgrading method and related device
CN114691178A (en) * 2022-05-31 2022-07-01 深圳市杰美康机电有限公司 Firmware upgrading method and device based on EtherCAT communication driver

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5838967A (en) * 1992-04-23 1998-11-17 Teac Corporation Image filing apparatus and method for storing image data and directory information
CN101667126A (en) * 2008-09-03 2010-03-10 神讯电脑(昆山)有限公司 Method for burning computer serial number
CN108170447A (en) * 2017-12-08 2018-06-15 摩比天线技术(深圳)有限公司 The on-line automatic method for burn-recording of chip and system
CN111857745A (en) * 2020-06-21 2020-10-30 苏州浪潮智能科技有限公司 Multi-disk burning method, system, equipment and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5838967A (en) * 1992-04-23 1998-11-17 Teac Corporation Image filing apparatus and method for storing image data and directory information
CN101667126A (en) * 2008-09-03 2010-03-10 神讯电脑(昆山)有限公司 Method for burning computer serial number
CN108170447A (en) * 2017-12-08 2018-06-15 摩比天线技术(深圳)有限公司 The on-line automatic method for burn-recording of chip and system
CN111857745A (en) * 2020-06-21 2020-10-30 苏州浪潮智能科技有限公司 Multi-disk burning method, system, equipment and medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113778471A (en) * 2021-09-10 2021-12-10 昆山丘钛微电子科技股份有限公司 Camera module burning method and device and readable storage medium
CN114296754A (en) * 2021-11-30 2022-04-08 深圳市广和通无线股份有限公司 Chip platform upgrading method and related device
CN114691178A (en) * 2022-05-31 2022-07-01 深圳市杰美康机电有限公司 Firmware upgrading method and device based on EtherCAT communication driver

Similar Documents

Publication Publication Date Title
CN112363736A (en) Method, device and storage medium for burning product serial number
US20130007720A1 (en) Dynamic Isolated Debugging via Class Instrumentation
CN106648803A (en) Online upgrading method for DSP chip
CN112445729B (en) Operation address determination method, PCIe system, electronic device and storage medium
CN104346274A (en) Program debugger and program debugging method
CN107577477B (en) DTB file-based multi-platform software version self-adaption method and system
CN112630622A (en) Method and system for pattern compiling and downloading test of ATE (automatic test equipment)
CN108563579A (en) White-box testing method, apparatus, system and storage medium
CN107844305A (en) The method for upgrading software and embedded device of embedded device
CN107770299A (en) A kind of MAC Address writes with a brush dipped in Chinese ink method, system, device and storage medium
CN111506512B (en) Debugging information processing method and device, electronic equipment, storage medium and system
CN106372002B (en) A kind of date storage method and read restoring method
JP2009093501A (en) Image processing apparatus and control method
CN114281538A (en) Memory parameter adjusting method, device, equipment and medium
WO2024124843A1 (en) Data processing method and apparatus, and device and readable storage medium
CN115994085A (en) Code coverage rate test processing method, device, equipment and storage medium
CN109308031B (en) Parameter configuration method, configuration device and storage space based on FPGA circuit
CN108614704B (en) Code compiling method and device
JP2016224559A (en) Program creation support device, control method and program
CN115080444A (en) Test case conversion method and device, electronic equipment and storage medium
CN107612919B (en) Protocol configuration method and device
CN114610557A (en) Method and device for testing equipment driving unit
JPWO2014167670A1 (en) Data transfer apparatus and data transfer method
CN111290765A (en) Firmware fast burning method, system and storage medium
CN113568632B (en) Server power firmware updating method and device, computer equipment and storage medium

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