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/TM4C1231H6PM: Linker/Locator Error?

Part Number: TM4C1231H6PM
Other Parts Discussed in Thread: SEGGER, TM4C1290NCPDT

Tool/software: Code Composer Studio

I had been using Code Sourcery (Codebench) and have moved my sources to CCS (8.3.1.00004).  I'm using code that has been running with the prior compiler - unchanged, and it compiles and links fine.  When run, it crashes in a certain function (operator initiated).  I commented out 1/2 of the code in that function and now the code crashes at startup (the function is never called).  So I'm assuming there is something happening in the link/locate phase but I have no idea how to start debugging the problem.  Any ideas would be appreciated.

Thank

Doug

  • Doug,

    I have a few questions:

    1. In CCS did you create a CCS project or a standard CDT project?  One way to tell is by looking at the icon shown in project Explorer.  A CCS project should show "CCS" written at the top of the icon.
    2. You mentioned that you are using the prior compiler (one from CodeBench I assume).  Did you copy this into CCS and replace the GCC we ship or did you leave it in its original location and try to get CCS to discover it?
    3. When debugging in CCS are you using the CCS debugger or have you configured GDB?
    4. If using the CCS debugger which debug probe are you using?

    Question 2 is actually dependent on question 1.  I suspect the answer to question 1 is that it is a CDT project and not a CCS project.  In which case there is not much I can do to help.

    One thing that I would be very curious about is if you take the executable that was generated by CodeBench and debug it in CCS does that crash?

    Regards,

    John

  • Doug,

    Are you still having these issues?  If so can your let me know the answer to the questions in my previous post.

    Regards,

    John

  • Hi John,

    I have been out of town and otherwise tied up, will try to get to it today.  Our power will likely be cut off by PG&E for from 2 to 5 days so it may take a week before I can get back.

    Thanks for staying on top of this for me.

    Doug

  • Hi John,

    1) the project is a CCS project.

    2) I am using the compiler that came with CCS

    3) I am using the CCS debugger.

    4) I'm using a Segger Flasher.

    Note that I have used this CCS for a different ARM project (TM4C1290NCPDT) that was taken from a former CodeBench project and am experiencing anomalous behavior with it also.  I believe I just imported the source files into a CCS project in both cases.

    Thanks

  • Thanks Doug.

    So we have CCSv8.3.1 with GCC 7.2.1 (bundled with CCS) and a Segger probe.  That is all good.

    For the initial crash you mentioned that it is happening in a function that is operator initiated.  Does this function run in response to pressing a button on the board or providing input over UART or something similar?  Can you set a breakpoint at the entry to the function and step through it to see what line is resulting in the crash?  The fact that the crash seems to move around after removing code makes me wonder if it is stack or heap related.  The size of those can be increased in the linker options of the project.

    John

  • Thanks John,

    Ah, stack and heap, could be the problem.  I'm going out of town and won't be able to test that and test setting the breakpoints as you recommends when I get back.

    Doug

  • Ok let me know how it goes when you get back.

    John