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: SBL project build issues

Part Number: AM5728

Tool/software: Code Composer Studio

Hi

I try to create a ccs project for sbl on evmAM572x following http://processors.wiki.ti.com/index.php/Creating_a_CCS_Project_for_SBL_on_AM572x_GP_EVM;

all the steps has done but some errors occurs as follows:

--------------------------------console-------------------------------------------------------

Building target: "SBL_evmAM572x.out"
Invoking: GNU Linker
"C:/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc.exe" -mtune=cortex-a15 -marm -Dam5728 -Dcore0 -DAM572x_BUILD -DevmAM572x -DSOC_AM572x -DOPP_NOM -g -gdwarf-3 -gstrict-dwarf -Wall -specs="nosys.specs" -mfloat-abi=hard -Wl,-Map,"SBL_evmAM572x.map" -L"C:/ti/pdk_am57xx_1_0_11/packages/ti/board/lib/evmAM572x/a15/release" -L"C:/ti/pdk_am57xx_1_0_11/packages/ti/drv/uart/lib/a15/release" -L"C:/ti/pdk_am57xx_1_0_11/packages/ti/drv/i2c/lib/a15/release" -L"C:/ti/pdk_am57xx_1_0_11/packages/ti/drv/mmcsd/lib/a15/release" -L"C:/ti/pdk_am57xx_1_0_11/packages/ti/fs/fatfs/lib/a15/release" -L"C:/ti/pdk_am57xx_1_0_11/packages/ti/csl/lib/am572x/a15/release" -L"C:/ti/pdk_am57xx_1_0_11/packages/ti/csl/lib/am572x/a15/release" -L"C:/ti/pdk_am57xx_1_0_11/packages/ti/osal/lib/nonos/am572x/a15/release" -L"C:/ti/pdk_am57xx_1_0_11/packages/ti/drv/pm/lib/am572x/a15/release" -Wl,--defsym,CORE0=1 -Wl,--defsym,STACKSIZE=0x10000 -Wl,--defsym,HEAPSIZE=0x400 -o"SBL_evmAM572x.out" "./sbl_init.o" "./MMCSD_soc.o" "./UART_soc.o" "./sbl_avs_config.o" "./sbl_main.o" "./sbl_mmcsd.o" "./sbl_prcm.o" "./sbl_rprc.o" "./sbl_slave_core_boot.o" "./sbl_startup.o" -Wl,--start-group -l:ti.board.aa15fg -l:ti.drv.uart.aa15fg -l:ti.drv.i2c.aa15fg -l:ti.drv.mmcsd.aa15fg -l:ti.fs.fatfs.aa15fg -l:ti.csl.aa15fg -l:ti.csl.init.aa15fg -l:ti.osal.aa15fg -l:pm_hal.aa15fg -Wl,--end-group
makefile:159: recipe for target 'SBL_evmAM572x.out' failed
./sbl_init.o: In function `Loop':
E:\workspace_v8\SBL_evmAM572x\Debug/../sbl_init.S:150: undefined reference to `_bss_start'
E:\workspace_v8\SBL_evmAM572x\Debug/../sbl_init.S:151: undefined reference to `_bss_end'
C:/ti/pdk_am57xx_1_0_11/packages/ti/board/lib/evmAM572x/a15/release/ti.board.aa15fg(I2C_soc.oa15fg): In function `I2C_socInitFwCfg':
C:\ti/pdk_am57xx_1_0_11/packages/ti/drv/i2c/soc/am572x/I2C_soc.c:366: undefined reference to `I2C_v2_FxnTable'
C:\ti/pdk_am57xx_1_0_11/packages/ti/drv/i2c/soc/am572x/I2C_soc.c:366: undefined reference to `I2C_v2_FxnTable'
C:/ti/pdk_am57xx_1_0_11/packages/ti/board/lib/evmAM572x/a15/release/ti.board.aa15fg(I2C_soc.oa15fg):C:\ti/pdk_am57xx_1_0_11/packages/ti/drv/i2c/soc/am572x/I2C_soc.c:146: undefined reference to `pru_dmem0_rev2_start'
C:/ti/pdk_am57xx_1_0_11/packages/ti/board/lib/evmAM572x/a15/release/ti.board.aa15fg(I2C_soc.oa15fg):(.rodata.i2cFwMemPtr+0x4): undefined reference to `pru_imem0_rev2_start'
C:/ti/pdk_am57xx_1_0_11/packages/ti/board/lib/evmAM572x/a15/release/ti.board.aa15fg(I2C_soc.oa15fg):(.rodata.i2cFwMemPtr+0x8): undefined reference to `pru_dmem0_rev2_end'
C:/ti/pdk_am57xx_1_0_11/packages/ti/board/lib/evmAM572x/a15/release/ti.board.aa15fg(I2C_soc.oa15fg):(.rodata.i2cFwMemPtr+0xc): undefined reference to `pru_imem0_rev2_end'
C:/ti/pdk_am57xx_1_0_11/packages/ti/board/lib/evmAM572x/a15/release/ti.board.aa15fg(I2C_soc.oa15fg):(.rodata.i2cFwMemPtr+0x10): undefined reference to `pru_dmem1_rev2_start'
C:/ti/pdk_am57xx_1_0_11/packages/ti/board/lib/evmAM572x/a15/release/ti.board.aa15fg(I2C_soc.oa15fg):(.rodata.i2cFwMemPtr+0x14): undefined reference to `pru_imem1_rev2_start'
C:/ti/pdk_am57xx_1_0_11/packages/ti/board/lib/evmAM572x/a15/release/ti.board.aa15fg(I2C_soc.oa15fg):(.rodata.i2cFwMemPtr+0x18): undefined reference to `pru_dmem1_rev2_end'
C:/ti/pdk_am57xx_1_0_11/packages/ti/board/lib/evmAM572x/a15/release/ti.board.aa15fg(I2C_soc.oa15fg):(.rodata.i2cFwMemPtr+0x1c): undefined reference to `pru_imem1_rev2_end'
collect2.exe: error: ld returned 1 exit status
gmake[1]: *** [SBL_evmAM572x.out] Error 1
gmake: *** [all] Error 2
makefile:155: recipe for target 'all' failed

