Giter Club home page Giter Club logo

m5stack-camera's Introduction

Camera unit description

English | 中文

Note

Now, M5Stack has four types of camera units, there are respectively ESP32CAM, M5Camera (A Model), M5Camera (B Model), M5CameraX, M5CameraF.

The main differences between these cameras are memory, interface, lens, optional hardware and camera shell

Firmware description

The code for this repository is for these boards, and each folder corresponds to a function.

  • mpu6050 -> Gyro routine after soldering MPU6050 chip (idf-3.3)

  • qr -> QR code recognition (idf-3.3)

  • uart -> 与 M5Core Routine for serial communication (idf-3.3)

  • wifi -> Routine for transferring images (idf-4.0)

  • face_recognize -> Face recognition routine (idf-3.3)

Please note that before compiling the downloaded code, you need to do the following to configure the appropriate board.

Step 1:build an ESP-IDF development environment

Step 2:After setting up the ESP-IDF environment, execute make menuconfig in the terminal.

Step 3:Configure camera model

Step 4:Open psram

Step 5:In the terminal Terminal, execute make to ensure that the compilation is correct

Step 6:In the terminal Terminal, execute make flash to download the program.

Step 7:In the terminal terminal, execute make monitor to open the serial port monitoring.

Comparison of different versions of cameras

The picture below is their comparison table. (Note: Because the interface has many different pins, so I have made a separate table to compare.)

  • If you want to view the detailed defference with them, please click here.

  • If you want to download the detailed defference with them, please click here.

The picture of A model and B model

Interface Comparison

Interface Difference

The following table shows interface difference between those camera boads based on the Interface Comparison table.

Important to Remember

  • Except when using CIF or lower resolution with JPEG, the driver requires PSRAM to be installed and activated.
  • Using YUV or RGB puts a lot of strain on the chip because writing to PSRAM is not particularly fast. The result is that image data might be missing. This is particularly true if WiFi is enabled. If you need RGB data, it is recommended that JPEG is captured and then turned into RGB using fmt2rgb888 or fmt2bmp/frame2bmp.
  • When 1 frame buffer is used, the driver will wait for the current frame to finish (VSYNC) and start I2S DMA. After the frame is acquired, I2S will be stopped and the frame buffer returned to the application. This approach gives more control over the system, but results in longer time to get the frame.
  • When 2 or more frame bufers are used, I2S is running in continuous mode and each frame is pushed to a queue that the application can access. This approach puts more strain on the CPU/Memory, but allows for double the frame rate. Please use only with JPEG.

Installation Instructions

  • Clone or download and extract the repository to the components folder of your ESP-IDF project
  • Make

API

Get img data

camera_fb_t * fb = NULL;
// will get a img frame
fb = esp_camera_fb_get();
// img buf
uint8_t *buf = fb->buf;
// img buf len
unit32_t buf_len = fb->len;

/* --- do some something --- */

// need return img buf
esp_camera_fb_return(fb);

Set ov2640 config

sensor_t *s = esp_camera_sensor_get();
s->set_framesize(s, FRAMESIZE_VGA);
s->set_quality(s, 10);
...

Detailed view sensor.h

Examples

Initialization

#include "esp_camera.h"

static camera_config_t camera_config = {
    .pin_reset = CAM_PIN_RESET,
    .pin_xclk = CAM_PIN_XCLK,
    .pin_sscb_sda = CAM_PIN_SIOD,
    .pin_sscb_scl = CAM_PIN_SIOC,

    .pin_d7 = CAM_PIN_D7,
    .pin_d6 = CAM_PIN_D6,
    .pin_d5 = CAM_PIN_D5,
    .pin_d4 = CAM_PIN_D4,
    .pin_d3 = CAM_PIN_D3,
    .pin_d2 = CAM_PIN_D2,
    .pin_d1 = CAM_PIN_D1,
    .pin_d0 = CAM_PIN_D0,
    .pin_vsync = CAM_PIN_VSYNC,
    .pin_href = CAM_PIN_HREF,
    .pin_pclk = CAM_PIN_PCLK,

    //XCLK 20MHz or 10MHz
    .xclk_freq_hz = 20000000,
    .ledc_timer = LEDC_TIMER_0,
    .ledc_channel = LEDC_CHANNEL_0,

    .pixel_format = PIXFORMAT_JPEG,//YUV422,GRAYSCALE,RGB565,JPEG
    .frame_size = FRAMESIZE_UXGA,//QQVGA-UXGA Do not use sizes above QVGA when not JPEG

    .jpeg_quality = 12, //0-63 lower number means higher quality
    .fb_count = 1 //if more than one, i2s runs in continuous mode. Use only with JPEG
};

esp_err_t camera_init(){
    //power up the camera if PWDN pin is defined
    if(CAM_PIN_PWDN != -1){
        pinMode(CAM_PIN_PWDN, OUTPUT);
        digitalWrite(CAM_PIN_PWDN, LOW);
    }

    //initialize the camera
    esp_err_t err = esp_camera_init(&camera_config);
    if (err != ESP_OK) {
        ESP_LOGE(TAG, "Camera Init Failed");
        return err;
    }

    return ESP_OK;
}

esp_err_t camera_capture(){
    //acquire a frame
    camera_fb_t * fb = esp_camera_fb_get();
    if (!fb) {
        ESP_LOGE(TAG, "Camera Capture Failed");
        return ESP_FAIL;
    }
    //replace this with your own function
    process_image(fb->width, fb->height, fb->format, fb->buf, fb->len);

    //return the frame buffer back to the driver for reuse
    esp_camera_fb_return(fb);
    return ESP_OK;
}

JPEG HTTP Capture

#include "esp_camera.h"
#include "esp_http_server.h"
#include "esp_timer.h"

typedef struct {
        httpd_req_t *req;
        size_t len;
} jpg_chunking_t;

static size_t jpg_encode_stream(void * arg, size_t index, const void* data, size_t len){
    jpg_chunking_t *j = (jpg_chunking_t *)arg;
    if(!index){
        j->len = 0;
    }
    if(httpd_resp_send_chunk(j->req, (const char *)data, len) != ESP_OK){
        return 0;
    }
    j->len += len;
    return len;
}

esp_err_t jpg_httpd_handler(httpd_req_t *req){
    camera_fb_t * fb = NULL;
    esp_err_t res = ESP_OK;
    size_t fb_len = 0;
    int64_t fr_start = esp_timer_get_time();

    fb = esp_camera_fb_get();
    if (!fb) {
        ESP_LOGE(TAG, "Camera capture failed");
        httpd_resp_send_500(req);
        return ESP_FAIL;
    }
    res = httpd_resp_set_type(req, "image/jpeg");
    if(res == ESP_OK){
        res = httpd_resp_set_hdr(req, "Content-Disposition", "inline; filename=capture.jpg");
    }

    if(res == ESP_OK){
        if(fb->format == PIXFORMAT_JPEG){
            fb_len = fb->len;
            res = httpd_resp_send(req, (const char *)fb->buf, fb->len);
        } else {
            jpg_chunking_t jchunk = {req, 0};
            res = frame2jpg_cb(fb, 80, jpg_encode_stream, &jchunk)?ESP_OK:ESP_FAIL;
            httpd_resp_send_chunk(req, NULL, 0);
            fb_len = jchunk.len;
        }
    }
    esp_camera_fb_return(fb);
    int64_t fr_end = esp_timer_get_time();
    ESP_LOGI(TAG, "JPG: %uKB %ums", (uint32_t)(fb_len/1024), (uint32_t)((fr_end - fr_start)/1000));
    return res;
}

JPEG HTTP Stream

#include "esp_camera.h"
#include "esp_http_server.h"
#include "esp_timer.h"

#define PART_BOUNDARY "123456789000000000000987654321"
static const char* _STREAM_CONTENT_TYPE = "multipart/x-mixed-replace;boundary=" PART_BOUNDARY;
static const char* _STREAM_BOUNDARY = "\r\n--" PART_BOUNDARY "\r\n";
static const char* _STREAM_PART = "Content-Type: image/jpeg\r\nContent-Length: %u\r\n\r\n";

esp_err_t jpg_stream_httpd_handler(httpd_req_t *req){
    camera_fb_t * fb = NULL;
    esp_err_t res = ESP_OK;
    size_t _jpg_buf_len;
    uint8_t * _jpg_buf;
    char * part_buf[64];
    static int64_t last_frame = 0;
    if(!last_frame) {
        last_frame = esp_timer_get_time();
    }

    res = httpd_resp_set_type(req, _STREAM_CONTENT_TYPE);
    if(res != ESP_OK){
        return res;
    }

    while(true){
        fb = esp_camera_fb_get();
        if (!fb) {
            ESP_LOGE(TAG, "Camera capture failed");
            res = ESP_FAIL;
        } else {
            if(fb->format != PIXFORMAT_JPEG){
                bool jpeg_converted = frame2jpg(fb, 80, &_jpg_buf, &_jpg_buf_len);
                if(!jpeg_converted){
                    ESP_LOGE(TAG, "JPEG compression failed");
                    esp_camera_fb_return(fb);
                    res = ESP_FAIL;
                }
            } else {
                _jpg_buf_len = fb->len;
                _jpg_buf = fb->buf;
            }
        }
        if(res == ESP_OK){
            size_t hlen = snprintf((char *)part_buf, 64, _STREAM_PART, _jpg_buf_len);

            res = httpd_resp_send_chunk(req, (const char *)part_buf, hlen);
        }
        if(res == ESP_OK){
            res = httpd_resp_send_chunk(req, (const char *)_jpg_buf, _jpg_buf_len);
        }
        if(res == ESP_OK){
            res = httpd_resp_send_chunk(req, _STREAM_BOUNDARY, strlen(_STREAM_BOUNDARY));
        }
        if(fb->format != PIXFORMAT_JPEG){
            free(_jpg_buf);
        }
        esp_camera_fb_return(fb);
        if(res != ESP_OK){
            break;
        }
        int64_t fr_end = esp_timer_get_time();
        int64_t frame_time = fr_end - last_frame;
        last_frame = fr_end;
        frame_time /= 1000;
        ESP_LOGI(TAG, "MJPG: %uKB %ums (%.1ffps)",
            (uint32_t)(_jpg_buf_len/1024),
            (uint32_t)frame_time, 1000.0 / (uint32_t)frame_time);
    }

    last_frame = 0;
    return res;
}

BMP HTTP Capture

#include "esp_camera.h"
#include "esp_http_server.h"
#include "esp_timer.h"

