🔧 better stack size and core arrengement

pull/190/head
Ye Hang Yang 2021-09-27 15:16:11 +08:00
parent 33bade8a92
commit 175985dbdf
6 changed files with 48 additions and 5 deletions

View File

@ -8,14 +8,16 @@ set(src_dirs
camera
lcd
led
web)
web
trace)
set(include_dirs
ai
camera
lcd
led
web)
web
trace)
set(requires esp32-camera
esp-dl

View File

@ -93,7 +93,7 @@ void register_human_face_detection(const QueueHandle_t frame_i,
xQueueResult = result;
gReturnFB = camera_fb_return;
xTaskCreatePinnedToCore(task_process_handler, TAG, 4 * 1024, NULL, 5, NULL, 1);
xTaskCreatePinnedToCore(task_process_handler, TAG, 4 * 1024, NULL, 5, NULL, 0);
if (xQueueEvent)
xTaskCreatePinnedToCore(task_event_handler, TAG, 4 * 1024, NULL, 5, NULL, 1);
}

View File

@ -83,5 +83,5 @@ void register_camera(const pixformat_t pixel_fromat,
}
xQueueFrameO = frame_o;
xTaskCreatePinnedToCore(task_process_handler, TAG, 2 * 1024, NULL, 5, NULL, 1);
xTaskCreatePinnedToCore(task_process_handler, TAG, 1 * 1024, NULL, 5, NULL, 1);
}

View File

@ -95,7 +95,7 @@ esp_err_t register_lcd(const QueueHandle_t frame_i, const QueueHandle_t frame_o,
xQueueFrameI = frame_i;
xQueueFrameO = frame_o;
gReturnFB = return_fb;
xTaskCreatePinnedToCore(task_process_handler, TAG, 4 * 1024, NULL, 5, NULL, 1);
xTaskCreatePinnedToCore(task_process_handler, TAG, 2 * 1024, NULL, 5, NULL, 1);
return ESP_OK;
}

View File

@ -0,0 +1,29 @@
#include "who_trace.h"
#include <stdio.h>
#include <stdlib.h>
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "esp_system.h"
static void task_trace(void *arg)
{
char *pbuffer = (char *)malloc(2048);
while (true)
{
printf("\n-------------------------------------------------------------------------\n");
vTaskList(pbuffer);
printf("%s", pbuffer);
printf("-------------------------------------------------------------------------\n\n");
vTaskDelay(3000 / portTICK_RATE_MS);
}
free(pbuffer);
}
void register_trace()
{
xTaskCreate(task_trace, "trace", 2*1024, NULL, 5, NULL);
}

View File

@ -0,0 +1,12 @@
#pragma once
#ifdef __cplusplus
extern "C"
{
#endif
void register_trace();
#ifdef __cplusplus
}
#endif