Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors while compiling the project #7

Closed
tb1402 opened this issue May 6, 2023 · 3 comments
Closed

Errors while compiling the project #7

tb1402 opened this issue May 6, 2023 · 3 comments

Comments

@tb1402
Copy link

tb1402 commented May 6, 2023

Hello,
I'm using this project for a while now, but I would like to change the default resolution to 720p/HD, but I can't compile the project.

I'm using esp-idf for the first time and set it up according to your description in issue #1 (installing and setting compiler path via menuconfig).
I now have esp-idf v4.4 with xtensa-esp32-gcc8_4_0-esp-2021r2-patch4 compiler (from here https://github.com/espressif/crosstool-NG ) installed.
I'm using up-to-date amd64 Manjaro-Linux.

When i run make, the following errors are occurring:

In file included from ~/esp4.4/esp-idf/components/perfmon/xtensa_perfmon_access.c:16:
~/esp4.4/esp-idf/components/perfmon/xtensa_perfmon_access.c: In function 'xtensa_perfmon_init':
~/esp4.4/esp-idf/components/xtensa/include/xtensa-debug-module.h:80:29: error: 'XCHAL_NUM_PERF_COUNTERS' undeclared (first use in this function)
 #define ERI_PERFMON_MAX     XCHAL_NUM_PERF_COUNTERS
                             ^~~~~~~~~~~~~~~~~~~~~~~

~/esp4.4/esp-idf/components/perfmon/xtensa_perfmon_access.c:22:15: note: in expansion of macro 'ERI_PERFMON_MAX'
     if (id >= ERI_PERFMON_MAX) {
               ^~~~~~~~~~~~~~~
~/esp4.4/esp-idf/components/xtensa/include/xtensa-debug-module.h:80:29: note: each undeclared identifier is reported only once for each function it appears in
 #define ERI_PERFMON_MAX     XCHAL_NUM_PERF_COUNTERS
                             ^~~~~~~~~~~~~~~~~~~~~~~
~/esp4.4/esp-idf/components/perfmon/xtensa_perfmon_access.c:22:15: note: in expansion of macro 'ERI_PERFMON_MAX'
     if (id >= ERI_PERFMON_MAX) {
               ^~~~~~~~~~~~~~~
~/esp4.4/esp-idf/components/perfmon/xtensa_perfmon_access.c: In function 'xtensa_perfmon_dump':
~/esp4.4/esp-idf/components/xtensa/include/xtensa-debug-module.h:80:29: error: 'XCHAL_NUM_PERF_COUNTERS' undeclared (first use in this function)
 #define ERI_PERFMON_MAX     XCHAL_NUM_PERF_COUNTERS
                             ^~~~~~~~~~~~~~~~~~~~~~~
~/esp4.4/esp-idf/components/perfmon/xtensa_perfmon_access.c:42:26: note: in expansion of macro 'ERI_PERFMON_MAX'
     for (int i = 0 ; i < ERI_PERFMON_MAX ; i++) {
                          ^~~~~~~~~~~~~~~
~/esp4.4/esp-idf/components/perfmon/xtensa_perfmon_access.c: In function 'xtensa_perfmon_reset':
~/esp4.4/esp-idf/components/xtensa/include/xtensa-debug-module.h:80:29: error: 'XCHAL_NUM_PERF_COUNTERS' undeclared (first use in this function)
 #define ERI_PERFMON_MAX     XCHAL_NUM_PERF_COUNTERS
                             ^~~~~~~~~~~~~~~~~~~~~~~
~/esp4.4/esp-idf/components/perfmon/xtensa_perfmon_access.c:52:15: note: in expansion of macro 'ERI_PERFMON_MAX'
     if (id >= ERI_PERFMON_MAX) {
               ^~~~~~~~~~~~~~~
~/esp4.4/esp-idf/components/perfmon/xtensa_perfmon_access.c: In function 'xtensa_perfmon_value':
~/esp4.4/esp-idf/components/xtensa/include/xtensa-debug-module.h:80:29: error: 'XCHAL_NUM_PERF_COUNTERS' undeclared (first use in this function)
 #define ERI_PERFMON_MAX     XCHAL_NUM_PERF_COUNTERS
                             ^~~~~~~~~~~~~~~~~~~~~~~
~/esp4.4/esp-idf/components/perfmon/xtensa_perfmon_access.c:71:15: note: in expansion of macro 'ERI_PERFMON_MAX'
     if (id >= ERI_PERFMON_MAX) {
               ^~~~~~~~~~~~~~~
~/esp4.4/esp-idf/components/perfmon/xtensa_perfmon_access.c: In function 'xtensa_perfmon_overflow':
~/esp4.4/esp-idf/components/xtensa/include/xtensa-debug-module.h:80:29: error: 'XCHAL_NUM_PERF_COUNTERS' undeclared (first use in this function)
 #define ERI_PERFMON_MAX     XCHAL_NUM_PERF_COUNTERS
                             ^~~~~~~~~~~~~~~~~~~~~~~
~/esp4.4/esp-idf/components/perfmon/xtensa_perfmon_access.c:80:15: note: in expansion of macro 'ERI_PERFMON_MAX'
     if (id >= ERI_PERFMON_MAX) {
               ^~~~~~~~~~~~~~~
make[1]: *** [~/esp4.4/esp-idf/make/component_wrapper.mk:298: xtensa_perfmon_access.o] Error 1
make: *** [~/esp4.4/esp-idf/make/project.mk:649: component-perfmon-build] Error 2

It would be nice, if you could help me to resolve this issue or if you could provide a binary with 720p default resolution (or maybe store it on the board, like the wifi credentials).

@xenpac
Copy link
Owner

xenpac commented May 13, 2023

In espcam2640.c, line 122, replace FRAMESIZE_VGA with FRAMESIZE_P_HD, // 720x1280
This sets the default resolution. (sensor.h)

as for your errors, something seems wrong with configuration. try a demo project if it compiles.
looks like perfmon, the performance monitor.

@tb1402
Copy link
Author

tb1402 commented May 14, 2023

I've already changed the framesize when I got the errors above, but I used FRAMESIZE_HD without _P as you suggested, is there any difference?

As for the errors, I got it working today by starting with a fresh install of esp-idf4.4.4. After the example "hello world" compiled successfully, I also used a fresh clone of this repo.
During my previous attempts I switched between esp-idf versions, I think that messed up something in the project folder and caused the errors.

@xenpac
Copy link
Owner

xenpac commented May 15, 2023

framesize_t is defined in:
https://github.com/xenpac/ESP32-CAM-Linux-Motion/tree/main/components/esp32-camera-master/driver/include/sensor.h

or just enter the number 11 which should be HD, its probably FRAMESIZE_HD, as the higher ones not used for ov2640.

@xenpac xenpac closed this as completed May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants