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/66AK2H06: Rebuild SBL

Guru 15510 points
Part Number: 66AK2H06

Tool/software: TI-RTOS

Hi,

I'm using Processor SDK RTOS of K2H and trying to rebuild sbl.
But the following error occur and can't rebuild it.
********************************************************************************
C:\ti\PDK_K2~1\packages\ti\boot\sbl>gmake all BOOTMODE=spi BOARD=evmK2H SOC=K2H
gmake[1]: Entering directory `C:/ti/PDK_K2~1/packages/ti/boot/sbl'
compiling /ti/PDK_K2~1/packages/ti/boot/sbl/board/evmk2h/sbl_main.c ...
Assembler messages:
Fatal error: can't create /ti/PDK_K2~1/packages/ti/boot/sbl/binary/evmk2h/spi/ob
j/sbl_main.o: No such file or directory
gmake[1]: *** [/ti/PDK_K2~1/packages/ti/boot/sbl/binary/evmk2h/spi/obj/sbl_main.
o] Error 1
gmake[1]: Leaving directory `C:/ti/PDK_K2~1/packages/ti/boot/sbl'
gmake: *** [all] Error 2
********************************************************************************

Before rebuilding the sbl, I executed the following steps:
1. Execute setupenv.bat (included in C:\ti\processor_sdk_rtos_k2hk_4_02_00_09)
2. Execute pdksetupenv.bat (included in C:\ti\pdk_k2hk_4_0_8\packages)

Are there any missing steps?

