Mowing robot firmware verification method
By storing the verification function in the lawn mower firmware and comparing it in the boot area, the problem that the verification function needs to be specified in advance in the prior art is solved, achieving higher flexibility and verification efficiency.
Patent Information
- Application Number
- CN202311814448.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2025-06-27
AI Technical Summary
In the prior art, lawn mower firmware verification requires the verification function to be specified in advance, which is low in flexibility and cannot cope with the situation where the firmware has modified the verification function, and the verification efficiency is low.
Store the verification function in the specified location in the firmware, use the upper computer to copy the firmware to the computer RAM to run, obtain the first verification data returned by the verification function, and add it to the end of the firmware; then, copy the firmware to the MCU RAM in the boot area of the machine to run, obtain the second verification data returned by the verification function, and compare it with the first verification data to judge whether the verification is successful or failed.
There is no need to specify the verification function in boot, which improves the flexibility of verification, can cope with the situation where the firmware modifies the verification function and improves the verification efficiency.
Smart Images

Figure CN120216264A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of lawn mowers, and more particularly, to a method for verifying the firmware of a lawn mowing robot. Background Art
[0002] With the continuous progress of computer technology and artificial intelligence technology, intelligent lawn mowers similar to intelligent robots have gradually entered people's lives. The intelligent lawn mower can automatically mow the grass and charge in the user's lawn without user intervention. When the machine leaves the factory, it generally needs to verify the firmware information. In the prior art, the firmware verification requires specifying a verification function in advance, with a single operation and no flexible adjustment. Summary of the Invention
[0003] The purpose of the present invention is to provide a method for verifying the firmware of a lawn mowing robot, which can improve the flexibility of verification and adapt to the situation where the verification function is modified in the firmware.
[0004] The embodiments of the present invention are implemented as follows:
[0005] In a first aspect, the present invention provides a method for verifying the firmware of a lawn mowing robot, including the following steps:
[0006] Step s100: Store the verification function check_func in the storage space of N bytes starting from the specified position Addr in the firmware;
[0007] Step s200: Use the host computer to copy the N bytes starting from Addr in the firmware to the computer RAM for running, obtain the first verification data returned by the verification function check_func, and add the first verification data to the end of the firmware;
[0008] Step s300: Copy the N bytes starting from Addr in the firmware to the MCU RAM in the boot area of the machine for running, obtain the second verification data returned by the verification function check_func, compare the second verification data with the first verification data, and when the first verification data and the second verification data meet the set rules, it indicates that the verification is successful, otherwise the verification fails.
[0009] In an optional embodiment, in step s100, the verification function check_func is stored in the storage space of N bytes starting from the specified position Addr in the firmware by specifying the icf file of the MCU.
[0010] In an optional embodiment, in step s300, the second verification data is compared with the first verification data, and when the first verification data and the second verification data are the same, it indicates that the verification is successful.
[0011] The beneficial effects of the embodiments of the present invention are as follows:
[0012] In summary, for the lawn mowing robot firmware verification method provided in this embodiment, first, a verification function check_func is stored in the storage space of N bytes starting from the specified position Addr in the firmware. Then, the host computer copies the N bytes starting from Addr in the firmware to the computer RAM for running, and the first verification data returned by the verification function check_func is obtained and added to the end of the firmware. Then, in the boot area of the machine, the N bytes starting from Addr in the firmware are copied to the MCU RAM for running, and the second verification data returned by the verification function check_func is obtained. The second verification data is compared with the first verification data. When the first verification data and the second verification data meet the set rules, it indicates that the verification is successful; otherwise, the verification fails. Such a verification method does not require a pre-specified verification function in the boot. Compared with the conventional method where the verification function is written in the boot in advance, the verification method provided in this embodiment has greater flexibility and can handle the situation where the verification function in the firmware is modified. Description of the Drawings
[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required in the embodiments. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0014] Figure 1 It is a schematic flowchart of the lawn mowing robot firmware verification method according to the embodiments of the present invention. Detailed Embodiments
[0015] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Usually, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0016] Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0017] It should be noted that like reference numerals and letters refer to like items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0018] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of the present invention is usually placed during use. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be construed as a limitation on the present invention. In addition, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0019] In addition, terms such as "horizontal" and "vertical" do not mean that the components are required to be absolutely horizontal or hanging vertically, but can be slightly inclined. For example, "horizontal" only means that its direction is more horizontal relative to "vertical", and does not mean that the structure must be completely horizontal, but can be slightly inclined.
[0020] In the description of the present invention, it should also be noted that unless otherwise clearly specified and limited, the terms "set", "installed", "connected", "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.
[0021] In the prior art, when it is necessary to verify the information of the mower firmware, it is necessary to specify the verification function in advance, with low flexibility, unable to cope with the situation where the firmware modifies the verification function, and low verification efficiency.
[0022] In view of this, the designer provides a method for verifying the mower robot firmware, which does not need to specify the verification function in advance in the boot. Compared with the verification function written in advance in the boot by the conventional method, the verification method provided in this embodiment has greater flexibility and can cope with the situation where the firmware modifies the verification function.
[0023] In this embodiment, the method for verifying the mower robot firmware includes the following steps:
[0024] Step S100: Store the verification function check_func in the storage space of N bytes starting from the specified position Addr in the firmware;
[0025] Step s200: Use the host computer to copy the N bytes starting from Addr in the firmware to the computer's RAM for running, obtain the first verification data returned by the verification function check_func, and add the first verification data to the end of the firmware;
[0026] Step s300: In the boot area of the machine, copy the N bytes starting from Addr in the firmware to the MCU RAM for running, obtain the second verification data returned by the verification function check_func, compare the second verification data with the first verification data. When the first verification data and the second verification data meet the set rules, it indicates successful verification; otherwise, the verification fails.
[0027] Continuing from the above, the firmware verification method for the lawn mowing robot provided in this embodiment has at least the following advantages:
[0028] In the boot, there is no need to specify the verification function in advance. Compared with the verification function written in advance in the boot in the conventional method, the verification method provided in this embodiment has greater flexibility and can handle the situation where the firmware modifies the verification function.
[0029] In this embodiment, optionally, in step s100, the method of using the icf file of the specified MCU can be used to implement storing the verification function check_func in the N-byte storage space starting from the specified position Addr in the firmware. The specific scheme for implementing using the icf file of the specified MCU can refer to the existing well-known technologies. In this embodiment, to avoid repetitive narration, no detailed description is given.
[0030] In this embodiment, optionally, when comparing the second verification data with the first verification data in step s300, when the first verification data and the second verification data are the same, it indicates successful verification. That is to say, the set rule can be that the first verification data is the same as the second verification data.
[0031] The firmware verification method for the lawn mowing robot provided in this embodiment does not need to specify the verification function in advance in the boot. Compared with the verification function written in advance in the boot in the conventional method, the verification method provided in this embodiment has greater flexibility and can handle the situation where the firmware modifies the verification function.
[0032] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for verifying the firmware of a lawn mowing robot, characterized in that, It includes the following steps: Step s100: Store the check function check_func in the N-byte storage space starting from the specified position Addr in the firmware; Step s200: Use the host computer to copy the N bytes starting from Addr in the firmware to the computer's RAM for running, obtain the first check data returned by the check function check_func, and add the first check data to the end of the firmware; Step s300: In the boot area of the machine, copy the N bytes starting from Addr in the firmware to the MCU RAM for running, obtain the second check data returned by the check function check_func, compare the second check data with the first check data. When the first check data and the second check data meet the set rules, it indicates successful verification; otherwise, the verification fails.
2. The mowing robot firmware verification method according to claim 1, wherein: In step s100, the check function check_func is stored in the N-byte storage space starting from the specified position Addr in the firmware by specifying the icf file of the MCU.
3. The mowing robot firmware verification method according to claim 2, wherein: In step s300, compare the second check data with the first check data. When the first check data is the same as the second check data, it indicates successful verification.