Skip to main content

Image Resources

Many icons and images in the ZSWatch UI are stored in external flash and are not part of the firmware binary. You need to upload them separately after flashing firmware.

Uploading Images to the Watch

Choose the method that suits you best:

Press Ctrl + Shift + P and run the following tasks (if using older legacy zswatch v4 use the other named Legacy):

  • Upload Raw FS
Troubleshooting
tip

If you see No connected debuggers found but nrfjprog --ids and JLink finds the debugger, try this fix:

export LD_LIBRARY_PATH=/opt/nrf-command-line-tools/lib:$LD_LIBRARY_PATH
# or add it to your ~/.bashrc
tip

If you get missing pip packages make sure to run pip install app/scripts/requirements.txt. If you use VSCode Tasks:Run Task it uses the nRF Connect Terminal, so make sure to run the pip install app/scripts/requirements.txt using the nRF Connect Terminal instead.

Adding New Image Resources

To add your own icons or images to the watch:

  1. Find or create a .png / .jpg / .svg image.
  2. Convert it to a .c file using the LVGL Image Converter. Use color format RGB565, or RGB565A8 if the image has a transparent background.
  3. Place the .c file in an appropriate folder, for example app/src/images/icons/.
  4. Convert the .c file to a binary:
    python app/scripts/lvgl_c_array_to_bin_lvgl9.py <path_to_.c_file> app/src/images/binaries/S/
  5. Upload the updated image resources to the watch using one of the methods above.
info

app/src/images/binaries/S/ is the folder where binary image files are stored. They are automatically included when generating the image resource blob.