diff --git a/Makefile b/Makefile index 5ce5448..494e84c 100644 --- a/Makefile +++ b/Makefile @@ -50,20 +50,21 @@ dist-deploy: devdeps dist @[[ -n "$${CIRCLE_TAG}" ]] && $(PIPENV) run s3cmd -c .s3cfg put -P dist/kmk-latest.zip s3://kmk-releases/$${CIRCLE_TAG}.zip >/dev/null || true @[[ -n "$${CIRCLE_TAG}" ]] && $(PIPENV) run s3cmd -c .s3cfg put -P dist/kmk-latest.unoptimized.zip s3://kmk-releases/$${CIRCLE_TAG}.unoptimized.zip >/dev/null || true -dist/kmk-latest.zip: compile +dist/kmk-latest.zip: compile boot.py @echo "===> Building optimized ZIP" @mkdir -p dist @cd $(MPY_TARGET_DIR) && zip -r ../dist/kmk-latest.zip kmk 2>&1 >/dev/null + @zip -r dist/kmk-latest.zip boot.py 2>&1 >/dev/null dist/$(DIST_DESCRIBE).zip: dist/kmk-latest.zip @echo "===> Aliasing optimized ZIP" @cp dist/kmk-latest.zip dist/kmk-$(DIST_DESCRIBE).zip -dist/kmk-latest.unoptimized.zip: $(PY_KMK_TREE) +dist/kmk-latest.unoptimized.zip: $(PY_KMK_TREE) boot.py @echo "===> Building unoptimized ZIP" @mkdir -p dist @echo "KMK_RELEASE = '$(DIST_DESCRIBE)'" > kmk/release_info.py - @zip -r dist/kmk-latest.unoptimized.zip kmk 2>&1 >/dev/null + @zip -r dist/kmk-latest.unoptimized.zip kmk boot.py 2>&1 >/dev/null @rm -rf kmk/release_info.py dist/$(DIST_DESCRIBE).unoptimized.zip: dist/kmk-latest.unoptimized.zip diff --git a/README.md b/README.md index 0fcc6a0..715840a 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,9 @@ Coming (hopefully) soon: Bluetooth support! Stay tuned. extract the zip to the USB drive exposed by CircuitPython, typically labeled `CIRCUITPY`. Again, [we'll defer to Adafruit's documentation](https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries) - on adding libraries to a CircuitPython installation. + on adding libraries to a CircuitPython installation. You should end up with a + folder called `kmk` and a file called `boot.py`, both living at the top of + this USB drive. - Define your keyboard in a file called `main.py` on this `CIRCUITPY` drive and get tinkering! Examples of both handwired and ProMicro-\>ItsyBitsy converted diff --git a/docs/flashing.md b/docs/flashing.md index 9069e66..9ddb6ec 100644 --- a/docs/flashing.md +++ b/docs/flashing.md @@ -8,8 +8,11 @@ Linux). Given `make` and `rsync` are available on your system (in `$PATH`), the following will copy the `kmk` tree to your CircuitPython device, and will copy -the file defined as `USER_KEYMAP` as your `main.py`. If any of these files exist -on your CircuitPython device already, they will be overwritten without a prompt. +the file defined as `USER_KEYMAP` as your `main.py`. It will also copy our +`boot.py`, which allocates a larger stack size (simply - more of the device's +RAM will be available to KMK and your keyboard config) than CircuitPython's +default. If any of these files exist on your CircuitPython device already, they +will be overwritten without a prompt. If you get permissions errors here, **don't run make as root or with sudo**. See `Troubleshooting` below.