-
Notifications
You must be signed in to change notification settings - Fork 12
Getting started guide for Windows environment
Zephyr supports command-line development environment on Ubuntu, macOS and Windows. This page will introduce how to get started quickly with command-line on Windows using Realtek's evaluation board. Specifically, it includes:
-
How to set-up the Zephyr command-line development environment on Windows.
-
How to cross-compile and generate the Zephyr binary image.
-
How to download images into Realtek's evaluation board and test if you are running to the Zephyr application.
Since "west flash" command on Realtek Bee Series SoCs is relying on the J-Link, so it is important to setup J-Link correctly. Please refer to J-Link Setup Guide for a step-by-step instruction.
Please follow the steps in Install dependencies. Make sure you have installed all the dependencies:
| Tool | Min. Version |
|---|---|
| CMake | 3.20.5 |
| Python | 3.10 |
| Devicetree compiler | 1.4.6 |
| Ninja | / |
| Gperf | / |
| Git | / |
| wget | / |
| 7zip | / |
Note: You can use the --version flag to verify installation and versions. For example, use python --version to check whether the version meets the requirements.
Most of the steps in the Get Zephyr and install Python dependencies can be referenced and followed except the step "Get the Zephyr source code". Please use the following instructions instead of the steps on "Get the Zephyr source code" in the Zephyr official getting-started guide.
west init -m https://github.com/rtkconnectivity/realtek-zephyr-project zephyrproject
cd zephyrproject
west update
Unlike downloading the entire official Zephyr package, these three steps help you to fetch the Realtek Zephyr Package — which already contains Realtek SoC support—and import the required modules.
The Zephyr Software Development Kit (SDK) contains toolchains for each of Zephyr's supported architectures, which include a compiler, assembler, linker and other programs required to build Zephyr applications. Follow the instructions in Install the Zephyr SDK to install the toolchain.
Note: Make sure that the Zephyr SDK version you have installed is compatible with Zephyr v3.7. For the full list of compatible Zephyr and Zephyr SDK versions, refer to the Zephyr SDK Version Compatibility Matrix.
After installing the dependencies, fetching the Realtek Zephyr package, and setting up the toolchain, try building a Zephyr sample to verify that everything is configured correctly.
-
For board rtl87x2g_evb
west build -b rtl87x2g_evb samples/hello_world -
For board rtl8752h_evb/rtl8752htv
west build -b rtl8752h_evb/rtl8752htv samples/hello_world -
For board rtl8752h_dongle
west build -b rtl8752h_dongle samples/hello_world
Then, the target files zephyr.bin & zephyr.hex will be generated in build/zephyr folder.
Before burning the Zephyr image into flash, you need to burn some essential images released by Realtek to make the SoC work normally.
| Image | Function | RTL87x2G | RTL8752H |
|---|---|---|---|
| System Config | It is used to configure various parameters and settings related to the device, such as the Bluetooth address, the number of links, and other relevant configurations. It is generated by MPTool. | ✔️ | ✔️ |
| OTA Header | It defines Flash Bank layout, which is generated by MPTool. | ✔️ | ✔️ |
| Boot Patch | It ensures the security and integrity of the system startup process through verification and encryption technologies. | ✔️ | ✔️ (named as FSBL, Flash Secure Bootloader) |
| System Patch | The ROM code reserves the Patch function entry point, which allows modifications to the behavior of the ROM code and the expansion of ROM code functionality. | ✔️ | ✔️ |
| BT Stack Patch | It supports features related to the BT Controller stack. | ✔️ | ✔️ |
MPTool developed by Realtek is recommended to download these essential images.
Hardware Connection for MPTool Download and its method, please refer to:
- RTL87X2G (EVB model A)
- RTL8752H EVB
- RTL8752H Dongle (WIP)
Note: You can find the default images in the bin folder of the realtek-zephyr-project repo.
For Zephyr image, we recommend to use "west flash" command. "west flash" is a built-in command in zephyr. To use "west flash", you need to configure J-Link and connect the CPU to J-Link. Please refer to J-Link Setup.
Make sure you have correctly configured J-link and connected CPU with J-Link.
Hardware connection for J-Link downloading, please refer to:
- RTL87X2G (EVB model A)
- RTL8752H EVB
- RTL8752H Dongle (WIP)
Then, you can use the command to flash the Zephyr image to the board:
west flash
To view the log printed by Zephyr, connect a serial host tool to device's UART.
| SoC | Default Log UART | Tx Pin | Rx Pin | Baudrate |
|---|---|---|---|---|
| RTL87X2G | UART2 | P3_2 | P3_3 | 2000000 |
| RTL8752H | UART2 | P3_0 | P3_1 | 2000000 |
Press the reset key, then you will see:
***** Booting Zephyr OS build xxxx *****
Hello World! rtl87x2g_evb
If you see these logs, then congratulations!
- Home
- Getting Started Guide (Windows)
- J-Link Setup Guide
- Hardware Connection & Download Guide:
- Realtek BLE OTA
- Versioning