mirror of
https://github.com/78/xiaozhi-esp32.git
synced 2026-02-27 14:26:36 +00:00
* chore: Bump project version to 2.2.3 and refactor board configuration parsing in release script - Updated PROJECT_VER in CMakeLists.txt from 2.2.2 to 2.2.3. - Refactored the board configuration parsing logic in release.py to improve clarity and efficiency by eliminating the mapping function and directly searching for the board type in the CMakeLists.txt file. * refactor: Remove unused system_info.h include and delete obsolete source root file - Removed the inclusion of system_info.h in main.cc as it was no longer needed. - Deleted the _codeql_detected_source_root file, which was obsolete. * feat: Add lcd_init_cmds.h include for display initialization in esp32-p4-nano board - Included the lcd_init_cmds.h header file in esp32-p4-nano.cc to support display initialization commands, enhancing the board's functionality. * chore: Update build workflow and board configuration files - Changed the build job name in the GitHub Actions workflow to use the full name of the matrix variant for better clarity. - Refactored CMakeLists.txt to improve the formatting of the BOARD_SOURCES file globbing. - Added manufacturer information to the config.json files for the eda-robot-pro, eda-super-bear, and eda-tv-pro boards to ensure consistency in configuration.
30 lines
798 B
C++
Executable File
30 lines
798 B
C++
Executable File
#include <esp_log.h>
|
|
#include <esp_err.h>
|
|
#include <nvs.h>
|
|
#include <nvs_flash.h>
|
|
#include <driver/gpio.h>
|
|
#include <esp_event.h>
|
|
#include <freertos/FreeRTOS.h>
|
|
#include <freertos/task.h>
|
|
|
|
#include "application.h"
|
|
|
|
#define TAG "main"
|
|
|
|
extern "C" void app_main(void)
|
|
{
|
|
// Initialize NVS flash for WiFi configuration
|
|
esp_err_t ret = nvs_flash_init();
|
|
if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
|
|
ESP_LOGW(TAG, "Erasing NVS flash to fix corruption");
|
|
ESP_ERROR_CHECK(nvs_flash_erase());
|
|
ret = nvs_flash_init();
|
|
}
|
|
ESP_ERROR_CHECK(ret);
|
|
|
|
// Initialize and run the application
|
|
auto& app = Application::GetInstance();
|
|
app.Initialize();
|
|
app.Run(); // This function runs the main event loop and never returns
|
|
}
|