I would like to have the ability to update the code in FLASH when the product is in the field. I’m thinking about using external flash to be able to store the new image to first, so that it can be crc’ed etc to check for validity, and then from there, update the internal flash. I would need a small stub piece of code that can be stored into RAM, which would basically move the image from external FLASH to internal FLASH. I guess I’m not sure how to go about this, or at least these are ideas I’ve come up with. All with require copying to RAM and then jumping to the code.
#1 - hand write it all in assembler, and just fill up a ‘C’ array with the bytes.
#2 - Write it in C, compile to a small program with a RAM linker script. Then try and merge this into the FLASH image with the FLASH linker script.
#3 - Write it in C, compile to a small program with a RAM linker script. Use a pre-processor tool to copy this image into a C array. Compile as usual for a FLASH image.
Anyone done something similar, or know of any code for something similar.
thanks,
Andy