esp_err_t bmp_httpd_handler(httpd_req_t *req){
    camera_fb_t * fb = NULL;
    esp_err_t res = ESP_OK;
    int64_t fr_start = esp_timer_get_time();

    fb = esp_camera_fb_get();
    if (!fb) {
        ESP_LOGE(TAG, "Camera capture failed");
        httpd_resp_send_500(req);
        return ESP_FAIL;
    }

    uint8_t * buf = NULL;
    size_t buf_len = 0;
    bool converted = frame2bmp(fb, &buf, &buf_len);
    esp_camera_fb_return(fb);
    if(!converted){
        ESP_LOGE(TAG, "BMP conversion failed");
        httpd_resp_send_500(req);
        return ESP_FAIL;
    }

    res = httpd_resp_set_type(req, "image/x-windows-bmp")
       || httpd_resp_set_hdr(req, "Content-Disposition", "inline; filename=capture.bmp")
       || httpd_resp_send(req, (const char *)buf, buf_len);
    free(buf);
    int64_t fr_end = esp_timer_get_time();
    ESP_LOGI(TAG, "BMP: %uKB %ums", (uint32_t)(buf_len/1024), (uint32_t)((fr_end - fr_start)/1000));
    return res;
}

m5stack-camera's People

Contributors

21isenough avatar eeeebin avatar gitshaoxiang avatar graydonli avatar kerikun11 avatar sio-funmatsu avatar tinyu-zhao avatar zhouyangyale avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

m5stack-camera's Issues

JPEG header not correct

My m5stack camera F not work, when check JPEG header.

camera.c file line 724

       //check for correct JPEG header
        if(s_state->sensor.pixformat == PIXFORMAT_JPEG) {
            uint32_t sig = *((uint32_t *)s_state->fb->buf) & 0xFFFFFF;
            if(sig != 0xffd8ff) {//sig always 0xffd9ff
                s_state->fb->bad = 1;
                return;
            }
        }

Is it a hardware problem?
If not how to fix it?

ESP32CAM can't see CAMERA MODEL in `make menuconfig'

Hi,

Background

I followed your guidelines and set the 'esp-idf' environment. I've tried to flash the hello_world program and it worked. Now I want to proceed to step 3 and to configure the camera, however, it seems like it is not recognized as there is no option in the make menuconfig
image

Question

Is there any chance that flashing the program changed the firmware and now the camera module is disabled? If so, how can I revert?

Other

I use Ubuntu 16.04 with Eclipse C/C++ and a python 3.6 environment
the output of the hello_world is

Hello World!
This is ESP32 chip with 2 CPU cores, WiFi/BT/BLE, silicon revision 1, 4MB external flash
Restarting in 10 seconds...
Restarting in 9 seconds...
Restarting in 8 seconds...
Restarting in 7 seconds...
Restarting in 6 seconds...

error: 'GPIO_PIN_COUNT' <> 'SOC_GPIO_PIN_COUNT'

Hi,

I try to flash my new M5Stack ESP32 cam.

While making my project I get the following error:
error: 'GPIO_PIN_COUNT' undeclared here (not in a function); did you mean 'SOC_GPIO_PIN_COUNT'?
I checked the rtc_gpio_desc point in the menuconfig.

Could you tell me what I am doing wrong?

835/836 FAILED: camera.elf

Hello,

I have a camera M5stack F and i want to flah with wifi_sta (Windows 10 & ESP-IDF 4.0) but i can't do it, Can you help me please, I'm a Young user.

