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.

OCTVO-3P-AM335X: Undefined Reference error in user example

Part Number: OCTVO-3P-AM335X

Hello All,

Here i am doing RND on AM335x with CCS and now i am able to import a bare metal example and i can create _ti.bin file and then 

I can convert this file in to the app and then  i will load it into SD along with MLO and then i can see my results.

Here problem now is i added library into my new created project but i am unable to use the functions which i would like to use.

for ex: I created a new project and i have added "#include <ti/board/board.h>" library in to my new project and i am trying to use " status = Board_init(boardCfg);"  this function 

but i am getting an error.

so i added predefined symbol as a evmAM335x also but still problem is not resolved.

Even i added full path like 


/* Board header file */
#include <ti/board/board.h>

#include <C:\ti\pdk_am335x_1_0_17\packages\ti\board\board.h>

Anyone knows how to resolve this.

Thanks,

Anil D. 

  • Hi Anil,

    I think many of the problems that you've been running into stem from trying to start a new project from scratch.

    We generally suggest that you stare with the rtos/baremetal template app or one of the pdk example apps when beginning a new project.

    If this is something that you're not able to do, please let me know and we can continue to troubleshoot.

    Thanks,

    Max

  • Yes Max,

    I have a huge experience in MSP430, CC1352, TMS Micro controllers of TI. I didn't faced any problem at any time while working on the SDK example or Creating a new project and run it. I can easily add and remove whichever file i would like to add/remove.

    But AM335x processor PDK only i am facing lot many problems like this. I am not getting why?

    Even I am wondering about, even after adding library why can't i access that library functions. I can able to access Structures but functions are not accessible, its very strange for me.

    So that only i am posting my questions daily.

    Okay, if you feel that i need to more focus on bare metal example, but still i am waiting for the Answer. 

    Thanks,

    Anil D.

  • Hi Anil,

    I think starting with the template app will ultimately save you time.

    For this issue, you may need to point the linker to your driver libraries.

    You can do that by going to the libraries tab under Properties -> Build -> Linker -> Libraries

    The libraries can then be found in <PDK_DIR>\packages\ti\drv\<DRIVER>\lib\am335x\a8\release

    Thanks,

    Max

  • Hello Max,

    Don't we have any robust solution on this. Why we have to add so many libraries and so many things for this?

    even i added the library in the Library section i am getting an errors.

    You can see in the above image, how i added library as per your suggestion. But still i am facing problems and i am getting an errors.

    do we need to add all libraries like emac, gpio,gpmc,i2c,......usb?

     I have started understanding bare metal example with RTOS and without RTOS, most of the Part i understood. 

    Thanks,

    Anil D.

  • Hi Anil,

    You need to add libraries for the functions that you use in your program. For instance you've included: "Board, SPI, I2C, and mmcsd".

    You also will likely need to add "UART". Additionally, instead of Library search path, it might be better to link the actual .aa8fg files in the "Libraries" box above "Library Search Path"

    We encourage users to start with the template app or pdk driver examples, because they already have these libraries included.

    Thanks,

    Max

  • Hello Max,

    I have added all libraries, but still i am facing a problem. 

    Why i am insisting you to tell me this problem, because i can understand bare metal example quickly, but for this process only it's taking time. Because anyhow after understanding of bare metal example i have to create a new example for my project. 
    so why can't i start now only. and our conversation is like after a day i will get some answer from you guys, so many days will it take to resolve all problems. and why to start late like after understanding bare metal example. I can start now along with bare metal example understanding i can do this also parallely.

    Thanks for your support.

    Anil D.

     

  • And the point is i already understand the Bare metal Example with UART and some other peripheral initialization. How many things i finished with BBB AM335x was,

    1) Booting through SD card with predefined Image.

    2) Booting SD card with Bare metal example .bin file and predefined "C:\ti\pdk_am335x_1_0_17\packages\ti\starterware\binary\bootloader\bin\am335x-evm\gcc\bootloader_boot_mmcsd_a8host_debug_ti.bin" file - successfully booted with this steps.

    3) I studied "rtos_template_app_am335x_a8" this example also for RTOS with 3 different tasks.

    4) Now i would like to create a new project with my workspace and my New project so i can do RND on many things like UART, SPI, LED blinking etc.

    So, I think I can now start with my projects.

    Please provide/suggest any document where i can get every details, which tells me about How to create a new project and how to add all libraries without an ERROR.

     

    Thanks,

    Anil Dhanawade.

  • Hello Max,

    I Tried to do a UART code understanding but i am not getting UART code in Interrupt mode.

    //////////////////////////////////////////Initialization////////////////////////////////////
    
    void UART_ReadCallback(UART_Handle handle, void *buf, size_t count);
    UART_Handle uart_handle;
    
    /* UART parameters structure polled mode*/
    const UART_Params user_params = {
                                     UART_MODE_CALLBACK,     /* readMode */
                                     UART_MODE_BLOCKING,     /* writeMode */
                                     50000U,                /* readTimeout */
                                     50000U,                 /* writeTimeout */
                                     UART_ReadCallback,    /* readCallback */
                                     NULL,                 /* writeCallback */
                                     UART_RETURN_NEWLINE,  /* readReturnMode */
                                     UART_DATA_TEXT,       /* readDataMode */
                                     UART_DATA_TEXT,       /* writeDataMode */
                                     UART_ECHO_ON,         /* readEcho */
                                     115200,               /* baudRate */
                                     UART_LEN_8,           /* dataLength */
                                     UART_STOP_ONE,        /* stopBits */
                                     UART_PAR_NONE         /* parityType */
    };
    
    
    ////////////////////////////////////Application//////////////////////////////////////
    
    void UART_ReadCallback(UART_Handle handle, void *buf, size_t count)
    {
        //    static char character;
        //    character = UART_getc();
    
        char scanPrompt[1000] = {0x00};
        UART_read(uart_handle,scanPrompt, sizeof(scanPrompt));/* Read API */
    
        appPrint("\nCharacter I Received: ");
        appPrint("%s",scanPrompt);
        return;
    }
    
    
    /**
     *  @brief Function uart_task : This task scans UART port and prints
     *      back the word entered. On "ESC" it triggers the end of test.
     *      Exercises reads and writes to UART port.
     *
     *  @retval            none
     */
    void uart_task()
    {
        UART_Params      params;
    
        static int uart_is_init = 0;
        //    static char buffPointer[1000];
        static const char echoPrompt[] = "\n uart_task :Enter a word or Esc to quit >";
        //    static const char echoPrompt1[] = "Data received is:";
        //    static char character;
        //    static int index;
    
        /* If this is the first time calling this task, then run through the
         * initialization procedure.
         */
        if (!uart_is_init)
        {
            /* Get default UART params */
            //        UART_Params uartParams;
            //        UART_Params_init(&uartParams);
            //
            //        /* Set a read timeout so that UART read does not block other tasks */
            //        uartParams.readTimeout  = 50000U;
            //
            //        uartParams.readMode = UART_MODE_CALLBACK;
            //        uartParams.readCallback = UARTReadCallback;
    
            //////////////////////////////////////////////////
    
            appPrint("\n Anil Uart Init");
    
    //        UART_init();
    
            //        UART_Params uartParams;
            params = user_params;
    
            UART_Params_init(&params);
    
            uart_handle = UART_open(UART_INSTANCE, &params);
    
            UART_write(uart_handle,echoPrompt,sizeof(echoPrompt));
    
            char scanPrompt[1000] = {0x00};
    
            UART_read(uart_handle,scanPrompt, sizeof(scanPrompt));/* Read API */
    
    
            //////////////////////////////////////////////////////
    
           

    Is anything wrong init. I have done the changes in the bare metal example itself. Till there code is working but UART init and UART interrupt is not working.

    Please suggest.

    Thanks,

    Anil D.

  • Hi Anil,

    When you say the bare metal example, do you mean the template app? Or the UART example project?

    Thanks,

    Max