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.

SK-AM62A-LP: XMODEM send failed

Part Number: SK-AM62A-LP
Other Parts Discussed in Thread: SYSCONFIG, UNIFLASH

Hello,

I'm working with SK-AM62A-LP evaluation board.

I'm trying to mcu_plus_sdk_am62ax_09_01_00_39 documentation and can't pass the "EVM Setup" stage.

I downloaded all the tools and installed them. I managed to compile everything.

The tools:

1. ccs1260

2. mcu_plus_sdk_am62x_09_01_00_39

3. sysconfig_1.18.0

4. ti-cgt-armllvm_3.2.0.LTS

5. ti-cgt-c7000_4.1.0.LTS

6. ti-processor-sdk-linux-rt-am62xx-evm-09.01.00.08

# python3 --version
Python 3.10.12

# openssl version
OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)

I'm running on Ubuntu 22.04.4LTS.

I configured the switches to "UART BOOT MODE" and I can see "C" printed every several seconds on the serial terminal.

While trying to burn SBL NULL by executing the command:
# sudo python3 uart_uniflash_gui.py -p /dev/ttyUSB0 --cfg=sbl_prebuilt/am62x-sk/default_sbl_null_hs_fs.cfg
I'm failing in stage 2/5 of this process. The first stage of upload pass.
with error: 
Executing command 2 of 5 ...
Command arguments : --file=../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs --operation=flash --flash-offset=0x0
Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs:   0%| | 0/124458 [00:00<?, ?bytes/send 
error: expected NAK, CRC, EOT or CAN; got b'0'
...
[ERROR] XMODEM send failed, no response OR incorrect response from EVM OR cancelled by user,
Power cycle EVM and run this script again !!!
Did tried to change the board/cables/computers.
Every time I'm stuck at the same point.
Tried to find the solution in TI forums, but without success.
Any suggestions are welcome)
  • Hello,

    This is the python output:
    python3 7080.uart_boot_socid.py data.txt 
    -----------------------
    SoC ID Header Info:
    -----------------------
    NumBlocks            : [2]
    -----------------------
    SoC ID Public ROM Info:
    -----------------------
    SubBlockId           :
    SubBlockSize         :
    DeviceName           : am62a
    DeviceType           : HSFS
    DMSC ROM Version     : [0, 0, 8, 0]
    R5 ROM Version       : [0, 0, 8, 0]
    -----------------------
    SoC ID Secure ROM Info:
    -----------------------
    Sec SubBlockId       : 2
    Sec SubBlockSize     : 166
    Sec Prime            : 0
    Sec Key Revision     : 0
    Sec Key Count        : 0
    Sec TI MPK Hash      :
    Regards
  • Hi Daniel,

    Command arguments : --file=../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs --operation=flash --flash-offset=0x0

    The parser says that your board is AM62A but I see here you are using AM62x MCU+ SDK. Please work with the MCU+ SDK for AM62A

    MCU-PLUS-SDK-AM62A Software development kit (SDK) | TI.com

    Regards,

    Prashant

  • Hi Prashant,

    Thanks a lot for the quick response.

    I downloaded mcu_plus_sdk_am62ax_09_01_00_39-linux-x64-installer.run file and I'll try to follow the install process once again.

    Just wondering, how a different SDK can fix the XMODEM send fail?

    Regards

  • Hi,

    The update from my side:

    After downloaded, installed and compiled the SDK I managed to burn EVB!!!

    This is the correct log:

    python3 uart_uniflash.py -p /dev/ttyUSB1 --cfg=sbl_prebuilt/am62ax-sk/default_sbl_null_hs_fs.cfg

    Parsing config file ...
    Parsing config file ... SUCCESS. Found 4 command(s) !!!

    Executing command 1 of 4 ...
    Found flash writer ... sending sbl_prebuilt/am62ax-sk/sbl_uart_uniflash_stage1.release.hs_fs.tiimage
    Sent flashwriter sbl_prebuilt/am62ax-sk/sbl_uart_uniflash_stage1.release.hs_fs.tiimage of size 258248 bytes in 25.25s.

    Executing command 2 of 4 ...
    Command arguments : --file=../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs --operation=flash --flash-offset=0x0
    Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 125538bytes [00:11, 10719.57bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 125538bytes [00:11, 10719.57bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126567bytes [00:11, 10719.57bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126568bytes [00:11, 10719.57bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126569bytes [00:13, 10719.57bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126570bytes [00:13, 10719.57bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126571bytes [00:13, 10719.57bytes Sent ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs of size 125178 bytes in 13.34s.
    [STATUS] SUCCESS !!!

    Executing command 3 of 4 ...
    Command arguments : --file=sbl_prebuilt/am62ax-sk/sbl_null.release.hs_fs.tiimage --operation=flash --flash-offset=0x0
    Sent sbl_prebuilt/am62ax-sk/sbl_null.release.hs_fs.tiimage of size 292552 bytes in 30.49s.
    [STATUS] SUCCESS !!!

    Executing command 4 of 4 ...
    Command arguments : --file=../../examples/hello_world/am62ax-sk/r5fss0-0_freertos/ti-arm-clang/hello_world.release.appimage.hs_fs --operation=flash --flash-offset=0xC0000
    Sent ../../examples/hello_world/am62ax-sk/r5fss0-0_freertos/ti-arm-clang/hello_world.release.appimage.hs_fs of size 143338 bytes in 16.54s.
    [STATUS] SUCCESS !!!

    All commands from config file are executed !!!

    Thanks a lot!!!

    Regards

  • Hi Daniel,

    Just wondering, how a different SDK can fix the XMODEM send fail?

    The XMODEM send failed because the `sbl_uart_uniflash_stage1`, which is sent in command 1, failed to boot on your board. Since it failed to boot, there will be nothing on the board waiting to receive next images and so the XMODEM fails in trying to send the next images.

    So, when you use the correct `sbl_uart_uniflash_stage1` from AM62A SDK, it boots correctly and waits for next images to be sent via XMODEM.

    Regards,

    Prashant

  • Hello,

    I would like to ask an additional question:

    I'm following the SDK doc and want to flash a Hello World example.

    I built linuxAppimageGen and HSMAppimageGen

    Built all the binaries with the command:

    make DEVICE=am62ax -sj

    # cd tools/boot

    # python3 uart_uniflash.py -p /dev/ttyUSB0 --cfg=sbl_prebuilt/am62ax-sk/default_sbl_ospi_nand_linux_hs_fs.cfg

    Parsing config file ...
    Parsing config file ... SUCCESS. Found 10 command(s) !!!

    Executing command 1 of 10 ...
    Found flash writer ... sending sbl_prebuilt/am62ax-sk/sbl_uart_uniflash_stage1.release.hs_fs.tiimage
    Sent flashwriter sbl_prebuilt/am62ax-sk/sbl_uart_uniflash_stage1.release.hs_fs.tiimage of size 258279 bytes in 26.41s.

    Executing command 2 of 10 ...
    Command arguments : --file=../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs --operation=flash --flash-offset=0x0
    Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 125538bytes [00:11, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 125538bytes [00:11, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126567bytes [00:11, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126568bytes [00:11, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126569bytes [00:13, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126570bytes [00:13, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126571bytes [00:13, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126572bytes [00:13, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126573bytes [00:13, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126574bytes [00:13, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126575bytes [00:13, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126576bytes [00:13, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126577bytes [00:13, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126578bytes [00:13, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126579bytes [00:13, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126580bytes [00:13, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126581bytes [00:13, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126582bytes [00:13, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126583bytes [00:13, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126584bytes [00:13, 10728.09bytes/s]error_count reached 16, aborting.
    Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126585bytes [00:13, 10728.09bytesSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs: 126586bytes [00:13, 10728.09bytes/s]
    [ERROR] XMODEM recv failed, no response OR incorrect response from EVM OR cancelled by user,
    Power cycle EVM and run this script again !!!

    Looks like it downloaded 99% of the file, but again, something went wrong (

    Can you advise me please on this one?

    Regards

  • Hi Daniel,

    The flashing procedure was successful previously. So, have you modified something that may be causing the flashing failure now?

  • Hello Prashant,

    I'm not sure that I made some changes. To be on the safe side, I removed the SDK folder, and installed it again. Just compiled it without changing anything.

    It is not working now, I can't even burn SBL NULL anymore.

    In the main SDK folder,

    Inside the file devconfig/devconfig.mak the DEVICE_TYPE?=GP

    Inside makefile DEVICE_TYPE?=GP

    Executed command: make -sj4 all

    The next step is to change dir to tools/boot and try to flash

    sudo python3 uart_uniflash.py -p /dev/ttyUSB0 --cfg=sbl_prebuilt/am62ax-sk/default_sbl_null_hs_fs.cfg

    First stage pass, second stage reaches 99% and fails with "error_count reached 16, aborting

    [ERROR] XMODEM recv failed, no response OR incorrect response from EVM OR cancelled by user,"

    I'm lost ;-( 

    Please advice

    Regards

  • Hello Daniel,

    Can you once try the following set of uniflash images for the flashing procedure.

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

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/8233.sbl_5F00_uart_5F00_uniflash_5F00_stage2.release.appimage.hs_5F00_fs

    Regards,

    Prashant

  • Hello,

    I modified my sbl_prebuilt/am62ax-sk/default_sbl_null_hs_fs.cfg to take your 2 files.

    Stage 1 passed. In stage 2 the progress bar reached 100% but  a process failed with error_count reached 16, aborting again, as before

    Regards

  • Hello Daniel,

    That's weird. Since you are working with TI AM62A board, the images should have worked.

    It looks like the Stage1 is able to receive the full Stage2 image but some error comes in booting it. This means the Stage1 won't send the ACK and so the Python Uniflash script times out.

    Can you please try debugging the Stage1 and identify the point of failure? You can follow the below procedure for debugging

    1) Inject an infinite loop like shown below. This will make Stage1 receive the Stage2 image over UART but then gets stuck in the infinite loop.

    2) Built the SDK in debug mode.

    gmake -sj4 PROFILE=debug all

    3) Change the word 'release' to 'debug' in the .cfg file to point to the debug images.

    4) Perform the flashing procedure.

    5) Once the Python Uniflash script finishes, connect to the EVM using CCS.

    6) Connect to the WKUP R5F core.

    7) Load the Uniflash Stage1 symbols using:

    Run -> Load -> Load Symbols... -> Browse -> <MCU_PLUS_SDK_PATH>/examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage1/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage1.debug.out

    8) Make the loop variable equal to 0 using the Variables view (View -> Variables)

    9) Step into the code & note the first point when the status becomes failure.

    Regards,

    Prashant

  • Hi,

    What I did:

    Inside SDK path:

    1. Edited examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage1/am62ax-sk/r5fss0-0_nortos/main.c ( added loop_forever) 
    2. make -sj4 PROFILE=debug all
    2. cd tools/boot
    3. Edit sbl_prebuilt/am62ax-sk/default_sbl_null_hs_fs.cfg
    in 4 files changed release to debug
    4. Flash with command: python3 uart_uniflash.py -p /dev/ttyUSB0 --cfg=sbl_prebuilt/am62ax-sk/default_sbl_null_hs_fs.cfg
    The flash process failed with stage 2 reaching 99%
    "Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.debug.appimage.hs_fs: 155396bytes [00:16, 10717.40bytes/s]error_count reached 16, aborting.
    ...
    [ERROR] XMODEM recv failed, no response OR incorrect response from EVM OR cancelled by user, "

  • Hi Daniel,

    After these steps, the Uniflash Stage1 will be trapped inside the infinite loop. Now, you can use the CCS to connect to the WKUP R5F core and debug the Stage1 to know the exact point of failure. Please refer to 6 to 9 in my previous reply.

  • Hi,

    Do I need a debugger for that? 

    If yes, I don't have one right now

  • Hi,

    If yes, I don't have one right now

    The TI AM62A board already has one XDS110 debugger on-board. It can be directly used with CCS to debug any core.

  • Hi,

    I haven't tried to work with XDS110 debugger before. I located some PDF under ccs1260/ccs/ccs_base/common/uscif/xds110/XDS110SupportReadMe.pdf

    So I tried to run from ccs1260/ccs/ccs_base/common/uscif/xds110

    ./xdsdfu -e

    USB Device Firmware Upgrade Utility
    Copyright (c) 2008-2019 Texas Instruments Incorporated. All rights reserved.

    Scanning USB buses for supported XDS110 devices...


    Found 0 devices.

    ./xds110reset
    ERROR: Failed to connect to XDS110 (-260).
    Check USB connection to the XDS110.

    The board is "UART BOOT MODE", powered ON and the serial cable connected to PC.

    What am I missing?

    Please advice

  • Hi Daniel,

    If you are on Linux, there are some one-time setup steps needed to use the CCS. I think let's put aside the debugger for now. We can try debugging with the print statement. If we feel this isn't working, I can help you setup the CCS then.

    So, the idea is we simply add a bunch of debug statements and see which one is not printing. I highly suspect the Stage1 fails in App_loadSelfcoreImage so we can probably add something like

    After adding a bunch of print statements, please add the UART logging also in the Uniflash Stage1 Sysconfig (make sure the settings in red boxes matches)

    Then,

    - Open all the UART ports corresponding to the board except the one used with `uart_uniflash.py`.

    - Perform the flashing procedure.

    - You should be seeing the debug statements on one of the UART.

    Regards,

    Prashant

  • Hi,

    I'm with you and do what ever you say)

    I opened sysconfig and managed to configure the "Debug log" tab as in your picture

    debug_uart.png

    But in other tabs looks like you configured some other stuff too. Do I need to configure those too? ( for example in MPU ARMv7 you have 14/16 and I have only 1)

    I'm a bit confused about the rest of the procedure after I changed UART in sysconfig.

    I saved the configuration and what I should do now? Do I need to load/ activate it somehow?

    In CCS open other 3 /dev/ttyUSB1,2,3 terminals?

    Regards

  • Hi Daniel,

    The Sysconfig file you have opened doesn't look it is of Uniflash Stage1.

    Have you opened the Uniflash Stage1 Sysconfig with

    ~/ti/mcu_plus_sdk/am62a/09_01_00_39
    ❯ gmake -s -C examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage1/am62ax-sk/r5fss0-0_nortos/ti-arm-clang syscfg-gui

    I'm a bit confused about the rest of the procedure after I changed UART in sysconfig.

    After the changes, rebuild the SDK in debug mode with

    make -sj4 PROFILE=debug all

    and then as usual perform the flashing procedure.

  • Hi,

    This one looks better?

    I used the below command:

    mcu_plus_sdk_am62ax_09_01_00_39$ make -s -C examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage1/am62ax-sk/r5fss0-0_nortos/ti-arm-clang syscfg-gui

    Regards

  • This one looks better?

    Yes, this looks good and the changes as well. Rebuild and perform the flashing procedure.

    I hope you have removed the loop_forever previously suggested to debug with CCS.

  • Hi,

    A small update.

    I don't know how or why, but ..

    With sysconfig opened, main.c file changed (added 2 debug prints ), recompiling the SDK with "make -sj4 PROFILE=debug all" I managed to pass all 4 stages in flash process with the command:

    python3 uart_uniflash.py -p /dev/ttyUSB0 --cfg=sbl_prebuilt/am62ax-sk/default_sbl_null_hs_fs.cfg

    What should I try next?

  • This is interesting.

    Just for confirmation purposes, can you revert back the changes and see if the issue comes back again?

  • Hi,

    OK,

    I'm going to close all changes in main.c, recompile the SDK, reset the board, reset the sysconfig and then flash it.

    Let you know the result in 1 min

  • Well,

    I did change main.c

    Recompiled SDK

    Rebooted board

    Pressed RESTART button in sysconfig

    Command "python3 uart_uniflash.py -p /dev/ttyUSB0 --cfg=sbl_prebuilt/am62ax-sk/default_sbl_null_hs_fs.cfg" failed on stage 2

    :-(

  • Hi Daniel,

    This is very weird. I am curious to find out why simply adding those changes results in the successful flashing procedure. Good thing is I believe with those changes you are at least unblocked now and so can continue with your development activities.

    But I really would like to find out the root cause of the flashing failure with the unchanged images. If you are interested, we can work together to find the root cause.

    ----------

    Regarding the CCS setup on Linux, you can follow the below link

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1321654/sk-am62a-lp-xds110-debug-probe-integrated-is-not-accesible/5030843#5030843

  • Hi,

    Sure, I would like to work together and find a solution to this behavior.

    Thanks for the support!

    Regards 

  • Hi Daniel,

    Thanks. I will get back on this thread on Monday. Have a good weekend!

  • Hello Prashant,

    I'm back. This is my status so far:

    The whole SDK is installed with DEBUG.

    sbl_prebuilt/am62ax-sk/default_sbl_null_hs_fs.cfg is edited and 4 files are changed to debug.

    examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage1/am62ax-sk/r5fss0-0_nortos/main.c added a few debug prints nad closed loop_forever()

    Boot switches are in UART BOOT MODE.

    sysconfig not running, ccs not running

    I was trying to achieve some consistency with the flashing process, so I executed it several times.

    After each flashing process, I powered down and pressed the reset buttons.

    The results after approximately 10 times are:

     8 times fail with error counter 16 at stage 2 of the flashing process.

    "Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.debug.appimage.hs_fs: 155396bytes [00:16, 10718.27bytes/s]error_count reached 16, aborting."

    1 time fail with getc timeout:

    "Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.debug.appimage.hs_fs: 155383bytes [00:36, 263.28bytes/s]recv error: getc timeout in start sequence"

    and 1 time the process is successfully flashed.

    In the beginning, I would like to be certain that I can flash the board each time.

    Regards

  • Hi Daniel,

    I think we need the CCS here to see what is going on.

    If you have done the CCS setup, can you please connect to the WKUP R5F core after the failed flashing procedure and note down the address at which the core is suspended.

    If the address looks something like 0x43xxxxxx then we are definitely in the Uniflash Stage1 then by loading the Symbols you can also see where the control is actually in the code.

    Regards,

    Prashant

  • Hi,

    Can you please guide me please how to connect to the WKUP R5F?

  • Hi Prashant,

    Today I tried to switch again the evb.

    I changed Rev A board to Rev E2.

    I cleaned SDK and rebuilt it again with the release flag.

    I modified back the sbl_prebuilt/am62ax-sk/default_sbl_null_hs_fs.cfg (replaced  debug with release in file names)

    This time I did managed to flash the board ( even several times in a raw).

    This looks promising now and I feel confident to progress to the next stage in SDk, which is flashing Hello World example.

    I'll update you later with this one.

    Regards

  • Hi Daniel,

    It looks like this might be a particular board revision issue.

    Can you please share a picture of your Rev A board? I will try to find the same revision board. If I find one, I will see if the issue comes.

    Let me know in case you are stuck anywhere with Rev E2 board.

    Regards,

    Prashant

  • Hi,

    https://www.ti.com/lit/ug/spruj66a/spruj66a.pdf?ts=1711442723910&ref_url=https%253A%252F%252Fwww.google.com%252F

    On pages 8 and 9 you can find images of boards and their revisions.

    And now an update regarding flashing the Hello world.

    I did manage to build everything and flash, but ...

    After switching to OSPI NAND BO2OT mode I opened 4 terminals and those are the received outputs:

    On /dev/ttyUSB2 I received:

    Sciserver Testapp Built On: Mar 26 2024 12:02:57
    Sciserver Version: v2023.12.0.0-REL.MCUSDK.09.01.00.39+
    RM_PM_HAL Version: v09.01.08
    Starting Sciserver..... PASSED
    [IPC RPMSG ECHO] Version: REL.MCUSDK.09.01.00.39+ (Mar 26 2024 12:03:40):  

    On /dev/ttyUSB3 I received:

    [IPC RPMSG ECHO] Version: REL.MCUSDK.09.01.00.39+ (Mar 26 2024 12:03:39): 

    On /dev/ttyUSB0 I received:

    DMSC Firmware Version 9.1.8--v09.01.08 (Kool Koala)
    DMSC Firmware revision 0x9
    DMSC ABI revision 3.1
    
    [BOOTLOADER_PROFILE] Boot Media       : FLASH 
    [BOOTLOADER_PROFILE] Boot Media Clock : 166.667 MHz 
    [BOOTLOADER_PROFILE] Boot Image Size  : 183 KB 
    [BOOTLOADER_PROFILE] Cores present    : 
    mcu-r5f0-0
    r5f0-0
    [BOOTLOADER PROFILE] System_init                      :      37199us 
    [BOOTLOADER PROFILE] Board_init                       :          0us 
    [BOOTLOADER PROFILE] Drivers_open                     :        193us 
    [BOOTLOADER PROFILE] Board_driversOpen                :       5383us 
    [BOOTLOADER PROFILE] Sciclient Get Version            :       9910us 
    [BOOTLOADER PROFILE] App_waitForMcuPbist              :          5us 
    [BOOTLOADER PROFILE] App_loadImages                   :       3406us 
    [BOOTLOADER PROFILE] App_loadSelfcoreImage            :       6478us 
    [BOOTLOADER_PROFILE] SBL Total Time Taken             :      62576us 
    
    Image loading done, switching to application ...
    Starting MCU-r5f and 2nd stage bootloader
    
    DMSC Firmware Version 9.1.8--v09.01.08 (Kool Koala)
    DMSC Firmware revision 0x9
    DMSC ABI revision 3.1
    
    [BOOTLOADER_PROFILE] Boot Media       : FLASH 
    [BOOTLOADER_PROFILE] Boot Media Clock : 166.667 MHz 
    [BOOTLOADER_PROFILE] Boot Image Size  : 1102 KB 
    [BOOTLOADER_PROFILE] Cores present    : 
    hsm-m4f0-0
    r5f0-0
    a530-0
    c75ss0
    [BOOTLOADER PROFILE] System_init                      :       1771us 
    [BOOTLOADER PROFILE] Board_init                       :          0us 
    [BOOTLOADER PROFILE] Drivers_open                     :        218us 
    [BOOTLOADER PROFILE] Board_driversOpen                :       5446us 
    [BOOTLOADER PROFILE] Sciclient Get Version            :       9996us 
    [BOOTLOADER PROFILE] App_loadImages                   :       2044us 
    [BOOTLOADER PROFILE] App_loadSelfcoreImage            :       6684us 
    [BOOTLOADER PROFILE] App_loadLinuxImages              :      27919us 
    [BOOTLOADER PROFILE] App_loadDSPImages                :       6411us 
    [BOOTLOADER_PROFILE] SBL Total Time Taken             :      60493us 
    
    Image loading done, switching to application ...
    Starting linux and RTOS/Baremetal applications
    NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d32-dirty
    NOTICE:  BL31: Built : 09:34:15, Aug 24 2023
    
    U-Boot SPL 2023.04-gb0d717b732 (Dec 06 2023 - 15:11:45 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
    am62a_init: board_init_f done
    am62a_init: spl_boot_device: devstat = 0x3 bootmedia = 0x10 bootindex = 0
    Trying to boot from SPINAND
    am62a_init: spl_boot_device: devstat = 0x3 bootmedia = 0x10 bootindex = 0
    Authentication passed
    am62a_init: spl_boot_device: devstat = 0x3 bootmedia = 0x10 bootindex = 0
    Authentication passed
    
    
    U-Boot 2023.04-gb0d717b732 (Dec 06 2023 - 15:11:45 +0000)
    
    SoC:   AM62AX SR1.0 HS-FS
    Model: Texas Instruments AM62A7 SK
    DRAM:  2 GiB (effective 4 GiB)
    Core:  58 devices, 28 uclasses, devicetree: separate
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from nowhere... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Net:   eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  0 
    MMC: no card present
    SD/MMC found on device 1
    MMC: no card present
    ** Bad device specification mmc 1 **
    Couldn't find partition mmc 1
    Can't set block device
    MMC: no card present
    ** Bad device specification mmc 1 **
    Couldn't find partition mmc 1
    Can't set block device
    MMC: no card present
    ** Bad device specification mmc 1 **
    ## Error: "main_cpsw0_qsgmii_phyinit" not defined
    MMC: no card present
    ** Bad device specification mmc 1 **
    Couldn't find partition mmc 1:2
    Can't set block device
    MMC: no card present
    ** Bad device specification mmc 1 **
    Couldn't find partition mmc 1:2
    Can't set block device
    libfdt fdt_check_header(): FDT_ERR_BADMAGIC
    No FDT memory address configured. Please configure
    the FDT address via "fdt addr <address>" command.
    Aborting!
    Bad Linux ARM64 Image magic!
    switch to partitions #0, OK
    mmc0(part 0) is current device
    Scanning mmc 0:1...
    MMC: no card present
    No EFI system partition
    No EFI system partition
    Failed to persist EFI variables
    BootOrder not defined
    EFI boot manager: Cannot load any image
    MMC: no card present
    starting USB...
    No working controllers found
    USB is stopped. Please issue 'usb start' first.
    starting USB...
    No working controllers found
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    missing environment variable: pxeuuid
    Retrieving file: pxelinux.cfg/01-1c-63-49-15-92-64
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/00000000
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/0000000
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete.user interrupt!
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/000000
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete.user interrupt!
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/00000
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete.user interrupt!
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/0000
    ethernet@8000000port@1 Waiting for PHY auto negotiation to completeuser interrupt!
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/000
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete.user interrupt!
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/00
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete.user interrupt!
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/0
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete.user interrupt!
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/default-arm-k3-am62ax
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete.user interrupt!
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/default-arm-k3
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete.user interrupt!
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/default-arm
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete.user interrupt!
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/default
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete.user interrupt!
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Config file not found

    It is not booting, but stays in UBoot.

    Please advice

  • Hi Daniel,

    It is not booting, but stays in UBoot.

    U-Boot couldn't find the Linux Kernel to boot from any interface.

    For ease of use, you would need a SD card flashed with WIC image so that it has a rootfs partition with Linux Kernel in it which is then booted by U-Boot.

    https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM62A/09.01.00.07

    Create a Linux Bootable SD Card (ti.com)

    Regards,

    Prashant

  • Hi Prashant,

    I understand. I just was hoping that after flashing the Hello World I'll boot into the system running free RTOS.

    One more thing that I noticed, is that on neither output I didn't saw 

    You should see the application output in MCU UART terminal as below
      Hello World!

    So maybe I'm still missing something?

    Can you point me please to an explanation of how to boot the system in free-RTOS?

    Regards

  • Hi Daniel,

    One more thing that I noticed, is that on neither output I didn't saw 

    The boot logs you shared shows that the IPC_RPMSG_ECHO example is booted. You might not have flashed the Hello World appimages. Please flash the Hello World appimages for different cores then you should see "Hello World!" on the MCU and WKUP UART.

    Can you point me please to an explanation of how to boot the system in free-RTOS?

    There is no command line interface available for FreeRTOS like Linux if that's what you are looking for. There are just FreeRTOS examples available in the MCU+ SDK that makes use of the FreeRTOS Kernel APIs.

    So, when you have flashed freertos version of an example and booted the same, the FreeRTOS is already on the respective cores.

    Regards,

    Prashant

  • Hello Prashant,

    Thanks for the explanation.

    Do you have any news regarding the issue I had with flashing an evb board Rev A ?

    It's good to have the ability to work with board Rev E2, but for our final product, we are aiming to board rev A.

    Regards

  • Hi Daniel,

    I could not yet find a Rev A board. I will try finding again tomorrow. I will also ask the dev team once if the random UART Uniflash failure is a known issue on Rev A boards.

    I will let you know if I have any update.

    Thanks!

  • Hi Daniel,

    The MCU+ SDK v9.2 just released today. Can you please try the flashing procedure with this version and see if the issue is still there on RevA board.

    https://www.ti.com/tool/download/MCU-PLUS-SDK-AM62A

  • Hello Prashant,

    I downloaded and installed latest SDK mcu_plus_sdk_am62ax_09_02_00_38.

    I had to modify the import.mak.

    I changed 

    CGT_ARMLLVM_VERSION=3.2.2.LTS to CGT_ARMLLVM_VERSION=3.2.0.LTS

    SYSCONFIG_VERSION=1.19.0 to SYSCONFIG_VERSION=1.18.0

    Compiled the SDK and managed to burn rev E2. But with rev A, still can't burn - same behavior.

    Regards

  • Hello Daniel.

    Thank you for testing. I have a small request. I understand that I can refer the datasheet and all for different board revisions. But can you please share a close picture of your RevA board?

    Thanks!

  • Hello Prashant,

    Sure thing, please find attached images of rev A board.