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.

AM3358: U-boot fails

Part Number: AM3358

I made a custom board using am3358.

I'm trying to port u-boot but failed.

what should I check in my case?

I alreay tune DDR3. but not yet ported PMIC driver(TPS65217C)

Please help me!

I have the following symptoms:

1) Randomly stopped when trying to boot mmc1(sd card)    # not happen on beaglebone black board

2) Invalid partition type(mmc1)   # not happen on beaglebone black board

3) The variables do not work properly after call dcache_disable();  # not happen on beaglebone black board

This is my log and codes:

U-Boot SPL 2019.01-g1ebdbc7d8b-dirty (Oct 30 2019 - 16:05:08 +0900)
Trying to boot from MMC1
cleanup_before_linux_select, 39
cleanup_before_linux_select, _
board_init_r, A
<!!!!--------- randomly stopped ------!!!!!!!>

U-Boot 2019.01-g1ebdbc7d8b-dirty (Oct 30 2019 - 16:05:08 +0900)

CPU  : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM:  512 MiB
NAND: passed 
MMC:   OMAP SD/MMC:
Loading Environment from FAT... �o���;����;��6~�������������~7��������7���6?�2** Inv
alid partition type 
<ethaddr> not set. Validating first E-fuse MAC

common/spl/spl.c , board_init_r()

...

        debug("loaded - jumping to U-Boot...\n");
        spl_board_prepare_for_boot();
printf("%s, A\n",__func__);
        jump_to_image_no_args(&spl_image);
}

...

arch/arm/cpu/armv7/cpu.c, cleanup_before_linux_select()

