Go Down

Topic: Bootloader for my project (Read 288 times) previous topic - next topic


@Krupski and @pert: Thanks for your replies. I have figured out how to write pages in the flash section using the <avr/boot.h> library. I have to implement self programming wirelessly via zigbee or bluetooth and hence to do that I have to write a custom bootloader. The bootloader should be able to upload code as you normally would via avrdude and be able to implement the over the air self programming. Thus the skeleton of my code is:

if(hardware reset)
//receive code via avrdude as you normally would

else if (software reset)
//receive code from the buffer in SRAM whose address is specified.

Can you provide any suggestions as to where I should start or how I should approach this problem?

I can also combine the if-else-if in a single statement:
if(hw reset || sw reset)
//receive code from the buffer's address in SRAM/EEPROM (address must be known by the bootloader)

Please do give feedback. Thanks!


Can the bluetooth and zigbee modules provide a hardware reset?


I am sending the hex file via serial interface for initial testing and I am sending a code such that when the MCU parses the coded message it performs a software reset sing the watchdog timer and the code then jumps to the bootloader. This is what I have planned to do but I need to figure out the bootloader implementation first to actually make this happen. Thanks!


Ok, that's what I was going to suggest if you can't get a hardware reset. It's how the Ariadne TFTP bootloader does it.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131