Chapter 4. API Guides
contains test fixtures (structs/functions to do test case
and
tear-down).
→
If there are no fixtures, this can be
- <test_name>/
IDF applications which run the tests
- <test_name2>/
Further tests are
The IDF applications inside host_test set the mocking configuration as described in the
tation.
The
NVS page unit test
provides some illustration of how to control the mocks.
Requirements
• Installed IDF including all IDF requirements
• CMock requirements (Ruby)
• libbsd
The host tests have been tested on Ubuntu 20.04 with GCC version 9 and 10.
4.32 USB OTG Console
On chips with an integrated USB peripheral, it is possible to use USB Communication Device Class (CDC) to im-
plement the serial console, instead of using UART with an external USB-UART bridge chip. ESP32-S2 ROM code
contains a USB CDC implementation, which supports for some basic functionality without requiring the application
to include the USB stack:
• Bidirectional serial console, which can be used with
• Flashing using esptool.py and idf.py flash.
•
Device Firmware Update (DFU)
Note: At the moment, this "USB Console"feature is incompatible with TinyUSB stack. However, if TinyUSB is
used, it can provide its own CDC implementation.
4.32.1 Hardware Requirements
Connect ESP32-S2 to the USB port as follows
Some development boards may offer a USB connector for the internal USB peripheral —in that case, no extra con-
nections are required.
4.32.2 Software Configuration
USB console feature can be enabled using CONFIG_ESP_CONSOLE_USB_CDC option in menuconfig tool (see
CONFIG_ESP_CONSOLE_UART).
Espressif Systems
possible.
IDF Monitor
interface for flashing the device using dfu-util and idf.py dfu.
GPIO
USB
20
D+ (green)
19
D- (white)
GND
GND (black)
+5V (red)
1511
Submit Document Feedback
(continued from previous page)
ommitted.
IDF unit test documen-
or another serial monitor
set-up␣
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?