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.

c code in code composer studio

Hi,

Thank you for the post

Please clarify, I dont know how to define memory in CCS project.

I couldn't find .exe file

please help. It is showing warning like

WARNING 1: #10210-D creating ".stack" section with default size of 0x400; use the -stack option to change the default size add    C/C++ Problem

WARNING 2: #10210-D creating ".sysmem" section with default size of 0x400; use the -heap option to change the default size add    C/C++ Problem

WARNING 3: #12-D parsing restarts here after previous syntax error main.c /GH-matrix line 102 C/C++ Problem

After successful debugging, if i run, i couldn't get the output and i got warning like

Warning: Illegal opcode (000a3a73) at pc = 0x0000c544 Illegal opcode at pc = 0x0000c544

I got some errors like

ERROR 1:#148 declaration is incompatible with "int scanf(const char *, ...)" (declared at line 186 of "C:/ti/ccsv5/tools/compiler/c6000_7.4.1/include/stdio.h") main.c /GH-matrix line 73 C/C++ Problem

ERROR 2: #148 declaration is incompatible with "int printf(const char *, ...)" (declared at line 184 of "C:/ti/ccsv5/tools/compiler/c6000_7.4.1/include/stdio.h") main.c /GH-matrix line 72 C/C++ Problem

Please help

 

  • Bhavani,

    Here are some recommendations and suggestions to help you get started with CCS.

    My first recommendation would be for you to use the latest version of CCSv5, if possible. The latest version is 5.4, and I would recommend at least 5.3 or 5.4. These versions are available for download here: http://processors.wiki.ti.com/index.php/Download_CCS

    One of the reasons I recommend 5.3 or higher is because in these newer versions we add a default linker command file in most cases when you create a project for a specific device. This defines the memory for the device and allocates code and data sections to appropriate memory regions so the code can run properly. For more background on linker command files and their importance, please refer to this wiki page: http://processors.wiki.ti.com/index.php/Files_in_CCS_Projects#Linker_command_files

    Bhavani Ravichandran said:
    It is showing warning like

    WARNING 1: #10210-D creating ".stack" section with default size of 0x400; use the -stack option to change the default size add    C/C++ Problem

    WARNING 2: #10210-D creating ".sysmem" section with default size of 0x400; use the -heap option to change the default size add    C/C++ Problem

    This page explains the reason for the warning. The .stack and .heap sections are created for the stack and heap respectively. This message is saying is that since you have not explicitly set the size of these sections, it is defaulting to a size of 0x400. This may be ok in some cases, but in projects that are C I/O intensive (like ones with printf, scanf etc), you may need to increase the stack and heap size. This can be done from the linker options (Project Properties->Build->Linker->Basic Options). More information and tips when working with printf type code is here: http://processors.wiki.ti.com/index.php/Tips_for_using_printf

    If you are new to CCS, I would recommend starting with the "Hello World" template that comes with the New Project wizrd. When you create a new CCS project, you can select this template and get that working first. The CCSv5 Getting Started Guide is another great resource to help you get started with the toolset and walk you through the steps of creating and debugging new projects.