Documentation map · Project instructions · Session history
A small first app for the M5Stack Cardputer Zero (Linux). Start, Settings and About demonstrate the shared home menu, keyboard navigation and theme switching, scrollable lists, a sample form, and a detail page with one action. No handheld or network feature is needed to try the desktop preview.
Read the Cardputer Zero App Guide. It is the source of truth for the shell, the build process and troubleshooting. The carousel is an optional design preference, not an M5Stack requirement.
1. Get the repo. Clone the starter below, or use your fork’s HTTPS URL:
git clone https://github.com/Prophet60191/m5stack-cardputer-zero-app-shell.git app-shell
cd app-shellTo update a clone later, with your work committed: git pull --ff-only.
2. Try the simulator. On Apple Silicon with Homebrew and Python 3.8+:
brew install cmake ninja sdl2 fmt freetype libpng jpeg-turbo
cmake --preset darwin-arm64 -DCMAKE_PREFIX_PATH="$(brew --prefix)"
python3 tools/watch_simulator.py build/darwin-arm64This command requires Python 3.8+. On macOS and Linux, saving
src/app/starter_ui_layout.h or the shared values in
src/shared/row_focus_style.h refreshes the same simulator window without
resetting the screen or draft. Other changes build in the background. When
the title says reopen to apply changes, close the preview and rerun the
command. Build failed means the last working preview is still open. On Windows, close
and rerun the command for all changes. If the preview closes or exits,
watch mode stops instead of opening a replacement window. The next time you
deliberately start it, it restores your last local checkpoint (page, selection,
draft, and caret). Use --fresh to start over. Preview checkpoints stay in the
desktop build directory and are not app storage. Keep using the existing window
if the watcher says one is already open. Use the watch command again to restore
your place; running the built executable directly starts a new preview.
Watch mode also keeps preferences in <build>/.preview/config and reserves a
private runtime directory at <build>/.preview/run. Separate build directories
therefore have separate appearance settings as well as checkpoints. --fresh
resets the checkpoint, not saved appearance. Direct executable launches retain
the ordinary user-preference path unless you set an isolated XDG_CONFIG_HOME.
For a complete project, follow the guide's development and improvement workflow, including its practices to avoid and justified exceptions.
The FPS, CPU and frame-time overlay is off by default. To enable it, rerun
the configure command above with -DSIMULATOR_PERF_OVERLAY=ON, then start
watch mode again. Use -DSIMULATOR_PERF_OVERLAY=OFF to turn it back off.
Press Left/Right or Z/C to choose a menu, Enter to open it, and Esc to return.
For a first edit, change the Start subtitle in src/app/starter_ui_layout.h
and save. It will update in the existing window on macOS and Linux.
To run the desktop checks after the first build:
ctest --test-dir build/darwin-arm64 -C Debug --output-on-failureThe guide's building and packaging chapter covers the other desktop paths and device prerequisites.
3. Build the arm64 package. On a Debian 13 arm64 build system with the guide's prerequisites (CMake 3.31+, Ninja, C/C++ compiler, FreeType, PNG, JPEG, zlib and fmt development packages):
cmake -S . -B build/native -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DUSE_DESKTOP=OFF -DAPP_USE_DRM=OFF -DCM0_SDK_ROOT=/ -DCM0_ALLOW_FETCH_DEPS=OFF
cmake --build build/native
ctest --test-dir build/native --output-on-failure
cpack --config build/native/CPackConfig.cmake4. Install on Cardputer Zero. Copy
dist/cp0-app-shell_0.1.2_rev1_arm64.deb to the handheld. From a terminal
there, in the directory holding the file:
sudo apt install ./cp0-app-shell_0.1.2_rev1_arm64.debOpen App Shell from the launcher. To remove the sample:
sudo apt remove cp0-app-shell. See the first-device walkthrough
for transfer, verification and rollback. If the launcher icon appears but
App Shell won’t open, check the device’s runtime libraries
before reinstalling.
Start with src/app/starter_ui_layout.h for the menu labels and sample pages.
The form’s Category row shows how to add optional helper text (the helper field).
Set your own package ID, name and maintainer in app-identity.cmake before
shipping or installing alongside the sample. Reconfigure in a fresh build
directory. Your package filename then uses your new ID.
For the explanation and design choices, use the guide rather than this README.
Selected list/form overflow now scrolls horizontally; inactive rows use ellipses. Full editor values remain intact. Appearance saves use atomic private replacement on the tested POSIX platforms and retain bounded retries. Shared row-state changes require closing and reopening a watch preview. See the local verification report for tests and limits. These changes are included in installed 0.1.2; the owner passed the scoped navigation/appearance check in the installation record. The 2026-11-30 source synchronization does not publish a new installer release.
If you use the App Shell, I'd like to hear how it went. Please open a GitHub issue and tell me:
- What worked well?
- What didn't work, or where did you get stuck?
- What would make the shell or guide easier to use?
If something broke, include your operating system, whether you were using the simulator or the Cardputer Zero, and the steps you took. A few sentences are plenty. Thanks for trying it!
Based on the official M5Stack Template at 477fa6d. Uses the guide's shared home menu and LVGL 9.5.0. See LICENSE, keyboard attribution, shared menu license, and font notices. Not a Store submission.
Fn+A/S/D controls mute and volume; Fn+U/I controls brightness. Fn+H opens Help and Fn+J takes a screenshot. Typing retains the official Shift/Sym map. See keyboard integration and verification limits.