EmbDev.net

Forum: ARM programming with GCC/GNU tools bootlader design


von Roman M. (romez777)


Rate this post
useful
not useful
Hello dear friends,

last 2 weeks I've spent studying ARM C-startup concepts, remapping and
the similar. I need this to implement a simple bootloader.

It looks to me I more or less understand these things and this are some
ideas I came up with:

- Bootloader I'm designing is not universal, but rather for upgrading
the firmware of specific structure and purpose, this means boot code
will be aware of some peculiarities of the F/W
- the application (i.e. firmware) will use vectors and exceptions (fiq &
irq)

Therefore, this is how I view the design:
1) the main application (which is supposed to be upgraded by bootloader)
copies vectors table in to RAM
2) then sets REMAP bit, this maps RAM region to 0x200000 AND 0x0
addresses
3) the vector table of application should be linked on 0x0 address,
while the rest part of it on the other address (for example, 0x101000,
providing that bootcode resides in the first 0x1000 bytes)
4) on bootloader side - remapping is not necessary (all boot does is
load application's image and burn on flash). We MAY need remapping for
flash operations, in order to avoid compiler-specific features, for
example IAR's '__ramfunc' or similar...

This is my vision and understanding of the whole thing. Your comments on
it are welcome!

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.