AM62P: TEye Tool: Uboot support

Part Number: AM62P

Tool/software:

Hello,

Is it possible for TI to add support to run this tool from Uboot via bootelf command?

I have tried this:

Hit any key to stop autoboot: 0
=>
=>
=>
=>
=>
=>
=> usb start
starting USB...
Bus usb@31000000: Register 1000840 NbrPorts 1
Starting the controller
USB XHCI 1.10
Bus usb@31100000: Register 1000840 NbrPorts 1
Starting the controller
USB XHCI 1.10
scanning bus usb@31000000 for devices... 2 USB Device(s) found
scanning bus usb@31100000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
=> fatls usb 0 /
EFI/
19186176 Image
315539 tiboot3-am62px-hs-fs-evm.bin
315539 tiboot3.bin
12285 ti_logo_414x97_32bpp.bmp.gz
1601499 tispl.bin
1179267 u-boot.img
574 uEnv.txt
System Volume Information/
338672 AM62A_AM62P_TEye_A53_read.out

8 file(s), 2 dir(s)

=> fatload usb 0 0x82000000 /AM62A_AM62P_TEye_A53_read.out
338672 bytes read in 26 ms (12.4 MiB/s)
=> md 0x82000000
82000000: 464c457f 00010102 00000000 00000000 .ELF............
82000010: 00b70002 00000001 791179c0 00000000 .........y.y....
82000020: 00000040 00000000 0004ee30 00000000 @.......0.......
82000030: 00000000 00380040 00400002 00f200f3 ....@.8...@.....
82000040: 00000001 00000006 00010000 00000000 ................
82000050: 70000000 00000000 70000000 00000000 ...p.......p....
82000060: 00010000 00000000 00010000 00000000 ................
82000070: 00010000 00000000 00000001 00000007 ................
82000080: 00020000 00000000 79100000 00000000 ...........y....
82000090: 79100000 00000000 0002d737 00000000 ...y....7.......
820000a0: 0005dd30 00000000 00010000 00000000 0...............
820000b0: 00000000 00000000 00000000 00000000 ................
820000c0: 00000000 00000000 00000000 00000000 ................
820000d0: 00000000 00000000 00000000 00000000 ................
820000e0: 00000000 00000000 00000000 00000000 ................
820000f0: 00000000 00000000 00000000 00000000 ................
=> bootelf 0x82000000
=>
=>
=>
=>

Please note that we use UART5 for our console port, but I still do not see any output on UART0, do know it works as there is a message that is printed during boot (boot of uboot, not the elf).

Message that comes out on UART0:

.10.0-367-g00f1ec6b87-dirty
NOTICE: BL31: Built : 16:09:05, Feb 9 2024

Thanks,

