Some checks failed
Tasmota CI / os-check-win (tasmota32-webcam) (pull_request) Has been cancelled
Tasmota CI / os-check-mac (tasmota32solo1-safeboot) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota-4M) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota-display) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota-ir) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota-knx) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota-lite) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota-minimal) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota-sensors) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota-zbbridge) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota-zigbee) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32-bluetooth) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32-display) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32-ir) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32-lvgl) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32-nspanel) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32-safeboot) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32-zbbrdgpro) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32c2) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32c2-safeboot) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32c3) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32c3-safeboot) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32c5) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32c5-safeboot) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32c6) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32c6-safeboot) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32p4) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32p4-safeboot) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32s2) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32s2-safeboot) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32s2cdc) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32s2cdc-safeboot) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32s3) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32s3-safeboot) (pull_request) Has been cancelled
Tasmota CI / base-images (tasmota32solo1) (pull_request) Has been cancelled
Tasmota CI / language-images (AD, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (AF, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (BG, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (BR, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (CN, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (CZ, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (DE, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (ES, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (FR, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (FY, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (GR, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (HE, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (HU, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (IT, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (KO, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (LT, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (NL, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (PL, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (PT, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (RO, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (RU, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (SE, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (SK, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (TR, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (TW, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (UK, tasmota) (pull_request) Has been cancelled
Tasmota CI / language-images (VN, tasmota) (pull_request) Has been cancelled
- Create CMakeLists.txt that wraps PlatformIO commands as CMake targets - Remove CMakeLists.txt from .gitignore to track the wrapper - Update CLION_BUILD.md with UI-based build instructions - Provides build targets: pio_build, pio_clean, pio_upload, pio_monitor - Adds per-environment targets: build_tasmota, build_tasmota32, etc. - Includes source indexing for CLion code intelligence Now you can build directly from CLion's UI using the build dropdown and hammer icon instead of terminal commands. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
83 lines
2.5 KiB
Markdown
83 lines
2.5 KiB
Markdown
# Building Tasmota in CLion with PlatformIO
|
|
|
|
## Setup Complete
|
|
|
|
PlatformIO CLI has been installed and a CMake wrapper has been configured to integrate PlatformIO with CLion's native build system.
|
|
|
|
## Building from CLion UI
|
|
|
|
CLion will now show PlatformIO targets in the build configurations dropdown:
|
|
|
|
- **pio_build** - Build the default environment (tasmota)
|
|
- **pio_clean** - Clean build files
|
|
- **pio_upload** - Upload firmware to device
|
|
- **pio_monitor** - Open serial monitor
|
|
- **build_tasmota** - Build tasmota environment
|
|
- **build_tasmota32** - Build tasmota32 environment
|
|
- **build_tasmota-minimal** - Build minimal environment
|
|
- **build_tasmota-sensors** - Build with sensors
|
|
- **build_tasmota-display** - Build with display support
|
|
- **build_tasmota-ir** - Build with IR support
|
|
- **generate_compile_commands** - Update code intelligence
|
|
|
|
Simply select a target from the dropdown and click the Build button (hammer icon) or press Ctrl+F9.
|
|
|
|
## Building from CLion Terminal
|
|
|
|
You can also use the embedded terminal in CLion (View → Tool Windows → 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.
|
|
|
|
The CMake configuration includes a `generate_compile_commands` target to regenerate it, or use:
|
|
```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
|
|
|
|
## How It Works
|
|
|
|
The `CMakeLists.txt` file is a wrapper that:
|
|
- Defines custom CMake targets that invoke PlatformIO commands
|
|
- Provides source file indexing for CLion's code intelligence
|
|
- Integrates PlatformIO with CLion's native build system
|
|
- Allows you to use CLion's build UI instead of terminal commands
|
|
|
|
The actual compilation is still done by PlatformIO, but CLion can manage it through the CMake interface.
|