I have an 5V Arduino Pro Mini Board. I have read the datasheet of the Mini board and it mentions since the Mini uses Atmega 328p it has 32 Kb flash. Also that 0.5 Kb of this flash memory is occupied by the boot loader. I want to know when i program the Mini, what will be the starting address of my program. Also i want to know the starting address and ending address of the bootloader program. i effect i would like to know the flash layout of my Arduino Mini Board.
Your code loads at zero The bootloader starts 0.5 kB short of the end of 32k. The reset vector is set to point to the bootloader.
If however you load code using ICSP, the bootloader is erased. The reset vector still points where the bootloader was but if there is no code there, it simply idles to the end of memory and starts your code at zero.
Can we precisely know the address where the boot loader is located (both the starting and ending) ????
I could look it up - as could you - but ... Why?
How can i look it up ?? Some boot loader is already present in it. I don't know its version.
Actually, I think that most "pro mini" board contain the older bootloader, which is 2k bytes long.
Your program "starts" at zero (0x0000). The boot loader starts at 32k-2k (0x7800) and goes approximately to the end of memory (0x7FFF) (regardless of the actual bootloader length you can't use the flash that comes after the bootloader for anything useful.)
The start of the bootloader SHOULD be the same as the "max program size" shown by the compile:
Sketch uses 1,030 bytes (3%) of program storage space. Maximum is 30,720 bytes.