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.

AM2634: AM2634: Downloading application image *appimage size issue with UART uniflash

Part Number: AM2634
Other Parts Discussed in Thread: UNIFLASH

Hi all

We try to uniflash by UART0  on our customer board with SDK V8.2

AM263x MCU+ SDK: Flashing Tools (ti.com)

We can Downloading *.appimage (210772byte) successfully  by python uart_uniflash.py,

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
>python uart_uniflash.py -p COM28 --cfg=default_sbl_qspi.cfg
Parsing config file ...
Parsing config file ... SUCCESS. Found 3 command(s) !!!
Executing command 1 of 3 ...
Found flash writer ... sending sbl_prebuilt/am263x-cc/sbl_uart_uniflash.release.tiimage
Sent flashwriter sbl_prebuilt/am263x-cc/sbl_uart_uniflash.release.tiimage of size 49534 bytes in 7.06s.
Executing command 2 of 3 ...
Command arguments : --file=../../am263x_zcu_sbl/Debug/am263x_zcu_sbl.tiimage --operation=flash --flash-offset=0x0
Sent ../../am263x_zcu_sbl/Debug/am263x_zcu_sbl.tiimage of size 124942 bytes in 15.17s.
[STATUS] SUCCESS !!!
Executing command 3 of 3 ...
Command arguments : --file=../../am263x_zcu/Release/am263x_zcu.appimage --operation=flash --flash-offset=0x80000
Sent ../../am263x_zcu/Release/am263x_zcu.appimage of size 210772 bytes in 22.64s.
[STATUS] SUCCESS !!!
All commands from config file are executed !!!
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

We can't completed downloading *.appimage (756319byte) by python uart_uniflash.py,

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
C:\GIT_HH\TI_AM263x_new\evw\tools\boot>python uart_uniflash.py -p COM28 --cfg=C:\GIT_HH\TI_AM263x_new\evw\tools\boot\sbl_prebuilt\am263x-cc\default_sbl_qspi_zcu.cfg
Parsing config file ...
Parsing config file ... SUCCESS. Found 3 command(s) !!!
Executing command 1 of 3 ...
Found flash writer ... sending sbl_prebuilt/am263x-cc/sbl_uart_uniflash.release.tiimage
Sent flashwriter sbl_prebuilt/am263x-cc/sbl_uart_uniflash.release.tiimage of size 49534 bytes in 7.69s.
Executing command 2 of 3 ...
Command arguments : --file=sbl_prebuilt/am263x-cc/sbl_qspi.release.tiimage --operation=flash --flash-offset=0x0
Sent sbl_prebuilt/am263x-cc/sbl_qspi.release.tiimage of size 56206 bytes in 8.65s.
[STATUS] SUCCESS !!!
Executing command 3 of 3 ...
Command arguments : --file=../../am263x_zcu/Release/am263x_zcu.appimage --operation=flash --flash-offset=0x80000
Sending ../../am263x_zcu/Release/am263x_zcu.appimage: 756317bytes [01:13, 10725.90bytes/s]recv error: getc timeout in start sequence
Sending ../../am263x_zcu/Release/am263x_zcu.appimage: 756319bytes [01:25, 10725.90bytes/s]expected sequence 2, got (seq1=1, seq2=1), receiving next block, will NAK.
recv error: purge, requesting retransmission (NAK)
Sending ../../am263x_zcu/Release/am263x_zcu.appimage: 756319bytes [01:30, 10725.90bytes/s]
[ERROR] XMODEM recv failed, no response OR incorrect response from EVM OR cancelled by user,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

have any  size limitation for uniflash *.appiamge?
please help us how to fix this issue

BR

