Skip to content

Commit 2d14ab3

Browse files
Update docs
1 parent e462366 commit 2d14ab3

3 files changed

Lines changed: 33 additions & 50 deletions

File tree

docs/os-development/macos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# OS Development on MacOS
22

3-
Most users can just use a pre-built binary from the [releases page](https://github.com/MicroPythonOS/MicroPythonOS/releases) and install it manually or using the [web installer](https://install.MicroPythonOS.com).
3+
If you're looking to install MicroPythonOS on a supported device, you can probably just use a pre-built binary from the [releases page](https://github.com/MicroPythonOS/MicroPythonOS/releases) and install it on the device, either manually or with the [web installer](https://install.MicroPythonOS.com).
44

55
But if for some reason that one doesn't work, or you really want to modify things under the hood, you're in the right place here!
66

Lines changed: 32 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
11
## Running on Linux or MacOS
22

3-
1. Make sure you have the software
3+
1. Make sure you have the `local_filesystem/` folder
44

5-
Either you built your own [on MacOS](../os-development/macos.md) or [Linux](../os-development/linux.md) or you can download a pre-built executable binary (e.g., `MicroPythonOS_amd64_Linux`, `MicroPythonOS_amd64_MacOS`) from the [releases page](https://github.com/MicroPythonOS/MicroPythonOS/releases).
6-
7-
Give it executable permissions:
8-
9-
```
10-
chmod +x /path/to/MicroPythonOS_executable_binary
11-
```
12-
13-
2. Make sure you have the `local_filesystem/` folder
14-
15-
You probably already have a local clone that contains the [internal_filesystem](https://github.com/MicroPythonOS/MicroPythonOS/tree/main/internal_filesystem).
16-
17-
If not, then clone it now:
5+
Make a local clone that contains the [internal_filesystem](https://github.com/MicroPythonOS/MicroPythonOS/tree/main/internal_filesystem) with:
186

197
<pre>
208
```
@@ -23,52 +11,33 @@
2311
```
2412
</pre>
2513

26-
3. Start it from the local_filesystem/ folder:
14+
2. Make sure you have the software
15+
16+
Either you built your own [on MacOS](../os-development/macos.md) or [Linux](../os-development/linux.md) or you can download a pre-built executable binary (e.g., `MicroPythonOS_amd64_Linux_0.7.1.elf`, `MicroPythonOS_amd64_MacOS_0.7.1.bin`) from the [releases page](https://github.com/MicroPythonOS/MicroPythonOS/releases).
17+
18+
If you downloaded a pre-built binary (for example to /Users/yourname/MicroPythonOS_amd64_MacOS_0.7.1.bin) then put it in the right location, with execution rights:
2719

2820
<pre>
2921
```
30-
cd internal_filesystem/ # make sure you're in the right place to find the filesystem
31-
/path/to/MicroPythonOS_executable_binary -X heapsize=32M -v -i -c "$(cat boot_unix.py main.py)"
32-
```
22+
mkdir -p lvgl_micropython/build
23+
cp /Users/yourname/MicroPythonOS_0.7.1.bin lvgl_micropython/build/lvgl_micropy_macOS
24+
./scripts/run_desktop.sh
25+
```
3326
</pre>
3427

35-
There's also a convenient `./scripts/run_desktop.sh` script that will attempt to start the latest build that you compiled yourself.
36-
37-
### Development Workflow: Desktop vs Hardware
28+
On MacOS, if you get an error about a missing /opt/homebrew/opt/libffi/lib/libffi.8.dylib then fix that with: `brew install libffi`
3829

39-
**IMPORTANT**: Understanding the difference between desktop testing and hardware deployment is critical for efficient development.
30+
## Development on Desktop
4031

41-
#### Desktop Development (Recommended for Most Development)
32+
This offers a quick coding cycle (modify, deploy, test) so it's the recommending starting method.
4233

4334
When you run `./scripts/run_desktop.sh`, the OS runs **directly from `internal_filesystem/`**. This means:
4435

4536
- **All changes to Python files are immediately active** - no build or install needed
4637
- **Instant testing** - edit a file, restart the app, see the changes
4738
- **Fast iteration cycle** - the recommended way to develop and test
4839

49-
**DO NOT run `./scripts/install.sh` when testing on desktop!** That script is only for deploying to physical hardware.
50-
51-
**Example workflow:**
52-
```bash
53-
# 1. Edit a file
54-
nano internal_filesystem/builtin/apps/com.micropythonos.settings/assets/settings.py
55-
56-
# 2. Run on desktop - changes are immediately active!
57-
./scripts/run_desktop.sh
58-
59-
# That's it! Your changes are live.
60-
```
61-
62-
#### Hardware Deployment (Only After Desktop Testing)
63-
64-
Once you've tested your changes on desktop and they work correctly, you can deploy to physical hardware:
65-
66-
```bash
67-
# Deploy to connected ESP32 device
68-
./scripts/install.sh waveshare-esp32-s3-touch-lcd-2
69-
```
70-
71-
The `install.sh` script copies files from `internal_filesystem/` to the device's storage partition over USB/serial.
40+
There's no need to run `./scripts/install.sh` when testing on desktop - that script is only for deploying everything from internal_filesystem/ to physical hardware.
7241

7342
### Modifying Files
7443

@@ -83,7 +52,22 @@ This results in a very quick coding cycle - no compilation or installation neede
8352
3. Open the About app
8453
4. See your changes immediately!
8554

86-
**When you DO need to rebuild:**
55+
56+
## Development on Hardware
57+
58+
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.
59+
60+
This assumes your device was already flashed with MicroPythonOS or at least MicroPython, using something like https://install.MicroPythonOS.com/
61+
62+
The `install.sh` script copies files from `internal_filesystem/` to the device's storage partition over USB/serial:
63+
64+
```bash
65+
./scripts/install.sh
66+
```
67+
68+
On MacOS, you need this for the install.sh script: `brew install --cask serial`
69+
70+
**When you DO need to rebuild and flash the MicroPythonOS firmware:**
8771

8872
You only need to run `./scripts/build_mpos.sh` when:
8973

@@ -92,4 +76,4 @@ You only need to run `./scripts/build_mpos.sh` when:
9276
- Testing the frozen filesystem for production releases
9377
- Creating firmware for distribution
9478

95-
For **all Python code development**, just edit files in `internal_filesystem/` and run `./scripts/run_desktop.sh`.
79+
For **all Python code development**, just edit files in `internal_filesystem/` and run `./scripts/run_desktop.sh` (to run on desktop) or `./scripts/install.sh` to copy your files to a device.

mkdocs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ nav:
7777
- Filesystem Layout: architecture/filesystem.md
7878
- OS Development:
7979
- Overview: os-development/index.md
80-
- Running on Desktop: os-development/running-on-desktop.md
8180
- On Linux: os-development/linux.md
8281
- On MacOS: os-development/macos.md
8382
- On Windows: os-development/windows.md

0 commit comments

Comments
 (0)