J‐Link Setup Guide - rtkconnectivity/realtek-zephyr-project GitHub Wiki

Since zephyr's original commands (west flash & west debug) are relying on the J-link, so it is important to setup J-link correctly.

J-Link Configuration

First of all, download the J-Link from the link: https://www.segger.com/downloads/jlink. Make sure the version is between 6.18 and 7.50. Version 7.50 is highly recommended.

Second, go to the local J-Link installation directory. Typically, the default installation directory is located at:

  • Window: C:\Program Files (x86)\SEGGER\JLink

  • MacOS: ~/Applications/SEGGER/JLink_VXXX

Then do these two steps:

  1. Copy the Realtek folder to <J-Link installation directory>\Devices
  2. Add the following snippets to the end of <J-Link installation directory>\JLinkDevices.xml, such as:
<DataBase>
  ...
  <!--       Add RTL87X2G      -->
  <Device>
    <ChipInfo Vendor="Realtek" Name="RTL87X2G" Core="JLINK_CORE_CORTEX_M33" WorkRAMAddr="0x00130000"   WorkRAMSize="0x8000" JLinkScriptFile="Devices/Realtek/RTL87X2G/RTL87X2G.JLinkScript" />
    <FlashBankInfo Name="QSPI Flash" BaseAddr="0x04000000" MaxSize="0x100000" Loader="Devices/Realtek/RTL87X2G/RTL87X2G_FLASH.FLM" LoaderType="FLASH_ALGO_TYPE_CMSIS" AlwaysPresent="1" />
  </Device>
  <!--       Add RTL8752H      -->
  <Device> 
    <ChipInfo Vendor="Realtek" Name="RTL8752H" Core="JLINK_CORE_CORTEX_M0"
    WorkRAMAddr="0x200000" WorkRAMSize="0x4000" JLinkScriptFile="Devices/Realtek/RTL8752H/JLinkSettings.JLinkScript"/>
    <FlashBankInfo Name="QSPI Flash" BaseAddr="0x00800000" MaxSize="0x00100000"
    Loader="Devices/Realtek/RTL8752H/RTL8752H_SPI_FLASH.FLM"
    LoaderType="FLASH_ALGO_TYPE_CMSIS" AlwaysPresent="1" />
    <FlashBankInfo Name="QSPI Flash" BaseAddr="0x08000000" MaxSize="0x01000000"
    Loader="Devices/Realtek/RTL8752H/RTL876x_LOG_TRACE_16MB.FLM"
    LoaderType="FLASH_ALGO_TYPE_CMSIS" AlwaysPresent="1" />
  </Device>
</DataBase>

J-Link Connection

The J-Link connection methods for EVB model A and B are shown in the below.

J-Link Connection with EVB model A SWD interface

J-Link Connection with EVB model B SWD interface

⚠️ **GitHub.com Fallback** ⚠️