`C:\ESP-IDF\m5\wifi\wifi_sta>idf.py set-target esp32
Checking Python dependencies...
Python requirements from C:\ESP-IDF\requirements.txt are satisfied.
Usage: idf.py [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...
Try 'idf.py --help' for help.

Error: No such command 'set-target'.

C:\ESP-IDF\m5\wifi\wifi_sta>idf.py flash
Checking Python dependencies...
Python requirements from C:\ESP-IDF\requirements.txt are satisfied.
Adding flash's dependency "all" to list of actions
Executing action: all (aliases: build)
Running cmake in directory c:\esp-idf\m5\wifi\wifi_sta\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 --warn-uninitialized -DCCACHE_ENABLE=0 c:\esp-idf\m5\wifi\wifi_sta"...
Warn about uninitialized values.
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.21.0.windows.1")
-- mconf-idf version mconf-v4.6.0.0-idf-20190628-win32
-- IDF_TARGET not set, using default target: esp32
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe
-- Check for working CXX compiler: C:/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Project version: v4.0-dirty
-- Building ESP-IDF components for target esp32
-- Found PythonInterp: C:/.espressif/python_env/idf4.0_py3.8_env/Scripts/python.exe (found version "3.8.2")
-- Could NOT find Perl (missing: PERL_EXECUTABLE)
-- Adding linker script C:/ESP-IDF/m5/wifi/wifi_sta/build/esp-idf/esp32/esp32_out.ld
-- Adding linker script C:/ESP-IDF/components/esp32/ld/esp32.project.ld.in
-- Adding linker script C:/ESP-IDF/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script C:/ESP-IDF/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/ESP-IDF/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/ESP-IDF/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script C:/ESP-IDF/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script C:/ESP-IDF/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Components: app_trace app_update asio bootloader bootloader_support bt coap console cxx driver efuse esp-tls esp32 esp32-camera esp_adc_cal esp_common esp_eth esp_event esp_gdbstub esp_http_client esp_http_server esp_https_ota esp_https_server esp_local_ctrl esp_ringbuf esp_rom esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos heap idf_test jsmn json libsodium log lwip main mbedtls mdns mqtt newlib nghttp nvs_flash openssl partition_table protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport tcpip_adapter ulp unity vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: C:/ESP-IDF/components/app_trace C:/ESP-IDF/components/app_update C:/ESP-IDF/components/asio C:/ESP-IDF/components/bootloader C:/ESP-IDF/components/bootloader_support C:/ESP-IDF/components/bt C:/ESP-IDF/components/coap C:/ESP-IDF/components/console C:/ESP-IDF/components/cxx C:/ESP-IDF/components/driver C:/ESP-IDF/components/efuse C:/ESP-IDF/components/esp-tls C:/ESP-IDF/components/esp32 C:/ESP-IDF/m5/wifi/wifi_sta/components/esp32-camera C:/ESP-IDF/components/esp_adc_cal C:/ESP-IDF/components/esp_common C:/ESP-IDF/components/esp_eth C:/ESP-IDF/components/esp_event C:/ESP-IDF/components/esp_gdbstub C:/ESP-IDF/components/esp_http_client C:/ESP-IDF/components/esp_http_server C:/ESP-IDF/components/esp_https_ota C:/ESP-IDF/components/esp_https_server C:/ESP-IDF/components/esp_local_ctrl C:/ESP-IDF/components/esp_ringbuf C:/ESP-IDF/components/esp_rom C:/ESP-IDF/components/esp_websocket_client C:/ESP-IDF/components/esp_wifi C:/ESP-IDF/components/espcoredump C:/ESP-IDF/components/esptool_py C:/ESP-IDF/components/expat C:/ESP-IDF/components/fatfs C:/ESP-IDF/components/freemodbus C:/ESP-IDF/components/freertos C:/ESP-IDF/components/heap C:/ESP-IDF/components/idf_test C:/ESP-IDF/components/jsmn C:/ESP-IDF/components/json C:/ESP-IDF/components/libsodium C:/ESP-IDF/components/log C:/ESP-IDF/components/lwip C:/ESP-IDF/m5/wifi/wifi_sta/main C:/ESP-IDF/components/mbedtls C:/ESP-IDF/components/mdns C:/ESP-IDF/components/mqtt C:/ESP-IDF/components/newlib C:/ESP-IDF/components/nghttp C:/ESP-IDF/components/nvs_flash C:/ESP-IDF/components/openssl C:/ESP-IDF/components/partition_table C:/ESP-IDF/components/protobuf-c C:/ESP-IDF/components/protocomm C:/ESP-IDF/components/pthread C:/ESP-IDF/components/sdmmc C:/ESP-IDF/components/soc C:/ESP-IDF/components/spi_flash C:/ESP-IDF/components/spiffs C:/ESP-IDF/components/tcp_transport C:/ESP-IDF/components/tcpip_adapter C:/ESP-IDF/components/ulp C:/ESP-IDF/components/unity C:/ESP-IDF/components/vfs C:/ESP-IDF/components/wear_levelling C:/ESP-IDF/components/wifi_provisioning C:/ESP-IDF/components/wpa_supplicant C:/ESP-IDF/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/ESP-IDF/m5/wifi/wifi_sta/build
Running ninja in directory c:\esp-idf\m5\wifi\wifi_sta\build
Executing "ninja all"...
[655/836] Performing configure step for 'bootloader'
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.21.0.windows.1")
-- mconf-idf version mconf-v4.6.0.0-idf-20190628-win32
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe
-- Check for working CXX compiler: C:/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Project version: v4.0-dirty
-- Building ESP-IDF components for target esp32
-- Adding linker script C:/ESP-IDF/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script C:/ESP-IDF/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/ESP-IDF/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/ESP-IDF/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/ESP-IDF/components/bootloader/subproject/main/esp32.bootloader.ld
-- Adding linker script C:/ESP-IDF/components/bootloader/subproject/main/esp32.bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp32 esp_common esp_rom esptool_py log main micro-ecc partition_table soc spi_flash xtensa
-- Component paths: C:/ESP-IDF/components/bootloader C:/ESP-IDF/components/bootloader_support C:/ESP-IDF/components/efuse C:/ESP-IDF/components/esp32 C:/ESP-IDF/components/esp_common C:/ESP-IDF/components/esp_rom C:/ESP-IDF/components/esptool_py C:/ESP-IDF/components/log C:/ESP-IDF/components/bootloader/subproject/main C:/ESP-IDF/components/bootloader/subproject/components/micro-ecc C:/ESP-IDF/components/partition_table C:/ESP-IDF/components/soc C:/ESP-IDF/components/spi_flash C:/ESP-IDF/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/ESP-IDF/m5/wifi/wifi_sta/build/bootloader
[759/836] Performing build step for 'bootloader'
[1/62] Generating project_elf_src.c
[2/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/gpio_periph.c.obj
[3/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/rtc_periph.c.obj
[4/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/rtc_init.c.obj
[5/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/cpu_util.c.obj
[6/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/rtc_pm.c.obj
[7/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/rtc_wdt.c.obj
[8/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/rtc_time.c.obj
[9/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/rtc_clk_init.c.obj
[10/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/rtc_clk.c.obj
[11/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/spi_periph.c.obj
[12/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/memory_layout_utils.c.obj
[13/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/sdmmc_periph.c.obj
[14/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/lldesc.c.obj
[15/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/rtc_sleep.c.obj
[16/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/soc_memory_layout.c.obj
[17/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/sdio_slave_periph.c.obj
[18/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/spi_slave_hal.c.obj
[19/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/spi_hal.c.obj
[20/62] Building C object esp-idf/xtensa/CMakeFiles/__idf_xtensa.dir/eri.c.obj
[21/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/spi_hal_iram.c.obj
[22/62] Building C object CMakeFiles/bootloader.elf.dir/project_elf_src.c.obj
[23/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/spi_slave_hal_iram.c.obj
[24/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/soc_include_legacy_warn.c.obj
[25/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/spi_flash_hal.c.obj
[26/62] Building C object esp-idf/xtensa/CMakeFiles/__idf_xtensa.dir/debug_helpers.c.obj
[27/62] Building ASM object esp-idf/xtensa/CMakeFiles/__idf_xtensa.dir/debug_helpers_asm.S.obj
[28/62] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/spi_flash_hal_iram.c.obj
[29/62] Building C object esp-idf/xtensa/CMakeFiles/__idf_xtensa.dir/trax.c.obj
[30/62] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log.c.obj
[31/62] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_flash_config.c.obj
[32/62] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_flash.c.obj
[33/62] Building C object esp-idf/spi_flash/CMakeFiles/__idf_spi_flash.dir/spi_flash_rom_patch.c.obj
[34/62] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32/esp_efuse_table.c.obj
[35/62] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_common.c.obj
[36/62] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_api.c.obj
[37/62] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock.c.obj
[38/62] Building C object esp-idf/micro-ecc/CMakeFiles/__idf_micro-ecc.dir/micro-ecc/uECC.c.obj
[39/62] Linking C static library esp-idf\log\liblog.a
[40/62] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_utility.c.obj
[41/62] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_fields.c.obj
[42/62] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/flash_encrypt.c.obj
[43/62] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/secure_boot_signatures.c.obj
[44/62] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/bootloader_sha.c.obj
[45/62] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_encrypt.c.obj
[46/62] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_random.c.obj
[47/62] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/secure_boot.c.obj
[48/62] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_init.c.obj
[49/62] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_partitions.c.obj
[50/62] Linking C static library esp-idf\xtensa\libxtensa.a
[51/62] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_qio_mode.c.obj
[52/62] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/bootloader_start.c.obj
[53/62] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_utility.c.obj
[54/62] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp_image_format.c.obj
[55/62] Linking C static library esp-idf\soc\libsoc.a
[56/62] Linking C static library esp-idf\micro-ecc\libmicro-ecc.a
[57/62] Linking C static library esp-idf\bootloader_support\libbootloader_support.a
[58/62] Linking C static library esp-idf\efuse\libefuse.a
[59/62] Linking C static library esp-idf\spi_flash\libspi_flash.a
[60/62] Linking C static library esp-idf\main\libmain.a
[61/62] Linking C executable bootloader.elf
[62/62] Generating binary image from built executable
esptool.py v2.8
Generated C:/ESP-IDF/m5/wifi/wifi_sta/build/bootloader/bootloader.bin
[820/836] Building C object esp-idf/esp32-camera/CMakeFiles/__idf_esp32-camera.dir/driver/xclk.c.obj
In file included from ../components/esp32-camera/driver/private_include/camera_common.h:6,
from ../components/esp32-camera/driver/private_include/xclk.h:3,
from ../components/esp32-camera/driver/xclk.c:5:
c:\esp-idf\components\esp32\include\rom\lldesc.h:1:2: warning: #warning rom/lldesc.h is deprecated, please use esp32/rom/lldesc.h instead [-Wcpp]
#warning rom/lldesc.h is deprecated, please use esp32/rom/lldesc.h instead
^~~~~~~
[823/836] Building C object esp-idf/esp32-camera/CMakeFiles/__idf_esp32-camera.dir/conversions/esp_jpg_decode.c.obj
In file included from ../components/esp32-camera/conversions/esp_jpg_decode.c:15:
c:\esp-idf\components\esp32\include\rom\tjpgd.h:1:2: warning: #warning rom/tjpgd.h is deprecated, please use esp32/rom/tjpgd.h instead [-Wcpp]
#warning rom/tjpgd.h is deprecated, please use esp32/rom/tjpgd.h instead
^~~~~~~
[824/836] Building C object esp-idf/esp32-camera/CMakeFiles/__idf_esp32-camera.dir/driver/camera.c.obj
In file included from ../components/esp32-camera/driver/camera.c:22:
c:\esp-idf\components\esp32\include\rom\lldesc.h:1:2: warning: #warning rom/lldesc.h is deprecated, please use esp32/rom/lldesc.h instead [-Wcpp]
#warning rom/lldesc.h is deprecated, please use esp32/rom/lldesc.h instead
^~~~~~~
In file included from ../components/esp32-camera/driver/private_include/camera_common.h:6,
from ../components/esp32-camera/driver/camera.c:35:
c:\esp-idf\components\esp32\include\rom\lldesc.h:1:2: warning: #warning rom/lldesc.h is deprecated, please use esp32/rom/lldesc.h instead [-Wcpp]
#warning rom/lldesc.h is deprecated, please use esp32/rom/lldesc.h instead
^~~~~~~
[827/836] Building C object esp-idf/esp32-camera/CMakeFiles/__idf_esp32-camera.dir/conversions/to_bmp.c.obj
In file included from ../components/esp32-camera/conversions/to_bmp.c:17:
c:\esp-idf\components\esp32\include\esp_spiram.h:1:2: warning: #warning esp_spiram.h has been replaced by esp32/spiram.h, please include esp32/spiram.h instead [-Wcpp]
#warning esp_spiram.h has been replaced by esp32/spiram.h, please include esp32/spiram.h instead
^~~~~~~
[829/836] Building CXX object esp-idf/esp32-camera/CMakeFiles/__idf_esp32-camera.dir/conversions/to_jpg.cpp.obj
In file included from ../components/esp32-camera/conversions/to_jpg.cpp:16:
c:\esp-idf\components\esp32\include\esp_spiram.h:1:2: warning: #warning esp_spiram.h has been replaced by esp32/spiram.h, please include esp32/spiram.h instead [-Wcpp]
#warning esp_spiram.h has been replaced by esp32/spiram.h, please include esp32/spiram.h instead
^~~~~~~
[835/836] Linking CXX executable camera.elf
FAILED: camera.elf
cmd.exe /C "cd . && C:.espressif\tools\xtensa-esp32-elf\esp-2019r2-8.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe -mlongcalls -Wno-frame-address -nostdlib @CMakeFiles\camera.elf.rsp -o camera.elf && cd ."
c:/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/main/libmain.a(main.c.obj):(.literal.app_main+0x18): undefined reference to led_brightness' c:/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/main/libmain.a(main.c.obj): in function app_main':
c:\esp-idf\m5\wifi\wifi_sta\build/../main/main.c:89: undefined reference to led_brightness' collect2.exe: error: ld returned 1 exit status ninja: build stopped: subcommand failed. ninja failed with exit code 1

Cam over wifi: running but only black screen

I have a strange problem. I get my cam running over wifi - but don't see anything else than a black screen.
My output is:

`MONITOR
--- idf_monitor on /dev/ttyUSB0 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:9028
load:0x40078000,len:16224
load:0x40080400,len:5044
entry 0x40080724
D (66) bootloader_flash: mmu set block paddr=0x00000000 (was 0xffffffff)
I (72) boot: Chip Revision: 1
I (83) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (45) boot: ESP-IDF v4.0-dirty 2nd stage bootloader
I (45) boot: compile time 20:47:45
D (45) boot: Enabling RTCWDT(9000 ms)
I (69) boot: Enabling RNG early entropy source...
D (69) boot: magic e9
D (69) boot: segments 04
D (69) boot: spi_mode 02
D (71) boot: spi_speed 0f
D (74) boot: spi_size 02
I (76) boot: SPI Speed : 80MHz
I (80) boot: SPI Mode : DIO
I (84) boot: SPI Flash Size : 4MB
D (88) bootloader_flash: mmu set paddr=00000000 count=1 size=c00 src_addr=9000 src_addr_aligned=0
D (97) boot: mapped partition table 0x9000 at 0x3f409000
D (103) flash_parts: partition table verified, 4 entries
I (108) boot: Partition Table:
I (112) boot: ## Label Usage Type ST Offset Length
D (119) boot: load partition table entry 0x3f409000
D (124) boot: type=1 subtype=2
I (127) boot: 0 nvs WiFi data 01 02 0000a000 00006000
D (135) boot: load partition table entry 0x3f409020
D (140) boot: type=1 subtype=1
I (143) boot: 1 phy_init RF data 01 01 00010000 00001000
D (150) boot: load partition table entry 0x3f409040
D (155) boot: type=0 subtype=0
I (158) boot: 2 factory factory app 00 00 00020000 00100000
I (166) boot: End of partition table
D (170) boot: Trying partition index -1 offs 0x20000 size 0x100000
D (177) esp_image: reading image header @ 0x20000
D (181) bootloader_flash: mmu set block paddr=0x00020000 (was 0xffffffff)
D (188) esp_image: image header: 0xe9 0x06 0x02 0x02 40081560
I (194) boot_comm: chip revision: 1, min. application chip revision: 0
I (201) esp_image: segment 0: paddr=0x00020020 vaddr=0x3f400020 size=0x1e9f8 (125432) map
D (210) esp_image: free data page_count 0x00000032
D (215) bootloader_flash: mmu set paddr=00020000 count=2 size=1e9f8 src_addr=20020 src_addr_aligned=20000
D (262) bootloader_flash: mmu set block paddr=0x00030000 (was 0xffffffff)
I (262) esp_image: segment 1: paddr=0x0003ea20 vaddr=0x3ffb0000 size=0x015f0 ( 5616) load
D (267) esp_image: free data page_count 0x00000032
D (272) bootloader_flash: mmu set paddr=00030000 count=2 size=15f0 src_addr=3ea20 src_addr_aligned=30000
D (283) bootloader_flash: mmu set block paddr=0x00040000 (was 0xffffffff)
I (288) esp_image: segment 2: paddr=0x00040018 vaddr=0x400d0018 size=0x7d8bc (514236) map
0x400d0018: _stext at ??:?

D (297) esp_image: free data page_count 0x00000032
D (302) bootloader_flash: mmu set paddr=00040000 count=8 size=7d8bc src_addr=40018 src_addr_aligned=40000
D (465) bootloader_flash: mmu set block paddr=0x000b0000 (was 0xffffffff)
I (465) esp_image: segment 3: paddr=0x000bd8dc vaddr=0x3ffb15f0 size=0x01fd8 ( 8152) load
D (469) esp_image: free data page_count 0x00000032
D (474) bootloader_flash: mmu set paddr=000b0000 count=1 size=1fd8 src_addr=bd8dc src_addr_aligned=b0000
D (487) bootloader_flash: mmu set block paddr=0x000b0000 (was 0xffffffff)
I (491) esp_image: segment 4: paddr=0x000bf8bc vaddr=0x40080000 size=0x00400 ( 1024) load
0x40080000: _WindowOverflow4 at /home/###/esp/esp-idf-v4.0/components/freertos/xtensa_vectors.S:1778

