Have you ever dual-booted a computer? Or have you ever wondered how your computer knows to load your loaded operating system? It is all done with a form of bootloader. Whether it is Linux running on your desktop PC, or "LED blinking" on your Clicker 2, bootloaders are what control how it all begins.
What Are Bootloaders?
Bootloaders hold information for your specific hardware about where to start when you press reset. Ever heard of the GNU GRUB? It stands for Grand Unified Bootloader, and you have probably heard of it if you use a Linux operating system.
When a user turns on their desktop PC and chooses "Ubuntu" as the operating system they'd like to use, it is the same thing as what your bootloader, installed via mikroBootloader on your platform is doing, for example the clicker 2.
Bootloaders on your PC, grab the Ubuntu image from your hard disk ( or whatever operating system chosen ), and loads it into main program memory to be ran. On Windows, unless you are dual-booting, you will not see a boot loader screen, and by default it will choose the only operating system installed on your PC, but rest assured that there is a boot loader in the background loading your operating system.
Upon reset, the bootloader takes over and knows where to look for startup processes and ultimately after about 5 seconds, starts to run the program you uploaded.
How do I use mikroBootloader?
To begin programming with mikroBootloader on a clicker 2 for example, follow these steps:
- Connect your USB cable to the board and turn it on.
- Open mikroBootloader.
- Press the Reset button on your Clicker 2 and within 5 seconds of pressing your reset button, click the Connect button on the mikroBootloader.
- Use the Browse for HEX button to find the .hex file you'd like to upload to your board.
- Click the .hex file to upload, and click Open.
- Click Begin uploading to start uploading the .hex file to your clicker 2.
- When the program is finished uploading, you will receive a window saying Success. Click OK.
- Press the Reset button on your Clicker 2 and after 5 seconds, your program will start running.
What if I erased my mikroBootloader?
All of our clicker 2 development boards have a hardware specific bootloader already pre-installed on them so that you can use mikroBootloader right away.
A good note to take, is to not program a clicker 2 with an external programmer, because it will overwrite the previously installed bootloader. If you do decide to program your clicker 2 with an external programmer and want to use the mikroBootloader afterwards, you will then need to use the JTAG connection on all of our clicker 2 boards, and program the bootloader back onto your board. We provide a great programmer for every platform that will make this very easy.
Every platform has its' own MCU-specific mikroProg for programming through the JTAG connection on the clicker 2.
Before you can program your bootloader back onto your board you will need the bootloader right? Head over to mikroe.com and scroll over "Starter Boards" at the top, then "clicker, and choose which clicker you're using (links are also at the bottom of this page).
Download your user manual for your clicker near the bottom of your clicker 2 webpage.
Scroll down through your clicker 2 manual until you see a page titled something like, "Programming with mikroBootloader" and click the download for your board-specific bootloader.
Note: Links to all clicker 2 bootloader firmware can be found in the References section at the bottom of this page.
Once you have a bootloader for your board, you can load that project into your compiler. Using a mikroProg for your board, you can now install your bootloader onto your clicker 2 and begin using mikroBootloader again.
Summary
Use this tutorial to make uploading code to your clicker 2 easier, even if you erase the previously uploaded bootloader. Code is provided for re-uploading bootloaders to any click, as well as another step-by-step tutorial on how to use your clicker 2 on our website.
If your project has some requirements that the default mikroBootloader software and firmware suite can’t fulfil, perhaps we can customize it for you. Whether you want us to simply change the branding of the GUI on the PC utility, or have something more substantial in mind, get in touch and we will help you out. Head over to our bootloader page for more info.
References
mikroBootloader mikroBootloader Software
STM Bootloader Firmware
PIC18 Bootloader Firmware
PIC18FK Bootloader Firmware
PIC32 Bootloader Firmware
FT90X Bootloader Firmware
Kinetis Bootloader Firmware
CEC1302 Bootloader Firmware
STM32, Kinetis, CEC MikroProg Suite
AVR MikroProg Suite
FT90X MikroProg Suite