Quick Start

This document aims to guide users in quickly configuring RTL8752H development environment, including compiling SDK, downloading firmware, upgrading firmware, and capturing logs. Users can download the prebuilt files from the SDK to ensure the EVB is functioning properly and is compatible with the development environment while having the required functionalities.

Overview

The RTL8752H SDK supports both Windows and Linux systems. Users can compile projects in the SDK using Keil/GCC, download files into the EVB using MP Tool. After the downloading process is complete, users can use Debug Analyzer to capture logs from the SoC. For details on the hardware wiring and corresponding PC software architecture, please refer to EVB Working Diagram.

../../_images/EVBWorkingDiagram.png

EVB Working Diagram

Required EVB

The EVB provides users with a hardware environment for development and application debugging. It consists of a motherboard and a daughterboard. Additionally, users need to prepare one USB data cable to connect the EVB and the PC. Please refer to the EVB interface distribution diagram for peripheral interface wiring information. For more information, please refer to Evaluation Board Guide. To purchase EVB, please refer to Shopping Guide.

../../_images/HardwareEnvironment.png

Hardware Environment

Required Files

The regular operation of the EVB requires downloading multiple files, including both base files and application files.

  • Base Files: Including the necessary firmware and configuration settings for RTL8752H.

  • Application Files: Including the specific code and functionality implementation for the target project.

The following files are required for the normal operation of the RTL8752H. For a description of the files, please refer to Compilation and Download section.

RTL8752H Default Downloading Files

Files

Provided by Realtek

File Type

File Download Option

System Config File

X (Generated by MP Tool)

Base File

Bank0 OTA Header File

X (Generated by MP Tool)

Base File

Bank0 ROM Patch Image

Base File

Bank0 BT Stack Patch Image

Base File

Bank0 Secure Boot Loader Image

Base File

Bank0 Upperstack Image

Base File

Bank0 APP Image

X (Generated by Project compilation)

Application File

Tools

During the development based on RTL8752H SDK, users need to utilize Realtek’s Development Toolkit and ARM/GCC Development Suite.

Required Tools

Tools

URL

Tool Version

OS

ARM KeilMDK

ARM Link

uVision: V5.26

ARMCC: V5.06 update 6(build 750)

Win10

GNU Toolchain

GNU Toolchain Link

13.2.Rel1(or later)

Windows/Linux

MinGW

MinGW Link

V3.82.90(or later)

Windows

MP Tool

RTL8752H-SDK-Vx.x.x\tool\BeeMPTool_vx.x.x.x\BeeMPTool\MPTool.exe

Win10

MPCLI Tool

RTL8752H-SDK-Vx.x.x\\tool\\MPCLI

Windows/Linux/MAC OS

MP Pack Tool

RTL8752H-SDK-Vx.x.x\\tool\\BeeMPTool_vx.x.x.x\\BeeMPTool\\tools\\MPPackTool.exe

Win10

PACKCLI Tool

RTL8752H-SDK-Vx.x.x\\tool\\PACKCLI

Windows/Linux/MAC OS

Debug Analyzer

RTL8752H-SDK-Vx.x.x\\tool\\DebugAnalyzer-vx.x.x.x\\DebugAnalyzer.exe

Win10

Note

  • The installation packages under the path are all in .zip format, and users need to extract them manually.

  • The MPCLI Tool is the cross-platform version of the MP Tool, and PACKCLI is the cross-platform version of the MP Pack Tool. If users are not developing on a Windows system, can use the cross-platform versions of these tools.

ARM Keil MDK

Users can compile all the applications projects in the SDK using the Keil Microcontroller Development Kit (MDK). For more information, please refer to Keil MDK section.

GNU Toolchain

Users can compile applications in the SDK using the GNU Toolchain. Before development, please install gcc-arm-none-eabi. For more information, please refer to GCC section.

MinGW

Users can use MinGW to parse the Makefile.

MP Tool/MPCLI Tool

