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/AM5716: It is not possible for me to build the SBL example projects.

Part Number: AM5716


Tool/software: TI-RTOS

I'd like to build SBL for AM5716, SDK RTOS v3.03.00.04, PDK v1.0.6, on Windows.
It is not possible for me to build the SBL example projects.

=> c:\ti\pdk_am57xx_1_0_6\packages>pdksetupenv

Optional parameter not configured : CG_XML_BIN_INSTALL_PATH
REQUIRED for xdc release build
Example: set CG_XML_BIN_INSTALL_PATH=C:/ti/cg_xml/bin
Optional parameter not configured : DOXYGEN_INSTALL_PATH
REQUIRED for xdc release build
Example: set DOXYGEN_INSTALL_PATH=C:/ti/Doxygen/doxygen/1.5.1-p1/bin
**************************************************************************
Environment Configuration:
    LIMIT_SOCS                : am571x am572x
    LIMIT_BOARDS              : evmAM572x idkAM571x idkAM572x
    PDK_INSTALL_PATH          : /ti/pdk_am57xx_1_0_6/packages
    C6X_GEN_INSTALL_PATH      : C:/ti/ti-cgt-c6000_8.1.3
    TOOLCHAIN_PATH_A15        : C:/ti/gcc-arm-none-eabi-4_9-2015q3
    TOOLCHAIN_PATH_A8         : C:/ti/gcc-arm-none-eabi-4_9-2015q3
    TOOLCHAIN_PATH_A9         : C:/ti/gcc-arm-none-eabi-4_9-2015q3
    TOOLCHAIN_PATH_M4         : C:/ti/ti-cgt-arm_16.9.1.LTS
    TOOLCHAIN_PATH_Arm9       : C:/ti/ti-cgt-arm_16.9.1.LTS
    TOOLCHAIN_PATH_EVE        : C:/ti/ccsv7/tools/compiler/arp32_1.0.8
    CL_PRU_INSTALL_PATH       : C:/ti/ti-cgt-pru_2.1.4
    UTILS_INSTALL_DIR         : C:/ti/xdctools_3_32_01_22_core/bin
    FPULIB_PATH               : C:/ti/gcc-arm-none-eabi-4_9-2015q3/lib/gcc/arm-none-eabi/4.9.3/fpu
    CROSS_TOOL_PRFX           : arm-none-eabi-
    XDC_INSTALL_PATH          : C:/ti/xdctools_3_32_01_22_core
    BIOS_INSTALL_PATH         : C:/ti/bios_6_46_04_53
    IPC_INSTALL_PATH          : C:/ti/ipc_3_44_01_01
    EDMA3LLD_BIOS6_INSTALLDIR : C:/ti/edma3_lld_2_12_03_27
    NDK_INSTALL_PATH          : C:/ti/ndk_2_25_01_11
    IMGLIB_INSTALL_PATH       : C:/ti/imglib_c66x_3_1_1_0
    DSPLIB_INSTALL_PATH       : C:/ti/dsplib_c66x_3_4_0_0
    MATHLIB_INSTALL_PATH      : C:/ti/mathlib_c66x_3_1_1_0
    UIA_INSTALL_PATH          : C:/ti/uia_2_00_06_52
**************************************************************************
Changing to short name to support directory names containing spaces
current directory: /ti/pdk_am57xx_1_0_6/packages
PDK BUILD ENVIRONMENT CONFIGURED
**************************************************************************

=> c:\ti\pdk_am57xx_1_0_6\packages>gmake sbl (works fine, without errors or warnings)

=> c:\ti\pdk_am57xx_1_0_6\packages\ti\boot\sbl>gmake example BOARD=idkAM571x SOC=AM571x

sbl_multicore_mpu.c:96:13: error 'mpu1Flag' undeclared (first use in this function) mpu1Flag = 1;

The problem was solved, but another errors occur, i.e.

=> c:\ti\pdk_am57xx_1_0_6\packages\ti\boot\sbl>gmake example BOARD=idkAM571x SOC=AM571x

