Add basic ESP-IDF app skeleton
Adds a minimal ESP-IDF project for ESP32-S3 at the repo root: top-level CMakeLists, a main component with a C++ app_main that logs a heartbeat, sdkconfig.defaults selecting esp32s3, and build notes in the README. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
97df6e3cbe
commit
df43820acd
5 files changed
+34
No files matched your search
@@ -0,0 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(led_driver)
|
||||
@@ -50,3 +50,13 @@ led-driver/
|
||||
## Further reading
|
||||
|
||||
- **`docs/API.md`** — JSON message fields as used in examples (`pattern`, `colors`, …). The Pi app may send **short keys** (`p`, `c`, …); behaviour matches once normalised on device.
|
||||
|
||||
## C++ app (ESP-IDF)
|
||||
|
||||
The `cpp` branch adds a basic ESP-IDF project for ESP32-S3 at the repo root (`CMakeLists.txt`, `main/`).
|
||||
|
||||
```bash
|
||||
. ~/.espressif/v6.1/esp-idf/export.sh # or your ESP-IDF install's export.sh
|
||||
idf.py set-target esp32s3
|
||||
idf.py build flash monitor
|
||||
```
|
||||
@@ -0,0 +1,2 @@
|
||||
idf_component_register(SRCS "main.cpp"
|
||||
INCLUDE_DIRS ".")
|
||||
@@ -0,0 +1,18 @@
|
||||
#include <cstdio>
|
||||
|
||||
#include "esp_log.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
|
||||
static const char *TAG = "led_driver";
|
||||
|
||||
extern "C" void app_main(void)
|
||||
{
|
||||
ESP_LOGI(TAG, "LED driver (C++) starting");
|
||||
|
||||
int tick = 0;
|
||||
while (true) {
|
||||
ESP_LOGI(TAG, "alive: %d", tick++);
|
||||
vTaskDelay(pdMS_TO_TICKS(1000));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
CONFIG_IDF_TARGET="esp32s3"
|
||||
Reference in new issue
Block a user