---
title: "Creating a New Project with W5100S-EVB-PICO Board and Custom Board Creation in Zephyr"
url: "https://maker.wiznet.io/TheoIm/projects/creating-a-new-project-with-w5100s-evb-pico-board-and-custom-board-creation-in-zephyr/"
markdown_url: "https://maker.wiznet.io/TheoIm/projects/creating-a-new-project-with-w5100s-evb-pico-board-and-custom-board-creation-in-zephyr/md"
type: "UCC: User Created Content"
author: "peter bang"
author_url: "https://engschool.tistory.com/137"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "peter bang"
original_url: "https://engschool.tistory.com/137"
published: "2024-08-05"
language: "en"
hardware: ["WIZnet W5100S-EVB-Pico"]
likes: 0
views: 715
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# Creating a New Project with W5100S-EVB-PICO Board and Custom Board Creation in Zephyr

> Creating a New Project with W5100S-EVB-PICO Board and Custom Board Creation in Zephyr

Original author: peter bang (source: https://engschool.tistory.com/137)

## Components

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

## Article

Recently, I embarked on a new project using the W5100S-EVB-PICO board. This article details the process and how to create a custom board in the Zephyr environment.

### Starting the Project

First, I installed Zephyr, Zephyr SDK, and the required Python dependencies. I also added the Zephyr path to the environment variables to complete the installation.

To create a new project, I generated the following folder structure and populated each file with the appropriate content.

```css
/ProjectName
├── CMakeLists.txt
├── prj.conf
└── src
    └── main.c
```

Building the project was done using the `west build` command, and I copied the generated uf2 binary file to the W5100S-EVB-PICO board.

### The Issue with Partial Setup

In the initial setup, I used `rpi-pico` as the board name in the `CMakeLists.txt` file, but W5100S-EVB-PICO is not registered in Zephyr, making it a partial solution. Therefore, we need to create a new custom board in Zephyr.

**Reference Link:** https://docs.zephyrproject.org/latest/hardware/porting/board_porting.html#board-porting-guide

### Zephyr Configuration Structure

The Zephyr configuration is structured as follows:

![](https://maker.wiznet.io/upload/ckeditor5/49855168%5F1722873006%2Epng)

![](https://maker.wiznet.io/upload/ckeditor5/49855168%5F1722873019%2Epng)

### Creating a New Custom Board in Zephyr

The main specifications for the W5100S-EVB-PICO board are as follows:

- **Architecture:** Arm

- **CPU Core:** Arm Cortex M0

- **SoC:** RP2040

To create a new board, I created the `zephyr/boards/arm/w5100s_evb_pico/` folder and prepared the following files.

```plaintext
boards/arm/w5100s_evb_pico
├── board.cmake
├── CMakeLists.txt
├── doc
│   ├── w5100s_evb_pico.png
│   └── index.rst
├── Kconfig.board
├── Kconfig.defconfig
├── w5100s_evb_pico_defconfig
├── w5100s_evb_pico.dts
└── w5100s_evb_pico.yaml
```

The `w5100s_evb_pico.dts` file is particularly important as it defines the hardware components attached to the board. Fortunately, the W5100S-EVB-PICO hardware is almost identical to the rpi_pico, so we can copy and modify the rpi_pico files.

**Reference Link:** Introduction to devicetree — Zephyr Project Documentation

Copy the entire `zephyr/board/arm/rpi_pico` folder and rename it to `w5100s_evb_pico` as follows.

![](https://maker.wiznet.io/upload/ckeditor5/49857577%5F1722927713%2Epng)

Also, change the file names inside the folder to match the board name.

![](https://maker.wiznet.io/upload/ckeditor5/49857577%5F1722927765%2Epng)

You also need to make some changes inside the files. The settings for w5100s will be done later. Change the include file in `w5100s_evb_pico.dts`.

![](https://maker.wiznet.io/upload/ckeditor5/49857577%5F1722927804%2Epng)

### Modifying Configuration Files

**Edit Kconfig.board**

```plaintext
config BOARD_W5100S_EVB_PICO
    bool "WIZnet W5100S EVB PICO Board"
    depends on SOC_RP2040
```

**Edit Kconfig.defconfig**

```plaintext
if BOARD_W5100S_EVB_PICO

config BOARD
    default "w5100s_evb_pico"

config RP2_FLASH_W25Q080
    default y

if I2C_DW

config I2C_DW_CLOCK_SPEED
    default 100

endif #I2C_DW

endif # BOARD_W5100S_EVB_PICO
```

### Modifying Project Files

Next, I went back to the project folder and edited the `CMakeLists.txt` file to change the board name.

```plaintext
cmake_minimum_required(VERSION 3.20.0)
set(BOARD w5100s_evb_pico) # Change from rpi_pico to w5100s_evb_pico

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(myapp)

target_sources(app PRIVATE src/main.c)
```

### Build and Test

```plaintext
west build
```

![](https://maker.wiznet.io/upload/ckeditor5/49855168%5F1722873078%2Epng)

After successfully building the project, I flashed the binary to test its functionality on the board.

This process outlines how to set up the W5100S-EVB-PICO board in Zephyr and create a custom board configuration. This approach can be utilized for various future projects.

---

Source: https://maker.wiznet.io/TheoIm/projects/creating-a-new-project-with-w5100s-evb-pico-board-and-custom-board-creation-in-zephyr/