Users can download files using MP Tool/MPCLI Tool, with MPCLI Tool being the cross-platform version of MP Tool. MP Tool has two downloading modes: MP mode and Debug mode. MP mode is suitable for mass production. This document primarily focuses on the Debug mode, which is intended for users in the early stages of software development. For more information, please refer to RTL87x2x MP Tool User Guide.

MP Pack Tool/PACKCLI Tool

Users can package files using MP Pack Tool, which is suitable for OTA (Over The Air) updates and production downloading. PACKCLI Tool is the cross-platform version of the MP PACK Tool For more information, please refer to RTL87x2x Pack Tool User Guide.

Debug Analyzer

Users can capture SoC Logs using Debug Analyzer. For more information, please refer to Debug Analyzer User Guide.

Bring Up EVB

To ensure that the EVB can be used normally, users can perform a downloading test follow the steps below:

  1. Prepare an EVB and ensure the EVB interface is wired correctly. Set the EVB into Download Mode and then power on the EVB.

  2. Double-click to run MPTool.exe, for specific operation steps and file paths refer to MP Tool Download.

    1. Click .. at the Load Layout to load the flash_map.ini file.

    2. Click Browse to load all the downloading files.

    3. Click Detect to identify the COM port of the EVB.

    4. Click Open to open the COM port.

    5. Check Erase All for Download, click Download to start the downloading process. The progress bar shows the current downloading progress.

    6. The progress bar shows OK when the files are successfully downloaded.

  3. After the files are downloaded completely, set the EVB into Normal Mode.

  4. Observe the behavior of the EVB, it can be verified through the Mobile App, or check whether the SoC Logs meet the expectations.

    ../../_images/MPToolBurningInterface.png

    MP Tool Downloading Interface

Note

  • Please store the SDK, tools, and other related materials in a path that does not contain any spaces or chinese characters.

  • If Erase All for Download is checked, the flash memory will be completely erased before writing. If this option is not checked, only the area of files that are being downloaded will be erased from the flash.

Hardware Development Environment

The EVB provides a hardware environment for user development and application debugging. It consists of a motherboard and a daughterboard. The EVB has Download Mode and Normal Mode, and users need to use different wiring methods to set the required mode.

RTL8752H EVB Interfaces and Modules

../../_images/EVBInterfaceDistribution.png

EVB Interface Distribution

../../_images/EVBModulesDistribution.png

EVB Modules Distribution

Power Supply

The USB port of the CON1 need to be connected to a computer to power the EVB.

../../_images/EVBPowerSupply.png

EVB Power Supply

SWD Wiring

RTL8752H-SWD Interface

RTL8752H

SWD

GND

GND

SWDIO

SWIO

SWDCLK

SWCK

VDDIO

Vterf/3.3V

../../_images/SWDWiring.png

SWD Wiring

UART

../../_images/UARTInterface.png

UART Interface

Reset

../../_images/ResetKey.png

Reset Key

LOG Pin Wiring

Use a jumper cap to connect the RX and LOG Pin. Once the connection is complete, check the Log output by referring to Log Verification.

../../_images/LogWiring.png

LOG Wiring

Download Mode

  1. Before powering on the EVB, users need to ground the LOG Pin(P0_3).

    ../../_images/GroundingLogPinMethod1.png

    Grounding LOG Pin Method

  2. After entering the Download Mode, please refer to MP Tool Download for instructions on how to download the program.

    Note

    • After the program downloading is completed, the EVB enters Normal Mode by disconnecting the wire between LOG and GND.

    • Upon power-up, the chip reads the logic level signal from the LOG Pin. If the level is low, it enters Download Mode bypassing Flash. Otherwise, it enters Normal Mode running the application layer program.

Normal Mode

To ensure normal operation of the EVB, make sure to disconnect the LOG and GND connection.

../../_images/NormalMode.png

Normal Mode

Compilation and Download

The following is RTL8752H Default Downloading Files Instructions.

RTL8752H Default Downloading Files instructions

No.

File

Instruction

1

