Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Before My question confuses, let me make it very clear. I am an electronics undergrad doing internship for a company which manufactures oven controllers. My 1st task was to write a piece of code in the flash memory to blink the led in that board. I did it successfully through my 1st question in the Code Project. Now comes the main task I have to build a Bootloader for the Controller in that board. The system started and executed my 1st code which implies there is a bootcode already associated with that board. Now, how will I write my own bootloader code for a system which is already working fine? I am not asking for the entire code. Answers quoting links to tutorials, videos, blogs are enough.

What I have tried:

The controller which I use is Freescale Kinetis KE02Z controller. I tried googling and checked in other forums but nothing helped.
Posted
Updated 25-Feb-16 21:24pm

Bootloaders highly depend on the target microcontroller architecture. You have to:
  • Search for manufacturer's documentation about (e.g. application notes).
  • Look at forums specialized on the target microcontroller.
 
Share this answer
 
There is usually no need to write your own boot loader. Just use the one that is provided by the manufacturer of your microcontroller (there is often an application note). If necessary, you can modify the code to match your needs.

Because you are using your controller the first time and are probably new to microcontrollers, I highly recommend to do it this way because writing a boot loader from scratch requires good knowledge of the controller and it's programming.

I'm also not quite sure if you know what boot loaders are usually used for and what are the requirements for your boot loader. They are mainly used to allow updating the application code. When the system is powered on, they will check for a specific condition and when that is not met they will jump to the normal application code. Otherwise they wait for commands on an interface like a serial line. With an update command they receive the binary data and write that to the flash memory starting at the application code address.
 
Share this answer
 
Comments
GaneshRfromSpace 26-Feb-16 4:40am    
Thanks Mr.Jochen for the solution. You mean I can find the boot loader code in the application notes provided by the manufacturer ?
Jochen Arndt 26-Feb-16 4:52am    
Just search for "kinetis bootloader":
"UART Boot Loader Design on the Kinetis E Series":
http://cache.nxp.com/files/32bit/doc/app_note/AN4767.pdf

"IIC Boot Loader Design on the Kinetis E Series"
http://cache.nxp.com/files/32bit/doc/app_note/AN4775.pdf?fpsp=1&WT_TYPE=Application%20Notes&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=pdf&WT_ASSET=Documentation&fileExt=.pdf

Documents and source files related to your controller:
http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/e-series/kinetis-ke02-20-mhz-entry-level-high-robustness-esd-emc-performance-microcontrollers-mcus:KE02?fpsp=1&tab=Documentation_Tab&uc=true&lang_cd=en#nogo

You should visit the above link and download all documents that may be related to your design.
GaneshRfromSpace 26-Feb-16 5:16am    
Yea thanks. I downloaded them

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900