CN114625388A - Internet of things MCU (microprogrammed control Unit) air firmware upgrading system and method - Google Patents

Internet of things MCU (microprogrammed control Unit) air firmware upgrading system and method Download PDF

Info

Publication number
CN114625388A
CN114625388A CN202011459138.XA CN202011459138A CN114625388A CN 114625388 A CN114625388 A CN 114625388A CN 202011459138 A CN202011459138 A CN 202011459138A CN 114625388 A CN114625388 A CN 114625388A
Authority
CN
China
Prior art keywords
mcu
firmware
internet
things
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011459138.XA
Other languages
Chinese (zh)
Inventor
胡光荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Lezhongyun Technology Co ltd
Original Assignee
Shenzhen Lezhongyun 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 Shenzhen Lezhongyun Technology Co ltd filed Critical Shenzhen Lezhongyun Technology Co ltd
Priority to CN202011459138.XA priority Critical patent/CN114625388A/en
Publication of CN114625388A publication Critical patent/CN114625388A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of Internet of things, and provides an Internet of things MCU (microprogrammed control Unit) aerial firmware upgrading system and method, wherein the system comprises a cloud control platform and Internet of things terminal equipment consisting of an Internet of things MCU and a communication module, the Internet of things MCU is connected with the cloud control platform through the communication module to upgrade firmware, and a storage space of the Internet of things MCU is divided into three independent spaces for storing BOOTLOADER program codes, standby application program codes and normal application program codes respectively; the method comprises the steps that the Internet of things MCU starts a standby application program when the firmware is upgraded, an upgrade package is read and written through the standby application program, and a normal application program is started after the upgrade is finished. According to the scheme, the problem that the upgrading is halted when the MCU of the Internet of things is abnormal or is powered off in the firmware upgrading process can be solved, the interrupted upgrading process can be continued after the MCU of the Internet of things is powered on again, the risk of firmware upgrading is reduced, and the maintenance stability of the terminal equipment of the Internet of things is improved.

Description