System Config File

This file 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.

For more information about parameter settings, please refer to RTL87x2x MP Tool User Guide.

2

Bank0 OTA Header File

This file defines the layout of the Flash Bank.

3

Bank0 ROM Patch Image

The ROM code reserves the Patch function entry point, which allows modifications to the behavior of the non-secure ROM code and the expansion of ROM code functionality.

4

Bank0 BT Stack Patch Image

This file supports features related to the BT Controller stack.

5

Bank0 Secure Boot Loader Image

Optimize the Boot flow. The Secure Boot Loader Image must be downloaded regardless of whether the Bank switch is enabled in the OTA method.

6

Bank0 Upperstack Image

This file implements the BLE Upper stack.

7

Bank0 APP Image

This file is compiled from Keil/GCC project and processed using tools like fromelf.

Note

  • ROM Patch Image, BT Stack Patch Image, Secure Boot Loader Image, Upperstack Image are provided by Realtek.

  • Users can download the above information through Anchor which is a release system from Realtek, if there is no Anchor account, please apply for registration from the agent/PM/FAE. Alternatively, users can also download these files directly from the RealMCU.

Generating Flash Map

Using MP Tool, click on Flash Map Tool, and the interface will transition to Flash Map Generate Tool. Click on Confirm to generate flash_map.ini. During the synchronization, a flash_map.h file will also be generated.

If do not have any parameters to modify, users can skip this section and directly load the default downloading files from the SDK.

../../_images/flash_map.ini.png

flash_map.ini

Note

  • Before downloading the files, users need to load the flash_map.ini file, which represents the allocation of addresses for each file in the flash. Users can generate the flash_map.ini file by clicking on Flash Map Tool on the MP Tool interface.

  • In the Flash Map Generate Tool interface, click on the dropdown option Flash Size to select the appropriate flash size according to the flash actually used in the device.

  • Users can modify the Flash Layout according to their specific requirements. Click Layout Init and adjust the sizes of each region. After confirming the changes, click Confirm. For more information, please refer to Memory.

  • Based on the different Flash layout arrangements, there are two types of OTA schemes: Disable Support OTA Switch and Enable Support OTA Switch. Users can click Disable or Enable to make a selection based on actual situation. The default selection is Disable. For more detailed information, please refer to the OTA document.

../../_images/FlashMapGenerate.png

Flash Map Generate Tool

Note

  • If the Flash Layout has been modified, please copy the newly generated flash_map.h file to the indicated path to generate the correct load address for Bank0 APP Image. For more detailed information, please refer to Memory.

  • The indicated path is the default SDK flash_map.h path, applicable to most sample projects. If the APP project uses flash_map.h in a different path, the corresponding file under that path needs to be updated.

../../_images/flash_map.png

flash_map.h

Generating OTA Header

Using MP Tool, click Flash Map Tool, the interface will navigate to Flash Map Generate Tool, click Confirm to generate flash map.ini file. Synchronously, the OTA Header File will be generated.

If do not have any parameters to modify, users can skip this section and directly load the default downloading files from the SDK.

../../_images/OTAHeader.png

OTA Header File

Note

If the Flash Layout has been modified, the OTA Header File will also be updated accordingly. Please ensure the consistency between flash map.ini file and the OTA Header File.

Generating System Config File

Using MP Tool, click Config Set to open Config Setting interface, adjust the relevant parameters, and then click Confirm to generate the System Config File and load it into the corresponding area. For first-time developers, it is recommended to keep the default configuration in the Config Setting interface. For more parameter settings, please refer to RTL87x2x MP Tool User Guide.

If do not have any parameters to modify, users can skip this section and directly load the default downloading files from the SDK.

../../_images/SystemConfigFile.png

System Config File

Note

If the Flash Layout has been modified, the System Config File needs to be regenerated.

Generating App Image

All applications in the SDK can be compiled and used through the Keil Microcontroller Development Kit (MDK)/ GCC. Before starting software development, it is necessary to first install the Keil or GCC compilation environment. To facilitate the quick establishment of a development project, users can copy or directly open an existing sample project and add functional code based on it.

