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.

AM2732: How to connect debugger with qspi boot mode

Part Number: AM2732

Tool/software:

Hello.

I'd like to know correct way to connect debugger in board which software already start by qspi boot mode.

Installed softwares are below.

I failed both these.

- CCS Theia 1.5.1.3

- CCS 12.8.0

Detail of  tried ways are wrote below.

---

## Tried ways

### CCS Theia 1.5.1.3

#### Start Project-less Debug

I followed this link.

https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_debug-main.html#manual-launch

- right click `targetConfig/*.ccxml`

- click `Start Project-less Debug`

- right click on target core

- click Connect Target

connection failed with error.

```
CS_DAP_0: Trouble Writing Memory Block at 0x2140408 on Page 6 of Length 0x4: (Error -1170 @ 0x2140408) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 20.0.0.3178)
CS_DAP_0: GEL: Error while executing OnTargetConnect(): Target failed to write 0x02140408@System_View
at *((unsigned int*) (0x02140000+0x408))=(unsigned int) 0x1 [evmam273x.gel:47]
at apll_en_mode1_default() [evmam273x.gel:2616]
at doAll() [evmam273x.gel:701]
at OnTargetConnect()
Cortex_R5_0: Error connecting to the target: (Error -1170 @ 0x0) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 20.0.0.3178)

```

#### Removing Initialization Script (.gel)

following this link: https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1133203/am2634-use-ccs-to-debug-via-qspi-boot

in CCS theia, Same setting in here.

but this cannot clear.

If I make it empty, it changes to  "..\..\..\..\..\..\..\.." automatically.

I checked .ccxml with another software.

But initialize script setting is not here.

## CCS 12.8.0

 has no `Start Project-less Debug`.

`Initialization Script` is empty if open .ccxml with CCS 12.8.0.

---

Best regards.

  • Hi Shumpei,

    Before you connect to the cores of AM273x, you will need to initialize the SoC and EVM. To initialize the AM273x cores and EVM for JTAG to connect:

    In "No Boot" mode, using the CCS CCXML file (AKA, target configuration file) and GEL files (AM273x MCU+ SDK: EVM Setup) (AM273x MCU+ SDK: Download, Install and Setup CCS)

    Once your application is ready to be flashed into the QSPI flash,

    In "UART boot" mode, you can flash the SBL_QSPI and the application image into the QSPI flash (AM273x MCU+ SDK: EVM Setup(AM273x MCU+ SDK: Flash a Hello World example)

    In "QSPI Boot" mode, you can boot your application from QSPI flash. (AM273x MCU+ SDK: EVM Setup)

    Best regards,

    Ming

  • Hi Ming,

    Thanks for reply.

    Application has been started by QSPI boot.

    It was checked by UART debug log.

    I'd like to connect debugger to core which has been booted application already.

    If I got the how to connect it, I'm going to try debug with step execution.

    Best regards.

  • Hi Shumpei,

    In that case, you can add the following section in the beginning of the main() of you application program:

    volatile int loopForever = 1;

    while (loopForever)

    {

    }

    You should be able to halt the target core at the while loop, then use the CCS to load symbol from the OUT file of the application program. You can change the loopForever = 0, and single step from there.

    Best regards,

    Ming 

  • Hi Ming.

    Thanks for reply.

    I tried to adding loop.

    But "Connect Target" failed same error.

    "Connect Target" is need before to exec "load symbol" in my understood.

    Or I wrong that how to connect debugger ?

    Best Regards.

  • Hi Shumpei,

    It sounds like the error happens before your application program reaches main(). Most likely, it is the MPU settings issues with your application. Can you share your example.syscfg and linker.cmd, MAP file for your application.

    Best regards,

    Ming

  • Hi Ming.

    I share projects with zip.

    Images wrote into flash is below.

    offset= 0x00000: "sbl_qspi_am273x-evm_r5fss0-0_nortos_ti-arm-clang\Release\sbl_qspi_am273x-evm_r5fss0-0_nortos_ti-arm-clang.tiimage"

    offset= 0xA0000: "empty_am273x-evm_system_freertos\Debug\empty_system.appimage"

    Contains are below.

    - sbl_qspi_am273x-evm_r5fss0-0_nortos_ti-arm-clang

        - imported from "sbl_qspi_am273x-evm_r5fss0-0_nortos_ti-arm-clang" : SDK example

        - test message and waiting loop is inserted before process.

        - test message is visible in teraterm. It has started correct.

       

        - "Connect Target" failed by error in this timing.

    ```

    CS_DAP_0: Trouble Writing Memory Block at 0x2140408 on Page 6 of Length 0x4: (Error -1170 @ 0x2140408) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 20.0.0.3178)
    CS_DAP_0: GEL: Error while executing OnTargetConnect(): Target failed to write 0x02140408@System_View
    at *((unsigned int*) (0x02140000+0x408))=(unsigned int) 0x1 [evmam273x.gel:47]
    at apll_en_mode1_default() [evmam273x.gel:2616]
    at doAll() [evmam273x.gel:701]
    at OnTargetConnect()
    Cortex_R5_0: Error connecting to the target: (Error -1170 @ 0x0) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 20.0.0.3178)

    ```

    - empty_*

        - imported from "empty_am273x-evm_system_freertos" : SDK example

        - I used it as main software booted by sbl_qspi.

    20250305-ti-forum-How to connect debugger with qspi boot mode.zip

    Best regards.

  • Hi Shumpei,

    Since the SBL_QSPI has done the SoC initialization, so you do not need any GEL file for QSPI boot mode.

    Make sure your CS_DAP_0 has not GEL file associated with it:

    Best rgards,

    Ming

  • Hi Ming.

    Thanks for give me solution.

    It works completely.

    My fault is check `Initialization Script` for each cores.

    I understood that point is removing `Initialization Script` in `CS_DAP_0`.

    Not each cores.

    Thank you very much for your response.

    Best regards.