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/AM5728: SD card bootloader fails

Part Number: AM5728

Tool/software: TI-RTOS

Hi TI Experts,

I need to run RTOS on AM5728. So I downloaded PROCESSOR-SDK-RTOS-AM57X from TI website. 

I would like to try the prebuilt sd-card images. So I burn the image from “TI\processor_sdk_rtos_am57xx_4_03_00_05\prebuilt-sdcards\evmAM572x\sd_card_img” folder into a 4GB TF card.

My EVM is JN-mini5728 from a 3rd party(http://www.jiang-niu.com/product-detail.html?id=2) and the Linux image works fine and boots from SD card as well as from eMMC. 

I flash the linux image into eMMC and set the boot mode DIP switch to SD-eMMC-USB, so the RBL will check if it can boot from SD card first. After inserting the TF card and power up the board, I notice that the UART console(UART3) didn't output any message. But by removing the TF card, the UART console outputs the messages from the eMMC linux boot. So I guess that the RBL successfully detected a boot media on the SD card, only the SPL(MLO) on the SD card stuck somewhere.

So I checked the hardware, notice that the JN-mini5728 is different from evmAM572x, although they both use UART3 as console.

  

So, I guess I need to change the PinMux settings. I opened this folder "TI\pdk_am57xx_1_0_10\packages\ti\board\src\evmAM572x" and uses Pinmux tool to make modification to evmAM572x_SR2.0.pinmux, by changing the UART3 TX and RX pin to Y1 and V2. Then I used the Pinmux tool output files to replace the ones in "TI\pdk_am57xx_1_0_10\packages\ti\board\src\evmAM572x".

After that, I went to "TI\pdk_am57xx_1_0_10\packages" directory and run “gmake sbl_clean” and "gmake sbl" to rebuild the board libraries needed for SBL project.

I followed the Processor SDK RTOS Getting Started Guide to creat a CCS  SBL pjoject. 

After successfully building the CCS project, I get an JNmini5728.out file. and I loaded it to the SoC using JTAG emulator, I can get it running correctly(seems to be correct), and get messages from the UART3.

Then I followed the SDK RTOS guide to create a MLO from JNmini5728.out.

1. go to "TI\pdk_am57xx_1_0_10\packages\ti\boot\sbl\tools\out2rprc\bin" directory in windows command console, and run "out2rprc.exe JN5728_SBL.out JN5728_SBL"

2. copy the rprc file JN5728_SBL to "TI\pdk_am57xx_1_0_10\packages\ti\boot\sbl\tools\tiImageGen\bin" and run"tiimage.exe 0x40331000 none JN5728_SBL MLO" in this directory.

3. copy the MLO to TF card and replace the one from TI pre-built image

4. plug the TF card to JNmini5728 and power on

But from the UART console, still there is no messages, it got stuck on the modified MLO again. 

I am confused, I expect the MLO to run and output message to UART console, I think it should work as the .out image runs using a JTAG emulator.

Is there some steps wrong or missing?

Thanks in advance.

Processor SDK RTOS Getting Started Guide

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

    Creation of CCS project for SBL is not natively supported in the Processor SDK RTOS baseline. the instructions on ther user guide were created based on questions that we had got from users for need to support CCS project based build for the SBL. These instructions were created with an older Processor SDK RTOS release and may need some changes based on latest releases.

    Given that the SBL binary loads and runs over emulator but not using SD boot makes me suspect that you are not putting the entry point for the SBL in the correct location. For the binary to boot the entry point of the .out should match the load address used with tiimage.exe. Can you provide the map file for the SBL that you are building.

    Please look at the discussion here where the user ran into similar issue:
    e2e.ti.com/.../2336830

    Pay close attention to the link step to configure the entry point and the entry symbol and also use the linker command file provided in the SBL package and not the generic one that comes as part of CCS installation. processors.wiki.ti.com/.../Creating_a_CCS_Project_for_SBL_on_AM572x_GP_EVM

    IF you have SBL built using gmake then you can compare the map file with the one built using CCS to check the configuration of the SBL entry point.

    Regards,
    Rahul
  • Hi Rahul,

    Thanks for your quick response.

    I checked the load address, and it seems to be right.

    In the .map file, it is 0x40331000.

     
    START GROUP
    .startcode      0x40331000        0x0
                    0x40331000                . = ALIGN (0x4)
     *(.public.*)
     *sbl_init.ao(.text)
    .text           0x40331000    0x18508
                    0x40331000                . = ALIGN (0x4)
     *(.text*)
     .text          0x40331000       0xb4 ./sbl_init.o
                    0x40331000                Entry
     .text          0x403310b4      0x528 ./MMCSD_soc.o
                    0x40331184                MMCSD_soc_l2_global_addr
                    0x403311c8                MMCSD_inputClockControl
     .text          0x403315dc      0x700 ./sbl_avs_config.o
                    0x40331678                SBL_Configure_AVS
     .text          0x40331cdc      0x210 ./sbl_main.o
                    0x40331cdc                main
     .text          0x40331eec      0x250 ./sbl_mmcsd.o
                    0x40331eec                SBL_MMCBootImage
                    0x40331fe8                SBL_FileRead
                    0x403320fc                SBL_FileSeek
     .text          0x4033213c      0x44c ./sbl_prcm.o

    I'm trying to use gmake to compile the sbl and the memory map file but until now, I always get this error "D:ProgramTI/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-gcc: not found" , I'm checking the PATH variables to solve this issue.

     But the CCS SBL is compiled as instructed in this page.processors.wiki.ti.com/.../Creating_a_CCS_Project_for_SBL_on_AM572x_GP_EVM

    I also tried "tiimage.exe 0x40331000 mmcsd JN5728_SBL MLO", because I cannot find a detailed explanation on the tiimage.exe input parameters.

    Still, the UART3 is quiet.

    JN5728_SBL.zip

  • Hi Rahul,

    I fixed the PATH issue that reporting "D:ProgramTI/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-gcc: not found"

    By changing the file content in "TI\pdk_am57xx_1_0_10\packages\ti\build\Rules.make"

    --   SDK_INSTALL_PATH ?= D:/Program/TI

    ++  # SDK_INSTALL_PATH ?= D:/Program/TI
    ++  SDK_INSTALL_PATH = D:/Program/TI

    then I run  gmake sbl in "TI\pdk_am57xx_1_0_10\packages" directory, I can get the sbl.out as well as MLO using gmake tool.

    the memory map file is in the attachment, the entry address is also 0x40331000.

    .startcode 0x40331000 0xb4
    0x40331000 . = ALIGN (0x4)
    *(.public.*)
    *sbl_init.ao(.text)
    .text 0x40331000 0xb4 /Program/TI/pdk_am57xx_1_0_10/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/obj/sbl_init.ao
    0x40331000 Entry

    .text 0x403310c0 0x123e8
    0x403310c0 . = ALIGN (0x4)
    *(.text*)
    .text.startup 0x403310c0 0x134 /Program/TI/pdk_am57xx_1_0_10/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/obj/sbl_main.o
    0x403310c0 main
    .text 0x403311f4 0x468 /Program/TI/pdk_am57xx_1_0_10/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/obj/sbl_rprc.o
    0x403311f4 SBL_BootCore
    0x40331270 SBL_MulticoreImageParse
    0x40331654 GetDeviceId
    .text 0x4033165c 0x114 /Program/TI/pdk_am57xx_1_0_10/packages/ti/boot/sbl/binary/evmAM572x/mmcsd/obj/sbl_prcm.o
    0x4033165c SBL_PRCMModuleEnable
    0x4033169c SBL_PRCMModuleDisable
    0x403316c0 SBL_PRCMSetClkOperMode
    0x403316f8 SBL_ResetRelease
    0x40331730 SBL_ResetGetStatus
    0x4033174c SBL_ResetClearStatus
    0x4033176c SBL_ResetAssert

    I tried to use this new MLO in SD card to boot, but it fails again, however, when I use CCS to load this sbl.out and run, I can get the same messages output through UART3, so I guess the sbl.out file compiled using gmake and CCS are basicly the same. 

    Can you give me some hint, where did i go wrong or missing?8228.sbl.zip

  • BTW, I uses evmAM572x_SR2.0.pinmux as a template, but my CPU is XAM5728.

    But I cannot open evmAM572x_SR1.1.pinmux, reporting an error"failed to load project data:cannot read property "versions" of undifined".

    after reading this thread 

    I opened this evmAM572x_SR1.1.pinmux using a text editor, changing the “deviceId” field to "AM5728_SR1.1_Beta" or "AM5728_SR2.0", then pin mux tools stucks at "Setting up your PinMux project" as  follows 

    Is my situation related to the silicon revision SR1.1? If so, what should I do?

  • Hi Team,

    I'm still stuck at getting SBL running from SD card.
    I noticed that if I use CCS to load the .out file and hit 'Restart' on CCS debug panel, and then hit 'run', the uart will output messages. But If I hit 'run' right after loading the .out file to Cortex-A15 core, there is no output from UART3.
    So I guess maybe CCS did some initialization to the Cortex-A15 core. and that is also why the SBL fails to run from SD card.