Keil MDK

Keil MDK is the complete software development environment for a range of Arm Cortex-M based microcontroller devices. MDK includes the µVision IDE and debugger, Arm C/C++ compiler, and essential middleware components.

All applications in the SDK can be compiled and developed using the Keil Microcontroller Development Kit(MDK). Therefore, before starting software development, users need to obtain and install Keil. For more information about Keil, please visit www.keil.com.

The toolchain version information used by Realtek is as follows. To avoid compatibility issues between ROM executables and applications, it is recommended to use uVision V5.26 or a later version. Configure the default compiler to 5.06 update 6(build 750).

../../_images/KeilVersionInformation.png

Keil Version Information

../../_images/KeilCompilerVersionConfiguration.png

Keil Compiler Version Configuration

Taking ble_peripheral project as an example. After successful compilation, a bin file with MD5 verification will be generated in the bin folder of the project along with a corresponding .trace file. The .trace file is used for parsing logs from the SoC.

../../_images/Compileble_peripheralProject.png

Compile ble_peripheral Project

../../_images/ProjectCompileGenerateFiles.png

Project Compile Generate Files

Note

MP Tool uses MD5 as the checksum value for the downloading file and requires adding the MD5 value to the suffix of the file name to be downloaded. Therefore, the download file is an APP Image with the prefix “MP”.

GCC

To compile a GCC project, it is necessary to properly configure the environment variables for the GNU Toolchain and MinGW Toolchain. For example,using the D drive as the installation root path, add the following paths to the environment variables.

D:\GCC\MinGW\bin;
D:\GCC\MinGW\include;
D:\GCC\MinGW\lib;
D:\GCC\gcc-arm-none-eabi-10-2020-q4-major-win32\gcc-arm-none-eabi-10-2020-q4-major\bin;

Taking ble_peripheral as an example, run the cmd command in this directory and enter the command mingw32-make. After successful compilation, a bin file with MD5 verification will be generated in the bin folder of the project.

../../_images/GCCProjectCompilation.png

GCC Project Compilation

../../_images/GCCAPPImagePath.png

GCC APP Image Path

Images Download

MP Tool Download

