Note

This is the documentation for the latest development branch and may refer to features that are not available in released versions. If you are looking for the documentation for a specific release, use the drop-down menu on the left and select the desired version.

OTA Example#

Overview#

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

Source file:

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#

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

Examples:

./test_ota
./test_ota /sdcard/update.kdimg

Notes#

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

Comments list
Comments
Log in