Control method and device of off-line burner, electronic equipment and storage medium

The offline burner uses a secure digital card to automatically identify the execution mode and burn the firmware, solving the inefficiency problem of the existing technology that requires connecting to a debugger or computer, and realizing an efficient chip burning process.

CN120803473APending Publication Date: 2025-10-17ALLWINNER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510751691.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

In the prior art, the chip burning process requires connection to a professional debugger or a computer, which is inefficient.

Method used

Using an offline programmer, the device obtains mode instructions through the secure digital card, automatically identifies the execution mode, and obtains the firmware to be burned from the secure digital card in the burn mode, and burns it directly to the target chip without the need for a professional debugger or computer connection.

Benefits of technology

It realizes automatic chip burning without the need for professional debugger and computer connection, improving burning efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803473A_ABST
    Figure CN120803473A_ABST
Patent Text Reader

Abstract

The invention discloses a control method and device of an offline burner, electronic equipment and a storage medium, and relates to the technical field of chip firmware burning. The control method comprises the steps that a mode indication instruction is obtained from the secure digital card, a current execution mode is determined based on the mode indication instruction, the current execution mode comprises a programming mode and a reading mode, and if the current execution mode is the programming mode, target programming indication information is obtained from the secure digital card, and then acquiring firmware to be burnt from the secure digital card based on target burning indication information, and burning the firmware to be burnt to a target chip connected with the control chip. Thus, the current execution mode is automatically recognized, when the current execution mode is the programming mode, the firmware to be programmed is automatically programmed to the target chip, a professional debugger does not need to be connected in the programming process, the firmware does not need to be connected to a computer end, off-line programming is achieved, and therefore the programming efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of chip firmware programming, and particularly relates to a control method and device of an offline programmer, an electronic device and a storage medium. BACKGROUND

[0002] After semiconductor chips are manufactured, they need to be tested for mass production to screen out chips without defects. In order to test, the test program, that is, the firmware, needs to be programmed into the chip. In the programming process of the related art, a professional debugger needs to be connected for online programming, or connected to a computer for online programming, and the programming process is very inefficient. SUMMARY

[0003] The present application aims to at least solve one of the technical problems in the prior art. To this end, the present application provides a control method and device of an offline programmer, an electronic device and a storage medium, which can realize offline programming and improve programming efficiency.

[0004] The control method of the offline programmer according to the first aspect of the present application is applied to a control chip of the offline programmer, and the offline programmer further includes a secure digital card connected to the control chip.

[0005] The method comprises:

[0006] obtaining a mode indication instruction from the secure digital card, and determining a current execution mode based on the mode indication instruction;

[0007] if it is detected that the current execution mode is a programming mode, obtaining target programming indication information from the secure digital card;

[0008] obtaining to-be-programmed firmware from the secure digital card based on the target programming indication information, and programming the to-be-programmed firmware to a target chip connected to the control chip.

[0009] The control method of the offline programmer according to the present application has at least the following beneficial effects: the control method first obtains a mode indication instruction from a secure digital card, determines a current execution mode based on the mode indication instruction, obtains target programming indication information from the secure digital card if the current execution mode is a programming mode, then obtains to-be-programmed firmware from the secure digital card based on the target programming indication information, and programs the to-be-programmed firmware to a target chip connected to the control chip. In this way, the current execution mode is automatically identified, and the to-be-programmed firmware is automatically programmed to the target chip when the current execution mode is the programming mode. Moreover, the programming process does not need to be connected to a professional debugger or a computer, offline programming is realized, and the programming efficiency is improved.

[0010] According to some embodiments of the present application, after the mode indication instruction is acquired from the secure digital card and the current execution mode is determined based on the mode indication instruction, the method further comprises:

[0011] In a case where the current execution mode is detected as the reading mode, target reading indication information is acquired from the secure digital card;

[0012] Based on the target reading indication information, a to-be-analyzed firmware is acquired from the target chip, and the to-be-analyzed firmware is stored in the secure digital card.

[0013] According to some embodiments of the present application, after the to-be-analyzed firmware is acquired from the target chip based on the target reading indication information, and the to-be-analyzed firmware is stored in the secure digital card, the method further comprises:

[0014] In a case where the control chip is detected as being connected to a preset terminal, a firmware uploading instruction sent by the preset terminal is acquired;

