bitluni / ESP32CameraI2S

169 stars 61 forks source link

It is not compiling #11

Closed shikharuniyal closed 5 years ago

shikharuniyal commented 5 years ago

when i try to compile the code it is showing this type of error:-

**C:\Users\SHIKHAR\Documents\Arduino\libraries\Adafruit-ST7735-Library-master\Adafruit_ST7735.cpp: In member function 'virtual void Adafruit_ST7735::setRotation(uint8_t)':

C:\Users\SHIKHAR\Documents\Arduino\libraries\Adafruit-ST7735-Library-master\Adafruit_ST7735.cpp:292:6: error: '_xstart' was not declared in this scope

  _xstart   = _colstart;

  ^

C:\Users\SHIKHAR\Documents\Arduino\libraries\Adafruit-ST7735-Library-master\Adafruit_ST7735.cpp:293:6: error: '_ystart' was not declared in this scope

  _ystart   = _rowstart;

  ^

exit status 1 Error compiling for board WEMOS LOLIN32.**

can anyone give a sol. for this error.

shikharuniyal commented 5 years ago

when i updated the driver it is showing

**_In file included from sketch\I2SCamera.h:17:0,

             from sketch\OV7670.h:2,

             from C:\Users\SHIKHAR\Desktop\ESP32CameraI2S-master\ESP32_I2S_Camera\ESP32_I2S_Camera.ino:15:

DMABuffer.h:2: error: 'malloc' does not name a type

malloc

^

In file included from sketch\OV7670.h:2:0,

             from C:\Users\SHIKHAR\Desktop\ESP32CameraI2S-master\ESP32_I2S_Camera\ESP32_I2S_Camera.ino:15:

I2SCamera.h:31: error: 'DMABuffer' does not name a type

static DMABuffer **dmaBuffer;

      ^

exit status 1 'malloc' does not name a type_**

please help me out!!!!!

johannes1999 commented 5 years ago

When i try to compile i get a similar error: " In file included from sketch\I2SCamera.h:17:0,

             from sketch\OV7670.h:2,

             from sketch\OV7670.cpp:1:

sketch\DMABuffer.h: In constructor 'DMABuffer::DMABuffer(int)':

DMABuffer.h:10:43: error: 'malloc' was not declared in this scope

 buffer = (unsigned char *)malloc(bytes);

                                       ^

In file included from sketch\I2SCamera.h:17:0,

             from sketch\I2SCamera.cpp:6:

sketch\DMABuffer.h: In constructor 'DMABuffer::DMABuffer(int)':

DMABuffer.h:10:43: error: 'malloc' was not declared in this scope

 buffer = (unsigned char *)malloc(bytes);

                                       ^

"

When I downgraded the esp32 version in the boardmanager from 1.0.1 to 1.0.0 then it compiled, but the programm does not run an gave me that message over the serial interface: "E (3646) ledc: ledc_set_duty_with_hpoint(383): hpoint argument is invalid"

I have also tried to downgrade the IDE to version 1.8.4 which bitluni used, but that made no difference.

shikharuniyal commented 5 years ago

i again tried with newer version and the results are same In file included from sketch\I2SCamera.h:17:0,

             from sketch\I2SCamera.cpp:6:

sketch\DMABuffer.h: In constructor 'DMABuffer::DMABuffer(int)':

DMABuffer.h:10: error: 'malloc' was not declared in this scope

 buffer = (unsigned char *)malloc(bytes);

                                       ^

exit status 1 'malloc' was not declared in this scope

i think that might including a library for this may correct this error

shikharuniyal commented 5 years ago

i had tried to use this malloc.h from https://github.com/esp8266/Arduino/blob/master/tools/sdk/libc/xtensa-lx106-elf/include/malloc.h in a new tab and now it shows Arduino: 1.8.2 (Windows XP), Board: "WEMOS LOLIN32, 80MHz, Default, 921600"

Traceback (most recent call last):

File "esptool.py", line 35, in

File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module

File "site-packages\serial__init__.py", line 27, in

File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module

File "site-packages\serial\serialwin32.py", line 15, in

File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module

File "site-packages\serial\win32.py", line 182, in

File "ctypes__init.py", line 375, in getattr__

File "ctypes__init.py", line 380, in getitem__

AttributeError: function 'CancelIoEx' not found

Failed to execute script esptool

exit status -1 Error compiling for board WEMOS LOLIN32.

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

shikharuniyal commented 5 years ago

do we have to put a int value in place of bytes if it is so then which value class DMABuffer { public: lldesc_t descriptor; unsigned char buffer; DMABuffer(int bytes) { buffer = (unsigned char )malloc(bytes); descriptor.length = bytes; descriptor.size = descriptor.length; descriptor.owner = 1; descriptor.sosf = 1; descriptor.buf = (uint8_t*) buffer; descriptor.offset = 0; descriptor.empty = 0; descriptor.eof = 1; descriptor.qe.stqe_next = 0; }

samlof commented 5 years ago

Going back to 1.0.0 ESP32 and compiling works. Then you have to add "ch_conf.hpoint = 0;" into XClk.cpp before "err = ledc_channel_config(&ch_conf);". This is where I left off and not working yet. Might be problems with my own pin setup, or i2s has changed.

shikharuniyal commented 5 years ago

still the results are same

In file included from sketch\I2SCamera.h:17:0,

             from sketch\I2SCamera.cpp:6:

sketch\DMABuffer.h: In constructor 'DMABuffer::DMABuffer(int)':

DMABuffer.h:10: error: 'malloc' was not declared in this scope

 buffer = (unsigned char *)malloc(bytes);

                                       ^

exit status 1 'malloc' was not declared in this scope

pmpz commented 5 years ago

just add

include

in DMABuffer.h

shikharuniyal commented 5 years ago

thanks now it works

saepulassegaf98 commented 5 years ago

thanks

sirmagid commented 5 years ago

nice work