# OTA Example

## Overview

This sample demonstrates the basic OTA update flow for writing a `kdimg` image to the OTA device in chunks.

Source file:

```bash
src/rtsmart/examples/peripheral/ota/test_ota.c
```

## Sample Behavior

- default image path: `/data/ota_test.kdimg`
- accepts a custom image path from the command line
- reads the image in `64 KB` chunks
- writes each chunk through `k230_ota_update()`

## Key APIs

- `k230_ota_create()`
- `k230_ota_update()`
- `k230_ota_destroy()`

## Build and Run

```bash
cd src/rtsmart/examples/peripheral/ota
make
./test_ota [image_path]
```

Examples:

```bash
./test_ota
./test_ota /sdcard/update.kdimg
```

## Notes

Make sure the OTA image path and storage layout match your board environment.
