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.

How do I connect with an emulator to a running target with a program running from flash

Other Parts Discussed in Thread: TMS320C6416

I am using the following configuration:
- TMS320C6416 processor
- Code Composer 5.4.0.00091
- Spectrum Digital XDS510PP emulator

I am able to connect to my board if the board powers up and the software is not running. If I allow the software to run from external flash memory and attempt to connect to debug the running software, I cannot connect. Connection fails with the following error message:

C64xx_0: Error connecting to the target: Error 0x80000260/-1146 Fatal Error during: Execution, Initialization, OCS,  Invalid data was scanned by the emulation controller. Verify the board setup to make sure the scan chain is properly defined. If the setup is correct, then RESET EMULATOR.  This will disconnect each  target from the emulator.  The targets should then be power cycled or hard reset followed by an emureset and reconnect to each target.  

How can I connect to a running target or what might my software be doing or not doing which would cause the connection to fail?

Thanks,

Paul

  • Paul,

    The TMS320C6416 able to connect CCS via XDS510. You can run the simple application on target.
    Please verify the gel file is loaded when connect to the target.
    If you are using custom board, make sure the external memory initial code in gel file.
    If you are using the TMS320C6416 DSK, check the proper/suitable gel file used or not.

    Which software you tried to load on board?
    I suggest you, create a simple application using internal memory only, load this out file and run.
    And also create a simple application using external memory and test the same. So that we can verify the memory issue or not.

    TMS320C6416 Feature:
    Connections for external emulation hardware support (e.g., XDS510)

    Hardware features of the TMS320C6416 DSK board include:

    • Embedded JTAG support via USB
    • On-board standard IEEE JTAG interface
  • I am running a custom application where a custom bootloader loads the application from flash memory into external RAM, then the application runs from RAM and internal memory with caching enabled.

    If I put a loop into the bootloader I can connect when the bootloader is running.

    If I put an infinite loop into the application's main function, so that BIOS is not initialized and nothing happens, I still cannot connect when execution is in this loop.

    I have disabled the init_emif and init_gpio functions in the GEL file since those things should already be set correctly by the bootloader.

    The GEL file is definitely loaded, I have printouts in it so that I know what it is doing. Do you know what things the GEL file should be doing for this use case where the board should already be initialized by our bootloader?

    From your questions it sounds like the problem could be the way our bootloader is configuring the external memory or something. I will take a closer look at our bootloader and see if I can determine at which point I can no longer connect.

  • As an additional note, we are also using custom hardware and not a DSK.

    I have discovered that putting an infinite loop at the end of our bootloader right before it jumps to the start of the application allows us to connect.

    To the best of my knowledge, the first code being executed in the application is TI's c_int00() boot function provided by the RTS library. After that is main, where as I said earlier, we cannot connect to the infinite loop in main.

    Do you know of anything that c_int00 could be doing to prevent the emulator from connecting, or if there is anything else that happens before main runs?

    We do not have a user init function specified in BIOS.

  • This webpage solved my problem! It appears the cause of the connection problem when running from flash was that RTDX was enabled in DSP/BIOS. We are using DSP/BIOS 5.42 so the page above indicates the problem should not appear in this version of BIOS, but it looks like it does still cause a connection issue. I disabled RTDX using the steps on that page, which are:

    To disable RTDX make sure the following are properly setup in the BIOS configuration:

    • System --> Global Settings: Uncheck "Enable RTA" and "Enable TRC Trace Event Classes"
    • Input/Output --> HST: host link type set to "NONE"
    • Input/Output --> RTDX: Uncheck "Enable Real-Time Data Exchange"

    After this I rebuilt and reflashed and am able to connect.

    Thanks,

    Paul

  • Paul,

    Great to hear!  Let us know how else we can help you.

    Regards,

    Aaron

  • The 6416 is a 64x core. The page notes the issue is resolved for 64x+ devices.