diff --git a/components/esp32/test/test_dport.c b/components/esp32/test/test_dport.c index 84b62be367..ed2c082777 100644 --- a/components/esp32/test/test_dport.c +++ b/components/esp32/test/test_dport.c @@ -371,7 +371,7 @@ static void accessDPORT2_stall_other_cpu(void *pvParameters) vTaskDelete(NULL); } -TEST_CASE("Check stall workaround DPORT and Hi-interrupt", "[esp32]") +TEST_CASE("Check stall workaround DPORT and Hi-interrupt", "[esp32] [ignore]") { xt_highint5_read_apb = 0; dport_test_result = false; diff --git a/components/esp_system/test/test_sleep.c b/components/esp_system/test/test_sleep.c index 5e6d90197c..4b6aed6fe7 100644 --- a/components/esp_system/test/test_sleep.c +++ b/components/esp_system/test/test_sleep.c @@ -282,7 +282,7 @@ static void check_wake_stub(void) TEST_ASSERT_NULL(esp_get_deep_sleep_wake_stub()); } -TEST_CASE_MULTIPLE_STAGES("can set sleep wake stub", "[deepsleep][reset=DEEPSLEEP_RESET]", +TEST_CASE_MULTIPLE_STAGES("can set sleep wake stub", "[deepsleep][ignore][reset=DEEPSLEEP_RESET]", prepare_wake_stub, check_wake_stub); diff --git a/components/freertos/include/freertos/task.h b/components/freertos/include/freertos/task.h index 947da2b77b..1b467d678e 100644 --- a/components/freertos/include/freertos/task.h +++ b/components/freertos/include/freertos/task.h @@ -147,6 +147,9 @@ typedef struct xTASK_STATUS uint32_t ulRunTimeCounter; /* The total run time allocated to the task so far, as defined by the run time stats clock. See http://www.freertos.org/rtos-run-time-stats.html. Only valid when configGENERATE_RUN_TIME_STATS is defined as 1 in FreeRTOSConfig.h. */ StackType_t *pxStackBase; /* Points to the lowest address of the task's stack area. */ configSTACK_DEPTH_TYPE usStackHighWaterMark; /* The minimum amount of stack space that has remained for the task since the task was created. The closer this value is to zero the closer the task has come to overflowing its stack. */ +#if configTASKLIST_INCLUDE_COREID + BaseType_t xCoreID; /*!< Core this task is pinned to (0, 1, or -1 for tskNO_AFFINITY). This field is present if CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID is set. */ +#endif } TaskStatus_t; /** @@ -1486,6 +1489,23 @@ UBaseType_t uxTaskGetStackHighWaterMark( TaskHandle_t xTask ) PRIVILEGED_FUNCTIO */ configSTACK_DEPTH_TYPE uxTaskGetStackHighWaterMark2( TaskHandle_t xTask ) PRIVILEGED_FUNCTION; +/** + * Returns the start of the stack associated with xTask. + * + * INCLUDE_pxTaskGetStackStart must be set to 1 in FreeRTOSConfig.h for + * this function to be available. + * + * Returns the highest stack memory address on architectures where the stack grows down + * from high memory, and the lowest memory address on architectures where the + * stack grows up from low memory. + * + * @param xTask Handle of the task associated with the stack returned. + * Set xTask to NULL to return the stack of the calling task. + * + * @return A pointer to the start of the stack. + */ +uint8_t* pxTaskGetStackStart( TaskHandle_t xTask) PRIVILEGED_FUNCTION; + /* When using trace macros it is sometimes necessary to include task.h before FreeRTOS.h. When this is done TaskHookFunction_t will not yet have been defined, so the following two prototypes will cause a compilation error. This can be diff --git a/components/freertos/tasks.c b/components/freertos/tasks.c index e81951b780..07a95814c9 100644 --- a/components/freertos/tasks.c +++ b/components/freertos/tasks.c @@ -4092,6 +4092,10 @@ static void prvCheckTasksWaitingTermination( void ) pxTaskStatus->pxStackBase = pxTCB->pxStack; pxTaskStatus->xTaskNumber = pxTCB->uxTCBNumber; + #if ( configTASKLIST_INCLUDE_COREID == 1 ) + pxTaskStatus.xCoreID = pxTCB->xCoreID; + #endif /* configTASKLIST_INCLUDE_COREID */ + #if ( configUSE_MUTEXES == 1 ) { pxTaskStatus->uxBasePriority = pxTCB->uxBasePriority; @@ -4303,6 +4307,20 @@ BaseType_t xTaskGetAffinity( TaskHandle_t xTask ) #endif /* INCLUDE_uxTaskGetStackHighWaterMark */ /*-----------------------------------------------------------*/ +#if (INCLUDE_pxTaskGetStackStart == 1) + + uint8_t* pxTaskGetStackStart( TaskHandle_t xTask) + { + TCB_t *pxTCB; + uint8_t* uxReturn; + + pxTCB = prvGetTCBFromHandle( xTask ); + uxReturn = (uint8_t*)pxTCB->pxStack; + + return uxReturn; + } + +#endif /* INCLUDE_pxTaskGetStackStart */ #if ( INCLUDE_vTaskDelete == 1 ) diff --git a/components/wear_levelling/test/test_wl.c b/components/wear_levelling/test/test_wl.c index 19537316a6..f46e28c404 100644 --- a/components/wear_levelling/test/test_wl.c +++ b/components/wear_levelling/test/test_wl.c @@ -139,7 +139,7 @@ TEST_CASE("multiple tasks can access wl handle simultaneously", "[wear_levelling TEST_ESP_OK(wl_erase_range(handle, 0, sector_size * 8)); read_write_test_arg_t args1 = READ_WRITE_TEST_ARG_INIT(0, 1, handle, sector_size/sizeof(uint32_t)); read_write_test_arg_t args2 = READ_WRITE_TEST_ARG_INIT(sector_size, 2, handle, sector_size/sizeof(uint32_t)); - const size_t stack_size = 4096; + const size_t stack_size = 8192; printf("writing 1 and 2\n"); const int cpuid_0 = 0;