Select Page

Bootloader

Aim:
To design a Bootloader which boots the application code and updates the firmware through a serial
communication protocol.
Theory:
Boot loader is a small piece of code that can be programmed at the beginning of flash to act as an
application loader as well as an update mechanism for applications running on a microcontroller.
The boot loader can be built to use either the UART, SSI, I2C, CAN, Ethernet, or USB ports to update
the code on the microcontroller. We can use any communication protocol to communicate
with the bootloader and upload the user application through. UART is used in this project
because it is easy to develop a host desktop application as a flashing utility for this project.
The boot loader is customizable via source code modifications, or simply deciding at compile time
which routines to include.

 

 

 

 

 

 

 

Project Setup:
TIVA board – connected to PC via UART0
Host PC – contains python UART tool running on it

 

 

 

 

 

 

Memory allocation and split up:
Total Flash – 256 kBytes (0x0000_0000 – 0x0004_0000)
Bootloader – 64 kBytes (0x0000_0000 – 0x0001_0000

 

 

 

 

 

 

 

 

 

 

 

Application – 192 kBytes (0x0001_0000 – 0x0004_0000)
Python Tool:
Browse button – to select the binary file
Baud – to specify the baud rate (115200)
Port – to specify the port to which board is connected (COM 3)
Radio buttons (Windows (COM)).

 

 

 

 

 

 

 

 

 

 

 

 

UART communication:
•The UART handling functions are UART_SND() AND UART_RCV().
•The connections required to use the UART port are the following two pins: U0Tx and U0Rx.
•The device communicating with the boot loader is responsible for driving the U0Rx pin on
the Tiva microcontroller, while the Tiva microcontroller drives the U0Tx pin.

While the baud rate is flexible, the UART serial format is fixed at 8 data bits, no parity, and
one stop bit. The baud rate is supported by the device communicating with the boot loader.

When using a fixed baud rate, the frequency of the crystal connected to the microcontroller
must be specified. Otherwise, the boot loader will not be able to configure the UART to
operate at the requested baud rate.

Sending the Application size:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Bootloader flow:
1.This project consists of
I . Boot loader code named Relaible_boot_loader.
II. A sample application code which is intended to send to the processor, named blinky.
III. Python interface code to create an interface for sending the binary application of the
app.
2.Run the python code (Written in version 3.9)
3.An UART interface will be shown.
4.Browse the application .bin file in Browse (.bin file) section.
5.Fill the Baud rate=115200 and enter port (Ex: 3, if it is COM3) as the number from the
hardware configuration settings.
6.Run Reliable_boot_loader project and you can observe the application (.bin file)
information in memory section of the CCS.
Observation:
It is observed that the communication between the UART interface and the CCS tool is
achieved using the codes provided. The problem arose while flashing the application into
the flash memory.
In the future checksum bits can be added to ensure more reliability and also the different
types of hashing algorithms can be used.
Conclusion:
Thus, a Bootloader which boots the application code and updates the firmware through a
serial communication protocol has been designed and implemented.

Demo:https://www.youtube.com/watch?v=Wf5HkL8Tmcw