On 08/05/2011 05:09 PM, Alex Stefan wrote: > Hello, > > I am working on a custom bootloader. For the time being I am trying to the > main > code to a higher address and create a custom section to hold the bootloader > code.
I plan on adding a bootloader to my current project but haven't quite reached that stage yet. But I have given it some thought and I think my plan is a bit different from yours. My plan is to link two stand alone programs. I have to do this eventually as the point is to be able to load the main program without using JTAG. The first is the bootloader and nothing special needs to be done while building it. The second is the main program. The only thing special I will need to do to it is to make sure that the code starts at a higher address. I can think of two ways of doing that: tell the linker (I think there is a flag for this), or lie about the processor. (ie. claim that I am using a device with less flash) The bootloader will manage the process of loading the main program. One special thing it will do is when it writes the vectors replace the reset vector with the start point for the boot loader. This way I can have the boot loader run at reset but have all the other vectors behave as usual for the main program. The main program should have no idea that it was started by the bootloader. I hope. As usual, plans will change to reflect reality. :-) -- David W. Schultz http://home.earthlink.net/~david.schultz "Pooh just is." Tao of Pooh ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1 _______________________________________________ Mspgcc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mspgcc-users
