Zelta/Documentation

Embedded SDK Installation

The Zelta SDK is a lightweight C library for integrating OTA updates into your embedded firmware.

Supported Platforms

  • Zephyr RTOS (recommended)
  • ESP-IDF
  • FreeRTOS + lwIP
  • Bare metal (with HTTP client)

Requirements

  • ARM Cortex-M or equivalent MCU
  • 64KB+ RAM (for download buffer)
  • Network stack (WiFi, Ethernet, Cellular)
  • mbedTLS or similar crypto library
  • MCUboot or dual-bank flash layout

Installation (Zephyr)

1. Add as West Module

Add to your west.yml:

manifest:
  projects:
    - name: zelta
      url: https://github.com/didavie/Zelta
      path: modules/lib/zelta
      revision: main

Run:

west update

2. Enable in Kconfig

Add to your prj.conf:

# Enable Zelta OTA
CONFIG_ZELTA=y
CONFIG_ZELTA_LOG_LEVEL_DBG=y

# Required dependencies
CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_POSIX_NAMES=y
CONFIG_HTTP_CLIENT=y
CONFIG_MBEDTLS=y
CONFIG_MBEDTLS_BUILTIN=y
CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=32768

# For signature verification
CONFIG_MBEDTLS_ECDSA_C=y
CONFIG_MBEDTLS_ECP_C=y
CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y

# Flash access
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_STREAM_FLASH=y

# MCUboot integration
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_IMG_MANAGER=y
CONFIG_IMG_ERASE_PROGRESSIVELY=y

3. Include Header

#include <zelta/zelta.h>

Installation (ESP-IDF)

1. Add as Component

cd your-project/components
git clone https://github.com/didavie/Zelta zelta

2. Configure

In menuconfig:

  • Enable Component configZelta OTA
  • Configure server URL and credentials

3. Include Header

#include "zelta.h"

Manual Installation

If not using a package manager:

  1. Copy embedded/src/ and embedded/include/ to your project
  2. Add source files to your build system
  3. Configure include paths
  4. Link with mbedTLS and your HTTP client

File Structure

embedded/
├── include/
│   └── zelta/
│       ├── zelta.h         # Main API header
│       ├── config.h        # Configuration options
│       └── types.h         # Type definitions
├── src/
│   ├── zelta.c             # Core implementation
│   ├── http.c              # HTTP client wrapper
│   ├── verify.c            # Hash and signature verification
│   └── flash.c             # Flash operations
└── Kconfig                 # Zephyr configuration

Next Steps