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/CCSTUDIO: Disassembly line doesn't match source file line

Part Number: CCSTUDIO


Tool/software: Code Composer Studio

Hi, there.

https://imgur.com/a/994LAC0

(if there is a more quick tip to paste image, please inform me)

As image above, the disassembly line doesn't match source file line.

the start entry of function stats_init should be at line 52, not 61.

steps:

1. add a variable x and increment it by 1 in stats_init function. Save it.

2. stats.c is packaged into a library called LWIPlib, so build it.

Q1: the lwiplib.c in LWIPlib project is referring to the file in lwip-1.4.0, and I'm not quite sure that should I build the lwip-1.4.0 too?

Q2: the properties of project LWIPlib shows that the artifact name is ../../../Lib/${ProjName}, and I'm not sure is this location literally that the image(at right bottom)shows? Although the timestamp is correct anyway.

3. the library location that project TERRA_SAP_TEST specify matches the location of LWIPlib.

4. build project TERRA_SAP_TEST to update .out file.

5. load program

6. .out file didn't update

7. .out file really didn't update

Why??? Thank you!

  • Hi, there. the link is messed up and I don't know how to make it linkable.
    link: https://imgur.com/a/994LAC0

  • What are your project settings, more specifically is optimization turned on? If so, try it with it off.
  • Hi, this is my setting

    https://imgur.com/a/SMW5dUP

    I think two project's optimization are off.

  • The disassembly view in CCS is really just displaying the disassembled output from the compiler tools. To get a better understanding of what the compiler is doing, you could try correlating the generated assembly with source code. First keep the assembly output files when building your project (by enabling the option shown below) and take a look at the generated .asm file. Next to the instructions it should show the source line number its corresponds to. Hopefully that will provide better insight into what may be happening in your case.

  • To AartiG:
    This setting actually resolved my problem, thank you.
    My original setting neither check the box nor choose any one of option in drop-down menu

    May I ask that:
    1. What effects would be if box "Keep the generated assembly language(.asm) file" is checked?
    No .asm file would be kept if this box hadn't be checked?
    2. What file is Disassembly view referring to? C source interlisted assembly file?
  • Andy,

    Those options do not impact the build itself. They only control whether to keep the assembly files generated by the compiler or not. If the option is not checked, the compiler generated .asm files are not saved in the build configuration folder. If the option is checked they are saved. You can read more about these options in the Compiler User's Guide. You did not mention the TI device you are working with, but if it is an ARM device, take a look at the compiler manual here.

    The disassembly view is handled by the debugger, it uses the disassembled output from the compiler tools combined with debug information to present the information in the view.