[0015] Based on the firmware uploading instruction, the to-be-analyzed firmware is read from the secure digital card, and the to-be-analyzed firmware is transmitted to the preset terminal.

[0016] According to some embodiments of the present application, the acquiring of the target burning indication information from the secure digital card comprises:

[0017] Determining flash memory model information of a target chip connected to the control chip;

[0018] From a plurality of burning indication information of the secure digital card, target burning indication information matching the flash memory model information is determined as the target burning indication information.

[0019] According to some embodiments of the present application, the target burning indication information comprises a first data length, a first storage address and a first burning address of the to-be-burned firmware.

[0020] The acquiring of the to-be-burned firmware from the secure digital card based on the target burning indication information, and the burning of the to-be-burned firmware to the target chip connected to the control chip, comprises:

[0021] Based on the first data length and the first storage address, the to-be-burned firmware is acquired from the secure digital card;

[0022] The to-be-burned firmware is transmitted to the first burning address of the target chip.

[0023] According to some embodiments of the present application, the target burning indication information further comprises a burnable number of times of the to-be-burned firmware.

[0024] before the transmitting the to-be-burned firmware to the first burn address of the target chip, further comprising:

[0025] detecting the burnable times, and generating a burn stop instruction when it is detected that the burnable times are less than 1;

[0026] after the transmitting the to-be-burned firmware to the first burn address of the target chip, further comprising:

[0027] decrementing the burnable times by 1.

[0028] According to some embodiments of the present application, the target reading indication information comprises a second data length, a second save address and a second burn address of the to-be-analyzed firmware.

[0029] The obtaining the to-be-analyzed firmware from the target chip based on the target reading indication information and storing the to-be-analyzed firmware in the secure digital card comprises:

[0030] reading the to-be-analyzed firmware from the target chip based on the second burn address;

[0031] storing the to-be-analyzed firmware in the secure digital card based on the second data length and the second save address.

[0032] The second aspect embodiment of the present application provides a control device of an offline burner, applied to a control chip of the offline burner, wherein the offline burner further comprises a secure digital card connected with the control chip.

[0033] The control device comprises:

[0034] a first obtaining module, configured to obtain a mode indication instruction from the secure digital card and determine a current execution mode based on the mode indication instruction;

[0035] a second obtaining module, configured to obtain target burn indication information from the secure digital card when it is detected that the current execution mode is a burn mode;

[0036] a burn module, configured to obtain to-be-burned firmware from the secure digital card based on the target burn indication information and burn the to-be-burned firmware to a target chip connected with the control chip.

[0037] The third aspect embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the control method of the offline burner of any one of the first aspect embodiments when executing the computer program.

[0038] The fourth aspect embodiment of the present application provides a computer readable storage medium, the storage medium stores a computer program, the computer program is executed by a processor to realize the control method of the off-line burner in any one of the first aspect embodiments.

[0039] Additional aspects and advantages of the present application will be in part apparent and in part pointed out hereinafter. BRIEF DESCRIPTION OF DRAWINGS

[0040] The present application will be further described below in conjunction with the accompanying drawings and embodiments, wherein:

[0041] Figure 1 The function structure block diagram of the off-line burner of the embodiments of the present application is shown in FIG. 1;

[0042] Figure 2 The step flowchart of the control method of the off-line burner of the embodiments of the present application is shown in FIG. 2;

[0043] Figure 3 The step flowchart of the control method of the off-line burner of the embodiments of the present application is shown in FIG. 2;

[0044] Figure 4 The step flowchart of the control method of the off-line burner of the embodiments of the present application is shown in FIG. 2;

[0045] Figure 5 The step flowchart of the control method of the off-line burner of the embodiments of the present application is shown in FIG. 2; Figure 2 The specific flowchart of step S210 in the embodiment of the present application is shown in FIG. 3;

[0046] Figure 6 The specific flowchart of step S230 in the embodiment of the present application is shown in FIG. 4; Figure 2

[0047] The specific flowchart of step S230 in the embodiment of the present application is shown in FIG. 4; Figure 7 Figure 3 The specific flowchart of step S320 in the embodiment of the present application is shown in FIG. 6;

[0048] Figure 8 The structure diagram of the control device of the embodiments of the present application is shown in FIG. 7;

[0049] Figure 9 The structure diagram of the electronic device of the embodiments of the present application is shown in FIG. 8. DETAILED DESCRIPTION