...

        if (flags & CBL_DISABLE_CACHES) {
        printf("%s, %d\n", __func__, __LINE__);

                /*
                * turn off D-cache
                * dcache_disable() in turn flushes the d-cache and disables MMU
                */
                dcache_disable();
        printf("%s, %d\n", __func__, __LINE__);
                v7_outer_cache_disable();

...

Ref Beaglebone black log on same u-boot

U-Boot SPL 2019.01-g1ebdbc7d8b-dirty (Oct 30 2019 - 16:05:08 +0900)
Trying to boot from MMC1
cleanup_before_linux_select, 39
cleanup_before_linux_select, 46
board_init_r, A

U-Boot 2019.01-g1ebdbc7d8b-dirty (Oct 30 2019 - 16:05:08 +0900)

CPU  : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM:  512 MiB
NAND: passed 
MMC:   OMAP SD/MMC: 0
Loading Environment from FAT... *** Warning - bad CRC, using default environment

  • I added logs each sucess and failed case.

    Failed case

    U-Boot SPL 2019.01-g1ebdbc7d8b-dirty (Oct 30 2019 - 17:57:04 +0900)
    Trying to boot from MMC1
    cleanup_before_linux_select, 39
    cleanup_before_linux_select, �_
    Unsupported OS image.. Jumping nevertheless..
    loaded - jumping to U-Boot...
    board_init_r, A
    
    

    Sucess case

    U-Boot SPL 2019.01-g1ebdbc7d8b-dirty (Oct 30 2019 - 17:57:04 +0900)
    Trying to boot from MMC1
    cleanup_before_linux_select, 39
    cleanup_before_linux_select, �_
    Jumping to U-Boot
    loaded - jumping to U-Boot...
    board_init_r, A
    
    
    U-Boot 2019.01-g1ebdbc7d8b-dirty (Oct 30 2019 - 17:57:04 +0900)
    
    CPU  : AM335X-GP rev 2.1
    Model: TI AM335x BeagleBone Black
    DRAM:  512 MiB
    NAND: passed 
    MMC:   OMAP SD/MMC:
    Loading Environment from%** Invalid partition type ��-Boot}�����n�c>���_����ɳͯ���" (e
    xpect "U-Boot")
    <ethaddr> not set. Validating first E-fuse MAC
    Net:   
    Warning: usb_ether MAC addresses don't match:
    Address in ROM is          de:ad:be:ef:00:01
    Address in environment is  f8:36:9b:ee:a1:41
    eth0: usb_ether
    Hit any key to stop autoboot:  0 
    Unknown command 'if test ${boot_fit} -eq 1; then run update_to_fit; fi; run findfdt; run
     init_console; run envboot; run distro_bootcmd' - try 'help' or use 'run' command
    => 

  • Hi Hanjun,

    Hanjun Kim said:
    1) Randomly stopped when trying to boot mmc1(sd card)    # not happen on beaglebone black board

    Can you try adding a '#define DEBUG" to the top of 'common / spl / spl.c' to get some more diagnostic data (prints)?

    Hanjun Kim said:
    2) Invalid partition type(mmc1)   # not happen on beaglebone black board

    By default for AM335x EVM defconfig based builds the ENV is located the MMC FAT partition 0:1. How does your SD-card based HW setup compare to the BeagleBone Black? can you share a block diagram? Does this same SD card boot on the BBB without this issue?

    Hanjun Kim said:
    3) The variables do not work properly after call dcache_disable();  # not happen on beaglebone black board

    How does this problem manifest itself?

    Regards, Andreas

  • Andreas Dannenberg63 said:
    Can you try adding a '#define DEBUG" to the top of 'common / spl / spl.c' to get some more diagnostic data (prints)?

    Andreas Dannenberg63 said:
    How does this problem manifest itself?

    I add my logs including DEBUG flag and Test code for variables not worked properly.

    Failed Case

    U-Boot SPL 2019.01-g1ebdbc7d8b-dirty (Oct 31 2019 - 15:30:13 +0900)
    Trying to boot from MMC1
    valiable test before cleanup_before_linux() : 0x1234
    valiable test after cleanup_before_linux() : 0xO`/@5�7��
    Unsupported OS image.. Jumping nevertheless..
    loaded - jumping to U-Boot...
    
    

    Success Case

    U-Boot SPL 2019.01-g1ebdbc7d8b-dirty (Oct 31 2019 - 15:30:13 +0900)
    Trying to boot from MMC1
    valiable test before cleanup_before_linux() : 0x1234
    valiable test after cleanup_before_linux() : 0xO`/@5�7��
    Jumping to U-Boot
    loaded - jumping to U-Boot...
    
    
    U-Boot 2019.01-g1ebdbc7d8b-dirty (Oct 31 2019 - 15:30:13 +0900)
    
    CPU  : AM335X-GP rev 2.1
    Model: TI AM335x BeagleBone Black
    DRAM:  512 MiB
    NAND: passed 
    MMC:   OMAP SD/MMC:
    Loading Environment from%** Invalid partition type ��-Boot}" (expect "U-Boot")
    <ethaddr> not set. Validating first E-fuse MAC
    Net:   
    Warning: usb_ether MAC addresses don't match:
    Address in ROM is          de:ad:be:ef:00:01
    Address in environment is  f8:36:9b:ee:a1:41
    eth0: usb_ether
    Hit any key to stop autoboot:  0 
    Unknown command 'if test ${boot_fit} -eq 1; then run update_to_fit; fi; run findfdt; run
     init_console; run envboot; run distro_bootcmd' - try 'help' or use 'run' command
    => 
    

    *Test code to check vairable not work properly

    common/spl/spl.c
    
    void board_init_r(gd_t *dummy1, ulong dummy2)
    {
    ...
            int test1;
            test1 = 0x1234;
            printf("valiable test before cleanup_before_linux() : 0x%x\n", test1);
    
            cleanup_before_linux();
            int test2;
            test2 = 0x5678;
    
            printf("valiable test after cleanup_before_linux() : 0x%x\n", test2);
    
    ..

     

  • Hi Hanjun,

    you disable the cache and then you seem to have issues with your memory access as evident during your variable test; this could point to a problem with the DDR setup or configuration itself, as an enabled cache could mask certain types of issues.

    How does your DDR setup differ from the BeagleBone Black?

    Do you consistently see this failure behavior across different custom boards?

    Can you experiment with your DDR setup (varying different parameters, etc.) to see if it has any impact on your boot process?

    Finally, you can also try customizing, building, and running the diagnostic examples from the AM335x RTOS SDK, specifically the ones related to memory and MMC. This will allow you to validate your custom board from a different, very low-level angle.

    http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_board.html#running-the-diagnostic-examples

    http://software-dl.ti.com/processor-sdk-rtos/esd/AM335X/latest/index_FDS.html

    Regards, Andreas

  • Hi Andreas

    I'm trying to test using SDK-RTOS you suggested.

    But I could not find MLO file in pdk*/pakages/ti/boot folder and there was not created pdk*/pakages/ti/boot folder.

    Please let me know how to create MLO for testing diagnostic apps.

    In the 4.6.3.2.5. Building the SBL, there is options for AM572X, not AM335x

    Is there detail opton for AM335x?

    Here is my log trying to make diag apps and MLO.

    ignis@ignis-900X3N:~/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag$ make evmAM335x_sd
    make sdtarget sboard=evmAM335x bboot=SD
    make[1]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag'
    make buildtarget bboard=evmAM335x btests=evmAM335x_DIAG
    make[2]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag'
    make -C framework BOARD=evmAM335x TARGET=armv7 BOOTMODE=SD
    make[3]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/framework'
    make -f ./build/evmAM335x/armv7/makefile 
    make[4]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/framework'
    make[4]: Nothing to be done for 'all'.
    make[4]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/framework'
    make[3]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/framework'
    make -C framework_loader BOARD=evmAM335x TARGET=armv7 BOOTMODE=SD
    make[3]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/framework_loader'
    make -f ./build/evmAM335x/armv7/makefile 
    make[4]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/framework_loader'
    make[4]: Nothing to be done for 'all'.
    make[4]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/framework_loader'
    make[3]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/framework_loader'
    make -C mem BOARD=evmAM335x TARGET=armv7 BOOTMODE=SD
    make[3]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/mem'
    make -f ./build/evmAM335x/armv7/makefile 
    make[4]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/mem'
    make[4]: Nothing to be done for 'all'.
    make[4]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/mem'
    make[3]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/mem'
    make -C uart BOARD=evmAM335x TARGET=armv7 BOOTMODE=SD
    make[3]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/uart'
    make -f ./build/evmAM335x/armv7/makefile 
    make[4]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/uart'
    make[4]: Nothing to be done for 'all'.
    make[4]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/uart'
    make[3]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/uart'
    make -C mmcsd BOARD=evmAM335x TARGET=armv7 BOOTMODE=SD
    make[3]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/mmcsd'
    make -f ./build/evmAM335x/armv7/makefile 
    make[4]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/mmcsd'
    make[4]: Nothing to be done for 'all'.
    make[4]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/mmcsd'
    make[3]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/mmcsd'
    make -C buzzer BOARD=evmAM335x TARGET=armv7 BOOTMODE=SD
    make[3]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/buzzer'
    make -f ./build/evmAM335x/armv7/makefile 
    make[4]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/buzzer'
    make[4]: Nothing to be done for 'all'.
    make[4]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/buzzer'
    make[3]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/buzzer'
    make -C accelerometer BOARD=evmAM335x TARGET=armv7 BOOTMODE=SD
    make[3]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/accelerometer'
    make -f ./build/evmAM335x/armv7/makefile
    make[4]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/accelerometer'
    make[4]: Nothing to be done for 'all'.
    make[4]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/accelerometer'
    make[3]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/accelerometer'
    make -C temperature BOARD=evmAM335x TARGET=armv7 BOOTMODE=SD
    make[3]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/temperature'
    make -f ./build/evmAM335x/armv7/makefile 
    make[4]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/temperature'
    make[4]: Nothing to be done for 'all'.
    make[4]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/temperature'
    make[3]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/temperature'
    make -C light_sensor BOARD=evmAM335x TARGET=armv7 BOOTMODE=SD
    make[3]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/light_sensor'
    make -f ./build/evmAM335x/armv7/makefile 
    make[4]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/light_sensor'
    make[4]: Nothing to be done for 'all'.
    make[4]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/light_sensor'
    make[3]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/light_sensor'
    make -C eeprom BOARD=evmAM335x TARGET=armv7 BOOTMODE=SD
    make[3]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/eeprom'
    make -f ./build/evmAM335x/armv7/makefile 
    make[4]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/eeprom'
    make[4]: Nothing to be done for 'all'.
    make[4]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/eeprom'
    make[3]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/eeprom'
    make -C rtc BOARD=evmAM335x TARGET=armv7 BOOTMODE=SD
    make[3]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/rtc'
    make -f ./build/evmAM335x/armv7/makefile 
    make[4]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/rtc'
    make[4]: Nothing to be done for 'all'.
    make[4]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/rtc'
    make[3]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/rtc'
    make -C pmic BOARD=evmAM335x TARGET=armv7 BOOTMODE=SD
    make[3]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/pmic'
    make -f ./build/evmAM335x/armv7/makefile 
    make[4]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/pmic'
    make[4]: Nothing to be done for 'all'.
    make[4]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/pmic'
    make[3]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/pmic'
    make -C pwm BOARD=evmAM335x TARGET=armv7 BOOTMODE=SD
    make[3]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/pwm'
    make -f ./build/evmAM335x/armv7/makefile 
    make[4]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/pwm'
    make[4]: Nothing to be done for 'all'.
    make[4]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/pwm'
    make[3]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/pwm'
    make -C adc BOARD=evmAM335x TARGET=armv7 BOOTMODE=SD
    make[3]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/adc'
    make -f ./build/evmAM335x/armv7/makefile
    make[4]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/adc'
    make[4]: Nothing to be done for 'all'.
    make[4]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/adc'
    make[3]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/adc'
    make -C timer BOARD=evmAM335x TARGET=armv7 BOOTMODE=SD
    make[3]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/timer'
    make -f ./build/evmAM335x/armv7/makefile
    make[4]: Entering directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/timer'
    make[4]: Nothing to be done for 'all'.
    make[4]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/timer'
    make[3]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag/timer'
    make[2]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag'
    ./create_sd.sh evmAM335x armv7 0
    Done! create_sd script not needed for evmAM335x!
    make[1]: Leaving directory '/home/ignis/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag'
    ignis@ignis-900X3N:~/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag$ ls -al ~/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/
    total 64
    drwxr-xr-x 12 ignis ignis  4096 Nov  7 12:08 .
    drwxr-xr-x  3 ignis ignis  4096 Nov  7 14:33 ..
    drwxr-xr-x  9 ignis ignis  4096 Nov  7 12:11 binary
    drwxr-xr-x 10 ignis ignis  4096 Nov  7 12:10 board
    drwxr-xr-x  6 ignis ignis  4096 Nov  7 11:51 build
    drwxr-xr-x 11 ignis ignis 20480 Nov  7 11:50 csl
    drwxr-xr-x 14 ignis ignis  4096 Nov  7 11:50 drv
    drwxr-xr-x  3 ignis ignis  4096 Nov  7 11:50 fs
    drwxr-xr-x 10 ignis ignis  4096 Nov  7 11:50 osal
    drwxr-xr-x 15 ignis ignis  4096 Nov  7 11:50 starterware
    drwxr-xr-x  4 ignis ignis  4096 Nov  7 11:50 transport
    drwxr-xr-x  3 ignis ignis  4096 Nov  7 11:50 utils
    ignis@ignis-900X3N:~/ti-sdk-rtos/pdk_am335x_1_0_16/packages/ti/board/diag$ 
    

  • Hi Hanjun,

    the section "4.6.3.1.6. Building the Bootloader" in the documentation at http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_Foundational_Components.html#am335x-am437x has build instructions for the bootloader, unfortunately they are outdated and no longer valid as the Makefile was changed to absorb some of the build steps and with that the make target itself changed as well. The correct make target now is starterware_boot. I filed a bug internally to get the documentation updated accordingly.

    Below is an example how the bootloader can be build, and then one of the resulting files is shown which is suitable for copying it to an SD card (while renaming it to 'MLO')

    a0797059@jiji:/opt/procsdk-rtos-am335x-evm-06.01.00.08/pdk_am335x_1_0_16/packages
    $ source ./pdksetupenv.sh 
    **************************************************************************
    Environment Configuration:
    **************************************************************************
        SDK_INSTALL_PATH        : /opt/procsdk-rtos-am335x-evm-06.01.00.08
        GMAKE_INSTALL_PATH      : 
        RULES_MAKE              : /opt/procsdk-rtos-am335x-evm-06.01.00.08/pdk_am335x_1_0_16/packages/Rules.make
    **************************************************************************
    a0797059@jiji:/opt/procsdk-rtos-am335x-evm-06.01.00.08/pdk_am335x_1_0_16/packages
    $ make -j1 starterware_boot
    find ti/starterware -name "*.[ao]" -delete
    make -C ./ti/starterware bootloader BUILDCFG=boot BOOTMODE=uart PLATFORM=am335x-evm PROFILE=debug -s KW_BUILD=no
    # Making am335x-evm:a8host:debug:xmodem_lib...
    # Compiling am335x-evm:a8host:debug:xmodem_lib: crc16.c
    # Compiling am335x-evm:a8host:debug:xmodem_lib: xmodem.c
    
    <...snip...>
    
    #
    # Generating /opt/procsdk-rtos-am335x-evm-06.01.00.08/pdk_am335x_1_0_16/packages/ti/starterware/binary/bootloader/bin/am335x-evm/gcc/bootloader_boot_mcspi_a8host_release_ti.bin...
    /opt/procsdk-rtos-am335x-evm-06.01.00.08/pdk_am335x_1_0_16/packages/ti/starterware/bootloader
    
    # /opt/procsdk-rtos-am335x-evm-06.01.00.08/pdk_am335x_1_0_16/packages/ti/starterware/binary/bootloader/bin/am335x-evm/gcc/bootloader_boot_mcspi_a8host_release_ti.bin created.
    #
    a0797059@jiji:/opt/procsdk-rtos-am335x-evm-06.01.00.08/pdk_am335x_1_0_16/packages
    $ ll ./ti/starterware/binary/bootloader/bin/am335x-evm/gcc/bootloader_boot_mmcsd_a8host_release_ti.bin 
    -rw-r--r-- 1 a0797059 vivid3 55032 Nov  7 15:31 ./ti/starterware/binary/bootloader/bin/am335x-evm/gcc/bootloader_boot_mmcsd_a8host_release_ti.bin

    Then, this file copied to an SD card, together with the other files needed (app, *_TEST), the card contents looks as follows:

    a0797059@jiji:/opt/procsdk-rtos-am335x-evm-06.01.00.08/pdk_am335x_1_0_16/packages
    $ ll /media/a0797059/boot
    total 700
    drwxr-xr-x  2 a0797059 vivid3  1536 Dec 31  1969 ./
    drwxr-x---+ 3 root     root    4096 Nov  7 15:42 ../
    -rw-r--r--  1 a0797059 vivid3 31676 Nov  7 13:22 accelerometer_TEST
    -rw-r--r--  1 a0797059 vivid3 33420 Nov  7 13:22 adc_TEST
    -rw-r--r--  1 a0797059 vivid3 31688 Nov  7 13:22 ambient_light_sensor_TEST
    -rw-r--r--  1 a0797059 vivid3 84900 Nov  7 13:22 app
    -rw-r--r--  1 a0797059 vivid3 36064 Nov  7 13:22 buzzer_TEST
    -rw-r--r--  1 a0797059 vivid3 31208 Nov  7 13:22 eeprom_TEST
    -rw-r--r--  1 a0797059 vivid3 93612 Nov  7 13:22 framework
    -rw-r--r--  1 a0797059 vivid3 31840 Nov  7 13:22 mem_TEST
    -rw-r--r--  1 a0797059 vivid3 90800 Nov  7 14:47 MLO
    -rw-r--r--  1 a0797059 vivid3 45832 Nov  7 13:22 mmcsd_TEST
    -rw-r--r--  1 a0797059 vivid3 32752 Nov  7 13:22 pmic_TEST
    -rw-r--r--  1 a0797059 vivid3 32052 Nov  7 13:22 pwm_TEST
    -rw-r--r--  1 a0797059 vivid3 33332 Nov  7 13:22 rtc_TEST
    -rw-r--r--  1 a0797059 vivid3 31604 Nov  7 13:22 temperature_TEST
    -rw-r--r--  1 a0797059 vivid3 33896 Nov  7 13:22 timer_TEST
    -rw-r--r--  1 a0797059 vivid3 32744 Nov  7 13:22 uart_TEST

    Booting this card the diagnostic applications can be executed as follows:

    StarterWare Boot Loader                                                                                                                                                                   
    BOARDInit status [0x0]                                                                                                                                                                    
     SoC                   : [AM335X]                                                                                                                                                         
     Core                  : [A8]                                                                                                                                                             
     Board Detected        : [GPEVM]                                                                                                                                                          
     Base Board Revision   : [UNKNOWN]                                                                                                                                                        
     Daughter Card Revision: [UNKNOWN]                                                                                                                                                        
    Copying application image from MMC/SD card to RAM                                                                                                                                         
    Jumping to StarterWare Application...                                                                                                                                                     
                                                                                                                                                                                              
                                                                                                                                                                                              
    Opening framework from SD card...                                                                                                                                                         
    Loading framework into memory...                                                                                                                                                          
    Copying application image from MMC/SD card to RAM                                                                                                                                         
    Running framework                                                                                                                                                                         
                                                                                                                                                                                              
    DIAGNOSTIC TEST FRAMEWORK                                                                                                                                                                 
    Version - 01.00.00.02                                                                                                                                                                     
    Build Date - Nov  7 2019, Time - 13:22:13                                                                                                                                                 
                                                                                                                                                                                              
                                                                                                                                                                                              
    Command options:                                                                                                                                                                          
            help - displays this help menu again                                                                                                                                              
            run - run a diagnostic application                                                                                                                                                
            status - prints the test status                                                                                                                                                   
    [Diag Menu]: help                                                                                                                                                                         
    Command options:                                                                                                                                                                          
            help - displays this help menu again                                                                                                                                              
            run - run a diagnostic application                                                                                                                                                
            status - prints the test status                                                                                                                                                   
    [Diag Menu]: run                                                                                                                                                                          
    Diagnostic Test Status:                                                                                                                                                                   
    --------------------------------------------------------------                                                                                                                            
    ID      Name                            Pass    # of times Ran                                                                                                                            
    1       accelerometer_TEST              No      0                                                                                                                                         
    2       adc_TEST                        No      0                                                                                                                                         
    3       ambient_light_sensor_TEST       No      0                                                                                                                                         
    4       buzzer_TEST                     No      0                                                                                                                                         
    5       eeprom_TEST                     No      0                                                                                                                                         
    6       mem_TEST                        No      0                                                                                                                                         
    7       mmcsd_TEST                      No      0                                                                                                                                         
    8       pmic_TEST                       No      0                                                                                                                                         
    9       pwm_TEST                        No      0                                                                                                                                         
    10      rtc_TEST                        No      0
    11      temperature_TEST                No      0
    12      timer_TEST                      No      0
    13      uart_TEST                       No      0
    
    Select test number (1 - 13): 6
    Parsing mem_TEST
    Copying application image from MMC/SD card to RAM
    Running mem_TEST
    
    *********************************************
    *              DDR Memory Test              *
    *********************************************
    
    Testing writing and reading memory
    board_external_memory_test: Start address (0x80010000),            end address (0xbfffffff)
    First test started
    Writing to test area...
            Write up to 0x90000000 done
            Write up to 0xa0000000 done
            Write up to 0xb0000000 done
    Write finished!
    Checking values...
            Read up to 0x90000000 okay
            Read up to 0xa0000000 okay
            Read up to 0xb0000000 okay
    Second test started
    Writing complementary values to test area...
            Write up to 0x90000000 done
            Write up to 0xa0000000 done
            Write up to 0xb0000000 done
    Write finished!
    Checking values...
            Read up to 0x90000000 okay
            Read up to 0xa0000000 okay
            Read up to 0xb0000000 okay
    Board memory test passed!
    Memory test passed!
    
    Finished running mem_TEST, result passed!
    [Diag Menu]:

    Hope that helps. What you would still need to do is configure/tailor bootloader, DDR config, etcc. for your custom board.

    Regards, Andreas

  • Hi Andreas.

    I made a sd card you suggested.

    Testing on beaglebone black was perfect.

    But my custom board didn't work and not print anything on UART.

    I think that I have to modify some DDR configurations like ddr_def.h on SDK

    However I cannot find any DDR configuration files, also no check to DDR configuraiton in the table 3.1.3.1. Board Configurations.

    How can I modify DDR configuration on PDK?

    My memory model is MT41K256M16TW-107 AAT:P

    #datasheet : https://www.micron.com/products/dram/ddr3-sdram/part-catalog/mt41k256m16tw-107-aat

  • Hi Hanjun,

    Hanjun Kim said:

    However I cannot find any DDR configuration files, also no check to DDR configuraiton in the table 3.1.3.1. Board Configurations.

    How can I modify DDR configuration on PDK?

    For AM335x the DDR driver files are located at:

    pdk_am335x_1_0_16/packages/ti/starterware/bootloader/src/am335x/sbl_am335x_platform_ddr.h
    pdk_am335x_1_0_16/packages/ti/starterware/bootloader/src/am335x/sbl_am335x_platform_ddr.c

    You would need to update those for your DDR.

    You have probably seen it but are you aware of the AM335x EMIF tool?

    [Doc] http://www.ti.com/lit/an/sprack4/sprack4.pdf
    [Tool] http://www.ti.com/lit/zip/sprcaj0

    Hanjun Kim said:
    My memory model is MT41K256M16TW-107 AAT:P

    There are also some other E2E threads mentioning this P/N that might be helpful...

    https://e2e.ti.com/support/processors/f/791/t/560358
    https://e2e.ti.com/support/processors/f/791/t/671313?AM3358-DDR3-memory-issue-with-MT41K256M16TW-107

    Regards, Andreas