Internet of things MCU (microprogrammed control Unit) air firmware upgrading system and method
Technical Field
The invention relates to the technical field of Internet of things, in particular to an Internet of things MCU (microprogrammed control unit) air firmware upgrading system and method.
Background
In recent years, with the rapid development of the technology of the internet of things, more and more terminal devices of the internet of things are required to continuously upgrade firmware to repair system bugs or upgrade a system to meet new user requirements, so that better service is provided for users. At present, the mainstream method for upgrading the firmware of the MCU of the Internet of things is cloud remote firmware upgrading, the MCU is connected with a cloud and then downloads a firmware upgrading package for upgrading, however, in the upgrading process, if abnormity occurs or power failure occurs, the upgrading crash situation easily occurs, the upgrading fails, the normal work of the MCU is affected, and the firmware upgrading package needs to be downloaded again when being upgraded again, so that the upgrading risk is large, and the upgrading efficiency is low.
Disclosure of Invention
The invention aims to provide an Internet of things MCU (microprogrammed control Unit) air firmware upgrading system and method, and aims to solve the problem that an Internet of things MCU is subjected to abnormity or power failure in a remote upgrading process to cause upgrading crash.
The invention provides an Internet of things MCU (microprogrammed control unit) aerial firmware upgrading system which comprises a cloud control platform and Internet of things terminal equipment, wherein the Internet of things terminal equipment is formed by combining a communication module and a plurality of Internet of things MCUs of the same or different types; the storage space of the Internet of things MCU is divided into three mutually independent spaces which are respectively used for storing BOOTLOADER program codes, normal application program codes and standby application program codes; the BOOTLOADER program is used for setting an application program starting mode in firmware upgrading, the normal application program is used for running when the firmware is not upgraded, and the standby application program is used for reading a firmware upgrading packet from the communication module and writing the firmware upgrading packet into a normal application program space when the firmware is upgraded.
Further, the cloud control platform is connected with the plurality of terminal devices of the internet of things.
Further, the communication module comprises a 4G module and a 2G module.
Further, the BOOTLOADER program is used to set the starting mode of the application program in the firmware upgrade, including,
after the MCU learns that the downloading of the firmware upgrading package is finished, modifying a starting address in a RESET function in a BOOTLOADER program into a standby PC, and setting a starting mode as a starting standby application program;
after the reading and writing of the firmware upgrading package are finished, the MCU modifies the starting address in the RESET function in the BOOTLOADER program into a normal PC, and the starting mode is set as the starting of a normal application program.
And further, the standby application program is used for reading the firmware upgrading packet from the communication module and writing the firmware upgrading packet into the normal application program space during firmware upgrading, and comprises the steps of erasing data of the communication module after the normal PC address is erased during firmware upgrading, establishing communication with the communication module, reading the firmware upgrading packet from the communication module and writing the firmware upgrading packet into the space behind the normal PC address.
The invention provides an Internet of things MCU (microprogrammed control Unit) air firmware upgrading method, which comprises the following specific steps of:
step S1, the Internet of things terminal uploads the MCU firmware version number to the cloud control platform;
step S2, the cloud control platform judges whether the uploaded MCU firmware version number is lower than the currently stored MCU firmware version number, if not, the last step is carried out, and if yes, the next step is carried out;
step S3, the terminal of the Internet of things downloads corresponding MCU upgrading firmware and stores the MCU upgrading firmware in the local space of the communication module;
step S4, the BOOTLOADER sets the starting mode to be the starting of the standby application program, the MCU automatically resets and uploads the latest MCU version number to the cloud control platform;
step S5, the spare application program erases the normal application program space, the upgrade firmware stored in the communication module is pulled and written into the normal application program space, the BOOTLOADER starting mode is modified to be the normal application program starting, and the MCU is self-reset;
in step S6, the MCU enters the normal application operating mode.
Further, step S3 includes the following sub-steps:
step S31, the cloud control platform issues an upgrade enabling signal to the terminal of the Internet of things;
step S32, the terminal communication module of the Internet of things receives an enabling signal;
and step S33, the Internet of things terminal downloads corresponding MCU upgrading firmware and stores the MCU upgrading firmware in the local space of the communication module.
Further, step S4 includes that after the MCU knows that the communication module finishes downloading the upgrade firmware package, the MCU modifies the PC address to be the standby application start address, and then performs self-reset, and after the reset is finished, the MCU enters the standby application to run.
Further, step S5 includes erasing data after the normal PC address after the standby application is run, establishing communication with the communication module, reading the firmware upgrade package from the communication module and writing the firmware upgrade package into the space behind the normal PC address, modifying the boot address in the RESET function to be the normal PC boot after the writing, and finally resetting itself.
Compared with the prior art, the Internet of things MCU aerial firmware upgrading method provided by the invention can solve the problem that the Internet of things MCU is halted in upgrading the firmware due to abnormity or power failure, and can continue the interrupted upgrading process after being powered on again, thereby reducing the risk of firmware upgrading and improving the maintenance stability of the Internet of things terminal equipment. In the firmware upgrading process, the firmware upgrading package can be stored in the local flash of the communication module, and the firmware upgrading package does not need to be repeatedly downloaded when the Internet of things MCU is upgraded again, so that the firmware upgrading efficiency is improved.
Drawings
Fig. 1 is a schematic diagram of an internet-of-things MCU air firmware upgrade system provided in an embodiment of the present invention.
Fig. 2 is a schematic diagram of a memory map in an internet of things MCU air firmware upgrade system according to an embodiment of the present invention.
Fig. 3 is a flowchart of an implementation of the method for upgrading the MCU air firmware of the internet of things according to the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
The following detailed description of specific implementations of the present invention is provided in conjunction with specific embodiments:
example (b):
fig. 1 shows a schematic diagram of an internet-of-things MCU air firmware upgrade system provided in an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, which is detailed as follows:
the invention provides an Internet of things MCU (microprogrammed control unit) aerial firmware upgrading system which comprises a cloud control platform and Internet of things terminal equipment, wherein the Internet of things terminal equipment is formed by combining a communication module and a plurality of Internet of things MCUs of the same or different types; the storage space of the Internet of things MCU is divided into three mutually independent spaces which are respectively used for storing BOOTLOADER program codes, normal application program codes and standby application program codes; the BOOTLOADER program is used for setting an application program starting mode in firmware upgrading, the normal application program is used for running when the firmware is not upgraded, and the standby application program is used for reading the firmware from the communication module and writing the firmware into the normal application program space when the firmware is upgraded.
The cloud control platform is connected with a plurality of internet of things terminal devices of the same type or different types, for example, one cloud control platform is connected with a plurality of sharing bicycles, intelligent automobiles, intelligent door locks and the like.
The Internet of things MCU is connected with the cloud control platform through the communication module, and the communication module comprises a 4G module and a 2G module.
Fig. 2 shows a memory partition mapping of the MCU in the internet of things, in which a memory space of the MCU in the internet of things is divided into three mutually independent spaces, a BOOTLOADER program code space, a normal application program code space, and a standby application program code space, which are respectively used for storing a BOOTLOADER program, a normal application program, and a standby application program.
The BOOTLOADER program is used for setting a starting mode of an application program in firmware upgrading, and the specific mode is as follows:
after the MCU learns that the downloading of the firmware upgrading package is finished, modifying a starting address in a RESET function in a BOOTLOADER program into a standby PC, and setting a starting mode as a starting standby application program;
after the reading and writing of the firmware upgrading package are finished, the MCU modifies the starting address in the RESET function in the BOOTLOADER program into a normal PC, and the starting mode is set as the starting of a normal application program.
The standby application program is used for reading the firmware upgrading packet from the communication module and writing the firmware upgrading packet into the normal application program space during firmware upgrading, and comprises the steps of erasing data of the normal PC address during firmware upgrading, establishing communication with the communication module, reading the firmware upgrading packet from the communication module and writing the firmware upgrading packet into the normal PC address space.
And the normal application program is used for normally running when the non-firmware is upgraded.
Fig. 3 shows that the invention provides an internet of things MCU air firmware upgrade method, which specifically includes the steps of:
step S1, the Internet of things terminal uploads the MCU firmware version number to the cloud control platform;
step S2, the cloud control platform judges whether the uploaded MCU firmware version number is lower than the currently stored MCU firmware version number, if not, the last step is carried out, and if yes, the next step is carried out;
step S3, the terminal of the Internet of things downloads corresponding MCU upgrading firmware and stores the MCU upgrading firmware in the local space of the communication module;
step S4, the BOOTLOADER sets the starting mode to be the starting of the standby application program, the MCU automatically resets and uploads the latest MCU version number to the cloud control platform;
step S5, the spare application program erases the normal application program space, the upgrade firmware stored in the communication module is pulled and written into the normal application program space, the BOOTLOADER starting mode is modified to be the normal application program starting, and the MCU is self-reset;
in step S6, the MCU enters the normal application operating mode.
Specifically, step 3 comprises the following substeps:
step S31, the cloud control platform issues an upgrade enabling signal to the terminal of the Internet of things;
step S32, the terminal communication module of the Internet of things receives an enabling signal;
and step S33, the Internet of things terminal downloads corresponding MCU upgrading firmware and stores the MCU upgrading firmware in the local space of the communication module.
Specifically, the step 4 includes that after the MCU knows that the communication module finishes downloading the upgrade firmware package, the PC address is modified to be the standby application start address, and then the MCU self-resets, and after the reset is finished, the MCU enters the standby application to run.
Specifically, the step 5 includes erasing data after the normal PC address after the standby application program is run, establishing communication with the communication module, reading the firmware upgrade package from the communication module and writing the firmware upgrade package into the space behind the normal PC address, modifying the boot address in the RESET function to be the normal PC boot after the writing, and finally resetting itself.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. An Internet of things MCU (microprogrammed control unit) air firmware upgrading system is characterized by comprising a cloud control platform and Internet of things terminal equipment, wherein the Internet of things terminal equipment is formed by combining a communication module and a plurality of Internet of things MCUs of the same or different types, the Internet of things MCUs are connected with the cloud control platform through the communication module to upgrade firmware, and the communication module downloads a firmware upgrading package from the cloud control platform and stores the firmware upgrading package in the communication module; the storage space of the Internet of things MCU is divided into three mutually independent spaces which are respectively used for storing BOOTLOADER program codes, normal application program codes and standby application program codes; the BOOTLOADER program is used for setting a starting mode of an application program in firmware upgrading, the normal application program is used for running when the firmware is not upgraded, and the standby application program is used for reading a firmware upgrading package from the communication module and writing the firmware upgrading package into a normal application program space when the firmware is upgraded.
2. The Internet of things MCU aerial firmware upgrade system of claim 1, wherein the cloud control platform is connected to a plurality of the Internet of things terminal devices.
3. The Internet of things MCU air firmware upgrade system of claim 1, wherein the communication modules comprise a 4G module and a 2G module.
4. The Internet of things MCU air firmware upgrade system of claim 1, wherein the BOOTLOADER program is used for setting a starting mode of an application program in firmware upgrade, comprising,
after the MCU learns that the downloading of the firmware upgrading package is completed, the starting address in a RESET function in the BOOTLOADER program is modified to be a standby PC, and the starting mode is set to be a starting standby application program;
and after the reading and writing of the firmware upgrading package are finished, the MCU modifies the starting address in the RESET function in the BOOTLOADER program into a normal PC, and the starting mode is set as the starting of a normal application program.
5. The internet-of-things MCU air firmware upgrading system according to claim 1, wherein the standby application is used for reading a firmware upgrading packet from the communication module and writing the firmware upgrading packet into the normal application space during firmware upgrading, and comprises the standby application erasing data after a normal PC address during firmware upgrading and establishing communication with the communication module, and reading the firmware upgrading packet from the communication module and writing the firmware upgrading packet into the normal PC address rear space.
6. An Internet of things MCU (microprogrammed control Unit) air firmware upgrading method is characterized by comprising the following steps:
the terminal of the Internet of things uploads the version number of the MCU firmware to the cloud control platform;
the cloud control platform judges whether the uploaded MCU firmware version number is lower than the currently stored MCU firmware version number, if not, the last step is carried out, and if so, the next step is carried out;
the terminal of the Internet of things downloads corresponding MCU upgrading firmware and stores the MCU upgrading firmware in the local space of the communication module;
the BOOTLOADER sets a starting mode to be starting of a standby application program, and the MCU automatically resets and uploads the latest MCU version number to the cloud control platform;
the standby application program erases the normal application program space, the upgrade firmware stored in the communication module is pulled and written into the normal application program space, the BOOTLOADER starting mode is modified to be the normal application program starting, and the MCU is self-reset;
the MCU enters the normal application mode.
7. The Internet of things MCU over-the-air firmware upgrading method according to claim 6, wherein the step of downloading the corresponding MCU upgrading firmware by the Internet of things terminal and storing the MCU upgrading firmware in the local space of the communication module comprises the steps of:
the cloud control platform issues an upgrade enabling signal to the Internet of things terminal;
the terminal communication module of the Internet of things receives an enabling signal;
and the terminal of the Internet of things pulls the MCU upgrading firmware and stores the MCU upgrading firmware in the local space of the communication module.
8. The Internet of things MCU air firmware upgrading method according to claim 6, characterized in that the BOOTLOADER setting starting mode is a step of starting a standby application program, including that after the MCU knows that the communication module finishes downloading the upgrade firmware package, the MCU modifies the PC address to be the standby application program starting address, then the MCU is reset, and after the reset is finished, the MCU enters the standby application program to run.
9. An internet of things MCU air firmware upgrading method according to claim 6, characterized in that the standby program operation is performed after the RESET is completed, including, when the BOOTLOADER is started, the interrupt vector table operates the RESET function, and obtains the PC address, that is, the address of the program code segment, and then starts the program from the address.
10. The Internet of things MCU air firmware upgrading method according to claim 6, characterized in that the normal application program space is erased in the standby application program, the upgraded firmware stored in the communication module is pulled and written into the normal application program space, the BOOTLOADER starting mode is modified to start the normal application program, and the MCU is self-RESET.
CN202011459138.XA 2020-12-11 2020-12-11 Internet of things MCU (microprogrammed control Unit) air firmware upgrading system and method Pending CN114625388A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011459138.XA CN114625388A (en) 2020-12-11 2020-12-11 Internet of things MCU (microprogrammed control Unit) air firmware upgrading system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011459138.XA CN114625388A (en) 2020-12-11 2020-12-11 Internet of things MCU (microprogrammed control Unit) air firmware upgrading system and method

