Hi Aswinkumar,
Start-up code is short code which will clear your RAM after reset and initialize variables (copy from flash to RAM). It could also initialize memory map (enable/disable EEPROM/Flash, set register, RAM, EEPROM alignment – only for old S12 MCUs, disable/enable watchdog,…). Tasks for start-up code depend on your definitions, but initialize RAM is most important step. I case of S12(X) cores and CW Classic IDE, default start-up code is in Start12.c file. In case of S12Z core and CW Eclipse IDE, default start-up code is in Start12z.c file.
These file are typically executed as first prior main application. Reset vector typically points to _Startup() function.
Bootloader is application which allow to you erase main application and load new version of this application back to flash.
In typical case, we switch between Bootloader and main application trough MCU reset. Therefore very small part of bootloader could be executed even before _Startup() function and just decide whether Bootloader or main application will be executed. After that, appropriate _Startup() function and application or bootloader code will be executed.
Bootloader typically communicate with computer via some standard interfaces like SCI, SPI, CAN,…
Example of bootloaders:
AN4258 Serial Bootloader for S12(X) Microcontrollers Based on 180 nm Technology
http://www.freescale.com/files/microcontrollers/doc/app_note/AN4258.pdf
http://www.freescale.com/files/microcontrollers/doc/app_note/AN4258SW.zip
for MCUs like S12G, S12XE,….
Or
AN4723 S12Z MagniV Bootloader
http://www.freescale.com/files/microcontrollers/doc/app_note/AN4723.pdf
http://www.freescale.com/files/microcontrollers/doc/app_note/AN4723_SW.zip
for MCUs like S12ZVM, S12VC,…
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------