This guide helps you resolve common issues with the HardFOC ESP-IDF CI Tools.
🔍 Common Issues
Build Failures
ESP-IDF Not Found
Problem: Workflow fails with "ESP-IDF not found" error
Solutions:
- Check ESP-IDF version in workflow configuration
- Verify version availability in ESP-IDF releases
- Update to supported version (v4.4 or later)
# In .github/workflows/build.yml
- name: Build Application
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: "release/v5.5" # Use supported version
Configuration Errors
Problem: "Configuration file not found" or "Invalid configuration"
Solutions:
- Verify file exists: Check
/examples/esp32/app_config.yml
- Validate YAML syntax:
yq eval /examples/esp32/app_config.yml
- Check file permissions and location
Build Type Not Supported
Problem: "Build type not supported" error
Solutions:
- Check app configuration in
app_config.yml
- Verify build types are defined for the app
- Update configuration to include required build types
CI/CD Issues
Workflow Not Triggering
Problem: GitHub Actions workflow doesn't run
Solutions:
- Check workflow file is in
.github/workflows/
- Verify YAML syntax is correct
- Check trigger conditions (branches, paths)
- Ensure workflow is enabled in repository settings
Matrix Build Failures
Problem: Some matrix combinations fail
Solutions:
- Check excluded combinations in workflow
- Verify ESP-IDF version compatibility
- Review app-specific requirements
- Add exclusions for incompatible combinations
Port Detection Issues
No ESP32 Devices Found
Problem: Port detection script finds no devices
Solutions:
- List available devices with detailed info:
./scripts/flash_app.sh ports
- Check USB connection and drivers
- Verify device permissions on Linux
- Try different USB port or cable
- Check device manager for driver issues
Permission Denied
Problem: "Permission denied" when accessing serial ports
Solutions:
- Check device status using the ports command:
./scripts/flash_app.sh ports
# Look for "✗ permission denied" status
- Add user to dialout group (Linux):
sudo usermod -a -G dialout $USER
- Quick fix for immediate access:
sudo chmod 666 /dev/ttyACM0
- Restart terminal after group changes
Multiple ESP32 Devices Connected
Problem: Wrong device selected or interactive prompt appears in scripts
Solutions:
- List all devices to identify the correct one:
./scripts/flash_app.sh ports
- Specify device explicitly using
--port flag: ./scripts/flash_app.sh --port /dev/ttyACM1 flash app_name Release
./scripts/flash_app.sh -p /dev/ttyUSB0 monitor
- Set persistent preference with environment variable:
export ESPPORT=/dev/ttyACM1
./scripts/flash_app.sh flash app_name Release
- For CI/scripts - always use
--port to avoid interactive prompts: # Non-interactive usage for automation
./scripts/flash_app.sh --port /dev/ttyACM0 flash app_name Release
Flashing to Wrong Device
Problem: Firmware flashed to incorrect ESP32 when multiple are connected
Solutions:
- Always use
ports command first to identify devices: ./scripts/flash_app.sh ports
# Note the serial numbers to identify each device
- Use explicit port selection:
./scripts/flash_app.sh --port /dev/ttyACM1 flash app_name Release
- Label your devices physically based on port/serial number
🛠️ Debugging
Enable Debug Mode
Add debug output to workflows:
- name: Debug Information
run: |
echo "ESP32_PROJECT_PATH: $ESP32_PROJECT_PATH"
echo "App: ${{ matrix.app }}"
echo "Build Type: ${{ matrix.build_type }}"
echo "ESP-IDF Version: ${{ matrix.idf_version }}"
Check Logs
- GitHub Actions logs - Check workflow execution logs
- Build logs - Look for specific error messages
- ESP-IDF logs - Check ESP-IDF build output
Local Testing
Test configurations locally:
# Test build configuration
cd /examples/esp32
./scripts/build_app.sh validate your_app Release
# List available ESP32 devices with details
./scripts/flash_app.sh ports
# Test port detection with verbose output
./scripts/detect_ports.sh --verbose
# Test configuration loading
./scripts/config_loader.sh
# Test flashing to specific device
./scripts/flash_app.sh --port /dev/ttyACM0 monitor
📋 Diagnostic Checklist
Pre-Flight Checks
- [ ] ESP-IDF installed and accessible
- [ ] Project structure follows expected layout
- [ ] Configuration files exist and are valid
- [ ] Workflow files are in correct location
- [ ] GitHub Actions are enabled for repository
Build System Checks
- [ ] app_config.yml syntax is valid
- [ ] Applications are defined correctly
- [ ] Build types are supported
- [ ] ESP-IDF versions are available
- [ ] Source files exist and are accessible
CI/CD Checks
- [ ] Workflow syntax is correct
- [ ] Matrix strategy is valid
- [ ] Secrets are configured (if needed)
- [ ] Triggers are set up correctly
- [ ] Permissions are sufficient
🆘 Getting Help
Self-Service Resources
- Check this guide for common issues
- Review GitHub Actions logs for specific errors
- Test locally before pushing to CI
- Validate configuration files
Community Support
Professional Support
For enterprise or complex issues:
- Contact maintainers via GitHub
- Request consultation for custom setups
- Submit feature requests for specific needs
📚 Additional Resources