How I build and test Cardputer Zero apps on my desktop

Cardputer Zero launcher showing the command-line and Python icons.

Written by

in

·

Cardputer Zero guide

How I build and test Cardputer Zero apps on my desktop

Build and test on another machine, then check the ARM64 package and controls on the real device.

Cardputer Zero launcher showing the command-line and Python icons.

When I tested Radio Field Kit Zero, I typed 7.100 MHz straight over the default. I got 10.03 metres per dipole leg, just as expected, but I couldn’t see the blinking cursor. The calculation was right. On the actual display it wasn’t clear the app was ready for me to type. I could see the cursor when I checked the next build on the Zero.

I used the same broad workflow for all four apps I’ve submitted: CWTrainerZero, BitaxeZero, APRSZero and Radio Field Kit Zero. I did most of the editing and testing on another computer, then checked the things that only the hardware could tell me.

Build and test on your desktop first

The official Cardputer Zero template has a desktop preview and a separate device target. My CWTrainerZero Linux simulator is a working example. It uses the same 320 × 170 interface in SDL, scaled up for review. That makes it easy to check whether text fits or a prompt makes sense before transferring another build.

I’d test the underlying logic separately when possible: for example, does a known input produce the expected antenna length? The CWTrainerZero automated smoke test uses silent audio, so it doesn’t tell me how the tones sound through the Zero. The project can export a WAV for listening separately.

Package for ARM64, then try the actual device

Build the device target separately: a desktop simulator executable isn’t the ARM64 Debian package that runs on the Zero. The AppBuilder quickstart covers the packaging workflow. Transfer and install your test package, then open it from APPLaunch.

On the Zero, try opening and exiting the app, run through one normal task, and check the real keyboard, display and audio or expansion hardware as applicable. For BitaxeZero, the desktop instructions said Down. On the built-in keyboard, the shortcut for Down is Fn+X. When you submit, keep the exact package you tested and record its SHA-256 so you can tell whether the submitted file is the same one.

For a small script, try developing on the Zero itself

The Zero is a Linux computer. Try python3 --version and perl -v in its terminal to see what’s available on your image. M5Stack documents Python 3, and Perl is available on my unit. I’d happily edit and run a short utility on the Zero. For a graphical app with repeated builds, I’d use the desktop and save device time for testing the actual experience.

See the Cardputer Zero hub for more guides and open-source apps.