---
title: "[W5100S] Complete the bootloader using W5100S"
url: "https://maker.wiznet.io/louis_m/projects/%5Bw5100s%5D-complete-the-bootloader-using-w5100s/"
markdown_url: "https://maker.wiznet.io/louis_m/projects/%5Bw5100s%5D-complete-the-bootloader-using-w5100s/md"
type: "UCC: User Created Content"
author: "아이구"
author_url: "https://cafe.naver.com/yssoperatingsystem/565?art=ZXh0ZXJuYWwtc2VydmljZS1uYXZlci1zZWFyY2gtY2FmZS1wcg"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "아이구"
original_url: "https://cafe.naver.com/yssoperatingsystem/565?art=ZXh0ZXJuYWwtc2VydmljZS1uYXZlci1zZWFyY2gtY2FmZS1wcg"
published: "2022-08-30"
language: "en"
hardware: ["WIZnet W5100S-EVB"]
likes: 3
views: 1088
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# [W5100S] Complete the bootloader using W5100S

> [W5100S] Complete the bootloader using W5100S

Original author: 아이구 (source: https://cafe.naver.com/yssoperatingsystem/565?art=ZXh0ZXJuYWwtc2VydmljZS1uYXZlci1zZWFyY2gtY2FmZS1wcg)

## Components

- **WIZnet W5100S-EVB** x 1 ([docs](https://docs.wiznet.io/Product/iEthernet/W5100S/w5100s-evb))

## Article

The current flash memory configuration is as follows.

​

Bootloader

The boot loader area is set at 64 kB, but the final binary capacity is 20.8 kB.

void callback_linkup(bool linkup)
{
gMutex.lock();
clear();
gMutex.unlock();

Led::setRgb(0, 0, 0);

if(linkup) // run when the network is connected
{
gFq.lock();
gFq.stop();
gFq.clear();
gFq.add(task::program::connectingToServer);
gFq.add(task::program::checkFirmwareFromServer);
gFq.add(task::program::programNewFirmware);
gFq.add(task::program::finish);
gFq.start();
gFq.unlock();
}
else // Run when network is disconnected
{
gFq.lock();
gFq.stop();
gFq.clear();
gFq.unlock();
}
}
The above callback_linkup function is called when the network is connected or disconnected. Items registered in the gFq.add() function are performed as follows.

While the > connectingToServer() function is performed, the red LED flashes and attempts to connect to the server.

> While the checkFirmwareFromServer() function is performed, the yellow LED flashes and checks that the server has ready firmware.

> Download the firmware with a flashing green LED while the programNewFirmware() function is being performed.

Wait for the blue LED to flash and power off while the > finish() function is performed.

---

Source: https://maker.wiznet.io/louis_m/projects/%5Bw5100s%5D-complete-the-bootloader-using-w5100s/
