Initial project setup: ESP-IDF + C++ + FreeRTOS + WiFi + web server
This commit is contained in:
66
.vscode/ESP_SETUP.md
vendored
Normal file
66
.vscode/ESP_SETUP.md
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
# ESP-IDF Project Setup Guide
|
||||
|
||||
Your zonebridge project is configured to use ESP-IDF v5.5.1 located at `/Users/brent/esp/v5.5.1/esp-idf`.
|
||||
|
||||
## Environment Setup
|
||||
|
||||
### Option 1: Per-Session Setup (Quick)
|
||||
Run this in your terminal before building:
|
||||
```bash
|
||||
export IDF_PATH=/Users/brent/esp/v5.5.1/esp-idf
|
||||
export IDF_TOOLS_PATH=/Users/brent/.espressif
|
||||
. $IDF_PATH/export.sh
|
||||
```
|
||||
|
||||
### Option 2: Permanent Shell Profile Setup
|
||||
Add this to your `~/.zshrc` file:
|
||||
```bash
|
||||
# ESP-IDF Setup
|
||||
export IDF_PATH="/Users/brent/esp/v5.5.1/esp-idf"
|
||||
export IDF_TOOLS_PATH="/Users/brent/.espressif"
|
||||
|
||||
# Source ESP-IDF export script
|
||||
if [ -f "$IDF_PATH/export.sh" ]; then
|
||||
. "$IDF_PATH/export.sh"
|
||||
fi
|
||||
```
|
||||
|
||||
Then reload your shell:
|
||||
```bash
|
||||
source ~/.zshrc
|
||||
```
|
||||
|
||||
## Project Configuration
|
||||
|
||||
Your project is already configured with:
|
||||
- **ESP-IDF Setup**: `/Users/brent/esp/v5.5.1/esp-idf`
|
||||
- **Target**: ESP32-S3
|
||||
- **Toolchain**: xtensa-esp-elf-gcc (in `~/.espressif/tools/`)
|
||||
- **Clangd**: Located at `~/.espressif/tools/esp-clang/`
|
||||
|
||||
## Building the Project
|
||||
|
||||
Once environment variables are set, you can:
|
||||
|
||||
1. **Build with VS Code**: Use Command Palette (`Cmd+Shift+P`) → "ESP-IDF: Build Project"
|
||||
2. **Build from Terminal**:
|
||||
```bash
|
||||
cd /Users/brent/zonebridge/zonebridge
|
||||
idf.py build
|
||||
```
|
||||
|
||||
## Flashing & Monitoring
|
||||
|
||||
```bash
|
||||
idf.py flash monitor # Flash and monitor output
|
||||
idf.py menuconfig # Open SDK configuration
|
||||
idf.py clean # Clean build artifacts
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If you see "IDF_PATH not set" errors:
|
||||
1. Verify the export.sh script was sourced
|
||||
2. Check that `echo $IDF_PATH` returns `/Users/brent/esp/v5.5.1/esp-idf`
|
||||
3. Run `idf.py doctor` to diagnose any issues
|
||||
|
||||
19
.vscode/c_cpp_properties.json
vendored
Normal file
19
.vscode/c_cpp_properties.json
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "ESP-IDF",
|
||||
"compilerPath": "/Users/brent/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc",
|
||||
"compileCommands": "${config:idf.buildPath}/compile_commands.json",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"browse": {
|
||||
"path": [
|
||||
"${workspaceFolder}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
10
.vscode/launch.json
vendored
Normal file
10
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "gdbtarget",
|
||||
"request": "attach",
|
||||
"name": "Eclipse CDT GDB Adapter"
|
||||
}
|
||||
]
|
||||
}
|
||||
18
.vscode/settings.json
vendored
Normal file
18
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"C_Cpp.intelliSenseEngine": "default",
|
||||
"clangd.path": "/Users/brent/.espressif/tools/esp-clang/esp-19.1.2_20250312/esp-clang/bin/clangd",
|
||||
"clangd.arguments": [
|
||||
"--background-index",
|
||||
"--query-driver=**",
|
||||
"--compile-commands-dir=/Users/brent/zonebridge/zonebridge/build"
|
||||
],
|
||||
"idf.currentSetup": "/Users/brent/esp/v5.5.1/esp-idf",
|
||||
"idf.openOcdConfigs": [
|
||||
"board/esp32s3-builtin.cfg"
|
||||
],
|
||||
"idf.customExtraVars": {
|
||||
"IDF_TARGET": "esp32s3"
|
||||
},
|
||||
"idf.port": "/dev/tty.usbserial-210",
|
||||
"idf.flashType": "UART"
|
||||
}
|
||||
83
.vscode/tasks.json
vendored
Normal file
83
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "ESP-IDF: Build",
|
||||
"type": "shell",
|
||||
"command": "bash",
|
||||
"args": [
|
||||
"-c",
|
||||
"source ${workspaceFolder}/setup_esp_env.sh && idf.py build"
|
||||
],
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": true,
|
||||
"panel": "shared"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "ESP-IDF: Clean",
|
||||
"type": "shell",
|
||||
"command": "bash",
|
||||
"args": [
|
||||
"-c",
|
||||
"source ${workspaceFolder}/setup_esp_env.sh && idf.py clean"
|
||||
],
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "shared"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "ESP-IDF: Flash & Monitor",
|
||||
"type": "shell",
|
||||
"command": "bash",
|
||||
"args": [
|
||||
"-c",
|
||||
"source ${workspaceFolder}/setup_esp_env.sh && idf.py flash monitor"
|
||||
],
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"focus": true,
|
||||
"panel": "new"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "ESP-IDF: Menuconfig",
|
||||
"type": "shell",
|
||||
"command": "bash",
|
||||
"args": [
|
||||
"-c",
|
||||
"source ${workspaceFolder}/setup_esp_env.sh && idf.py menuconfig"
|
||||
],
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"focus": true,
|
||||
"panel": "new"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "ESP-IDF: Size Analysis",
|
||||
"type": "shell",
|
||||
"command": "bash",
|
||||
"args": [
|
||||
"-c",
|
||||
"source ${workspaceFolder}/setup_esp_env.sh && idf.py size"
|
||||
],
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "shared"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user