The invention discloses a
sensor model updating method suitable for a single-
chip microcomputer, and the method comprises the steps: setting sensor models according to a preset structure body, and binding an instance of each
sensor model to a specific memory segment of the single-
chip microcomputer through a
compiler;
sensor model codes and data corresponding to the specific memory segment are mapped to a fixed address area of the single-
chip microcomputer through a link script, and a main program of the single-chip microcomputer directly accesses a sensor model interface through the fixed address area; receiving an upgrading file of the sensor model, erasing the specific memory segment,
copying data of the upgrading file into the specific memory segment, and calling the upgraded sensor model after restarting or reloading through the
single chip microcomputer to complete updating of the sensor model. According to the method, a preset structural body is adopted instead of a symbol table, the
specific function of the sensor is packaged into a
substructure, the method better fits a sensor scene, meanwhile, a sensor model and a main program are isolated more strictly, and the logic of the main program is not affected during upgrading.