**** Build Finished ****

--------------------------

Could you help me checking my SBL_evmAM572x project ? 

It will be perfect if the ccs project in http://processors.wiki.ti.com/index.php/Creating_a_CCS_Project_for_SBL_on_AM572x_GP_EVM is offered.

SBL_evmAM572x.zip

  • The RTOS team have been notified. They will respond here.
  • Shreek,

    the wiki article was created with a specific version of the Processor SDK RTOS as a proof of concept that the makefile based build can be converted to CCS project if required and so as indicated there will be changes required when there are new updates or dependencies introduced in the SBL in the baseline SDK.  Is there some reason building the SBL using makefile doesn`t work for you ?

    From your log, it appears that your are linking to incorrect version of the libraries. You need to link in the am57xx A15 version of the drivers and you are linking to generic A15 libraries which will result in this error. Check the makefile for the SBL

    BOARD_LIB = "$(PDK_INSTALL_PATH)/ti/board/lib/$(BOARD)/a15/release/ti.board.aa15fg"

    UART_LIB = "$(PDK_INSTALL_PATH)/ti/drv/uart/lib/am572x/a15/release/ti.drv.uart.aa15fg"

    I2C_LIB = "$(PDK_INSTALL_PATH)/ti/drv/i2c/lib/am572x/a15/release/ti.drv.i2c.aa15fg"

    MMCSD_LIB = "$(PDK_INSTALL_PATH)/ti/drv/mmcsd/lib/am572x/a15/release/ti.drv.mmcsd.aa15fg"

    FATFS_LIB = "$(PDK_INSTALL_PATH)/ti/fs/fatfs/lib/a15/release/ti.fs.fatfs.aa15fg"

    CSL_LIB = "$(PDK_INSTALL_PATH)/ti/csl/lib/am572x/a15/release/ti.csl.aa15fg"

    CSL_INIT_LIB = "$(PDK_INSTALL_PATH)/ti/csl/lib/am572x/a15/release/ti.csl.init.aa15fg"

    OSAL_LIB = "$(PDK_INSTALL_PATH)/ti/osal/lib/nonos/am572x/a15/release/ti.osal.aa15fg"

    PM_HAL_LIB = "$(PDK_INSTALL_PATH)/ti/drv/pm/lib/am572x/a15/release/pm_hal.aa15fg"

    Please note that the step to configure the entry point and convert into boot format is critical to boot the binary so ensure that you configure that correct and you link the linker command file at 

    pdk_am57xx_1_0_10\packages\ti\boot\sbl\board\evmAM572x\build

    I recommend that you build the SBL using makefile and copy the dump into an text editor and compare it to the build log in CCS to make sure that things line up correctly.

    Regards,

    Rahul

  • Thank you very much: )
    I link to the am57xx A15 version of the drivers and there are still some errors:

    .........................................console----------------------------------------------------------------------
    Building target: "SBL_evmAM572x.out"
    Invoking: GNU Linker
    "C:/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc.exe" -mtune=cortex-a15 -marm -Dam5728 -Dcore0 -DAM572x_BUILD -DevmAM572x -DSOC_AM572x -DOPP_NOM -g -gdwarf-3 -gstrict-dwarf -Wall -specs="nosys.specs" -mfloat-abi=hard -Wl,-Map,"SBL_evmAM572x.map" -L"C:/ti/pdk_am57xx_1_0_11/packages/ti/board/lib/evmAM572x/a15/release" -L"C:/ti/pdk_am57xx_1_0_11/packages/ti/drv/uart/lib/am572x/a15/release" -L"C:/ti/pdk_am57xx_1_0_11/packages/ti/drv/i2c/lib/am572x/a15/release" -L"C:/ti/pdk_am57xx_1_0_11/packages/ti/drv/mmcsd/lib/am572x/a15/release" -L"C:/ti/pdk_am57xx_1_0_11/packages/ti/fs/fatfs/lib/a15/release" -L"C:/ti/pdk_am57xx_1_0_11/packages/ti/csl/lib/am572x/a15/release" -L"C:/ti/pdk_am57xx_1_0_11/packages/ti/csl/lib/am572x/a15/release" -L"C:/ti/pdk_am57xx_1_0_11/packages/ti/osal/lib/nonos/am572x/a15/release" -L"C:/ti/pdk_am57xx_1_0_11/packages/ti/drv/pm/lib/am572x/a15/release" -Wl,--defsym,CORE0=1 -Wl,--defsym,STACKSIZE=0x10000 -Wl,--defsym,HEAPSIZE=0x400 -o"SBL_evmAM572x.out" "./sbl_init.o" "./MMCSD_soc.o" "./UART_soc.o" "./sbl_avs_config.o" "./sbl_main.o" "./sbl_mmcsd.o" "./sbl_prcm.o" "./sbl_rprc.o" "./sbl_slave_core_boot.o" "./sbl_startup.o" -Wl,--start-group -l:ti.board.aa15fg -l:ti.drv.uart.aa15fg -l:ti.drv.i2c.aa15fg -l:ti.drv.mmcsd.aa15fg -l:ti.fs.fatfs.aa15fg -l:ti.csl.aa15fg -l:ti.csl.init.aa15fg -l:ti.osal.aa15fg -l:pm_hal.aa15fg -Wl,--end-group
    makefile:159: recipe for target 'SBL_evmAM572x.out' failed
    ./sbl_init.o: In function `Loop':
    E:\workspace_v8\SBL_evmAM572x\Debug/../sbl_init.S:150: undefined reference to `_bss_start'
    E:\workspace_v8\SBL_evmAM572x\Debug/../sbl_init.S:151: undefined reference to `_bss_end'
    C:/ti/pdk_am57xx_1_0_11/packages/ti/board/lib/evmAM572x/a15/release/ti.board.aa15fg(I2C_soc.oa15fg):C:\ti/pdk_am57xx_1_0_11/packages/ti/drv/i2c/soc/am572x/I2C_soc.c:146: undefined reference to `pru_dmem0_rev2_start'
    C:/ti/pdk_am57xx_1_0_11/packages/ti/board/lib/evmAM572x/a15/release/ti.board.aa15fg(I2C_soc.oa15fg):(.rodata.i2cFwMemPtr+0x4): undefined reference to `pru_imem0_rev2_start'
    C:/ti/pdk_am57xx_1_0_11/packages/ti/board/lib/evmAM572x/a15/release/ti.board.aa15fg(I2C_soc.oa15fg):(.rodata.i2cFwMemPtr+0x8): undefined reference to `pru_dmem0_rev2_end'
    C:/ti/pdk_am57xx_1_0_11/packages/ti/board/lib/evmAM572x/a15/release/ti.board.aa15fg(I2C_soc.oa15fg):(.rodata.i2cFwMemPtr+0xc): undefined reference to `pru_imem0_rev2_end'
    C:/ti/pdk_am57xx_1_0_11/packages/ti/board/lib/evmAM572x/a15/release/ti.board.aa15fg(I2C_soc.oa15fg):(.rodata.i2cFwMemPtr+0x10): undefined reference to `pru_dmem1_rev2_start'
    C:/ti/pdk_am57xx_1_0_11/packages/ti/board/lib/evmAM572x/a15/release/ti.board.aa15fg(I2C_soc.oa15fg):(.rodata.i2cFwMemPtr+0x14): undefined reference to `pru_imem1_rev2_start'
    C:/ti/pdk_am57xx_1_0_11/packages/ti/board/lib/evmAM572x/a15/release/ti.board.aa15fg(I2C_soc.oa15fg):(.rodata.i2cFwMemPtr+0x18): undefined reference to `pru_dmem1_rev2_end'
    C:/ti/pdk_am57xx_1_0_11/packages/ti/board/lib/evmAM572x/a15/release/ti.board.aa15fg(I2C_soc.oa15fg):(.rodata.i2cFwMemPtr+0x1c): undefined reference to `pru_imem1_rev2_end'
    C:/ti/pdk_am57xx_1_0_11/packages/ti/drv/i2c/lib/am572x/a15/release/ti.drv.i2c.aa15fg(I2C_v2.oa15fg): In function `I2C_close_v2':
    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\i2c/src/v2/I2C_v2.c:832: undefined reference to `PRUICSS_pruDisable'
    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\i2c/src/v2/I2C_v2.c:833: undefined reference to `PRUICSS_pruReset'
    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\i2c/src/v2/I2C_v2.c:837: undefined reference to `PRUICSS_pruInitMemory'
    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\i2c/src/v2/I2C_v2.c:838: undefined reference to `PRUICSS_pruInitMemory'
    C:/ti/pdk_am57xx_1_0_11/packages/ti/drv/i2c/lib/am572x/a15/release/ti.drv.i2c.aa15fg(I2C_v2.oa15fg): In function `I2C_v2_pruIcssInit':
    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\i2c/src/v2/I2C_v2.c:667: undefined reference to `PRUICSS_socGetInitCfg'
    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\i2c/src/v2/I2C_v2.c:674: undefined reference to `PRUICSS_create'
    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\i2c/src/v2/I2C_v2.c:678: undefined reference to `PRUICSS_pinMuxConfig'
    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\i2c/src/v2/I2C_v2.c:680: undefined reference to `PRUICSS_pruDisable'
    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\i2c/src/v2/I2C_v2.c:682: undefined reference to `PRUICSS_pruIntcInit'
    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\i2c/src/v2/I2C_v2.c:684: undefined reference to `PRUICSS_pruReset'
    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\i2c/src/v2/I2C_v2.c:686: undefined reference to `PRUICSS_pruInitMemory'
    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\i2c/src/v2/I2C_v2.c:687: undefined reference to `PRUICSS_pruInitMemory'
    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\i2c/src/v2/I2C_v2.c:714: undefined reference to `PRUICSS_getICSSVersion'
    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\i2c/src/v2/I2C_v2.c:715: undefined reference to `PRUICSS_getICSSVersion'
    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\i2c/src/v2/I2C_v2.c:776: undefined reference to `PRUICSS_pruEnable'
    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\i2c/src/v2/I2C_v2.c:691: undefined reference to `PRUICSS_pruWriteMemory'
    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\i2c/src/v2/I2C_v2.c:695: undefined reference to `PRUICSS_pruWriteMemory'
    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\i2c/src/v2/I2C_v2.c:701: undefined reference to `PRUICSS_pruWriteMemory'
    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\i2c/src/v2/I2C_v2.c:705: undefined reference to `PRUICSS_pruWriteMemory'
    collect2.exe: error: ld returned 1 exit status
    gmake[1]: *** [SBL_evmAM572x.out] Error 1
    gmake: *** [all] Error 2
    makefile:155: recipe for target 'all' failed
    **** Build Finished ****




    Maybe I should follow you advice to compile the SBL using makefile. Could you give me some instructions? I haven't found any links on rtos guide wiki.Thank you: )
  • Shreek,

    The instructions to build the SBL for AM57x is provided here:

    I built the SBL for SD MMC for this platform and captured the log here. I had to add an echo command to show all the command line flags:

    C:/ti/AM57x_PRSDK43/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-gcc /ti/AM57X_~1/PDK_AM~1/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/obj/sbl_main.o /ti/AM57X_~1/PDK_AM~1/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/obj/sbl_rprc.o /ti/AM57X_~1/PDK_AM~1/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/obj/sbl_prcm.o /ti/AM57X_~1/PDK_AM~1/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/obj/sbl_slave_core_boot.o /ti/AM57X_~1/PDK_AM~1/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/obj/sbl_startup.o /ti/AM57X_~1/PDK_AM~1/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/obj/sbl_avs_config.o /ti/AM57X_~1/PDK_AM~1/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/obj/sbl_mmcsd.o /ti/AM57X_~1/PDK_AM~1/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/obj/UART_soc.o /ti/AM57X_~1/PDK_AM~1/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/obj/MMCSD_soc.o /ti/AM57X_~1/PDK_AM~1/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/obj/sbl_init.ao -mfloat-abi=hard --specs=nano.specs -Wl,--undefined,__aeabi_uidiv -Wl,--undefined,__aeabi_idiv --entry Entry -nostartfiles -static -Wl,--gc-sections -Wl,-T /ti/AM57X_~1/PDK_AM~1/packages/ti/boot/sbl/board/evmAM572x/build/linker.cmd -Wl,--start-group -lgcc -lc -lrdimon /ti/AM57X_~1/PDK_AM~1/packages/ti/board/lib/evmAM572x/a15/release/ti.board.aa15fg /ti/AM57X_~1/PDK_AM~1/packages/ti/drv/uart/lib/am572x/a15/release/ti.drv.uart.aa15fg /ti/AM57X_~1/PDK_AM~1/packages/ti/drv/i2c/lib/am572x/a15/release/ti.drv.i2c.aa15fg /ti/AM57X_~1/PDK_AM~1/packages/ti/drv/mmcsd/lib/am572x/a15/release/ti.drv.mmcsd.aa15fg /ti/AM57X_~1/PDK_AM~1/packages/ti/fs/fatfs/lib/a15/release/ti.fs.fatfs.aa15fg /ti/AM57X_~1/PDK_AM~1/packages/ti/csl/lib/am572x/a15/release/ti.csl.aa15fg /ti/AM57X_~1/PDK_AM~1/packages/ti/csl/lib/am572x/a15/release/ti.csl.init.aa15fg /ti/AM57X_~1/PDK_AM~1/packages/ti/osal/lib/nonos/am572x/a15/release/ti.osal.aa15fg /ti/AM57X_~1/PDK_AM~1/packages/ti/drv/pm/lib/am572x/a15/release/pm_hal.aa15fg -Wl,--end-group -Wl,-Map=/ti/AM57X_~1/PDK_AM~1/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/bin/sbl.map -o /ti/AM57X_~1/PDK_AM~1/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/bin/sbl.out

    C:/ti/AM57x_PRSDK43/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-objcopy -O binary /ti/AM57X_~1/PDK_AM~1/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/bin/sbl.out \

                   /ti/AM57X_~1/PDK_AM~1/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/bin/sbl.bin

    /ti/AM57X_~1/PDK_AM~1/packages/ti/boot/sbl/tools/tiImageGen/bin/tiimage.exe 0x40331000 mmcsd \

                   /ti/AM57X_~1/PDK_AM~1/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/bin/sbl.bin /ti/AM57X_~1/PDK_AM~1/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/bin/MLO;

    The highlighted flags is what you need to reproduce in your project. I think the -gc-section flag is critical as that eliminates unused functions and sections from libraries that are not used.

    The I2C driver added a SW I2C implementation using PRU_ICSS_FW. Other way to solve this would be to rebuild I2C driver without PRU_ICSS_FW defined.

    Regards,

    Rahul