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.

AM6442: UART_UNIFLASH faile

Part Number: AM6442
Other Parts Discussed in Thread: UNIFLASH, , SYSCONFIG

Issue of UART uniflash of custom flash

 

SDK:mcu_plus_sdk_am64x_09_00_00_35

CCS:Version: 12.4.0.00007 

custom flash: MX25L6433F

(1)Accord to  AM64x MCU+ SDK: Adding Support For a Custom Flash Device (ti.com)     I completed the configure and run example: (a)ospi_flash_diag (b)ospi_flash_io , all passed

(2) Did the custom flash configure in sbl_dfu_uniflash, the example run ok, and AM6442 boot ok

While it failed in sbl_uart_uniflash,  I rebuilt the two image: sbl_uart_uniflash.debug.hs_fs.tiimage and sbl_ospi.debug.hs_fs.tiimage 

Please help me resolving the issue.

Thans!

Ronny Cheng

  • Hi Ronny,

    Did the custom flash configure in sbl_dfu_uniflash, the example run ok, and AM6442 boot ok

    Do you mean to say that the flashing with `sbl_dfu_uniflash` is successful after doing the flash configuration in the same?

    This error mostly occurs because of the failure in booting of `sbl_uart_uniflash` image or some early errors in `sbl_uart_uniflash` while doing the system initialization.

    Could you please again do flashing procedure. In case of failure, please connect to the R5F0-0 core using CCS & see what is the address it is suspended at. This would help confirm the root cause.

    Regards,

    Prashant

  • HI, Prashant. This problem is partly resolved, but i do not know why, please check and reply.

    (1) with the same custom flash configure, it failed in AM64x_evm project, but pass in AM64x_sk project. My AM6442 device type is HSFS .

    (2) compare the two projects, evm and sk, i copy the MMCSD interface of evm project from sk project, Card_Type: NO_DEVICE, then evm project was ok

    I do not know why the project must active MMCSD? I tried close MMCSD, project compiled failed.

    Thanks!

  • Hi Ronny,

    I believe you are working with a custom board. If so, does your board has eMMC?

    In case of a NO, this would explain the failure in flashing as the `sbl_uart_uniflash` from `am64x_evm` tries to initialize the eMMC which will fail in case there is no eMMC onboard. The `sbl_uart_uniflash` from `am64x_sk` does not have eMMC enabled in the Sysconfig & so it does not try to initialize the eMMC.

    Regards,

    Prashant

  • hi,Prashant. Thank you.

    My board do not have an eMMC or a SD card on it, I tried to remove  MMCSD from example.syscfg, but the project compile failed.  The logs are shown below, some module in libs use the symbol of MMC. Is that mandatory for boot?

    makefile:150: recipe for target 'sbl_uart_uniflash_am64x-evm_r5fss0-0_nortos_ti-arm-clang.out' failed

    undefined first referenced
    symbol in file
    --------- ----------------
    gMmcsdConfig C:/ti/mcu_plus_sdk_am64x_09_00_00_35/source/drivers/lib/drivers.am64x.r5f.ti-arm-clang.debug.lib<mmcsd_v0.obj>
    gMmcsdConfigNum C:/ti/mcu_plus_sdk_am64x_09_00_00_35/source/drivers/lib/drivers.am64x.r5f.ti-arm-clang.debug.lib<mmcsd_v0.obj>

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "sbl_uart_uniflash_am64x-evm_r5fss0-0_nortos_ti-arm-clang.out" not built
    tiarmclang: error: tiarmlnk command failed with exit code 1 (use -v to see invocation)
    gmake[1]: *** [sbl_uart_uniflash_am64x-evm_r5fss0-0_nortos_ti-arm-clang.out] Error 1
    gmake: *** [all] Error 2
    makefile:146: recipe for target 'all' failed

  • Hi Ronny,

    The correct way to disable the eMMC module in `sbl_uart_uniflash` is to set the Card Type as NO_DEVICE which essentially means there is no eMMC or SD card available on the board & so the eMMC initialization is skipped.

    Now, why simply removing the eMMC module in Sysconfig does not work is because of the how the underlying `bootloader_uniflash` driver used by `sbl_uart_uniflash` is built. By default, the `bootloader_uniflash` (source/drivers/bootloader/bootloader_uniflash.*) driver includes the eMMC driver for flashing to eMMC. This eMMC driver expects some global variables which gets defined only if eMMC module is enabled in Sysconfig. So, if the eMMC module is removed in the Sysconfig, the global variables never gets defined & so the build error comes.

    If you want the build to pass with the eMMC removed in Sysconfig for `sbl_uart_uniflash`, you can do the following change

    diff --git a/source/drivers/bootloader/bootloader_uniflash.h b/source/drivers/bootloader/bootloader_uniflash.h
    index 3c642c6b1..fd784629c 100644
    --- a/source/drivers/bootloader/bootloader_uniflash.h
    +++ b/source/drivers/bootloader/bootloader_uniflash.h
    @@ -42,6 +42,8 @@ extern "C"
     #include <stdint.h>
     #include <drivers/hw_include/soc_config.h>
     
    +#undef DRV_VERSION_MMCSD_V0
    +
     #define BOOTLOADER_UNIFLASH_FILE_HEADER_MAGIC_NUMBER  (0x46554C42) /* BLXF */
     #define BOOTLOADER_UNIFLASH_RESP_HEADER_MAGIC_NUMBER  (0x52554C42) /* BLXR */
     
    @@ -121,4 +123,4 @@ int32_t Bootloader_uniflashProcessFlashCommands(Bootloader_UniflashConfig *confi
     }
     #endif
     
    -#endif
    \ No newline at end of file
    +#endif
    

    After the change, rebuild the libs & then the `sbl_uart_uniflash`. The build then ideally should be successful. Ofcourse you can simply set Card Type as NO_DEVICE to get away with all this.

    Regards,

    Prashant