avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] PORTC


From: Andi
Subject: Re: [avr-gcc-list] PORTC
Date: Wed, 12 Mar 2008 09:03:38 +0700

I had test the code in AVR Studio, and the AVR Studio didn't execute the command :(. It jump to the next code. So, it look like the compiler didn't compile the code.


Andi

----- Original Message ----- From: "David Kelly" <address@hidden>
To: <address@hidden>
Sent: Wednesday, March 12, 2008 3:36 AM
Subject: Re: [avr-gcc-list] PORTC


On Tue, Mar 11, 2008 at 08:22:23PM +0100, Joerg Wunsch wrote:
"Andi" <address@hidden> wrote:

> I'm still checking where is the problem now.

Elsewhere.  Don't be fooled by viewing the disassembly listing with
the interspersed C code.  Look at a plain disassembly or the generated
assembly code instead.  In my opinion, these diassembly + source code
list files are much more obfuscating the view rather than clarifying
anything (even more, the more clever the compiler's optimizations are
getting).

Or set a breakpoint prior to the PORTC code, run to break, "View
Disassembly" in AVR Studio and then single step through the code. This
is the best way I can think of to be sure one is looking at the real
code generated by the compiler.

I do generate a list file from elf and source in my Makefile because its
often useful. But as Joerg points out it has to be used with a big dose
of distrust. Code sections disassemble quite well but if there is much
else in the file such as constant data then the same "section of code"
may be "disassembled" several times.

"avr-objdump -dS" usually produces very good output. "-DS" does the same
as -dS plus a whole bunch of crap disassembled where its not code. At
least when one uses -O2 to compile.

--
David Kelly N4HHE, address@hidden
========================================================================
Whom computers would destroy, they must first drive mad.


_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list





reply via email to

[Prev in Thread] Current Thread [Next in Thread]