The invention relates to an automatic compiling, linking and loading method for distributed
control software source codes. The method comprises the following steps: 1, executing configuration operation by a user; 2, collecting state information of a button installed by the user; 3, generating a
new executable file, and sending a code downloading command to an affected
configuration item module; 4,after a code downloading command of the upper computer is received, entering a
maintenance mode; 5, downloading the
executable file to be downloaded to a
Flash memory of the lower computer; 6, afterdownloading of the
executable file is completed, enabling a BootLoader program to reply that loading of the upper computer is completed; 7, enabling the affected
configuration item module of the uppercomputer to send a downloading data instruction; 8, enabling a lower computer related to the affected
configuration item module to receive the downloading data instruction of the upper computer, entering a
maintenance mode and receiving user configuration data. According to the invention, the
software target code can be loaded to the corresponding target
machine, and the risks of missing loadingof the configuration
data file and the like are reduced.