Skip to content

Commit 7c50e39

Browse files
Improve docs
1 parent 33f1bb6 commit 7c50e39

3 files changed

Lines changed: 105 additions & 35 deletions

File tree

AGENTS.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# AGENTS.md
2+
3+
This file provides guidance to agents when working with documentation in this repository.
4+
5+
## Where the docs live
6+
7+
This repository (`../docs/` relative to the MicroPythonOS code repo) is the public documentation site for MicroPythonOS. It is built with MkDocs.
8+
9+
The source Markdown files are under `docs/`. `mkdocs.yml` at the repository root drives navigation and includes.
10+
11+
## Included files
12+
13+
Some Markdown files are intentionally included by other pages rather than listed directly in `mkdocs.yml`. Examples in `docs/os-development/`:
14+
15+
- `compiling.md` is included by `linux.md` and `macos.md`.
16+
- `running-on-desktop.md` is included by `linux.md` and `macos.md`.
17+
18+
This is why `mkdocs build` warns "The following pages exist ... but are not included in the nav" for those files. Do not add them to `nav` unless explicitly requested.

docs/getting-started/running.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ For advanced usage, such as installing development builds without any files, see
1414

1515
## Running on desktop
1616

17-
MicroPythonOS desktop builds do not require a full git clone. A single pre-built binary contains the frozen filesystem, so you can download it, make it executable, and run it.
17+
On desktop you can choose how deep you want to go: run a pre-built binary, develop apps using a pre-built binary with a source checkout, or build the operating system from source.
1818

19-
For detailed steps, see [Running on Desktop](../os-development/running-on-desktop.md).
19+
See [Running on Desktop](../os-development/running-on-desktop.md) for detailed steps.
2020

2121
## Next Steps
2222

Lines changed: 85 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,120 @@
11
## Running on desktop
22

3-
Desktop builds of MicroPythonOS can run without a local source checkout. The `internal_filesystem/` is frozen into the binary at build time, so a single pre-built executable is enough to try the OS.
3+
MicroPythonOS runs on Linux, macOS and Raspberry Pi desktops. The desktop build is a single executable that contains the whole OS, so you usually do not need to compile anything.
44

5-
### Download a pre-built binary
5+
Pick the level that matches what you want to do.
66

