acassis commented on issue #7331:
URL: 
https://github.com/apache/incubator-nuttx/issues/7331#issuecomment-1287829830

   @abdallah-ali-abdallah @pkarashchenko reading it again: "NSH will not print 
'\r\n' to devices except /dev/consol. that causes the consol to read shofted 
and miss aligned lines"...
   
   I think this is expected because you could use serial devices with NSH that 
are not suppose to need "\r\n". Remember: Unix never needed "\r\n" because "\n" 
always mean "move to new line" (at the begin of a new line). I think "\n" 
meaning move the new line at current column position is something created with 
DOS (or CP/M ?). It exist on NuttX because some serial console terminal expect 
the DOS/Windows behavior.
   
   @abdallah-ali-abdallah with your modification everything someone send a "\n" 
char in the serial it will become a "\r\n" and could prevent some devices to 
work. We need to figure-out why CONFIG_CDCACM_CONSOLE is not working...
   
   I found a useful information at apps/nshlib/Kconfig
   ```
                   Normally, the serial console device is a UART and RS-232
                   interface.  However, if USBDEV is defined, then a USB
                   serial device may, instead, be used if the one of
                   the following are defined:
   
                   PL2303 and PL2303_CONSOLE - Set up the Prolifics PL2303
                   emulation as a console device at /dev/console.
   
                   CDCACM and CDCACM_CONSOLE - Set up the CDC/ACM serial
                   device as a console device at dev/console.
   
                   NSH_USBCONSOLE and NSH_USBCONDEV - Sets up some other USB
                   serial device as the NSH console (not necessarily 
dev/console).
   ```
   
   No idea why CONFIG_NSH_USBCONSOLE couldn't become a /dev/console there 
should be some reason why Greg decided to do this way.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to