Chapter 4. API Guides
idf.py dfu-flash
which relies on dfu-util. Please see
tional setup for
USB drivers (Windows only)
use dfu-util without further setup.
If there are more boards with the same chip connected then idf.py dfu-list can be used to list the available
devices, for example:
Found Runtime: [303a:0002] ver=0723, devnum=4, cfg=1, intf=2, path="1-10",
name="UNKNOWN",
serial="0"
→
Found Runtime: [303a:0002] ver=0723, devnum=6, cfg=1, intf=2, path="1-2",
name="UNKNOWN",
serial="0"
→
Consequently, the desired device can be selected for flashing by the --path argument. For example, the devices
listed above can be flashed individually by the following commands:
idf.py dfu-flash --path
idf.py dfu-flash --path
Note: The vendor and product identificators are set based on the selected chip target by the idf.py set-target
command and it is not selectable during the idf.py dfu-flash call.
See
Common errors and known issues
udev rule (Linux only)
udev is a device manager for the Linux kernel. It allows us to run dfu-util (and idf.py dfu-flash) without
sudo for gaining access to the chip.
Create file /etc/udev/rules.d/40-dfuse.rules with the following content:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="303a", ATTRS{idProduct}=="00??",
"plugdev",
MODE="0666"
→
Note: Please check the output of command groups. The user has to be a member of the GROUP specified above.
You may use some other existing group for this purpose (e.g. uucp on some systems instead of plugdev) or create a
new group for this purpose.
Restart your computer so the previous setting could take into affect or run sudo udevadm trigger to force
manually udev to trigger your new rule.
USB drivers (Windows only)
dfu-util uses libusb to access the device. You have to register on Windows the device with the WinUSB driver.
Please see the
libusb wiki
for more details.
The drivers can be installed by the
the tool and that it detects the ESP32-S2 device before installing the drivers. The Zadig tool might detect several
USB interfaces of ESP32-S2. Please install the WinUSB driver for only that interface for which there is no driver
installed (probably it is Interface 2) and don't re-install the driver for the other interface.
Warning: The manual installation of the driver in Device Manager of Windows is not recommended because
the flashing might not work properly.
Espressif Systems
Step 1. Install prerequisites
or setting up an
1-10
1-2
and their solutions.
Zadig
tool. Please make sure that the device is in download mode before running
1302
Submit Document Feedback
for installing dfu-util. dfu-util needs addi-
udev rule (Linux
only). Mac OS users should be able to
alt=0,␣
alt=0,␣
GROUP=
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?
Questions and answers