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:
- In VSCode
- Over BLE / USB (Web)
- From terminal
Press Ctrl + Shift + P and run the following tasks (if using older legacy zswatch v4 use the other named Legacy):
Upload Raw FS
- ZSWatch must be flashed with functional firmware.
- On the watch, go to Apps → Update and enable USB and/or BLE before starting.
- The image resources file (
lvgl_resources_raw.bin) is bundled in every firmware download from GitHub Releases and GitHub Actions. - Downloading from GitHub Actions requires you to be logged in to GitHub.
Go to https://zswatch.dev/update and follow the instructions.
Below for later ZSWatch no need to specify anything else. But for older version such as legacy v4 take a look in tasks.json for the exact lines needed for specific ZSWatch version.
west upload_fs --type raw --ini_file app/boards/zswatch/watchdk/support/qspi_mx25u51245.ini
Troubleshooting
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
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:
- Find or create a
.png/.jpg/.svgimage. - Convert it to a
.cfile using the LVGL Image Converter. Use color format RGB565, or RGB565A8 if the image has a transparent background. - Place the
.cfile in an appropriate folder, for exampleapp/src/images/icons/. - Convert the
.cfile to a binary:python app/scripts/lvgl_c_array_to_bin_lvgl9.py <path_to_.c_file> app/src/images/binaries/S/ - Upload the updated image resources to the watch using one of the methods above.
app/src/images/binaries/S/ is the folder where binary image files are stored. They are automatically included when generating the image resource blob.