A task online update
system under the condition of memory limitation in a
spacecraft real-
time system, including a ground maintenance module for
system symbol information, a ground generation module for injection data packets, and an on-board
processing module for injection data packets; the ground maintenance module for
system symbol information checks whether the injection program conflicts with the
spacecraft memory allocation; the ground generation module for injection data packets encapsulates the header information of the program to be injected, program running information, task attribute information, and
executable binary files into an injection data packet file; the on-board
processing module for injection data packets, after receiving the instruction to parse the injection program, parses the injection data packet file in the idle task according to the protocol format, and after the
parsing is completed, adds a new task to the scheduling table or replaces an original task. The present invention also provides an online update method. The present invention enables the
spacecraft to have the task-level system expansion ability, realizes the addition or replacement of tasks, upgrades the on-board
software of the spacecraft in a timely manner according to the task requirements, and endows the spacecraft with new functions.