Skip to content

Commit 331cf14

Browse files
Simplify
1 parent 421140c commit 331cf14

File tree

5 files changed

+115
-414
lines changed

5 files changed

+115
-414
lines changed

CLAUDE.md

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -116,31 +116,41 @@ The `c_mpos/src/webcam.c` module provides webcam support for desktop builds usin
116116

117117
### Development Workflow (IMPORTANT)
118118

119-
**For most development, you do NOT need to rebuild the firmware!**
119+
**⚠️ CRITICAL: Desktop vs Hardware Testing**
120120

121-
When you run `scripts/install.sh`, it copies files from `internal_filesystem/` to the device storage. These files override the frozen filesystem because the storage paths are first in `sys.path`. This means:
121+
📖 **See**: [docs/os-development/running-on-desktop.md](../docs/docs/os-development/running-on-desktop.md) for complete guide.
122122

123+
**Desktop testing (recommended for ALL Python development):**
123124
```bash
124-
# Fast development cycle (recommended):
125-
# 1. Edit Python files in internal_filesystem/
126-
# 2. Install to device:
127-
./scripts/install.sh waveshare-esp32-s3-touch-lcd-2
125+
# 1. Edit files in internal_filesystem/
126+
nano internal_filesystem/builtin/apps/com.micropythonos.settings/assets/settings.py
127+
128+
# 2. Run on desktop - changes are IMMEDIATELY active!
129+
./scripts/run_desktop.sh
128130

129-
# That's it! Your changes are live on the device.
131+
# That's it! NO build, NO install needed.
130132
```
131133

132-
**You only need to rebuild firmware (`./scripts/build_mpos.sh esp32`) when:**
133-
- Testing the frozen `lib/` for production releases
134-
- Modifying C extension modules (`c_mpos/`, `secp256k1-embedded-ecdh/`)
135-
- Changing MicroPython core or LVGL bindings
136-
- Creating a fresh firmware image for distribution
134+
**❌ DO NOT run `./scripts/install.sh` for desktop testing!** It's only for hardware deployment.
135+
136+
The desktop binary runs **directly from `internal_filesystem/`**, so any Python file changes are instantly available. This is the fastest development cycle.
137137

138-
**Desktop development** always uses the unfrozen files, so you never need to rebuild for Python changes:
138+
**Hardware deployment (only after desktop testing):**
139139
```bash
140-
# Edit internal_filesystem/ files
141-
./scripts/run_desktop.sh # Changes are immediately active
140+
# Deploy to physical ESP32 device via USB/serial
141+
./scripts/install.sh waveshare-esp32-s3-touch-lcd-2
142142
```
143143

144+
This copies files from `internal_filesystem/` to device storage, which overrides the frozen filesystem.
145+
146+
**When you need to rebuild firmware (`./scripts/build_mpos.sh`):**
147+
- Modifying C extension modules (`c_mops/`, `secp256k1-embedded-ecdh/`)
148+
- Changing MicroPython core or LVGL bindings
149+
- Testing frozen filesystem for production releases
150+
- Creating firmware for distribution
151+
152+
**For 99% of development work on Python code**: Just edit `internal_filesystem/` and run `./scripts/run_desktop.sh`.
153+
144154
### Building Firmware
145155

146156
The main build script is `scripts/build_mpos.sh`:

0 commit comments

Comments
 (0)