4 # create only relevant directories on the board
5 find testing -type d | \
6 grep -v -E "(^./.git|^./.idea|^./.vscode|__pycache__)" | \
7 grep -v -E '^testing/implementation/micropython*' | \
8 xargs -n1 -I {} sh -c "echo Creating directory {} ...; ampy --port ${PORT} mkdir --exists-okay {}"
10 # put top-level .py modules in place
13 echo "Copying ${NAME}.py ..."
14 ampy --port ${PORT} put ${NAME}.py ${NAME}.py
17 # put top-level .mpy modules in place
20 echo "Copying ${NAME}.mpy ..."
21 ampy --port ${PORT} put ${NAME}.mpy ${NAME}.mpy
24 # recursively sync module folders excluding packages
25 # already provided by circuitpython, and excluding
26 # testing packages targeting micropython
29 find ${NAME} -name '*.py'| \
30 grep -v -E '^testing/implementation/micropython*' | \
31 grep -v -E '^testing/mcp.py' | \
32 xargs -n1 -I {} sh -c "echo Copying {} ...; ampy --port ${PORT} put {} {}"
40 echo "Copying module adafruit_bus_device..."
41 cd Adafruit_CircuitPython_BusDevice # change into different repo
42 ampy --port ${PORT} mkdir --exists-okay adafruit_bus_device
43 ampy --port ${PORT} put adafruit_bus_device/__init__.py adafruit_bus_device/__init__.py
44 ampy --port ${PORT} put adafruit_bus_device/i2c_device.py adafruit_bus_device/i2c_device.py
47 # Compile BME280 to bytecode
48 ./circuitpython_2.2.3/mpy-cross/mpy-cross Adafruit_CircuitPython_BME280/adafruit_bme280.py
51 echo "Copying module adafruit_bme..."
52 cd Adafruit_CircuitPython_BME280 # change into different repo
53 ampy --port ${PORT} put adafruit_bme280.mpy adafruit_bme280.mpy