[0050] The embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference signs represent the same or similar elements or elements with the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as a limitation of the present application.

[0051] ​In the description of the present application, it needs to be understood that the orientation description, such as the orientation or position relationship indicated by the upper, lower, front, rear, left, right and the like, is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the device or element indicated must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application.

[0052] In the description of the present application, if one of several meanings is more than one, the meaning of multiple is more than two, greater than, less than, more than and the like are understood as not including the number, above, below, within and the like are understood as including the number. If it is described as first, second, it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features or implicitly indicating the sequence of indicated technical features.

[0053] In the description of the present application, unless otherwise explicitly limited, the words such as setting, installing, connecting and the like should be broadly understood, and those skilled in the art can reasonably determine the specific meaning of the above words in the present application in combination with the specific content of the technical solution.

[0054] In the description of the present application, the description of the terms "one embodiment", "some embodiments", "illustrative embodiment", "example", "specific example" or "some examples" means that the specific features, structures, materials or characteristics described in combination with the embodiment or example are included in at least one embodiment or example of the present application. In the specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0055] Chip burning refers to burning firmware to the Flash memory of the chip. For example, in some related technologies, the product core (Cortex-A7, A53, etc.) is connected through the DS5 debugger JTAG interface, the project-specific DDR (onboard DDR or SIP DDR) is initialized, the FLASH device is initialized (operations such as initialization, reading and writing of the medium type are involved). Finally, the content to be burned is first stored in the DDR through the PC, and then moved to the FLASH medium through the DDR to complete a board-level burning. This scheme belongs to the conventional single-board burning method, which is widely used in various project developments, but is limited by the need to connect the DS5 debugger, which is expensive and the overall operation is relatively cumbersome, and is more suitable for single-board burning and debugging. In some other related technologies, the burner is connected to the computer PC end through the USB line and the like. From the operation, the file to be burned is read and burned to the FLASH memory of the specific interface. This method needs to be connected to the PC end to perform burning, and the efficiency is very low.

[0056] Based on this, the embodiment of the application provides a control method and device of an offline burner, electronic equipment and a storage medium, which can realize offline burning and improve the burning efficiency.

[0057] First, the offline burner of the embodiment of the application is described. Referring to Figure 1 , Figure 1 is a functional block diagram of the offline burner of the embodiment of the application. The offline burner comprises a substrate, and the substrate is provided with a control chip, a power module, an SD card slot, a UART serial port, a USB interface, an indicator light, a storage module and a plurality of flash interfaces. The storage module can be an on-board DDR or a SIPDDR. The SD card is used to install a secure digital card. The control chip is electrically connected with the power module, the secure digital card, the UART serial port, the USB interface, the indicator light, the storage module and the plurality of flash interfaces. The USB interface is used to access a USB data line, so as to be connected to a computer end. Different to-be-burned chips can be connected through the plurality of flash interfaces. The FLASH memories in the different to-be-burned chips are not the same. The FLASH memories in the to-be-burned chips can be any one or more of NAND, SPI NAND and SPI NOR. The power module is used for power supply. The UART serial port is used to connect an external device.

[0058] The secure digital card (Secure Digital Memory Card, SD) is a new generation of memory device based on semiconductor flash memory, which has the advantages of small size, fast data transmission speed, hot pluggable and the like, and is very suitable for use in the scene of the offline burner which needs portable and efficient data storage and transmission. The SD card in the offline burner usually adopts a file system format such as FAT32 or exFAT, so that the burner can recognize and read the files therein. In actual application, the user only needs to insert the SD card containing the firmware program into the offline burner, and the burner can read the files in the SD card and burn the firmware program into the target chip.

[0059] Onboard DDR(Double Data Rate Synchronous Dynamic Random Access Memory) is a memory chip directly integrated on the circuit board (such as motherboard, embedded system board, etc.), which as a key component of computer or electronic equipment, is responsible for temporarily storing data and instructions that need to be accessed quickly by the processor. Onboard DDR works synchronously with the processor, and can transmit data on both the rising and falling edges of the clock signal, which is twice the data transfer rate of single data rate memory, thus significantly improving the overall performance of the system. Onboard DDR has the characteristics of high bandwidth and low latency, which can meet the demand of modern processors for high-speed data access, and is widely used in computer, server, communication equipment, embedded system and other fields. It is usually integrated in the form of memory module on the circuit board, with a capacity ranging from several hundred megabytes to several tens of gigabytes, depending on the application scenario and demand.

