Lundin wrote:
To be able to burn flash while a program is running elsewhere in the flash, you need to use a S12 derivate with more than one 64k block, since you can't execute code from the same block you are programming. For example, it works with Dx128 or larger, but it doesn't work with any member of the C family since it uses one block only.
Yes it does! True, you can't execute code from a flash block which is being programmed - which is why you copy some or all of your bootloader into RAM, and run it from there instead.
With regard to lack of space in non-banked flash, constants and interrupt vectors do need to be there, as they are pointed to by 16-bit pointers (so a bank cannot be specified). However, you can partition this space into an area used by the bootloader, and an area used by your main program.
There are also some clever tricks you can do to place constants in banked flash, using a special function in the same bank to read them.
I strongly suggest that both of you read the various app notes about how to write a bootloader.
Steve M.