From ec9591ad8afacc3fb8a52606390631d4ef909c43 Mon Sep 17 00:00:00 2001 From: Josh Klar Date: Sun, 7 Oct 2018 01:39:04 -0700 Subject: [PATCH] Makefile: Enable keymap checker on SAMD51. Fix Unix MPY build --- Makefile | 14 +++++++------- upy-unix-stubs/digitalio.py | 3 +++ upy-unix-stubs/usb_hid.py | 1 + 3 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 upy-unix-stubs/digitalio.py create mode 100644 upy-unix-stubs/usb_hid.py diff --git a/Makefile b/Makefile index 18d0306..d747289 100644 --- a/Makefile +++ b/Makefile @@ -78,22 +78,22 @@ freeze-stm32-build-deps: build/micropython/ports/stm32/freeze/.kmk_frozen build/micropython/ports/unix/modules/.kmk_frozen: upy-freeze.txt submodules.toml @echo "===> Preparing builded dependencies for local development" - @rm -rf build/micropython/ports/unix/freeze/* - @cat $< | egrep -v '(^#|^\s*$|^\s*\t*#)' | grep MICROPY | cut -d'|' -f2- | \ - xargs -I '{}' cp -a {} build/micropython/ports/unix/freeze/ + @rm -rf build/micropython/ports/unix/modules/* + @cat upy-freeze.txt | egrep -v '(^#|^\s*$|^\s*\t*#)' | grep MICROPY | cut -d'|' -f2- | \ + xargs -I '{}' cp -a {} build/micropython/ports/unix/modules/ @touch $@ build/circuitpython/ports/atmel-samd/modules/.kmk_frozen: upy-freeze.txt submodules.toml @echo "===> Preparing builded dependencies for bundling" @rm -rf build/circuitpython/ports/atmel-samd/modules/* - @cat $< | egrep -v '(^#|^\s*$|^\s*\t*#)' | grep CIRCUITPY | cut -d'|' -f2- | \ + @cat upy-freeze.txt | egrep -v '(^#|^\s*$|^\s*\t*#)' | grep CIRCUITPY | cut -d'|' -f2- | \ xargs -I '{}' cp -a {} build/circuitpython/ports/atmel-samd/modules/ @touch $@ build/circuitpython/ports/nrf/freeze/.kmk_frozen: upy-freeze.txt submodules.toml @echo "===> Preparing builded dependencies for bundling" @rm -rf build/circuitpython/ports/nrf/freeze/* - @cat $< | egrep -v '(^#|^\s*$|^\s*\t*#)' | grep CIRCUITPY | cut -d'|' -f2- | \ + @cat upy-freeze.txt | egrep -v '(^#|^\s*$|^\s*\t*#)' | grep CIRCUITPY | cut -d'|' -f2- | \ xargs -I '{}' cp -a {} build/circuitpython/ports/nrf/freeze/ @touch $@ @@ -101,7 +101,7 @@ build/micropython/ports/teensy/freeze/.kmk_frozen: upy-freeze.txt submodules.tom @echo "===> Preparing builded dependencies for bundling" @mkdir -p build/micropython/ports/teensy/freeze/ @rm -rf build/micropython/ports/teensy/freeze/* - @cat $< | egrep -v '(^#|^\s*$|^\s*\t*#)' | grep MICROPY | cut -d'|' -f2- | \ + @cat upy-freeze.txt | egrep -v '(^#|^\s*$|^\s*\t*#)' | grep MICROPY | cut -d'|' -f2- | \ xargs -I '{}' cp -a {} build/circuitpython/ports/teensy/freeze/ @touch $@ @@ -109,7 +109,7 @@ build/micropython/ports/stm32/freeze/.kmk_frozen: upy-freeze.txt submodules.toml @echo "===> Preparing builded dependencies for bundling" @mkdir -p build/micropython/ports/stm32/freeze/ @rm -rf build/micropython/ports/stm32/freeze/* - @cat $< | egrep -v '(^#|^\s*$|^\s*\t*#)' | grep MICROPY | cut -d'|' -f2- | \ + @cat upy-freeze.txt | egrep -v '(^#|^\s*$|^\s*\t*#)' | grep MICROPY | cut -d'|' -f2- | \ xargs -I '{}' cp -a {} build/micropython/ports/stm32/freeze/ @touch $@ diff --git a/upy-unix-stubs/digitalio.py b/upy-unix-stubs/digitalio.py new file mode 100644 index 0000000..b293fa2 --- /dev/null +++ b/upy-unix-stubs/digitalio.py @@ -0,0 +1,3 @@ +class DigitalInOut: + def __init__(self, *args, **kwargs): + pass diff --git a/upy-unix-stubs/usb_hid.py b/upy-unix-stubs/usb_hid.py new file mode 100644 index 0000000..1b2034a --- /dev/null +++ b/upy-unix-stubs/usb_hid.py @@ -0,0 +1 @@ +devices = []