# Setting Up the Bootloader and Loading a Firmware Image Using UART

If you are running a FOTA update for the first time, your RSL EVB does not have the bootloader flashed into it. Set up the bootloader using these steps:

1. Import the bootloader sample application, available in the Examples tab.
2. Build the bootloader sample application and flash bootloader.hex.
3. Connect the GPIO defined as the UPDATE_GPIO in the bootloader sample application to the ground and reset your board. After reset, your RSL EVB has activated its updater mode. In this mode, the bootloader is waiting for commands over UART to download a new user application firmware image.
4. Use the Windows Device Manager to find out the COM port number assigned to your RSL EVB, identified by the J-Link CDC UART Port (COM3, as seen in the "RSL EVB Com Port Number" figure):

Figure: RSL EVB Com Port Number

1. Using a command prompt, navigate to the bootloader/utility folder. You can see the updater.py tool together with additional .dll dependencies.
2. Invoke the updater.py tool to load the ble_peripheral_server_fota.fota image over UART with the following command:

> python updater.py COM3 ble_peripheral_server_fota.fota

Image : BPS ver=1.0.0 / FOTA ver=1.0.0

Bootloader : BOOTL* ver=1.0.0

*********************************************************************************************************************

You can expect similar output. For each flash sector transferred and written to the flash memory, an asterisk (*) symbol is printed on the screen.

If you find errors executing this step, make sure you have the required versions of Python and the pyserial package.

1. An LED on the EVB that is attached to one of the device’s GPIOs begins to blink.

Your device is now ready to perform a FOTA update, as it contains all the required components: the bootloader program and the FOTA Bluetooth Low Energy stack.