analogdevicesinc / lnxdsp-adi-meta

Yocto meta layer for Analog Devices ADSP-SC5xx based EZ-KIT boards
Other
15 stars 10 forks source link

Adding patch for enabling developer options #38

Closed UtsavAgarwalADI closed 11 months ago

UtsavAgarwalADI commented 11 months ago

This allows switching between different boot methods by utilizing JTAG

In order to change the bootmode as required:

  1. Define DEVELOPER_MODE in your conf/local.conf, set it to "1" and compile
  2. Turn the dial to bootmode 0 and reset the board
  3. load the SPL via gdb, which should now give some additional print statements
    U-Boot SPL 2023.04 (Nov 09 2023 - 10:39:28 +0000)
    ADI Boot Mode: 0x0 (JTAG/BOOTROM)
    Entering Developer Mode...
    Please enter a bootmode at 0x82000000 via JTAG:
    [1]     JTAG/BOOTROM
    [2]     QSPI Master
    [3]     QSPI Slave
    [4]     UART
    [5]     LP0 Slave
    [6]     OSPI
    SPL execution has completed.  Please load U-Boot Proper via JTAG

    Note that the address listed above is arbitrary and was chosen since Uboot was already using $loadaddr at the same location.

  4. Now on GDB, stop the program and write to the memory location using the following command: set {int}0x82000000 = <bootmode>
  5. load the SPL again and it will boot into the requested mode (the following shows boot into QSPI Master):
    
    U-Boot SPL 2023.04 (Nov 09 2023 - 10:39:28 +0000)
    ADI Boot Mode: 0x0 (JTAG/BOOTROM)
    Entering Developer Mode...
    Booting into QSPI Master
    Trying to boot from BOOTROM

U-Boot 2023.04 (Nov 09 2023 - 10:39:28 +0000)

CPU: ADSP ADSP-SC594-0.0 (spi slave boot) Detected Revision: 1.1 Model: ADI sc594-som-ezkit DRAM: 992 MiB Core: 120 devices, 19 uclasses, devicetree: embed MMC: Loading Environment from SPIFlash... Read ID via 1x SPI: 9d 5a 19 SF: Detected is25lx256 with page size 256 Bytes, erase size 128 KiB, total 32 MiB OK In: serial@0x31003000 Out: serial@0x31003000 Err: serial@0x31003000 Net: eth0: eth0 Error: eth1 address not set.

Hit any key to stop autoboot: 6

vasbimpikasadi commented 11 months ago

Add some documentation under a page in https://confluence.analog.com/display/OSPLATFORM/Linux+Knowledge+Share just to share it

UtsavAgarwalADI commented 11 months ago

Add some documentation under a page in https://confluence.analog.com/display/OSPLATFORM/Linux+Knowledge+Share just to share it

Done; https://confluence.analog.com/x/XtfFNg