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.

[FAQ] How to flash eMMC with Lauterbach JTAG on AM62x

Part Number: AM625
Other Parts Discussed in Thread: SK-AM62A-LP, SK-AM62, SK-AM62-LP

Tool/software:

AM62x boot rom supports booting from eMMC.
Please refer to AM62x TRM "5.4.4 eMMC Boot" for details on eMMC boot support by boot rom.

The FAQ lists how to flash u-boot to eMMC boot partition (either boot0 or boot1) in raw mode using Lauterbach JTAG on SK-AM62 board [1] with AM62x Linux SDK 10.0.7.4 [3]. The scripts would be applicable to flash u-boot to eMMC on SK-AM62A-LP board [2] as well.
[1]. SK-AM62 board (https://www.ti.com/tool/SK-AM62B)
[2]. SK-AM62-LP board (https://www.ti.com/tool/SK-AM62-LP)
[3]. https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM62X/10.00.07.04

  • Lauterbach T32 scripts on flashing eMMC on on SK-AM62 board
    - Lauterbach T32 scripts: am62x_eMMC_flash.zip
    - A sample T32 flashing log: am62x_flash_eMMC_u-boot.log
    - A sample u-boot log booting from eMMC: am62x_10.0_eMMC_boot.log

    am62x_eMMC_flash.zip

    am62x_flash_eMMC_u-boot.log
    ========================================
    9. Oct 2024
    eMMC flashing on AM62x-SK (HS-FS)
    == BOOTMODE[15:0] = 00CB => eMMC boot
    ========================================
    CID register
    [127:104] 0x13014E
    [103:72]  0x47314D31
    [71:40]   0x354C1027
    [39:8]    0x0CACE0AA9
    Dual port programming mode enabled
    -------(e)MMC FLASH--------
    Manufacturer ID: 0x0
    Card/BGA: Reserved
    OEM/Application ID: 0x131
    Product name: NG1M15
    Product revision: 4.12
    Serial number: 0x1027CACE
    Manufacture date:     2007,or 2023(if EXT_CSD[192]>4)
    Access mode: sector mode
    RCA : 0x1
    == eMMC flash to eMMC boot partition #1
    ------- (e)MMC Extended CSD  ---------
    [504]         S_CMD_SET: 0x1
    [503]      HPI_FEATURES: 0x1
    [502]     BKOPS_SUPPORT: 0x1
    [501]  MAX_PACKED_READS: 0x0
    [500] MAX_PACKED_WRITES: 0x0
    [499]  DATA_TAG_SUPPORT: 0x1
    [498]     TAG_UNIT_SIZE: 0x3
    [497]      TAG_RES_SIZE: 0x0
    [496]    CONTEXT_CAPABILITIE: 0x5
    [495]LARGE_UNIT_SIZE_M1: 0x3
    [494]       EXT_SUPPORT: 0x3
    [493]   SUPPORTED_MODES: 0x1
    [492]      FFU_FEATURES: 0x0
    [491] OPERATION_CODE_TIMEOUT: 0x0
    [490]           FFU_ARG: 0x0
    [305:302]   NUMBER_OF_FW_SECTORS_CORRECTLY_PROGRAMMED: 0x0
    [301:298]   VENDOR_PROPRIETARY_HEALTH_REPORT: 0x0
    [297:294]   VENDOR_PROPRIETARY_HEALTH_REPORT: 0x0
    [293:290]   VENDOR_PROPRIETARY_HEALTH_REPORT: 0x0
    [289:286]   VENDOR_PROPRIETARY_HEALTH_REPORT: 0x0
    [285:282]   VENDOR_PROPRIETARY_HEALTH_REPORT: 0x0
    [281:278]   VENDOR_PROPRIETARY_HEALTH_REPORT: 0x0
    [277:274]   VENDOR_PROPRIETARY_HEALTH_REPORT: 0x0
    [273:270]   VENDOR_PROPRIETARY_HEALTH_REPORT: 0x0
    [269]  DEVICE_LIFE_TIME_EST_TYP_B: 0x1
    [268]  DEVICE_LIFE_TIME_EST_TYP_A: 0x1
    [267]      PRE_EOL_INFO: 0x1
    [266] OPTIMAL_READ_SIZE: 0x0
    [265] OPTIMAL_WRITE_SIZE: 0x40
    [264] OPTIMAL_TRIM_UNIT_SIZE: 0x0
    [263:262]     DEVICE_VERSION: 0x0
    [261:258]   FIRMWARE_VERSION: 0x39473030
    [257:254]   FIRMWARE_VERSION: 0x54513936
    [253]     PWR_CL_DDR_200_360: 0x0
    [252:249]    CACHE_SIZE: 0x800
    [248] GENERIC_CMD6_TIME: 0xA
    [247]    POWER_OFF_LONG_TIME: 0x32
    [246]      BKOPS_STATUS: 0x0
    [245:242]    CORRECTLY_PRG_SECTORS_NUM: 0x0
    [241]    INI_TIMEOUT_AP: 0xA
    [239] PWR_CL_DDR_52_360: 0x0
    [238] PWR_CL_DDR_52_195: 0x0
    [235]    MIN_PERF_DDR_W_8_52: 0x0
    [234]    MIN_PERF_DDR_R_8_52: 0x0
    [232]         TRIM_MULT: 0x1
    [231]    SEC_FEATURE_SUPPORT: 0x51
    [230]    SEC_ERASE_MULT: 0x1
    [229]     SEC_TRIM_MULT: 0x1
    [228]         BOOT_INFO: 0x7
    [226]   BOOT_SIZE_MULTI: 0xFC, size: 0x1F80000
    [225]          ACC_SIZE: 0x0
    [224] HC_ERASE_GRP_SIZE: 0x1 , size: 0x80000
    [223]ERASE_TIMEOUT_MULT: 0x1
    [222]      REL_WR_SEC_C: 0x1
    [221]    HC_WP_GRP_SIZE: 0x10
    [220]           S_C_VCC: 0x0
    [219]          S_C_VCCQ: 0x0
    [217]       S_A_TIMEOUT: 0x14
    [215:212]     SEC_COUNT: 0x3B48000, address: 0x0--0x768FFFFFF
    [210]   MIN_PERF_W_8_52: 0x0
    [209]   MIN_PERF_R_8_52: 0x0
    [208]   MIN_PERF_W_8_26_4_52: 0x0
    [207]   MIN_PERF_R_8_26_4_52: 0x0
    [206]   MIN_PERF_W_4_26: 0x0
    [205]   MIN_PERF_R_4_26: 0x0
    [203]     PWR_CL_26_360: 0x0
    [202]     PWR_CL_52_360: 0x0
    [201]     PWR_CL_26_195: 0x0
    [200]     PWR_CL_52_195: 0x0
    [199]  PARTITION_SWITCH_TIME: 0x1
    [198]  OUT_OF_INTERRUPT_TIME: 0xF
    [196]         CARD_TYPE: 0x57
    [194]     CSD_STRUCTURE: 0x2
    [192]       EXT_CSD_REV: 0x8
    [191]           CMD_SET: 0x0
    [189]       CMD_SET_REV: 0x0
    [187]       POWER_CLASS: 0x0
    [185]         HS_TIMING: 0x0
    [183]         BUS_WIDTH: 0x0, 1 bit data bus
    [181]   ERASED_MEM_CONT: 0x0
    [179]  PARTITION_CONFIG: 0x49, send boot ack, boot: boot partition 1, access: boot partition 1
    [178]  BOOT_CONFIG_PROT: 0x0
    [177]    BOOT_BUS_WIDTH: 0x2, datarate: single, bus: x8, reset after booting
    [175]   ERASE_GROUP_DEF: 0x0
    [173]           BOOT_WP: 0x0
    [171]           USER_WP: 0x0
    [169]         FW_CONFIG: 0x0
    [168]    RPMB_SIZE_MULT: 0x20
    [167]        WR_REL_SET: 0x1F
    [166]      WR_REL_PARAM: 0x15
    [164]       BKOPS_START: 0xXX
    [163]          BKOPS_EN: 0x2
    [162]    RST_n_FUNCTION: 0x0
    [161]          HPI_MGMT: 0x0
    [160]PARTITIONING_SUPPORT: 0x7
    [159]MAX_ENH_SIZE_MULT_2: 0x0
    [158]MAX_ENH_SIZE_MULT_1: 0x4
    [157]MAX_ENH_SIZE_MULT_0: 0xF0
    [156]PARTITIONS_ATTRIBUTE: 0x0
    [155]PARTITIONS_SETTING_COMPLETED: 0x0
    [154]  GP_SIZE_MULT_4_2: 0x0
    [153]  GP_SIZE_MULT_4_1: 0x0
    [152]  GP_SIZE_MULT_4_0: 0x0
    [151]  GP_SIZE_MULT_3_2: 0x0
    [150]  GP_SIZE_MULT_3_1: 0x0
    [149]  GP_SIZE_MULT_3_0: 0x0
    [148]  GP_SIZE_MULT_2_2: 0x0
    [147]  GP_SIZE_MULT_2_1: 0x0
    [146]  GP_SIZE_MULT_2_0: 0x0
    [145]  GP_SIZE_MULT_1_2: 0x0
    [144]  GP_SIZE_MULT_1_1: 0x0
    [143]  GP_SIZE_MULT_1_0: 0x0
    [142]   ENH_SIZE_MULT_2: 0x0
    [141]   ENH_SIZE_MULT_1: 0x0
    [140]   ENH_SIZE_MULT_0: 0x0
    [139]  ENH_START_ADDR_3: 0x0
    [138]  ENH_START_ADDR_2: 0x0
    [137]  ENH_START_ADDR_1: 0x0
    [136]  ENH_START_ADDR_0: 0x0
    [134] SEC_BAD_BLK_MGMNT: 0x0
    FLASHFILE erase done.
    file 'C:\T32\DMxx\lauterbach\HG\am62x_burn_flash\eMMC\binary\tiboot3-am62x-hs-fs-evm.bin' (Binary) loaded. 292190 bytes.
    file 'C:\T32\DMxx\lauterbach\HG\am62x_burn_flash\eMMC\binary\tispl.bin' (Binary) loaded. 1111399 bytes.
    file 'C:\T32\DMxx\lauterbach\HG\am62x_burn_flash\eMMC\binary\u-boot.img' (Binary) loaded. 1007563 bytes.
    

    am62x_10.0_eMMC_boot.log
    U-Boot SPL 2024.04-ti-gfda88f8bcea3 (Jul 26 2024 - 11:00:12 +0000)
    SYSFW ABI: 4.0 (firmware rev 0x000a '10.0.8--v10.00.08 (Fiery Fox)')
    SPL initial stack usage: 13392 bytes
    Trying to boot from MMC1
    Authentication passed
    Authentication passed
    Authentication passed
    Authentication passed
    Authentication passed
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.10.0(release):v2.10.0-367-g00f1ec6b87-dirty
    NOTICE:  BL31: Built : 16:09:05, Feb  9 2024
    
    U-Boot SPL 2024.04-ti-gfda88f8bcea3 (Jul 26 2024 - 11:00:12 +0000)
    SYSFW ABI: 4.0 (firmware rev 0x000a '10.0.8--v10.00.08 (Fiery Fox)')
    SPL initial stack usage: 1904 bytes
    Trying to boot from MMC1
    Authentication passed
    Authentication passed
    
    
    U-Boot 2024.04-ti-gfda88f8bcea3 (Jul 26 2024 - 11:00:12 +0000)
    
    SoC:   AM62X SR1.0 HS-FS
    Model: Texas Instruments AM625 SK
    EEPROM not available at 0x50, trying to read at 0x51
    Reading on-board EEPROM at 0x51 failed -121
    DRAM:  2 GiB
    Core:  81 devices, 31 uclasses, devicetree: separate
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from nowhere... OK
    In:    serial
    Out:   serial
    Err:   serial
    EEPROM not available at 0x50, trying to read at 0x51
    Net:   eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  2  0 
    => md.l    0x43000030 1
    43000030: 000000cb                             ....
    => mmc dev 0
    switch to partitions #0, OK
    mmc0(part 0) is current device
    => mmc info
    Device: mmc@fa10000
    Manufacturer ID: 13
    OEM: 4e
    Name: G1M15L 
    Bus Speed: 200000000
    Mode: HS200 (200MHz)
    Rd Block Len: 512
    MMC version 5.1
    High Capacity: Yes
    Capacity: 29.6 GiB
    Bus Width: 8-bit
    Erase Group Size: 512 KiB
    HC WP Group Size: 8 MiB
    User Capacity: 29.6 GiB WRREL
    Boot Capacity: 31.5 MiB ENH
    RPMB Capacity: 4 MiB ENH
    Boot area 0 is not write protected
    Boot area 1 is not write protected
    =>