2013-10-14 01:11 AM
I designed a bootloader and erase it to sector 0. It can erase other bin into other sectors using IAP. But how to upgrade itself to sector 0? Does anyone give me an idea?
Thanks.2013-10-14 04:30 AM
Copy the updating code to RAM, and run it from there.
2013-10-15 09:58 PM
Hi clive1,
How to copy a function(include upgrading code) to a RAM address? Is it possible? If not, I need to create another upgrading project and include the binary code of this project into bootloader?2013-10-15 10:02 PM
Hi Clive1,
How to copy a functon which includes updrading code to a RAM address? Is it possible? If not, do I need to create another upgrading project and include the binary code of this project into bootloader?2013-10-16 06:44 AM
Coding a whole other applet is one approach, if your current code is address agnostic you could use that too. I, personally, wrote a small block of assembler code which I can copy anywhere in memory, and has a clearly understood call tree. This would be more challenging in C, and using external/library subroutines.