7-
1. Go to the [releases page](https://github.com/MicroPythonOS/MicroPythonOS/releases).
8-
2. Download the binary for your platform:
9-
- Linux / WSL2 on Windows: `lvgl_micropy_unix`
10-
- macOS (Apple Silicon or Intel): `lvgl_micropy_macOS`
11-
3. Make it executable:
7+
---
128

13-
```
9+
### Level 1: Just want to run it?
10+
11+
Grab a pre-built binary and launch it.
12+
13+
1. Download the binary for your platform from the [releases page](https://github.com/MicroPythonOS/MicroPythonOS/releases):
14+
- **Linux, Raspberry Pi, WSL2 on Windows:** `lvgl_micropy_unix`
15+
- **macOS (Apple Silicon or Intel):** `lvgl_micropy_macOS`
16+
2. Make it executable:
17+
18+
```bash
1419
chmod +x lvgl_micropy_unix
1520
```
1621

17-
4. Place it where `scripts/run_desktop.sh` expects it. The script looks for:
18-
- `lvgl_micropython/build/lvgl_micropy_unix` on Linux
19-
- `lvgl_micropython/build/lvgl_micropy_macOS` on macOS
22+
3. Run it. From a terminal:
23+
24+
```bash
25+
./lvgl_micropy_unix
26+
```
27+
28+
Or double-click it in your file manager. You may want to rename it to `MicroPythonOS` first.
29+
30+
---
31+
32+
### Level 2: Want to develop an app but use a prebuilt OS?
2033

21-
You can create that folder and copy the binary there:
34+
You can use a downloaded OS binary with a full source checkout so you can edit apps and see changes immediately.
2235

36+
1. Clone the repository:
37+
38+
```bash
39+
git clone --recurse-submodules https://github.com/MicroPythonOS/MicroPythonOS.git
40+
cd MicroPythonOS
2341
```
42+
43+
2. Download the binary for your platform from the [releases page](https://github.com/MicroPythonOS/MicroPythonOS/releases). Rename it and put it where the runner script expects it:
44+
- Linux / Raspberry Pi / WSL2 → `lvgl_micropython/build/lvgl_micropy_unix`
45+
- macOS → `lvgl_micropython/build/lvgl_micropy_macOS`
46+
47+
```bash
2448
mkdir -p lvgl_micropython/build
25-
cp /path/to/downloaded/lvgl_micropy_unix lvgl_micropython/build/lvgl_micropy_unix
49+
cp /path/to/downloaded/binary lvgl_micropython/build/lvgl_micropy_unix
50+
chmod +x lvgl_micropython/build/lvgl_micropy_unix
2651
```
2752

28-
5. Run it:
53+
3. Run it with the helper script:
2954

30-
```
55+
```bash
3156
./scripts/run_desktop.sh
3257
```
3358

34-
### Build from source
59+
`scripts/run_desktop.sh` launches the OS using the Python files in `internal_filesystem/` directly, so any edit you make there appears the next time you restart the app. No rebuild is needed.
3560

36-
If you want to modify the OS itself or run the very latest code, you can [build it from source](compiling.md). The built binary will already be in `lvgl_micropython/build/lvgl_micropy_XXX` where `XXX` is `unix` or `macOS`.
61+
**Try it:**
3762

38-
### Notes on MacOS
63+
1. Edit `internal_filesystem/builtin/apps/com.micropythonos.about/assets/about.py`
64+
2. Run `./scripts/run_desktop.sh`
65+
3. Open the About app
66+
4. See your change immediately
3967

40-
If you get an error about a missing `/opt/homebrew/opt/libffi/lib/libffi.8.dylib` then fix that with: `brew install libffi`
68+
Once your app works on desktop, deploy it to a physical device with [Installing on ESP32](installing-on-esp32.md).
4169

42-
If you get an error about the code being unsigned, then allow it like this:
70+
---
4371

44-
![Allow Anyway on MacOS](/os-development/macos-allow-anyway.png)
72+
### Level 3: Want to build the OS yourself?
4573

74+
If you need to change the OS itself, add C extensions, modify MicroPython/LVGL bindings, or run the very latest code, build from source. The binary will already land in `lvgl_micropython/build/lvgl_micropy_XXX` where `XXX` is `unix` or `macOS`.
4675

47-
## Making Changes on Desktop
76+
```bash
77+
./scripts/build_mpos.sh unix # Linux, Raspberry Pi, WSL2
78+
./scripts/build_mpos.sh macOS # macOS
79+
```
4880

49-
If you do have a source checkout, you can still run the OS directly from `internal_filesystem/`. When you run `./scripts/run_desktop.sh`, the OS runs the MicroPythonOS scripts **directly from `internal_filesystem/`**. This means:
81+
See [Compiling](compiling.md) for the full instructions, including cloning and dependencies.
5082

51-
- **All changes to Python files are immediately active** - no build or install needed
52-
- **Instant testing** - edit a file, restart the app, see the changes
53-
- **Fast iteration cycle** - the recommended way to develop and test
83+
---
5484

55-
**Try it yourself:**
85+
## Known issues and fixes
5686

57-
1. Edit `internal_filesystem/builtin/apps/com.micropythonos.about/assets/about.py`
58-
2. Run `./scripts/run_desktop.sh`
59-
3. Open the About app
60-
4. See your changes immediately!
87+
### Linux: "No such file or directory" when running the binary
88+
89+
Make sure it is executable:
90+
91+
```bash
92+
chmod +x lvgl_micropy_unix
93+
```
94+
95+
### macOS: missing `libffi.8.dylib`
96+
97+
Install libffi:
98+
99+
```bash
100+
brew install libffi
101+
```
102+
103+
### macOS: "cannot be opened because the developer cannot be verified"
104+
105+
The prebuilt binary is not signed. Open **System Settings → Privacy & Security** and click **Allow Anyway** next to the blocked item, then run it again.
106+
107+
![Allow Anyway on MacOS](/os-development/macos-allow-anyway.png)
108+
109+
### Windows
110+
111+
Native Windows builds are not supported. [Users report](https://github.com/MicroPythonOS/MicroPythonOS/issues/31) that the Linux desktop binary works under WSL2 on Windows 11. Alternatively, you can try the [web port](../web-port/using.md), which runs a desktop build in the browser.
61112

113+
---
62114

63-
## Making Changes on ESP32
115+
## Deploying to hardware
64116

65-
Once you've tested your changes on desktop and they work correctly, or you're doing things you can't test on desktop, then you can deploy to physical hardware.
117+
Once your app works on desktop, install it on a supported ESP32 device.
66118

67119
{!os-development/installing-on-esp32.md!}
68120

0 commit comments

Comments
 (0)