Publications (1)

Publication Number Publication Date
CN114625388A true CN114625388A (en) 2022-06-14

Family

ID=81895580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011459138.XA Pending CN114625388A (en) 2020-12-11 2020-12-11 Internet of things MCU (microprogrammed control Unit) air firmware upgrading system and method

Country Status (1)

Country Link
CN (1) CN114625388A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104007996A (en) * 2014-06-16 2014-08-27 南京融教科技有限公司 Reliable firmware upgrading realizing method for distributed control system
CN104461654A (en) * 2014-12-27 2015-03-25 西安大唐电信有限公司 OBD equipment function unit and firmware classification optional upgrading method
US20190278583A1 (en) * 2017-03-30 2019-09-12 Pax Computer Technology (Shenzhen) Co., Ltd Method for updating firmware, terminal and computer readable non-volatile storage medium
CN110647337A (en) * 2019-08-20 2020-01-03 深圳市易佰特软件有限公司 Internet of things MCU (microprogrammed control Unit) air firmware upgrading method
CN111142907A (en) * 2019-12-25 2020-05-12 声耕智能科技(西安)研究院有限公司 Partition upgrading method for off-line keyword recognition system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104007996A (en) * 2014-06-16 2014-08-27 南京融教科技有限公司 Reliable firmware upgrading realizing method for distributed control system
CN104461654A (en) * 2014-12-27 2015-03-25 西安大唐电信有限公司 OBD equipment function unit and firmware classification optional upgrading method
US20190278583A1 (en) * 2017-03-30 2019-09-12 Pax Computer Technology (Shenzhen) Co., Ltd Method for updating firmware, terminal and computer readable non-volatile storage medium
CN110647337A (en) * 2019-08-20 2020-01-03 深圳市易佰特软件有限公司 Internet of things MCU (microprogrammed control Unit) air firmware upgrading method
CN111142907A (en) * 2019-12-25 2020-05-12 声耕智能科技(西安)研究院有限公司 Partition upgrading method for off-line keyword recognition system

