Skip to content

Commit f909b06

Browse files
Improve docs
1 parent 2d14ab3 commit f909b06

2 files changed

Lines changed: 31 additions & 39 deletions

File tree

docs/os-development/installing-on-esp32.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,22 @@ But if you need to install a version that's not available there, or you built yo
4747
./scripts/install.sh
4848
```
4949
</pre>
50-
51-
52-
Example:
5350
5451
<pre>
5552
```
56-
./scripts/install.sh
53+
./scripts/install.sh com.micropythonos.about # to install one single app
5754
```
5855
</pre>
5956
57+
On MacOS, the install.sh script needs: `brew install --cask serial`
58+
59+
If you need to frequently update a small number of files, you can also update them manually, for example:
60+
61+
<pre>
62+
```
63+
mpremote.py cp internal_filesystem/lib/mpos/device_info.py :/lib/mpos
64+
```
65+
</pre>
6066
6167
## Notes
6268
Lines changed: 21 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
## Running on Linux or MacOS
1+
## Running on desktop
22

33
1. Make sure you have the `local_filesystem/` folder
44

5-
Make a local clone that contains the [internal_filesystem](https://github.com/MicroPythonOS/MicroPythonOS/tree/main/internal_filesystem) with:
5+
If you built from source, you should already have a local clone that contains the [internal_filesystem](https://github.com/MicroPythonOS/MicroPythonOS/tree/main/internal_filesystem).
6+
7+
If you used a pre-built binary, then you need to get a local clone and change into that directory with:
68

79
<pre>
810
```
@@ -13,38 +15,39 @@
1315

1416
2. Make sure you have the software
1517

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).
18+
If you built from source, then you will already have the software in lvgl_micropython/build/lvgl_micropy_*
1719

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:
20+
If you downloaded a pre-built binary (for example /Users/yourname/MicroPythonOS_amd64_MacOS_0.7.1.bin) then put it in the right location now:
1921

2022
<pre>
2123
```
2224
mkdir -p lvgl_micropython/build
2325
cp /Users/yourname/MicroPythonOS_0.7.1.bin lvgl_micropython/build/lvgl_micropy_macOS
24-
./scripts/run_desktop.sh
2526
```
2627
</pre>
2728

29+
3. Starting the software:
30+
31+
You're now ready to run it with:
32+
33+
<pre>
34+
```
35+
./scripts/run_desktop.sh
36+
```
37+
</pre>
38+
2839
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`
2940

30-
## Development on Desktop
41+
## Testing on Desktop
3142

32-
This offers a quick coding cycle (modify, deploy, test) so it's the recommending starting method.
43+
You'll notice that whenever you change a file in `internal_filesystem/`, the changes are immediately visible on desktop when you reload the file or restart the app.
3344

34-
When you run `./scripts/run_desktop.sh`, the OS runs **directly from `internal_filesystem/`**. This means:
45+
When you run `./scripts/run_desktop.sh`, the OS runs the MicroPythonOS scripts **directly from `internal_filesystem/`**. This means:
3546

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

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.
41-
42-
### Modifying Files
43-
44-
You'll notice that whenever you change a file in `internal_filesystem/`, the changes are immediately visible on desktop when you reload the file or restart the app.
45-
46-
This results in a very quick coding cycle - no compilation or installation needed for Python code changes.
47-
4851
**Try it yourself:**
4952

5053
1. Edit `internal_filesystem/builtin/apps/com.micropythonos.about/assets/about.py`
@@ -53,27 +56,10 @@ This results in a very quick coding cycle - no compilation or installation neede
5356
4. See your changes immediately!
5457

5558

56-
## Development on Hardware
59+
## Testing on Hardware
5760

5861
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.
5962

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:**
71-
72-
You only need to run `./scripts/build_mpos.sh` when:
63+
{!os-development/installing-on-esp32.md!}
7364

74-
- Modifying C extension modules (`c_mpos/`, `secp256k1-embedded-ecdh/`)
75-
- Changing MicroPython core or LVGL bindings
76-
- Testing the frozen filesystem for production releases
77-
- Creating firmware for distribution
7865

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.

0 commit comments

Comments
 (0)