GMF Application Utilities (gmf_app_utils) is a utility package that provides common convenient APIs for ESP GMF application development. It includes configurations for common peripheral setups such as Wi-Fi, SD card, and AudioCodec initialization, as well as system management functions like performance monitoring interfaces and serial terminal command line interface (CLI).
The gmf_app_utils component also provides configuration options via menuconfig:
-
Configure network parameters (e.g., SSID and Password)
Navigate to:
GMF APP Configuration→Example Connection Configuration→WiFi SSIDandWiFi Password -
Adjust the unit test task priority
Navigate to:
GMF APP Configuration→Unit Test
- Audio codec management
- Configurable I2S modes (Standard, TDM, PDM)
- Separate playback and recording configurations
- I2C interface management
- Storage management
- SD card initialization and mounting
- Connectivity management
- Wi-Fi initialization and connection
- Use
esp_board_managerto select supported board and custom board, see ESP Board Manager
Provides start/stop functionality for system resource monitoring, facilitating runtime performance tracking and resource usage monitoring. To use this feature, you need to enable CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID and CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS in menuconfig.
Provides interactive CLI support where users can customize command prompts and register custom commands. It also registers some common system commands by default for direct user access, including:
- Default loaded system commands
restart: Software resetfree: View current free memory size- Display free size of internal memory and PSRAM
- Show historical minimum free memory records
tasks: Display task running information and CPU usagelog: Set module log level- Usage: log <level 0-5>
- Levels: NONE(0), ERROR(1), WARN(2), INFO(3), DEBUG(4), VERBOSE(5)
io: GPIO pin control- Usage: io <gpio_num> <level 0-1>
- Set output level for specified GPIO pin
Provide common functions for GMF application unit tests
-
Key Features
- Multi-level memory leak detection (warning/critical thresholds)
- Component-specific leak categorization (General/LWIP/NVS)
- Flexible leak checking modes (default/custom/disabled)
- Heap corruption detection and reporting
- Memory pre-allocation for TCP/IP stack
- The Task creation function of unit tests
-
Usage
setUp()andtearDown()are automatically called before/after each test- Call
esp_gmf_app_test_case_uses_tcpip()in tests that require network functionality - Use test annotations like
[leaks]or[leaks=1024]to control leak checking - The main function calls' esp_gmf_app_test_main() 'to create the unit test Task