CN / EN
Doc Feedback
Thanks for your interest, welcome to contact us.
Thanks for your feedback

Prepare ble_app_example

Open SDK_Folder\projects\ble\ble_peripheral\, copy ble_app_template to the current directory, and rename it as ble_app_example. Rename the base name of .uvoptx and .uvprojx files in ble_app_example\Keil_5 as ble_app_example.

Figure 14 ble_app_example folder

Double-click ble_app_example.uvprojx to open the project example in Keil. Click , and select Output in Options for Target ‘GR551x_SK’; enter ble_app_example in Name of Executable.

Figure 15 Modifications to Name of Executable

All groups of the ble_app_example project are available in the Project pane of Keil.

Figure 16 Project ble_app_example

Groups of the ble_app_example project are mainly in two categories: SDK groups and User groups.

  • SDK groups

    The SDK groups include gr_startup, gr_arch, gr_stack_lib, gr_drivers, gr_app_drivers, gr_libraries, gr_profiles, and external.

    Figure 17 SDK groups

    Source files in the SDK groups are not required to be modified. Group descriptions are provided below:

    Table 7 SDK groups
    SDK Group Name Description

    gr_startup

    It contains the system boot file.

    gr_arch

    It contains initialization configuration files and system interrupt implementation files for System Core and PMU.

    gr_stack_lib

    It contains the GR551x SDK .lib file.

    gr_drivers It contains drive source files of SoC peripherals. You can add hardware drives on demand.

    gr_app_drivers

    It contains driver API source files, which are easy to use for application developers. You can add related application drivers on demand.

    gr_libraries

    It contains open source files of common assistant software modules and peripheral drivers provided by in the SDK.

    gr_profiles

    It contains source files of GATT Services/Service Clients. You can add necessary GATT source files for projects.

    external

    It contains source files for third-party programs, such as FreeRTOS and SEGGER RTT. You can add third-party programs on demand.

  • User groups

    User groups include user_callback, user_platform, and user_app.

    Figure 18 User groups

    Functions for source files in User groups need to be implemented by developers. Group descriptions are provided below:

    Table 8 User groups
    User Group Name Description

    user_callback

    It contains BLE Stack callback functions, which are implemented in applications. For more information about callbacks, see Table 10.

    user_platform

    It implements software and hardware resource setting and application initialization; you need to execute corresponding APIs on demand.

    user_app

    It contains main() function entries, and other source files created by developers, which are used to configure runtime parameters of BLE Stack and execute event handlers of GATT Services/Service Clients.

Scan to follow

Open WeChat, use "Scan" to follow.