Bootloader - About and How Too

What is a Bootloader?

Microcontrollers are usually programmed through a programmer unless you have a piece of firmware in your microcontroller that allows installing new firmware without the need of an external programmer. This is called a bootloader. (1)

Some Printer boards do not come with bootloaders installed this prevents you from writing new firmware to the board and will create an error when ever you attempt to write. As more printers switch to 32 bit this will become less and less frequent.

Once a boot loader is written you will not have to write it onto the board again.

The Process

Writing bootloaders is a fairly simple process but requires several tools, an USB IO such as an UNO board or USB IO device the proper jumper configuration from the board to the IO a USB cable from the IO to your computer and Arduino.

  1. Tools > Programmer > Arduino As ISP

  2. Tools > Burn Bootloader

  3. Connect the ICSP to the control board connect the USB to the UNO

  4. In Arduino go to File > Examples > ArduinoISP > ArduinoISP - a new window will open.

  5. Sketch > Upload - Your Printer board will light up during this process lines of code will pass across the scree and Arduino will give you a confirmation saying that it is completed.

  6. Unplug the boards and the board will now be ready to receive the firmware.

Before you can flash a board you need to program your Uno to be a programmer this is done via the Arduino programmer under

For this Example we will use the readily available inexpensive UNO Microcontroller Board and a set of Jumper Wires

 

 

While the board seems complex the only part we need to concern ourselves with is the ICSP pinout.

Depending on your board the ISP will be in a different order so you will need to refer to the exact model to find the correct pinout to use with the jumper cables.

On the example below we see an Ender 3 1.1.4 control board pinout for ISP, by connecting the pins in the correct order to our board we can rewrite the firmware and load the bootloader from these pins. Note that once the bootloader is installed the board will be blank and need firmware before it can function again however this firmware can be programed via USB to the board directly from the computer using Arduino, Cura, or Microsoft Studio Code

The pairing order on this is a straight though

(2)

The Exact color of Jumper cable isn’t important but the order is.

As you can see here, The Reset is plugged into Pin -10 on the side strip from the ICSP on the board to be flashed.

 

 

 

 

 

Sources

(1) - https://www.arduino.cc/en/hacking/bootloader

(2) Image - https://blog.johannfenech.com/upgrading-creality-ender-3-and-ender-5-to-marlin-2-x/

Â