/una-sdk:una-simulatorfrom una-sdk
Builds and runs a UNA Watch app in a desktop simulator with headless scripting for button presses, sensor simulation, GPS track replay, and PNG screenshot capture. Useful for testing app behavior without physical hardware.
Ships in una-sdk. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The simulator compiles the app's real service and GUI code for the PC and runs it against a mock kernel, with simulated sensors and a mock file system. Drive it with a script and run it headless. Don't send keystrokes to a window, and don't take the user's keyboard focus.
A run produces:
sim.log, holding everything the app and the simulator logged;Each GUI toolkit has its own simulator project inside the app:
| App | Project | Hosts |
|---|---|---|
| LVGL GUI | Software/Apps/LVGL-GUI/simulator/CMakeLists.txt | Windows, Linux, macOS |
| Glance | Software/simulator/CMakeLists.txt | Windows, Linux, macOS |
| TouchGFX GUI | Software/Apps/TouchGFX-GUI/simulator/msvs (Visual Studio), simulator/gcc/Makefile (Linux) | Windows, Linux x86-64 |
Simulators don't need the ARM toolchain. They need a host C++ compiler and SDL2. The commands
below assume UNA_SDK is set.
# Linux / WSL: apt install build-essential cmake ninja-build libsdl2-dev
# macOS: brew install cmake ninja sdl2
cmake -S <app>/Software/Apps/LVGL-GUI/simulator -B <app>/Software/Apps/LVGL-GUI/simulator/build -G Ninja -DCMAKE_BUILD_TYPE=Debug
cmake --build <app>/Software/Apps/LVGL-GUI/simulator/build
# executable: simulator/build/bin/<Name>Simulator
# Windows, any shell. Without an installed SDL2 the build reuses the 32-bit SDL2 that
# TouchGFX Designer ships, so it must be 32-bit (-A Win32). The "Visual Studio 18 2026"
# generator needs Visual Studio 2026 and CMake 4.2 or newer; with Visual Studio 2022 or an
# older CMake, use -G "Visual Studio 17 2022".
cmake -S <app>\Software\Apps\LVGL-GUI\simulator -B <app>\Software\Apps\LVGL-GUI\simulator\build -G "Visual Studio 18 2026" -A Win32
cmake --build <app>\Software\Apps\LVGL-GUI\simulator\build --config Debug
# executable: simulator\build\bin\<Name>Simulator.exe
For a glance, use Software/simulator in place of Software/Apps/LVGL-GUI/simulator. A glance
simulator built with a Visual Studio generator puts its executable in build/bin/Debug. The
LVGL simulators set a flat build/bin for every configuration.
macOS: untested by the SDK maintainers. On Apple Silicon, Homebrew's SDL2 is arm64, so the
simulator must be built arm64. A CMake running under Rosetta needs
-DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_PREFIX_PATH=/opt/homebrew.
The TouchGFX simulator needs the app's generated/ code, which the examples ship. Regenerate
only after changing the design (skill una-new-app).
# Windows: needs TouchGFX 4.26.1 installed (for its asset converters) and MSVC v143
# ("Desktop development with C++"). Application.props expects TouchGFX in C:\TouchGFX\4.26.1;
# for another location, set the TouchGFXEnvPath environment variable to its env folder.
# Find MSBuild with vswhere:
$msbuild = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find "MSBuild\**\Bin\MSBuild.exe" | Select-Object -First 1
& $msbuild <app>\Software\Apps\TouchGFX-GUI\simulator\msvs\Application.sln /p:Configuration=Debug /p:Platform=x86 /m /nologo /verbosity:minimal
# executable: TouchGFX-GUI\build\Debug\bin\Application.exe
# Linux x86-64: apt install build-essential libsdl2-dev libsdl2-image-dev libjpeg-dev ruby ruby-nokogiri
cd <app>/Software/Apps/TouchGFX-GUI
make -f simulator/gcc/Makefile -j"$(nproc)" # UNA_SDK must be an absolute path
# executable: build/bin/simulator.out
A source file added to a TouchGFX app must go into both simulator/msvs/Application.vcxproj
(ClCompile/ClInclude) and simulator/gcc/Makefile (ADDITIONAL_SOURCES_UNA /
ADDITIONAL_INCLUDE_PATHS). The .uapp build picks up sources from libs.cmake, but the
simulator projects list files one by one.
One step per line: a time in ms from the GUI's start (+N = N ms after the previous step, a
trailing s = seconds), then the step. # starts a comment.
# Start a run with a fixed heart rate and check the screens
0 gps fix on
2000 screenshot 01-start
+0 hr 145
+500 click R1
+5000 screenshot 02-running
+0 click R1
+1500 screenshot 03-paused
+500 exit
The steps:
click B, hold B MS, press B, release B, where B is L1, L2, R1 or
R2.screenshot NAME.hr BPM|auto, battery PCT|auto, pressure HPA|auto, gps fix on|off|auto,
gps replay FILE.csv, gps auto, wrist.log TEXT and exit.references/script-reference.md has the full rules: values, button timing and replay files.
Read it before writing anything beyond clicks and screenshots.
To work out which button does what, read the app's GUI code. TouchGFX handles them in each
view's handleKeyEvent; LVGL apps in their screens. A button's position is: L1 top left, L2
bottom left, R1 top right, R2 bottom right. In the examples, R1 is usually start/select and R2
back.
Run from the executable's folder. Always pass --headless, --out and --fs-root, so the run
needs no display, writes where you expect and starts from known data:
cd <folder with the executable>
export SDL_AUDIODRIVER=dummy # no sound device in containers and CI
./RunLVGLSimulator --headless --script /path/run.txt --out /path/run-out --fs-root /path/run-fs
echo "exit $?"
# TouchGFX on Windows is a GUI-subsystem program: use Start-Process to wait for it and get its exit code
$p = Start-Process -FilePath .\Application.exe -ArgumentList '--headless','--script','C:\work\run.txt','--out','C:\work\run-out','--fs-root','C:\work\run-fs' -Wait -PassThru -NoNewWindow
$p.ExitCode
| Option | Meaning |
|---|---|
--script FILE | Run the steps in FILE. |
--headless | No window. Needs --duration-ms or an exit step. |
--duration-ms N | End the run after N ms. |
--out DIR | Where screenshots and sim.log go (default sim-out). |
--fs-root DIR | Root of the mock file system: what the app reads and writes. A fresh folder means no saved settings or activities. Copy a settings.json into it to start from known settings. |
| Exit code | Meaning |
|---|---|
| 0 | The run ended normally. |
| 1 | A step failed: a screenshot or replay file, or a lost button event. A glance simulator also exits 1 when the glance fails to start or draws nothing. |
| 2 | Bad options or script. Nothing ran; the message names the line. |
| 3 | The simulator didn't shut down within 15 s of the end of the run. |
| 4 | Out of memory: an LVGL app exhausted its pool. |
Options can also come from the UNA_SIM_ARGS environment variable, for example when the user
starts the simulator from an IDE.
<out>/sim.log. Each step is logged as [sim] with its time and script line, between
the app's own log lines. Look for errors and warnings the app logged.settings.json or activity files under
--fs-root.Tell the user to check these on a watch (skill una-test-on-watch):
-A Win32, or
-m32 on Linux) has exactly the watch's, so size the pool there;UNA_SIM_LOOK=watch.gps replay started after the app had a fix. Start
replays at time 0, before gps fix on.--fs-root points at a folder from an earlier run. Use a fresh one.LV_MEM_SIZE, or use less LVGL memory. It is set
twice: in the -CMake project's GUI compile definitions and in
LVGL-GUI/simulator/CMakeLists.txt. Change both. The message gives the pool size and use.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub unawatch/una-sdk --plugin una-sdk7 skills in this plugin
/una-build-uappBuild a UNA Watch app's .uapp package for the watch with CMake and the arm-none-eabi toolchain, and set its version, ID and memory sizes. Use when building, rebuilding or versioning a UNA Watch app for the device, or when a .uapp build fails./una-new-appStart a new UNA Watch app (activity, utility, glance or clockface) by copying the closest SDK example and renaming it. Covers choosing between a TouchGFX and an LVGL GUI, a fresh APP_ID, the paths to fix when the app lives outside the SDK, regenerating TouchGFX code, and converting LVGL fonts and images. Use when creating a UNA Watch app or watch face, when deciding which GUI toolkit to use, or when regenerating TouchGFX code or adding fonts or images to an app./una-setupOther plugins' skills for the same job