D (499) esp_image: free data page_count 0x00000032
D (504) bootloader_flash: mmu set paddr=000b0000 count=1 size=400 src_addr=bf8bc src_addr_aligned=b0000
D (514) bootloader_flash: mmu set block paddr=0x000b0000 (was 0xffffffff)
I (521) esp_image: segment 5: paddr=0x000bfcc4 vaddr=0x40080400 size=0x1aa30 (109104) load
D (530) esp_image: free data page_count 0x00000032
D (534) bootloader_flash: mmu set paddr=000b0000 count=3 size=1aa30 src_addr=bfcc4 src_addr_aligned=b0000
D (584) bootloader_flash: mmu set block paddr=0x000d0000 (was 0xffffffff)
D (584) esp_image: Calculated hash: 57101be2ee9a7029cc285c3475cb58b973b2c30bc4e1dfeb615619574d785df6
D (589) bootloader_flash: mmu set paddr=000d0000 count=1 size=20 src_addr=da700 src_addr_aligned=d0000
D (598) bootloader_flash: mmu set paddr=000d0000 count=1 size=20 src_addr=da700 src_addr_aligned=d0000
I (624) boot: Loaded app from partition at offset 0x20000
I (624) boot: Disabling RNG early entropy source...
D (624) boot: Mapping segment 0 as DROM
D (628) boot: Mapping segment 2 as IROM
D (632) boot: calling set_cache_and_start_app
D (636) boot: configure drom and irom and start
D (641) boot: start: 0x40081560
0x40081560: call_start_cpu0 at /home/###/esp/esp-idf-v4.0/components/esp32/cpu_start.c:121

I (644) psram: This chip is ESP32-D0WD
I (649) spiram: Found 64MBit SPI RAM device
I (653) spiram: SPI RAM mode: flash 80m sram 80m
I (659) spiram: PSRAM initialized, cache is in low/high (2-core) mode.
I (666) cpu_start: Pro cpu up.
I (670) cpu_start: Application information:
I (674) cpu_start: Compile time: Nov 17 2020 20:20:52
I (680) cpu_start: ELF file SHA256: 0ada9bb0080c5c63...
I (686) cpu_start: ESP-IDF: v4.0-dirty
I (692) cpu_start: Starting app cpu, entry point is 0x40081508
0x40081508: call_start_cpu1 at /home/###/esp/esp-idf-v4.0/components/esp32/cpu_start.c:272

I (0) cpu_start: App cpu up.
I (1192) spiram: SPI SRAM memory test OK
I (1193) heap_init: Initializing. RAM available for dynamic allocation:
I (1193) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1199) heap_init: At 3FFBB538 len 00024AC8 (146 KiB): DRAM
I (1206) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1212) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1219) heap_init: At 4009AE30 len 000051D0 (20 KiB): IRAM
I (1225) cpu_start: Pro cpu start user code
I (1230) spiram: Adding pool of 4096K of external SPI memory to heap allocator
I (1251) spi_flash: detected chip: gd
I (1251) spi_flash: flash io: dio
I (1251) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (1259) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (1309) sccb: pin_sda 22 pin_scl 23

I (1309) gpio: GPIO[0]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1329) gpio: GPIO[15]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1359) sccb: SCCB_Probe start
I (1849) sccb: SCCB_Probe start
I (2379) camera: Detected OV2640 camera
I (2379) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2389) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2399) gpio: GPIO[18]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2409) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2409) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2419) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2429) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2439) gpio: GPIO[32]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2449) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2459) gpio: GPIO[26]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2469) gpio: GPIO[21]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2479) camera: Allocating 2 frame buffers (117 KB total)
I (2489) camera: Allocating 58 KB frame buffer in OnBoard RAM
I (2499) camera: Allocating 58 KB frame buffer in OnBoard RAM
I (2629) wifi: wifi driver task: 3ffd2658, prio:23, stack:3584, core=0
I (2629) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (2629) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (2659) wifi: wifi firmware version: 581f422
I (2659) wifi: config NVS flash: enabled
I (2659) wifi: config nano formating: disabled
I (2659) wifi: Init dynamic tx buffer num: 32
I (2659) wifi: Init data frame dynamic rx buffer num: 16
I (2669) wifi: Init management frame dynamic rx buffer num: 16
I (2669) wifi: Init management short buffer num: 32
I (2679) wifi: Init static tx buffer num: 32
I (2679) wifi: Init static rx buffer size: 1600
I (2689) wifi: Init static rx buffer num: 10
I (2689) wifi: Init dynamic rx buffer num: 16
I (2789) phy: phy_version: 4180, cb3948e, Sep 12 2019, 16:39:13, 0, 0
I (2789) wifi: mode : softAP (3c:71:bf:5e:d6:01)
I (2799) wifi: Total power save buffer number: 16
I (2799) wifi: Init max length of beacon: 752/752
I (2799) wifi: Init max length of beacon: 752/752
I (2809) camera: wifi_init_softap finished.SSID:M5Psram_Cam password:#####
�ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:9028
load:0x40078000,len:16224
load:0x40080400,len:5044
entry 0x40080724
D (67) bootloader_flash: mmu set block paddr=0x00000000 (was 0xffffffff)
I (73) boot: Chip Revision: 1
I (84) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (46) boot: ESP-IDF v4.0-dirty 2nd stage bootloader
I (46) boot: compile time 20:47:45
D (46) boot: Enabling RTCWDT(9000 ms)
I (70) boot: Enabling RNG early entropy source...
D (70) boot: magic e9
D (70) boot: segments 04
D (70) boot: spi_mode 02
D (71) boot: spi_speed 0f
D (74) boot: spi_size 02
I (77) boot: SPI Speed : 80MHz
I (81) boot: SPI Mode : DIO
I (85) boot: SPI Flash Size : 4MB
D (89) bootloader_flash: mmu set paddr=00000000 count=1 size=c00 src_addr=9000 src_addr_aligned=0
D (98) boot: mapped partition table 0x9000 at 0x3f409000
D (103) flash_parts: partition table verified, 4 entries
I (108) boot: Partition Table:
I (112) boot: ## Label Usage Type ST Offset Length
D (119) boot: load partition table entry 0x3f409000
D (124) boot: type=1 subtype=2
I (128) boot: 0 nvs WiFi data 01 02 0000a000 00006000
D (135) boot: load partition table entry 0x3f409020
D (140) boot: type=1 subtype=1
I (143) boot: 1 phy_init RF data 01 01 00010000 00001000
D (151) boot: load partition table entry 0x3f409040
D (156) boot: type=0 subtype=0
I (159) boot: 2 factory factory app 00 00 00020000 00100000
I (166) boot: End of partition table
D (171) boot: Trying partition index -1 offs 0x20000 size 0x100000
D (177) esp_image: reading image header @ 0x20000
D (182) bootloader_flash: mmu set block paddr=0x00020000 (was 0xffffffff)
D (189) esp_image: image header: 0xe9 0x06 0x02 0x02 40081560
I (194) boot_comm: chip revision: 1, min. application chip revision: 0
I (202) esp_image: segment 0: paddr=0x00020020 vaddr=0x3f400020 size=0x1e9f8 (125432) map
D (210) esp_image: free data page_count 0x00000032
D (215) bootloader_flash: mmu set paddr=00020000 count=2 size=1e9f8 src_addr=20020 src_addr_aligned=20000
D (262) bootloader_flash: mmu set block paddr=0x00030000 (was 0xffffffff)
I (263) esp_image: segment 1: paddr=0x0003ea20 vaddr=0x3ffb0000 size=0x015f0 ( 5616) load
D (267) esp_image: free data page_count 0x00000032
D (272) bootloader_flash: mmu set paddr=00030000 count=2 size=15f0 src_addr=3ea20 src_addr_aligned=30000
D (283) bootloader_flash: mmu set block paddr=0x00040000 (was 0xffffffff)
I (288) esp_image: segment 2: paddr=0x00040018 vaddr=0x400d0018 size=0x7d8bc (514236) map
0x400d0018: _stext at ??:?

D (297) esp_image: free data page_count 0x00000032
D (302) bootloader_flash: mmu set paddr=00040000 count=8 size=7d8bc src_addr=40018 src_addr_aligned=40000
D (465) bootloader_flash: mmu set block paddr=0x000b0000 (was 0xffffffff)
I (465) esp_image: segment 3: paddr=0x000bd8dc vaddr=0x3ffb15f0 size=0x01fd8 ( 8152) load
D (470) esp_image: free data page_count 0x00000032
D (475) bootloader_flash: mmu set paddr=000b0000 count=1 size=1fd8 src_addr=bd8dc src_addr_aligned=b0000
D (487) bootloader_flash: mmu set block paddr=0x000b0000 (was 0xffffffff)
I (491) esp_image: segment 4: paddr=0x000bf8bc vaddr=0x40080000 size=0x00400 ( 1024) load
0x40080000: _WindowOverflow4 at /home/###/esp/esp-idf-v4.0/components/freertos/xtensa_vectors.S:1778

D (500) esp_image: free data page_count 0x00000032
D (505) bootloader_flash: mmu set paddr=000b0000 count=1 size=400 src_addr=bf8bc src_addr_aligned=b0000
D (515) bootloader_flash: mmu set block paddr=0x000b0000 (was 0xffffffff)
I (521) esp_image: segment 5: paddr=0x000bfcc4 vaddr=0x40080400 size=0x1aa30 (109104) load
D (530) esp_image: free data page_count 0x00000032
D (535) bootloader_flash: mmu set paddr=000b0000 count=3 size=1aa30 src_addr=bfcc4 src_addr_aligned=b0000
D (584) bootloader_flash: mmu set block paddr=0x000d0000 (was 0xffffffff)
D (585) esp_image: Calculated hash: 57101be2ee9a7029cc285c3475cb58b973b2c30bc4e1dfeb615619574d785df6
D (589) bootloader_flash: mmu set paddr=000d0000 count=1 size=20 src_addr=da700 src_addr_aligned=d0000
D (599) bootloader_flash: mmu set paddr=000d0000 count=1 size=20 src_addr=da700 src_addr_aligned=d0000
I (624) boot: Loaded app from partition at offset 0x20000
I (624) boot: Disabling RNG early entropy source...
D (624) boot: Mapping segment 0 as DROM
D (628) boot: Mapping segment 2 as IROM
D (632) boot: calling set_cache_and_start_app
D (637) boot: configure drom and irom and start
D (641) boot: start: 0x40081560
0x40081560: call_start_cpu0 at /home/###/esp/esp-idf-v4.0/components/esp32/cpu_start.c:121

I (645) psram: This chip is ESP32-D0WD
I (650) spiram: Found 64MBit SPI RAM device
I (654) spiram: SPI RAM mode: flash 80m sram 80m
I (659) spiram: PSRAM initialized, cache is in low/high (2-core) mode.
I (666) cpu_start: Pro cpu up.
I (670) cpu_start: Application information:
I (675) cpu_start: Compile time: Nov 17 2020 20:20:52
I (681) cpu_start: ELF file SHA256: 0ada9bb0080c5c63...
I (687) cpu_start: ESP-IDF: v4.0-dirty
I (692) cpu_start: Starting app cpu, entry point is 0x40081508
0x40081508: call_start_cpu1 at /home/###/esp/esp-idf-v4.0/components/esp32/cpu_start.c:272

