From where can i get the boot-loader program and how to plug-in my own custom function to the same.
You can find the bootloader sources in /hardware/arduino/bootloaders/optiboot
Or somewhat more recent code at Google Code Archive - Long-term storage for Google Code Project Hosting.
I think you will find there are about 12 bytes free, not much room for your own functions.
Thank you guys for u r valid replies..
Grumpy_Mike:
I think you will find there are about 12 bytes free, not much room for your own functions.
if my knowledge is correct , there is about 2 KBytes of memory for atmega328p. If this is correct there is enough space to write our code know.
My problem is when i bur the bootloader into atmega328P MC if fails. Is it the problem of Braud Rate that is being computed in optiboot.c file or is it with the fuses. My bootloader file after compiling takes about 776 bytes.
Optiboot and its makefiles (which include the fuse settings) has a size limit of 512 bytes.
You could "easily" change the limit to 1k, 2k, or even 4k, by changing the "section-start" for .text, and the BOOTSZ bits in HFUSE (on a 328)
(If you're using the IDE to burn the bootloader you'd have to change the fuses in boards.txt )