Similar Documents

Publication Publication Date Title
CN103077058B (en) Method and device for installing application program
CN106708543B (en) OTA (over the air) upgrading method and device of operating system
CN105930236A (en) Application program version returning method based on BMS Bootloaderupgrade
CN107179909A (en) Method for upgrading software, device and computer-readable recording medium
CN106610840A (en) FOTA (Firmware Over-The-Air) upgrade method and system
CN105745617A (en) Selective power management for pre-boot firmware updates
CN110908682B (en) Firmware upgrading method and system for vehicle controller, vehicle and storage medium
CN109032632A (en) A kind of FOTA upgrade method, wireless communication terminal and storage medium
CN112947977A (en) Software online upgrading method and system
CN108345464A (en) A kind of the startup method and Android vehicle device of Android system
CN108920168B (en) Bootloader method supporting simultaneous upgrading of multiple similar ECUs and having function of preventing program mismatching
CN112540780A (en) System and method for realizing batch firmware upgrade of formation unmanned aerial vehicles
CN103533534B (en) Firmware wireless upgrading method for DECT (Digital Enhanced Cordless Telecommunications) mobile phone
CN108874422B (en) Software online upgrading method for refrigerator electric control board, refrigerator electric control board and refrigerator
CN108153548A (en) A kind of EMMC firmware upgrade methods and device
CN114064077A (en) Automobile ECU cloud software upgrading method based on TC397 microcontroller address mapping
CN116501357A (en) Online upgrade method of singlechip
CN107436778A (en) A kind of high reliability upgrade method of unmanned systems
CN104423997A (en) Remote base station version installing method and remote base station version installing device
CN114625388A (en) Internet of things MCU (microprogrammed control Unit) air firmware upgrading system and method
CN110688135A (en) Program flashing method, device and medium for controller
CN115951920A (en) Mobile equipment upgrading method and device, storage unit and mobile equipment
CN113377425B (en) BMC firmware generation method and device, BMC starting method and device and storage medium
CN111611000B (en) High-reliability firmware air upgrading method and system
CN110309018B (en) Charging equipment system switching method, charging equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20220614

RJ01 Rejection of invention patent application after publication