Assuming you are using VS Code:
- Follow the tutorials here and here to install the ESP-IDF extension and everything else in the required toolchain.
- On Linux, you may need to install udev rules to make the debugger work. The extension output is broken and will just tell you
[object Object]
; the correct udev rules can be found here.
- On Linux, you may need to install udev rules to make the debugger work. The extension output is broken and will just tell you
- Connect both USB ports on the ESP32 -- the one labelled "USB" is for JTAG debugging/code upload and the one labelled "UART" is for the console.
- At the bottom left corner, select the correct device to use, if it's not selected already. On Linux this will most likely be
/dev/ttyUSB0
. If both USB and UART are plugged in, there will also be a/dev/ttyACM0
; this is for the USB/debugger while/dev/ttyUSB0
is for the serial console. - If not selected already, at the bottom left corner, set the device target. Use esp32c6 as the target, and ESP32-C6 Chip (via builtin USB JTAG).
- Build the project. There's a button on the bottom bar for this.
- Once the project is built, if you want to set up IntelliSense or clangd, navigate to the new
build/
directory and copy thecompile_commands.json
file from inside the directory to the root of the repository. You may have to do another rebuild. After this, code completion should work.
There are buttons on the bottom bar to build and flash the project, and open the serial monitor to see printf
outputs. Flashing may require you to start the openocd server.