- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a sopc design that contains a jtag uart and an avalon uart, while porting a debug console to the platform, it needs to directly talk to the hardware rather than to the tty, otherwise input such as up/down arrow will be interpreted differently as intended.
I managed to make it work with the jtag uart by enabling the option "CYGPKG_IO_SERIAL_DEVICES" and open /dev/ser4. However, while trying to put the samething on to the uart port, i'm not able to open "/dev/ser0", cyg_io_lookup shows that there's no such device, but the default printf does go to the uart and works fine. Can anyone tell me how to open the uart hardware device from the application? Thanks & RegardsLink Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a special setting for the system console. The UART (either serial uart or jtag uart) that is selected as the system console is initialized at the beginning of the kernel init, and uses a special mode of the driver. Once a component has been opened that way, it can't be opened again through the /dev/ path and can only be used through the stdin/stdout descriptors.
I don't have an eCos installation right here, but if I remember correctly you can change the component used for the system console somewhere in the NiosII parameters in the eCos configuration.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, thanks for your reply, I'm quite new to ecos and I haven't found this option. Do you remember the name or part of the name for that option? I have been playing around with all the serial/terminal related option and haven't been able to open that device. Or, where is the kernel initialization file located? Trying to dive into the kernel source code...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you use the eCos configuration tool, it is in eCos HAL > Nios2 architecture > Diagnostic console device
The parameter name is CYGHWR_HAL_NIOS2_VV_CONSOLE_DEV- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you so much! I'll try it out.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page