Doug

  • We realized that "autostart" needs to be set to "yes" for U-Boot to actually run the image. However, it then runs into an exception immediately:

    => tftp AM62A_AM62P_TEye_A53_read.out
    link up on port 2, speed 1000, full duplex
    Using ethernet@8000000port@2 device
    TFTP from server 192.168.253.127; our IP address is 192.168.253.125
    Filename 'AM62A_AM62P_TEye_A53_read.out'.
    Load address: 0x82000000
    Loading: #################################################################
             ##  0 Bytes
             3.4 MiB/s
    done
    Bytes transferred = 338672 (52af0 hex)
    => setenv autostart yes
    => bootelf 0x82000000
    ## Starting application at 0x791179c0 ...
    "Synchronous Abort" handler, esr 0x8600000d
    elr: 0000000039a4c9c0 lr : 00000000808141ec (reloc)
    elr: 00000000791179c0 lr : 00000000bfedf1ec
    x0 : 0000000000000000 x1 : 00000000bdea9260
    x2 : 00000000791179c0 x3 : 0000000002850000
    x4 : 0000000002850000 x5 : 00000000bde77895
    x6 : 0000000000000030 x7 : 00000000bde77d20
    x8 : 0000000000000004 x9 : 0000000000000008
    x10: 00000000ffffffd0 x11: 0000000000000010
    x12: 000000000001869f x13: 0000000000000004
    x14: 0000000000000001 x15: 0000000000000021
    x16: 00000000bfedf0c0 x17: 0000000000000000
    x18: 00000000bde8ad80 x19: 0000000000000000
    x20: 0000000000000000 x21: 00000000bffa036c
    x22: 00000000bff9904f x23: 00000000bdea9260
    x24: 00000000bdea9250 x25: 0000000000000002
    x26: 0000000000000000 x27: 0000000000000000
    x28: 00000000bdea9190 x29: 00000000bde77d20
    
    Code: f27d001f 9a870042 9a850063 17ffffc8 (aa1f03e0)
    Resetting CPU ...
    
    resetting ...
    

    Any idea what might be causing this?

  • Hi Christian,

    I am not sure if the teys tool can be loaded/run in U-Boot. Can you please explain why do you want to load it in U-Boot instead of the methods provided in the tool?

  • Because we don't have JTAG or UART boot available on our custom design.

  • It is a pain to set up the JTAG if you do not have an project to work from or are not using a design exactly like the EV.  Our software folks do not use the TI IDE to develop.  We have made hardware changes from the EV to meet our product goals and the TI IDE project would not be the same as we use.  The only reason that we would use JTAG on this is for debugging or for this tool.  So far, we have not had to set any debugging using JTAG.

    Why would you not support a tool such as U-Boot that is going to be universal in usage for your product and does not require any additional hardware and is not dependent on running TI IDE?

  • Hi Doug,

    I am not familiar with this TEYE tool, except it is for DDR validation. So I would imagine this tool should be running on internal SRAM instead of DDR, but U-Boot already runs on DDR. Out of the box, U-Boot is unable to jump back the code execution from DDR to SRAM.

    Anyway, I am trying to get details from the TEYE tool developer to see what options you can have.

  • Hi Bin:

    Out of the box, U-Boot is unable to jump back the code execution from DDR to SRAM.

    That's not a problem. Supposedly, this tool is printing a report to UART0 which we need to pick up. That's all we need.

  • Hi Christian,

    I talked to the developer, this tool runs by A53 on SRAM, and A53 has to be in the out of reset and unconfigured state. So the tool cannot be loaded and run in U-Boot prompt, where A53 already runs.

  • Thanks Bin.

    However, this indicates that the tool might be run when it would be loaded by the U-Boot SPL instance running on the R5. Correct?

    Might you have instructions available on how to do that?

  • Hi Christian,

    I seems to be possible to let tiboot3.bin to load and run this tool. Let me try it to see if I can get it work.

    Meanwhile, I am waiting for the developer to comment if there is any other way to load and run the tool without JTAG or UART0 access.

  • Hi Christian,

    Because we don't have JTAG or UART boot available on our custom design.

    While I am facing some challenges while trying to load/run the tool in U-Boot, I noticed the following message in the package readme.txt:

    =====
        The firmware will handle all A53 core setup (bootcode, MMU, etc.) and configure the
        UART registers for communication over UART0.
    =====

    It appears the tool directly print messages to UART0, but if UART0 is not available on your custom board, how would you be able to collect the log?

  • We can do that with a few modifications. UART0 is available, but normally used as RS485 line.

  • Okay, I guess you will bypass the RS485 transceiver then you can use UART0 as the console. If so, can you follow the TEye tool readme.txt and load/run the tool using UART0 boot? I think this should be best option in your usecase.

    Here is my update on loading the tool in U-Boot:

    The tool binary shouldn't be loaded in U-Boot prompt. The tool runs on SRAM address 0x79100000, but the SRAM is protected in U-Boot, loading the tool binary to 0x79100000 from U-Boot prompt fails. Additionally, the tool readme.txt states A53 should be just powered on but not running any instructions; but at U-Boot prompt, A53 already runs.

    Therefor, my next thought was to load/run the tool by R5 SPL (tiboot3.bin). I have spent the last couple days on this, made some progress, but then faced several challenges. The R5 SPL loading routine for the next stage bootloader requires a fit image (tispl.bin) which mush have ATF, OPTEE, DM, and other components for Linux kernel, and all the components should be signed. I converted the tool binary from ELF and wrapped it to a fit image and modified R5 SPL code trying to load it, but it is not loaded to 0x79100000 correctly.

    I am still interested in getting this approach working, but I don't think it can be done within a few more days. To not delay your project, I recommend you considering using the UART boot method to load/run the tool on your board.