[0060] SIP DDR(Systemin Package Double Data Rate Synchronous Dynamic Random Access Memory) is a DDR memory using system-level packaging technology, which integrates processor, memory (such as DDR chip) and other functional chips in one package to form a basic complete functional unit. From the implementation point of view, based on existing mature chips, different functional bare chips are integrated on a packaging substrate, for example, by stacking multiple 16Gb bare dies on the packaging substrate, breaking through the limitation of two-dimensional space, greatly improving the integration density per unit area, and then realizing different specifications of SIP DDR products such as 16GB capacity DDR4 particles.

[0061] FLASH memory is a non-volatile memory with the characteristics of electrically erasable and programmable, widely used in various electronic devices such as computers, mobile phones, digital cameras, embedded systems, etc. Its core principle is based on the floating gate transistor structure, which stores data by capturing or releasing electrons in the floating gate of the transistor, and the data can be retained for a long time even after power off.

[0062] Based on Figure 1The illustrated offline burner proposes a control method for the offline burner of the embodiment of the first aspect of the present application. The control method for the offline burner provided in the embodiment of the present application can be applied to the terminal, can be applied to the server side, and can also be software running in the terminal or the server side; the terminal and the server are communicatively connected with the control chip, thereby realizing communication interaction with the control chip, so that the control chip can execute the control method for the offline burner of the embodiment of the present application. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or can be configured as a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the control method of the offline burner, etc., but is not limited to the above forms.

[0063] The present application can be used in a variety of general-purpose or specialized computer system environments or configurations, which are communicatively connected to a control chip, thereby enabling communication interaction with the control chip, so that the control chip can execute the control method of the offline burner according to the embodiments of the present application. Examples include personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules may be located in local and remote computer storage media, including storage devices.

[0064] Reference Figure 2 , Figure 2 The control method of the offline programmer according to the embodiment of the present application is a flowchart of the steps of the control method of the offline programmer according to the embodiment of the present application, which includes but is not limited to steps S210 to S230.

[0065] Step S210, obtaining a mode instruction from the secure digital card, and determining the current execution mode based on the mode instruction;

[0066] It is worth noting that the mode indication instruction is used to indicate the current execution mode, and the mode indication instruction is pre-stored in a preset address of the secure digital card. In the execution method, the control chip obtains the mode indication instruction from the secure digital card based on the preset address, and then determines the current execution mode based on the mode indication instruction. For example, the current execution mode of the offline burner includes a burn-in mode and a read mode. The burn-in mode is used to burn the firmware stored in the secure digital card into the FLASH memory of the target chip. The read mode is used to read the firmware from the FLASH memory of the target chip and store the read firmware into the secure digital card.

[0067] In some embodiments, the mode indication instruction includes a field Flag1. When the value of Flag1 is 0, it indicates that the current execution mode is the burn-in mode. When the value of Flag1 is 1, it indicates that the current execution mode is the read mode.

[0068] In step S220, when it is detected that the current execution mode is the burn-in mode, the target burn-in indication information is obtained from the secure digital card.

[0069] In step S230, the firmware to be burned is obtained from the secure digital card based on the target burn-in indication information, and the firmware to be burned is burned into the target chip connected to the control chip.

[0070] It is worth noting that the firmware to be burned, the target burn-in indication information, and the mode indication instruction are pre-stored in the secure digital card. For example, the USB interface of the offline burner is connected to the computer through the USB data line, and the firmware to be burned, the target burn-in indication information, and the mode indication instruction are transmitted to the secure digital card through the computer. The target chip is electrically connected to the offline burner through the flash interface. In other embodiments, the secure digital card in the offline burner is connected to the computer through the card reader, so that the computer transmits the firmware to be burned, the target burn-in indication information, and the mode indication instruction to the secure digital card.

[0071] According to the control method of the offline burner, the control method first obtains the mode indication instruction from the secure digital card, determines the current execution mode based on the mode indication instruction, obtains the target burn-in indication information from the secure digital card if the current execution mode is the burn-in mode, then obtains the firmware to be burned from the secure digital card based on the target burn-in indication information, and burns the firmware to be burned into the target chip connected to the control chip. In this way, the current execution mode is automatically identified, and the firmware to be burned is automatically burned into the target chip when the current execution mode is the burn-in mode. The burn-in process does not need to be connected to a professional debugger or a computer, and the offline burn-in is realized, thereby improving the burn-in efficiency.

