I am using the restricted version of uVision3 along with ULink JTAG adapter, and I am trying to debug some C code. Every time I try to single step through my code it always goes to the disassembly window. If I close the window and go back to the source, it just opens the disassembly window again. This happens whether I am using the simulator or trying to debug with the hardware. Is single-stepping through source not available on the limited version?
The evaluation should support source level debugging within the limits stated.
Are you sure that you are building with debug information enabled?
Note that some of the demos are supplied as binaries only - the source is too big for the eval limits - so you woun't be able to debug them at the source level.
If you use high optimisation levels, it can be hard for the debugger to keep step with the source...
I have debug checked in the options-->output tab. Is there anything else I need to do to build with debug information? I'm not using an example, I am using a project I created myself that blinks some LEDs on and off, so I can't imagine it is too big or anything. The program runs fine, but I am trying to learn how to use uVision, hence playing with the debugger.
So I have no idea what I just did, but after 3 hours, suddenly it works. I started going through the menus changing options, and now I can debug. Something else, is that I couldn't add variables to watch, and not I can.
If I remember right, I unchecked build hex file, built the project, and then rechecked it, and built again. I Renamed my target, and I set load options to erase the entire device each time I program (I was doing it manually before). then I rebuilt in simulation mode, and it worked. checked build hex file again. Rebuilt to use ULINK, and now I'm debugging and watching variables on my device.
I'm thinking that I had a corrupt file that needed to be rebuilt, and all my option changing and building finally did it. I probably should have attempted to clean the project. I can't remember if I tried that or not, but I have a feeling it would have worked.
Benjamin; When attempting to step thru C code and the debugger takes you to the disassembly code, it can't find the symbol table that you generated with the debugger option. The symbols are linked in the OMF executable not the hex file. Are you attempting to step thru a Lib routine? Normally, the debugger will execute any called Lib routines and immediately return to the next line of C code. At what point are you getting the assembly code? Remember the startup code will be in assembly. In the Deug Options Tab, do you have 'Run to Main' checked? This option will execute the startup code, set a tempory break point at the entry of main and remove the breakpoint on break. When you start the debugger, does the program wait a the entry to main?
Can you cut and paste a fragment on the forum? Maybe some of these experts can spot a problem. Bradford
Benjamin; You are ahead of me. Glad that you are up and running. Bradford