Closed shikharuniyal closed 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!!!!!
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.
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
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.
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; }
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.
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
just add
in DMABuffer.h
thanks now it works
thanks
nice work
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
C:\Users\SHIKHAR\Documents\Arduino\libraries\Adafruit-ST7735-Library-master\Adafruit_ST7735.cpp:293:6: error: '_ystart' was not declared in this scope
exit status 1 Error compiling for board WEMOS LOLIN32.**
can anyone give a sol. for this error.