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.

CCS/XTCIEVMK2LX: main() doesn't run when debugging

Part Number: XTCIEVMK2LX

Tool/software: Code Composer Studio

Hello,

I wrote my own code and could compile without errors. Now I'm trying to debug it on my EVM. When I tried to run 'hello world' code, it worked, but now it just skips to run the main(), which means the code is suspended at the first time and then goes to running without any output after I click 'resume' button. (there are System_printf() lines)

Other example codes run well. What's wrong with my code?

Thank you very much!

  • Huioon Kim said:
    When I tried to run 'hello world' code, it worked, but now it just skips to run the main(), which means the code is suspended at the first time and then goes to running without any output after I click 'resume' button. (there are System_printf() lines)

    Does the problem occur when running on a Cortex-A15 or C66 core?

    If re-loading the program on a Cortex-A15 core then you need to perform a system reset before re-loading the next program - see Debugging Cortex A15. The reason is that the SYS/BIOS start-up code can't invalidate the cache on a Cortex-A15 (see Why does the Cache_inv() API flush the cache on Cortex-A15 ?)

  • Oh, I'm sorry, I didn't mention about it. I did it on C66 core, and the result is same even I run the code first time after resetting the EVM.

    Thank you very much! :)

  • I solved the problem just by copying the whole content of .cfg file from an example and pasting it into my .cfg file without knowing what the codes actually do for the application.

    Now I can see the outputs from the System_printf() functions, but have following error:

    ti.sysbios.family.c64p.Hwi: line 194: E_alreadyDefined: Hwi already defined: intr# 11

    How can I fix this?

    Thank you very much!

  • The original problem keeps happening even to a new project template, Minimal. It happens to all projects including the Hello World example.

    Sometimes it works well, sometimes the problem happens. I tried to reset, reboot, power off/on, close/re-open CCS, etc.

    Why does this happen? and what is the permanent solution? I will see if this disappears tomorrow. I can't proceed because of this problem. :(

  • Huioon Kim said:
    Why does this happen? and what is the permanent solution?

    Based upon the information provided I am not sure.

    But you could try:

    1) Set the XTCIEVMK2LX to No Boot/JTAG DSP Little Endian Boot mode

    2) Set the initialization script for the C66 cores in the target configuration file to ..\..\emulation\boards\tcievmk2l\gel\tcievmk2l.gel

    The above is try and get the board into a known state by stopping it booting from flash and use the GEL script to configure the device.

    If these steps don't help suggest you ask the device experts on the Keystone Multicore Forum (C66, 66A, AM5, TCI)

  • Thank you for your suggestions. Actually, I already did them correctly. Anyway I found out what's going on yesterday. It was totally because of my lack of knowledge on how to program with TI's EVMs. :)

    The original problem, which was that I couldn't see the output strings in Console view, was because I didn't add any System proxy settings to the .cfg file.

    And the other problem, which was that I couldn't run correctly other programs including Hello World example and Minimal template, was because there was no invocation of BIOS_exit(0) in a program previously launched. One example even has an infinite while loop in the task function. So they were not properly terminated, putting the cores in the "hung" state.

    Thank you very much! :)