We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Is it possible to have a separate bootloader and application in the same flash? The problem I see is hooking the interrupts from the low memory (the bootloader's to go into 0x0000)into the application which uses them. Do I have to compile these applications into one application, to get the interrupts hooked in? I'd rather these programs not be dependent on each other.
Hi there! You probably have bad luck. When you write to an external FLASH, there will be some sort of write cycle that takes maybe 1 ms per memory page. While that the data bits are used to indicate the status. So, the normal progam, being run from the same chip, would be corrupted while that write cycle. You can store the boot loader in another memory chip, maybe an EEPROM and when you go to boot loade mode, you could switch that EEPROM to be in the code segment and the FLASH to be in the X-DATA Segment. Then write the pages to be modified to X-DATA, check the write cycle status, write the next page, etc. and at the end of the loading process, you switch the FLASH back to the CODE segment. That is how I have done that kind of projects with external code memory. I think, there might be some derivates, that might support boot loading the internal program memory, too.
Thanks for your replies, I'll have to talk with my hardware engineer about how he wants to do it.