At 04:53 17-06-05 -0400, you wrote: >I'm trying to write a bootstrap routine in C that will reside in flash >and be copied to RAM for execution. Can anyone give me some helpful >hints on how to do that?
In an earlier discussion the method of copying a routine was discussed. >I've searched the docs for any reference to relocatable code (there will >be some subroutines, also in RAM) or preprocessor commands that might be >able to specify that this code will be running at a particular address >(in this case within the RAM) and haven't been able to find anything >that relates to this problem. Why would you copy more than one subroutine in RAM? The only thing you will want in RAM is the code that actually programs the flash. The amount of memory doesn't allow for allocating large fixed buffers for this. I'm planning to implement a method in which the data and the programming routine are both on the stack to use the memory most efficiently. When programming is finished, the memory is available again for other buffers. Nico Coesel