esp32s3 camera example

Gaston1980
Posts: 18
Joined: Sun Oct 06, 2024 10:26 am

esp32s3 camera example

Postby Gaston1980 » Sat Oct 19, 2024 9:04 pm

hi to all, I download from github the camera example for the esp32s3 and I'm using vscode with esp idf extension.
When I tried to compile the example I got this:

Code: Select all

CMake Error at CMakeLists.txt:106 (idf_component_register):
  Unknown CMake command "idf_component_register".
and I don't know how to solve it. The example folder is not contain in the esp32 installation folder
Thanks
Gastón

Gaston1980
Posts: 18
Joined: Sun Oct 06, 2024 10:26 am

Re: esp32s3 camera example

Postby Gaston1980 » Sun Oct 20, 2024 3:40 am

I downloaded the camera example from github and tried to compile with vscode. I copied the camera example to installation folder esp idf under examples folder. If I select the take a picture example the compiler ask for the "esp_camera.h", which is 2 folder up. If I select the hole folder master_camera, the compiler throw error about CMakeFile not been found. For what it seems, there is no API for the camera ( I already post about this..but 'till now answers) and checking the examples I guess it will take somethime to get there.
How do I compile this example? the CMake is correct? Why the compiler ask about it?
Cheers
Gastón

nopnop2002
Posts: 106
Joined: Thu Oct 03, 2019 10:52 pm

Re: esp32s3 camera example

Postby nopnop2002 » Sun Oct 20, 2024 6:38 am

I downloaded the camera example from github and tried to compile with vscode.
Where is the github URL?

Gaston1980
Posts: 18
Joined: Sun Oct 06, 2024 10:26 am

Re: esp32s3 camera example

Postby Gaston1980 » Sun Oct 20, 2024 1:24 pm


nopnop2002
Posts: 106
Joined: Thu Oct 03, 2019 10:52 pm

Re: esp32s3 camera example

Postby nopnop2002 » Sun Oct 20, 2024 10:15 pm

Please try removing this line.

https://github.com/espressif/esp32-came ... ent.yml#L4

Code: Select all

dependencies:
  espressif/esp32-camera:
    version: "*"

Gaston1980
Posts: 18
Joined: Sun Oct 06, 2024 10:26 am

Re: esp32s3 camera example

Postby Gaston1980 » Sun Oct 20, 2024 10:35 pm

hi nopnop and thanks for your reply,

I already downloaded the example camera. Inside the folder esp32-camera-master are more folder : driver---examples--sensors--target--test
I also download another example with this command ;

Code: Select all

idf.py create-project-from-example "espressif/esp32-camera:camera_example"
I open this folder with vscode and remove those lines in the idf_component.yml
I tried to build the example but the compiler can't find the esp_camera.h file (which is outisde the folder...contain inside the driver/include folder)

esp32-camera-master
|
|------>driver
|------>test
|------>camera-example
|------>sensors
|------>target
|------>examples

Is my understanding that I need to modify the CMakeFile to include those dirs, but how?

I tried this in the CMakeFile:

Code: Select all

cmake_minimum_required(VERSION 3.5)
set(EXTRA_COMPONENT_DIRS $(PROJECT_PATH)/../)
#set(COMPONENTS main)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(camera_example)
but the esp_camera.h can't be found.
If I try to create another project using those files I need to add some lines to the CMakeFile in order to use the esp_camera.h and other files. How?
Thanks
Gastón

nopnop2002
Posts: 106
Joined: Thu Oct 03, 2019 10:52 pm

Re: esp32s3 camera example

Postby nopnop2002 » Sun Oct 20, 2024 10:59 pm

vscode with esp idf extension is too complicated for me to use.

I was able to build it with the following.

Code: Select all

$ idf.py create-project-from-example "espressif/esp32-camera:camera_example"
$ cd camera_example/
$ idf.py build
Executing action: all (aliases: build)
Running ninja in directory /home/nop/camera_example/build
Executing "ninja all"...
[1/1] cd /home/nop/camera_example/buil...xample/build/bootloader/bootloader.bin
Bootloader binary size 0x6f50 bytes. 0x80b0 bytes (54%) free.
[4/4] cd /home/nop/camera_example/buil...amera_example/build/camera_example.bin
camera_example.bin binary size 0x3d050 bytes. Smallest app partition is 0x100000 bytes. 0xc2fb0 bytes (76%) free.

Project build complete. To flash, run:
 idf.py flash
or
 idf.py -p PORT flash
or
 python -m esptool --chip esp32 -b 460800 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 4MB --flash_freq 80m 0x1000 build/bootloader/bootloader.bin 0x10000 build/partition_table/partition-table.bin 0x20000 build/camera_example.bin
or from the "/home/nop/camera_example/build" directory
 python -m esptool --chip esp32 -b 460800 --before default_reset --after hard_reset write_flash "@flash_args"

Gaston1980
Posts: 18
Joined: Sun Oct 06, 2024 10:26 am

Re: esp32s3 camera example

Postby Gaston1980 » Sun Oct 20, 2024 11:34 pm

thanks nopnop2002, I was able to compile. Just a quick question about this. If I tried to crate a different folder outside the camera.master, and wanna add this sources files, do I need to add this sources to the CMakeFile right?
Thanks again
Gastón

P.S which ide did u use with esp32s3?

nopnop2002
Posts: 106
Joined: Thu Oct 03, 2019 10:52 pm

Re: esp32s3 camera example

Postby nopnop2002 » Mon Oct 21, 2024 4:26 am

If I tried to crate a different folder outside the camera.master, and wanna add this sources files, do I need to add this sources to the CMakeFile right?


All source files are placed inside a project.
Source files cannot be placed outside the project.

Code: Select all

- myProject/
             - CMakeLists.txt
             - sdkconfig
             - components/ - component1/ - CMakeLists.txt
                                         - Kconfig
                                         - src1.c
                           - component2/ - CMakeLists.txt
                                         - Kconfig
                                         - src1.c
                                         - include/ - component2.h
             - main/       - CMakeLists.txt
                           - src1.c
                           - src2.c

             - build/
Sources that are commonly used in multiple projects can be placed as components.
For components, you can have the source outside the project.
In this case, knowledge of the components is required.
Click here for component details.
https://docs.espressif.com/projects/esp ... ystem.html
which ide did u use with esp32s3?
I don't use an IDE.
I am using BASH command line.

Who is online

Users browsing this forum: Bing [Bot] and 77 guests