mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00
Merge branch 'master' into feature/init_refactoring
* master: components/spi_flash: remove stray level of indentation components/nvs: fix broken sentences in comment blocks Roll back submodule version Spinlocks already come initialized. Remove the code that would essentially re-initialize them at runtime Remove all references to prvLockQueue / prvUnlockQueue components/esp32: clean up unused function warnings in single core mode clean up warnings components/nvs: fix build, use log library instead of printf components/spi_flash: add flash operation counters option to Kconfig components/nvs: add erase function components/nvs: fix formatting components/nvs: batch writes when possible components/spi_flash: add performance counters components/nvs: maintain item hash list at page level components/nvs: avoid reading just-erased page # Conflicts: # components/esp32/cpu_start.c # components/esp32/event_default_handlers.c
This commit is contained in:
@@ -44,10 +44,14 @@
|
||||
#include "esp_log.h"
|
||||
|
||||
void start_cpu0(void) __attribute__((weak, alias("start_cpu0_default")));
|
||||
void start_cpu1(void) __attribute__((weak, alias("start_cpu0_default")));
|
||||
void start_cpu0_default(void) IRAM_ATTR;
|
||||
void start_cpu1_default(void) IRAM_ATTR;
|
||||
#if !CONFIG_FREERTOS_UNICORE
|
||||
static void IRAM_ATTR call_start_cpu1();
|
||||
void start_cpu1(void) __attribute__((weak, alias("start_cpu0_default")));
|
||||
void start_cpu1_default(void) IRAM_ATTR;
|
||||
static bool app_cpu_started = false;
|
||||
#endif //!CONFIG_FREERTOS_UNICORE
|
||||
|
||||
static void do_global_ctors(void);
|
||||
static void main_task(void* args);
|
||||
extern void ets_setup_syscalls(void);
|
||||
@@ -61,7 +65,6 @@ extern void (*__init_array_end)(void);
|
||||
extern volatile int port_xSchedulerRunning[2];
|
||||
|
||||
static const char* TAG = "cpu_start";
|
||||
static bool app_cpu_started = false;
|
||||
|
||||
/*
|
||||
* We arrive here after the bootloader finished loading the program from flash. The hardware is mostly uninitialized,
|
||||
@@ -91,7 +94,7 @@ void IRAM_ATTR call_start_cpu0()
|
||||
|
||||
ESP_EARLY_LOGI(TAG, "Pro cpu up.");
|
||||
|
||||
#ifndef CONFIG_FREERTOS_UNICORE
|
||||
#if !CONFIG_FREERTOS_UNICORE
|
||||
ESP_EARLY_LOGI(TAG, "Starting app cpu, entry point is %p", call_start_cpu1);
|
||||
|
||||
SET_PERI_REG_MASK(DPORT_APPCPU_CTRL_B_REG, DPORT_APPCPU_CLKGATE_EN);
|
||||
@@ -111,6 +114,7 @@ void IRAM_ATTR call_start_cpu0()
|
||||
start_cpu0();
|
||||
}
|
||||
|
||||
#if !CONFIG_FREERTOS_UNICORE
|
||||
void IRAM_ATTR call_start_cpu1()
|
||||
{
|
||||
asm volatile (\
|
||||
@@ -123,6 +127,7 @@ void IRAM_ATTR call_start_cpu1()
|
||||
app_cpu_started = 1;
|
||||
start_cpu1();
|
||||
}
|
||||
#endif //!CONFIG_FREERTOS_UNICORE
|
||||
|
||||
void start_cpu0_default(void)
|
||||
{
|
||||
@@ -139,6 +144,7 @@ void start_cpu0_default(void)
|
||||
vTaskStartScheduler();
|
||||
}
|
||||
|
||||
#if !CONFIG_FREERTOS_UNICORE
|
||||
void start_cpu1_default(void)
|
||||
{
|
||||
// Wait for FreeRTOS initialization to finish on PRO CPU
|
||||
@@ -148,6 +154,7 @@ void start_cpu1_default(void)
|
||||
ESP_LOGI(TAG, "Starting scheduler on APP CPU.");
|
||||
xPortStartScheduler();
|
||||
}
|
||||
#endif //!CONFIG_FREERTOS_UNICORE
|
||||
|
||||
static void do_global_ctors(void)
|
||||
{
|
||||
|
Reference in New Issue
Block a user