]> granicus.if.org Git - esp-idf/commitdiff
stack sizes: Revert stack size increases added in 8d43859
authorAngus Gratton <angus@espressif.com>
Thu, 29 Jun 2017 04:02:54 +0000 (14:02 +1000)
committerAngus Gratton <gus@projectgus.com>
Thu, 29 Jun 2017 04:57:13 +0000 (14:57 +1000)
Set min stack size to 2048 if AppTrace support is enabled, 512 bytes otherwise.

components/esp32/dport_access.c
components/esp32/ipc.c
components/freertos/include/freertos/FreeRTOSConfig.h
examples/get-started/blink/main/blink.c

index f80de4012695804613e64c1781175d8ec9b38bb6..473c433251b7ddcbf15a9647df0b37b51c19bc4e 100644 (file)
@@ -173,7 +173,7 @@ static void dport_access_init_core(void *arg)
 /*  Defer initialisation until after scheduler is running */
 void esp_dport_access_int_init(void)
 {
-    xTaskCreatePinnedToCore(&dport_access_init_core, "dport", 512, NULL, 5, NULL, xPortGetCoreID());
+    xTaskCreatePinnedToCore(&dport_access_init_core, "dport", configMINIMAL_STACK_SIZE, NULL, 5, NULL, xPortGetCoreID());
 }
 
 void esp_dport_access_int_deinit(void)
index b7524cae68a863e4c350935cc31ab119262a866b..fce3fd430adcc022fd4adf6f1b3bea8572833207 100644 (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], XT_STACK_MIN_SIZE, (void*) i,
+        xTaskCreatePinnedToCore(ipc_task, task_names[i], configMINIMAL_STACK_SIZE, (void*) i,
                                 configMAX_PRIORITIES - 1, &s_ipc_tasks[i], i);
     }
 }
index a69381e074a44ff101b7cb145278af1639ab6d14..ffc17317f1354aafcfa315dd00711c9a2c60f0ff 100644 (file)
 #define configMAX_PRIORITIES                   ( 25 )
 #endif
 
-/* Minimal stack size. This may need to be increased for your application */
-/* NOTE: The FreeRTOS demos may not work reliably with stack size < 4KB.  */
-/* The Xtensa-specific examples should be fine with XT_STACK_MIN_SIZE.    */
-#if !(defined XT_STACK_MIN_SIZE)
-#error XT_STACK_MIN_SIZE not defined, did you include xtensa_config.h ?
+#ifndef CONFIG_ESP32_APPTRACE_ENABLE
+#define configMINIMAL_STACK_SIZE               512
+#else
+/* apptrace module requires at least 2KB of stack per task */
+#define configMINIMAL_STACK_SIZE               2048
 #endif
 
-#define configMINIMAL_STACK_SIZE               (XT_STACK_MIN_SIZE > 1024 ? XT_STACK_MIN_SIZE : 1024)
-
 /* The Xtensa port uses a separate interrupt stack. Adjust the stack size */
 /* to suit the needs of your specific application.                        */
 #ifndef configISR_STACK_SIZE
index 5ca22bbde06b5c44bc92fc8daa80d3b59d04af87..c121d4fbe42cbf393ef505c3ee9920e00c63cc3c 100644 (file)
@@ -40,5 +40,5 @@ void blink_task(void *pvParameter)
 
 void app_main()
 {
-    xTaskCreate(&blink_task, "blink_task", 2048, NULL, 5, NULL);
+    xTaskCreate(&blink_task, "blink_task", configMINIMAL_STACK_SIZE, NULL, 5, NULL);
 }