mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-05 00:18:05 +00:00
freertos: Fix various build errors
This commit fixes various build errors in IDF (and tests) when compiling with SMP FreeRTOS: - Updated usage of xTaskGetIdleTaskHandle() - Disable sysview tracing macros - Update some task snapshot functions - Disabled test_freertos_hooks.c test as vApplicationIdleHook() and vApplicationTickHook() are used.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include "sdkconfig.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "freertos/FreeRTOS.h"
|
||||
@@ -17,7 +23,12 @@ void test_task_get_state(void* arg)
|
||||
//Current task should return eRunning
|
||||
TEST_ASSERT(eTaskGetState(xTaskGetCurrentTaskHandle()) == eRunning);
|
||||
//Idle task of current core should return eReady
|
||||
#ifdef CONFIG_FREERTOS_SMP
|
||||
TaskHandle_t *idle_handle_list = xTaskGetIdleTaskHandle();
|
||||
TEST_ASSERT_EQUAL(eReady, eTaskGetState(idle_handle_list[xPortGetCoreID()]));
|
||||
#else
|
||||
TEST_ASSERT(eTaskGetState(xTaskGetIdleTaskHandle()) == eReady);
|
||||
#endif
|
||||
//Blocked Task should return eBlocked
|
||||
TEST_ASSERT(eTaskGetState(blocked_task_handle) == eBlocked);
|
||||
//Suspended Task should return eSuspended
|
||||
|
||||
Reference in New Issue
Block a user