[0072] In some embodiments, in the process of burning the to-be-burned firmware to the target chip, the to-be-burned firmware is first transmitted to the storage module of the offline burner, and then the to-be-burned firmware is transmitted to the FLASH memory of the target chip through the storage module.

[0073] In some embodiments, referring to Figure 3 , Figure 3 FIG. 4 is a flowchart of a step after step S320 of the control method according to an embodiment of the present application. Specifically, after the to-be-analyzed firmware is acquired from the target chip based on the target reading instruction information and stored in the secure digital card, the control method according to an embodiment of the present application can further include, but is not limited to, step S410 and step S420.

[0074] Step S310, in the case where it is detected that the current execution mode is the reading mode, acquiring target reading instruction information from the secure digital card;

[0075] Step S320, based on the target reading instruction information, acquiring the to-be-analyzed firmware from the target chip and storing the to-be-analyzed firmware in the secure digital card.

[0076] It is worth noting that the target reading instruction information is pre-stored in the secure digital card. For example, the USB interface of the offline burner is connected to the computer end through the USB data line, and the target reading instruction information is transmitted to the secure digital card through the computer end. In another embodiment, the secure digital card in the offline burner is connected to the computer end through a card reader, so that the target reading instruction information is transmitted to the secure digital card through the computer end.

[0077] The control method according to an embodiment of the present application, through step S310 and step S320, in the case where the current execution mode is the reading mode, acquires the to-be-analyzed firmware from the target chip based on the target reading instruction information and stores the to-be-analyzed firmware in the secure digital card, thereby realizing the reading back function of the offline burner. Therefore, the control method according to an embodiment of the present application not only can burn the to-be-burned firmware to the target chip, but also can read back the to-be-analyzed firmware from the target chip and store the to-be-analyzed firmware in the secure digital card.

[0078] In some embodiments, in the process of acquiring the to-be-analyzed firmware from the target chip and storing the to-be-analyzed firmware in the secure digital card, the to-be-analyzed firmware is first read from the FLASH memory of the target chip and stored in the storage module of the offline burner, and then the to-be-analyzed firmware is transmitted to the secure digital card through the storage module.

[0079] In some embodiments, referring to Figure 4 , Figure 4 FIG. 4 is a flowchart of a step after step S320 of the control method according to an embodiment of the present application. Specifically, after the to-be-analyzed firmware is acquired from the target chip based on the target reading instruction information and stored in the secure digital card, the control method according to an embodiment of the present application can further include, but is not limited to, step S410 and step S420.

[0080] Step S410, in the case of detecting that the control chip is connected with the preset terminal, obtaining the firmware uploading instruction sent by the preset terminal;

[0081] Step S420, based on the firmware uploading instruction, reading the to-be-analyzed firmware from the secure digital card and transmitting the to-be-analyzed firmware to the preset terminal.

[0082] The control method of the offline burner according to the embodiment of the present application realizes, through steps S410 and S420, that when it is detected that the control chip is connected with the preset terminal, the to-be-analyzed firmware in the secure digital card is transmitted to the preset terminal, so that the preset terminal can analyze the to-be-analyzed firmware to perfect the debugging of the target chip. For example, the preset terminal is a computer, when the computer is connected with the USB interface of the offline burner through a USB data line, the computer sends a firmware uploading instruction to the control chip through the USB data, and then the control chip reads the to-be-analyzed firmware from the secure digital card and transmits the to-be-analyzed firmware to the computer.

[0083] In other embodiments, the secure digital card in the offline burner is connected with the computer end through a card reader, so that the computer end sends a firmware uploading instruction to the control chip through the card reader, and then the control chip reads the to-be-analyzed firmware from the secure digital card and transmits the to-be-analyzed firmware to the computer.

[0084] It should be noted that, in the process of reading the to-be-analyzed firmware from the secure digital card and transmitting the to-be-analyzed firmware to the preset terminal, the control chip first stores the to-be-analyzed firmware in the storage module, and then uploads the to-be-analyzed firmware to the preset terminal through the storage module. The preset terminal can also be a notebook computer, a mobile phone or other terminal device.

