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.

TDA4VM: How to debug uart_j721e_evm_flash_programmer_release.tiimage

Part Number: TDA4VM
Other Parts Discussed in Thread: UNIFLASH, TEST

Hi,

In my custom board have a OSPI Flash(MT35XU512ABA1G12-0AUT), I use uniflash to flash image to OSPI Flash, when flash sbl_cust_img_mcu1_0_release.tiimage, it alaway failed as below:

> C:\ti\uniflash_7.0.0\processors\ProcessorSDKSerialFlash.exe -c COM25 -f  C:\Users\Zach\Desktop\sbl_bootfiles\sbl_cust_img_mcu1_0_release.tiimage -d 3 -o 0
For more details and examples, please refer to the UniFlash Quick Start guide.
The file extension is .tiimage
----------------------------------------------------------------------------
ProcessorSDKSerialFlash CLI Tool
Copyright (C) 2017-2021 Texas Instruments Incorporated - http://www.ti.com/
Version 1.5.0.0
----------------------------------------------------------------------------
Transferring the Image to Flash Programmer..
 
Transferring Header Information..
Header Transfer Complete!
 
Configuration Failed!

Then I use the same command to flash OSPI Flash in TDA4EVM board, it work fine.

1、  C:\ti\uniflash_7.0.0\dslite.bat   --mode processors -c COM8 -f  C:\ti\uniflash_7.0.0\processors\FlashWriter\j721e_evm\uart_j721e_evm_flash_programmer_release.tiimage  -i 0
2、 C:\ti\uniflash_7.0.0\dslite.bat   --mode processors -c COM8 -f  C:\Users\ Zach\Desktop\sbl_bootfiles\sbl_cust_img_mcu1_0_release.tiimage  -d 3  -o   0
3、 C:\ti\uniflash_7.0.0\dslite.bat   --mode processors -c COM8 -f  C:\Users\ Zach\Desktop\sbl_bootfiles\tifs.bin -d 3  -o 80000
4、 C:\ti\uniflash_7.0.0\dslite.bat   --mode processors -c COM8 -f  C:\Users\ Zach\Desktop\sbl_bootfiles\can_boot_app_mcu_rtos_mcu1_0_release_ospi.appimage  -d 3 -o 100000
5、 C:\ti\uniflash_7.0.0\dslite.bat   --mode processors -c COM8 -f  C:\Users\ Zach\Desktop\sbl_bootfiles\lateapp1.bin -d 3 -o  1FC0000
6、 C:\ti\uniflash_7.0.0\dslite.bat   --mode processors -c COM8 -f  C:\Users\ Zach\Desktop\sbl_bootfiles\lateapp2.bin  -d 3 -o  27C0000
7、 C:\ti\uniflash_7.0.0\dslite.bat   --mode processors -c COM8 -f  C:\Users\ Zach\Desktop\sbl_bootfiles\atf_optee.appimage -d 3 -o 1C0000
8、 C:\ti\uniflash_7.0.0\dslite.bat   --mode processors -c COM8 -f  C:\Users\Zach\Desktop\sbl_bootfiles\ifs_qnx.appimage -d 3 -o 7C0000

And I had try to build out board diagnostic board_diag_ospi to test OSPI Flash in my custorm board, the test was passed.

*********************************************
*            OSPI FLASH Test                *
*********************************************
[xxx] xferLines = 3, funcClk = 133333333, baudRateDiv = 0
[xxx] devicdID = 0x5b1a
[xxx] in Nor_ospiOpen() nor_ospi.c
[xxx] funcClk = 133333333, baudRateDiv = 0
[xxx] SPI_open ok, and then to set DDR or SDR mode
[xxx] enable SDR mode
[xxx] Nor_ospiReadId pass

OSPI NOR device ID: 0x5b1a, manufacturer ID: 0x2c 

 Verifying the OSPI Flash first page...
OSPI NOR Flash first page verification Successful

 Writing Tuning Data to the Flash
Tuning Data Programming Successful

OSPI NOR Flash verification Successful

OSPI Flash Test Passed!



Running OSPI PHY Mode Test
[xxx] in Nor_ospiOpen() nor_ospi.c
[xxx] funcClk = 133333333, baudRateDiv = 0
[xxx] SPI_open ok, and then to set DDR or SDR mode
[xxx] enable SDR mode
[xxx] Nor_ospiReadId pass

OSPI NOR device ID: 0x5b1a, manufacturer ID: 0x2c 

 Verifying the OSPI Flash Write and Read with PHY Enabled...
OSPI NOR Flash Memory Access in PHY mode Successful

OSPI NOR Flash verification in PHY mode Successful

OSPI PHY Mode Test Passed!

 All tests have passed

So I think there are something maybed different in sbl_cust_img_mcu1_0_release.tiimage and board_diag_ospi.

I can find the uniflash host and target source in pdk_jacinto_07_03_00_29/packages/ti/board/utils/uniflash/ and build out  sbl_cust_img_mcu1_0_release.tiimage binary with make BOARD=j721e_evm CORE=mcu1_0 board_utils_uart_flash_programmer command. My question is:

In uniflash target source, how to add debug messagees in source code? Can I add UART_printf() to show debug messagees?

BR.