Recently I made a presentation to the Nanode application development weekend to demonstrate how to send a new sketch to a Nanode. The idea is that the nanode is a network connected device and with a small addition to the ENC28J60 library it would be possible for it to act as a simple TFTP server and accept new code uploads or poll a remote server to check for updated sketches that can be downloaded.
The demonstration on the day conisisted of a Nanode with additional SRAM installed on the empty pads on the underside of the board. The nanode was also converted to run at 3.3V only as this is a requirement for the SRAM chip. The demonstration nanode had a modified bootloader that checked the SRAM for a magic number at the start and a code length. This then triggered the bootloader to reprogram the main flash. The compiled sketch in .hex format was transfered from a laptop to the nanode using a tftp client.
As detailed in the presentation, there are a number of options for delivering the updated code to the nanode, this was a simple proof-of-concept to demonstrate that once a sketch has been transfered to SRAM it is then possible to reprogram the flash with this new image. The actual delivery mechanism is likely to change in the future but the code in the bootloader should not need to change much.
There are still a number of issues to resolve, such as using an optimised bootloader to increase the available code space, add extra checks to make sure malicious code is not sent or recieved by the nanode.
The bootloader is still available from GitHub