How to use flash for mega2560 update sketch (update user APP)

Take a look: