esp_system: fix other core init issue

Core 1 was not being stopped when in single core mode resulting to GDB
timing out.
This commit is contained in:
Renz Bagaporo 2020-06-17 17:13:55 +08:00 committed by Angus Gratton
parent 98dc1b0188
commit 98f4ccaef5

View file

@ -180,11 +180,6 @@ static void start_other_core(void)
ets_delay_us(100);
}
}
else {
s_cpu_inited[1] = true;
ESP_EARLY_LOGI(TAG, "Single core mode");
DPORT_CLEAR_PERI_REG_MASK(DPORT_APPCPU_CTRL_B_REG, DPORT_APPCPU_CLKGATE_EN);
}
}
#endif // !CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE
@ -287,9 +282,14 @@ void IRAM_ATTR call_start_cpu0(void)
#endif
ESP_EARLY_LOGI(TAG, "Pro cpu up.");
#if SOC_CPU_CORES_NUM > 1 // there is no 'single-core mode' for natively single-core processors
#if !CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE
start_other_core();
#endif
#else
ESP_EARLY_LOGI(TAG, "Single core mode");
DPORT_CLEAR_PERI_REG_MASK(DPORT_APPCPU_CTRL_B_REG, DPORT_APPCPU_CLKGATE_EN); // stop the other core
#endif // !CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE
#endif // SOC_CPU_CORES_NUM > 1
#if CONFIG_SPIRAM_MEMTEST
if (g_spiram_ok) {