From 4ac05ca1f014de3288f11a34d3fe1223a6f6daf5 Mon Sep 17 00:00:00 2001 From: clement Date: Fri, 19 Jun 2026 07:59:28 +0200 Subject: [PATCH] feat(idf): socle projet ESP-IDF qui boote MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Création du squelette ESP-IDF minimal coexistant avec le code Arduino existant (src/, platformio.ini). Le build IDF ignore les sources Arduino. app_main() log une bannière de boot et un heartbeat toutes les 5 s. Validé sur carte ESP32 classique (A1S AudioKit) : build OK (rtc_bl_phone.bin 158 KB), flash et boot observés en série. --- .gitignore | 7 +++++++ CMakeLists.txt | 3 +++ main/CMakeLists.txt | 5 +++++ main/app_main.c | 15 +++++++++++++++ 4 files changed, 30 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 main/CMakeLists.txt create mode 100644 main/app_main.c diff --git a/.gitignore b/.gitignore index 4010182..5e1d720 100644 --- a/.gitignore +++ b/.gitignore @@ -435,3 +435,10 @@ docs/specs/tone_plan_wav_assets/assets docs/wav_clean_8k/ docs/wav_ptt_vintage_8k/ +# ESP-IDF +/build/ +/sdkconfig +/sdkconfig.old +/dependencies.lock +/managed_components/ + diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..073e01e --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.16) +include($ENV{IDF_PATH}/tools/cmake/project.cmake) +project(rtc_bl_phone) diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt new file mode 100644 index 0000000..2de178d --- /dev/null +++ b/main/CMakeLists.txt @@ -0,0 +1,5 @@ +idf_component_register( + SRCS "app_main.c" + INCLUDE_DIRS "." + REQUIRES nvs_flash +) diff --git a/main/app_main.c b/main/app_main.c new file mode 100644 index 0000000..645fc74 --- /dev/null +++ b/main/app_main.c @@ -0,0 +1,15 @@ +#include "esp_log.h" +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" + +static const char *TAG = "rtc_phone"; + +void app_main(void) +{ + ESP_LOGI(TAG, "RTC BL PHONE — socle ESP-IDF v5.4 (esp32 classique)"); + ESP_LOGI(TAG, "boot OK — aucun driver chargé (Phase 1)"); + while (true) { + ESP_LOGI(TAG, "heartbeat"); + vTaskDelay(pdMS_TO_TICKS(5000)); + } +}