I (0) cpu_start: App cpu up.
I (1193) spiram: SPI SRAM memory test OK
I (1193) heap_init: Initializing. RAM available for dynamic allocation:
I (1194) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1200) heap_init: At 3FFBB538 len 00024AC8 (146 KiB): DRAM
I (1206) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1212) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1219) heap_init: At 4009AE30 len 000051D0 (20 KiB): IRAM
I (1225) cpu_start: Pro cpu start user code
I (1230) spiram: Adding pool of 4096K of external SPI memory to heap allocator
I (1251) spi_flash: detected chip: gd
I (1251) spi_flash: flash io: dio
I (1251) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (1259) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (1309) sccb: pin_sda 22 pin_scl 23

I (1309) gpio: GPIO[0]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1329) gpio: GPIO[15]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1359) sccb: SCCB_Probe start
I (1849) sccb: SCCB_Probe start
I (2379) camera: Detected OV2640 camera
I (2379) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2389) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2399) gpio: GPIO[18]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2409) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2409) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2419) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2429) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2439) gpio: GPIO[32]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2449) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2459) gpio: GPIO[26]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2469) gpio: GPIO[21]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2479) camera: Allocating 2 frame buffers (117 KB total)
I (2489) camera: Allocating 58 KB frame buffer in OnBoard RAM
I (2499) camera: Allocating 58 KB frame buffer in OnBoard RAM
I (2629) wifi: wifi driver task: 3ffd2658, prio:23, stack:3584, core=0
I (2629) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (2629) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (2659) wifi: wifi firmware version: 581f422
I (2659) wifi: config NVS flash: enabled
I (2659) wifi: config nano formating: disabled
I (2659) wifi: Init dynamic tx buffer num: 32
I (2659) wifi: Init data frame dynamic rx buffer num: 16
I (2669) wifi: Init management frame dynamic rx buffer num: 16
I (2669) wifi: Init management short buffer num: 32
I (2679) wifi: Init static tx buffer num: 32
I (2679) wifi: Init static rx buffer size: 1600
I (2689) wifi: Init static rx buffer num: 10
I (2689) wifi: Init dynamic rx buffer num: 16
I (2789) phy: phy_version: 4180, cb3948e, Sep 12 2019, 16:39:13, 0, 0
I (2789) wifi: mode : softAP (3c:71:bf:5e:d6:01)
I (2799) wifi: Total power save buffer number: 16
I (2799) wifi: Init max length of beacon: 752/752
I (2799) wifi: Init max length of beacon: 752/752
I (2809) camera: wifi_init_softap finished.SSID:M5Psram_Cam password:1234567890
I (2849) wifi: new:<1,0>, old:<1,0>, ap:<1,1>, sta:<255,255>, prof:1
I (2849) wifi: station: a8:b8:6e:80:3f:0f join, AID=1, bgn, 20
I (2899) camera: station:a8:b8:6e:80:3f:0f join, AID=1
I (3359) tcpip_adapter: softAP assign IP to station,IP is: 192.168.4.2
I (9749) camera: MJPG: 14KB 89ms (11.2fps)
I (9789) camera: MJPG: 14KB 43ms (23.3fps)
I (9829) camera: MJPG: 14KB 38ms (26.3fps)
I (9869) camera: MJPG: 14KB 41ms (24.4fps)
I (9909) camera: MJPG: 14KB 38ms (26.3fps)
I (9949) camera: MJPG: 14KB 40ms (25.0fps)
I (9989) camera: MJPG: 14KB 41ms (24.4fps)
I (10029) camera: MJPG: 14KB 35ms (28.6fps)
I (10069) camera: MJPG: 14KB 40ms (25.0fps)
I (10109) camera: MJPG: 14KB 43ms (23.3fps)
I (10149) camera: MJPG: 14KB 34ms (29.4fps)
I (10179) camera: MJPG: 14KB 37ms (27.0fps)
I (10229) camera: MJPG: 14KB 45ms (22.2fps)
I (10259) camera: MJPG: 14KB 33ms (30.3fps)
I (10309) camera: MJPG: 14KB 47ms (21.3fps)
I (10349) camera: MJPG: 14KB 33ms (30.3fps)
I (10389) camera: MJPG: 14KB 40ms (25.0fps)
I (10429) camera: MJPG: 14KB 39ms (25.6fps)
I (10469) camera: MJPG: 14KB 41ms (24.4fps)
I (10509) camera: MJPG: 14KB 40ms (25.0fps)
I (10539) camera: MJPG: 14KB 34ms (29.4fps)
I (10579) camera: MJPG: 14KB 40ms (25.0fps)
I (10619) camera: MJPG: 14KB 39ms (25.6fps)
I (10669) camera: MJPG: 14KB 45ms (22.2fps)
I (10689) camera: MJPG: 14KB 28ms (35.7fps)
I (10739) camera: MJPG: 14KB 41ms (24.4fps)
I (10769) camera: MJPG: 14KB 38ms (26.3fps)
I (10819) camera: MJPG: 14KB 41ms (24.4fps)
`
Here it continues....
What am I doing wrong??

Error at linking qr_recognize

Hi,

I can't build this project as follows.

[820/821] Linking CXX executable camera.elf
FAILED: camera.elf
cmd.exe /C "cd . && C:\Users\yshin.espressif\tools\xtensa-esp32-elf\esp-2019r2-8.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe -mlongcalls -Wno-frame-address -O3 -DNDEBUG -nostdlib @CMakeFiles\camera.elf.rsp -o camera.elf && cd ."
c:/users/yshin/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/main/libmain.a(main.c.obj):(.literal.app_main+0x18): undefined reference to `qr_recognize'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

Do I have to correct Makefile ?

Thank you.

Yasuto,

How to set TXD/RXD/RTS/CTS for UART

Hi
Now I am using M5 model A for UART, how to set TXD/RXD/RTS/CTS ?? I set it as below:
#define ECHO_TEST_TXD (28)
#define ECHO_TEST_RXD (14)
#define ECHO_TEST_RTS (12)
#define ECHO_TEST_CTS (13)

But it not worked very well

incompatible types when assigning to type 'ip4_addr_t'

M5Stack-Camera/qr/main/main.c:274:17: error: incompatible types when assigning to type 'ip4_addr_t' {aka 'struct ip4_addr'} from type 'esp_ip4_addr_t' {aka 'struct esp_ip4_addr'}
s_ip_addr = event->event_info.got_ip.ip_info.ip;
^

