How to change UARTs RTEMS

mfg mfg at ugr.es
Wed Sep 6 06:42:17 UTC 2017


Thanks for the reply Jan.

In your path you have xilinx_scosa, is it some xilinx's board?

My console-config is different, it hasn't console_tbl structure (I 
attach it to the mail).

I did not know there was a list of rtems developers, I'm going to ask 
that list, thank you very much.

Marco Fuentes García


El 2017-08-31 16:32, Jan.Sommer at dlr.de escribió:
> I think I encountered this problem as well.
> I found this patch in my history. Maybe it helps:
>
> diff --git
> a/c/src/lib/libbsp/arm/xilinx_scosa/console/console-config.c
> b/c/src/lib/libbsp/arm/xilinx_scosa/console/console-config.c
> index 94e5e4f799..6db8d0da88 100644
> --- a/c/src/lib/libbsp/arm/xilinx_scosa/console/console-config.c
> +++ b/c/src/lib/libbsp/arm/xilinx_scosa/console/console-config.c
> @@ -30,7 +30,7 @@ console_tbl Console_Configuration_Ports[] = {
>      .ulMargin = 0,
>      .ulHysteresis = 0,
>      .pDeviceParams = (void *) 115200,
> -    .ulCtrlPort1 = 0xe0000000,
> +    .ulCtrlPort1 = 0xe0001000,
>      .ulCtrlPort2 = 0,
>      .ulDataPort = 0,
>      .getRegister = NULL,
> @@ -38,7 +38,7 @@ console_tbl Console_Configuration_Ports[] = {
>      .getData = NULL,
>      .setData = NULL,
>      .ulClock = 0,
> -    .ulIntVector = ZYNQ_IRQ_UART_0
> +    .ulIntVector = ZYNQ_IRQ_UART_1
>    }, {
>      .sDeviceName = "/dev/ttyS1",
>      .deviceType = SERIAL_CUSTOM,
> @@ -48,7 +48,7 @@ console_tbl Console_Configuration_Ports[] = {
>      .ulMargin = 0,
>      .ulHysteresis = 0,
>      .pDeviceParams = (void *) 115200,
> -    .ulCtrlPort1 = 0xe0001000,
> +        .ulCtrlPort1 = 0xe0000000,
>      .ulCtrlPort2 = 0,
>      .ulDataPort = 0,
>      .getRegister = NULL,
> @@ -56,7 +56,7 @@ console_tbl Console_Configuration_Ports[] = {
>      .getData = NULL,
>      .setData = NULL,
>      .ulClock = 0,
> -    .ulIntVector = ZYNQ_IRQ_UART_1
> +    .ulIntVector = ZYNQ_IRQ_UART_0
>    }
>  };
>
>
> Best regards
>
>    Jan
>
>> -----Original Message-----
>> From: users [mailto:users-bounces at rtems.org] On Behalf Of mfg
>> Sent: Thursday, August 31, 2017 2:32 PM
>> To: users at rtems.org
>> Subject: How to change UARTs RTEMS
>>
>> Hello,
>>
>> I'm using the Zedboard's BSP and my objetive is to print what goes 
>> out through
>> the uart1 interface for uart0 and vice versa.
>> I thought changing the memory addresses of the “console-config.c”
>> configuration file would suffice, but it is not.
>>
>> zynq_uart_context zynq_uart_instances[2] = {
>>    {
>>      .base = RTEMS_TERMIOS_DEVICE_CONTEXT_INITIALIZER( "Zynq UART 0" 
>> ),
>>      .regs = (volatile struct zynq_uart *) 0xe0001000,
>>   //it was 0xe0000000,
>>      .irq = ZYNQ_IRQ_UART_0
>>    }, {
>>      .base = RTEMS_TERMIOS_DEVICE_CONTEXT_INITIALIZER( "Zynq UART 1" 
>> ),
>>      .regs = (volatile struct zynq_uart *) 0xe0000000, //it was 
>> 0xe0001000,
>>      .irq = ZYNQ_IRQ_UART_1
>>    }
>> };
>>
>> Do I have to modify more files like zyn-uart-regs.h?
>> Has anyone done it or can it guide me?
>>
>> Thanks in advance.
>>
>> Marco Fuentes Garcia
>>
>> _______________________________________________
>> users mailing list
>> users at rtems.org
>> http://lists.rtems.org/mailman/listinfo/users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: console-config.c
Type: text/x-c
Size: 1398 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20170906/ccc66ca2/attachment.bin>


More information about the users mailing list