gmake[1]: Entering directory `c:/ti/pdk_am57xx_1_0_6/packages/ti/boot/sbl'
compiling /ti/pdk_am57xx_1_0_6/packages/ti/boot/sbl/example/mpuMulticoreApp/sbl_multicore_mpu.c ...
compiling /ti/pdk_am57xx_1_0_6/packages/ti/boot/sbl/soc/am57xx/mailbox.c ...
compiling /ti/pdk_am57xx_1_0_6/packages/ti/boot/sbl/board/sbl_common_osal.c ...
compiling /ti/pdk_am57xx_1_0_6/packages/ti/boot/sbl/soc/am57xx/sbl_startup.c ...
compiling /ti/pdk_am57xx_1_0_6/packages/ti/drv/uart/soc/am572x/UART_soc.c ...
compiling /ti/pdk_am57xx_1_0_6/packages/ti/boot/sbl/soc/am57xx/sbl_init.S ...
linking /ti/pdk_am57xx_1_0_6/packages/ti/boot/sbl/binary/idkAM571x/example/a15/mpuc0/obj/sbl_multicore_mpu.o /ti/pdk_am57xx_1_0_6/packages/ti/boot/sbl/binary/idkAM571x/example/a15/mpuc0/obj/mailbox.o
/ti/pdk_am57xx_1_0_6/packages/ti/boot/sbl/binary/idkAM571x/example/a15/mpuc0/obj/sbl_common_osal.o /ti/pdk_am57xx_1_0_6/packages/ti/boot/sbl/binary/idkAM571x/example/a15/mpuc0/obj/sbl_startup.o /ti/pd
k_am57xx_1_0_6/packages/ti/boot/sbl/binary/idkAM571x/example/a15/mpuc0/obj/UART_soc.o into /ti/pdk_am57xx_1_0_6/packages/ti/boot/sbl/binary/idkAM571x/example/a15/mpuc0/bin/sbl_app.out ...
/ti/pdk_am57xx_1_0_6/packages/ti/boot/sbl/binary/idkAM571x/example/a15/mpuc0/obj/sbl_startup.o: In function `SBL_startBoot':
/ti/pdk_am57xx_1_0_6/packages/ti/boot/sbl/soc/am57xx/sbl_startup.c:134: undefined reference to `CSL_A15_INIT_copyVectorTable'
/ti/pdk_am57xx_1_0_6/packages/ti/boot/sbl/soc/am57xx/sbl_startup.c:147: undefined reference to `CSL_A15_INIT_startup2'
/ti/pdk_am57xx_1_0_6/packages/ti/drv/uart/lib/a15/release/ti.drv.uart.aa15fg(UART_v1.oa15fg): In function `UART_open_v1':
c:\ti\pdk_am57xx_1_0_6\packages\ti\drv\uart/src/v1/UART_v1.c:757: undefined reference to `Osal_RegisterInterrupt_initParams'
c:\ti\pdk_am57xx_1_0_6\packages\ti\drv\uart/src/v1/UART_v1.c:768: undefined reference to `Osal_RegisterInterrupt'
/ti/pdk_am57xx_1_0_6/packages/ti/drv/uart/lib/a15/release/ti.drv.uart.aa15fg(UART_v1.oa15fg): In function `UART_close_v1':
c:\ti\pdk_am57xx_1_0_6\packages\ti\drv\uart/src/v1/UART_v1.c:906: undefined reference to `Osal_DeleteInterrupt'
/ti/pdk_am57xx_1_0_6/packages/ti/drv/i2c/lib/a15/release/ti.drv.i2c.aa15fg(I2C_v1.oa15fg): In function `I2C_close_v1':
c:\ti\pdk_am57xx_1_0_6\packages\ti\drv\i2c/src/v1/I2C_v1.c:131: undefined reference to `Osal_DeleteInterrupt'
/ti/pdk_am57xx_1_0_6/packages/ti/drv/i2c/lib/a15/release/ti.drv.i2c.aa15fg(I2C_v1.oa15fg): In function `I2C_open_v1':
c:\ti\pdk_am57xx_1_0_6\packages\ti\drv\i2c/src/v1/I2C_v1.c:698: undefined reference to `Osal_RegisterInterrupt_initParams'
c:\ti\pdk_am57xx_1_0_6\packages\ti\drv\i2c/src/v1/I2C_v1.c:708: undefined reference to `Osal_RegisterInterrupt'
/ti/pdk_am57xx_1_0_6/packages/ti/drv/i2c/lib/a15/release/ti.drv.i2c.aa15fg(I2C_v1.oa15fg): In function `I2C_transfer_v1':
c:\ti\pdk_am57xx_1_0_6\packages\ti\drv\i2c/src/v1/I2C_v1.c:1252: undefined reference to `Osal_DisableInterrupt'
c:\ti\pdk_am57xx_1_0_6\packages\ti\drv\i2c/src/v1/I2C_v1.c:1259: undefined reference to `Osal_EnableInterrupt'
collect2.exe: error: ld returned 1 exit status
gmake[1]: *** [/ti/pdk_am57xx_1_0_6/packages/ti/boot/sbl/binary/idkAM571x/example/a15/mpuc0/bin/sbl_app.out] Error 1
gmake[1]: Leaving directory `c:/ti/pdk_am57xx_1_0_6/packages/ti/boot/sbl'
gmake: *** [example] Error 2

Could you give me some advice?

