This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Multiple C files Debug option not working in C Environment

Hi,

I am using uVision V2.26 version IDE with CX 51. In my project I have 5 groups and each group had approximately 6 C Source code files. With these groups and files I am able to do compilation and execution in hardware in proper way.

In same project I am not able to use Debug option. If I click Start Debug button code entering to debug mode, after pressing single step button, able to see disassembly code. Instead of disassembly code, I would like to see actual my C code.

Please let me know is there any option for this.

Thanks,
Suresh Kumar Kavula

  • on the C51 commandline you must include 'DB' and 'OE'. If you use the IDE I do not know.

    Erik

  • Can you give complite command line instruction. I will try by using command line option.

  • The number of groups or files has nothing to do with this problem. Any time the Debugger cannot find the correct links to the C source code it will display in the disassembly mode.
    Make sure that you have the Target->Options->Output Include Debug Information box checked.
    Also, in Target->Options->Debug, check that you have Load Application at Startup and Go To Main checked. This Go to Main places a temporary breakpoint at the first executable of Main, Runs the code to breakpoint and then removes the breakpoint. This will execute all the assembly code of Startup without you having to step through the code.
    Remember, if you step into any code where you do not have access to the C source, the debugger will revert to the disassembly display.

  • Thanks, With Target->Options->Output Include Debug check box I am able to do debug perfectly.

    Thanks Once again,
    Suresh Kumar Kavula

  • "Thanks, With Target->Options->Output Include Debug check box I am able to do debug perfectly."

    Yep - that's why it's called "Debug Information"!! ;-)

    Seriously, the debug information is what enables the Debugger to link the pure binary executable code & addresses back to the line numbers & symbols in your source files - clearly, without this information, the Debugger knows nothing about your source!