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

ARM: C51: Arm Blinky

HELOI.

Should share what I have found.

A few tips for debugging Keil ARM code with Keil Driver.

By default Keil produces DWARF3 debug information but some expects DWARF2.

In Keil, Open Options, click the C/C++ tab and type --dwarf2 in the 'Misc Controls' box, now click the Asm tab and type --dwarf2 to 'Misc Controls' box. Click OK and rebuild your file, you now have DWARF2 debug information in the AXF file.

In the project you need to load the AXF file into the ARM processor model. It will not show the AXF file as it shows only .hex and .elf files but you can still load it in by typing the name, i.e. bbb.axf (or you could rename bbb.axf to bbb.elf). Don't load the hex file; no debug with hex file

Now click the Pause/Run button, if the the source doesn't show then select ARM Source Code in the Debug drop down list. You can now step through your C code, set breakpoints, etc., much more fun

Set a breakpoint on your wait() function, run to the breakpoint and then step over the wait() function; It shows only 8ms elapsed, maybe too fast to animate so change your loop to 100,000, now wait() is 80ms.

Thanks.