[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Re: How to force GCC to not to remove "nop" statements ?
From: |
Gene Smith |
Subject: |
[avr-gcc-list] Re: How to force GCC to not to remove "nop" statements ? |
Date: |
Fri, 06 Mar 2009 18:34:49 -0500 |
User-agent: |
Thunderbird 2.0.0.6 (Windows/20070728) |
Ruud Vlaming wrote:
On Friday 06 March 2009 01:34, Gene Smith wrote:
Vincent Trouilliez wrote:
On Thu, 19 Feb 2009 11:14:40 -0700
"Weddington, Eric" <address@hidden> wrote:
If you are using WinAVR 20081205 then you can use one of the new builtin
functions:
void __builtin_avr_delay_cycles(unsigned long __n);
Hmm, sweet !
"Unfortunately" I am on Linux so no WinAVR for me ! ;-)
Beginner question: If I build the avr-gcc-4.3.2 toolchain on linux using
all the WinAVR (sourceforge) patches, as seems to be done in the femtoos
scripts mention on "freaks", will I have the same features (such as
function mentioned above) on linux as winavr provides on windows? Will
(or can) they produce identical binaries?
Yes, they will, given the same patches are used. Note that the script is not
intelligent enough to detect new patches as the appear, and include a few
patches which were (at the time i published the script) not yet in released,
or are of my own making (and may never be released)
Furthermore the script builds gcc-4.3.3 and not 4.3.2 so this could
make a difference too.
Ruud
I used your script and modified the gcc version back to 4.3.2 and I get
almost the same results on fedora8 as XP. The avr-size output is the
same and the build produces hex files that match. Also, the *.lss files
(objdump result) *almost* match except for the ."debug_" sections. Don't
know why these few lines differ (or what they are really for):
$ diff -Naur main.lss ../main.lss
--- main.lss 2009-03-06 17:55:48.065959800 -0500
+++ ../main.lss 2009-03-06 17:30:01.000000000 -0500
@@ -15,15 +15,15 @@
CONTENTS, READONLY, DEBUGGING
5 .debug_abbrev 00001324 00000000 00000000 00007612 2**0
CONTENTS, READONLY, DEBUGGING
- 6 .debug_line 00003a2f 00000000 00000000 00008936 2**0
+ 6 .debug_line 00003df5 00000000 00000000 00008936 2**0
CONTENTS, READONLY, DEBUGGING
- 7 .debug_frame 000006b0 00000000 00000000 0000c368 2**2
+ 7 .debug_frame 000006b0 00000000 00000000 0000c72c 2**2
CONTENTS, READONLY, DEBUGGING
- 8 .debug_str 00000de7 00000000 00000000 0000ca18 2**0
+ 8 .debug_str 00000dd1 00000000 00000000 0000cddc 2**0
CONTENTS, READONLY, DEBUGGING
- 9 .debug_loc 00001b35 00000000 00000000 0000d7ff 2**0
+ 9 .debug_loc 00001b35 00000000 00000000 0000dbad 2**0
CONTENTS, READONLY, DEBUGGING
- 10 .debug_ranges 00000018 00000000 00000000 0000f334 2**0
+ 10 .debug_ranges 00000018 00000000 00000000 0000f6e2 2**0
CONTENTS, READONLY, DEBUGGING
The remainder of this huge file matches!
Also, I see that I do have the builtin function mentioned above on the
linux build so it is not exclusive to winavr.
-gene
p/s: Thanks for answering my questions on the avr-gcc forum too!