This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/EK-TM4C129EXL: Please, advise me how to add second UART driver without recompiling TI-RTOS

Part Number: EK-TM4C129EXL

Tool/software: TI-RTOS

Hello collegues,

I need an advise of how to work with 2 UART in TI RTOS.

I can track with the debugger that it based on uart.c (part of TI-RTOS) 

I have added the element in array 

const UART_Config UART_config[] = {
    {
        .fxnTablePtr = &UARTTiva_fxnTable,
        .object = &uartTivaObjects[0],
        .hwAttrs = &uartTivaHWAttrs[0]
    },
    {  // I added this !!!
        .fxnTablePtr = &UARTTiva_fxnTable,
        .object = &uartTivaObjects[1],
        .hwAttrs = &uartTivaHWAttrs[1]
    },
    {NULL, NULL, NULL}
};

but it doesnt help

the loop over this array is iterated in uart.c. and debugger doesn see my additions.

Must I recompile the TI-RTOS?

Is there other way?

Thanks

  • Hello Yuliy,

    I am a little unclear about the situation. Let me ask a couple questions to clarify:

    1) Are you building and re-loading the project after adding these lines?
    2a) If so, what is the difference between build and compile from your point of view?
    2b) If not, are you adding these lines while in debug mode?

  • >1) Are you building and re-loading the project after adding these lines?

    Yes, I am

    >If so, what is the difference between build and compile from your point of view?

    build = compile+link

    >If not, are you adding these lines while in debug mode?

    no, add the lines in Code without recompiling+linking is useles.

  • Hello Yuliy,

    Okay, just wanted to make sure we are on the same page about debug and building first.

    Yuliy Poluyanov said:

    Must I recompile the TI-RTOS?

    No, there should be no need for this. Which uart.c file are you changing? Is there an example project you are basing this change of?

  • >No, there should be no need for this.
    I hope you are right..

    >Which uart.c file are you changing?
    I do not change the uart.c I Change UART_config Array.
    First is in TI-RTOS, second belong to application.

    I hoped that Change the Array (in application side) would be enough..
    Seems , not...

    This array (app side) is used in uart.c (TI-RTOS).
    I hoped that the linker (when I build the app) will resolve the external variable array UART_config..
    A bit strange.. seems that is not happened.
  • As a base I did take UARTDMA echo
  • Hello Yuliy,

    As far as my understanding goes, you should not need to change anything within TI-RTOS to add a second UART channel, and all changes should be made on Application side.

    I have flagged this post to the TI-RTOS team, they will be able to help you get going quicker than myself.

    For their understanding when they view this posting, you are using the UART DMA Echo example from the latest TI-RTOS for Tiva-C release, and you are trying to add a second UART channel to it via modifications to the example code shown in your first post, correct?
  • >For their understanding when they view this posting, you are using the UART DMA Echo example from the latest TI-RTOS for Tiva-C release, and you are trying to add a second UART channel to it via modifications to the example code shown in your first post, correct?

    Yes, exactly...
    Thank for your help, have a good Weekend.
  • I got the solution.

    my error I changed the UART_config array for nonDMA version. and of course there was no effect, this was simply not been took into compilation..

    Thanks everybody