Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/24/11 23:21
Read: times


 
#181312 - re: Reconsider
Responding to: ???'s previous message
Michael Karas said:
Andy,
Please reconsider your plan to put the re-programming code at the Bank 2 location. You should make sure that the boot loader function uses a design such that if there is a power loss during the time that update is in progress that it is easy to re-start the process over again. With the scheme that you describe you will run into a big issue if you have the flash block with the Reset and Interrupt vectors erased and then there is an upset.

Please take a close look at the postings I made here a loooong time ago for a loader that worked nicely for the 'F12x family of parts. That loader was written in assembly language so that it can share overlapped use of resources with those of the C code application with minimal special manipulation of the application code.

Here are links to threads where I've discussed boot loaders.

http://www.8052.com/forum/read/177016


Ah, I see what you're doing in the code in loader.pdf.

You reserve the first 0x2000 bytes for the program update code. Code memory starting at 0x2000 is for the application. Interrupt vectors jump to ISRs located above 0x2000. The big idea is that no code ever erases the first 0x2000 bytes, so the firmware update is always available to reload new code.

I like it. And it doesn't require any code banking, and it leaves 56k bytes of code space available for the user application.

Thanks to everyone for the ideas.

-a

List of 14 messages in thread
TopicAuthorDate
Odd use of code banking            01/01/70 00:00      
   I don't know about Keil's...            01/01/70 00:00      
   Seperate Program?            01/01/70 00:00      
      separate program            01/01/70 00:00      
         Often special lock bits for boot regions            01/01/70 00:00      
         linker magic            01/01/70 00:00      
            RTFM            01/01/70 00:00      
               You are not good to go            01/01/70 00:00      
                  updater and libraries            01/01/70 00:00      
         which is why            01/01/70 00:00      
   Please Reconsider            01/01/70 00:00      
      the golden rule            01/01/70 00:00      
      re: Reconsider            01/01/70 00:00      
         If needed...            01/01/70 00:00      

Back to Subject List