best regards,
g.f.

  • Hi,

    I tested the following set of commands and was able to build the sbl:

    cd ~/pdk_k2hk_4_0_9/packages/
    source setupenv.sh
    make all BOOTMODE=spi BOARD=evmK2H SOC=K2H

    The resulting sbl binary was located in ~/ti/pdk_k2hk_4_0_9/packages/ti/boot/sbl/binary/evmK2H/spi/bin.

    Best Regards,
    Yordan
  • Hi Yordan,

    Thank you for the reply.

    From the error I attached above, I created "obj" folder under
    C:\ti\pdk_k2hk_4_0_8\packages\ti\boot\sbl\binary\evmK2H\spi

    Now, I'm having attached error:

    best regards,
    g.f.

  •  I forgot to attach the error message.

  • Hi,

    What happens if you rebuild the whole pdk? Do you get the sbl built correctly?

    As I said I tested and got all sbl binaries (MLO, sbl.bin & sbl.out).

    Best Regards,
    Yordan
  • Hi Yordan,

    Thank you for the reply.

    When I rebuild the pdk, I got following binary files:
    -sbl.bin
    -sbl.out

    But I didn't get MLO file.

    By the way, it seems you are testing with linux?
    But we are testing by using RTOS SDK on Windows.
    Aren't there any difference?

    best regards,
    g.f.
  • Sorry I don't have a Windows machine and cannot fully reproduce your issue.
    Things should be similar as linux though.

    What I can suggest is using only the pdksetupenv.bat (included in C:\ti\pdk_k2hk_4_0_8\packages) WITHOUT executing setupenv.bat (included in C:\ti\processor_sdk_rtos_k2hk_4_02_00_09) first.

    Best Regards,
    Yordan
  • Hi Yordan,

    Thank you for the reply.

    As you suggested, I used only the pdksetupenv.bat.
    But the result was the same. The error occured at the MLO generation part.
    Can you ask to someone who have windows machine? Because I need to fix this problem and show to our customer how to build the boot image.

    best regards,
    g.f.
  • Yes, I've notified the RTOS team, but their feedback will be slightly delayed because of different the time zones..

    Best Regards,
    Yordan
  • Hi Yordan,

    Thank you for notifying to the RTOS Team.
    I understood about the delay. I will wait for feedback from the team.

    best regards,
    g.f.
  • G.F,

    You are correct he regression nightly build for the SDKs happens on Unix machines using Yocto recipes but the system test team validates the release for building in windows especially cos majority of RTOS users prefer to use Windows build environment. If you see we provide setup and Project create script for both windows and Linux environment.

    I have tested this with Processor SDK 4.03 release which is one release after the one that you are using and don`t see this issue. I have attached my logs for your reference:

    K2HK_SBL_build.txt
    C:\ti\K2HK_PRSDK43>set SDK_INSTALL_PATH=C:\ti\K2HK_PRSDK43
    
    C:\ti\K2HK_PRSDK43>cd processor_sdk_rtos_k2hk_4_03_00_05
    
    C:\ti\K2HK_PRSDK43\processor_sdk_rtos_k2hk_4_03_00_05>setupenv.bat
    **************************************************************************
    Environment Configuration:
        LIMIT_SOCS                : k2h k2k
        LIMIT_BOARDS              : evmK2H evmK2K
        PDK_INSTALL_PATH          : /ti/K2HK_P~1/PDK_K2~1/packages
        IMGLIB_INSTALL_PATH       : C:/ti/K2HK_PRSDK43/imglib_c66x_3_1_1_0
        DSPLIB_INSTALL_PATH       : C:/ti/K2HK_PRSDK43/dsplib_c66x_3_4_0_0
        MATHLIB_INSTALL_PATH      : C:/ti/K2HK_PRSDK43/mathlib_c66x_3_1_1_0
        XDC_INSTALL_PATH          : C:/ti/K2HK_PRSDK43/xdctools_3_50_03_33_core
        IPC_PLATFORM: TCI6638
        IPC_ALT_PLATFORM: TCI6636
        PROC_SDK_INSTALL_PATH     : C:/ti/K2HK_PRSDK43/processor_sdk_rtos_k2hk_4_03_00_05
    **************************************************************************
    Changing to short name to support directory names containing spaces
    current directory: C:/ti/K2HK_PRSDK43/processor_sdk_rtos_k2hk_4_03_00_05
    PROCESSOR SDK BUILD ENVIRONMENT CONFIGURED
    **************************************************************************
    
    C:\ti\K2HK_PRSDK43\processor_sdk_rtos_k2hk_4_03_00_05>cd ..\pdk_k2hk_4_0_9\packages\ti\boot\sbl
    
    C:\ti\K2HK_PRSDK43\pdk_k2hk_4_0_9\packages\ti\boot\sbl>gmake clean BOARD=evmK2H
    gmake[1]: Entering directory `C:/ti/K2HK_PRSDK43/pdk_k2hk_4_0_9/packages/ti/boot/sbl'
    gmake[1]: Leaving directory `C:/ti/K2HK_PRSDK43/pdk_k2hk_4_0_9/packages/ti/boot/sbl'
    
    C:\ti\K2HK_PRSDK43\pdk_k2hk_4_0_9\packages\ti\boot\sbl>gmake all BOARD=evmK2H SOC=K2H BOOTMODE=spi
    gmake[1]: Entering directory `C:/ti/K2HK_PRSDK43/pdk_k2hk_4_0_9/packages/ti/boot/sbl'
    compiling /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/board/evmK2H/sbl_main.c ...
    compiling /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/src/rprc/sbl_rprc.c ...
    compiling /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/src/spi/sbl_spi.c ...
    compiling /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/soc/k2h/sbl_slave_boot.c ...
    compiling /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/soc/a15/sbl_a15.c ...
    compiling /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/soc/k2h/sbl_soc.c ...
    compiling /ti/K2HK_P~1/PDK_K2~1/packages/ti/drv/spi/soc/k2h/SPI_soc.c ...
    compiling /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/soc/k2h/sbl_init.S ...
    linking /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/obj/sbl_main.o /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/obj/sbl_rprc.o /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/obj/sbl_spi.o /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/obj/sbl_slave_boot.o /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/obj/sbl_a15.o /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/obj/sbl_soc.o /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/obj/SPI_soc.o /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/obj/sbl_init.ao into /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/bin/sbl.out ...
    "C:\ti\K2HK_PRSDK43/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-objcopy" -O binary /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/bin/sbl.out /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/bin/sbl.bin
    /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/tools/tiImageGen/bin/tiimage.exe 0x0C0B0000 SPI /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/bin/sbl.bin /ti/K2HK_P~1/PDK_K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/bin/MLO;
    
    gmake[1]: Leaving directory `C:/ti/K2HK_PRSDK43/pdk_k2hk_4_0_9/packages/ti/boot/sbl'
    
    C:\ti\K2HK_PRSDK43\pdk_k2hk_4_0_9\packages\ti\boot\sbl>

    From the second screenshot that you have provided, it appears that the build doesn`t find the MulticoreImage create utility which provide as an .exe in the build. Can you please browse to pdk_k2hk_4_0_9\packages\ti\boot\sbl\tools\multicoreImageGen\bin and check that there is an .exe file there. I suspect that at some stage you did a "make clean" in your build that seems to have removed this utility.

    Another issue is that if you run the setupenv.bat then you don`t need to re-run the pdksetupenv.bat as the first setupenv.bat file sets up the environment to build all components including PDK. 

    Regards,

    Rahul  

  • Hi Rahul,

    Thank you for the reply.

    I upgraded the SDK version to newest v4_03_00_05 now.
    And I tested rebuilding SBL as steps you attached.
    But the error occur that arm-none-eabi-gcc are not found, please take alook at attached log file.

    I checked the .exe file in "pdk_k2hk_4_0_9\packages\ti\boot\sbl\tools\multicoreImageGen\bin"
    there was the file.

    By the way, I want to test ARM single core boot on EVMK2H.
    Is following steps correct for single core boot?
    1. Generate GPIO_LED sample of SDK by using CCSv7.4 -> .out have been generated
    2. convert the above .out by out2rprc.exe as written in TI wiki
       processors.wiki.ti.com/.../L
      
       place .out file under C:\ti\pdk_k2hk_4_0_9\packages\ti\boot\sbl\tools\out2rprc\bin
       then execute .exe as follow:
       C:\ti\pdk_k2hk_4_0_9\packages\ti\boot\sbl\tools\out2rprc\bin>out2rprc <name>.out app

    3. place above app and MLO(prebuild in pdk) under C:\ti\pdk_k2hk_4_0_9\packages\ti\boot\sbl\tools\flashWriter\spi\bin\evmK2H
       (no modify against "config" file)

    4. execute spi_flashwriter.out from CCS

    5. After step4 are completed successfully, power-down the EVM and change boot dip sw setting
       from no-boot to SPI boot.

    When powering on the EVM after step5, following message have been displayed to terminal,
    and it seems that the execution are stopping at SBL.
    ///////////////////////////////////////////////////
    **** PDK SBL ****
    SBL Revision: 01.00.09.00 (May 16 2018 - 16:53:57)
    Begin parsing user application
    Invalid magic number in Single image header
    Jumping to user application...
    ///////////////////////////////////////////////////

    best regards,
    g.f.

    build_sbl_log.txt
    C:\>cd ti
    
    C:\ti>set SDK_INSTALL_PATH=C:\ti
    
    C:\ti>cd processor_sdk_rtos_k2hk_4_03_00_05
    
    C:\ti\processor_sdk_rtos_k2hk_4_03_00_05>setupenv.bat
    **************************************************************************
    Environment Configuration:
        LIMIT_SOCS                : k2h k2k
        LIMIT_BOARDS              : evmK2H evmK2K
        PDK_INSTALL_PATH          : /ti/PDK_K2~1/packages
        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
        XDC_INSTALL_PATH          : C:/ti/xdctools_3_50_03_33_core
        IPC_PLATFORM: TCI6638
        IPC_ALT_PLATFORM: TCI6636
        PROC_SDK_INSTALL_PATH     : C:/ti/processor_sdk_rtos_k2hk_4_03_00_05
    **************************************************************************
    Changing to short name to support directory names containing spaces
    current directory: C:/ti/processor_sdk_rtos_k2hk_4_03_00_05
    PROCESSOR SDK BUILD ENVIRONMENT CONFIGURED
    **************************************************************************
    
    C:\ti\processor_sdk_rtos_k2hk_4_03_00_05>cd ..\pdk_k2hk_4_0_9\packages
    
    C:\ti\pdk_k2hk_4_0_9\packages>cd ti\boot\sbl
    
    C:\ti\pdk_k2hk_4_0_9\packages\ti\boot\sbl>gmake clean BOARD=evmK2H
    gmake[1]: Entering directory `C:/ti/pdk_k2hk_4_0_9/packages/ti/boot/sbl'
    gmake[1]: Leaving directory `C:/ti/pdk_k2hk_4_0_9/packages/ti/boot/sbl'
    
    C:\ti\pdk_k2hk_4_0_9\packages\ti\boot\sbl>gmake all BOARD=evmK2H SOC=K2H BOOTMOD
    E=spi
    gmake[1]: Entering directory `C:/ti/pdk_k2hk_4_0_9/packages/ti/boot/sbl'
    compiling /ti/PDK_K2~1/packages/ti/boot/sbl/board/evmK2H/sbl_main.c ...
    compiling /ti/PDK_K2~1/packages/ti/boot/sbl/src/rprc/sbl_rprc.c ...
    compiling /ti/PDK_K2~1/packages/ti/boot/sbl/src/spi/sbl_spi.c ...
    compiling /ti/PDK_K2~1/packages/ti/boot/sbl/soc/k2h/sbl_slave_boot.c ...
    compiling /ti/PDK_K2~1/packages/ti/boot/sbl/soc/a15/sbl_a15.c ...
    compiling /ti/PDK_K2~1/packages/ti/boot/sbl/soc/k2h/sbl_soc.c ...
    compiling /ti/PDK_K2~1/packages/ti/drv/spi/soc/k2h/SPI_soc.c ...
    compiling /ti/PDK_K2~1/packages/ti/boot/sbl/soc/k2h/sbl_init.S ...
    linking /ti/PDK_K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/obj/sbl_main.o /ti/P
    DK_K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/obj/sbl_rprc.o /ti/PDK_K2~1/packa
    ges/ti/boot/sbl/binary/evmK2H/spi/obj/sbl_spi.o /ti/PDK_K2~1/packages/ti/boot/sb
    l/binary/evmK2H/spi/obj/sbl_slave_boot.o /ti/PDK_K2~1/packages/ti/boot/sbl/binar
    y/evmK2H/spi/obj/sbl_a15.o /ti/PDK_K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/o
    bj/sbl_soc.o /ti/PDK_K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/obj/SPI_soc.o /
    ti/PDK_K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/obj/sbl_init.ao into /ti/PDK_
    K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/bin/sbl.out ...
    C:ti/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-gcc: not found
    gmake[1]: *** [/ti/PDK_K2~1/packages/ti/boot/sbl/binary/evmK2H/spi/bin/sbl.out]
    Error 127
    gmake[1]: Leaving directory `C:/ti/pdk_k2hk_4_0_9/packages/ti/boot/sbl'
    gmake: *** [all] Error 2
    
    C:\ti\pdk_k2hk_4_0_9\packages\ti\boot\sbl>