aboutsummaryrefslogtreecommitdiff
path: root/circuitpython/extmod/ulab/build/esp32-cmake.sh
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2022-06-19 19:47:51 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2022-06-19 19:47:51 +0530
commit4fd287655a72b9aea14cdac715ad5b90ed082ed2 (patch)
tree65d393bc0e699dd12d05b29ba568e04cea666207 /circuitpython/extmod/ulab/build/esp32-cmake.sh
parent0150f70ce9c39e9e6dd878766c0620c85e47bed0 (diff)
add circuitpython code
Diffstat (limited to 'circuitpython/extmod/ulab/build/esp32-cmake.sh')
-rw-r--r--circuitpython/extmod/ulab/build/esp32-cmake.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/circuitpython/extmod/ulab/build/esp32-cmake.sh b/circuitpython/extmod/ulab/build/esp32-cmake.sh
new file mode 100644
index 0000000..0093c5b
--- /dev/null
+++ b/circuitpython/extmod/ulab/build/esp32-cmake.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+export BUILD_DIR=$(pwd)
+
+echo "--- CLONING ULAB ---"
+git clone --depth 1 https://github.com/v923z/micropython-ulab.git ulab
+
+echo "--- CLONING MICROPYTHON ---"
+git clone --depth 1 https://github.com/micropython/micropython.git
+
+echo "--- CLONING ESP-IDF ---"
+cd $BUILD_DIR/micropython/
+git clone --depth 1 -b v4.0.2 --recursive https://github.com/espressif/esp-idf.git
+
+echo "--- INSTALL ESP-IDF ---"
+cd $BUILD_DIR/micropython/esp-idf
+./install.sh
+. ./export.sh
+
+echo "--- MPY-CROSS ---"
+cd $BUILD_DIR/micropython/mpy-cross
+make
+
+echo "--- ESP32 SUBMODULES ---"
+cd $BUILD_DIR/micropython/ports/esp32
+make submodules
+
+echo "--- PATCH MAKEFILE ---"
+cp $BUILD_DIR/micropython/ports/esp32/Makefile $BUILD_DIR/micropython/ports/esp32/MakefileOld
+echo "BOARD = GENERIC" > $BUILD_DIR/micropython/ports/esp32/Makefile
+echo "USER_C_MODULES = \$(BUILD_DIR)/ulab/code/micropython.cmake" >> $BUILD_DIR/micropython/ports/esp32/Makefile
+cat $BUILD_DIR/micropython/ports/esp32/MakefileOld >> $BUILD_DIR/micropython/ports/esp32/Makefile
+
+echo "--- MAKE ---"
+make