mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
refactor(examples/console): Warn if secondary console is active
Having a secondary serial console is not useful when applications use a REPL console type, hence we warn for it in examples. Closes https://github.com/espressif/esp-idf/issues/11731
This commit is contained in:
@@ -24,6 +24,17 @@
|
||||
#include "cmd_wifi.h"
|
||||
#include "cmd_nvs.h"
|
||||
|
||||
/*
|
||||
* We warn if a secondary serial console is enabled. A secondary serial console is always output-only and
|
||||
* hence not very useful for interactive console applications. If you encounter this warning, consider disabling
|
||||
* the secondary serial console in menuconfig unless you know what you are doing.
|
||||
*/
|
||||
#if SOC_USB_SERIAL_JTAG_SUPPORTED
|
||||
#if !CONFIG_ESP_CONSOLE_SECONDARY_NONE
|
||||
#warning "A secondary serial console is not useful when using the console component. Please disable it in menuconfig."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP_CONSOLE_USB_CDC
|
||||
#error This example is incompatible with USB CDC console. Please try "console_usb" example instead.
|
||||
#endif // CONFIG_ESP_CONSOLE_USB_CDC
|
||||
|
Reference in New Issue
Block a user