AM263P4-Q1: OSPI boot debug issue

Part Number: AM263P4-Q1
Other Parts Discussed in Thread: UNIFLASH

Hello Team,

CCS version: 20.5.0.28__1.11.0 

controller: AM263Px

I'm try to debug the SBL boot but control was not stuck in SBL boot. does anyone know the steps to debug the SBL bootloader. Boot mode PIN I select the (1100) in board in order to bootup from OSPI boot.

 

Thanks in advance.

 

  • Hi Shahbaz

    There is a loop_forever() function in main.c. You can call this at the beginning of the main function and then flash the bootloader. 

    Upon power-cycle, Connect the core via CCS and load the symbol, you can see the PC inside this function. 

    Make the loop variable to 0 in the expression window and then you can do a step-wise debug of the SBL.

    The above is possible if your device is in HS-FS mode where the R5 core debug is default open.

    Thanks and Regards,

    Nikhil Dasan

  • Hello Nikhil,
    yes, I did the same. called loop_forever() in main function. control was not stopped and when I pause, control is in this files. "pmic_io.c" and "ospi_v0_lld.c". and also my pc and sp register value is not as expected. expectation is around 0x70002000. current value "PC 0x70011184" and "SP 0x7002B700".

  • Is it possible to explain the steps you are following, i.e from building the SBL to flashing and then debugging?

  • Hello Nikhil,

    Here is a debugging step which I followed:

    Flash and Debug steps:


    1. Build SBL project and generate .out and .tiimage files. with linker load address as 0x70002000 for SBL.
    2. Flashing the SBL .tiimage into ospi flash by use of CCS tool. Option available inside CCS -> RUN option -> flash project.
    3. Set the Boot Mode pins as 0x1100 as mention in reference document for OSPI boot mode for AM263PX-CC.
    4. power on target.
    5. plug the USB cable.
    6. launch debug project.
    7. load symbols only .out files
    8. put a break point at main function.
    9. reset not hard reset but through CCS.

    Thanks & Regards,

    Shahbaz Ansari

  • Flashing the SBL .tiimage into ospi flash by use of CCS tool. Option available inside CCS -> RUN option -> flash project.

    This is incorrect. Can you use the either Uniflash or other flashing tools as mentioned in the SDK documentation to flash the project into the device?

    AM263Px MCU+ SDK: Flashing Tools

    Thanks and Regards,

    Nikhil Dasan