Open shownb opened 4 years ago
esp32 micopython ov2640
~目录建立micropython
sudo apt-get install git make gcc libncurses5-dev flex bison gperf python-serial
地址参考这个 https://docs.espressif.com/projects/esp-idf/zh_CN/latest/get-started-legacy/linux-setup.html
ESP-IDF V4.0 及之后版本的默认构建系统为 CMake。本文档主要针对之前基于 GNU Make 的传统构建系统。请注意,未来,我们可能不会继续支持基于 GNU Make 的构建系统。
curl https://dl.espressif.com/dl/xtensa-esp32-elf-gcc8_2_0-esp-2019r2-linux-amd64.tar.gz -O
解压文件到当前目录下并设置环境变量
nano ~/.profile export PATH=$PATH:~/micropython/xtensa-esp32-elf/bin source ~/.profile xtensa-esp32-elf-gcc -v
1.下载esp-idf
cd ~/micropython git clone https://github.com/espressif/esp-idf.git cd esp-idf git checkout 143d26aa49df524e10fb8e41a71d12e731b9b71d #这个id到micropython的ports/esp32/Makefile查找最新的。 git submodule update --init --recursive
设置环境变量
nano ~/.profile #添加 export IDF_PATH=~/micropython/esp-idf source ~/.profile
cd $MICROPYTHON/esp-idf/components git clone https://github.com/espressif/esp32-camera.git git checkout 113629b1cf8769f65c09db0c3577a597e652860b 备注一 cd $MICROPYTHON git clone https://github.com/micropython/micropython.git cd $MICROPYTHON/micropython/ports/esp32 备注二 make PYTHON=python2
备注一 改一下这个 https://github.com/tsaarni/esp32-camera-for-micropython/commit/e450d21841a164bd92bdce72e54ea35557800c30 备注二 查看一下为了添加模块要做的修改 https://github.com/tsaarni/micropython-with-esp32-cam/commit/584bc5b2a90becb6b8223bd60f54bdd7405fb651
$ cd micropython_src/ $ mkdir MP26102019 $ cd MP26102019 $ pwd /home/sharil/micropython_src/MP26102019 $ git clone https://github.com/espressif/esp-idf.git $ git clone https://github.com/micropython/micropython $ ls esp-idf micropython $ cat micropython/ports/esp32/Makefile | grep ESPIDF_SUPHASH | head -1 ESPIDF_SUPHASH_V3 := 6ccb4cf5b7d1fdddb8c2492f9cbc926abaf230df $ export PATH="/home/sharil/micropython/xtensa-esp32-elf/bin:/home/sharil/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" $ export ESPIDF=/home/sharil/micropython_src/MP26102019/esp-idf $ cd $ESPIDF $ git checkout 6ccb4cf5b7d1fdddb8c2492f9cbc926abaf230df $ git submodule update --init --recursive $ cd components $ git clone https://github.com/espressif/esp32-camera.git $ cd ../../micropython/ $ git submodule update --init --recursive $ make -C mpy-cross $ cd ports $ cp -r esp32 esp32-cam $ cd esp32-cam $ export MPTD=/home/sharil/Downloads/esp32-cam-1-11-498 $ cp $MPTD/main.c . $ cp $MPTD/Makefile . $ cp $MPTD/modcamera.c . $ cp $MPTD/mpconfigport.h . $ cp $MPTD/boards/manifest.py ./boards/manifest.py $ cp $MPTD/boards/sdkconfig.base ./boards/sdkconfig.base $ make clean $ make
添加st7789驱动 https://github.com/devbis/st7789_mpy
可以参考流程4 这里注意几个问题。 针对的是最新版本的https://github.com/espressif/esp32-camera/tree/b1c9712d11188771f28fe45aedf9c051db9b969e 我的硬件是ttgo-camera-plus 引脚与众不同。fuck Kconfig里面,把OV3660_SUPPORT改为n SCCB_HARDWARE_I2C改为n
然后还是失败了。把camera 的1208行
gpio_install_isr_service(ESP_INTR_FLAG_LEVEL1 | ESP_INTR_FLAG_IRAM); /* if (err != ESP_OK) { ESP_LOGE(TAG, "gpio_install_isr_service failed (%x)", err); goto fail; } */
esp32 micopython ov2640
~目录建立micropython
壹 安装交叉编译工具链所依赖的环境
sudo apt-get install git make gcc libncurses5-dev flex bison gperf python-serial
贰 在官网上下载最新的交叉编译链
地址参考这个 https://docs.espressif.com/projects/esp-idf/zh_CN/latest/get-started-legacy/linux-setup.html
curl https://dl.espressif.com/dl/xtensa-esp32-elf-gcc8_2_0-esp-2019r2-linux-amd64.tar.gz -O
解压文件到当前目录下并设置环境变量
叁 安装esp-idf开发套件
1.下载esp-idf
设置环境变量
肆 安装microPython esp32
cd $MICROPYTHON/esp-idf/components git clone https://github.com/espressif/esp32-camera.git git checkout 113629b1cf8769f65c09db0c3577a597e652860b 备注一 cd $MICROPYTHON git clone https://github.com/micropython/micropython.git cd $MICROPYTHON/micropython/ports/esp32 备注二 make PYTHON=python2
备注一 改一下这个 https://github.com/tsaarni/esp32-camera-for-micropython/commit/e450d21841a164bd92bdce72e54ea35557800c30 备注二 查看一下为了添加模块要做的修改 https://github.com/tsaarni/micropython-with-esp32-cam/commit/584bc5b2a90becb6b8223bd60f54bdd7405fb651
添加st7789驱动 https://github.com/devbis/st7789_mpy
伍 编译带esp32-camera的micropython过程
可以参考流程4 这里注意几个问题。 针对的是最新版本的https://github.com/espressif/esp32-camera/tree/b1c9712d11188771f28fe45aedf9c051db9b969e 我的硬件是ttgo-camera-plus 引脚与众不同。fuck Kconfig里面,把OV3660_SUPPORT改为n SCCB_HARDWARE_I2C改为n
然后还是失败了。把camera 的1208行