mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 06:34:34 +02:00
esp_system: FIx TWDT SMP FreeRTOS unicore build error
When configNUM_CORES = 1, vTaskCoreAffinityGet() is not defined. This commit fixes the TWDT to omit calls to vTaskCoreAffinityGet() when building for unicore.
This commit is contained in:
@@ -346,9 +346,14 @@ static void task_wdt_isr(void *arg)
|
|||||||
if (!entry->has_reset) {
|
if (!entry->has_reset) {
|
||||||
if (entry->task_handle) {
|
if (entry->task_handle) {
|
||||||
#if CONFIG_FREERTOS_SMP
|
#if CONFIG_FREERTOS_SMP
|
||||||
UBaseType_t uxCoreAffinity = vTaskCoreAffinityGet(entry->task_handle);
|
#if configNUM_CORES > 1
|
||||||
ESP_EARLY_LOGE(TAG, " - %s (0x%x)", pcTaskGetName(entry->task_handle), uxCoreAffinity);
|
// Log the task's name and its affinity
|
||||||
#else
|
ESP_EARLY_LOGE(TAG, " - %s (0x%x)", pcTaskGetName(entry->task_handle), vTaskCoreAffinityGet(entry->task_handle));
|
||||||
|
#else // configNUM_CORES > 1
|
||||||
|
// Log the task's name
|
||||||
|
ESP_EARLY_LOGE(TAG, " - %s", pcTaskGetName(entry->task_handle));
|
||||||
|
#endif // configNUM_CORES > 1
|
||||||
|
#else // CONFIG_FREERTOS_SMP
|
||||||
BaseType_t task_affinity = xTaskGetAffinity(entry->task_handle);
|
BaseType_t task_affinity = xTaskGetAffinity(entry->task_handle);
|
||||||
const char *cpu;
|
const char *cpu;
|
||||||
if (task_affinity == 0) {
|
if (task_affinity == 0) {
|
||||||
@@ -359,7 +364,7 @@ static void task_wdt_isr(void *arg)
|
|||||||
cpu = DRAM_STR("CPU 0/1");
|
cpu = DRAM_STR("CPU 0/1");
|
||||||
}
|
}
|
||||||
ESP_EARLY_LOGE(TAG, " - %s (%s)", pcTaskGetName(entry->task_handle), cpu);
|
ESP_EARLY_LOGE(TAG, " - %s (%s)", pcTaskGetName(entry->task_handle), cpu);
|
||||||
#endif
|
#endif // CONFIG_FREERTOS_SMP
|
||||||
} else {
|
} else {
|
||||||
ESP_EARLY_LOGE(TAG, " - %s", entry->user_name);
|
ESP_EARLY_LOGE(TAG, " - %s", entry->user_name);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user