Chapter 2 Introduction

SDK Overview

Figure 2.1: SDK Overview

INGCHIPS software development kit has following major components (see Figure 2.1):

  1. Core Tools

    Provide project wizard, flash loader and other functionalities. These tools make BLE development easy and seamless.

  2. Language & IDE Integration

    Support Keil μVision[], IAR Embedded Workbench[], Rowley Crossworks for ARM[], and SEGGER Embedded Studio for ARM[]. All IDE/Toolchain settings are configured by core tools properly and automatically. GNU Arm Embedded Toolchain1 is also supported.

    Nim2 is also supported as an alternative of C.

    Optionally, new projects can be configured properly to use Visual Studio Code3 as code editor. For Nim and GNU Arm Embedded Toolchain, building and downloading tasks are created and can be invoked in Visual Studio Code.

  3. Platform Bundles

    Provide different bundles for different application scenarios (such as typical, and extension). Each bundle contains full stack & (optional) FreeRTOS binary, and C header files. Source codes for accessing peripherals are also provided.

  4. Examples

    Provide a rich set of BLE device examples and corresponding Android and iOS referencing applications.

  5. Documentation

    User guide (this document), API reference, and application notes are also provided.

2.1 Scope

This document covers platform overall architecture, core tools and platform APIs.

2.2 Architecture

There are two variants of bundles, one with built-in FreeRTOS (RTOS Bundles), and one without built-in RTOS (“NoOS” Bundles).

2.2.1 RTOS Bundles

ING918xx/ING9186xx software architecture is shown in Figure 2.2. Bootloader is stored in ROM and can’t be modified, while platform and app executable are stored in flash. Platform executable is provided for each bundle. BLE stack, FreeRTOS and some SoC functionality are compiled into this single platform executable. When system starts up, platform executable initializes, then loads the primary app executable.


Figure 2.2: Architecture

A secondary app can only be asked to execute programmaticly. It is possible to download several secondary apps, and to switch between them programmaticly. After reset, platform will load the primary app executable as usual. Entry address of the primary app is managed by SDK tools, while entry addresses of secondary apps can be configured manually. Apps built with C

App executable’s main function is named app_main, where app gets initialized:

int app_main(void)
    return 0;

app_main should always return 0.

Platform, BLE stack and FreeRTOS APIs are all declared in corresponding C header files. To use these APIs, just include the necessary header files. Apps built with Nim

App executable’s main function is named appMain, where app gets initialized:

proc appMain*(): int {.exportc noconv.} =
  return 0;

appMain should always return 0.

Thanks to the separation of platform and app, size of the app executable is significantly reduced. There are several benefits of this, not limited to:

  • Smaller & cleaner app code base

  • Faster downloading & FOTA

  • Focus on function development

Flash tools are available for all supported IDEs and installed when installing SDK. App debugging is also quite easy: download platform binary with flash downloader (Section 4.2), then download & debug apps in IDE as usual.

2.2.2 “NoOS” Bundles

When developers want to use other RTOS, or use features that are missing in those RTOS bundles, developers can choose the “NoOS” bundles.

A generic RTOS interface is defined, and developers should provide an implementation of this interface to platform binaries through the returning value of app_main:

uintptr_t app_main(void)
    return (uintptr_t)os_impl_get_driver();

2.3 Abbreviations & Terminology

Table 2.1: Abbreviations
Abbreviation Notes
ATT Attribute Protocol
BLE Bluetooth Low Energy
FOTA Firmware Over-The-Air
IRQ Interrupt Request
GAP Generic Access Profile
GATT Generic Attribute Profile
RAM Random Access Memory
ROM Read Only Memory
SDK Software Development Kit
Table 2.2: Terminology
Terminology Notes
Flash Memory An electronic non-volatile computer storage medium
FreeRTOS A real-time operating system kernel

2.4 References

  1. Host API Reference

  2. Bluetooth SIG4

  3. FreeRTOS5

  4. Mastering the FreeRTOS™ Real Time Kernel6