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.

CCS/AM5728: Linker errors

Part Number: AM5728


Tool/software: Code Composer Studio

I have successfully demonstrated the AM572x template demo.  Next I am now trying to start from "SYS/BIOS GNU->Target Examples->Typical" and add functionality supporting my Cortex A project.  My initial goal is to read/write UART3 using the non-STDIO APIs.  Per the Processor SDK RTOS Section 3.1 Board Support I tried adding the following to main to initialize the board:

However, I got a linker error "undefined reference to Board_init."  I tried adding the following to Properties->GNU Linker->Libraries

    - Library: "ti.board.aa15fg"

    - Library search path: "C:\ti\pdk_am57xx_1_0_16\packages\ti\board\lib\evmAM572x\a15\release"

Perhaps I am making progress since the "undefined reference to Board_init" wasn't reported.  However, I now get linker error undefined reference to "UART_stdioInit."  Please confirm that I am on the right track and how to resolve this "UART_stdioInit" error.

Thanks,

Dave

  • Hi David,

    david kasper said:
    However, I now get linker error undefined reference to "UART_stdioInit."  Please confirm that I am on the right track and how to resolve this "UART_stdioInit" error.

    Seems that UART_stdioInit() function needs header files <ti/drv/uart/UART.h> and <ti/drv/uart/UART_stdio.h>, check below user guide for more info:

    http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_device_drv.html#uart

    david kasper said:
    I have successfully demonstrated the AM572x template demo.

    Note that in this demo, UART_stdioInit2() is used:

    processor_sdk_rtos_am57xx_6_01_00_08/demos/rtos_template_app/am572x/evmAM572X/A15/template_app/baremetal/app.c


    For example usage of UART_stdioInit(), you can refer to below files:

    pdk_am57xx_1_0_16/packages/ti/drv/gpio/test/led_blink/src/GPIO_log.c/h

    pdk_am57xx_1_0_16/packages/ti/drv/gpio/test/led_blink/src/main_led_blink.c


    Regards,
    Pavel

  • Pavel,

    Recall from my problem description that I do not wish to use STDIO (i.e. my hardware designer inadvertently used UART3 for a different purpose).  I have verified the demos and am trying to build a project from scratch.

    Per the output below the linker error is being generated by Board_uartStdioInit() within low level file evmAM572x_lld_init.c (i.e. from the Board_init() calling tree).  Please let me know why UART_stdioInit() is even being called since my the boardCfg argument doesn't include BOARD_INIT_UART_STDIO.  Is there a fundamental problem like a package not being loaded or something?

    Regards,

    Dave

  • Pavel,

    Pavel,

    Since I am getting a linker error doesn't it sound like a missing linker include path.  I think missing .h files would generate compiler errors.  I am hesitant to modify the LLD (i.e. evmAM572x_lld_init.c) which works fine for the demos.

    Recall my failure sequence is easy to replicate:

        1. Create CCS SYS/BIOS typical example (A15, TI AM5728 EVM)

        2. Add the few Board_init() lines above

        3. Select build project

    Regards,

    Dave 

  • Dave,

    Make sure you have all the needed xdc.loadPackage in your CFG file. You can align your project cfg file with RTOS demo cfg files:

    processor_sdk_rtos_am57xx_6_01_00_08/demos/rtos_template_app/am572x/evmAM572X/A15/template_app/rtos/

    Please also explore below e2e threads, you will find useful info:

    https://e2e.ti.com/support/processors/f/791/t/695148

    https://e2e.ti.com/support/processors/f/791/t/549167

    https://e2e.ti.com/support/processors/f/791/t/685547

    Regards,
    Pavel

  • Pavel,

    Thanks for your response.  I isolated the issue to the config file.  Perhaps sensitive to order that packages get loaded.  At this point I wish to start my project with the template versus investing the time to recreate the template from scratch.

    Regards,

    Dave