Minimal ESP-IDF C project for an ESP32-C family board.
Espressif's current recommended macOS setup for ESP-IDF v6.0+ is the ESP-IDF Installation Manager (EIM). The legacy git-clone installer still works, but EIM keeps the framework and cross-compilers aligned for the selected ESP-IDF version.
Prerequisites:
brew install libgcrypt glib pixman sdl2 libslirp dfu-util cmake pythonThen install ESP-IDF with EIM:
brew tap espressif/eim
brew install eim
eim installAfter installation, activate the ESP-IDF shell environment before working in this project. EIM prints the exact activation command at the end of installation; it usually looks like this:
source ~/.espressif/tools/activate_idf_vX.Y.Z.shPick the exact chip target printed on your board/module. Common ESP32-C family
targets include esp32c3, esp32c6, esp32c2, and esp32c5.
cd ~/work/esp32c
idf.py set-target esp32c3
idf.py build
idf.py -p /dev/cu.usbmodemXXXX flash monitorIf your board uses USB serial through a UART bridge, the port may look like
/dev/cu.usbserial-* instead.
To list candidate ports:
ls /dev/cu.*Exit the serial monitor with Ctrl+].