World-class ESP32-C6 NVS storage implementation with ESP-IDF v5.5+ features.
This header provides a production-ready NVS implementation for microcontrollers with built-in non-volatile storage capabilities. On ESP32-C6, this leverages the modern ESP-IDF v5.5+ NVS API with comprehensive security features, encryption support, performance optimizations, and robust error handling.
Key Features:
- Modern ESP-IDF v5.5+ NVS API with handle-based operations
- ESP32-C6 HMAC-based encryption support for secure storage
- Comprehensive error handling and mapping to HardFOC error codes
- Advanced NVS features: statistics, validation, performance monitoring
- Thread-safe operations with optional mutex protection
- Namespace isolation and management
- Key-value storage with multiple data type support
- Atomic operations and consistency guarantees
Security Features:
- HMAC-based encryption scheme (ESP32-C6 specific)
- XTS encryption for data protection
- Secure key generation and eFuse-based key storage
- Flash encryption compatibility
- Tamper resistance and data integrity validation
Performance Optimizations:
- Efficient handle management and validation
- Optimized error code mapping with comprehensive coverage
- Statistics tracking for performance monitoring
- Intelligent commit strategies for durability vs. performance
- Key validation caching and namespace management
- Author
- Nebiyu Tadesse
- Date
- 2025
- Copyright
- HardFOC
- Note
- This implementation is specifically optimized for ESP32-C6 production environments.
-
Requires ESP-IDF v5.5 or later for full feature support.
-
All platform-specific types are abstracted through McuTypes.h.
-
Uses McuSelect.h for centralized platform configuration.