eng_ibrahim
Member level 1
can any one tell me
What is the difference between boot loader and startup code ? with examples
thanks in advance
What is the difference between boot loader and startup code ? with examples
thanks in advance
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Hi,
Bootloader:
Is not part of your application software. It is a piece of code to load your application code into the controller/processor. It is used only when you want to load a new software (version) onto the controller.
Example: a bootloader may communicate with the PC (using USB or UART) to load your application software from PC into the microcontroller's program memory. After that it can be executed.
Startup code:
Is a part of your application software. It is automatically generated by the compiler and added (at the programstart) to your application software. Usually you don't know, nor you have to take care about it. The startup code performs standard functions like data memory erase, stack pointer setup, standard periferal setup. This is performed each time immediately after reset/power_on and may take only some milliseconds. You won't recognize this. Then automatically your application software starts.
Klaus
In brief, the bootloader is a second software inside the same flash with the application. On the other hand, the startup code will run in any case, with or without the bootloader. So startup code will run before your code. Bootloader is an entirely different software from the application. Hope it is more clear for you now.