[0085] It is worth noting that the to-be-analyzed firmware is the firmware stored in the FLASH memory of the target chip. In the product development stage, the firmware burned into the FLASH memory needs to be iterated for many times before the product development is completed. When looking for missing points, the firmware in the FLASH memory can be read back and saved to the computer end for byte-by-byte data comparison and analysis, so as to accelerate the debugging progress and improve the efficiency.

[0086] In some embodiments, referring to Figure 5 , Figure 5 for Figure 2 a specific flowchart of step S210 in FIG. 2. The obtaining of the target burning instruction information from the secure digital card in step S210 can include but is not limited to steps S510 and S520.

[0087] Step S510, determining the flash memory model information of the target chip connected with the control chip;

[0088] Step S520, determining target burning instruction information matching the flash memory model information from the plurality of burning instruction information of the secure digital card as the target burning instruction information.

[0089] It is worth noting that the flash memory model information can be pre-stored in the secure digital card, for example, the flash memory model information includes a field Flag2, when Flag2 is 0, it indicates that the FLASH memory of the target chip is nand; when Flag2 is 1, it indicates that the FLASH memory of the target chip is SPInand; when Flag2 is 2, it indicates that the FLASH memory of the target chip is SPInor; the burning instruction information corresponding to different types of FLASH memories is different, and each type of FLASH memory corresponds to a burning instruction information, the burning instruction information includes configuration information of the FLASH memory, which is used to instruct the control chip to burn the to-be-burned firmware to the FLASH memory of the target chip. In another embodiment, when the control chip is connected with the target chip, the control chip can identify the FLASH memory of the target chip, so as to obtain the target flash memory model information.

[0090] In some embodiments, when the current execution mode is the reading mode, based on the flash memory model information, target reading instruction information matching the flash memory model information is determined from the plurality of reading instruction information of the secure digital card as the target reading instruction information. Different types of FLASH memories correspond to different reading instruction information, and each type of FLASH memory corresponds to a burning instruction information. The reading instruction information includes configuration information of the FLASH memory, which is used to instruct the control chip to read data from the FLASH memory. In another embodiment, the target reading instruction information includes a specific preset reading address, so it is not necessary to distinguish the type of the FLASH memory, and the to-be-analyzed firmware can be directly read from the FLASH memory based on the preset reading address.

[0091] The control method of the embodiment of the application can be compatible with multiple types of FLASH memories through steps S510 and S520, so that the application range of the offline burner is wider.

[0092] In some embodiments, the target burning instruction information includes a first data length, a first save address and a first burning address of the to-be-burned firmware. Referring to Figure 6 , Figure 6 For Figure 2 A specific flowchart of step S230 is shown in FIG. 6. Step S230, based on the target burning instruction information, obtaining the to-be-burned firmware from the secure digital card and burning the to-be-burned firmware to the target chip connected with the control chip, includes but is not limited to steps S610 and S620.

[0093] Step S610, obtaining the firmware to be burned from the secure digital card based on the first data length and the first storage address;

[0094] Step S620, transmitting the firmware to be burned into the first burning address of the target chip.

[0095] It is worth noting that through steps S610 to S620, the firmware to be burned is obtained from the secure digital card based on the first data length and the first storage address in the secure digital card, and then the firmware to be burned is transmitted into the first burning address of the FLASH memory of the target chip.

[0096] In some embodiments, the target burning indication information further includes the number of burnable times of the firmware to be burned; before transmitting the firmware to be burned into the first burning address of the target chip, it includes:

[0097] detecting the number of burnable times, and generating a burning stop instruction when it is detected that the number of burnable times is less than 1;

[0098] After transmitting the firmware to be burned into the first burning address of the target chip, it further includes:

[0099] decrementing the number of burnable times by 1.

[0100] It is worth noting that in the product development process, in order to avoid firmware leakage, the number of burnable times of the firmware to be burned is usually set, and when the number of burnable times is less than 1, a burning stop instruction is generated and burning is prohibited, and feedback can also be given to relevant personnel through an indicator light, for example, when the number of burnable times is less than 1, the indicator light flashes. After completing a burning operation, the number of burnable times is decremented by 1.

