diff --git a/drivers/drivers_initialize.c b/drivers/drivers_initialize.c index 8a52b47c3d2..36b59b4c1f2 100644 --- a/drivers/drivers_initialize.c +++ b/drivers/drivers_initialize.c @@ -49,6 +49,21 @@ #include #include +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Check if only one console device is selected. + * If you get this errro, search your .config file for CONSOLE_XXX_CONSOLE + * options and remove what is not needed. + */ + +#if (defined(CONFIG_LWL_CONSOLE) + defined(CONFIG_SERIAL_CONSOLE) + \ + defined(CONFIG_CDCACM_CONSOLE) + defined(CONFIG_PL2303_CONSOLE) + \ + defined(CONFIG_SERIAL_RTT_CONSOLE) + defined(CONFIG_RPMSG_UART_CONSOLE)) > 1 +# error More than one console driver selected. Check your configuration ! +#endif + /**************************************************************************** * Public Functions ****************************************************************************/