Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[submodule "emulator"]
path = emulator
url = git@github.com:eggfly/M5CardputerZero-Emulator.git
url = https://github.com/eggfly/M5CardputerZero-Emulator
branch = main
[submodule "apps/nc2000"]
path = apps/nc2000
url = git@github.com:eggfly/CardputerZero-NC2000.git
url = https://github.com/eggfly/CardputerZero-NC2000
branch = ci-cd
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ cargo run -p czdev --release -- run apps/applaunch/
### Hello CardputerZero (Example App)

```bash
cargo run -p czdev --release -- run examples/key_echo
cargo run -p czdev --release -- run examples/hello_cz
```

![Hello Example](docs/emu-hello.png)
Expand All @@ -39,31 +39,41 @@ Get a 320x170 LVGL app running on your Mac or Linux machine in ~3 minutes — no
### 1. Prerequisites

**macOS:**

```bash
brew install cmake pkg-config sdl2 sdl2_image sdl2_mixer freetype
```

**Linux (Debian/Ubuntu):**

```bash
sudo apt install -y build-essential cmake pkg-config \
libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libfreetype-dev
libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libfreetype-dev libinput-dev
```

**Linux (Fedora/Red hat):**

```bash
sudo dnf install -y @development-libs @development-tools && sudo dnf install -y cmake pkgconf-pkg-config SDL2-devel SDL2_image-devel SDL2_mixer-devel freetype-devel libinput-devel
```

**Windows:** MSYS2 MINGW64 shell. See [DESKTOP_DEV.md §4](docs/DESKTOP_DEV.md#4-windows-lvgl--emulator--known-issues-and-plan) for Windows-specific notes.

You also need a recent Rust toolchain (for `czdev`):

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

### 2. Clone with submodules

```bash
git clone --recursive git@github.com:m5stack/CardputerZero-AppBuilder.git
git clone --recursive https://github.com/m5stack/CardputerZero-AppBuilder
cd CardputerZero-AppBuilder
```

If you already cloned without `--recursive`:

```bash
git submodule update --init --recursive
```
Expand All @@ -83,6 +93,7 @@ cargo run -p czdev --release -- run examples/hello_cz
```

On first run this will:

1. Build the emulator (once, cached in `emulator/build/`).
2. Build the app into `.czdev/build/`.
3. Stage the resulting shared library into the emulator's `apps/` directory.
Expand Down Expand Up @@ -202,7 +213,7 @@ ssh pi@<device-ip> "sudo dpkg -i /tmp/<package>_arm64.deb"

The CI pipeline runs on x86_64 and **cross-compiles** to ARM64 (aarch64) using the `aarch64-linux-gnu-` toolchain — the same approach used by the [M5Stack_Linux_Libs](https://github.com/m5stack/M5Stack_Linux_Libs) SDK.

```
```text
User Input (repo URL)
Expand All @@ -220,7 +231,7 @@ User Input (repo URL)

Generated packages follow the [APPLaunch packaging conventions](https://github.com/dianjixz/M5CardputerZero-UserDemo/blob/main/doc/APPLaunch-App-%E6%89%93%E5%8C%85%E6%8C%87%E5%8D%97.md):

```
```text
<package>.deb
├── DEBIAN/
│ ├── control
Expand Down
2 changes: 1 addition & 1 deletion apps/nc2000
Submodule nc2000 updated 1 files
+1 −1 packaging/VERSION
2 changes: 1 addition & 1 deletion emulator