From 1ed2be66e64fb7f434615c0448ec1a7073650314 Mon Sep 17 00:00:00 2001 From: Josh Klar Date: Mon, 1 Oct 2018 22:14:06 -0700 Subject: [PATCH] Load KMK from frozen modules on STM32 (no more ampy-flashed entrypoints) --- Makefile | 18 +++--------------- vendor/micropython | 2 +- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index d794e94..f5c7f6d 100644 --- a/Makefile +++ b/Makefile @@ -123,15 +123,6 @@ micropython-build-pyboard: micropython-flash-pyboard: micropython-build-pyboard @make -j4 -C vendor/micropython/ports/stm32/ BOARD=PYBV11 FROZEN_MPY_DIR=freeze deploy -micropython-flash-pyboard-entrypoint: - @echo "===> Flashing entrypoints if they doesn't already exist" - @sleep 4 - @-timeout -k 5s 10s pipenv run ampy -p ${AMPY_PORT} -d ${AMPY_DELAY} -b ${AMPY_BAUD} rm /flash/main.py 2>/dev/null - @-timeout -k 5s 10s pipenv run ampy -p ${AMPY_PORT} -d ${AMPY_DELAY} -b ${AMPY_BAUD} rm /flash/boot.py 2>/dev/null - @-timeout -k 5s 10s pipenv run ampy -p ${AMPY_PORT} -d ${AMPY_DELAY} -b ${AMPY_BAUD} put kmk/entrypoints/global.py /flash/main.py - @-timeout -k 5s 10s pipenv run ampy -p ${AMPY_PORT} -d ${AMPY_DELAY} -b ${AMPY_BAUD} put kmk/entrypoints/handwire/pyboard_boot.py /flash/boot.py - @echo "===> Flashed keyboard successfully!" - circuitpy-flash-nrf-entrypoint: @echo "===> Flashing entrypoint if it doesn't already exist" @sleep 2 @@ -197,12 +188,9 @@ endif flash-pyboard: lint devdeps micropython-deps micropython-freeze-kmk-stm32 @echo "===> Preparing keyboard script for bundling into MicroPython" @cp -av ${USER_KEYMAP} vendor/micropython/ports/stm32/freeze/kmk_keyboard_user.py -ifndef SKIP_ENTRYPOINTS - @$(MAKE) AMPY_PORT=/dev/ttyACM0 AMPY_BAUD=115200 micropython-flash-pyboard micropython-flash-pyboard-entrypoint - @$(MAKE) AMPY_PORT=/dev/ttyACM0 AMPY_BAUD=115200 reset-board -else - @$(MAKE) AMPY_PORT=/dev/ttyACM0 AMPY_BAUD=115200 micropython-flash-pyboard -endif + @cp -av kmk/entrypoints/global.py vendor/micropython/ports/stm32/freeze/_main.py + @cp -av kmk/entrypoints/handwire/pyboard_boot.py vendor/micropython/ports/stm32/freeze/_boot.py + @$(MAKE) micropython-flash-pyboard endif reset-bootloader: diff --git a/vendor/micropython b/vendor/micropython index 4609547..65a49fa 160000 --- a/vendor/micropython +++ b/vendor/micropython @@ -1 +1 @@ -Subproject commit 460954734e12074d29056b446d1406a27e2aed9f +Subproject commit 65a49fa3c80e7432ccb35b9f34e5c4c0a62b933d