ESP32-cam error( Can't build MicroPython firmware)

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
Jasou
Posts: 4
Joined: Tue Sep 10, 2019 2:59 pm

ESP32-cam error( Can't build MicroPython firmware)

Post by Jasou » Tue Sep 10, 2019 3:08 pm

Hi everyone
I was trying to set up micropython firmware and i got this error

$ make
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
GEN build/genhdr/qstr.i.last
modcamera.c:3:24: fatal error: esp_camera.h: No such file or directory
compilation terminated.
../../py/mkrules.mk:74: recipe for target 'build/genhdr/qstr.i.last' failed
make: *** [build/genhdr/qstr.i.last] Error 1
make: *** Deleting file 'build/genhdr/qstr.i.last'

Any solution ?

User avatar
jimmo
Posts: 648
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia

Re: ESP32-cam error( Can't build MicroPython firmware)

Post by jimmo » Tue Sep 10, 2019 9:37 pm

Can you include more information about your set up, i.e. what idf hash, the contents of your makefile (or GNUmakefile), and how you set your PATH.

Jasou
Posts: 4
Joined: Tue Sep 10, 2019 2:59 pm

Re: ESP32-cam error( Can't build MicroPython firmware)

Post by Jasou » Wed Sep 11, 2019 10:24 am

Thank you for your reply ,
for my set up
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

Supported hash code :5c88c5996dbde6208e3bec05abc21ff6cd822d26
...................................................................
makefile :
ESPIDF = /home/jasser/micropython/esp-idf/
#PORT = /dev/ttyUSB0
#FLASH_MODE = qio
#FLASH_SIZE = 4MB
#CROSS_COMPILE = xtensa-esp32-elf-
#SDKCONFIG = boards/sdkconfig.spiram

include Makefile
..................................................................
for my PATH

export PATH=/home/jasser/micropython/xtensa-esp32-elf/bin:$PATH

User avatar
jimmo
Posts: 648
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia

Re: ESP32-cam error( Can't build MicroPython firmware)

Post by jimmo » Wed Sep 11, 2019 11:06 am

What is modcamera.c ? Is this your own module or a different fork of MicroPython?

Jasou
Posts: 4
Joined: Tue Sep 10, 2019 2:59 pm

Re: ESP32-cam error( Can't build MicroPython firmware)

Post by Jasou » Wed Sep 11, 2019 11:22 am

I really don't know , i tried the standard micropython for esp32 cam from here
https://github.com/tsaarni/micropython- ... 2-cam/wiki
and also from here https://github.com/Lennyz1988/micropyth ... ses/tag/v1
and i got the same error

User avatar
jimmo
Posts: 648
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia

Re: ESP32-cam error( Can't build MicroPython firmware)

Post by jimmo » Wed Sep 11, 2019 12:19 pm

Have you done the step "Clone the esp32-camera-for-micropython repository under ESP-IDF components sub-directory" from that wiki you linked to?

Jasou
Posts: 4
Joined: Tue Sep 10, 2019 2:59 pm

Re: ESP32-cam error( Can't build MicroPython firmware)

Post by Jasou » Wed Sep 11, 2019 2:08 pm

Yea done
git clone https://github.com/tsaarni/esp32-camera ... python.git
fatal: destination path 'esp32-camera-for-micropython' already exists and is not an empty directory.

rpr
Posts: 71
Joined: Sat Oct 27, 2018 5:17 pm

Re: ESP32-cam error( Can't build MicroPython firmware)

Post by rpr » Thu Sep 12, 2019 6:43 am

Change the name of the esp32-camera-for-micropython to just esp32-camera inside the esp-idf/components folder and try to build it.

Edit to add: This version of micropython that the OP is building is from the pycopy fork. I was able to build it with mainline but this required some changes as the format of the boards + the Makefile etc has changed within the ports/esp32 folder .

Post Reply