Firmware updating method, system and device, computer equipment, readable storage medium and program product
By downloading dynamic code and data to be burned on the system-level chip, and using dynamic code to respond to burned instructions for update, the problems of low firmware update efficiency and poor flexibility in the existing technology are solved, and a more efficient and flexible firmware update process is achieved.
Patent Information
- Application Number
- CN202411498144.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-28
AI Technical Summary
The firmware update method of existing system-level chips is less efficient and has poor flexibility, and relies on pre-integrated update programs and serial port downloads, resulting in inefficient update processes.
By obtaining dynamic code and data to be burned, using the debug interface board to download dynamic code and data to be burned into the SRAM of the system-level chip, and based on the dynamic code to respond to the burned command, the data is written into FLASH to realize firmware update.
Improves the efficiency and flexibility of firmware updates on system-level chips, and eliminates the need to pre-integrate firmware update programs or download codes for initialization modules, reducing update costs.
Smart Images

Figure CN119536764A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of chip technology, and in particular to a firmware updating method, system, apparatus, computer device, computer-readable storage medium, and computer program product. Background Art
[0002] System on Chip (SOC) is a system or product formed by combining multiple integrated circuits with specific functions on a single chip, which includes a complete hardware system and the embedded software it carries. The integrated design enables SOC to provide higher performance, lower power consumption and smaller physical size, so it has been widely used in various application fields such as smartphones, tablets, IoT devices, automotive electronics, etc.
[0003] At present, most SOC bootloaders have pre-integrated on-chip FLASH update programs. SOC firmware update methods include: downloading firmware data through the UART (Universal Asynchronous Receiver / Transmitter) interface (or other serial ports), and the update program burns the received firmware data into FLASH. However, the SOC firmware update method in the related art is inefficient and inflexible. Summary of the invention
[0004] Based on this, it is necessary to provide a firmware update method, system, device, computer equipment, computer-readable storage medium and computer program product that can improve the firmware update efficiency and flexibility of the system-level chip in response to the above technical problems.
[0005] In a first aspect, the present application provides a firmware update method, comprising:
[0006] Acquire dynamic code and data to be burned; the dynamic code is updated when the system-level chip is changed;
[0007] Based on the debugging interface board, the dynamic code is downloaded to the SRAM of the system-level chip; the debugging interface board is used to connect the debugging interface of the system-level chip to the host computer, and perform data conversion according to the debugging protocol of the debugging interface;
[0008] Based on the debugging interface board, a programming instruction is issued to the system-level chip and the data to be programmed is downloaded to the SRAM of the system-level chip; the dynamic code is used to respond to the programming instruction and write the data to be programmed into the FLASH of the system-level chip.
[0009] In one embodiment, before obtaining the dynamic code and the data to be burned, the method includes:
[0010] Based on the target write position of the data to be burned, the dynamic code is updated; the target write position includes on-chip FLASH / off-chip FLASH.
[0011] In one embodiment, the dynamic code is downloaded to the SRAM of the system-on-chip based on the debugging interface board, and then includes:
[0012] Based on the debugging interface board, a debugging instruction is sent to the system-on-chip; the dynamic code is used to respond to the debugging instruction, update the firmware update program of the system-on-chip and wait for a burning instruction.
[0013] In one embodiment, the step of sending a programming instruction to the system-on-chip based on the debugging interface board and downloading the data to be programmed into the SRAM of the system-on-chip includes:
[0014] Based on the debugging interface board, a programming instruction is issued to the system-on-chip; the dynamic code is used to respond to the programming instruction, erase the storage space in the FLASH of the system-on-chip that is the same size as the target storage space of the data to be programmed, and send a download instruction to the host computer;
[0015] In response to receiving the download instruction, the data to be programmed is downloaded to the SRAM of the system-level chip; and in response to the download of the data to be programmed being completed, the dynamic code is used to write the data to be programmed into the FLASH of the system-level chip.
[0016] In one embodiment, downloading the data to be burned into the SRAM of the system-level chip includes:
[0017] Obtaining available storage space of the SRAM of the system-on-chip;
[0018] In a case where the available storage space is smaller than the target storage space of the data to be programmed, the data to be programmed are downloaded to the SRAM of the system-on-chip in batches.
[0019] In a second aspect, the present application also provides a firmware update system, including:
[0020] The host computer is used to obtain dynamic code and data to be burned; based on the debugging interface board, the dynamic code is downloaded to the SRAM of the system-level chip; based on the debugging interface board, a burning instruction is issued to the system-level chip and the data to be burned is downloaded to the SRAM of the system-level chip;
[0021] A debugging interface board, used to connect the debugging interface of the system-level chip to the host computer and perform data conversion according to the debugging protocol of the debugging interface;
[0022] The system-level chip is used to run the dynamic code; the dynamic code is updated when the system-level chip is changed; the dynamic code is used to respond to the burning instruction and write the data to be burned into the FLASH of the system-level chip.
[0023] In a third aspect, the present application further provides a firmware update device, including:
[0024] An acquisition module is used to acquire dynamic code and data to be burned; the dynamic code is updated when the system-level chip is changed;
[0025] A download module, used for downloading the dynamic code into the SRAM of the system-level chip based on a debugging interface board; the debugging interface board is used for connecting the debugging interface of the system-level chip to the host computer and performing data conversion according to the debugging protocol of the debugging interface;
[0026] The programming module is used to send a programming instruction to the system-level chip based on the debugging interface board and download the data to be programmed into the SRAM of the system-level chip; the dynamic code is used to respond to the programming instruction and write the data to be programmed into the FLASH of the system-level chip.
[0027] In a fourth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the methods described above when executing the computer program.
[0028] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any of the methods described above are implemented.
[0029] In a sixth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of any of the methods described above when executed by a processor.
[0030] The above-mentioned firmware update method, system, device, computer equipment, computer-readable storage medium and computer program product, the system includes a host computer, a debugging interface board and a system-level chip, the host computer is connected to the debugging interface of the system-level chip through the debugging interface board, and can be compatible with various types of debugging interfaces. The dynamic code is updated by the host computer, and the dynamic code and the data to be burned can be downloaded only through the debugging interface without updating the burning process. The system-level chip can write the data to be burned into the FLASH of the system-level chip based on the dynamic code. Specifically, the host computer updates the dynamic code when the system-level chip is changed, so that the dynamic code can instruct the corresponding system-level chip to perform a firmware update; the host computer sends the dynamic code, the burning instruction and the data to be burned to the debugging interface of the system-level chip through the debugging interface board, so that the debugging interface board can perform data conversion according to the debugging protocol of the debugging interface to obtain data that can be recognized by the system-level chip; further, the system-level chip can respond to the burning instruction based on the dynamic code, write the data to be burned downloaded into the SRAM into the FLASH, and realize the firmware update, without the need to integrate the firmware update program in the system-level chip in advance or download the code of the initialization module, thereby improving the firmware update efficiency and flexibility of the system-level chip. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0032] FIG1 is a schematic diagram of the structure of a firmware update system in one embodiment;
[0033] FIG2 is a schematic diagram of a flow chart of a firmware update method in one embodiment;
[0034] FIG3 is a schematic diagram of a flow chart of a firmware update method in another embodiment;
[0035] FIG4 is a schematic diagram of a flow chart of a firmware update method in yet another embodiment;
[0036] FIG5 is a schematic diagram of a flow chart of step S206 in one embodiment;
[0037] FIG6 is a flow chart showing the steps of downloading data to be burned into the SRAM of the system-on-chip in one embodiment;
[0038] FIG7 is a structural block diagram of a firmware update device in one embodiment;
[0039] FIG. 8 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0041] In the conventional technology, the firmware update of SOC depends on the pre-integration of the update program in the startup firmware, so the flexibility is poor. In addition, downloading the firmware data through the serial port or other modules may require first downloading the code of the initialization module through the debugging interface, so the efficiency is low.
[0042] Based on this, an embodiment of the present application provides a firmware update system, as shown in FIG1 , the system 100 includes a host computer 101, a debugging interface board 102 and a system-on-chip 103. Among them:
[0043] The host computer 101 is used to obtain dynamic code and data to be burned; based on the debugging interface board 102, the dynamic code is downloaded to the SRAM (Static Random-Access Memory) of the system-level chip 103; based on the debugging interface board 102, the burning instruction is issued to the system-level chip 103 and the data to be burned is downloaded to the SRAM of the system-level chip 103.
[0044] For example, the host computer 101 may be implemented based on a PC (Personal Computer). The dynamic code and the data to be burned acquired by the host computer 101 may be a binary (bin) file.
[0045] The debugging interface board 102 is used to connect the debugging interface of the system-level chip 103 to the host computer 101 and perform data conversion according to the debugging protocol of the debugging interface.
[0046] Among them, the debugging interface of the system-level chip 103 can be, but is not limited to, a cJTAG (Core-Independent JTAG) interface, a JTAG (Joint Test Action Group) interface, an SWD (Serial Wire Debug) interface, etc. The debugging interface board 102 is used to perform data conversion according to the debugging protocol of the debugging interface, so that the system-level chip 103 can identify the instructions issued by the host computer 101 through the debugging interface. Exemplarily, the debugging interface board 102 can be used to connect the debugging interface of the system-level chip 103 to the USB (Universal Serial BUS) interface of the host computer 101. At this time, the host computer 101 can be used to drive the JTAG debugger to convert the USB instructions into debugging signals.
[0047] The system-on-chip 103 is used to run dynamic code; the dynamic code is updated when the system-on-chip 103 is changed; the dynamic code is used to respond to the burning instruction and write the data to be burned into the FLASH of the system-on-chip.
[0048] Exemplarily, after the debug interface is connected to the host computer 101 through the debug interface board 102, the system-level chip 103 can receive the dynamic code sent by the host computer 101 through the debug interface and store it in the SRAM; receive the data to be burned sent by the host computer 101 through the debug interface and store it in the idle SRAM; run the dynamic code after data conversion, respond to the burning instruction issued by the host computer 101 based on the dynamic code, and write the data to be burned in the SRAM into the FLASH of the system-level chip.
[0049] The above-mentioned firmware update system includes a host computer, a debugging interface board and a system-level chip. The host computer is connected to the debugging interface of the system-level chip through the debugging interface board, and is compatible with various types of debugging interfaces. By updating the dynamic code through the host computer, it is possible to download the dynamic code and the data to be burned only through the debugging interface, without updating the burning process. The system-level chip can write the data to be burned into the FLASH of the system-level chip based on the dynamic code, thereby improving the firmware update efficiency and flexibility of the system-level chip.
[0050] Based on the same inventive concept, the embodiment of the present application also provides a firmware update method, which is applied to the host computer 101 in Figure 1. As shown in Figure 2, the method may include the following steps:
[0051] Step S202, obtaining dynamic code and data to be burned; the dynamic code is updated when the system-level chip is changed.
[0052] Exemplarily, the dynamic code can be updated by the host computer 101 when the system-level chip that needs to be updated with firmware is changed, or the firmware update requirement of the system-level chip is changed. Among them, the system-level chip change that needs to be updated with firmware can include replacing it with a different model of system-level chip. The firmware update requirement change of the system-level chip can include the change of the data to be burned in the system-level chip, or the change of the target write location of the data to be burned.
[0053] Step S204, downloading the dynamic code to the SRAM of the system-on-chip based on the debugging interface board; the debugging interface board is used to connect the debugging interface of the system-on-chip to the host computer and perform data conversion according to the debugging protocol of the debugging interface.
[0054] Step S206, based on the debugging interface board, a programming instruction is issued to the system-on-chip and the data to be programmed is downloaded to the SRAM of the system-on-chip; the dynamic code is used to respond to the programming instruction and write the data to be programmed into the FLASH of the system-on-chip.
[0055] Exemplarily, the host computer 101 may run a control program, which may be used to detect the debugging interface of the system-on-chip after startup and initialize the system on chip; download the dynamic code to the SRAM of the system-on-chip; download the data to be burned to the idle SRAM of the system-on-chip; send a debugging instruction to the system-on-chip to start the dynamic code, so that the dynamic code responds to the burning instruction issued by the host computer 101, and writes the data to be burned in the SRAM into the FLASH of the system-on-chip; in response to the completion of burning, a firmware update completion message is popped up on the host computer 101.
[0056] In the above firmware update method, the host computer updates the dynamic code when the system-level chip is changed, so that the dynamic code can instruct the corresponding system-level chip to update the firmware; the host computer sends the dynamic code, burning instructions and data to be burned to the debugging interface of the system-level chip through the debugging interface board, so that the debugging interface board can perform data conversion according to the debugging protocol of the debugging interface to obtain data that can be recognized by the system-level chip; then, the system-level chip can respond to the burning instruction based on the dynamic code, write the data to be burned downloaded to the SRAM into the FLASH, and realize the firmware update, without the need to integrate the firmware update program in the system-level chip in advance or download the code of the initialization module, thereby improving the firmware update efficiency and flexibility of the system-level chip.
[0057] In the conventional technology, when the startup firmware of the SOC is placed in the off-chip FLASH, the firmware needs to be updated through a dedicated burner. In an exemplary embodiment, as shown in FIG3 , the firmware update method may further include:
[0058] Step S201, updating the dynamic code based on the target write location of the data to be burned; the target write location includes on-chip FLASH / off-chip FLASH.
[0059] Exemplarily, the host computer 101 may update the write instruction in the dynamic code in response to the change of the target write position of the data to be burned. For example, the write instruction may include the address of the on-chip FLASH / the address of the off-chip FLASH.
[0060] In this embodiment, by updating the dynamic code for indicating burning and then downloading it to the SRAM of the system-level chip, the firmware to be updated can be written into the on-chip FLASH / off-chip FLASH of the system-level chip based on the dynamic code, thereby reducing the cost of firmware update.
[0061] In an exemplary embodiment, as shown in FIG4 , the firmware update method may further include:
[0062] Step S205, based on the debugging interface board, a debugging instruction is sent to the system-on-chip; the dynamic code is used to respond to the debugging instruction, update the firmware update program of the system-on-chip and wait for the burning instruction.
[0063] Exemplarily, the dynamic code can be run in the SRAM of the system-level chip. The dynamic code can be used to respond to the debugging instruction issued by the host computer 101 to start, initialize the firmware update program of the system-level chip; respond to the burning instruction issued by the host computer 101, and write the data to be burned into the FLASH of the system-level chip based on the firmware update program.
[0064] The firmware update program of the SoC may be stored in the non-volatile memory of the SoC. Initializing the firmware update program of the SoC may include but is not limited to: initializing related hardware modules in the SoC, checking the current firmware version, configuring the firmware update environment, etc.
[0065] In this embodiment, the firmware update program of the system-on-chip is updated through dynamic code, so that the reusability of the dynamic code can be improved.
[0066] Further, as shown in FIG5 , the above step S206 may include:
[0067] Step S2061, based on the debugging interface board, a programming instruction is issued to the system-level chip; the dynamic code is used to respond to the programming instruction, erase the storage space in the FLASH of the system-level chip with the same size as the target storage space of the data to be programmed and send a download instruction to the host computer.
[0068] Step S2062, in response to receiving the download instruction, downloading the data to be burned into the SRAM of the system-level chip; the dynamic code is used to write the data to be burned into the FLASH of the system-level chip in response to the download of the data to be burned being completed.
[0069] Exemplarily, the dynamic code can also be used to respond to the burning instruction issued by the host computer 101, erase the corresponding code space in the SRAM; send a download instruction to the host computer 101, instructing the host computer 101 to download the data to be burned; respond to the burning instruction issued by the host computer 101, write the data to be burned in the SRAM into the FLASH of the system-level chip. Among them, the length of the data downloaded by the host computer 101 can be configured to 2k bytes or 4k bytes.
[0070] In this embodiment, the accuracy of firmware update can be improved by responding to the instruction issued by the host computer through dynamic code and feeding back the status information of the system-level chip to the host computer.
[0071] In an exemplary embodiment, as shown in FIG6 , the step of downloading the data to be burned into the SRAM of the system-level chip may include:
[0072] Step A1, obtaining available storage space of the SRAM of the system-on-chip.
[0073] Step A2: when the available storage space is smaller than the target storage space of the data to be programmed, the data to be programmed is downloaded in batches to the SRAM of the system-level chip.
[0074] Exemplarily, part of the data to be burned can be first downloaded to the SRAM of the system-level chip based on the available storage space of the SRAM of the system-level chip, and the data to be burned in the SRAM can be written into the FLASH of the system-level chip based on the dynamic code; the data to be burned in the SRAM can be erased; the remaining data to be burned can be downloaded to the SRAM of the system-level chip in batches, and the step of writing the data to be burned in the SRAM into the FLASH of the system-level chip can be repeated.
[0075] In this embodiment, by dynamically downloading the data to be burned according to the available storage space of the SRAM of the system-level chip, download failure due to insufficient space is avoided, thereby improving the stability of firmware update.
[0076] In summary, in the above firmware update method, the host computer updates the dynamic code when the system-level chip changes, so that the dynamic code can instruct the corresponding system-level chip to perform a firmware update; the host computer sends the dynamic code, burning instructions and data to be burned to the debugging interface of the system-level chip through the debugging interface board, so that the debugging interface board can perform data conversion according to the debugging protocol of the debugging interface to obtain data that can be recognized by the system-level chip; then, the system-level chip can respond to the burning instruction based on the dynamic code, write the data to be burned downloaded to the SRAM into the FLASH, and realize the firmware update, without the need to pre-integrate the firmware update program in the system-level chip or download the code of the initialization module, thereby improving the firmware update efficiency and flexibility of the system-level chip. In addition, when the host computer updates the dynamic code, it can instruct the data to be burned to be written into the off-chip FLASH, without the need to use an additional burner, thereby reducing the cost of firmware update.
[0077] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0078] Based on the same inventive concept, the embodiment of the present application also provides a firmware update device for implementing the firmware update method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more firmware update device embodiments provided below can refer to the limitations on the firmware update method above, and will not be repeated here.
[0079] In an exemplary embodiment, as shown in FIG. 7 , a firmware update device 300 is provided, including: an acquisition module 301 , a download module 302 and a burning module 303 , wherein:
[0080] The acquisition module 301 is used to acquire the dynamic code and the data to be burned; the dynamic code is updated when the system-level chip is changed.
[0081] The download module 302 is used to download the dynamic code to the SRAM of the system-level chip based on the debugging interface board; the debugging interface board is used to connect the debugging interface of the system-level chip to the host computer and perform data conversion according to the debugging protocol of the debugging interface.
[0082] The programming module 303 is used to send programming instructions to the system-on-chip based on the debugging interface board and download the data to be programmed into the SRAM of the system-on-chip; the dynamic code is used to respond to the programming instructions and write the data to be programmed into the FLASH of the system-on-chip.
[0083] In an exemplary embodiment, the firmware update device 300 may further include:
[0084] The first update module is used to update the dynamic code based on the target write position of the data to be burned; the target write position includes the on-chip FLASH / off-chip FLASH.
[0085] In an exemplary embodiment, the firmware update device 300 may further include:
[0086] The second update module is used to send debugging instructions to the system-on-chip based on the debugging interface board; the dynamic code is used to respond to the debugging instructions, update the firmware update program of the system-on-chip and wait for the burning instruction.
[0087] In an exemplary embodiment, the download module 302 is further used to:
[0088] Based on the debugging interface board, a programming instruction is issued to the system-level chip; the dynamic code is used to respond to the programming instruction, erase the storage space in the FLASH of the system-level chip with the same size as the target storage space of the data to be programmed, and send a download instruction to the host computer;
[0089] In response to receiving the download instruction, the data to be burned is downloaded to the SRAM of the system-level chip; the dynamic code is used for writing the data to be burned into the FLASH of the system-level chip in response to the download of the data to be burned being completed.
[0090] In an exemplary embodiment, the burning module 303 is further used for:
[0091] Get the available storage space of the SRAM of the system-level chip;
[0092] When the available storage space is smaller than the target storage space of the data to be programmed, the data to be programmed are downloaded to the SRAM of the system-on-chip in batches.
[0093] Each module in the above firmware update device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0094] In an exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG8. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a firmware update method is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0095] Those skilled in the art will understand that the structure shown in FIG. 8 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0096] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0097] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0098] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0099] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0100] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0101] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A firmware update method, characterized in that: Applied to a host computer, the method includes: Acquire dynamic code and data to be burned; the dynamic code is updated when the system-level chip is changed; Based on the debugging interface board, the dynamic code is downloaded to the SRAM of the system-level chip; the debugging interface board is used to connect the debugging interface of the system-level chip to the host computer, and perform data conversion according to the debugging protocol of the debugging interface; Based on the debugging interface board, a programming instruction is issued to the system-level chip and the data to be programmed is downloaded to the SRAM of the system-level chip; the dynamic code is used to respond to the programming instruction and write the data to be programmed into the FLASH of the system-level chip.
2. The method according to claim 1, characterized in that Before obtaining the dynamic code and the data to be burned, the following steps are included: Based on the target write position of the data to be burned, the dynamic code is updated; the target write position includes on-chip FLASH / off-chip FLASH.
3. The method according to claim 1, characterized in that Based on the debugging interface board, the dynamic code is downloaded into the SRAM of the system-level chip, and then includes: Based on the debugging interface board, a debugging instruction is sent to the system-on-chip; the dynamic code is used to respond to the debugging instruction, update the firmware update program of the system-on-chip and wait for a burning instruction.
4. The method according to claim 3, characterized in that The step of sending a programming instruction to the system-on-chip based on the debugging interface board and downloading the data to be programmed into the SRAM of the system-on-chip comprises: Based on the debugging interface board, a programming instruction is issued to the system-on-chip; the dynamic code is used to respond to the programming instruction, erase the storage space in the FLASH of the system-on-chip that is the same size as the target storage space of the data to be programmed, and send a download instruction to the host computer; In response to receiving the download instruction, the data to be programmed is downloaded to the SRAM of the system-level chip; and in response to the download of the data to be programmed being completed, the dynamic code is used to write the data to be programmed into the FLASH of the system-level chip.
5. The method according to claim 1, characterized in that The step of downloading the data to be burned into the SRAM of the system-level chip includes: Obtaining available storage space of the SRAM of the system-on-chip; In a case where the available storage space is smaller than the target storage space of the data to be programmed, the data to be programmed are downloaded to the SRAM of the system-on-chip in batches.
6. A firmware update system, characterized in that: The system comprises: The host computer is used to obtain dynamic code and data to be burned; based on the debugging interface board, the dynamic code is downloaded to the SRAM of the system-level chip; based on the debugging interface board, a burning instruction is issued to the system-level chip and the data to be burned is downloaded to the SRAM of the system-level chip; A debugging interface board, used to connect the debugging interface of the system-level chip to the host computer and perform data conversion according to the debugging protocol of the debugging interface; The system-level chip is used to run the dynamic code; the dynamic code is updated when the system-level chip is changed; the dynamic code is used to respond to the burning instruction and write the data to be burned into the FLASH of the system-level chip.
7. A firmware update device, characterized in that: The device comprises: An acquisition module is used to acquire dynamic code and data to be burned; the dynamic code is updated when the system-level chip is changed; A download module, used for downloading the dynamic code into the SRAM of the system-level chip based on a debugging interface board; the debugging interface board is used for connecting the debugging interface of the system-level chip to a host computer and performing data conversion according to the debugging protocol of the debugging interface; The programming module is used to send a programming instruction to the system-level chip based on the debugging interface board and download the data to be programmed into the SRAM of the system-level chip; the dynamic code is used to respond to the programming instruction and write the data to be programmed into the FLASH of the system-level chip.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Cited By
Quick debugging method, device and equipment for computer firmware and medium
CN120179537A
A computer firmware rapid debugging method, device, equipment and medium
CN120179537B