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.

AM5716: How to merge cpuidle source main_a15.c with CCS project ?

Part Number: AM5716

Hi,

We  got advise to enter cpuidle state.

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1216888/am5716-am5716/4623626#4623626

What were provided to us was command line base buid environment.

Now customer is asking to provide CCS project base because customer want to debug the source code.

  1. Would you make merge "main_a15.c" to CCS project ?   (main_a15.c is in C:\ti\sdk_am5716\processor_sdk_rtos_am57xx_08_01_00_09\pdk_am57xx_1_0_19\packages\ti\drv\pm\examples\cpuidle)
  2. Or would you advaid how to merge "main_a15.c" to CCS project ? 

Best Regards,

Kasai

  • Hello,

    A CCS project is not strictly necessary to debug the code in CCS. If you connect to the core running the code, you will be able to debug the source code if you add the symbols or load the ELF directly.

    How are you booting your example/app?

    1) If you are booting your example through a bootloader (SBL or SPL), then you will need to add a while loop to hold the execution so you can attach to the core. Add something like the following code:

    volatile int loop_test = 1;
    
    while(loop_test);

    You will then connect to CCS, and connect to the core that you are debugging, and load the symbols for the test you are running.

    2) If you are booting the device through GEL file initialization, you can simply load the code directly through CCS once you are connected and board is initialized.

    Regards,

    Erick

  • Hi Erick,

    Thank you for your reply.

    I understand emulator can be connected with AM5716 and control AM5716 with only binary.

    Howeve, I have no idea how to syncronize between source code and program counter when step or break on AM5716.

    Without CCS project, we cannot see any source file in project explore window on CCS.

    Would you adivise me how to syncronize between source code and program counter on CCS ?

    If my understanding is wrong, please kindly let me know.

    Best Regards,

    Kasai

  • Kasai,

    Actually, the code will synchronize automatically when you load the symbols, is this not the case you have experienced?

    Very rarely I have seen cases where the code cannot find the source automatically. Can you please share a screenshot of your CCS debug. Let me show an example of my board, I'm using a J721E, but it would be very similar.

    I launch the board with an application running, and I launch the target configuration in CCS:

    Once you have the target configuration launched, you will see all the cores:

    Then I connect to my core and see the undefined address

    Then, you can connect to the core. And if you load the core with your example, your system should automatically fetch the sources from your PC if you compiled the application there. Otherwise, it might say something like "cant find source" and it allows you to point it to the folder it should look into for the source code. See below:

    Then you can load the symbols to get more information from your ELF file using Run->Load->Load Symbols. IF you want to reload the program yourself, you could run Run->Load->Load Program.

    Please let me know if this helps.

    Regards,

    Erick

  • Hi Erick,

    Thank you for your information. I will try to check it in our side. We just got EVM.

    Best Regards,

    Kasai

  • Hi Erick,

    I succeeded to loard program and show source code.

    After run program, I saw another issue. Will ask in new thread.

    I'd like to close this thread.

    Thank you.

    Best Regards,

    Kasai