Skip to content

Instantly share code, notes, and snippets.

@stefang
Created July 25, 2025 17:48
Show Gist options
  • Select an option

  • Save stefang/94d3b977b1592b7ab08dc61b366ca86a to your computer and use it in GitHub Desktop.

Select an option

Save stefang/94d3b977b1592b7ab08dc61b366ca86a to your computer and use it in GitHub Desktop.
ESP-IDF 5.5 with CLion 2025.1.4 on OSX

I'm using OSX 15.5 and using pyenv to switch python versions. Make sure you're using python3.

First follow the OSX Setup

https://docs.espressif.com/projects/esp-idf/en/v5.5/esp32s3/get-started/linux-macos-setup.html

Assuming all that worked and you managed to build and flash to your esp32 board from the command line then add this to your ~./zshrc

export IDF_PATH="<path_to>/esp-idf"
export PATH="$IDF_PATH/tools:$PATH"
alias get_idf='. <path_to>/esp-idf/export.sh'

I copied the hello-world project in the esp-idf/examples/getting-started then opened it in CLion and then followed along with this youtube video, but swapping out the Windows stuff for terminal.

Developing for ESP32 With CLion on Windows

The gist of that video is to open a terminal window, run get_idf and then run echo $PATH and then copy the new parts that the script added.

Then open Settings > Build, Execution, Development > CMake and click the little icon on the right hand end of the Environment field and scroll down the system environment variables list in the lower half of the window and click to edit the PATH to add the new bits that you just copied to the beginning of the path. Make sure you copy the last :.

Additionally I had to set the ESP_ROM_ELF_DIR envvironment variable in the Settings > Build, Execution, Development > CMake window in CLion by clicking the little + in the User environment variables section at the top

Mine was ~/.espressif/tools/esp-rom-elfs/20241011/ but yours may differ.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment