Please find the answers below :

 

>  Device binding is not needed for console display ?

 

No – application code  need not do that.  It is enough that the apps define CONFIG_UART_CONSOLE_ON_DEV_NAME  if they want to override the default console device

 

Console output devices are opened from  uart_console_init() (  drivers/console/uart_console.c )  as

uart_console_dev = device_get_binding(CONFIG_UART_CONSOLE_ON_DEV_NAME);

 

If CONFIG_USB_UART console is defined, CONFIG_UART_CONSOLE_ON_DEV_NAME  defaults to "CDC_ACM"  via (arch/x86/soc/intel_quark/quark_se/Kconfig.defconfig.series)

 

 

> What the difference between the samples\usb\cdc_acm and samples\usb\console codes ?

 

The first one implements an echo type console on usb UART, wherein whatever character you type in minicom comes to the zephyr device and is echoed back to  minicom.  (While the debug prints still get routed to the actual physical uart). So in the sample app code you would see this logic.

 

In the second case, the config options cause the effect that all the debug prints come out via minicom on the host via the USB UART . The logic is mostly in the console driver (to plumb all the printks to USB UART) and the sample is meant to show config options as called out in README.

 

Hope that helps.

 

Thanks

Jithu

 

From: Mahendravarman Rajarao (RBEI/EAA3) [mailto:Mahendravarman.Rajarao@in.bosch.com]
Sent: Monday, December 5, 2016 5:18 AM
To: devel@lists.zephyrproject.org
Subject: [devel] reg: zephyr 1.6 => samples\usb\console

 

Hi

 

Please help on the following

 

In the latest zephyr 1.6 release , under samples\usb\console folder, the example is given to show the console output coming to USB UART.

 

dev = device_get_binding(CONFIG_CDC_ACM_PORT_NAME); is missing in this console example

Device binding is not needed for console display ?

 

 

What the difference between the samples\usb\cdc_acm and samples\usb\console codes ?

 

Best regards
Mahendravarman