undefined reference to `led_brightness'

ESP-IDF: 3.2.3
Windows 10
I am attempting to flash the WIFI_AP example to my M5Stack ESP32 Cam but the build keeps failing with a message about the led_brightness.

The only change I made to the main.c of the WIFI_AP example is I changed the SSID name, just to see if it would build.

The "idf.py build" output is as follows:

c:\SRC\m5stack-cam-psram\wifi\wifi_ap>idf.py build Note: You are using Python 3.7.4. Python 3 support is new, please report any problems you encounter. Search for 'Setting the Python Interpreter' in the ESP-IDF docs if you want to use Python 2.7. Checking Python dependencies... Python requirements from c:\esp\esp-idf\requirements.txt are satisfied. Running ninja in directory c:\SRC\m5stack-cam-psram\wifi\wifi_ap\build Executing "ninja all"... [494/751] Performing configure step for 'bootloader' -- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.24.0.windows.2") -- Component names: soc spi_flash micro-ecc bootloader_support esptool_py partition_table main esp32 log bootloader -- Component paths: C:/esp/esp-idf/components/soc;C:/esp/esp-idf/components/spi_flash;C:/esp/esp-idf/components/micro-ecc;C:/esp/esp-idf/components/bootloader_support;C:/esp/esp-idf/components/esptool_py;C:/esp/esp-idf/components/partition_table;C:/esp/esp-idf/components/bootloader/subproject/main;C:/esp/esp-idf/components/esp32;C:/esp/esp-idf/components/log;C:/esp/esp-idf/components/bootloader -- The ASM compiler identification is GNU -- Found assembler: C:/esp/tools/tools/xtensa-esp32-elf/1.22.0-80-g6c4433a5-5.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe -- The C compiler identification is GNU 5.2.0 -- The CXX compiler identification is GNU 5.2.0 -- Check for working C compiler: C:/esp/tools/tools/xtensa-esp32-elf/1.22.0-80-g6c4433a5-5.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe -- Check for working C compiler: C:/esp/tools/tools/xtensa-esp32-elf/1.22.0-80-g6c4433a5-5.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: C:/esp/tools/tools/xtensa-esp32-elf/1.22.0-80-g6c4433a5-5.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe -- Check for working CXX compiler: C:/esp/tools/tools/xtensa-esp32-elf/1.22.0-80-g6c4433a5-5.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- ccache will be used for faster builds -- Component libraries: soc;spi_flash;micro-ecc;bootloader_support;main;esp32;log -- Adding linker script C:/esp/esp-idf/components/bootloader/subproject/main/esp32.bootloader.ld -- Adding linker script C:/esp/esp-idf/components/bootloader/subproject/main/esp32.bootloader.rom.ld -- Adding linker script C:/esp/esp-idf/components/esp32/ld/esp32.rom.ld -- Adding linker script C:/esp/esp-idf/components/esp32/ld/esp32.rom.spiram_incompatible_fns.ld -- Adding linker script C:/esp/esp-idf/components/esp32/ld/esp32.peripherals.ld -- Configuring done -- Generating done -- Build files have been written to: C:/SRC/m5stack-cam-psram/wifi/wifi_ap/build/bootloader [541/751] Performing build step for 'bootloader' [1/43] Building C object soc/CMakeFiles/soc.dir/esp32/gpio_periph.c.obj [2/43] Building C object soc/CMakeFiles/soc.dir/esp32/rtc_init.c.obj [3/43] Building C object soc/CMakeFiles/soc.dir/esp32/cpu_util.c.obj [4/43] Building C object soc/CMakeFiles/soc.dir/esp32/rtc_clk_init.c.obj [5/43] Building C object soc/CMakeFiles/soc.dir/esp32/rtc_clk.c.obj [6/43] Building C object soc/CMakeFiles/soc.dir/esp32/rtc_periph.c.obj [7/43] Building C object soc/CMakeFiles/soc.dir/esp32/rtc_sleep.c.obj [8/43] Building C object soc/CMakeFiles/soc.dir/esp32/sdio_slave_periph.c.obj [9/43] Building C object soc/CMakeFiles/soc.dir/esp32/rtc_pm.c.obj [10/43] Building C object soc/CMakeFiles/soc.dir/esp32/rtc_wdt.c.obj [11/43] Generating dummy_main_src.c [12/43] Building C object soc/CMakeFiles/soc.dir/esp32/sdmmc_periph.c.obj [13/43] Building C object soc/CMakeFiles/soc.dir/esp32/rtc_time.c.obj [14/43] Building C object soc/CMakeFiles/soc.dir/esp32/soc_memory_layout.c.obj [15/43] Building C object soc/CMakeFiles/soc.dir/esp32/spi_periph.c.obj [16/43] Building C object CMakeFiles/bootloader.elf.dir/dummy_main_src.c.obj [17/43] Building C object spi_flash/CMakeFiles/spi_flash.dir/spi_flash_rom_patch.c.obj [18/43] Linking C static library spi_flash\libspi_flash.a [19/43] Building C object micro-ecc/CMakeFiles/micro-ecc.dir/micro-ecc/uECC.c.obj [20/43] Building C object soc/CMakeFiles/soc.dir/src/memory_layout_utils.c.obj [21/43] Building C object bootloader_support/CMakeFiles/bootloader_support.dir/src/bootloader_clock.c.obj [22/43] Linking C static library micro-ecc\libmicro-ecc.a [23/43] Linking C static library soc\libsoc.a [24/43] Building C object bootloader_support/CMakeFiles/bootloader_support.dir/src/bootloader_common.c.obj [25/43] Building C object bootloader_support/CMakeFiles/bootloader_support.dir/src/efuse.c.obj [26/43] Building C object bootloader_support/CMakeFiles/bootloader_support.dir/src/bootloader_random.c.obj [27/43] Building C object bootloader_support/CMakeFiles/bootloader_support.dir/src/bootloader_flash.c.obj [28/43] Building C object bootloader_support/CMakeFiles/bootloader_support.dir/src/bootloader_sha.c.obj [29/43] Building C object bootloader_support/CMakeFiles/bootloader_support.dir/src/flash_qio_mode.c.obj [30/43] Building C object bootloader_support/CMakeFiles/bootloader_support.dir/src/flash_encrypt.c.obj [31/43] Building C object bootloader_support/CMakeFiles/bootloader_support.dir/src/secure_boot.c.obj [32/43] Building C object bootloader_support/CMakeFiles/bootloader_support.dir/src/bootloader_utility.c.obj [33/43] Building C object bootloader_support/CMakeFiles/bootloader_support.dir/src/flash_partitions.c.obj [34/43] Building C object bootloader_support/CMakeFiles/bootloader_support.dir/src/secure_boot_signatures.c.obj [35/43] Building C object bootloader_support/CMakeFiles/bootloader_support.dir/src/esp_image_format.c.obj [36/43] Building C object log/CMakeFiles/log.dir/log.c.obj [37/43] Building C object main/CMakeFiles/main.dir/bootloader_start.c.obj [38/43] Linking C static library log\liblog.a [39/43] Linking C static library main\libmain.a [40/43] Building C object bootloader_support/CMakeFiles/bootloader_support.dir/src/bootloader_init.c.obj [41/43] Linking C static library bootloader_support\libbootloader_support.a [42/43] Linking C executable bootloader.elf [43/43] Generating bootloader.bin esptool.py v2.6 [748/751] Building C object main/CMakeFiles/main.dir/main.c.obj In file included from ../main/main.c:17:0: ../main/config.h:31:0: warning: "CAM_PIN_D0" redefined #define CAM_PIN_D0 17 ^ ../main/config.h:19:0: note: this is the location of the previous definition #define CAM_PIN_D0 32 ^ ../main/config.h:36:0: warning: "CAMERA_LED_GPIO" redefined #define CAMERA_LED_GPIO 16 ^ ../main/config.h:25:0: note: this is the location of the previous definition #define CAMERA_LED_GPIO 14 ^ [750/751] Linking CXX executable camera.elf FAILED: camera.elf cmd.exe /C "cd . && C:\esp\tools\tools\xtensa-esp32-elf\1.22.0-80-g6c4433a5-5.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe -nostdlib CMakeFiles/camera.elf.dir/dummy_main_src.c.obj -o camera.elf -Wl,--gc-sections -Wl,--cref -Wl,--Map=camera.map -Wl,--start-group soc/libsoc.a log/liblog.a heap/libheap.a xtensa-debug-module/libxtensa-debug-module.a app_trace/libapp_trace.a freertos/libfreertos.a vfs/libvfs.a newlib/libnewlib.a esp_ringbuf/libesp_ringbuf.a driver/libdriver.a esp_event/libesp_event.a ethernet/libethernet.a lwip/liblwip.a tcpip_adapter/libtcpip_adapter.a app_update/libapp_update.a spi_flash/libspi_flash.a mbedtls/libmbedtls.a micro-ecc/libmicro-ecc.a bootloader_support/libbootloader_support.a nvs_flash/libnvs_flash.a pthread/libpthread.a smartconfig_ack/libsmartconfig_ack.a wpa_supplicant/libwpa_supplicant.a esp32/libesp32.a cxx/libcxx.a esp32-camera/libesp32-camera.a asio/libasio.a jsmn/libjsmn.a coap/libcoap.a console/libconsole.a nghttp/libnghttp.a esp-tls/libesp-tls.a esp_adc_cal/libesp_adc_cal.a tcp_transport/libtcp_transport.a esp_http_client/libesp_http_client.a esp_http_server/libesp_http_server.a esp_https_ota/libesp_https_ota.a expat/libexpat.a wear_levelling/libwear_levelling.a sdmmc/libsdmmc.a fatfs/libfatfs.a freemodbus/libfreemodbus.a json/libjson.a libsodium/liblibsodium.a mdns/libmdns.a mqtt/libmqtt.a openssl/libopenssl.a protobuf-c/libprotobuf-c.a protocomm/libprotocomm.a spiffs/libspiffs.a ulp/libulp.a wifi_provisioning/libwifi_provisioning.a main/libmain.a -lgcov -Wl,--undefined=uxTopUsedPriority -L C:/esp/esp-idf/components/newlib/lib -lc-psram-workaround -lm-psram-workaround -L C:/esp/esp-idf/components/esp32/lib -L C:/esp/esp-idf/components/esp32/ld/wifi_iram_opt -lcoexist -lcore -lespnow -lmesh -lnet80211 -lphy -lpp -lrtc -lsmartconfig -lwpa2 -lwpa -lwps -L C:/SRC/m5stack-cam-psram/wifi/wifi_ap/build/esp32 -T esp32_out.ld -L C:/esp/esp-idf/components/esp32/ld -T esp32.common.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.libgcc.ld C:/esp/esp-idf/components/esp32/libhal.a -lgcc -u call_user_start_cpu0 -u ld_include_panic_highint_hdl -lstdc++ -u __cxa_guard_dummy -u __cxx_fatal_exception && cd ." main/libmain.a(main.c.obj):(.literal.app_main+0x18): undefined reference toled_brightness'
main/libmain.a(main.c.obj): In function app_main': c:\SRC\m5stack-cam-psram\wifi\wifi_ap\build/../main/main.c:82: undefined reference to led_brightness'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
`

make menuconfig

When I execute "make menuconfig" in the cloned M5Stack-Camera director I get the message
"make: *** No rule to make target `menuconfig'. Stop.".
I am using macOS. Can anyone help?

Error 0x20001

D (205) spiram: Allocating block of size 32768 bytes
D (215) intr_alloc: Connected src 16 to int 12 (cpu 0)
D (225) nvs: nvs_flash_init_custom partition=nvs start=9 count=6
I (265) camera: Enabling XCLK output
D (265) ledc: LEDC_PWM CHANNEL 0|GPIO 27|Duty 0002|Time 0
I (265) camera: Initializing SSCB
I (265) camera: Resetting camera
I (265) gpio: GPIO[15]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (295) camera: Searching for camera address
E (305) camera: Camera probe failed with error 0x20001
E (315) camera: Camera Init Failed

I use it.
M5CAMERA001
https://www.switch-science.com/catalog/5207/

I think pin assignment is wrong
Please tell me the correct pin assignment

BR.

Failed to init external RAM!

I bought this camera:
https://www.aliexpress.com/item/M5Stack-Official-ESP32-Camera-Module-Development-Board-OV2640-Camera-Type-C-Grove-Port-3D-Wifi-Antenna/32881414545.html

I've set
D2, VSYNC, SIOD and camera type to 1 in main.c


#define M5_CAM_KIND 1 // 1 --> A model, 2 --> B model
// #define FISH_EYE_CAM  // fish eye need flip image
#define CAM_USE_WIFI

#if M5_CAM_KIND == 1
#define CAM_PIN_SIOD    25
#define CAM_PIN_VSYNC   22
#else
#define CAM_PIN_SIOD    22
#define CAM_PIN_VSYNC   25
#endif

//M5STACK_CAM PIN Map
#define CAM_PIN_RESET   15 //software reset will be performed
#define CAM_PIN_XCLK    27
#define CAM_PIN_SIOC    23

#define CAM_PIN_D7      19
#define CAM_PIN_D6      36
#define CAM_PIN_D5      18
#define CAM_PIN_D4      39
#define CAM_PIN_D3      5
#define CAM_PIN_D2      34
#define CAM_PIN_D1      35
#define CAM_PIN_D0      17

#define CAM_PIN_HREF    26
#define CAM_PIN_PCLK    21

I do not know what to enter for modbus as I don't use it I set it to 11,12 and 14 in sdkconfig.
Like so

CONFIG_MB_UART_RXD=11
CONFIG_MB_UART_TXD=12
CONFIG_MB_UART_RTS=14

I got this error:

...
I (639) boot: Loaded app from partition at offset 0x10000
I (639) boot: Disabling RNG early entropy source...
D (639) boot: Mapping segment 0 as IROM
D (643) boot: Mapping segment 4 as DROM
D (647) boot: calling set_cache_and_start_app
D (652) boot: configure drom and irom and start
D (656) boot: start: 0x400813b0
0x400813b0: call_start_cpu0 at /Users/f/esp/esp-idf/components/esp32/cpu_start.c:120

E (660) cpu_start: Failed to init external RAM!
abort() was called at PC 0x4008140d on core 0
0x4008140d: call_start_cpu0 at /Users/f/esp/esp-idf/components/esp32/cpu_start.c:171 (discriminator 1)


Backtrace: 0x40093058:0x3ffe3bd0 0x40093281:0x3ffe3bf0 0x4008140d:0x3ffe3c10 0x40079202:0x3ffe3c30 0x400792f9:0x3ffe3c60 0x40079317:0x3ffe3ca0 0x400796fb:0x3ffe3cc0 0x400807d2:0x3ffe3df0 0x40007c31:0x3ffe3eb0 0x4000073d:0x3ffe3f20
0x40093058: invoke_abort at /Users/f/esp/esp-idf/components/esp32/panic.c:680

0x40093281: abort at /Users/f/esp/esp-idf/components/esp32/panic.c:680

0x4008140d: call_start_cpu0 at /Users/f/esp/esp-idf/components/esp32/cpu_start.c:171 (discriminator 1)

What do I miss ?

$ make version
Toolchain path: /Users/f/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a
Compiler version: 5.2.0

Compile Error

I set up the esp-idf and compiled this code but got below error as below.
Is there any requirement to compile?

/m5stack-cam-psram-ModeA/main/main.c:16:29: fatal error: esp_http_server.h: No such file or directory
compilation terminated.
make[1]: *** [main.o] Error 1
make: *** [component-main-build] Error 2

