EmbDev.net

Forum: µC & Digital Electronics How to write a bootloader for SAM7A3?


von Al pacino D. (bigmicro)


Rate this post
useful
not useful
Hello my friends,

I've a problem, I want to write my own bootloader. My first attemption 
was writing an application with built in bootloader. So when I want to 
upgrade for example, I flash the new firmware from RAM because my own 
code will be overwritten by the new firmware.

Sometimes it works and sometime not, another problem is if upgrading a 
new firmware goes wrong, the whole device must be sent back flash the uC 
with a JTAG. So to solve this proble, I want a seperate bootloader e.g. 
at the beginning of the flashmemory address and the application firmware 
in another memorysegment of the flash.

Now I'm facing other problems, when the bootloader ends, I need to jump 
to the entry-point of the application firmware. But several things need 
to acount with. For example, the linker script of application firmware 
needs to be modified before compiling the sources. Also, how about the 
interruptvectors? Because at address zero to 1c or something the 
interruptvectors is used of the bootloader, so how about the application 
firmware?

Can somebody help me, give me hints or tips?

thank you very much!

P.S: Compiler = IAR EWARM 4.41A, uC = at91SAM7A3

von denilson (Guest)


Rate this post
useful
not useful
Hey, what is about your sam7a3 Bootloader? Have you already solve this 
problem?

von Rooney B. (rooney)


Rate this post
useful
not useful
The bootloader should always be located in the flash. If the firmware 
update was not successful your bootloader will be still available for a 
retry. A simple bootloader will occupy about one sector.

The only functions that have to be executed in RAM are the function to 
write the flash and to lock the sectors. This is done easily by 
declaring the function as __ramfunc in IAR.

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.