An embedded system and method for performing a background code update of a
current code image with an incoming code image is provided. The method
includes executing the current code image in the embedded system;
executing one or more code update routines from the incoming code image
to update the current code image with the incoming code image; and
executing a task switching function from the current code image to switch
microprocessor control from executing the one or more code update
routines of the incoming image to execute a function in the current code
image. The system and method also involves retrieving an offset from the
incoming code image for the one or more code update routines in the
incoming code image. The system and method further involves retrieving an
offset from the current code image of a task switching function.