black screen on start

I am having an issue with the new fisheye camera. I plugged it in and accessed the ap wifi but then when I go to 196.128.4.1 it is just showing a black screen with a small white square in the middle. I downloaded the firmware and reloaded it but it does the same thing. Can anybody tell me what might be the issue.

The "qr_task" can't be created successful when the wifi is openning(AP)

Hi All:
I open the wifi(AP) as below:
wifi_init_softap();
vTaskDelay(100 / portTICK_PERIOD_MS);
http_server_init();
Then I created the qr_reco task as below:
xTaskCreate( qr_recognize, "qr_recognize", 102460, &camera_config, 8, &xTask4);
But the task responsed "-1", maybe not enough memory. The depth is "1024
60", but when I created a task which depth is "1024*20", it could work well. Does the wifi cost lots of memory? So what can I do next ? Thanks ! :D

How to read the JPEG data directly??

        fb = esp_camera_fb_get();   //获得buffer指针
    if (!fb) {
        ESP_LOGE(TAG, "Camera capture failed");
        res = ESP_FAIL;
    } else {
        if(fb->format != PIXFORMAT_JPEG){
            bool jpeg_converted = frame2jpg(fb, 80, &_jpg_buf, &_jpg_buf_len);  // 获取图像buffer
            if(!jpeg_converted){
                ESP_LOGE(TAG, "JPEG compression failed");
                esp_camera_fb_return(fb);
                res = ESP_FAIL;
            }
        } else {
             _jpg_buf_len = fb->len;
             _jpg_buf = fb->buf;
        }

Now, I want to read the _jpg_buf directly(RGB), how to do this ? Can I ? I want to transfer the JPEG by spi.

Build Issue - RTCIO support must be enabled.

Module: ESP32CAM

/home/xxx/workspace/m5cam/components/esp32-camera/driver/twi.c:61:24: error: 'rtc_gpio_desc' undeclared (first use in this function); did you mean 'rtc_io_desc'?
     uint32_t rtc_reg = rtc_gpio_desc[pin].reg;

Requires RTCIO support be enabled in 'make menuconfig':
image

m5stack-cam PIR trigger

Hi, is it possible to initialize the wifi and cam but only activate the video capture from PIR sensor?

Camera not detected after esp_restart

I'm trying to restart the ESP programmatically using esp_restart(). But after doing so, the camera can't be initialised. These are the last log messages after rebooting:

I (628) cpu_start: App cpu up.
I (1135) spiram: SPI SRAM memory test OK
I (1135) heap_init: Initializing. RAM available for dynamic allocation:
I (1135) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1141) heap_init: At 3FFBB2A0 len 00024D60 (147 KiB): DRAM
I (1148) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1154) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1161) heap_init: At 40097998 len 00008668 (33 KiB): IRAM
I (1167) cpu_start: Pro cpu start user code
I (1172) spiram: Adding pool of 4096K of external SPI memory to heap allocator
I (186) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (187) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (237) gpio: GPIO[0]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (257) gpio: GPIO[15]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
E (297) camera: Camera probe failed with error 0x20001
E (297) camera: Camera Init Failed

The issue can be reproduced inserting the command esp_restart(); within an http handler, e.g. in imu_handler on the origin/mpu6050 branch and requesting the imu endpoint.

Is there anything I can do to restart the ESP on demand?

error: 'rtc_gpio_desc' undeclared

make in /qr fails. Does it mean rtc_io_desc?

`$ make
Toolchain path: /Users/danielmcshan/.espressif/tools/xtensa-esp32-elf/esp-2020r1-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: esp-2020r1
Compiler version: 8.2.0
Python requirements from /Users/danielmcshan/esp/esp-idf/requirements.txt are satisfied.
App "camera" version: f81a925-dirty
Python requirements from /Users/danielmcshan/esp/esp-idf/requirements.txt are satisfied.
Building partitions from /Users/danielmcshan/esp/esp-idf/components/partition_table/partitions_singleapp.csv...
CC build/bootloader/bootloader_support/src/bootloader_clock.o
CC build/bootloader/bootloader_support/src/bootloader_common.o
CC build/bootloader/bootloader_support/src/bootloader_efuse_esp32.o
CC build/bootloader/bootloader_support/src/bootloader_flash.o
CC build/bootloader/bootloader_support/src/bootloader_flash_config_esp32.o
CC build/bootloader/bootloader_support/src/bootloader_init.o
CC build/bootloader/bootloader_support/src/bootloader_mem.o
CC build/bootloader/bootloader_support/src/bootloader_random.o
CC build/bootloader/bootloader_support/src/bootloader_utility.o
CC build/bootloader/bootloader_support/src/esp_image_format.o
CC build/bootloader/bootloader_support/src/flash_encrypt.o
CC build/bootloader/bootloader_support/src/flash_partitions.o
CC build/bootloader/bootloader_support/src/flash_qio_mode.o
CC build/bootloader/bootloader_support/src/esp32/bootloader_esp32.o
CC build/bootloader/bootloader_support/src/esp32/bootloader_sha.o
CC build/bootloader/bootloader_support/src/esp32/flash_encrypt.o
AR build/bootloader/bootloader_support/libbootloader_support.a
CC build/bootloader/log/log.o
CC build/bootloader/log/log_buffers.o
CC build/bootloader/log/log_noos.o
AR build/bootloader/log/liblog.a
CC build/bootloader/spi_flash/esp32/spi_flash_rom_patch.o
AR build/bootloader/spi_flash/libspi_flash.a
CC build/bootloader/micro-ecc/uECC_verify_antifault.o
AR build/bootloader/micro-ecc/libmicro-ecc.a
CC build/bootloader/soc/src/compare_set.o
CC build/bootloader/soc/src/cpu_util.o
CC build/bootloader/soc/src/lldesc.o
CC build/bootloader/soc/src/memory_layout_utils.o
CC build/bootloader/soc/src/soc_include_legacy_warn.o
CC build/bootloader/soc/src/hal/adc_hal.o
CC build/bootloader/soc/src/hal/can_hal.o
CC build/bootloader/soc/src/hal/cpu_hal.o
CC build/bootloader/soc/src/hal/dac_hal.o
CC build/bootloader/soc/src/hal/gpio_hal.o
CC build/bootloader/soc/src/hal/i2c_hal.o
CC build/bootloader/soc/src/hal/i2c_hal_iram.o
CC build/bootloader/soc/src/hal/i2s_hal.o
CC build/bootloader/soc/src/hal/ledc_hal.o
CC build/bootloader/soc/src/hal/ledc_hal_iram.o
CC build/bootloader/soc/src/hal/mcpwm_hal.o
CC build/bootloader/soc/src/hal/mpu_hal.o
CC build/bootloader/soc/src/hal/pcnt_hal.o
CC build/bootloader/soc/src/hal/rmt_hal.o
CC build/bootloader/soc/src/hal/rtc_io_hal.o
CC build/bootloader/soc/src/hal/sdio_slave_hal.o
CC build/bootloader/soc/src/hal/sigmadelta_hal.o
CC build/bootloader/soc/src/hal/soc_hal.o
CC build/bootloader/soc/src/hal/spi_flash_hal.o
CC build/bootloader/soc/src/hal/spi_flash_hal_gpspi.o
CC build/bootloader/soc/src/hal/spi_flash_hal_iram.o
CC build/bootloader/soc/src/hal/spi_hal.o
CC build/bootloader/soc/src/hal/spi_hal_iram.o
CC build/bootloader/soc/src/hal/spi_slave_hal.o
CC build/bootloader/soc/src/hal/spi_slave_hal_iram.o
CC build/bootloader/soc/src/hal/timer_hal.o
CC build/bootloader/soc/src/hal/touch_sensor_hal.o
CC build/bootloader/soc/src/hal/uart_hal.o
CC build/bootloader/soc/src/hal/uart_hal_iram.o
CC build/bootloader/soc/src/hal/wdt_hal_iram.o
CC build/bootloader/soc/src/esp32/adc_hal.o
CC build/bootloader/soc/src/esp32/brownout_hal.o
CC build/bootloader/soc/src/esp32/emac_hal.o
CC build/bootloader/soc/src/esp32/rtc_clk.o
CC build/bootloader/soc/src/esp32/rtc_clk_init.o
CC build/bootloader/soc/src/esp32/rtc_init.o
CC build/bootloader/soc/src/esp32/rtc_pm.o
CC build/bootloader/soc/src/esp32/rtc_sleep.o
CC build/bootloader/soc/src/esp32/rtc_time.o
CC build/bootloader/soc/src/esp32/rtc_wdt.o
CC build/bootloader/soc/src/esp32/soc_memory_layout.o
CC build/bootloader/soc/src/esp32/touch_sensor_hal.o
CC build/bootloader/soc/soc/esp32/adc_periph.o
CC build/bootloader/soc/soc/esp32/dac_periph.o
CC build/bootloader/soc/soc/esp32/gpio_periph.o
CC build/bootloader/soc/soc/esp32/i2c_periph.o
CC build/bootloader/soc/soc/esp32/i2s_periph.o
CC build/bootloader/soc/soc/esp32/interrupts.o
CC build/bootloader/soc/soc/esp32/ledc_periph.o
CC build/bootloader/soc/soc/esp32/rtc_io_periph.o
CC build/bootloader/soc/soc/esp32/rtc_periph.o
CC build/bootloader/soc/soc/esp32/sdio_slave_periph.o
CC build/bootloader/soc/soc/esp32/sdmmc_periph.o
CC build/bootloader/soc/soc/esp32/spi_periph.o
CC build/bootloader/soc/soc/esp32/touch_sensor_periph.o
CC build/bootloader/soc/soc/esp32/uart_periph.o
AR build/bootloader/soc/libsoc.a
CC build/bootloader/main/bootloader_start.o
AR build/bootloader/main/libmain.a
CC build/bootloader/efuse/esp32/esp_efuse_table.o
CC build/bootloader/efuse/src/esp_efuse_api.o
CC build/bootloader/efuse/src/esp_efuse_fields.o
CC build/bootloader/efuse/src/esp_efuse_utility.o
CC build/bootloader/efuse/src/esp32/esp_efuse_api.o
CC build/bootloader/efuse/src/esp32/esp_efuse_fields.o
CC build/bootloader/efuse/src/esp32/esp_efuse_utility.o
AR build/bootloader/efuse/libefuse.a
LD build/bootloader/bootloader.elf
esptool.py v3.0-dev

CC build/app_trace/app_trace.o
CC build/app_trace/app_trace_util.o
CC build/app_trace/heap_trace_tohost.o
CC build/app_trace/host_file_io.o
CC build/app_trace/gcov/gcov_rtio.o
AR build/app_trace/libapp_trace.a
App "camera" version: f81a925-dirty
CC build/app_update/esp_app_desc.o
CC build/app_update/esp_ota_ops.o
AR build/app_update/libapp_update.a
CXX build/asio/asio/asio/src/asio.o
AR build/asio/libasio.a
CC build/bootloader_support/src/bootloader_clock.o
CC build/bootloader_support/src/bootloader_common.o
CC build/bootloader_support/src/bootloader_efuse_esp32.o
CC build/bootloader_support/src/bootloader_flash.o
CC build/bootloader_support/src/bootloader_flash_config_esp32.o
CC build/bootloader_support/src/bootloader_mem.o
CC build/bootloader_support/src/bootloader_random.o
CC build/bootloader_support/src/bootloader_utility.o
CC build/bootloader_support/src/esp_image_format.o
CC build/bootloader_support/src/flash_encrypt.o
CC build/bootloader_support/src/flash_partitions.o
CC build/bootloader_support/src/flash_qio_mode.o
CC build/bootloader_support/src/idf/bootloader_sha.o
AR build/bootloader_support/libbootloader_support.a
AR build/bt/libbt.a
CC build/cbor/tinycbor/src/cborencoder.o
CC build/cbor/tinycbor/src/cborencoder_close_container_checked.o
CC build/cbor/tinycbor/src/cborerrorstrings.o
CC build/cbor/tinycbor/src/cborparser.o
CC build/cbor/tinycbor/src/cborparser_dup_string.o
CC build/cbor/tinycbor/src/cborpretty.o
CC build/cbor/tinycbor/src/cborpretty_stdio.o
CC build/cbor/tinycbor/src/cbortojson.o
CC build/cbor/tinycbor/src/cborvalidation.o
CC build/cbor/tinycbor/src/open_memstream.o
AR build/cbor/libcbor.a
CC build/coap/libcoap/src/address.o
CC build/coap/libcoap/src/async.o
CC build/coap/libcoap/src/block.o
CC build/coap/libcoap/src/coap_event.o
CC build/coap/libcoap/src/coap_hashkey.o
CC build/coap/libcoap/src/coap_session.o
CC build/coap/libcoap/src/coap_time.o
CC build/coap/port/coap_debug.o
CC build/coap/libcoap/src/encode.o
CC build/coap/libcoap/src/mem.o
CC build/coap/libcoap/src/net.o
CC build/coap/libcoap/src/option.o
CC build/coap/libcoap/src/pdu.o
CC build/coap/libcoap/src/resource.o
CC build/coap/libcoap/src/str.o
CC build/coap/libcoap/src/subscribe.o
CC build/coap/libcoap/src/uri.o
CC build/coap/port/coap_mbedtls.o
CC build/coap/libcoap/src/coap_io.o
CC build/coap/port/coap_notls.o
AR build/coap/libcoap.a
CC build/console/linenoise/linenoise.o
CC build/console/argtable3/argtable3.o
CC build/console/commands.o
CC build/console/esp_console_repl.o
CC build/console/split_argv.o
AR build/console/libconsole.a
CXX build/cxx/cxx_exception_stubs.o
CXX build/cxx/cxx_guards.o
AR build/cxx/libcxx.a
CC build/driver/adc_common.o
CC build/driver/can.o
CC build/driver/dac.o
CC build/driver/gpio.o
CC build/driver/i2c.o
CC build/driver/i2s.o
CC build/driver/ledc.o
CC build/driver/mcpwm.o
CC build/driver/pcnt.o
CC build/driver/periph_ctrl.o
CC build/driver/rmt.o
CC build/driver/rtc_io.o
CC build/driver/rtc_module.o
CC build/driver/sdio_slave.o
CC build/driver/sdmmc_host.o
CC build/driver/sdmmc_transaction.o
CC build/driver/sdspi_crc.o
CC build/driver/sdspi_host.o
CC build/driver/sdspi_transaction.o
CC build/driver/sigmadelta.o
CC build/driver/spi_bus_lock.o
CC build/driver/spi_common.o
CC build/driver/spi_master.o
CC build/driver/spi_slave.o
CC build/driver/timer.o
CC build/driver/touch_sensor_common.o
CC build/driver/uart.o
CC build/driver/esp32/adc.o
CC build/driver/esp32/touch_sensor.o
AR build/driver/libdriver.a
CC build/efuse/esp32/esp_efuse_table.o
CC build/efuse/src/esp_efuse_api.o
CC build/efuse/src/esp_efuse_fields.o
CC build/efuse/src/esp_efuse_utility.o
CC build/efuse/src/esp32/esp_efuse_api.o
CC build/efuse/src/esp32/esp_efuse_fields.o
CC build/efuse/src/esp32/esp_efuse_utility.o
AR build/efuse/libefuse.a
CC build/esp-tls/esp_tls.o
CC build/esp-tls/esp_tls_mbedtls.o
AR build/esp-tls/libesp-tls.a
CC build/esp32/cache_err_int.o
CC build/esp32/cache_sram_mmu.o
CC build/esp32/clk.o
CC build/esp32/cpu_start.o
CC build/esp32/crosscore_int.o
CC build/esp32/dport_access.o
CC build/esp32/esp_himem.o
CC build/esp32/hw_random.o
CC build/esp32/intr_alloc.o
CC build/esp32/pm_esp32.o
CC build/esp32/pm_trace.o
CC build/esp32/sleep_modes.o
CC build/esp32/spiram.o
CC build/esp32/spiram_psram.o
CC build/esp32/system_api_esp32.o
AR build/esp32/libesp32.a
CC build/esp32-camera/driver/camera.o
In file included from /Users/danielmcshan/Documents/GitHub/M5Stack-Camera/qr/components/esp32-camera/driver/camera.c:22:
/Users/danielmcshan/esp/esp-idf/components/esp32/include/rom/lldesc.h:1:2: warning: #warning rom/lldesc.h is deprecated, please use esp32/rom/lldesc.h instead [-Wcpp]
#warning rom/lldesc.h is deprecated, please use esp32/rom/lldesc.h instead
^~~~~~~
In file included from /Users/danielmcshan/Documents/GitHub/M5Stack-Camera/qr/components/esp32-camera/driver/private_include/camera_common.h:6,
from /Users/danielmcshan/Documents/GitHub/M5Stack-Camera/qr/components/esp32-camera/driver/camera.c:35:
/Users/danielmcshan/esp/esp-idf/components/esp32/include/rom/lldesc.h:1:2: warning: #warning rom/lldesc.h is deprecated, please use esp32/rom/lldesc.h instead [-Wcpp]
#warning rom/lldesc.h is deprecated, please use esp32/rom/lldesc.h instead
^~~~~~~
CC build/esp32-camera/driver/sccb.o
CC build/esp32-camera/driver/sensor.o
CC build/esp32-camera/driver/twi.o
/Users/danielmcshan/Documents/GitHub/M5Stack-Camera/qr/components/esp32-camera/driver/twi.c: In function 'pinMode':
/Users/danielmcshan/Documents/GitHub/M5Stack-Camera/qr/components/esp32-camera/driver/twi.c:61:24: error: 'rtc_gpio_desc' undeclared (first use in this function); did you mean 'rtc_io_desc'?
uint32_t rtc_reg = rtc_gpio_desc[pin].reg;
^~~~~~~~~~~~~
rtc_io_desc
/Users/danielmcshan/Documents/GitHub/M5Stack-Camera/qr/components/esp32-camera/driver/twi.c:61:24: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [driver/twi.o] Error 1
make: *** [component-esp32-camera-build] Error 2
`

