The invention provides a flexible mirroring FLASH partition upgrading
system and method for an
embedded system. The
system comprises an upper computer and a lower computer, the upper computer serves as a
mirror image self-adaptive manufacturing tool, participates in compiling of new function
software, and generates an integer
mirror image file, namely a new function
mirror image; the lower computer uses a built-in FLASH hardware memory as an NVM (Non-
Volatile Memory) based on an MCU (Microprogrammed
Control Unit); the upper computer and the lower computer interact through a high-speed communication protocol, when new function
software of a
system is updated, the upper computer automatically calculates key parameters of a mirror image and pre-embeds the key parameters into a new function mirror image, and after the lower computer receives an upgrading request and mirror image data, the data is adaptively written into a specified address FLASH space by erasing FLASH and
programming data. According to the method, the embedded mirror image size can be flexibly modified, the FLASH erasing and
copying data volume can be adaptively adjusted, the functional area jump address can be adaptively recognized, the upgrading speed can be improved, and the expansibility of embedded function upgrading is enhanced.