Merge branch 'bugfix/ipc_task_stack_size' into 'master'

Bugfix IPC task stack size

See merge request !938
This commit is contained in:
Ivan Grokhotkov 2017-06-30 16:36:18 +08:00
commit a4ae3efcd2
3 changed files with 22 additions and 2 deletions

View File

@ -160,8 +160,24 @@ config MAIN_TASK_STACK_SIZE
int "Main task stack size"
default 4096
help
Config system event task stack size in different application.
Configure the "main task" stack size. This is the stack of the task
which calls app_main(). If app_main() returns then this task is deleted
and its stack memory is freed.
config IPC_TASK_STACK_SIZE
int "Inter-Processor Call (IPC) task stack size"
default 1024
range 512 65536 if !ESP32_APPTRACE_ENABLE
range 2048 65536 if ESP32_APPTRACE_ENABLE
help
Configure the IPC tasks stack size. One IPC task runs on each core
(in dual core mode), and allows for cross-core function calls.
See IPC documentation for more details.
The default stack size should be enough for most common use cases.
It can be shrunk if you are sure that you do not use any custom
IPC functionality.
config NEWLIB_STDOUT_ADDCR
bool "Standard-out output adds carriage return before newline"

View File

@ -57,6 +57,10 @@ void esp_ipc_init();
*
* In single-core mode, returns ESP_ERR_INVALID_ARG for cpu_id 1.
*
* For complex functions, you may need to increase the stack size of the "IPC task"
* which runs the function must be sufficient. See the "Inter-Processor Call (IPC)
* task stack size" setting in menuconfig.
*
* @param cpu_id CPU where function should be executed (0 or 1)
* @param func pointer to a function which should be executed
* @param arg arbitrary argument to be passed into function

View File

@ -80,7 +80,7 @@ void esp_ipc_init()
const char* task_names[2] = {"ipc0", "ipc1"};
for (int i = 0; i < portNUM_PROCESSORS; ++i) {
s_ipc_sem[i] = xSemaphoreCreateBinary();
xTaskCreatePinnedToCore(ipc_task, task_names[i], configMINIMAL_STACK_SIZE, (void*) i,
xTaskCreatePinnedToCore(ipc_task, task_names[i], CONFIG_IPC_TASK_STACK_SIZE, (void*) i,
configMAX_PRIORITIES - 1, &s_ipc_tasks[i], i);
}
}