Where is main_task() started on the ESP32 (ESP-IDF)?

The FreeRTOS main taskmain_task() (which in turn starts app_main()) is  started in esp_startup_start_app_common():

portBASE_TYPE res = xTaskCreatePinnedToCore(&main_task, "main",
                                            ESP_TASK_MAIN_STACK, NULL,
                                            ESP_TASK_MAIN_PRIO, NULL, ESP_TASK_MAIN_CORE);

 

For version 4.4.1 of the ESP-IDF, this is the link to the location where it is called.