SDK Introduction
Overview
The SDK consists of the following three parts:
SDK
├── component Components such as FreeRTOS, SoC, mbed API, Wi-Fi, network, etc.
├── tools Tools
└── cmake Compilation abstraction layer
component
This directory contains the core functional components of the SDK, which are called by upper-layer applications. Common components are listed in the following table:
Item |
Description |
|---|---|
at_cmd |
AT command support module |
audio |
Audio codec driver, supports: alc5616/alc5640/alc5651/alc5660/alc5679/alc5680/sgtl5000 |
bluetooth |
Bluetooth protocol stack source code and related library files |
example |
application examples, including:atcmd_host,network,ota,usb,peripherals, etc. |
file_system |
File system implementation, includes: fatfs, littlefs, ftl, kv, vfs, etc. |
lwip |
LWIP protocol stack APIs and source code |
network |
Network protocol support, includes:
|
os |
FreeRTOS real-time operating system source code and OS APIs wrapper layer implementation |
soc |
SoC-related core modules, includes:
|
ssl |
Secure communication protocol stack, implemented based on mbed TLS |
usb |
USB class drivers and verification code |
utils |
Utility modules, includes:
|
wifi |
Wi-Fi functional module, provides the following interfaces:
|
Under the soc directory, each SoC has a main subdirectory, which serves as the main program entry point for that SoC. As an SoC may contain multiple MCUs, each MCU is assigned its own independent subdirectory.
component/soc/xxx/main
├── {mcu1}/ Private main program directory for each MCU
└── {mcu2}/ Private main program directory for each MCU
├── inc/ Header files (e.g., ``FreeRTOSConfig.h``, ``build_info.h``)
└── src/ Main program source code
Under the soc directory, each SoC has a project subdirectory, including Kconfig, CMake and layout files, which serves as the compilation entry point for that SoC. For each MCU within the SoC, there is a corresponding project_xx subdirectory containing linker scripts, as well as CMake configuration files for building the Bootloader and Application Image.
component/soc/xxx/project
├── project_{mcu1}/ Private configuration directory for each MCU
└── project_{mcu2}/ Private configuration directory for each MCU; there will be multiple directories if the SoC contains multiple MCUs
├── ld/ Linker scripts
├── lib/ Library files
└── make/ CMake scripts used for compiling images
tools
This directory contains tools required during IC development.
Item |
Description |
|---|---|
TraceTool |
Used for printing logs and sending commands Trace Tool |
ImageTool |
Used for downloading firmware Image Tool |
DownloadServer |
Socket-based OTA server program |
DownloadServer (HTTP) |
HTTP-based OTA server program |
iperf |
Used for Wi-Fi throughput testing |
littlefs |
Generates the littlefs file system |
meta_tools |
VS Code extension SDK-side adaptation toolset |
Critical Header Files
The following table lists some key header files in the SDK and their descriptions:
Item |
Description |
Location |
|---|---|---|
basic_types.h |
|
component/soc/ |
section_config.h |
Definitions of various sections in the linker script:
|
|
ameba_soc.h |
Provides Raw APIs for low-level drivers (recommended to use) Compared to mbed APIs, Raw APIs offer more flexible, rich, and efficient hardware configuration interfaces |
|
mbed API headers |
High-level encapsulation interfaces based on Raw APIs, providing relatively simplified functionality |
component/soc/ |