JAY

  • Hi Jay, 

    Can you please verify your statements. I think there might be a typo making things unclear to me: 

    We can Downloading *.appimage (210772byte) successfully  by python uart_uniflash.py,
    We can't completed downloading *.appimage (756319byte) by python uart_uniflash.py,

    Is it just the appimage byte size difference that appears to be an issue? Can you please send over the two cfg files used for the flash writer? 

    Thanks,

    -Randy

  • Hi Jay,

    I heard there is the app image size limitation for 1MB, but 756KB is far away from it. There are two things you can try:

    1. Change the USB cable for UART (PC to J26) and try again.

    2. Use the sbl_jtag_uniflash to write your app image to 0x80000 of QSPI flash. If this works, then the problem is on UART communication.

    Best regards,

    Ming

  • Hi Randy

    cfg files is same one

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    #-----------------------------------------------------------------------------#
    # #
    # DEFAULT CONFIGURATION FILE TO BE USED WITH THE FLASHWRITER SCRIPT #
    # #
    #-----------------------------------------------------------------------------#
    #
    # By default this config file,
    # - points to pre-built flash writer, bootloader for this EVM
    # - The application image points to relative path of the ipc echo application image for this EVM
    # - Make sure this application is built before running this script
    # - You can customized this config file to point to your own bootloader and/or application images
    # - You can use --operation=flashverify if you just want to verify the flash contents and not flash the file.
    #
    # First point to sbl_uart_uniflash binary, which function's as a server to flash one or more files
    --flash-writer=sbl_prebuilt/am263x-cc/sbl_uart_uniflash.release.tiimage
    # Now send one or more files to flash or flashverify as needed. The order of sending files does not matter
    # When sending bootloader make sure to flash at offset 0x0. ROM expects bootloader at offset 0x0
    --file=sbl_prebuilt/am263x-cc/sbl_qspi.release.tiimage --operation=flash --flash-offset=0x0
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    It is just the appimage byte size difference that appears to be an issue

    we try to make different size appimage in same project 

    (1)Sent *.appimage of size 627796 bytes in 61.79s.
    [STATUS] SUCCESS !!!

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    Parsing config file ...
    Parsing config file ... SUCCESS. Found 3 command(s) !!!
    Executing command 1 of 3 ...
    Found flash writer ... sending sbl_prebuilt/am263x-cc/sbl_uart_uniflash.release.tiimage
    Sent flashwriter sbl_prebuilt/am263x-cc/sbl_uart_uniflash.release.tiimage of size 49534 bytes in 5.65s.
    Executing command 2 of 3 ...
    Command arguments : --file=sbl_prebuilt/am263x-cc/sbl_qspi.release.tiimage --operation=flash --flash-offset=0x0
    Sent sbl_prebuilt/am263x-cc/sbl_qspi.release.tiimage of size 56206 bytes in 8.66s.
    [STATUS] SUCCESS !!!
    Executing command 3 of 3 ...
    Command arguments : --file=../../am263x_zcu/Release/am263x_zcu.appimage --operation=flash --flash-offset=0x80000
    Sent ../../am263x_zcu/Release/am263x_zcu.appimage of size 627796 bytes in 61.79s.
    [STATUS] SUCCESS !!!
    All commands from config file are executed !!!
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    (2)Sending ../../am263x_zcu/Release/am263x_zcu.appimage: 639011bytes [01:02, 10727.11bytes/s]recv error: getc timeout in start sequence

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    Parsing config file ...
    Parsing config file ... SUCCESS. Found 3 command(s) !!!
    Executing command 1 of 3 ...
    Found flash writer ... sending sbl_prebuilt/am263x-cc/sbl_uart_uniflash.release.tiimage
    Sent flashwriter sbl_prebuilt/am263x-cc/sbl_uart_uniflash.release.tiimage of size 49534 bytes in 5.09s.
    Executing command 2 of 3 ...
    Command arguments : --file=sbl_prebuilt/am263x-cc/sbl_qspi.release.tiimage --operation=flash --flash-offset=0x0
    Sent sbl_prebuilt/am263x-cc/sbl_qspi.release.tiimage of size 56206 bytes in 8.66s.
    [STATUS] SUCCESS !!!
    Executing command 3 of 3 ...
    Command arguments : --file=../../am263x_zcu/Release/am263x_zcu.appimage --operation=flash --flash-offset=0x80000
    Sending ../../am263x_zcu/Release/am263x_zcu.appimage: 639011bytes [01:02, 10727.11bytes/s]recv error: getc timeout in start sequence
    Sending ../../am263x_zcu/Release/am263x_zcu.appimage: 639013bytes [01:12, 10727.11bytes/s]expected sequence 2, got (seq1=1, seq2=1), receiving next block, will NAK.
    recv error: purge, requesting retransmission (NAK)
    Sending ../../am263x_zcu/Release/am263x_zcu.appimage: 639013bytes [01:12, 10727.11bytes/s]
    [ERROR] XMODEM recv failed, no response OR incorrect response from EVM OR cancelled by user,
    Power cycle EVM and run this script again !!!
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    BR

    JAY

  • Hi Ming

    1. Our USB cable for UART connect UART0, what is UART (PC to J26) meaning?

    UART (PC to J26)

    2. Use the sbl_jtag_uniflash to write your app image to 0x80000 of QSPI flash. If this works, then the problem is on UART communication.

    2. we try to use the sbl_jtag_uniflash to write your app image to 0x80000 of QSPI flash. Verify file in Flash is Verifying success!!

    but we restart board with qspi boot is fail, uart log output nothing

    how to flash sbl image and *appimage by sbl_jtag_uniflash? 

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    [Cortex_R5_0]
    ==================
    JTAG Uniflash Menu
    ==================
    1: Erase Complete Flash
    2: Write File to Flash and Verify
    3: Verify file in Flash
    x: Exit
    Enter Choice: 2
    Enter file name along with path to write or verify : C:\GIT_HH\TI_AM263x_new\evw\am263x_zcu\Release\am263x_zcu.appimage
    Enter flash offset (in hex format) : 0x80000
    Enter below command in CCS scripting console to load the file data to memory.
    AFTER the file load is done, enter '1' to continue ...
    loadRaw(0x70040020, 0, "C:/GIT_HH/TI_AM263x_new/evw/am263x_zcu/Release/am263x_zcu.appimage", 32, false);
    1
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    BR

    JAY

  • Hi Jay,

    Sorry, I was mixed the AM263x CC and the AM243x EVM. You are correct, the JTAG and UART are using the same USB cable for AM263x CC. Please ignore what I said about the USB cable in previous post.

    In order to write the SBL QSPI and the app image, you will need to call the sbl_jtag_uniflash twice. 1st time do the whole flash erase and write the sbl_qspi at flash address 0x00000, then 2nd time, do not erase the flash, just write the app image at 0x80000 in flash. 

    In both runs, make sure you use the CCS script (loadRaw) to load your sbl_qspi and app image before enter "1" to continue.

    Best regards,

    Ming

  • Hi Ming

    We try to write the SBL QSPI and the app image,call the sbl_jtag_uniflash twice,  qspi boot success.

    (1) when loadraw  appimage, show time out after 10000ms in scripting console, but Verifying success!!...

    (2)SBL_JTAG_UNIFLASH *appimage(756319byte) is ok,what problem with SBL_UART_UNIFLASH?

    2. Use the sbl_jtag_uniflash to write your app image to 0x80000 of QSPI flash. If this works, then the problem is on UART communication.

    BR

    JAY

  • Hi Jay,

    It has nothing to do with the sbl_jtag_uniflash, is is the CCS loading the app image error. Looks like your on-board XDS-110 setting has some issue. Can you please check your "JTAG TCLK Frequency in your target configuration file (CCXML). Mine is look like the following (1Mhz):

    I do not have problem to load big app image file.

  • Hi Ming

    Looks like your on-board XDS-110 setting has some issue. Can you please check your "JTAG TCLK Frequency in your target configuration file (CCXML). Mine is look like the following (1Mhz):

    We use XDS200 to connect AM263X target, target configuration file (CCXML) as following 

     and loading sbl_uart_jtag.out program is OK, as following

    I do not have problem to load big app image file.

    You means load big app image file (>752kb) with SBL UART UNIFLASH is ok?

    How to debug this issue on our board with BL UART UNIFLASH ?

    BR

    JAY

  • Hi Jay,

    I am a little confused here. In your post 4 days ago (1) you mentioned the loadraw for appimage (752KB) timed out when you use the sbl_jtag_uniflash 2nd time. I think it is caused by the JTAG TCLK was set too high. Now you are saying that your loadraw of the appimage is OK. Does that means you are OK with sbl_jtag_uniflash? i.e. you can flash both sbl_qspi (0x00000) and your appimage (0x80000) to the flash using sbl_jtag_uniflash? If that is true, your application should work from flash boot mode. Then the next thing is the sbl_uart_uniflash debugging, because the only difference between the sbl_jtag_uniflash and sbl_uart_unflash is the UART communication.

    BTW, I did tried to loadraw appimage (620KB). It works when the JTAG TCLK is set to 1Mhz using sbl_jtag_unflash from MCU+ SDK 08.02.00.30 on AM263x CC with on-board XDS-110.

    Best regards,

    Ming 

  • Hi Ming

    1) you mentioned the loadraw for appimage (752KB) timed out when you use the sbl_jtag_uniflash 2nd time. I think it is caused by the JTAG TCLK was set too high. Now you are saying that your loadraw of the appimage is OK. Does that means you are OK with sbl_jtag_uniflash? i.e. you can flash both sbl_qspi (0x00000) and your appimage (0x80000) to the flash using sbl_jtag_uniflash? If that is true, your application should work from flash boot mode.

    (1) Yes , when sbl_jtag_uniflash loadraw  appimage show time out after 10000ms in scripting console, but sbl_jtag_uniflash Verifying success!!... =>so our application appimage (752KB)  work good from flash boot mode with sbl_jtag_uniflash 
    (2) Next thing is the sbl_uart_uniflash debugging, please advise us how to fix this issue.

    BR

    JAY

  • Hi Jay,

    I will start with the UART communication and buffer arrangement of the sbl_uart_uniflash. Please add some debug log info into sbl_uart_uniflash to check where the error is happening. It could be the UART communication related issue, such as receive error. Or it could be the receiving buffer is too small or overlap with data buffer/ code section etc.

    Meanwhile, I will report is error to the software development team for further advice.

    Thanks!

    Ming