diff --git a/components/freertos/include/freertos/FreeRTOSConfig.h b/components/freertos/include/freertos/FreeRTOSConfig.h index 5f5cebc6b..37912a66c 100644 --- a/components/freertos/include/freertos/FreeRTOSConfig.h +++ b/components/freertos/include/freertos/FreeRTOSConfig.h @@ -253,6 +253,7 @@ int xt_clock_freq(void) __attribute__((deprecated)); #define INCLUDE_uxTaskGetStackHighWaterMark 1 #define INCLUDE_pcTaskGetTaskName 1 #define INCLUDE_xTaskGetIdleTaskHandle 1 +#define INCLUDE_pxTaskGetStackStart 1 #define INCLUDE_xSemaphoreGetMutexHolder 1 diff --git a/components/freertos/tasks.c b/components/freertos/tasks.c index bdfe1086c..ff549183a 100644 --- a/components/freertos/tasks.c +++ b/components/freertos/tasks.c @@ -3814,14 +3814,17 @@ BaseType_t xTaskGetAffinity( TaskHandle_t xTask ) /*-----------------------------------------------------------*/ #if (INCLUDE_pxTaskGetStackStart == 1) - uint8_t* pxTaskGetStackStart( TaskHandle_t xTask) - { - TCB_t *pxTCB; - UBaseType_t uxReturn; - pxTCB = prvGetTCBFromHandle( xTask ); - return ( uint8_t * ) pxTCB->pxStack; - } + 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 */ /*-----------------------------------------------------------*/