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/66AK2H14: Multiple main() shown in Debug Window

Part Number: 66AK2H14

Tool/software: Code Composer Studio

Hello, I would like to know why I am getting multiple main() shown in the debug window.

Before ConfigUserParam function call:

After ConfigUserParam function call:

Notice in the Debug Window the multiple main() calls. I only loaded the code on DSP Core 0.

4606.SPI_Example.zip

2148.xtcievmk2x.gel

Is this normal?

Thanks,

Joe

  • Hi,

    Which Processor SDK RTOS is this? Also is this a custom SPI example or some of the example projects contained in Processor SDK RTOS?

    Best Regards,
    Yordan

  • Hello, I am using the pdk_k2hk_4_0_14 and not using any RTOS, this is a baremetal program.

    Thanks for helping me,

    Joe

  • Hi Joe,

    This is definitely not normal. I glanced at the project sources you share and it doesn't seem as anything is wrong with your project setup (linker file (.cmd) seems ok).

    Can you try creating your project again following this guide:
     

    And see if this problem will persist?

    Best Regards,

    Yordan

  • Yordan,

    Hello, I created a template and copied my SPI baremetal code into the hello.c and also added the necessary libraries so the project would compile without errors. I'm still getting the same behavior. 

    SPI_Code.zip

    I've uploaded my code for your review.

    Thank you very much for helping me find a fix.

    Joe

  • Joe,

    Thanks for sending the testcase. I tested your project on both CCSv8.3.0 and CCSv9.1.0 on Windows and I was able to reproduce the issue. I filed the bug report CCBT-2482. In about half hour, please check its status in the link SDOWP in my signature below. 

    Unfortunately I couldn't find a feasible workaround. 

    I apologize for the inconvenience,

    Rafael

    P.S. Just FYI, follows below a few details on your testcase that are triggering warnings in my setup. 

    - The -mv option is passed as 6500. Although I have seen this in the past, the correct option should be -mv6600
    - The function SPI_socSetInitCfg() is declared implicitly, despite it exists in the include file <SPI_soc.h>. The reason is that the constant SOC_K2H is missing from your project.
    - The memory section ".csl_vect" does not have a SECTIONS specification, which automatically places it at the end of all other sections. This may not be terribly, but just to let you know the linker will allocate it to the end of all other sections. 

    Since this is a testcase, I don't think you should be alarmed by them - however, just keep these in mind when creating your own project.