[0101] In some embodiments, the target reading indication information includes the second data length, the second storage address, and the second burning address of the firmware to be analyzed; referring to Figure 7 , Figure 7 for Figure 3 A specific flowchart of step S320. Step S320, obtaining the firmware to be analyzed from the target chip based on the target reading indication information, and storing the firmware to be analyzed in the secure digital card, including but not limited to steps S710 and S720.

[0102] Step S710, reading the firmware to be analyzed from the target chip based on the second burning address;

[0103] Step S720, storing the firmware to be analyzed into the secure digital card based on the second data length and the second storage address.

[0104] The control method of the embodiment of the present application reads the to-be-analyzed firmware from the second programming address of the FLASH memory of the target chip through step S710 and step S720, and then stores the to-be-analyzed firmware in the second storage address of the secure digital card based on the second data length of the to-be-analyzed firmware.

[0105] The second aspect embodiment of the present application provides a control device of an offline programmer, which is applied to Figure 1 The control chip of the schematic offline programmer. Referring to Figure 8 , Figure 8 is a structural schematic diagram of the control device of the embodiment of the present application. The control device comprises:

[0106] The first obtaining module 810 is configured to obtain a mode indication instruction from the secure digital card, and determine the current execution mode based on the mode indication instruction.

[0107] The second obtaining module 820 is configured to obtain target programming indication information from the secure digital card in the case that it is detected that the current execution mode is the programming mode.

[0108] The programming module 830 is configured to obtain to-be-programmed firmware from the secure digital card based on the target programming indication information, and program the to-be-programmed firmware to the target chip connected with the control chip.

[0109] The control device of the embodiment of the present application is used to execute the control method of the offline programmer of the first aspect embodiment. In the execution method, the mode indication instruction is first obtained from the secure digital card, the current execution mode is determined based on the mode indication instruction, if the current execution mode is the programming mode, the target programming indication information is obtained from the secure digital card, then the to-be-programmed firmware is obtained from the secure digital card based on the target programming indication information, and the to-be-programmed firmware is programmed to the target chip connected with the control chip. In this way, the current execution mode is automatically identified, the to-be-programmed firmware is automatically programmed to the target chip when the current execution mode is the programming mode, the programming process does not need to be connected to a professional debugger, nor does it need to be connected to a computer terminal, offline programming is realized, and thus the programming efficiency is improved.

[0110] It should be noted that the specific implementation of the control method of the offline programmer is basically the same as the specific embodiment of the control method of the offline programmer described above, and will not be repeated here. The control method of the offline programmer can also be provided with other functional units to realize the control method in the above embodiments under the premise of meeting the requirements of the embodiments of the present application.

[0111] The third aspect embodiment of the present application provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the control method of the off-line burner of any one of the first aspect embodiments when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a vehicle-mounted computer, etc.

[0112] Reference Figure 9 , Figure 9 is a structural schematic diagram of an electronic device of an embodiment. The electronic device includes:

[0113] The processor 901 can be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, etc., for executing related programs to implement the technical solutions provided by the embodiments of the present application;

[0114] The memory 902 can be implemented in the form of a ROM (ReadOnly Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory), etc. The memory 902 can store an operating system and other application programs, and when the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are saved in the memory 902 and are called and executed by the processor 901 to implement the control method of the embodiments of the present application;

[0115] The input / output interface 903 is used to realize information input and output;

[0116] The communication interface 904 is used to realize the communication interaction between the device and other devices, which can realize communication through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

[0117] The bus 905 transmits information between various components (such as the processor 901, the memory 902, the input / output interface 903, and the communication interface 904) of the device;

[0118] The processor 901, the memory 902, the input / output interface 903, and the communication interface 904 are connected to each other through the bus 905 for communication connection within the device.

[0119] The fourth aspect embodiment of the present application is a computer readable storage medium, the storage medium stores a computer program, and the computer program is executed by the processor to implement the control method of the off-line burner of any one of the first aspect embodiments.

[0120] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory can include a high-speed random access memory and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory that is remotely disposed relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0121] The embodiments described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0122] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than shown in the figures, or combine certain steps, or different steps.

[0123] The device embodiments described above are only schematic, and units described as separate components can or can not be physically separate, i.e., can be located in one place or distributed over multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of the present application.

[0124] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the functional modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.