cpu_start: Failed to init external RAM!

I come across the same issue as Fah... I configure the pins according to https://docs.m5stack.com/#/en/unit/esp32cam (CAM Type A (1) and CAM_PIN_D0 to 17 rather 32)
Module continuoulsy reports
D (656) boot: configure drom and irom and start
D (661) boot: start: 0x4008142c
E (665) cpu_start: Failed to init external RAM!
abort() was called at PC 0x4008148d on core 0

Backtrace: 0x4008f92c:0x3ffe3bd0 0x4008fb55:0x3ffe3bf0 0x4008148d:0x3ffe3c10 0x4007939e:0x3ffe3c30 0x40079495:0x3ffe3c60 0x400794b3:0x3ffe3ca0 0x40079861:0x3ffe3cc0 0x400807d2:0x3ffe3df0 0x40007c31:0x3ffe3eb0 0x4000073d:0x3ffe3f20

Rebooting...

I have cloned the git repo https://github.com/m5stack/m5stack-cam-psram/tree/NoPsram but looks like something tries to initialize the non fitted external PSRAM...

I have also downladed already compiled files in firmware directory and the same issue happens.

How to close the wifi function with AP model

Hi:
Now, I want to create a task to open the wifi. FreeRTOS task can't have the "return", I created the task as below:
void wifi( void * parameter )
{
wifi_init_softap(); // 启动wifi //!! http
// static httpd_handle_t server = NULL; // http
// wifi_init_router(&server);//初始化wifi
vTaskDelay(100 / portTICK_PERIOD_MS); // 任务等待
http_server_init(); // 调用http服务 http
}

But the "http_server_init()" has "return" value, so task failed. What should I do?
Thanks !

esp-32 cam, no psram, compiling error

Using esp-idf latest version (4.1-dev), I'm trying to build the firmware for the esp-32 camera model without psram but I'm getting a compiler error.
Configuration options
cd m5stack-cam-psram/wifi/wifi_ap/
make menuconfig --> camera model --> esp32camera
make menuconfig --> component config --> camera... --> Use hardware I2C1 for SCCB = n, OV2640 Support = y
make menuconfig --> component config --> esp32 specific --> support for external spi ram = y --> spi ram config --> Ignore psram when not found = y
All the other options as default.

make gives the following error:

/esp-idf/m5stack-cam-psram/wifi/wifi_ap/main/main.c:232:17: error: incompatible types when assigning to type 'ip4_addr_t' {aka 'struct ip4_addr'} from type 'esp_ip4_addr_t' {aka 'struct esp_ip4_addr'}
s_ip_addr = event->event_info.got_ip.ip_info.ip;

Core 0 panic'ed (StoreProhibited).

Hi
I met the issue as below, thanks !
Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x40151b09 PS : 0x00060230 A0 : 0x8012e185 A1 : 0x3fffa140
A2 : 0x3fffa1f0 A3 : 0x9fd21a49 A4 : 0x7fd3af76 A5 : 0x00000004
A6 : 0x00000001 A7 : 0x00000000 A8 : 0x1ef64ef7 A9 : 0x00000000
A10 : 0x00000000 A11 : 0x000000ff A12 : 0xbff680fb A13 : 0x00000000
A14 : 0x3ffae93c A15 : 0x00000000 SAR : 0x00000001 EXCCAUSE: 0x0000001d
EXCVADDR: 0x1ef64ef7 LBEG : 0x40098351 LEND : 0x40098361 LCOUNT : 0xffffffff

Backtrace: 0x40151b09:0x3fffa140 0x4012e182:0x3fffa160 0x4012e237:0x3fffa180 0x4012e2cf:0x3fffa1c0 0x4012e32d:0x3fffa1f0 0x400d704d:0x3fffa230 0x40093619:0x3fffa280

Rebooting...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.