Rtems 4.11 Console Drive (ARM, beagle)

Source: Internet
Author: User

The main file of the console driver framework is c/src/lib/libbsp/shared/console.c, and the driver's entry is console_initialize() The primary function is to initialize the global variables provided by the BSP Console_configuration_ports[Console_configuration_count], initializes the Termios schema, registers the file node of the Console device.

C/SRC/LIB/LIBBSP/ARM/BEAGLE/CONSOLE/CONSOLE-CONFIG.C is the only file provided by the Beagle BSP regarding the console driver, as the serial device provided by AM335X is compatible with the NS16550 register , things become very simple, because ns16550 's various operating functions are implemented in Libchip, the specific file is c/src/libchip/serial/ NS16550.C, it should be said that a lot of CPU provided by the serial port are ns16550 compatible, this is the de facto standard, even if unfortunately incompatible, we are just to implement a few operating functions ~

C Library Support

To support printf and scanf for C libraries, you must provide input and output functions, initialize Bsp_output_char and Bsp_poll_char two function pointers, Beagle BSP provides functions that use the same serial port as the console, and fixed for round robin to get or write characters, the sensation may go wrong and later be studied.

Console_initialize Call

The console_driver_table_entry is defined in cpukit/include/rtems/console.h, and if the console is required for the final application, it can be configured by cpukit/sapi/include/ Confdefs.h included in the _io_driver_address_table.

Rtems 4.11 Console Drive (ARM, beagle)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.