doc: mention ESP USB CDC console option with DFU support

This commit is contained in:
King Kévin 2023-04-03 15:35:06 +02:00
parent 9750bf882d
commit c66cff88a2
1 changed files with 31 additions and 0 deletions

View File

@ -43,6 +43,37 @@ This is cumbersome when developing firmware, and sometimes impossible if the boa
This USB DFU implementation allows to switch back to runtime mode without pressing a button.
The runtime firmware can also reboot into the DFU mode without pressing a button.
ESP USB CDC
-----------
You can change the console output using `idf.py menuconfig` under `Component config → ESP System Settings → Channel for console output` from the default UART0 to USB CDC.
After re-powering and re-plugging USB, the device appears as USB CDC ACM device.
Not only it the console over this serial port, but you can even use it to flash the device without pressing any button.
~~~
idf.py --port=/dev/ttyACM0 flash
~~~
The USB device also comes with DFU capabilities, and can be flashed using DFU, also without pressing on buttons:
Using the IDF:
~~~
idf.py dfu dfu-flash
~~~
Or using `dfu-util` directly:
~~~
idf.py dfu
dfu-util --device 303a:0002 --download build/dfu.bin
~~~
This can only be used with the USB CDC ACM profile, Espressif USB VID/PID.
It makes it simpler and is sufficient for most projects.
Our DFU implementation can be use with and USB configuration, allows custom USB VID/PID, and is faster.
It makes it a bit more complex, and needs more space, but allows using custom USB configuration.
install
=======