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.

LP-AM263: Flashing QSPI on Linux machine

Part Number: LP-AM263
Other Parts Discussed in Thread: UNIFLASH

Hi all,

we are trying to make the flashing procedure work on a Linux machine using the instructions

https://software-dl.ti.com/mcu-plus-sdk/esd/AM263X/09_01_00_41/exports/docs/api_guide_am263x/GETTING_STARTED_FLASH.html#autotoc_md50

So far we have validated that the AM263x LP USB port enumerates as /dev/ttyACM0 and that on minicom (# minicom -w -D/dev/ttyACM0) we can see CCCC strings.

Bootmode switch is set to 0111.

After closing minicom, and starting up the command line python flashing utility, we see the following

gunter@Linux-005:~/ti/mcu_plus_sdk_am263x_09_01_00_41/tools/boot$ python3 uart_uniflash.py -p /dev/ttyACM0 --cfg=sbl_prebuilt/am263x-lp/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-lp/sbl_uart_uniflash.release.tiimage
Sending sbl_prebuilt/am263x-lp/sbl_uart_uniflash.release.tiimage: 0%| | 0/41113 [00:00<?, ?bytes/s]send error: expected NAK, CRC, EOT or CAN; got b'e'
send error: expected NAK, CRC, EOT or CAN; got b'8'
send error: expected NAK, CRC, EOT or CAN; got b'6'
send error: expected NAK, CRC, EOT or CAN; got b'1'
send error: expected NAK, CRC, EOT or CAN; got b'b'
send error: expected NAK, CRC, EOT or CAN; got b'e'
send error: expected NAK, CRC, EOT or CAN; got b'f'
send error: expected NAK, CRC, EOT or CAN; got b'6'
send error: expected NAK, CRC, EOT or CAN; got b'e'
send error: expected NAK, CRC, EOT or CAN; got b'4'
send error: expected NAK, CRC, EOT or CAN; got b'b'
send error: error_count reached 10, aborting.
Sending sbl_prebuilt/am263x-lp/sbl_uart_uniflash.release.tiimage: 0%| | 2/41113 [00:00<00:21, 1897.88bytes/s]
[ERROR] XMODEM send failed, no response OR incorrect response from EVM OR cancelled by user,
Power cycle EVM and run this script again !!!

What could be the issue here?

Regards,

--Gunter

  • Hi Gunter Schmer,

    Can you confirm if the /dev/ttyACM0 correct port ? It looks like there are prints on this terminal. Can you open the terminal and confirm if you are getting prints like these -

    https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1119575/faq-mcu-plus-sdk-am243x-how-to-debug-sbl_qspi-for-am263-and-am273-or-sbl_ospi-for-am243-or-an-application-which-is-booted-via-ospi-qspi-boot

    I hope this helps.

    Best Regards,
    Aakash

  • Hi Aakash,

    I can confirm that 

    # minicom -w -D/dev/ttyACM0

    shows the expected CCCCCC... output

    Before running the python flashing utility, we are closing minicom though.

    Regards,

    --Gunter

  • Hi Aakash,

    I noticed that I have an HS-FS board, after reading this 

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1233883/processor-sdk-am64x-am64x-sk-getting-started-process-in-sdk-not-working

    The board shows the following

    Latitude-E7450:~/ti/mcu_plus_sdk_am263x_09_01_00_41/tools/boot/socid_parser$ python3 uart_boot_socid.py -d am263x -f data.txt
    data.txt
    ---------------------------
    SoC ID HW Info:
    ---------------------------
    partID : 0x0
    partNumber : 0x2
    PGVer : 0x2
    ROMVer : 0x1
    MetalVer : 0x0
    ---------------------------
    SoC ID R5 ROM Info:
    ---------------------------
    r5 ROM Ver : 0x10000
    ---------------------------
    SoC ID HSM Pub ROM Info:
    ---------------------------
    devName : AM263X
    devType : HS_FS
    hsm ROM Ver : 0x10000

    Is there an FAQ to build and flash the HS-FS binaries?

    Thanks!

    --Gunter

  • Hi ,

    AM64x device is very different from AM263x. The same method may not work for you.
    Can you try doing the same immediately after the power on reset is asserted ?

    Best Regards,
    Aakash

  • Hi Aakash,

    the behavior is the same, right after power on reset, then running the command right away:

    Linux-005:~/ti/mcu_plus_sdk_am263x_09_01_00_41/tools/boot$ python3 uart_uniflash.py -p /dev/ttyACM0 --cfg=sbl_prebuilt/am263x-lp/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-lp/sbl_uart_uniflash.release.tiimage
    Sending sbl_prebuilt/am263x-lp/sbl_uart_uniflash.release.tiimage: 0%| | 0/41113 [00:00<?, ?bytes/s]send error: expected NAK, CRC, EOT or CAN; got b'0'
    send error: expected NAK, CRC, EOT or CAN; got b'4'
    send error: expected NAK, CRC, EOT or CAN; got b'6'
    send error: expected NAK, CRC, EOT or CAN; got b'2'
    send error: expected NAK, CRC, EOT or CAN; got b'5'
    send error: expected NAK, CRC, EOT or CAN; got b'd'
    send error: expected NAK, CRC, EOT or CAN; got b'c'
    send error: expected NAK, CRC, EOT or CAN; got b'b'
    send error: expected NAK, CRC, EOT or CAN; got b'0'
    send error: expected NAK, CRC, EOT or CAN; got b'7'
    send error: expected NAK, CRC, EOT or CAN; got b'6'
    send error: error_count reached 10, aborting.
    Sending sbl_prebuilt/am263x-lp/sbl_uart_uniflash.release.tiimage: 0%| | 2/41113 [00:00<00:21, 1931.52bytes/s]
    [ERROR] XMODEM send failed, no response OR incorrect response from EVM OR cancelled by user,
    Power cycle EVM and run this script again !!!

    Can you do two things on your setup:

    [] Validate that you also have an HS-FS board with uart_boot_socid.py

    [] On a Linux machine, run the command above and paste your output.

    Does the HS-FS not require signed images to be flashed?? That is why I am asking for a precise FAQ for the HS-FS device/board.

    Trying to get to the bottom of this.

    Thanks,

    --Gunter

  • Hello,

    I am successfully able to flash on am263x-lp board using "python uart_uniflash.py -p COM17 --cfg=sbl_prebuilt/am263x-lp/default_sbl_qspi.cfg". I have attached logs below:

    C:\ti\mcu_plus_sdk\tools\boot>python uart_uniflash.py -p COM17 --cfg=sbl_prebuilt/am263x-lp/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-lp/sbl_uart_uniflash.release.tiimage
    Sent flashwriter sbl_prebuilt/am263x-lp/sbl_uart_uniflash.release.tiimage of size 42145 bytes in 5.91s.
    
    Executing command 2 of 3 ...
    Command arguments : --file=sbl_prebuilt/am263x-lp/sbl_qspi.release.tiimage --operation=flash --flash-offset=0x0
    Sent sbl_prebuilt/am263x-lp/sbl_qspi.release.tiimage of size 227181 bytes in 23.83s.
    [STATUS] SUCCESS !!!
    
    Executing command 3 of 3 ...
    Command arguments : --file=../../examples/hello_world/am263x-lp/r5fss0-0_nortos/ti-arm-clang/hello_world.release.appimage --operation=flash --flash-offset=0x80000
    Sending ../../examples/hello_world/am263x-lp/r5fss0-0_nortos/ti-arm-clang/hello_world.release.appimage: 30870bytes [00:0Sending ../../examples/hello_world/am263x-lp/r5fss0-0_nortos/ti-arm-clang/hello_world.release.appimage: 30871bytes [00:0Sending ../../examples/hello_world/am263x-lp/r5fss0-0_nortos/ti-arm-clang/hello_world.release.appimage: 30872bytes [00:0Sending ../../examples/hello_world/am263x-lp/r5fss0-0_nortos/ti-arm-clang/hello_world.release.appimage: 30873bytes [00:0Sending ../../examples/hello_world/am263x-lp/r5fss0-0_nortos/ti-arm-clang/hello_world.release.appimage: 30874bytes [00:0                                                                                                                        Sent ../../examples/hello_world/am263x-lp/r5fss0-0_nortos/ti-arm-clang/hello_world.release.appimage of size 30388 bytes in 5.73s.
    [STATUS] SUCCESS !!!
    
    All commands from config file are executed !!!

    My board info:

    ---------------------------
    SoC ID HW Info:
    ---------------------------
    partID               : 0x0
    partNumber           : 0x2
    PGVer                : 0x3
    ROMVer               : 0x2
    MetalVer             : 0x1
    ---------------------------
    SoC ID R5 ROM Info:
    ---------------------------
    r5 ROM Ver           : 0x10100
    ---------------------------
    SoC ID HSM Pub ROM Info:
    ---------------------------
    devName              : AM263X
    devType              : HS_FS
    hsm ROM Ver          : 0x10100

    Can you verify if your "sbl_uart_uniflash.release.tiimage and sbl_qspi.release.tiimage" are latest for am263x-lp?
    I am attaching "sbl_uart_uniflash.release.tiimage and sbl_qspi.release.tiimage" files used for flashing, do verify with these if you still get this issue.https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/sbl_5F00_uart_5F00_uniflash.release.tiimage

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/sbl_5F00_qspi.release.tiimage

    Best Regards,
    Gunjan