The invention relates to an upgrading method and device for an
Internet of Things terminal. The upgrading device comprises a Boot
firmware storage area, an App
firmware storage area and an App
firmware backup area. The MCU is connected with an external Flash; after the MCU is powered on, the MCU enters a Boot firmware
storage area, Boot firmware is initialized, and after corresponding operation isexecuted, the MCU skips to an App address. Then the App is initialized, whether the
firmware version number needs to be updated or not is judged according to the read flag bit, updating
processing iscarried out, the processed
firmware version number is sent to the
server, whether upgrading is carried out or not is determined according to a
server instruction, if upgrading is carried out, upgrading
processing is carried out, and if not, the APP address is skipped to execute a service task. According to the method and the device, the Flash is managed in a partitioning manner, and is matched with the judgment of the starting program, so that the terminal firmware automatically rolls back under the condition that remote upgrading fails, local upgrading and online upgrading are supported, andthe problem of terminal
crash caused by accidental errors during upgrading is solved. Besides, when firmware updating fails, the Boot program automatically completes firmware
rollback operation by judging the flag bit, and normal operation of equipment is guaranteed.