Issues Compiling ESP32-Cam firmware

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
ani-rudh
Posts: 2
Joined: Tue Sep 14, 2021 1:55 pm

Issues Compiling ESP32-Cam firmware

Post by ani-rudh » Tue Sep 14, 2021 2:31 pm

Hi,

I am trying to follow the tutorial here to compile the micropython v1.17 for ESP-32 Cam: https://github.com/lemariva/micropython-camera-driver and https://lemariva.com/blog/2020/03/tutor ... python-v20

After step 3 in https://lemariva.com/blog/2020/03/tutor ... python-v20, I am unsure as to how esp-idf is installed and used in the further steps? After compiling the micropython cross-compiler, I am not able to build the firmware with 'make BOARD=GENERIC_CAM'
command. I recieve the error: 'idf.py command not found'

Has anybody succeeded in compiling micropython with cam support this way? Can you please help?

The reason I am doing this is due to the missing urequests module in the precompiled esp32-cam firmware here: https://github.com/lemariva/micropython-camera-driver. If someone has successfully used urequests to make https requests (to telegram api), please do share how to use it properly. I have tried a few modules that were posted in the forum here: viewtopic.php?f=2&t=5295&start=10#p53737 but with no success in making https calls.

Thank You :)

marcidy
Posts: 133
Joined: Sat Dec 12, 2020 11:07 pm

Re: Issues Compiling ESP32-Cam firmware

Post by marcidy » Fri Sep 17, 2021 3:55 am

Have you followed the instructions at https://idf.espressif.com ? That would be the first place to start to install the esp-idf.

uraich
Posts: 56
Joined: Tue Mar 26, 2019 12:24 pm

Re: Issues Compiling ESP32-Cam firmware

Post by uraich » Mon Sep 20, 2021 7:40 am

Hi,
I have no problem in compiling the esp32-cam micropython version. However, I have a problem running the driver (see my recent post)
I guess you did not compile "standard micropython" (micropython without the esp32-cam driver) either. This is what I would try first.
In order to access idf.py you must have esp-idf installed and the environment variables ESPIDF and IDF_PATH must point to it.
(export ESPIDF=wherever_you_installed_esp-idf). You must run install.sh in esp-idf to install the esp32 gcc cross-compiler chains, and you should have PATH set up in such a way that the system can file the compilers. They will be installed in $HOME/.espressif.
Finally, you must compile micropython from within a Python virtual environment with all Python modules of correct versions installed. Have a look at install.sh and export.sh in esp-idf.
Running standard micropython on the esp32-cam works perfectly fine. You will have no access to the camera, though.
Good luck!

Post Reply