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.

PROCESSOR-SDK-AM437X: MMC bootloader issue

Part Number: PROCESSOR-SDK-AM437X

Hello E2E community,

I need to implement a bootloader on my AM4377-based custom board. It has SDRAM slightly different from IDK or GPEVM board, it is DDR3L MT41K256M16TW-107 AAT.

The SDRAM timings are different from IDK/GPEVM boards, I use specific gel files and my projects run fine on this board when loaded from CCS. I can prepare the bootable MicroSD card for IDK board and it works like a charm (I put my MLO/app files). But when I take "ti\pdk_am437x_1_0_14\packages\ti\starterware\bootloader" as example, adjust timings, rebuild with this command:

gmake bootloader BUILDCFG=boot PLATFORM=am43xx-evm BOOTMODE=mmcsd

and put the binary with TI header to the SD card:

bootloader_boot_mmcsd_a9host_debug_ti.bin -> MLO

Then nothing is working! My board just keeps complete silent about any attempts to boot from SD card. I don't see any messages! Neither on console nor on serial port.

The SYSBOOT lines on my custom board to select the boot devices are set to the EXACT same values as for IDK_AM437x board.

As shown below, on IDK_AM437x board only signals SYSBOOT[3,4,14] are connected to 3.3VDC, others are grounded.

On my custom board they are routed exactly same way:

I check the CTRL_STS register:

IDK_AM437x board, CTRL_STS (0x44e10040)  = 00400318
Custom board, CTRL_STS (0x44e10040)          = 00400308

CTRL_STS register on my board is different (1 bit is different), but I tried to set it through CCS to the same value as IDK board and it doesn't change anything.

I'm trying to understand what's wrong with my boot loader and added debug messages to "starterware\bootloader\src\sbl_main.c"

int main(void)
{
    uint32_t status;
    uint32_t imageSize;

    printf("Hello world, from the bootloader!\n"); /* !!! */

    status = BOARDInit(NULL);
    if(status != S_PASS)
    {
        printf("** BOARDInit() returns error!\n"); /* !!! */
        return 1;
    }

But I don't see any messages during board boot.

** My questions **

1. How do I debug the boot loader?

2. Where should I set the breakpoint?

3. Even if my SDRAM timings are wrong, I still have to see at least printf() messages, why don't I see them?

Any help will be very appreciated as I'm really stuck and not sure how to resolve this issue and make my custom board boot from MMCSD.

Thanks a lot!

  • Oleg,

    The bootloader provided in the Processor SDK RTOS is unlikely to work as is on the custom platform unless your design implements the HW exactly as the evaluation HW.  There are two articles in the software developers guide that will be useful for you to look at as you port the Processor SDK RTOS package to your custom board 

    Custom board porting:

    http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_board.html#custom-board-addition

    It appears that you have completed step one and have the code loading and running over CCS so please confirm that ROM is loading the secondary bootloader and the UART where debug logs are being setup is setup correctly from the secondary bootloader from Processor SDK. Please review the section that talks about board ID detect mechanism and confirm that your board uses personality EEPROM and boardID structure similar to IDK platform.

    Bootloader debugging:

    http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_Foundational_Components.html#bootloader-debugging

    In the software debug steps review the section for emulator based debugging of boot. Check and report the Program counter value when you connect to the A9 core if the code is still in bootROM. If the code is executing in onchip memory it means primary ROM bootloader loaded the application into device memory but for some reason is not able to load/launch the application from DDR memory.

    Hope this helps.

    Regards,

    Rahul

  • Thanks Rahul,

    I was able to convince RBL to load my custom SBL (there were HW error on my board in wiring SYSBOOT0 lines, but I changed CTRL_STS register manually and RBL is loading my SBL from the MMCSD).

    I also was able to debug the bootloader, I had to set HW breakpoint at the address of main() (I got it from the .map file).

    Also when I load symbols (as .out file) I can actually walk through the code line by line.

    Now I'm facing another problem - initializing my DDR3 RAM, but it is a completely different problem.

    I have working GEL files for the board and I'm trying to use the same timings and config values in the source code of the SBL. So far it hangs in SblPlatformDdrConfig() but at least I can trace to the problem line and try to understand what's going wrong there.

    Thanks a lot for your help!