Regards,
Christian

  • Hi,

    I've notified the RTOS team. Feedback will be posted here.

    Best Regards,
    Yordan
  • Christian,

    This is a known issue that has been reported to the development team. The issue will be resolved in the Processor SDK 4.01. The issue was missed as the SBL examples are not built from the top level PDK makefile.

    I have posted the fix  here that you you can try :

    For mpu1 flag issue, use the updated sbl_multicore_mpu.c

    for the CSL and OSAL errors, use the updated makefile that builds the example.

    /*
     * Copyright (c) 2015, Texas Instruments Incorporated
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     * *  Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     * *  Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     *
     * *  Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */
    
    #include <ti/csl/cslr_device.h>
    #include <ti/drv/uart/UART_stdio.h>
    #include <stdlib.h>
    #include <ti/board/board.h>
    
    #include "mailbox.h"
    
    #define MPU_MBX_MAGIC_STR  0xFF33BB00
    
    int main()
    {
        Board_initCfg boardCfg;
        uint32_t msg = 0U;
        uint32_t dsp1Flag = 0U;
        uint32_t ipu1Cpu0 = 0U;
        #if defined (AM572x_BUILD)
        uint32_t mpu1Flag = 0U;
        uint32_t dsp2Flag = 0U;
        uint32_t ipu2Cpu0 = 0U;
        #endif
    
        boardCfg = BOARD_INIT_UART_STDIO;
    
        /* Board Library Init. */
        Board_init(boardCfg);
    
        UART_printf("Multicore Boot Test application \n");
    
        /* Send message to A15 CORE1(MBX2_Q10) */
        while (MESSAGE_INVALID ==
               MailboxSendMessage(CSL_MPU_MAILBOX2_REGS, MAILBOX_QUEUE_10,
                                  MPU_MBX_MAGIC_STR)) ;
    
        /* Send message to DSP1(MBX2_Q4) */
        while (MESSAGE_INVALID ==
               MailboxSendMessage(CSL_MPU_MAILBOX2_REGS, MAILBOX_QUEUE_4,
                                  MPU_MBX_MAGIC_STR)) ;
    
        #if defined (AM572x_BUILD)
        /* Send message to DSP2(MBX2_Q5) */
        while (MESSAGE_INVALID ==
               MailboxSendMessage(CSL_MPU_MAILBOX2_REGS, MAILBOX_QUEUE_5,
                                  MPU_MBX_MAGIC_STR)) ;
        #endif
    
        /* Send message to IPU1_CPU0(MBX2_Q0) */
        while (MESSAGE_INVALID ==
               MailboxSendMessage(CSL_MPU_MAILBOX2_REGS, MAILBOX_QUEUE_0,
                                  MPU_MBX_MAGIC_STR)) ;
    
        #if defined (AM572x_BUILD)
        /* Send message to IPU2_CPU0(MBX2_Q0) */
        while (MESSAGE_INVALID ==
               MailboxSendMessage(CSL_MPU_MAILBOX2_REGS, MAILBOX_QUEUE_2,
                                  MPU_MBX_MAGIC_STR)) ;
        #endif
    
        while(1)
        {
    		#if defined (AM572x_BUILD)
            if ( !ipu1Cpu0 && MESSAGE_INVALID !=
                MailboxGetMessage(CSL_MPU_MAILBOX2_REGS, MAILBOX_QUEUE_11, &msg))
            {
                UART_printf("\n MPU Core-1 boot-up Successful \n");
                mpu1Flag = 1;
            }
    		#endif
    
            /* Read message from DSP1 */
            if (!dsp1Flag && MESSAGE_INVALID !=
                MailboxGetMessage(CSL_MPU_MAILBOX7_REGS, MAILBOX_QUEUE_0, &msg))
            {
                UART_printf("\n DSP1 boot-up Successful \n");
                dsp1Flag = 1;
            }
    
            #if defined (AM572x_BUILD)
            /* Read message from DSP2 */
            if (!dsp2Flag && MESSAGE_INVALID !=
                MailboxGetMessage(CSL_MPU_MAILBOX8_REGS, MAILBOX_QUEUE_0, &msg))
            {
                UART_printf("\n DSP2 boot-up Successful \n");
                dsp2Flag = 1;
            }
            #endif
    
            if ( !ipu1Cpu0 && MESSAGE_INVALID !=
                MailboxGetMessage(CSL_MPU_MAILBOX3_REGS, MAILBOX_QUEUE_0, &msg))
            {
                UART_printf("\n IPU1 CPU0 boot-up Successful \n");
                ipu1Cpu0 = 1;
            }
    
            #if defined (AM572x_BUILD)
            if (!ipu2Cpu0 && MESSAGE_INVALID !=
               MailboxGetMessage(CSL_MPU_MAILBOX5_REGS, MAILBOX_QUEUE_0, &msg))
            {
                UART_printf("\n IPU2 CPU0 boot-up Successful \n");
                ipu2Cpu0 = 1;
            }
            #endif
        }
    }

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/20413.makefile

    Hope this resolves your issue.

    Regards,

    Rahul