Set the EVB to Download Mode and use MP Tool to download the files onto the device, the tool version must be at least V1.1.0.x.

  1. Double-click to run MPTool.exe.

    ../../_images/MPTool.exe.png

    MPTool.exe

  2. [IC Type]: RTL8752H.

    ../../_images/MPToolICTypeSelection.png

    MP Tool IC Type Selection

  3. [Type]: Debug.

    ../../_images/MPToolModeSelection.png

    MP Tool Mode Selection

  4. Click on .. button in the Load Layout of the MP Tool downloading interface to load the flash_map.ini file.

  5. Click Browse, loading all files. The following table lists the file types and loading paths.

    1. Bank0 APP Image: It is recommended to load APP Image from the default files.

    2. After powering on the device, it can be verified through the Mobile App to help test whether the firmware on the device is running correctly.

    RTL8752H Downloading Files & Paths

    File Type

    File Name

    File Path

    System Config File

    configFile_xxx.bin

    RTL8752H-SDK-Vx.x.x\\bin\\default_bin\\disable_bank_switch

    Bank0 OTA Header File

    OTAHeader_Bank0_xxx.bin

    RTL8752H-SDK-Vx.x.x\\bin\\default_bin\\disable_bank_switch\\bank0

    Bank0 ROM Patch Image

    BANK0_Patch_MP_release_xxx.bin

    RTL8752H-SDK-Vx.x.x\\bin\\default_bin\\disable_bank_switch\\bank0

    Bank0 BT Stack Patch Image

    bt_stack_patch_MP_master_xxx.bin

    RTL8752H-SDK-Vx.x.x\\bin\\default_bin\\disable_bank_switch\\bank0

    Bank0 Secure Boot Loader Image

    fsbl_MP_master_xxx.bin

    RTL8752H-SDK-Vx.x.x\\bin\\default_bin\\disable_bank_switch\\bank0

    Bank0 Upperstack Image

    upperstack_MP_xxx.bin

    RTL8752H-SDK-Vx.x.x\\bin\\default_bin\\disable_bank_switch\\bank0

    Bank0 APP Image

    app_MP_sdk_xxx.bin

    RTL8752H-SDK-Vx.x.x\\bin\\default_bin\\disable_bank_switch\\bank0\\ble_peripheral

  6. Click Detect, the interface will display the detected COM port of the device.

  7. Click Open, if the COM port can be opened successfully, the progress bar on the right side will display OK, otherwise, it will display Fail.

    If Fail, user can refer to common errors and troubleshoot them one by one. After checking that everything is correct, user can repeat the steps, click on Detect ‣ Open again.

    Common errors are as follows

    • Check whether the Tx/Rx pins of the serial port are connected incorrectly.

    • Check that the LOG Pin (P0_3) of the device is grounded before powering on.

    • Check whether the serial port converter board supports 1M baud rate.

    • Check whether the COM port is occupied.

  8. After the serial port is successfully opened, Click Download, the progress bar on the right of the COM port displays the current program download progress.

    1. After the download is completed, it will display OK.

    2. If Fail is displayed, please press the Reset button on the EVB or power cycle the EVB, and then repeat the above steps.

    Note

    • MP Tool supports two downloading modes:

      • MP Mode: Used for production line manufacturing.

      • Debug Mode: Used by developers for debugging and development purposes.

    • MP Tool can download single or multiple files. If user wants to download only a single file, such as the Bank0 APP Image, do not click Erase All for Download option in the MP Tool interface.

Example Verification

Mobile App Verification

Taking the ble_peripheral project as an example, ensure that the EVB interface wiring is correct and set the EVB into Download Mode. Load the default files from the SDK and complete the downloading process ,and then set the EVB into Normal Mode.

Users can use a Bluetooth APP on a smartphone to search for BLE advertisements, the default advertisement name is BLE_PERIPHERAL. Click on Connect and once the smartphone is successfully connected to the device, it will display the Services of the remote device on the phone.

../../_images/BLEAdvertising.png

BLE Advertising

../../_images/ConnectionSuccess.png

Connection Success

Log Verification

Users can use Debug Analyzer to capture the SoC Log to check whether the program is running correctly. Please complete the LOG Wiring correctly.

../../_images/DebugAnalyzer.exe.png

DebugAnalyzer.exe

Double-click to run DebugAnalyzer.exe, click Setting, Baud rate is set to 2M by default, and load the corresponding .trace file in the App Trace File. Click Confirm to confirm the Settings.

../../_images/DebugAnalyzerParameterSetting.png

Debug Analyzer Parameter Setting

Select the correct Serial Port, click on Start, and Debug Analyzer will start working. It will save the captured Raw Data in a .bin file, and based on the users’ settings of the .trace file, it will parse the raw data into plain text logs and save them in a .log file.

Taking the ble_peripheral project as an example. After powering on the EVB board, if see a Log message of GAP adv start, it means that the device has started advertising. Clicking on Connect in the Bluetooth app interface on the phone, if the user see a Log message of GAP adv stoped:because connection created, it means that the phone has successfully connected to the device.

../../_images/ADV.png

ADV Start

../../_images/ConnectionCreate.png

Connection Create

../../_images/LogDataFile.png

Log Data File

Note

  • Default save path: the DataFile folder in the same directory as DebugAnalyzer.exe.

  • The .trace file is used to parse the binary log stream received via the serial port. A new .trace file is generated each time the project is compiled. It is important to ensure that the .trace file matches the code currently running on the SoC.

  • If users encounter any issues during the development process, please provide the .log .bin .cfa files under the DataFile folder, as well as the corresponding .trace file. This will help Realtek analyze and locate the issue more effectively.