[0125] The terms "first", "second", "third", "fourth" and the like used in the description of the present application and the above drawings (if any) are used to distinguish similar objects, and do not necessarily have to describe a particular order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0126] It should be understood that in the application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" is used to describe the mapping relationship of the mapping object, which means that there can be three relationships, for example, "A and / or B" can represent three cases: only A, only B, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the front and rear mapping objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0127] In several embodiments provided in the application, it should be understood that the disclosed system and method can be implemented in other ways. For example, the system embodiments described above are only illustrative, for example, the division of the above units is only a logical functional division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0128] The units described above as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. According to actual needs, some or all of the units can be selected to achieve the purpose of the embodiment.

[0129] In addition, each functional unit in each embodiment of the application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0130] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.

[0131] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and are not limited to the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.

Claims

1. A control method for an offline programmer, characterized in that: A control chip applied to the offline programmer, the offline programmer further comprising a secure digital card connected to the control chip; The method comprises: Obtaining a mode indication instruction from the secure digital card, and determining a current execution mode based on the mode indication instruction; When detecting that the current execution mode is the programming mode, obtaining target programming instruction information from the secure digital card; The firmware to be burned is obtained from the secure digital card based on the target burning indication information, and the firmware to be burned is burned to a target chip connected to the control chip.

2. The control method of the offline programmer according to claim 1, wherein: After obtaining the mode indication instruction from the secure digital card and determining the current execution mode based on the mode indication instruction, the method further includes: When detecting that the current execution mode is a read mode, obtaining target read indication information from the secure digital card; Based on the target reading instruction information, the firmware to be analyzed is obtained from the target chip, and the firmware to be analyzed is stored in the secure digital card.

3. The control method of the offline programmer according to claim 2, wherein: After acquiring the firmware to be analyzed from the target chip based on the target reading instruction information and storing the firmware to be analyzed in the secure digital card, the method further includes: When detecting that the control chip is connected to a preset terminal, obtaining a firmware upload instruction sent by the preset terminal; Based on the firmware upload instruction, the firmware to be analyzed is read from the secure digital card, and the firmware to be analyzed is transmitted to the preset terminal.

4. The control method of the offline programmer according to claim 1, wherein: The step of obtaining target burning instruction information from the secure digital card includes: Determining flash memory model information of a target chip connected to the control chip; Target burning instruction information matching the flash memory model information is determined from a plurality of burning instruction information of the secure digital card as the target burning instruction information.

5. The control method of the offline programmer according to claim 1, wherein: The target burning instruction information includes the first data length, the first storage address, and the first burning address of the firmware to be burned; The method of acquiring the firmware to be burned from the secure digital card based on the target burning indication information and burning the firmware to be burned to a target chip connected to the control chip includes: Obtaining the firmware to be burned from the secure digital card based on the first data length and the first storage address; The firmware to be burned is transmitted to the first burning address of the target chip.

6. The control method of the offline programmer according to claim 5, characterized in that: The target burning indication information also includes the number of times the firmware to be burned can be burned; Before transmitting the firmware to be burned to the first burning address of the target chip, the method further includes: Detecting the number of times that can be burned, and generating a burning stop instruction when detecting that the number of times that can be burned is less than 1; After the firmware to be burned is transferred to the first burning address of the target chip, the method further includes: Decrease the number of times that can be burned by 1.

7. The control method of the offline programmer according to claim 2, wherein: The target reading instruction information includes the second data length, the second storage address, and the second burning address of the firmware to be analyzed; The method of acquiring the firmware to be analyzed from the target chip based on the target reading instruction information and storing the firmware to be analyzed in the secure digital card includes: Reading the firmware to be analyzed from the target chip based on the second burning address; Based on the second data length and the second storage address, the firmware to be analyzed is stored in the secure digital card.

8. A control device for an offline programmer, characterized in that: A control chip applied to the offline programmer, the offline programmer further comprising a secure digital card connected to the control chip; The control device comprises: A first acquisition module is configured to acquire a mode indication instruction from the secure digital card and determine a current execution mode based on the mode indication instruction; A second acquisition module is configured to acquire target burning instruction information from the secure digital card when detecting that the current execution mode is the burning mode; The burning module is used to obtain the firmware to be burned from the secure digital card based on the target burning indication information, and burn the firmware to be burned to the target chip connected to the control chip.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the control method of the offline programmer according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the control method of the offline programmer according to any one of claims 1 to 7 is implemented.