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.

AM3358: PRU Soft-UART

Part Number: AM3358

Hello, 

I am new to TI RTOS, I introduced myself to Processor-SDK RTOS because I want to use the 9 bits capability of the PRU UART FW in implementing the MDB (Multi-Drop Bus) on the BeagleBone Black,
I want to know if I have to use/include the BIOS when using the  icss_uart and if i have to use the pru compiler or a diffrent compiler

  • Hello Aouainia,

    Please refer to the PRU driver and ICSS_UART firmware here:
    http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_device_drv.html#pruss

    You don't have to use BIOS. The ICSS_UART firmware is compiled by TI PRU compiler in the release of Processor SDK v6.3.

    Regards,

    Garrett

  • Thank you Garrett,

    I thought about modifying the "UART_FwExample_bbbAM335x_armExampleProject" fom the "PROCESSOR-SDK-RTOS-AM335X  06_03_00_106" to suit my needs (usues SYS/BIOS and GNU compiler) but your reply really opened doors for me thank you,

    so just to make it clear for me, I can just create a PRU CCS project ,include "pruicss.h" and "icss_uart.h" files and work my way from there by manipulating registers ? 

    I have also read the "UART_FW_DESIGN_GUIDE.docx" from [1] to get to know more about the registers.

    [1] : https://git.ti.com/gitweb?p=keystone-rtos/uart-lld.git;a=tree;f=docs;h=371c6e4b9612dac39e372bdd29815e74783fbfe5;hb=HEAD 

    Aouainia

  • Hi Auoainia,

    You don't need manipulate registers, instead, you can refer to the sample API code as shown in the PRSDK UG section 7.7.6. UART Firmware Example & Test, to transfer data through UART.

    /* Initiate UART write */
    UART_transactionInit(&wrCbTransaction);
    wrCbTransaction.buf = (void *)wrBuff;
    wrCbTransaction.count = sizeof(wrBuffer)/2;
    if (UART_write2(handle, &wrCbTransaction) == UART_ERROR) {
        /* UART write failed */
    }
    ...
    
    /* Initiate UART read */
    UART_transactionInit(&rdCbTransaction);
    rdCbTransaction.buf = (void *)rdBuff;
    rdCbTransaction.count = sizeof(rdBuffer)/2;
    if (UART_read2(handle, &callbackTransaction) == UART_ERROR) {
        /* UART read failed */
    }

    Regards,
    Garrett
  • Hello Garret,

    I thought I can only use APIs when using RTOS, thank you for this!

    but just another question how to specify the Board (SOC_AM335x) without the .cfg file and xdctools! so i can initialize the UART PRU FW configuration

    Thank you again for your help,

    Regards,

    Aouainia

  • Hello Garrett,

    I am trying to use the UART API and i have included all the required header files but i still get the "error #10234-D: unresolved symbols remain"

     undefined            first referenced
      symbol                  in file     
     ---------            ----------------
     UART_Params_init     ./fw_uart.obj   
     UART_init            ./fw_uart.obj   
     UART_open            ./fw_uart.obj   
     UART_socSetFwCfg     ./fw_uart.obj   
     UART_transactionInit ./fw_uart.obj   
     UART_write2          ./fw_uart.obj   
     pru_dmem0_rev1_end   ./fw_uart.obj   
     pru_dmem0_rev1_start ./fw_uart.obj   
     pru_dmem1_rev1_end   ./fw_uart.obj   
     pru_dmem1_rev1_start ./fw_uart.obj   
     pru_imem0_rev1_end   ./fw_uart.obj   
     pru_imem0_rev1_start ./fw_uart.obj   
     pru_imem1_rev1_end   ./fw_uart.obj   
     pru_imem1_rev1_start ./fw_uart.obj 

    and these are the header files 

    #include <ti/drv/uart/UART.h>
    #include <ti/drv/uart/UART_stdio.h>
    #include <ti/drv/uart/soc/UART_soc.h>
    #include <ti/drv/uart/firmware/icss_uart/src/icss_uart.h>
    //#include <ti/drv/uart/src/v2/UART_v2.h>
    
    
    #include <ti/csl/csl_chip.h>
    
    /* Board Header files */
    #include <ti/board/board.h>
    #include <ti/starterware/include/prcm.h>

  • Hi Aouainia,

    Please refer to the firmware design document and try the firmware RTOS test example first, then you might be able to find out which lib/link file should be included for the issues you observed. 

    Regards,
    Garrett

  • Hello Garrett,

    when I add the mentioned Linker Libraries from the UART_FW_Example to my PRU project (FW_UART) I get the following errors 

    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 7: error #10008-D: cannot find file "KEEP"
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 7: error #10036-D: expecting section name instead of "("
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 12: error #10008-D: cannot find file "KEEP"
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 12: error #10036-D: expecting section name instead of "("
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 16: error #10008-D: cannot find file "KEEP"
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 16: error #10036-D: expecting section name instead of "("
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 20: error #10008-D: cannot find file "KEEP"
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 20: error #10036-D: expecting section name instead of "("
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 25: error #10008-D: cannot find file "KEEP"
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 25: error #10036-D: expecting section name instead of "("
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 29: error #10008-D: cannot find file "KEEP"
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 29: error #10036-D: expecting section name instead of "("
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 7: warning #10068-D: no matching section
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 12: warning #10068-D: no matching section
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 16: warning #10068-D: no matching section
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 20: warning #10068-D: no matching section
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 25: warning #10068-D: no matching section
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 29: warning #10068-D: no matching section
    warning #10247-D: creating output section ".shdata" without a SECTIONS specification
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 14: warning #10097: memory range not found: APP_CACHED_DATA_BLK0_MEM on page 0
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 10: error #10265: no valid memory range(null) available for placement of "PRU0_REV1_DMEM"
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 10: error #10099-D: program will not fit into available memory.  run placement with alignment fails for section "PRU0_REV1_DMEM" size 0 page 0
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 9: warning #10097: memory range not found: APP_CACHED_DATA_BLK0_MEM on page 0
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 5: error #10265: no valid memory range(null) available for placement of "PRU0_REV1_IMEM"
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 5: error #10099-D: program will not fit into available memory.  run placement with alignment fails for section "PRU0_REV1_IMEM" size 0 page 0
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 27: warning #10097: memory range not found: APP_CACHED_DATA_BLK0_MEM on page 0
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 23: error #10265: no valid memory range(null) available for placement of "PRU1_REV1_DMEM"
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 23: error #10099-D: program will not fit into available memory.  run placement with alignment fails for section "PRU1_REV1_DMEM" size 0 page 0
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 22: warning #10097: memory range not found: APP_CACHED_DATA_BLK0_MEM on page 0
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 18: error #10265: no valid memory range(null) available for placement of "PRU1_REV1_IMEM"
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 18: error #10099-D: program will not fit into available memory.  run placement with alignment fails for section "PRU1_REV1_IMEM" size 0 page 0
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 17: warning #10097: memory range not found: APP_CACHED_DATA_BLK0_MEM on page 0
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 15: error #10099-D: program will not fit into available memory.  run placement with alignment fails for section "PRU0_REV1_EXT" size 0 page 0
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 30: warning #10097: memory range not found: APP_CACHED_DATA_BLK0_MEM on page 0
    "C:/ti/pdk_am335x_1_0_17/packages/ti/build/pruss/lnk_a8_a9_a15_REV1.cmd", line 28: error #10099-D: program will not fit into available memory.  run placement with alignment fails for section "PRU1_REV1_EXT" size 0 page 0

    I tried adding the .bin files from the "\ti\drv\uart\firmware\icss_uart\bin\am335x\a8host\REV1" and I get the following error 

    fatal error #16023: file "C:/ti/pdk_am335x_1_0_17/packages/ti/drv/uart/firmware/icss_uart/bin/am335x/a8host/REV1/icss_uart_PRU0.bin" specifies machine "Advanced RISC Machines ARM", which is not compatible with machine "TI PRU" specified in a previous file or on the command line


    Regards,

    Aouainia