Flashing the Blink Program

For Linux systems, connect the ESP32-C3 to the computer via USB-UART chip (such as CP2102), and use the command ls /dev/ttyUSB* to view the serial port number. If the current serial port number printed is /dev/ttyUSB0, use the command idf.py -p /dev/ttyUSB0 flash to flash the program onto the ESP32-C3.

For Mac systems, connect the ESP32-C3 to the computer via USB-UART chip (such as CP2102), and use the command ls /dev/cu.* to view the serial port number. If the current serial port number printed is /dev/cu.SLAB_USBtoUART, use the command idf.py -p /dev/cu.SLAB_USBtoUART flash to flash the program onto the ESP32-C3.

For Windows systems, connect the ESP32-C3 to the computer via USB-UART chip (such as CP2102), and view the serial port number through the device manager. If the current serial port number is COM5, use the command idf.py -p COM5 flash to flash the program onto the ESP32-C3.

After the flashing process is completed, you will see a prompt as shown in Figure 4.21 in the console. When the following log appears, the code will start executing, and the LED on the development board will start flashing.

Hard resetting via RTS pin...
Done
Figure 4.21. Prompt in the console after flashing is completed