From 54f6847dd51afeb0ab31ce36ca9513f8628ed5d2 Mon Sep 17 00:00:00 2001 From: Slider0007 <115730895+Slider0007@users.noreply.github.com> Date: Mon, 29 Jan 2024 16:39:59 +0100 Subject: [PATCH] refactor(build): Refactor board type / camera model selection (#126) --- .../ClassControllCamera.cpp | 92 +++++---- code/components/jomjol_helper/statusled.cpp | 20 +- code/include/defines.h | 191 +++++++----------- code/platformio.ini | 47 +++-- 4 files changed, 163 insertions(+), 187 deletions(-) diff --git a/code/components/jomjol_controlcamera/ClassControllCamera.cpp b/code/components/jomjol_controlcamera/ClassControllCamera.cpp index ccd43ffea..dcef3e15f 100644 --- a/code/components/jomjol_controlcamera/ClassControllCamera.cpp +++ b/code/components/jomjol_controlcamera/ClassControllCamera.cpp @@ -40,35 +40,34 @@ static const char* _STREAM_PART = "Content-Type: image/jpeg\r\nContent-Length: % static camera_config_t camera_config = { - .pin_pwdn = CAM_PIN_PWDN, - .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 for OV2640 double FPS (Experimental) - .xclk_freq_hz = 20000000, // Orginal value + .pin_pwdn = PWDN_GPIO_NUM, + .pin_reset = RESET_GPIO_NUM, + .pin_xclk = XCLK_GPIO_NUM, + .pin_sccb_sda = SIOD_GPIO_NUM, + .pin_sccb_scl = SIOC_GPIO_NUM, + .pin_d7 = Y9_GPIO_NUM, + .pin_d6 = Y8_GPIO_NUM, + .pin_d5 = Y7_GPIO_NUM, + .pin_d4 = Y6_GPIO_NUM, + .pin_d3 = Y5_GPIO_NUM, + .pin_d2 = Y4_GPIO_NUM, + .pin_d1 = Y3_GPIO_NUM, + .pin_d0 = Y2_GPIO_NUM, + .pin_vsync = VSYNC_GPIO_NUM, + .pin_href = HREF_GPIO_NUM, + .pin_pclk = PCLK_GPIO_NUM, + + .xclk_freq_hz = 20000000, // Frequency (20Mhz) + .ledc_timer = LEDC_TIMER_0, .ledc_channel = LEDC_CHANNEL_0, - .pixel_format = PIXFORMAT_JPEG, //YUV422,GRAYSCALE,RGB565,JPEG - .frame_size = FRAMESIZE_VGA, //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 - .fb_location = CAMERA_FB_IN_PSRAM, /*!< The location where the frame buffer will be allocated */ - .grab_mode = CAMERA_GRAB_LATEST, // only from new esp32cam version + .pixel_format = PIXFORMAT_JPEG, // YUV422, GRAYSCALE, RGB565, JPEG + .frame_size = FRAMESIZE_VGA, // 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 + .fb_location = CAMERA_FB_IN_PSRAM, // The location where the frame buffer will be allocated */ + .grab_mode = CAMERA_GRAB_LATEST // only from new esp32cam version }; @@ -115,7 +114,7 @@ CCamera::CCamera() demoMode = false; CameraInitSuccessful = false; - #ifdef USE_PWM_LEDFLASH + #ifdef GPIO_FLASHLIGHT_DEFAULT_USE_LEDC ledc_init(); #endif } @@ -123,21 +122,26 @@ CCamera::CCamera() void CCamera::PowerResetCamera() { - - ESP_LOGD(TAG, "Resetting camera by power down line"); + #if PWDN_GPIO_NUM != GPIO_NUM_NC + ESP_LOGD(TAG, "Resetting camera by power cycling"); gpio_config_t conf; conf.intr_type = GPIO_INTR_DISABLE; - conf.pin_bit_mask = 1LL << GPIO_NUM_32; + conf.pin_bit_mask = 1LL << PWDN_GPIO_NUM; conf.mode = GPIO_MODE_OUTPUT; conf.pull_down_en = GPIO_PULLDOWN_DISABLE; conf.pull_up_en = GPIO_PULLUP_DISABLE; gpio_config(&conf); // carefull, logic is inverted compared to reset pin - gpio_set_level(GPIO_NUM_32, 1); + gpio_set_level(PWDN_GPIO_NUM, 1); vTaskDelay(1000 / portTICK_PERIOD_MS); - gpio_set_level(GPIO_NUM_32, 0); + gpio_set_level(PWDN_GPIO_NUM, 0); vTaskDelay(1000 / portTICK_PERIOD_MS); + return; + #else + ESP_LOGD(TAG, "Power pin not defined. Software power reset not available"); + return; + #endif } @@ -680,19 +684,19 @@ void CCamera::LightOnOff(bool status) { GpioHandler* gpioHandler = gpio_handler_get(); if ((gpioHandler != NULL) && (gpioHandler->isEnabled())) { - ESP_LOGD(TAG, "Use gpioHandler to trigger flashlight"); + ESP_LOGD(TAG, "GPIO handler enabled: Trigger flashlight by GPIO handler"); gpioHandler->flashLightEnable(status); - } + } else { - #ifdef USE_PWM_LEDFLASH + #ifdef GPIO_FLASHLIGHT_DEFAULT_USE_LEDC if (status) { - ESP_LOGD(TAG, "Internal Flash-LED turn on with PWM %d", led_intensity); + ESP_LOGD(TAG, "Default flashlight turn on with PWM %d", led_intensity); ESP_ERROR_CHECK(ledc_set_duty(LEDC_MODE, LEDC_CHANNEL, led_intensity)); // Update duty to apply the new value ESP_ERROR_CHECK(ledc_update_duty(LEDC_MODE, LEDC_CHANNEL)); } else { - ESP_LOGD(TAG, "Internal Flash-LED turn off PWM"); + ESP_LOGD(TAG, "Default flashlight turn off PWM"); ESP_ERROR_CHECK(ledc_set_duty(LEDC_MODE, LEDC_CHANNEL, 0)); ESP_ERROR_CHECK(ledc_update_duty(LEDC_MODE, LEDC_CHANNEL)); } @@ -700,12 +704,12 @@ void CCamera::LightOnOff(bool status) // Init the GPIO esp_rom_gpio_pad_select_gpio(FLASH_GPIO); // Set the GPIO as a push/pull output - gpio_set_direction(FLASH_GPIO, GPIO_MODE_OUTPUT); + gpio_set_direction(GPIO_FLASHLIGHT_DEFAULT, GPIO_MODE_OUTPUT); if (status) - gpio_set_level(FLASH_GPIO, 1); + gpio_set_level(GPIO_FLASHLIGHT_DEFAULT, 1); else - gpio_set_level(FLASH_GPIO, 0); + gpio_set_level(GPIO_FLASHLIGHT_DEFAULT, 0); #endif } } @@ -715,14 +719,14 @@ void CCamera::LEDOnOff(bool status) { if (xHandle_task_StatusLED == NULL) { // Init the GPIO - esp_rom_gpio_pad_select_gpio(BLINK_GPIO); + esp_rom_gpio_pad_select_gpio(GPIO_STATUS_LED_ONBOARD); /* Set the GPIO as a push/pull output */ - gpio_set_direction(BLINK_GPIO, GPIO_MODE_OUTPUT); + gpio_set_direction(GPIO_STATUS_LED_ONBOARD, GPIO_MODE_OUTPUT); if (!status) - gpio_set_level(BLINK_GPIO, 1); + gpio_set_level(GPIO_STATUS_LED_ONBOARD, 1); else - gpio_set_level(BLINK_GPIO, 0); + gpio_set_level(GPIO_STATUS_LED_ONBOARD, 0); } } diff --git a/code/components/jomjol_helper/statusled.cpp b/code/components/jomjol_helper/statusled.cpp index bd96a7647..bf7708df9 100644 --- a/code/components/jomjol_helper/statusled.cpp +++ b/code/components/jomjol_helper/statusled.cpp @@ -23,9 +23,9 @@ void task_StatusLED(void *pvParameter) //ESP_LOGD(TAG, "task_StatusLED - start"); struct StatusLEDData StatusLEDDataInt = StatusLEDData; - esp_rom_gpio_pad_select_gpio(BLINK_GPIO); // Init the GPIO - gpio_set_direction(BLINK_GPIO, GPIO_MODE_OUTPUT); // Set the GPIO as a push/pull output - gpio_set_level(BLINK_GPIO, 1);// LED off + esp_rom_gpio_pad_select_gpio(GPIO_STATUS_LED_ONBOARD); // Init the GPIO + gpio_set_direction(GPIO_STATUS_LED_ONBOARD, GPIO_MODE_OUTPUT); // Set the GPIO as a push/pull output + gpio_set_level(GPIO_STATUS_LED_ONBOARD, 1);// LED off for (int i=0; i<2; ) // Default: repeat 2 times { @@ -34,9 +34,9 @@ void task_StatusLED(void *pvParameter) for (int j = 0; j < StatusLEDDataInt.iSourceBlinkCnt; ++j) { - gpio_set_level(BLINK_GPIO, 0); + gpio_set_level(GPIO_STATUS_LED_ONBOARD, 0); vTaskDelay(StatusLEDDataInt.iBlinkTime / portTICK_PERIOD_MS); - gpio_set_level(BLINK_GPIO, 1); + gpio_set_level(GPIO_STATUS_LED_ONBOARD, 1); vTaskDelay(StatusLEDDataInt.iBlinkTime / portTICK_PERIOD_MS); } @@ -44,9 +44,9 @@ void task_StatusLED(void *pvParameter) for (int j = 0; j < StatusLEDDataInt.iCodeBlinkCnt; ++j) { - gpio_set_level(BLINK_GPIO, 0); + gpio_set_level(GPIO_STATUS_LED_ONBOARD, 0); vTaskDelay(StatusLEDDataInt.iBlinkTime / portTICK_PERIOD_MS); - gpio_set_level(BLINK_GPIO, 1); + gpio_set_level(GPIO_STATUS_LED_ONBOARD, 1); vTaskDelay(StatusLEDDataInt.iBlinkTime / portTICK_PERIOD_MS); } vTaskDelay(1500 / portTICK_PERIOD_MS); // Delay to signal new round @@ -145,7 +145,7 @@ void StatusLEDOff(void) xHandle_task_StatusLED = NULL; } - esp_rom_gpio_pad_select_gpio(BLINK_GPIO); // Init the GPIO - gpio_set_direction(BLINK_GPIO, GPIO_MODE_OUTPUT); // Set the GPIO as a push/pull output - gpio_set_level(BLINK_GPIO, 1);// LED off + esp_rom_gpio_pad_select_gpio(GPIO_STATUS_LED_ONBOARD); // Init the GPIO + gpio_set_direction(GPIO_STATUS_LED_ONBOARD, GPIO_MODE_OUTPUT); // Set the GPIO as a push/pull output + gpio_set_level(GPIO_STATUS_LED_ONBOARD, 1);// LED off } \ No newline at end of file diff --git a/code/include/defines.h b/code/include/defines.h index 4f02602af..a8d61986e 100644 --- a/code/include/defines.h +++ b/code/include/defines.h @@ -89,7 +89,6 @@ - //************************************************************************************** // GLOBAL GENERAL FLAGS //************************************************************************************** @@ -99,13 +98,7 @@ //#define CONFIG_IDF_TARGET_ARCH_XTENSA //not needed with platformio/espressif32 @ 5.2.0 -//Statusled + ClassControllCamera -#define BLINK_GPIO GPIO_NUM_33 // PIN for red board LED - - //ClassControllCamera -#define FLASH_GPIO GPIO_NUM_4 // PIN for flashlight LED -#define USE_PWM_LEDFLASH // if __LEDGLOBAL is defined, a global variable is used for LED control, otherwise locally and each time a new #define CAM_LIVESTREAM_REFRESHRATE 500 // Camera livestream feature: Waiting time in milliseconds to refresh image @@ -298,23 +291,45 @@ CONFIG_WPA_11R_SUPPORT=n #define FLOWSTATE_ERRORS_IN_ROW_LIMIT 3 +// SoftAP for initial setup process +#ifdef ENABLE_SOFTAP + #define EXAMPLE_ESP_WIFI_SSID "AI-on-the-Edge" + #define EXAMPLE_ESP_WIFI_PASS "" + #define EXAMPLE_ESP_WIFI_CHANNEL 11 + #define EXAMPLE_MAX_STA_CONN 1 +#endif // ENABLE_SOFTAP + + //************************************************************************* // HARDWARE RELATED DEFINITIONS //************************************************************************* -// Define BOARD and CAMERA configuration +// Define BOARD type +// Define ENV_BOARD_TYPE in platformio.ini //************************************ -#define BOARD_AITHINKER_ESP32CAM // Define BOARD TYPE -#define CAMERA_MODEL_AI_THINKER // Define CAMERA MODEL - +#if ENV_BOARD_TYPE && ENV_BOARD_TYPE == 1 +#define BOARD_AITHINKER_ESP32CAM +#else +#error "Board type (ENV_BOARD_TYPE) not defined" +#define BOARD_AITHINKER_ESP32CAM +#endif -// Define SD card configuration -#define BOARD_SDCARD_SDMMC_BUS_WIDTH_1 // SD MMC: Operate with 1 data line (D0) instead of 4 lines (D0-D3) +// Define CAMERA model +// Define ENV_CAMERA_MODEL in platformio.ini +//************************************ +#if ENV_CAMERA_MODEL && ENV_CAMERA_MODEL == 1 +#define CAMERA_AITHINKER_ESP32CAM_OV2640 +#else +#error "Camera model (ENV_CAMERA_MODEL) not defined" +#define CAMERA_AITHINKER_ESP32CAM_OV2640 +#endif // Board types //************************************ #ifdef BOARD_AITHINKER_ESP32CAM + #define BOARD_SDCARD_SDMMC_BUS_WIDTH_1 // Only 1 line SD card operation is supported (hardware related) + // SD card (operated with SDMMC peripheral) #define GPIO_SDCARD_CLK GPIO_NUM_14 #define GPIO_SDCARD_CMD GPIO_NUM_15 @@ -325,111 +340,57 @@ CONFIG_WPA_11R_SUPPORT=n #endif #define GPIO_SDCARD_D3 GPIO_NUM_13 // Needs to be high to init SD in MMC mode. After init GPIO can be used as spare GPIO - // Camera - #define CAM_PIN_PWDN 32 - #define CAM_PIN_RESET -1 //software reset will be performed - #define CAM_PIN_XCLK 0 - #define CAM_PIN_SIOD 26 - #define CAM_PIN_SIOC 27 - - #define CAM_PIN_D7 35 - #define CAM_PIN_D6 34 - #define CAM_PIN_D5 39 - #define CAM_PIN_D4 36 - #define CAM_PIN_D3 21 - #define CAM_PIN_D2 19 - #define CAM_PIN_D1 18 - #define CAM_PIN_D0 5 - #define CAM_PIN_VSYNC 25 - #define CAM_PIN_HREF 23 - #define CAM_PIN_PCLK 22 -#endif //// Board types - - -//******* camera model -#if defined(CAMERA_MODEL_WROVER_KIT) - #define PWDN_GPIO_NUM -1 - #define RESET_GPIO_NUM -1 - #define XCLK_GPIO_NUM 21 - #define SIOD_GPIO_NUM 26 - #define SIOC_GPIO_NUM 27 - - #define Y9_GPIO_NUM 35 - #define Y8_GPIO_NUM 34 - #define Y7_GPIO_NUM 39 - #define Y6_GPIO_NUM 36 - #define Y5_GPIO_NUM 19 - #define Y4_GPIO_NUM 18 - #define Y3_GPIO_NUM 5 - #define Y2_GPIO_NUM 4 - #define VSYNC_GPIO_NUM 25 - #define HREF_GPIO_NUM 23 - #define PCLK_GPIO_NUM 22 - -#elif defined(CAMERA_MODEL_M5STACK_PSRAM) - #define PWDN_GPIO_NUM -1 - #define RESET_GPIO_NUM 15 - #define XCLK_GPIO_NUM 27 - #define SIOD_GPIO_NUM 25 - #define SIOC_GPIO_NUM 23 - - #define Y9_GPIO_NUM 19 - #define Y8_GPIO_NUM 36 - #define Y7_GPIO_NUM 18 - #define Y6_GPIO_NUM 39 - #define Y5_GPIO_NUM 5 - #define Y4_GPIO_NUM 34 - #define Y3_GPIO_NUM 35 - #define Y2_GPIO_NUM 32 - #define VSYNC_GPIO_NUM 22 - #define HREF_GPIO_NUM 26 - #define PCLK_GPIO_NUM 21 - -#elif defined(CAMERA_MODEL_AI_THINKER) - #define PWDN_GPIO_NUM GPIO_NUM_32 - #define RESET_GPIO_NUM -1 - #define XCLK_GPIO_NUM GPIO_NUM_0 - #define SIOD_GPIO_NUM GPIO_NUM_26 - #define SIOC_GPIO_NUM GPIO_NUM_27 - - #define Y9_GPIO_NUM GPIO_NUM_35 - #define Y8_GPIO_NUM GPIO_NUM_34 - #define Y7_GPIO_NUM GPIO_NUM_39 - #define Y6_GPIO_NUM GPIO_NUM_36 - #define Y5_GPIO_NUM GPIO_NUM_21 - #define Y4_GPIO_NUM GPIO_NUM_19 - #define Y3_GPIO_NUM GPIO_NUM_18 - #define Y2_GPIO_NUM GPIO_NUM_5 - #define VSYNC_GPIO_NUM GPIO_NUM_25 - #define HREF_GPIO_NUM GPIO_NUM_23 - #define PCLK_GPIO_NUM GPIO_NUM_22 + // LEDs + #define GPIO_STATUS_LED_ONBOARD GPIO_NUM_33 // Onboard red status LED + #define GPIO_FLASHLIGHT_ONBOARD GPIO_NUM_4 // Onboard flashlight LED + #define GPIO_FLASHLIGHT_DEFAULT_USE_LEDC // Activate LEDC peripheral for PWM control + + #ifdef BOARD_SDCARD_SDMMC_BUS_WIDTH_1 + #define GPIO_FLASHLIGHT_DEFAULT GPIO_FLASHLIGHT_ONBOARD // Use onboard flashlight as default flashlight + #else + #define GPIO_FLASHLIGHT_DEFAULT GPIO_NUM_13 // Onboard flashlight cannot be used if SD card operated in 4-line mode -> Define GPIO13 + #endif #else - #error "Camera model not selected" -#endif //camera model + #error "define.h: No board type defined or type unknown" +#endif //Board types -// ******* LED definition -#ifdef USE_PWM_LEDFLASH - - //// PWM für Flash-LED - #define LEDC_TIMER LEDC_TIMER_1 // LEDC_TIMER_0 - #define LEDC_MODE LEDC_LOW_SPEED_MODE - #define LEDC_OUTPUT_IO FLASH_GPIO // Define the output GPIO - #define LEDC_CHANNEL LEDC_CHANNEL_1 - #define LEDC_DUTY_RES LEDC_TIMER_13_BIT // Set duty resolution to 13 bits - #define LEDC_RESOLUTION (1 << LEDC_TIMER_13_BIT) -1 // 13bit resolution --> 8192: 0 .. 8191 - //#define LEDC_DUTY (195) // Set duty to 50%. ((2 ** 13) - 1) * 50% = 4095 - #define LEDC_FREQUENCY (5000) // Frequency in Hertz. Set frequency at 5 kHz - -#endif //USE_PWM_LEDFLASH - -//softAP -#ifdef ENABLE_SOFTAP - #define EXAMPLE_ESP_WIFI_SSID "AI-on-the-Edge" - #define EXAMPLE_ESP_WIFI_PASS "" - #define EXAMPLE_ESP_WIFI_CHANNEL 11 - #define EXAMPLE_MAX_STA_CONN 1 -#endif // ENABLE_SOFTAP +// Camera models +// Further models: https://github.com/Mjrovai/XIAO-ESP32S3-Sense/blob/main/camera_round_display_save_jpeg/camera_pins.h +//************************************ +#ifdef CAMERA_AITHINKER_ESP32CAM_OV2640 + #define PWDN_GPIO_NUM GPIO_NUM_32 + #define RESET_GPIO_NUM GPIO_NUM_NC + #define XCLK_GPIO_NUM GPIO_NUM_0 + #define SIOD_GPIO_NUM GPIO_NUM_26 + #define SIOC_GPIO_NUM GPIO_NUM_27 + + #define Y9_GPIO_NUM GPIO_NUM_35 + #define Y8_GPIO_NUM GPIO_NUM_34 + #define Y7_GPIO_NUM GPIO_NUM_39 + #define Y6_GPIO_NUM GPIO_NUM_36 + #define Y5_GPIO_NUM GPIO_NUM_21 + #define Y4_GPIO_NUM GPIO_NUM_19 + #define Y3_GPIO_NUM GPIO_NUM_18 + #define Y2_GPIO_NUM GPIO_NUM_5 + #define VSYNC_GPIO_NUM GPIO_NUM_25 + #define HREF_GPIO_NUM GPIO_NUM_23 + #define PCLK_GPIO_NUM GPIO_NUM_22 +#else + #error "define.h: No camera model defined or model unknown" +#endif //Camera models + + +// GPIO_FLASHLIGHT_DEFAULT PWM definitions +#ifdef GPIO_FLASHLIGHT_DEFAULT_USE_LEDC + #define LEDC_TIMER LEDC_TIMER_1 // LEDC_TIMER_0 is used for camera + #define LEDC_MODE LEDC_LOW_SPEED_MODE + #define LEDC_OUTPUT_IO GPIO_FLASHLIGHT_DEFAULT // Define the output GPIO of default flashlight + #define LEDC_CHANNEL LEDC_CHANNEL_1 // LEDC_CHANNEL_0 is used for camera + #define LEDC_DUTY_RES LEDC_TIMER_13_BIT // Set duty resolution to 13 bits + #define LEDC_RESOLUTION (1 << LEDC_TIMER_13_BIT) -1 // 13 bit resolution --> 8192: 0 .. 8191 + #define LEDC_FREQUENCY (5000) // Frequency in hertz. Set frequency at 5 kHz +#endif //GPIO_FLASHLIGHT_DEFAULT_USE_LEDC #endif //DEFINES_H diff --git a/code/platformio.ini b/code/platformio.ini index cfafb69db..1bae9b5af 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -46,9 +46,11 @@ build_flags = -fno-exceptions -; ########################################### -; Default Environment (Default) -; ########################################### + +; ############################################################################# +; Board +; ESP32CAM +; ############################################################################# [env:esp32cam] extends = common:esp32-idf board = esp32cam @@ -57,6 +59,10 @@ build_flags = ; ### Common flags: ${common:esp32-idf.build_flags} ${flags:runtime.build_flags} + ; ### Hardware: Define board type + camera model + ; ### (see 'include/defines.h' for definitions) + -D ENV_BOARD_TYPE=1 + -D ENV_CAMERA_MODEL=1 ; ### Software modules: Uncomment to disable ;-D ENV_DISABLE_MQTT ;-D ENV_DISABLE_INFLUXDB @@ -68,21 +74,24 @@ monitor_dtr = 0 monitor_filters = default, esp32_exception_decoder -; ########################################### +; +++++++++++++++++++++++++++++++++++++++++++ ; Use this environment if building locally -; Include parameter tooltips to HTML parameter config file and hash to HTML files (caching) -; ########################################### +; Include parameter tooltips to HTML parameter config file +; and hash to HTML files (caching) +; +++++++++++++++++++++++++++++++++++++++++++ [env:esp32cam-localbuild] extends = env:esp32cam -extra_scripts = post:scripts/localbuild.py # Add parameter tooltips to HTML page and hashes to all cached HTML files +extra_scripts = post:scripts/localbuild.py # Add parameter tooltips to HTML page + # and hashes to all cached HTML files -; ########################################### +; +++++++++++++++++++++++++++++++++++++++++++ ; Use this environment for task analysis (PR #1751) -; ########################################### +; +++++++++++++++++++++++++++++++++++++++++++ [env:esp32cam-task-analysis] extends = env:esp32cam -; sdkconfig.esp32cam-task-analysis.defaults override some sdkconfig.defaults + enable debug analysis options +; sdkconfig.esp32cam-task-analysis.defaults override some sdkconfig.defaults +; and enable debug analysis options build_flags = -D TASK_ANALYSIS_ON ;-D DEBUG_DETAIL_ON @@ -92,12 +101,14 @@ build_flags = ;-D HEAP_TRACING_CLASS_FLOW_CNN_GENERAL_DO_ALING_AND_CUT -; ########################################### -; Use this environment for detailed and deep debugging (default debugging is already possible with default environment) -; ########################################### +; +++++++++++++++++++++++++++++++++++++++++++ +; Use this environment for detailed and deep debugging +; (default debugging is already possible with default environment) +; +++++++++++++++++++++++++++++++++++++++++++ [env:esp32cam-debug] extends = env:esp32cam -;sdkconfig.esp32-debug.defaults override some sdkconfig.defaults + enable debug options and clangtidy +; sdkconfig.esp32cam-debug.defaults override some sdkconfig.defaults +; and enable debug options and clangtidy build_flags = ; ### clangtidy build flags: ${flags:clangtidy.build_flags} @@ -109,13 +120,13 @@ build_flags = lib_ldf_mode = deep+ -; ########################################### +; +++++++++++++++++++++++++++++++++++++++++++ ; Enable HIMEM support (8 MB SPIRAM boards) ; !!! RAM usage in HIMEM is not supported by firmware up to now !!! -;https://github.com/espressif/esp-idf/blob/master/examples/system/himem/README.md -; ########################################### +; https://github.com/espressif/esp-idf/blob/master/examples/system/himem/README.md +; +++++++++++++++++++++++++++++++++++++++++++ [env:esp32cam-himem] extends = env:esp32cam ; sdkconfig.esp32cam-dev-himem.defaults override some sdkconfig.defaults build_flags = - ;-D DEBUG_HIMEM_MEMORY_CHECK \ No newline at end of file + ;-D DEBUG_HIMEM_MEMORY_CHECK