CN110007941B - MCU firmware and upgrading method of intelligent garbage classification recycling system - Google Patents

MCU firmware and upgrading method of intelligent garbage classification recycling system Download PDF

Info

Publication number
CN110007941B
CN110007941B CN201910163164.9A CN201910163164A CN110007941B CN 110007941 B CN110007941 B CN 110007941B CN 201910163164 A CN201910163164 A CN 201910163164A CN 110007941 B CN110007941 B CN 110007941B
Authority
CN
China
Prior art keywords
firmware
file
mcu
user area
intelligent garbage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910163164.9A
Other languages
Chinese (zh)
Other versions
CN110007941A (en
Inventor
唐军
张�林
宋怡彪
李志权
黄贵敏
涂志强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiaohuanggou Environmental Protection Technology Co ltd
Original Assignee
Xiaohuanggou Environmental Protection Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiaohuanggou Environmental Protection Technology Co ltd filed Critical Xiaohuanggou Environmental Protection Technology Co ltd
Priority to CN201910163164.9A priority Critical patent/CN110007941B/en
Publication of CN110007941A publication Critical patent/CN110007941A/en
Application granted granted Critical
Publication of CN110007941B publication Critical patent/CN110007941B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/105Arrangements for software license management or administration, e.g. for managing licenses at corporate level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses an MCU firmware of an intelligent garbage recovery system and an upgrading method, wherein the whole file of the MCU firmware is provided with an MD5 check symbol, the file is divided into three areas according to the space of an MCU memory of a lower computer of the intelligent garbage recovery system, the three areas are respectively a starting area, a user area A and a user area B, the starting area is a guide code area, the user area A and the user area B are control code areas, and the user area A and the user area B are respectively provided with the MD5 check symbol A and the MD5 check symbol B which are independent; the file name of the MCU firmware is sequentially a firmware version number, a separator, an MD5 verifier of the whole MCU firmware and a file suffix from left to right, and the firmware version number is used for a sign that whether the server and the upper computer of the intelligent garbage collection system meet upgrading conditions or not. The invention can ensure that the damage of data can be timely found in any communication process, and prevent the damage of firmware to the intelligent recovery terminal in different degrees.

Description

MCU (microprogrammed control unit) firmware of intelligent garbage classification recycling system and upgrading method
Technical Field
The invention belongs to the technical field of garbage recycling, relates to an intelligent garbage classification recycling system, and particularly relates to MCU (microprogrammed control unit) firmware and an upgrading method of the intelligent garbage classification recycling system.
Background
The existing intelligent garbage classification recycling system comprises a server and an intelligent garbage classification recycling terminal connected with the server through a wireless network, wherein an upper computer and a plurality of lower computers connected with the upper computer in a communication mode and used for classification recycling are arranged on the intelligent garbage classification recycling terminal. The MCU firmware often meets a plurality of different transmission carriers and different communication modes in the transmission process of a server, an upper computer and a lower computer, and data can be damaged to different degrees due to different communication modes in different communication processes; in a place with a poor network environment, the situation of successful downloading but data loss is easily caused.
At present, in the technical field of file verification, especially in the MD5 file verification technology, because the existing technology simply verifies the whole firmware, and does not verify each partition individually, if a problem occurs in the firmware during the upgrade process, the integrity of the firmware cannot be guaranteed at this time, which results in the failure of firmware upgrade or the breakdown of the MCU system.
Disclosure of Invention
One of the objectives of the present invention is to provide an MCU firmware of an intelligent garbage collection system that ensures absolute integrity of data in unreliable transmission in various data transmission modes, so as to solve the disadvantages of the prior art.
The second objective of the present invention is to provide a method for upgrading MCU firmware of an intelligent garbage collection system.
The technical scheme adopted by the invention is as follows:
an MCU firmware of an intelligent garbage classification recovery system, wherein an MD5 check symbol is arranged in the whole file of the MCU firmware, the file is divided into three areas according to the space of an MCU memory of a lower computer of the intelligent garbage recovery system, the three areas are respectively a starting area, a user area A and a user area B, the starting area is a guide code area, the user area A and the user area B are control code areas, and the user area A and the user area B are respectively provided with the MD5 check symbol A and the MD5 check symbol B which are independent of each other; the file name of the MCU firmware is sequentially a firmware version number, a separator, an MD5 verifier of the whole MCU firmware and a file suffix from left to right, and the firmware version number is used for a sign that whether the server and the upper computer of the intelligent garbage collection system meet upgrading conditions or not.
Furthermore, the three areas of the starting area, the user area a and the user area B all have fixed starting addresses, and the starting addresses are used for starting the program of the current partition at fixed positions.
An upgrading method of MCU firmware of an intelligent garbage classification recycling system comprises the following steps:
(1) The upper computer acquires the MCU file from the server, firstly acquires a firmware version number from the file name, and compares the firmware version number with the firmware version number of the lower computer to determine whether the version number conforms to an upgrade file;
(2) When the file version number is determined to belong to the upgrading MCU firmware, acquiring a complete MCU firmware file name;
(3) When the file name contains a separator, taking out an MD5 check symbol of the whole MCU firmware, after the whole MCU firmware is checked, comparing the two check symbols, wherein the result is consistent to indicate that the file is complete, the check is successful, and if the result is inconsistent, the file is lost and cannot be used for upgrading the file to be obtained again, and if the file name cannot be obtained successfully all the time, reporting error information and carrying out manual processing;
(4) If the verification is successful, the upper computer divides the firmware data into a plurality of frames and sequentially sends the frames to the lower computer, the lower computer writes the data into the corresponding partition position according to the received data information, after all transmission is completed, the last MD5 verification is carried out on the currently written partition, and after the verification is successful, the intelligent garbage classification recovery terminal is restarted;
(5) And after the intelligent garbage classification recycling terminal is restarted, the newly upgraded firmware program is operated, and the upgrade is completed.
Compared with the prior art, the invention has the following beneficial effects:
1. according to the invention, the MCU file is partitioned, two partition check symbols are generated, the file name contains a firmware version number, the file MCU firmware can be checked in a mode of the identifier of the firmware version number and one MD5 check symbol of the whole MCU firmware, and the MD5 check symbols A and the MD5 check symbol B of the two partitions, so that the data damage in any communication process can be timely found, and the loss of different degrees to the intelligent recovery terminal due to the firmware damage is prevented; under the more extreme communication environment, can guarantee that the data is complete reliable.
2. All three areas are provided with fixed initial addresses, and the initial addresses are used for starting programs of the current areas at fixed positions, so that unified maintenance and upgrading are facilitated.
3. In the upgrading method, the firmware version number in the file name is used for the identifier, an MD5 check symbol of the whole MCU firmware and the MD5 check symbol of the currently written subarea for checking and upgrading, so that the absolute integrity of the firmware and the reliability of upgrading can be ensured.
Drawings
FIG. 1 is a block diagram of the MCU firmware storage structure of the lower computer of the intelligent garbage classification and recovery system of the invention;
FIG. 2 is a block diagram of the file name format of the MCU firmware of the present invention;
fig. 3 is a flow chart of upgrading the lower computer of the intelligent garbage classification recycling system of the present invention.
Detailed Description
The invention is described in detail below with reference to the drawings and the detailed description.
As shown in fig. 1, the MCU firmware is divided into three areas, namely a start area 1, a user area A2 and a user area B3, according to the space of the MCU memory of the lower computer of the intelligent garbage classification recycling system. The starting area 1 is a boot code, the program firstly enters from the area, and the program is selected to enter the user area A2 or the user area B3 to run according to the flag bit of the fixed position of the starting area. Each zone has a fixed initial address which is a starting zone initial address 4, a user zone A initial address 5 and a user zone B initial address 6, and the current partitioned program is started at a fixed position, so that the unified maintenance and the upgrade are facilitated. The user area A2 and the user area B3 have independent MD5 check characters which are respectively an MD5 check character A7 and an MD5 check character B8, and the addresses of the MD5 check character A7 and the MD5 check character B8 are not fixed positions and are immediately behind a valid code.
When the program runs in the user area A2, the upgrading program needs to be downloaded into the user area B3, after upgrading is completed, verification can be performed according to the size of upgrading data and the MD5 check character B8 at the tail, and the data can be guaranteed to be absolutely complete and reliable after verification is completed.
When the program runs in the user area B3, the upgrading program needs to be downloaded to the user area A2, verification can be performed according to the size of upgrading data and the MD5 check character A7 at the tail after upgrading is completed, and the data can be guaranteed to be absolutely complete and reliable after verification is completed.
As shown in fig. 2, the MCU firmware file name is, from left to right, a firmware version number 9, a divider 10, an MD5 verifier 11 of the entire MCU firmware, and a file suffix 12. The file version number 9 is used for describing the version information of the current firmware and is used for the upper computer and the server to judge whether the file version number meets the upgrading condition; the separator 10 is used for distinguishing the positions of the firmware version number 9 and the MD5 check mark 11 of the whole MCU firmware, and has only one character; the MD5 check symbol 11 of the whole MCU firmware is 16 hexadecimal characters in total, and the check symbol is generated by PC software; and a file suffix 12, which indicates that the file type is a hexadecimal file, the storage mode is hexadecimal, and the file is read according to bytes when being read.
When the server or the upper computer obtains the file, the version number 9 of the MCU firmware is obtained first, and whether the version number information accords with the upgrading file or not is compared with the version number information on the lower computer.
And when the file version number is determined to belong to the MCU firmware which can be upgraded, acquiring the complete MCU firmware file name, when the file name contains a separator 10, taking out an MD5 check symbol 11 of the whole MCU firmware, after the whole MCU firmware is checked, comparing the check symbol with the result that the file is consistent and complete, if the result is inconsistent, the file is lost, the file cannot be used as an upgraded file, the file needs to be acquired again, and if the file cannot be acquired successfully all the time, error information needs to be reported and manually processed. If the verification is successful, the software can be issued to the lower computer for firmware upgrading, and after the upgrading is completed, the latest program is restarted and operated.
As shown in fig. 3, the internal memory of the MCU of the lower computer and the firmware of the MCU have the same partition, during the firmware upgrade process, the upper computer divides the firmware data into a plurality of frames and sequentially issues the frames to the lower computer, the lower computer writes the data into the corresponding partition position according to the received data information, after all the transmissions are completed, performs the last MD5 verification on the currently written partition, and restarts the device after the verification is successful. And after the equipment is restarted, the newly updated firmware program is operated, and the updating is completed. This is the last stage in the overall transmission process of the firmware, which can ensure that the firmware is absolutely complete when it is finally used.
The above embodiments are only examples of the present invention and are not intended to limit the scope of the invention and the appended claims, and all equivalent changes and modifications made according to the content of the claims should be included in the scope of the invention.

Claims (2)

1. The method for upgrading the MCU firmware of the intelligent garbage classification recycling system is characterized in that an MD5 check symbol is arranged in the whole file of the MCU firmware, the file is divided into three areas according to the space of an MCU memory of a lower computer of the intelligent garbage recycling system, the three areas are respectively a starting area, a user area A and a user area B, the starting area is a guide code area, the user area A and the user area B are control code areas, and the user area A and the user area B are respectively provided with the MD5 check symbol A and the MD5 check symbol B which are independent of each other; the file name of the MCU firmware is sequentially a firmware version number, a separator, an MD5 verifier of the whole MCU firmware and a file suffix from left to right, the firmware version number is used for a sign that whether a server and an upper computer of the intelligent garbage recovery system meet upgrading conditions or not, and the upgrading method comprises the following steps:
(1) The upper computer acquires the MCU file from the server, firstly acquires a firmware version number from the file name, and compares the firmware version number with the firmware version number of the lower computer to determine whether the version number conforms to an upgrade file;
(2) When the file version number is determined to belong to the upgrading MCU firmware, acquiring a complete MCU firmware file name;
(3) When the file name contains a separator, taking out an MD5 check symbol of the whole MCU firmware, after the whole MCU firmware is checked, comparing the two check symbols, indicating that the file is complete if the result is consistent, successfully checking, and missing the file if the result is inconsistent, wherein the file cannot be used as an upgrade file and is acquired again, and reporting error information and carrying out manual processing if the file cannot be successfully acquired all the time;
(4) If the verification is successful, the upper computer divides the firmware data into a plurality of frames and sequentially sends the frames to the lower computer, the lower computer writes the data into the corresponding partition position according to the received data information, after all transmission is completed, the last MD5 verification is carried out on the currently written partition, and after the verification is successful, the intelligent garbage classification recovery terminal is restarted;
(5) And restarting the intelligent garbage classification recycling terminal, operating the newly updated firmware program, and finishing the updating.
2. The method for upgrading the MCU firmware of the intelligent garbage classification recycling system according to claim 1, wherein the three areas, namely the boot area, the user area A and the user area B, have fixed start addresses, and the start addresses are used for starting programs of the current partition at fixed positions.
CN201910163164.9A 2019-03-05 2019-03-05 MCU firmware and upgrading method of intelligent garbage classification recycling system Active CN110007941B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910163164.9A CN110007941B (en) 2019-03-05 2019-03-05 MCU firmware and upgrading method of intelligent garbage classification recycling system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910163164.9A CN110007941B (en) 2019-03-05 2019-03-05 MCU firmware and upgrading method of intelligent garbage classification recycling system

Publications (2)

Publication Number Publication Date
CN110007941A CN110007941A (en) 2019-07-12
CN110007941B true CN110007941B (en) 2022-11-08

Family

ID=67166408

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910163164.9A Active CN110007941B (en) 2019-03-05 2019-03-05 MCU firmware and upgrading method of intelligent garbage classification recycling system

Country Status (1)

Country Link
CN (1) CN110007941B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502914A (en) * 2019-08-26 2019-11-26 河南航天金穗电子有限公司 A kind of remote encryption upgrade method based on public security intelligent terminal control module
CN112181466B (en) * 2020-09-08 2024-04-16 深聪半导体(江苏)有限公司 Cloud upgrading method and system for firmware of voice air conditioner
CN112988188A (en) * 2021-02-23 2021-06-18 上海龙感汽车电子有限公司 Software upgrading method applied to automobile steering wheel corner sensor
CN115102855B (en) * 2022-03-08 2023-12-22 上海锐铼水务科技有限公司 Online upgrading method and system for intelligent water meter embedded software

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101650662A (en) * 2009-08-26 2010-02-17 中兴通讯股份有限公司 Memory device of embedded system and staring method and upgrading of firmware
CN107436778A (en) * 2017-03-07 2017-12-05 安徽科微智能科技有限公司 A kind of high reliability upgrade method of unmanned systems
CN108108193A (en) * 2016-11-24 2018-06-01 厦门脉视数字技术有限公司 A kind of easy-to-use firmware upgrade method of safety and system
WO2018176733A1 (en) * 2017-03-30 2018-10-04 百富计算机技术(深圳)有限公司 Firmware upgrade method, terminal and computer-readable non-volatile storage medium
CN109358888A (en) * 2018-12-18 2019-02-19 郑州云海信息技术有限公司 Server firmware upgrade method, device, system and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101650662A (en) * 2009-08-26 2010-02-17 中兴通讯股份有限公司 Memory device of embedded system and staring method and upgrading of firmware
CN108108193A (en) * 2016-11-24 2018-06-01 厦门脉视数字技术有限公司 A kind of easy-to-use firmware upgrade method of safety and system
CN107436778A (en) * 2017-03-07 2017-12-05 安徽科微智能科技有限公司 A kind of high reliability upgrade method of unmanned systems
WO2018176733A1 (en) * 2017-03-30 2018-10-04 百富计算机技术(深圳)有限公司 Firmware upgrade method, terminal and computer-readable non-volatile storage medium
CN109358888A (en) * 2018-12-18 2019-02-19 郑州云海信息技术有限公司 Server firmware upgrade method, device, system and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于IAP的ARM处理器固件升级设计;方彬浩;《现代信息科技》;20180816(第08期);第2章、图2-3 *

Also Published As

Publication number Publication date
CN110007941A (en) 2019-07-12

Similar Documents

Publication Publication Date Title
CN110007941B (en) MCU firmware and upgrading method of intelligent garbage classification recycling system
CN106843957B (en) System firmware upgrading method and device
CN105183515B (en) The method and device of holder firmware upgrade
CN103377094A (en) Abnormity monitoring method and abnormity monitoring device
CN108279922A (en) Differential file generation method, upgrade method and system based on the differential file
CN105677398A (en) Universal embedded computer software on-line upgrading method
CN106612192A (en) An equipment upgrading method, apparatus and system
CN104918114A (en) Method and device for upgrading operation system
CN110633092A (en) Server for OTA (over the air) upgrading and embedded equipment upgrading method and device
CN106210877A (en) The method for upgrading system of intelligent television and device
CN103365676B (en) The method for upgrading software of communication equipment and device
US20230384750A1 (en) Efficient controller data generation and extraction
CN110647337A (en) Internet of things MCU (microprogrammed control Unit) air firmware upgrading method
CN104133743B (en) A kind of by burning file to the method for EMMC chip and device
CN109831702B (en) Method for preventing upgrade error of television software
CN112286565A (en) Embedded system differential upgrading method based on storage container
CN107436778A (en) A kind of high reliability upgrade method of unmanned systems
CN116820528A (en) Firmware version upgrading method and device, chip and electronic equipment
CN105337782A (en) Method and device for automatic upgrading after boot failure of network equipment firmware
CN102752365B (en) The method and apparatus of information processing
CN115437663A (en) Upgrade strategy updating method and device, electronic equipment, storage medium and vehicle
CN110262875B (en) Communication method and system of Windows virtual machine and KVM host based on patch mechanism
CN113127029A (en) Firmware updating method and device, electronic equipment and storage medium
CN112799707A (en) CTID (computer telephony integration) access control firmware upgrading method and system
CN112328288A (en) Method, system, equipment and storage medium for updating server component

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant