From 7ac4d809e9f9355cc0319446d1b240ba05817681 Mon Sep 17 00:00:00 2001 From: Mike Geppert Date: Thu, 8 Jan 2026 20:51:33 -0600 Subject: [PATCH] Add CLion PlatformIO build configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add .clion.ini to configure PlatformIO as default environment - Add CLION_BUILD.md with build instructions for CLion users - Update .gitignore to exclude compile_commands.json 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .clion.ini | 2 ++ .gitignore | 1 + CLION_BUILD.md | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 .clion.ini create mode 100644 CLION_BUILD.md diff --git a/.clion.ini b/.clion.ini new file mode 100644 index 000000000..d2e2b0459 --- /dev/null +++ b/.clion.ini @@ -0,0 +1,2 @@ +[platformio] +init_default_env = tasmota diff --git a/.gitignore b/.gitignore index 647235e30..0a59860f8 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,4 @@ lib/libesp32/berry/berry ## Python virtual environments for Platformio ## venv .venv +compile_commands.json diff --git a/CLION_BUILD.md b/CLION_BUILD.md new file mode 100644 index 000000000..75429228d --- /dev/null +++ b/CLION_BUILD.md @@ -0,0 +1,60 @@ +# Building Tasmota in CLion with PlatformIO + +## Setup Complete + +PlatformIO CLI has been installed and configured for this project. + +## Building from CLion Terminal + +Use the embedded terminal in CLion (View → Tool Windows → Terminal) or any terminal: + +### List all available environments: +```bash +pio run --list-targets +``` + +### Build a specific environment: +```bash +pio run -e tasmota # Build standard tasmota for ESP8266 +pio run -e tasmota32 # Build for ESP32 +pio run -e tasmota-minimal # Build minimal version +``` + +### Clean build: +```bash +pio run -e tasmota -t clean +``` + +### Upload to device: +```bash +pio run -e tasmota -t upload +``` + +### Monitor serial output: +```bash +pio device monitor +``` + +## Code Intelligence + +The `compile_commands.json` file has been generated for CLion to provide proper code completion and navigation. + +To regenerate after configuration changes: +```bash +pio run -t compiledb -e tasmota +``` + +## Available Environments + +See `platformio.ini` for the full list of build environments. Common ones include: +- `tasmota` - Standard ESP8266 build +- `tasmota32` - Standard ESP32 build +- `tasmota-sensors` - Build with sensor support +- `tasmota-display` - Build with display support +- `tasmota-ir` - Build with IR support + +## Notes + +- CLion will use CMake for code indexing, but actual builds use PlatformIO +- The CMakeLists.txt files are for ESP-IDF builds (alternative build system) +- For this project, always use `pio` commands for building