<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-2010</id>
	<title>Nabble - AVR - gcc</title>
	<updated>2009-12-06T10:51:01Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/AVR---gcc-f2010.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/AVR---gcc-f2010.html" />
	<subtitle type="html">This list is intented for discussions around the AVR-GCC Free Software toolchain for Atmel AVR microcontrollers. This includes any of the Free Software tools that are available for the AVR (not just the compiler itself), like debugging, simulation, device programming etc. The list is primarily intented for users of the tools, not for dicussions between developers. Developers should use their respective project mailing lists for detailed discussions and post significant change notices to this list.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26667756</id>
	<title>Re: C++ with PSTR</title>
	<published>2009-12-06T10:51:01Z</published>
	<updated>2009-12-06T10:51:01Z</updated>
	<author>
		<name>Dave Hylands</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;On Sun, Dec 6, 2009 at 4:20 AM, darkschine &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26667756&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;zhpctw3dash@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This topic is covered all over avr forums in bits and pieces so please keep
&lt;br&gt;&amp;gt; responses to a minimum. The problem is that when using PSTR(&amp;quot;String&amp;quot;) in a
&lt;br&gt;&amp;gt; cpp file, the compiler generates the warning:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; warning: only initialized variables can be placed into program memory area
&lt;br&gt;...snip...
&lt;br&gt;&lt;br&gt;&amp;gt; Does anyone have a proven solution or workaround for this problem? Is there
&lt;br&gt;&amp;gt; anything that can be done to at least suppress the warning without
&lt;br&gt;&amp;gt; suppressing other warnings?
&lt;br&gt;&lt;br&gt;I think I found a way.
&lt;br&gt;&lt;br&gt;I tested this with WinAVR-20080610 (gcc 4.3.0) and with the latest
&lt;br&gt;(WinAVR-20090313 gcc 4.3.2).
&lt;br&gt;&lt;br&gt;My source file, called test.cpp was as follows:
&lt;br&gt;&lt;br&gt;----- Start of test.cpp -----
&lt;br&gt;#include &amp;lt;avr/pgmspace.h&amp;gt;
&lt;br&gt;&lt;br&gt;#if 0
&lt;br&gt;#undef PROGMEM
&lt;br&gt;#define PROGMEM __attribute__(( section(&amp;quot;.progmem.data&amp;quot;) ))
&lt;br&gt;&lt;br&gt;#undef PSTR
&lt;br&gt;#define PSTR(s) (__extension__({static prog_char __c[] PROGMEM = (s);
&lt;br&gt;&amp;__c[0];}))
&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;void Log_P( const char *fmt, ... );
&lt;br&gt;&lt;br&gt;void foo( void )
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; Log_P( PSTR( &amp;quot;foo was called\n&amp;quot; ));
&lt;br&gt;}
&lt;br&gt;----- End of test.cpp -----
&lt;br&gt;&lt;br&gt;As shown above, I compiled it with the following command line:
&lt;br&gt;&lt;br&gt;603 &amp;gt;avr-g++ -mmcu=atmega168 -c test.cpp -o test1.o
&lt;br&gt;test.cpp: In function 'void foo()':
&lt;br&gt;test.cpp:15: warning: only initialized variables can be placed into
&lt;br&gt;program memory area
&lt;br&gt;&lt;br&gt;and then ran
&lt;br&gt;&lt;br&gt;604 &amp;gt;avr-objdump --full-contents test1.o
&lt;br&gt;&lt;br&gt;test1.o: &amp;nbsp; &amp;nbsp; file format elf32-avr
&lt;br&gt;&lt;br&gt;Contents of section .text:
&lt;br&gt;&amp;nbsp;0000 df93cf93 cdb7deb7 80e090e0 00d0edb7 &amp;nbsp;................
&lt;br&gt;&amp;nbsp;0010 feb73196 91838083 0e940000 0f900f90 &amp;nbsp;..1.............
&lt;br&gt;&amp;nbsp;0020 cf91df91 0895 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;......
&lt;br&gt;Contents of section .progmem.data:
&lt;br&gt;&amp;nbsp;0000 666f6f20 77617320 63616c6c 65640a00 &amp;nbsp;foo was called..
&lt;br&gt;&lt;br&gt;I then changed the #if 0 to #if 1 and repeated, replacing test1.o with test2.o
&lt;br&gt;&lt;br&gt;605 &amp;gt;avr-g++ -mmcu=atmega168 -c test.cpp -o test2.o
&lt;br&gt;606 &amp;gt;avr-objdump --full-contents test2.o
&lt;br&gt;&lt;br&gt;test2.o: &amp;nbsp; &amp;nbsp; file format elf32-avr
&lt;br&gt;&lt;br&gt;Contents of section .text:
&lt;br&gt;&amp;nbsp;0000 df93cf93 cdb7deb7 80e090e0 00d0edb7 &amp;nbsp;................
&lt;br&gt;&amp;nbsp;0010 feb73196 91838083 0e940000 0f900f90 &amp;nbsp;..1.............
&lt;br&gt;&amp;nbsp;0020 cf91df91 0895 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;......
&lt;br&gt;Contents of section .progmem.data:
&lt;br&gt;&amp;nbsp;0000 666f6f20 77617320 63616c6c 65640a00 &amp;nbsp;foo was called..
&lt;br&gt;&lt;br&gt;607 &amp;gt;cmp test1.o test2.o
&lt;br&gt;&lt;br&gt;shows that the two objects are in fact 100% identical, but the 2nd
&lt;br&gt;version has no warning.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Dave Hylands
&lt;br&gt;Shuswap, BC, Canada
&lt;br&gt;&lt;a href=&quot;http://www.DaveHylands.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.DaveHylands.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26667756&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/C%2B%2B-with-PSTR-tp26664456p26667756.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26664456</id>
	<title>C++ with PSTR</title>
	<published>2009-12-06T04:20:58Z</published>
	<updated>2009-12-06T04:20:58Z</updated>
	<author>
		<name>darkschine</name>
	</author>
	<content type="html">This topic is covered all over avr forums in bits and pieces so please keep responses to a minimum. The problem is that when using PSTR(&amp;quot;String&amp;quot;) in a cpp file, the compiler generates the warning:
&lt;br&gt;&lt;br&gt;warning: only initialized variables can be placed into program memory area
&lt;br&gt;&lt;br&gt;despite the warning, the code operates as desired, however, each occurrence of PSTR() generates the warning and therefore makes it difficult to efficiently analyse the compiler's output
&lt;br&gt;&lt;br&gt;A reported solution to the problem is to redefine PSTR from
&lt;br&gt;&lt;br&gt;# define PSTR(s) (__extension__({static char __c[] PROGMEM = (s); &amp;__c[0];})) 
&lt;br&gt;to
&lt;br&gt;# define PSTR(s) (__extension__({static prog_char __c[] = (s); &amp;__c[0];})) 
&lt;br&gt;&lt;br&gt;This solution prevents the warning but also causes the program to operate incorrectly
&lt;br&gt;&lt;br&gt;Does anyone have a proven solution or workaround for this problem? Is there anything that can be done to at least suppress the warning without suppressing other warnings?</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/C%2B%2B-with-PSTR-tp26664456p26664456.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26613958</id>
	<title>Re: AVR environment on Solaris 10</title>
	<published>2009-12-02T08:13:01Z</published>
	<updated>2009-12-02T08:13:01Z</updated>
	<author>
		<name>Andreas Höschler</name>
	</author>
	<content type="html">Hi Eric,
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; Am I missing an environment variable?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I've been bitten by this several times. IIRC, you're supposed to use 
&lt;br&gt;&amp;gt; GNU make 3.81. That should solve the problem.
&lt;br&gt;&lt;br&gt;It did solve the problem! Unbelievable!
&lt;br&gt;&lt;br&gt;Thanks so much,
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Andreas
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26613958&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/AVR-environment-on-Solaris-10-tp26595969p26613958.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26613772</id>
	<title>RE: AVR environment on Solaris 10</title>
	<published>2009-12-02T07:49:39Z</published>
	<updated>2009-12-02T07:49:39Z</updated>
	<author>
		<name>Weddington, Eric</name>
	</author>
	<content type="html">&amp;nbsp;
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: Andreas Höschler [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26613772&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ahoesch@...&lt;/a&gt;] 
&lt;br&gt;&amp;gt; Sent: Wednesday, December 02, 2009 3:08 AM
&lt;br&gt;&amp;gt; To: Weddington, Eric
&lt;br&gt;&amp;gt; Cc: Ruud Vlaming; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26613772&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-gcc-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: Re: [avr-gcc-list] AVR environment on Solaris 10
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I now have /usr/local/avr/bin/avr-gcc and it seems to work. However, &amp;nbsp;
&lt;br&gt;&amp;gt; while building the AVR C library (I am following the getting started &amp;nbsp;
&lt;br&gt;&amp;gt; instructions on &amp;nbsp;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.micahcarrick.com/02-15-2006/installing-gnu-tools-avr-&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.micahcarrick.com/02-15-2006/installing-gnu-tools-avr-&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&amp;gt; gcc.html) I get the following error:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 	mkdir /usr/local/avr/src
&lt;br&gt;&amp;gt; 	cd /usr/local/avr/src
&lt;br&gt;&amp;gt; 	bunzip2 avr-libc-1.6.7.tar.bz2
&lt;br&gt;&amp;gt; 	gtar xvf avr-libc-1.6.7.tar
&lt;br&gt;&amp;gt; 	cd avr-libc-1.6.7
&lt;br&gt;&amp;gt; 	./configure --build=`./config.guess` --host=avr 
&lt;br&gt;&amp;gt; --prefix=/usr/local/avr
&lt;br&gt;&amp;gt; 	make
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 	...
&lt;br&gt;&amp;gt; make[4]: Entering directory &amp;nbsp;
&lt;br&gt;&amp;gt; `/usr/local/avr/src/avr-libc-1.6.7/avr/lib/avr2'
&lt;br&gt;&amp;gt; avr-gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../common &amp;nbsp;
&lt;br&gt;&amp;gt; -I../../../include -g -Wall -W -Wstrict-prototypes &amp;nbsp;
&lt;br&gt;&amp;gt; -D__COMPILING_AVR_LIBC__ -mcall-prologues -Os -x assembler-with-cpp &amp;nbsp;
&lt;br&gt;&amp;gt; -Wa,-gstabs -D__COMPILING_AVR_LIBC__ -c -o 
&lt;br&gt;&amp;gt; eerd_block_at90s1200.o &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; \
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;-mmcu= &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;\
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;../../../libc/misc/eerd_block.S
&lt;br&gt;&amp;gt; cc1: error: missing argument to &amp;quot;-mmcu=&amp;quot;
&lt;br&gt;&amp;gt; make[4]: *** [eerd_block_at90s1200.o] Error 1
&lt;br&gt;&amp;gt; make[4]: Leaving directory &amp;nbsp;
&lt;br&gt;&amp;gt; `/usr/local/avr/src/avr-libc-1.6.7/avr/lib/avr2'
&lt;br&gt;&amp;gt; make[3]: *** [install-recursive] Error 1
&lt;br&gt;&amp;gt; make[3]: Leaving directory &amp;nbsp;
&lt;br&gt;&amp;gt; `/usr/local/avr/src/avr-libc-1.6.7/avr/lib/avr2'
&lt;br&gt;&amp;gt; make[2]: *** [install-recursive] Error 1
&lt;br&gt;&amp;gt; make[2]: Leaving directory `/usr/local/avr/src/avr-libc-1.6.7/avr/lib'
&lt;br&gt;&amp;gt; make[1]: *** [install-recursive] Error 1
&lt;br&gt;&amp;gt; make[1]: Leaving directory `/usr/local/avr/src/avr-libc-1.6.7/avr'
&lt;br&gt;&amp;gt; make: *** [install-recursive] Error 1
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Am I missing an environment variable?
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;I've been bitten by this several times. IIRC, you're supposed to use GNU make 3.81. That should solve the problem.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26613772&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/AVR-environment-on-Solaris-10-tp26595969p26613772.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26606683</id>
	<title>Re: AVR environment on Solaris 10</title>
	<published>2009-12-02T02:12:38Z</published>
	<updated>2009-12-02T02:12:38Z</updated>
	<author>
		<name>Andreas Höschler</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 	...
&lt;br&gt;&amp;gt; make[4]: Entering directory 
&lt;br&gt;&amp;gt; `/usr/local/avr/src/avr-libc-1.6.7/avr/lib/avr2'
&lt;br&gt;&amp;gt; avr-gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../common 
&lt;br&gt;&amp;gt; -I../../../include -g -Wall -W -Wstrict-prototypes 
&lt;br&gt;&amp;gt; -D__COMPILING_AVR_LIBC__ -mcall-prologues -Os -x assembler-with-cpp 
&lt;br&gt;&amp;gt; -Wa,-gstabs -D__COMPILING_AVR_LIBC__ -c -o eerd_block_at90s1200.o &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;\
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; -mmcu= &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;\
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; ../../../libc/misc/eerd_block.S
&lt;br&gt;&amp;gt; cc1: error: missing argument to &amp;quot;-mmcu=&amp;quot;
&lt;br&gt;&amp;gt; make[4]: *** [eerd_block_at90s1200.o] Error 1
&lt;br&gt;&amp;gt; make[4]: Leaving directory 
&lt;br&gt;&amp;gt; `/usr/local/avr/src/avr-libc-1.6.7/avr/lib/avr2'
&lt;br&gt;&amp;gt; make[3]: *** [install-recursive] Error 1
&lt;br&gt;&amp;gt; make[3]: Leaving directory 
&lt;br&gt;&amp;gt; `/usr/local/avr/src/avr-libc-1.6.7/avr/lib/avr2'
&lt;br&gt;&amp;gt; make[2]: *** [install-recursive] Error 1
&lt;br&gt;&amp;gt; make[2]: Leaving directory `/usr/local/avr/src/avr-libc-1.6.7/avr/lib'
&lt;br&gt;&amp;gt; make[1]: *** [install-recursive] Error 1
&lt;br&gt;&amp;gt; make[1]: Leaving directory `/usr/local/avr/src/avr-libc-1.6.7/avr'
&lt;br&gt;&amp;gt; make: *** [install-recursive] Error 1
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Am I missing an environment variable?
&lt;/div&gt;&lt;br&gt;I manually executed the failing line with -mmcu=atmega8. This worked! 
&lt;br&gt;So where do I set the -mmcu value for the whle build process?
&lt;br&gt;&lt;br&gt;Thanks a lot,
&lt;br&gt;&lt;br&gt;&amp;nbsp; Andreas
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26606683&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/AVR-environment-on-Solaris-10-tp26595969p26606683.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26606434</id>
	<title>Re: AVR environment on Solaris 10</title>
	<published>2009-12-02T02:07:52Z</published>
	<updated>2009-12-02T02:07:52Z</updated>
	<author>
		<name>Andreas Höschler</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; Thank you for trying. This seems not to encouraging.
&lt;br&gt;&amp;gt;&amp;gt; But, at least this tool tests before it runs into unclear
&lt;br&gt;&amp;gt;&amp;gt; errors... ;-)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Andreas just sent me a personal email saying that he finally got the &amp;nbsp;
&lt;br&gt;&amp;gt; toolchain to build.
&lt;br&gt;&lt;br&gt;Well, I got binutils and gcc successfully built with
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mkdir /usr/local/avr/
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mkdir /usr/local/avr/bin
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cd /usr/src
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gunzip binutils-2.20.tar.gz
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tar xvf binutils-2.20.tar
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cd binutils-2.20
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ./configure --target=avr --prefix=/usr/local/avr
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; make
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; make install
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cd /usr/src
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bunzip2 gcc-4.3.3.tar.bz2
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gtar xvf gcc-4.3.3.tar
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cd gcc-4.3.3
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mkdir objdir
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cd objdir
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ../configure --target=avr --prefix=/usr/local/avr --enable-languages=c &amp;nbsp;
&lt;br&gt;--disable-libssp --disable-shared --disable-libada --disable-libssp &amp;nbsp;
&lt;br&gt;--disable-nls --with-dwarf2 --with-gmp=/usr/local &amp;nbsp;
&lt;br&gt;--with-mpfr=/usr/local --prefix=/usr/local/avr
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; make
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; make install
&lt;br&gt;&lt;br&gt;I now have /usr/local/avr/bin/avr-gcc and it seems to work. However, &amp;nbsp;
&lt;br&gt;while building the AVR C library (I am following the getting started &amp;nbsp;
&lt;br&gt;instructions on &amp;nbsp;
&lt;br&gt;&lt;a href=&quot;http://www.micahcarrick.com/02-15-2006/installing-gnu-tools-avr-&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.micahcarrick.com/02-15-2006/installing-gnu-tools-avr-&lt;/a&gt;&amp;nbsp;
&lt;br&gt;gcc.html) I get the following error:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mkdir /usr/local/avr/src
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cd /usr/local/avr/src
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bunzip2 avr-libc-1.6.7.tar.bz2
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gtar xvf avr-libc-1.6.7.tar
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cd avr-libc-1.6.7
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ./configure --build=`./config.guess` --host=avr --prefix=/usr/local/avr
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; make
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;make[4]: Entering directory &amp;nbsp;
&lt;br&gt;`/usr/local/avr/src/avr-libc-1.6.7/avr/lib/avr2'
&lt;br&gt;avr-gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../common &amp;nbsp;
&lt;br&gt;-I../../../include -g -Wall -W -Wstrict-prototypes &amp;nbsp;
&lt;br&gt;-D__COMPILING_AVR_LIBC__ -mcall-prologues -Os -x assembler-with-cpp &amp;nbsp;
&lt;br&gt;-Wa,-gstabs -D__COMPILING_AVR_LIBC__ -c -o eerd_block_at90s1200.o &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;\
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;-mmcu= &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;\
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;../../../libc/misc/eerd_block.S
&lt;br&gt;cc1: error: missing argument to &amp;quot;-mmcu=&amp;quot;
&lt;br&gt;make[4]: *** [eerd_block_at90s1200.o] Error 1
&lt;br&gt;make[4]: Leaving directory &amp;nbsp;
&lt;br&gt;`/usr/local/avr/src/avr-libc-1.6.7/avr/lib/avr2'
&lt;br&gt;make[3]: *** [install-recursive] Error 1
&lt;br&gt;make[3]: Leaving directory &amp;nbsp;
&lt;br&gt;`/usr/local/avr/src/avr-libc-1.6.7/avr/lib/avr2'
&lt;br&gt;make[2]: *** [install-recursive] Error 1
&lt;br&gt;make[2]: Leaving directory `/usr/local/avr/src/avr-libc-1.6.7/avr/lib'
&lt;br&gt;make[1]: *** [install-recursive] Error 1
&lt;br&gt;make[1]: Leaving directory `/usr/local/avr/src/avr-libc-1.6.7/avr'
&lt;br&gt;make: *** [install-recursive] Error 1
&lt;br&gt;&lt;br&gt;Am I missing an environment variable?
&lt;br&gt;&lt;br&gt;Thanks a lot,
&lt;br&gt;&lt;br&gt;&amp;nbsp; Andreas
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26606434&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/AVR-environment-on-Solaris-10-tp26595969p26606434.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26599868</id>
	<title>RE: AVR environment on Solaris 10</title>
	<published>2009-12-01T14:01:59Z</published>
	<updated>2009-12-01T14:01:59Z</updated>
	<author>
		<name>Weddington, Eric</name>
	</author>
	<content type="html">&amp;nbsp;
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26599868&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-gcc-list-bounces+eric.weddington=atmel.com@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; [mailto:avr-gcc-list-bounces+eric.weddington=atmel.com@nongnu.
&lt;br&gt;&amp;gt; org] On Behalf Of Ruud Vlaming
&lt;br&gt;&amp;gt; Sent: Tuesday, December 01, 2009 2:56 PM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26599868&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-gcc-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: Re: [avr-gcc-list] AVR environment on Solaris 10
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hi Anreas,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thank you for trying. This seems not to encouraging. 
&lt;br&gt;&amp;gt; But, at least this tool tests before it runs into unclear 
&lt;br&gt;&amp;gt; errors... ;-)
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;Andreas just sent me a personal email saying that he finally got the toolchain to build.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26599868&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/AVR-environment-on-Solaris-10-tp26595969p26599868.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26599741</id>
	<title>Re: AVR environment on Solaris 10</title>
	<published>2009-12-01T13:56:03Z</published>
	<updated>2009-12-01T13:56:03Z</updated>
	<author>
		<name>Ruud Vlaming</name>
	</author>
	<content type="html">Hi Anreas,
&lt;br&gt;&lt;br&gt;Thank you for trying. This seems not to encouraging. 
&lt;br&gt;But, at least this tool tests before it runs into unclear errors... ;-)
&lt;br&gt;&lt;br&gt;Let me remark, that some of those tools are not specially
&lt;br&gt;needed by my builder, but more for the build process itself,
&lt;br&gt;which may not be as appearent as it may seem. Thus,
&lt;br&gt;as long as you do not have automake for example, you 
&lt;br&gt;will have a hard time getting the any avr toolchain
&lt;br&gt;compiled if i remember correctly. The same applies for
&lt;br&gt;libtool and some other guys.
&lt;br&gt;&lt;br&gt;On the other hand, it also can be that my version detection
&lt;br&gt;mechnism does not work correctly on Solaris. Determining
&lt;br&gt;the version of a program is difficult since the way programs
&lt;br&gt;report their version numbers is different per program and (!)
&lt;br&gt;different per operating system.
&lt;br&gt;&lt;br&gt;My advise would be to make sure you update/install
&lt;br&gt;the tools that are to old/missing, since i guess you will
&lt;br&gt;need most of them for a correct build anyway.
&lt;br&gt;(With or without my script!) Since these are all pretty 
&lt;br&gt;standard tools, using whatever packet manager is used 
&lt;br&gt;for Solaris, this should be not to hard.
&lt;br&gt;&lt;br&gt;After that you can give it an other try. If you think you
&lt;br&gt;do have a particular tool, contrary to what my builder
&lt;br&gt;reports, (automake for example) try typing that on 
&lt;br&gt;the commandline, if it reports present, than my script
&lt;br&gt;is not able to detect is somehow, and i must fix that first.
&lt;br&gt;&lt;br&gt;Succes.
&lt;br&gt;Ruud.
&lt;br&gt;&lt;br&gt;On Tuesday 01 December 2009, you wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Ruud,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; You can give my toolchainbuilder a try. Although it is
&lt;br&gt;&amp;gt; &amp;gt; not tested on Solaris, it runs on gentoo, Ubuntu, macos
&lt;br&gt;&amp;gt; &amp;gt; windows with cygwin, and probably others. It installs
&lt;br&gt;&amp;gt; &amp;gt; all patches, takes care of GMP and MPFR etc. If it runs,
&lt;br&gt;&amp;gt; &amp;gt; please say so, i can add it to the list. If not, send me
&lt;br&gt;&amp;gt; &amp;gt; the log, so i can solve it.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; It is in my Femto OS distribution.
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &lt;a href=&quot;http://sourceforge.net/projects/femtoos/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/projects/femtoos/&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I gave it a try and got
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ===&amp;gt; testing tools
&lt;br&gt;&amp;gt; ERROR: aclocal not present, script cannot continue.
&lt;br&gt;&amp;gt; WARNING: ar version could not be detected. (Needed: &amp;gt;= 2.16.1)
&lt;br&gt;&amp;gt; ERROR: autoconf not present, script cannot continue.
&lt;br&gt;&amp;gt; ERROR: autoheader not present, script cannot continue.
&lt;br&gt;&amp;gt; ERROR: automake not present, script cannot continue.
&lt;br&gt;&amp;gt; WARNING: bison version: 1.875, tool may be too old. (Needed: &amp;gt;= 2.1)
&lt;br&gt;&amp;gt; WARNING: flex version: 2.5.31, tool may be too old. (Needed: &amp;gt;= 2.5.33)
&lt;br&gt;&amp;gt; ERROR: gawk not present, script cannot continue.
&lt;br&gt;&amp;gt; OK: gcc version: 4.2.3
&lt;br&gt;&amp;gt; OK: g++ version: 4.2.3
&lt;br&gt;&amp;gt; WARNING: install version could not be detected. (Needed: &amp;gt;= 5.94)
&lt;br&gt;&amp;gt; ERROR: libtool not present, script cannot continue.
&lt;br&gt;&amp;gt; OK: make version: 3.80
&lt;br&gt;&amp;gt; WARNING: makeinfo version: 4.7, tool may be too old. (Needed: &amp;gt;= 4.8)
&lt;br&gt;&amp;gt; OK: openssl version: 0.9.8
&lt;br&gt;&amp;gt; WARNING: patch version could not be detected. (Needed: &amp;gt;= 2.5.8)
&lt;br&gt;&amp;gt; WARNING: perl version: 5.8.4, tool may be too old. (Needed: &amp;gt;= 5.8.8)
&lt;br&gt;&amp;gt; WARNING: touch version could not be detected. (Needed: &amp;gt;= 5.94)
&lt;br&gt;&amp;gt; OK: wget version: 1.10.2
&lt;br&gt;&amp;gt; ===&amp;gt; Test done.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ===&amp;gt; Results of this script:
&lt;br&gt;&amp;gt; - tools: failure
&lt;br&gt;&amp;gt; - download: skipped
&lt;br&gt;&amp;gt; - patches: skipped
&lt;br&gt;&amp;gt; - bin-utils: skipped
&lt;br&gt;&amp;gt; - gcc: skipped
&lt;br&gt;&amp;gt; - avr-libc: skipped
&lt;br&gt;&amp;gt; - avr-dude: skipped
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Seems a bunch of packages are missing! :-(
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I wonder what's the best way to proceed. Try to install/upgrade all 
&lt;br&gt;&amp;gt; these guys or try to get gcc built manually!? What do you think?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; Andreas
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26599741&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/AVR-environment-on-Solaris-10-tp26595969p26599741.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26598665</id>
	<title>RE: AVR environment on Solaris 10</title>
	<published>2009-12-01T12:37:01Z</published>
	<updated>2009-12-01T12:37:01Z</updated>
	<author>
		<name>Weddington, Eric</name>
	</author>
	<content type="html">&amp;nbsp;
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: Andreas Höschler [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26598665&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ahoesch@...&lt;/a&gt;] 
&lt;br&gt;&amp;gt; Sent: Tuesday, December 01, 2009 1:28 PM
&lt;br&gt;&amp;gt; To: Weddington, Eric
&lt;br&gt;&amp;gt; Cc: Jonathan Blanchard; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26598665&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-gcc-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: Re: [avr-gcc-list] AVR environment on Solaris 10
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; The build is still in progess, so no success so far.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; 	cd /usr/src
&lt;br&gt;&amp;gt; &amp;gt; 	gunzip binutils-2.20.tar.gz
&lt;br&gt;&amp;gt; &amp;gt; 	tar xvf binutils-2.20.tar
&lt;br&gt;&amp;gt; &amp;gt; 	cd binutils-2.20
&lt;br&gt;&amp;gt; &amp;gt; 	./configure --target=avr --prefix=/usr/local/avr
&lt;br&gt;&amp;gt; &amp;gt; 	make
&lt;br&gt;&amp;gt; &amp;gt; 	make install
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; 	cd /usr/src
&lt;br&gt;&amp;gt; &amp;gt; 	bunzip2 gcc-4.3.3.tar.bz2
&lt;br&gt;&amp;gt; &amp;gt; 	gtar xvf gcc-4.3.3.tar
&lt;br&gt;&amp;gt; &amp;gt; 	cd gcc-4.3.3
&lt;br&gt;&amp;gt; &amp;gt; 	mkdir objdir
&lt;br&gt;&amp;gt; &amp;gt; 	cd objdir
&lt;br&gt;&amp;gt; &amp;gt; 	../configure --target=avr --prefix=/usr/local/avr 
&lt;br&gt;&amp;gt; --enable-languages=c
&lt;br&gt;&amp;gt; &amp;gt; 	make
&lt;br&gt;&amp;gt; &amp;gt; 	make install
&lt;br&gt;&amp;gt; &amp;gt; Ah, but no failure yet either! ;-)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In the meanwhile I got a failure trying this on Solaris 10:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;quot; -c -o ssp.lo ../../../libssp/ssp.c; \
&lt;br&gt;&amp;gt; then mv -f &amp;quot;.deps/ssp.Tpo&amp;quot; &amp;quot;.deps/ssp.Plo&amp;quot;; else rm -f 
&lt;br&gt;&amp;gt; &amp;quot;.deps/ssp.Tpo&amp;quot;; 
&lt;br&gt;&amp;gt; exit 1; fi
&lt;br&gt;&amp;gt; libtool: compile: &amp;nbsp;/usr/src/gcc-4.3.3/objdir/./gcc/xgcc 
&lt;br&gt;&amp;gt; -B/usr/src/gcc-4.3.3/objdir/./gcc/ -B/usr/local/avr/avr/bin/ 
&lt;br&gt;&amp;gt; -B/usr/local/avr/avr/lib/ -isystem /usr/local/avr/avr/include 
&lt;br&gt;&amp;gt; -isystem 
&lt;br&gt;&amp;gt; /usr/local/avr/avr/sys-include -DHAVE_CONFIG_H -I. -I../../../libssp 
&lt;br&gt;&amp;gt; -I. -Wall -O2 -g -g -O2 -MT ssp.lo -MD -MP -MF .deps/ssp.Tpo -c 
&lt;br&gt;&amp;gt; ../../../libssp/ssp.c -o ssp.o
&lt;br&gt;&amp;gt; ../../../libssp/ssp.c: In function '__guard_setup':
&lt;br&gt;&amp;gt; ../../../libssp/ssp.c:70: warning: implicit declaration of function 
&lt;br&gt;&amp;gt; 'open'
&lt;br&gt;&amp;gt; ../../../libssp/ssp.c:70: error: 'O_RDONLY' undeclared (first use in 
&lt;br&gt;&amp;gt; this function)
&lt;/div&gt;&lt;br&gt;Use --disable-libssp in your configure.
&lt;br&gt;&lt;br&gt;These are my configure switches:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; --with-gmp=/usr/local \
&lt;br&gt;&amp;nbsp; &amp;nbsp; --with-mpfr=/usr/local \
&lt;br&gt;&amp;nbsp; &amp;nbsp; --prefix=$installdir \
&lt;br&gt;&amp;nbsp; &amp;nbsp; --target=$target \
&lt;br&gt;&amp;nbsp; &amp;nbsp; --enable-languages=$lang \
&lt;br&gt;&amp;nbsp; &amp;nbsp; --with-dwarf2 \
&lt;br&gt;&amp;nbsp; &amp;nbsp; --enable-doc \
&lt;br&gt;&amp;nbsp; &amp;nbsp; --disable-shared \
&lt;br&gt;&amp;nbsp; &amp;nbsp; --disable-libada \
&lt;br&gt;&amp;nbsp; &amp;nbsp; --disable-libssp \
&lt;br&gt;&amp;nbsp; &amp;nbsp; --disable-nls \
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26598665&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/AVR-environment-on-Solaris-10-tp26595969p26598665.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26598540</id>
	<title>Re: AVR environment on Solaris 10</title>
	<published>2009-12-01T12:27:42Z</published>
	<updated>2009-12-01T12:27:42Z</updated>
	<author>
		<name>Andreas Höschler</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The build is still in progess, so no success so far.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 	cd /usr/src
&lt;br&gt;&amp;gt; 	gunzip binutils-2.20.tar.gz
&lt;br&gt;&amp;gt; 	tar xvf binutils-2.20.tar
&lt;br&gt;&amp;gt; 	cd binutils-2.20
&lt;br&gt;&amp;gt; 	./configure --target=avr --prefix=/usr/local/avr
&lt;br&gt;&amp;gt; 	make
&lt;br&gt;&amp;gt; 	make install
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 	cd /usr/src
&lt;br&gt;&amp;gt; 	bunzip2 gcc-4.3.3.tar.bz2
&lt;br&gt;&amp;gt; 	gtar xvf gcc-4.3.3.tar
&lt;br&gt;&amp;gt; 	cd gcc-4.3.3
&lt;br&gt;&amp;gt; 	mkdir objdir
&lt;br&gt;&amp;gt; 	cd objdir
&lt;br&gt;&amp;gt; 	../configure --target=avr --prefix=/usr/local/avr --enable-languages=c
&lt;br&gt;&amp;gt; 	make
&lt;br&gt;&amp;gt; 	make install
&lt;br&gt;&amp;gt; Ah, but no failure yet either! ;-)
&lt;/div&gt;&lt;br&gt;In the meanwhile I got a failure trying this on Solaris 10:
&lt;br&gt;&lt;br&gt;&amp;quot; -c -o ssp.lo ../../../libssp/ssp.c; \
&lt;br&gt;then mv -f &amp;quot;.deps/ssp.Tpo&amp;quot; &amp;quot;.deps/ssp.Plo&amp;quot;; else rm -f &amp;quot;.deps/ssp.Tpo&amp;quot;; 
&lt;br&gt;exit 1; fi
&lt;br&gt;libtool: compile: &amp;nbsp;/usr/src/gcc-4.3.3/objdir/./gcc/xgcc 
&lt;br&gt;-B/usr/src/gcc-4.3.3/objdir/./gcc/ -B/usr/local/avr/avr/bin/ 
&lt;br&gt;-B/usr/local/avr/avr/lib/ -isystem /usr/local/avr/avr/include -isystem 
&lt;br&gt;/usr/local/avr/avr/sys-include -DHAVE_CONFIG_H -I. -I../../../libssp 
&lt;br&gt;-I. -Wall -O2 -g -g -O2 -MT ssp.lo -MD -MP -MF .deps/ssp.Tpo -c 
&lt;br&gt;../../../libssp/ssp.c -o ssp.o
&lt;br&gt;../../../libssp/ssp.c: In function '__guard_setup':
&lt;br&gt;../../../libssp/ssp.c:70: warning: implicit declaration of function 
&lt;br&gt;'open'
&lt;br&gt;../../../libssp/ssp.c:70: error: 'O_RDONLY' undeclared (first use in 
&lt;br&gt;this function)
&lt;br&gt;../../../libssp/ssp.c:70: error: (Each undeclared identifier is 
&lt;br&gt;reported only once
&lt;br&gt;../../../libssp/ssp.c:70: error: for each function it appears in.)
&lt;br&gt;../../../libssp/ssp.c:73: error: 'ssize_t' undeclared (first use in 
&lt;br&gt;this function)
&lt;br&gt;../../../libssp/ssp.c:73: error: expected ';' before 'size'
&lt;br&gt;../../../libssp/ssp.c:75: warning: implicit declaration of function 
&lt;br&gt;'close'
&lt;br&gt;../../../libssp/ssp.c:76: error: 'size' undeclared (first use in this 
&lt;br&gt;function)
&lt;br&gt;../../../libssp/ssp.c: At top level:
&lt;br&gt;../../../libssp/ssp.c:89: error: expected declaration specifiers or 
&lt;br&gt;'...' before 'size_t'
&lt;br&gt;../../../libssp/ssp.c: In function 'fail':
&lt;br&gt;../../../libssp/ssp.c:100: error: 'O_WRONLY' undeclared (first use in 
&lt;br&gt;this function)
&lt;br&gt;../../../libssp/ssp.c:104: error: 'size_t' undeclared (first use in 
&lt;br&gt;this function)
&lt;br&gt;../../../libssp/ssp.c:104: error: expected ';' before 'progname_len'
&lt;br&gt;../../../libssp/ssp.c:107: error: 'progname_len' undeclared (first use 
&lt;br&gt;in this function)
&lt;br&gt;../../../libssp/ssp.c:107: warning: implicit declaration of function 
&lt;br&gt;'strlen'
&lt;br&gt;../../../libssp/ssp.c:107: warning: incompatible implicit declaration 
&lt;br&gt;of built-in function 'strlen'
&lt;br&gt;../../../libssp/ssp.c:108: error: 'len' undeclared (first use in this 
&lt;br&gt;function)
&lt;br&gt;../../../libssp/ssp.c:108: error: 'msg1len' undeclared (first use in 
&lt;br&gt;this function)
&lt;br&gt;../../../libssp/ssp.c:109: warning: implicit declaration of function 
&lt;br&gt;'alloca'
&lt;br&gt;../../../libssp/ssp.c:109: warning: incompatible implicit declaration 
&lt;br&gt;of built-in function 'alloca'
&lt;br&gt;../../../libssp/ssp.c:111: warning: implicit declaration of function 
&lt;br&gt;'memcpy'
&lt;br&gt;../../../libssp/ssp.c:111: warning: incompatible implicit declaration 
&lt;br&gt;of built-in function 'memcpy'
&lt;br&gt;../../../libssp/ssp.c:119: error: 'ssize_t' undeclared (first use in 
&lt;br&gt;this function)
&lt;br&gt;../../../libssp/ssp.c:119: error: expected ';' before 'wrote'
&lt;br&gt;../../../libssp/ssp.c:120: error: 'wrote' undeclared (first use in this 
&lt;br&gt;function)
&lt;br&gt;../../../libssp/ssp.c:151: warning: implicit declaration of function 
&lt;br&gt;'_exit'
&lt;br&gt;../../../libssp/ssp.c:151: warning: incompatible implicit declaration 
&lt;br&gt;of built-in function '_exit'
&lt;br&gt;../../../libssp/ssp.c: In function '__stack_chk_fail':
&lt;br&gt;../../../libssp/ssp.c:161: warning: incompatible implicit declaration 
&lt;br&gt;of built-in function 'strlen'
&lt;br&gt;../../../libssp/ssp.c:161: warning: passing argument 2 of 'fail' makes 
&lt;br&gt;pointer from integer without a cast
&lt;br&gt;../../../libssp/ssp.c:161: error: too many arguments to function 'fail'
&lt;br&gt;../../../libssp/ssp.c: In function '__chk_fail':
&lt;br&gt;../../../libssp/ssp.c:168: warning: incompatible implicit declaration 
&lt;br&gt;of built-in function 'strlen'
&lt;br&gt;../../../libssp/ssp.c:168: warning: passing argument 2 of 'fail' makes 
&lt;br&gt;pointer from integer without a cast
&lt;br&gt;../../../libssp/ssp.c:168: error: too many arguments to function 'fail'
&lt;br&gt;make[2]: *** [ssp.lo] Error 1
&lt;br&gt;make[2]: Leaving directory `/usr/share/src/gcc-4.3.3/objdir/avr/libssp'
&lt;br&gt;make[1]: *** [install-target-libssp] Error 2
&lt;br&gt;make[1]: Leaving directory `/usr/share/src/gcc-4.3.3/objdir'
&lt;br&gt;make: *** [install] Error 2
&lt;br&gt;&lt;br&gt;Any idea?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;&lt;br&gt;&amp;nbsp; Andreas
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26598540&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/AVR-environment-on-Solaris-10-tp26595969p26598540.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26597263</id>
	<title>RE: AVR environment on Solaris 10</title>
	<published>2009-12-01T11:01:33Z</published>
	<updated>2009-12-01T11:01:33Z</updated>
	<author>
		<name>Weddington, Eric</name>
	</author>
	<content type="html">&amp;nbsp;
&lt;br&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: Andreas Höschler [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26597263&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ahoesch@...&lt;/a&gt;] 
&lt;br&gt;&amp;gt; Sent: Tuesday, December 01, 2009 11:47 AM
&lt;br&gt;&amp;gt; To: Jonathan Blanchard
&lt;br&gt;&amp;gt; Cc: Weddington, Eric; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26597263&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-gcc-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: Re: [avr-gcc-list] AVR environment on Solaris 10
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The build is still in progess, so no success so far. 
&lt;br&gt;&lt;br&gt;Ah, but no failure yet either! ;-)
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26597263&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/AVR-environment-on-Solaris-10-tp26595969p26597263.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26597050</id>
	<title>Re: AVR environment on Solaris 10</title>
	<published>2009-12-01T10:46:48Z</published>
	<updated>2009-12-01T10:46:48Z</updated>
	<author>
		<name>Andreas Höschler</name>
	</author>
	<content type="html">Hi Jonathan,
&lt;br&gt;&lt;br&gt;&amp;gt; I can offer some help as I built it before on Solaris 10. It was quite
&lt;br&gt;&amp;gt; a while ago but I think that everything should work.
&lt;br&gt;&lt;br&gt;Thanks a lot for your offer. I modified the build process to
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cd /usr/src
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gunzip binutils-2.20.tar.gz
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tar xvf binutils-2.20.tar
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cd binutils-2.20
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ./configure --target=avr --prefix=/usr/local/avr
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; make
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; make install
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cd /usr/src
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bunzip2 gcc-4.3.3.tar.bz2
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gtar xvf gcc-4.3.3.tar
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cd gcc-4.3.3
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mkdir objdir
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cd objdir
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ../configure --target=avr --prefix=/usr/local/avr --enable-languages=c
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; make
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; make install
&lt;br&gt;&lt;br&gt;The build is still in progess, so no success so far. I will let you 
&lt;br&gt;know!
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;&lt;br&gt;&amp;nbsp; Andreas
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26597050&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/AVR-environment-on-Solaris-10-tp26595969p26597050.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26594445</id>
	<title>Re: AVR environment on Solaris 10</title>
	<published>2009-12-01T09:15:35Z</published>
	<updated>2009-12-01T09:15:35Z</updated>
	<author>
		<name>Jonathan Blanchard</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I can offer some help as I built it before on Solaris 10. It was quite
&lt;br&gt;a while ago but I think that everything should work.
&lt;br&gt;&lt;br&gt;Jonathan Blanchard
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;2009/12/1 Andreas Höschler &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26594445&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ahoesch@...&lt;/a&gt;&amp;gt;:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Eric,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Normally binutils is built in a separate build directory, not built in its
&lt;br&gt;&amp;gt;&amp;gt; source tree.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I don't know for sure if you really need to use the --program-prefix
&lt;br&gt;&amp;gt;&amp;gt; configure switch in binutils and gcc. The build process normally does that
&lt;br&gt;&amp;gt;&amp;gt; on other hosts, but I don't know how it behaves on Solaris.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; You do need to make sure that after binutils is built, that you put the
&lt;br&gt;&amp;gt;&amp;gt; installation directory (--prefix) in your PATH environment variable.
&lt;br&gt;&amp;gt;&amp;gt; Building gcc and avr-libc will need to know where the just-built AVR
&lt;br&gt;&amp;gt;&amp;gt; assembler and linker are located.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; You have the gcc configure switch --enable-language=c and it should be
&lt;br&gt;&amp;gt;&amp;gt; --enable-languages=c. Note that &amp;quot;languages&amp;quot; is plural.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; It would be better to build gcc version 4.3.3, instead of 4.2.3. It's a
&lt;br&gt;&amp;gt;&amp;gt; more recent version and it's being used on other hosts.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; To get support for other devices, as well as a number of bug fixes, you'll
&lt;br&gt;&amp;gt;&amp;gt; need to patch your binutils and gcc source code using the patches found at
&lt;br&gt;&amp;gt;&amp;gt; the WinAVR project (SourceForge) or using the patches found in the FreeBSD
&lt;br&gt;&amp;gt;&amp;gt; Ports project. These are roughly the same patches. The WinAVR patches only
&lt;br&gt;&amp;gt;&amp;gt; patch binutils 2.19 though, not 2.20.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; You will need to have the GMP and MPFR library packages on your host in
&lt;br&gt;&amp;gt;&amp;gt; order to properly build GCC. If you don't have these libraries, they are
&lt;br&gt;&amp;gt;&amp;gt; relatively easy to build.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I don't know for sure whether any of the above is a cause of your problem,
&lt;br&gt;&amp;gt;&amp;gt; but it might help out.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks for all your comments. I am currently downloading gcc 4.33 and will
&lt;br&gt;&amp;gt; retry with the modified options. I will let you know ...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks a lot,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;  Andreas
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; AVR-GCC-list mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26594445&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26594445&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/AVR-environment-on-Solaris-10-tp26595969p26594445.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26594506</id>
	<title>Re: AVR environment on Solaris 10</title>
	<published>2009-12-01T09:02:56Z</published>
	<updated>2009-12-01T09:02:56Z</updated>
	<author>
		<name>Ruud Vlaming</name>
	</author>
	<content type="html">On Tuesday 01 December 2009, Andreas Höschler wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; I am trying to setup an AVR development environment 
&lt;br&gt;&amp;gt; on my Solaris 10 machine as follows:
&lt;br&gt;&lt;br&gt;You can give my toolchainbuilder a try. Although it is
&lt;br&gt;not tested on Solaris, it runs on gentoo, Ubuntu, macos
&lt;br&gt;windows with cygwin, and probably others. It installs
&lt;br&gt;all patches, takes care of GMP and MPFR etc. If it runs, 
&lt;br&gt;please say so, i can add it to the list. If not, send me
&lt;br&gt;the log, so i can solve it.
&lt;br&gt;&lt;br&gt;It is in my Femto OS distribution. 
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://sourceforge.net/projects/femtoos/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/projects/femtoos/&lt;/a&gt;&lt;br&gt;&lt;br&gt;regards
&lt;br&gt;Ruud.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26594506&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/AVR-environment-on-Solaris-10-tp26595969p26594506.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26594798</id>
	<title>Re: AVR environment on Solaris 10</title>
	<published>2009-12-01T09:02:48Z</published>
	<updated>2009-12-01T09:02:48Z</updated>
	<author>
		<name>Andreas Höschler</name>
	</author>
	<content type="html">Hi Eric,
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Normally binutils is built in a separate build directory, not built in 
&lt;br&gt;&amp;gt; its source tree.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I don't know for sure if you really need to use the --program-prefix 
&lt;br&gt;&amp;gt; configure switch in binutils and gcc. The build process normally does 
&lt;br&gt;&amp;gt; that on other hosts, but I don't know how it behaves on Solaris.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You do need to make sure that after binutils is built, that you put 
&lt;br&gt;&amp;gt; the installation directory (--prefix) in your PATH environment 
&lt;br&gt;&amp;gt; variable. Building gcc and avr-libc will need to know where the 
&lt;br&gt;&amp;gt; just-built AVR assembler and linker are located.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You have the gcc configure switch --enable-language=c and it should be 
&lt;br&gt;&amp;gt; --enable-languages=c. Note that &amp;quot;languages&amp;quot; is plural.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It would be better to build gcc version 4.3.3, instead of 4.2.3. It's 
&lt;br&gt;&amp;gt; a more recent version and it's being used on other hosts.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; To get support for other devices, as well as a number of bug fixes, 
&lt;br&gt;&amp;gt; you'll need to patch your binutils and gcc source code using the 
&lt;br&gt;&amp;gt; patches found at the WinAVR project (SourceForge) or using the patches 
&lt;br&gt;&amp;gt; found in the FreeBSD Ports project. These are roughly the same 
&lt;br&gt;&amp;gt; patches. The WinAVR patches only patch binutils 2.19 though, not 2.20.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You will need to have the GMP and MPFR library packages on your host 
&lt;br&gt;&amp;gt; in order to properly build GCC. If you don't have these libraries, 
&lt;br&gt;&amp;gt; they are relatively easy to build.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I don't know for sure whether any of the above is a cause of your 
&lt;br&gt;&amp;gt; problem, but it might help out.
&lt;/div&gt;&lt;br&gt;Thanks for all your comments. I am currently downloading gcc 4.33 and 
&lt;br&gt;will retry with the modified options. I will let you know ...
&lt;br&gt;&lt;br&gt;Thanks a lot,
&lt;br&gt;&lt;br&gt;&amp;nbsp; Andreas
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26594798&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/AVR-environment-on-Solaris-10-tp26595969p26594798.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26595062</id>
	<title>RE: AVR environment on Solaris 10</title>
	<published>2009-12-01T08:47:04Z</published>
	<updated>2009-12-01T08:47:04Z</updated>
	<author>
		<name>Weddington, Eric</name>
	</author>
	<content type="html">Hi Andreas,
&lt;br&gt;&lt;br&gt;Various comments:
&lt;br&gt;&lt;br&gt;Normally binutils is built in a separate build directory, not built in its source tree.
&lt;br&gt;&lt;br&gt;I don't know for sure if you really need to use the --program-prefix configure switch in binutils and gcc. The build process normally does that on other hosts, but I don't know how it behaves on Solaris.
&lt;br&gt;&lt;br&gt;You do need to make sure that after binutils is built, that you put the installation directory (--prefix) in your PATH environment variable. Building gcc and avr-libc will need to know where the just-built AVR assembler and linker are located.
&lt;br&gt;&lt;br&gt;You have the gcc configure switch --enable-language=c and it should be --enable-languages=c. Note that &amp;quot;languages&amp;quot; is plural.
&lt;br&gt;&lt;br&gt;It would be better to build gcc version 4.3.3, instead of 4.2.3. It's a more recent version and it's being used on other hosts.
&lt;br&gt;&lt;br&gt;To get support for other devices, as well as a number of bug fixes, you'll need to patch your binutils and gcc source code using the patches found at the WinAVR project (SourceForge) or using the patches found in the FreeBSD Ports project. These are roughly the same patches. The WinAVR patches only patch binutils 2.19 though, not 2.20.
&lt;br&gt;&lt;br&gt;You will need to have the GMP and MPFR library packages on your host in order to properly build GCC. If you don't have these libraries, they are relatively easy to build.
&lt;br&gt;&lt;br&gt;I don't know for sure whether any of the above is a cause of your problem, but it might help out.
&lt;br&gt;&lt;br&gt;Eric Weddington
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26595062&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-gcc-list-bounces+eric.weddington=atmel.com@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; [mailto:avr-gcc-list-bounces+eric.weddington=atmel.com@nongnu.
&lt;br&gt;&amp;gt; org] On Behalf Of Andreas Höschler
&lt;br&gt;&amp;gt; Sent: Tuesday, December 01, 2009 9:07 AM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26595062&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-gcc-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: [avr-gcc-list] AVR environment on Solaris 10
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I am trying to setup an AVR development environment on my Solaris 10 
&lt;br&gt;&amp;gt; machine as follows:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 	mkdir /usr/local/avr/
&lt;br&gt;&amp;gt; 	mkdir /usr/local/avr/bin
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 	cd /usr/src
&lt;br&gt;&amp;gt; 	gunzip binutils-2.20.tar.gz
&lt;br&gt;&amp;gt; 	tar xvf binutils-2.20.tar
&lt;br&gt;&amp;gt; 	cd binutils-2.20
&lt;br&gt;&amp;gt; 	./configure --target=avr --prefix=/usr/local/avr 
&lt;br&gt;&amp;gt; --program-prefix=&amp;quot;avr-&amp;quot;
&lt;br&gt;&amp;gt; 	make
&lt;br&gt;&amp;gt; 	make install
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 	cd /usr/src
&lt;br&gt;&amp;gt; 	gtar xvf gcc-4.2.3.tar
&lt;br&gt;&amp;gt; 	cd gcc-4.2.3
&lt;br&gt;&amp;gt; 	mkdir objdir
&lt;br&gt;&amp;gt; 	cd objdir
&lt;br&gt;&amp;gt; 	../configure --target=avr --prefix=/usr/local/avr 
&lt;br&gt;&amp;gt; --enable-language=c 
&lt;br&gt;&amp;gt; --program-prefix=&amp;quot;avr-&amp;quot;
&lt;br&gt;&amp;gt; 	make
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The make of the gcc build leads to the following error:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; make[2]: Entering directory 
&lt;br&gt;&amp;gt; `/usr/share/src/gcc-4.2.3/objdir/libdecnumber'
&lt;br&gt;&amp;gt; source='../../libdecnumber/decNumber.c' object='decNumber.o' 
&lt;br&gt;&amp;gt; libtool=no 
&lt;br&gt;&amp;gt; gcc &amp;nbsp;-I../../libdecnumber -I. &amp;nbsp;-g -O2 -W -Wall -Wwrite-strings 
&lt;br&gt;&amp;gt; -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition 
&lt;br&gt;&amp;gt; -Wmissing-format-attribute -Wcast-qual -pedantic -Wno-long-long &amp;nbsp;
&lt;br&gt;&amp;gt; -I../../libdecnumber -I. &amp;nbsp;-c ../../libdecnumber/decNumber.c
&lt;br&gt;&amp;gt; source='../../libdecnumber/decContext.c' object='decContext.o' 
&lt;br&gt;&amp;gt; libtool=no gcc &amp;nbsp;-I../../libdecnumber -I. &amp;nbsp;-g -O2 -W -Wall 
&lt;br&gt;&amp;gt; -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 
&lt;br&gt;&amp;gt; -Wold-style-definition -Wmissing-format-attribute -Wcast-qual 
&lt;br&gt;&amp;gt; -pedantic 
&lt;br&gt;&amp;gt; -Wno-long-long &amp;nbsp;-I../../libdecnumber -I. &amp;nbsp;-c 
&lt;br&gt;&amp;gt; ../../libdecnumber/decContext.c
&lt;br&gt;&amp;gt; source='../../libdecnumber/decUtility.c' object='decUtility.o' 
&lt;br&gt;&amp;gt; libtool=no gcc &amp;nbsp;-I../../libdecnumber -I. &amp;nbsp;-g -O2 -W -Wall 
&lt;br&gt;&amp;gt; -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 
&lt;br&gt;&amp;gt; -Wold-style-definition -Wmissing-format-attribute -Wcast-qual 
&lt;br&gt;&amp;gt; -pedantic 
&lt;br&gt;&amp;gt; -Wno-long-long &amp;nbsp;-I../../libdecnumber -I. &amp;nbsp;-c 
&lt;br&gt;&amp;gt; ../../libdecnumber/decUtility.c
&lt;br&gt;&amp;gt; source='../../libdecnumber/decimal32.c' object='decimal32.o' 
&lt;br&gt;&amp;gt; libtool=no 
&lt;br&gt;&amp;gt; gcc &amp;nbsp;-I../../libdecnumber -I. &amp;nbsp;-g -O2 -W -Wall -Wwrite-strings 
&lt;br&gt;&amp;gt; -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition 
&lt;br&gt;&amp;gt; -Wmissing-format-attribute -Wcast-qual -pedantic -Wno-long-long &amp;nbsp;
&lt;br&gt;&amp;gt; -I../../libdecnumber -I. &amp;nbsp;-c ../../libdecnumber/decimal32.c
&lt;br&gt;&amp;gt; source='../../libdecnumber/decimal64.c' object='decimal64.o' 
&lt;br&gt;&amp;gt; libtool=no 
&lt;br&gt;&amp;gt; gcc &amp;nbsp;-I../../libdecnumber -I. &amp;nbsp;-g -O2 -W -Wall -Wwrite-strings 
&lt;br&gt;&amp;gt; -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition 
&lt;br&gt;&amp;gt; -Wmissing-format-attribute -Wcast-qual -pedantic -Wno-long-long &amp;nbsp;
&lt;br&gt;&amp;gt; -I../../libdecnumber -I. &amp;nbsp;-c ../../libdecnumber/decimal64.c
&lt;br&gt;&amp;gt; source='../../libdecnumber/decimal128.c' object='decimal128.o' 
&lt;br&gt;&amp;gt; libtool=no gcc &amp;nbsp;-I../../libdecnumber -I. &amp;nbsp;-g -O2 -W -Wall 
&lt;br&gt;&amp;gt; -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 
&lt;br&gt;&amp;gt; -Wold-style-definition -Wmissing-format-attribute -Wcast-qual 
&lt;br&gt;&amp;gt; -pedantic 
&lt;br&gt;&amp;gt; -Wno-long-long &amp;nbsp;-I../../libdecnumber -I. &amp;nbsp;-c 
&lt;br&gt;&amp;gt; ../../libdecnumber/decimal128.c
&lt;br&gt;&amp;gt; rm -f libdecnumber.a
&lt;br&gt;&amp;gt; ar cru libdecnumber.a decNumber.o decContext.o decUtility.o 
&lt;br&gt;&amp;gt; decimal32.o 
&lt;br&gt;&amp;gt; decimal64.o decimal128.o
&lt;br&gt;&amp;gt; ranlib libdecnumber.a
&lt;br&gt;&amp;gt; make[2]: Leaving directory 
&lt;br&gt;&amp;gt; `/usr/share/src/gcc-4.2.3/objdir/libdecnumber'
&lt;br&gt;&amp;gt; make[2]: Entering directory `/usr/share/src/gcc-4.2.3/objdir/gcc'
&lt;br&gt;&amp;gt; make[2]: *** No rule to make target `all'. &amp;nbsp;Stop.
&lt;br&gt;&amp;gt; make[2]: Leaving directory `/usr/share/src/gcc-4.2.3/objdir/gcc'
&lt;br&gt;&amp;gt; make[1]: *** [all-gcc] Error 2
&lt;br&gt;&amp;gt; make[1]: Leaving directory `/usr/share/src/gcc-4.2.3/objdir'
&lt;br&gt;&amp;gt; make: *** [all] Error 2
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I am not sure what to do with that. Any idea what went wrong here?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hints are greatly appreciated!
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; Andreas
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; AVR-GCC-list mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26595062&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26595062&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/AVR-environment-on-Solaris-10-tp26595969p26595062.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26595969</id>
	<title>AVR environment on Solaris 10</title>
	<published>2009-12-01T08:06:57Z</published>
	<updated>2009-12-01T08:06:57Z</updated>
	<author>
		<name>Andreas Höschler</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;I am trying to setup an AVR development environment on my Solaris 10 
&lt;br&gt;machine as follows:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mkdir /usr/local/avr/
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mkdir /usr/local/avr/bin
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cd /usr/src
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gunzip binutils-2.20.tar.gz
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tar xvf binutils-2.20.tar
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cd binutils-2.20
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ./configure --target=avr --prefix=/usr/local/avr 
&lt;br&gt;--program-prefix=&amp;quot;avr-&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; make
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; make install
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cd /usr/src
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gtar xvf gcc-4.2.3.tar
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cd gcc-4.2.3
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mkdir objdir
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cd objdir
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ../configure --target=avr --prefix=/usr/local/avr --enable-language=c 
&lt;br&gt;--program-prefix=&amp;quot;avr-&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; make
&lt;br&gt;&lt;br&gt;The make of the gcc build leads to the following error:
&lt;br&gt;&lt;br&gt;make[2]: Entering directory 
&lt;br&gt;`/usr/share/src/gcc-4.2.3/objdir/libdecnumber'
&lt;br&gt;source='../../libdecnumber/decNumber.c' object='decNumber.o' libtool=no 
&lt;br&gt;gcc &amp;nbsp;-I../../libdecnumber -I. &amp;nbsp;-g -O2 -W -Wall -Wwrite-strings 
&lt;br&gt;-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition 
&lt;br&gt;-Wmissing-format-attribute -Wcast-qual -pedantic -Wno-long-long &amp;nbsp;
&lt;br&gt;-I../../libdecnumber -I. &amp;nbsp;-c ../../libdecnumber/decNumber.c
&lt;br&gt;source='../../libdecnumber/decContext.c' object='decContext.o' 
&lt;br&gt;libtool=no gcc &amp;nbsp;-I../../libdecnumber -I. &amp;nbsp;-g -O2 -W -Wall 
&lt;br&gt;-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 
&lt;br&gt;-Wold-style-definition -Wmissing-format-attribute -Wcast-qual -pedantic 
&lt;br&gt;-Wno-long-long &amp;nbsp;-I../../libdecnumber -I. &amp;nbsp;-c 
&lt;br&gt;../../libdecnumber/decContext.c
&lt;br&gt;source='../../libdecnumber/decUtility.c' object='decUtility.o' 
&lt;br&gt;libtool=no gcc &amp;nbsp;-I../../libdecnumber -I. &amp;nbsp;-g -O2 -W -Wall 
&lt;br&gt;-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 
&lt;br&gt;-Wold-style-definition -Wmissing-format-attribute -Wcast-qual -pedantic 
&lt;br&gt;-Wno-long-long &amp;nbsp;-I../../libdecnumber -I. &amp;nbsp;-c 
&lt;br&gt;../../libdecnumber/decUtility.c
&lt;br&gt;source='../../libdecnumber/decimal32.c' object='decimal32.o' libtool=no 
&lt;br&gt;gcc &amp;nbsp;-I../../libdecnumber -I. &amp;nbsp;-g -O2 -W -Wall -Wwrite-strings 
&lt;br&gt;-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition 
&lt;br&gt;-Wmissing-format-attribute -Wcast-qual -pedantic -Wno-long-long &amp;nbsp;
&lt;br&gt;-I../../libdecnumber -I. &amp;nbsp;-c ../../libdecnumber/decimal32.c
&lt;br&gt;source='../../libdecnumber/decimal64.c' object='decimal64.o' libtool=no 
&lt;br&gt;gcc &amp;nbsp;-I../../libdecnumber -I. &amp;nbsp;-g -O2 -W -Wall -Wwrite-strings 
&lt;br&gt;-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition 
&lt;br&gt;-Wmissing-format-attribute -Wcast-qual -pedantic -Wno-long-long &amp;nbsp;
&lt;br&gt;-I../../libdecnumber -I. &amp;nbsp;-c ../../libdecnumber/decimal64.c
&lt;br&gt;source='../../libdecnumber/decimal128.c' object='decimal128.o' 
&lt;br&gt;libtool=no gcc &amp;nbsp;-I../../libdecnumber -I. &amp;nbsp;-g -O2 -W -Wall 
&lt;br&gt;-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 
&lt;br&gt;-Wold-style-definition -Wmissing-format-attribute -Wcast-qual -pedantic 
&lt;br&gt;-Wno-long-long &amp;nbsp;-I../../libdecnumber -I. &amp;nbsp;-c 
&lt;br&gt;../../libdecnumber/decimal128.c
&lt;br&gt;rm -f libdecnumber.a
&lt;br&gt;ar cru libdecnumber.a decNumber.o decContext.o decUtility.o decimal32.o 
&lt;br&gt;decimal64.o decimal128.o
&lt;br&gt;ranlib libdecnumber.a
&lt;br&gt;make[2]: Leaving directory 
&lt;br&gt;`/usr/share/src/gcc-4.2.3/objdir/libdecnumber'
&lt;br&gt;make[2]: Entering directory `/usr/share/src/gcc-4.2.3/objdir/gcc'
&lt;br&gt;make[2]: *** No rule to make target `all'. &amp;nbsp;Stop.
&lt;br&gt;make[2]: Leaving directory `/usr/share/src/gcc-4.2.3/objdir/gcc'
&lt;br&gt;make[1]: *** [all-gcc] Error 2
&lt;br&gt;make[1]: Leaving directory `/usr/share/src/gcc-4.2.3/objdir'
&lt;br&gt;make: *** [all] Error 2
&lt;br&gt;&lt;br&gt;I am not sure what to do with that. Any idea what went wrong here?
&lt;br&gt;&lt;br&gt;Hints are greatly appreciated!
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;&lt;br&gt;&amp;nbsp; Andreas
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26595969&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/AVR-environment-on-Solaris-10-tp26595969p26595969.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26580819</id>
	<title>Re: Calibrate internal RC oscilator FAQ</title>
	<published>2009-11-30T11:34:51Z</published>
	<updated>2009-11-30T11:34:51Z</updated>
	<author>
		<name>Joerg Wunsch</name>
	</author>
	<content type="html">max2009tiny &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26580819&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mm@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; 1. when i program and select 4MHz internal RC osc. what OSCAL
&lt;br&gt;&amp;gt; constatnt is loaded by reset if Atmel have more constants from
&lt;br&gt;&amp;gt; factory?
&lt;br&gt;&lt;br&gt;The AVR hardware only loads the default (i.e., 8 MHz) OSCCAL value
&lt;br&gt;itself. &amp;nbsp;It's the responsibility of the developer to maintain the
&lt;br&gt;OSCCAL values of the other frequencies outside (e.g. through an EEPROM
&lt;br&gt;cell), or somehow perform a run-time calibration (against whatever
&lt;br&gt;that could be used as a calibration source, 32 kHz oscillator,
&lt;br&gt;external clock of some kind, ...).
&lt;br&gt;&lt;br&gt;If you don't want to bother with that, use a more modern AVR: they
&lt;br&gt;only have a single (and much better, e.g. regarding the frequency
&lt;br&gt;stability vs. Vcc variations) RC oscillator, and thus also only a
&lt;br&gt;single OSCCAL value which is loaded automatically.
&lt;br&gt;&lt;br&gt;&amp;gt; 2. where in code can change OSCAL and where not
&lt;br&gt;&lt;br&gt;You could change it everywhere you want.
&lt;br&gt;&lt;br&gt;&amp;gt; 3. exist math function to recalc new OSCAL for a correct freq or
&lt;br&gt;&amp;gt; only probing?
&lt;br&gt;&lt;br&gt;There is no (guaranteed) mathematical formula for that.
&lt;br&gt;&lt;br&gt;&amp;gt; If diference between Tiny Mega ... please write simply about this.
&lt;br&gt;&lt;br&gt;I outlined the major difference above: recent AVRs ship with only a
&lt;br&gt;single RC oscillator anymore which has been improved. &amp;nbsp;For example,
&lt;br&gt;with an ATmega128, it was basically unavoidable to recalibrate the RC
&lt;br&gt;oscillator (even the 8 MHz one) if you wanted to use Vcc = 3 V when
&lt;br&gt;the calibration value the device ships with has been obtained for Vcc
&lt;br&gt;= 5 V. &amp;nbsp;Replacing the ATmega128 by an ATmega1281, there's a good
&lt;br&gt;chance you could run an RS-232 communication without recalibrating the
&lt;br&gt;RC oscillator even at Vcc = 3 V (but of course, it's not guaranteed it
&lt;br&gt;will work).
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;cheers, J&amp;quot;org &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .-.-. &amp;nbsp; --... ...-- &amp;nbsp; -.. . &amp;nbsp;DL8DTL
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.sax.de/~joerg/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sax.de/~joerg/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NIC: JW11-RIPE
&lt;br&gt;Never trust an operating system you don't have sources for. ;-)
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26580819&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Calibrate-internal-RC-oscilator-FAQ-tp26571258p26580819.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26571258</id>
	<title>Calibrate internal RC oscilator FAQ</title>
	<published>2009-11-30T01:20:43Z</published>
	<updated>2009-11-30T01:20:43Z</updated>
	<author>
		<name>max2009tiny</name>
	</author>
	<content type="html">Hi all, 
&lt;br&gt;i read info about internal RC, but dont good understand how it work.
&lt;br&gt;Here is 3 basic question:
&lt;br&gt;&lt;br&gt;1. when i program and select 4MHz internal RC osc. what OSCAL constatnt is loaded by reset if Atmel have more constants from factory?
&lt;br&gt;&lt;br&gt;2. where in code can change OSCAL and where not
&lt;br&gt;&lt;br&gt;3. exist math function to recalc new OSCAL for a correct freq or only probing?
&lt;br&gt;&lt;br&gt;If diference between Tiny Mega ... please write simply about this.
&lt;br&gt;If have more info simply write...
&lt;br&gt;&lt;br&gt;Thanks Max.</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Calibrate-internal-RC-oscilator-FAQ-tp26571258p26571258.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26570959</id>
	<title>RE: assembly-c mix and interrupts</title>
	<published>2009-11-30T01:15:31Z</published>
	<updated>2009-11-30T01:15:31Z</updated>
	<author>
		<name>darkschine</name>
	</author>
	<content type="html">Paul responded off thread
&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-message&quot;&gt;&amp;gt; I experienced this problem with version 4.3.0, I believe provided by an
&lt;br&gt;&amp;gt; older version of Ubuntu. Version 4.3.2 (as provided by Ubuntu 9.04)
&lt;br&gt;&amp;gt; fixed the problem. I assume later versions also work, though I have not
&lt;br&gt;&amp;gt; verified.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
I am indeed using 4.3.0
&lt;br&gt;&lt;br&gt;Perhaps this will also solve my string problems :) However, I have already moved strings to program memory where they should have been in the first place. All seems okay now
&lt;br&gt;&lt;br&gt;Thank you for all of your reponses</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/assembly-c-mix-and-interrupts-tp26421328p26570959.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26571396</id>
	<title>Re: assembly-c mix and interrupts</title>
	<published>2009-11-29T23:35:35Z</published>
	<updated>2009-11-29T23:35:35Z</updated>
	<author>
		<name>Paul Stoffregen</name>
	</author>
	<content type="html">&lt;br&gt;&amp;gt; The issue I am trying to draw attention to is that, in my case, the compiler
&lt;br&gt;&amp;gt; is not being conservative so the push/pop of volatile registers must be done
&lt;br&gt;&amp;gt; manually.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;I experienced this problem with version 4.3.0, I believe provided by an 
&lt;br&gt;older version of Ubuntu. &amp;nbsp;Version 4.3.2 (as provided by Ubuntu 9.04) 
&lt;br&gt;fixed the problem. &amp;nbsp;I assume later versions also work, though I have not 
&lt;br&gt;verified.
&lt;br&gt;&lt;br&gt;Just to be sure, I did a quick test.
&lt;br&gt;&lt;br&gt;&lt;br&gt;// compile with avr-gcc -Wall -mmcu=atmega168 -g -Os -c isr.c
&lt;br&gt;// disassemble with: avr-objdump -d isr.o
&lt;br&gt;&lt;br&gt;#include &amp;lt;avr/io.h&amp;gt;
&lt;br&gt;#include &amp;lt;avr/interrupt.h&amp;gt;
&lt;br&gt;&lt;br&gt;extern void some_random_function(void);
&lt;br&gt;&lt;br&gt;ISR(TIMER0_OVF_vect)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; some_random_function();
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;This was the result.
&lt;br&gt;&lt;br&gt;&lt;br&gt;isr.o: &amp;nbsp; &amp;nbsp; file format elf32-avr
&lt;br&gt;&lt;br&gt;Disassembly of section .text:
&lt;br&gt;&lt;br&gt;00000000 &amp;lt;__vector_16&amp;gt;:
&lt;br&gt;&amp;nbsp; &amp;nbsp;0: &amp;nbsp; &amp;nbsp;1f 92 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; push &amp;nbsp; &amp;nbsp;r1
&lt;br&gt;&amp;nbsp; &amp;nbsp;2: &amp;nbsp; &amp;nbsp;0f 92 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; push &amp;nbsp; &amp;nbsp;r0
&lt;br&gt;&amp;nbsp; &amp;nbsp;4: &amp;nbsp; &amp;nbsp;0f b6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; in &amp;nbsp; &amp;nbsp;r0, 0x3f &amp;nbsp; &amp;nbsp;; 63
&lt;br&gt;&amp;nbsp; &amp;nbsp;6: &amp;nbsp; &amp;nbsp;0f 92 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; push &amp;nbsp; &amp;nbsp;r0
&lt;br&gt;&amp;nbsp; &amp;nbsp;8: &amp;nbsp; &amp;nbsp;11 24 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; eor &amp;nbsp; &amp;nbsp;r1, r1
&lt;br&gt;&amp;nbsp; &amp;nbsp;a: &amp;nbsp; &amp;nbsp;2f 93 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; push &amp;nbsp; &amp;nbsp;r18
&lt;br&gt;&amp;nbsp; &amp;nbsp;c: &amp;nbsp; &amp;nbsp;3f 93 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; push &amp;nbsp; &amp;nbsp;r19
&lt;br&gt;&amp;nbsp; &amp;nbsp;e: &amp;nbsp; &amp;nbsp;4f 93 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; push &amp;nbsp; &amp;nbsp;r20
&lt;br&gt;&amp;nbsp; 10: &amp;nbsp; &amp;nbsp;5f 93 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; push &amp;nbsp; &amp;nbsp;r21
&lt;br&gt;&amp;nbsp; 12: &amp;nbsp; &amp;nbsp;6f 93 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; push &amp;nbsp; &amp;nbsp;r22
&lt;br&gt;&amp;nbsp; 14: &amp;nbsp; &amp;nbsp;7f 93 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; push &amp;nbsp; &amp;nbsp;r23
&lt;br&gt;&amp;nbsp; 16: &amp;nbsp; &amp;nbsp;8f 93 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; push &amp;nbsp; &amp;nbsp;r24
&lt;br&gt;&amp;nbsp; 18: &amp;nbsp; &amp;nbsp;9f 93 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; push &amp;nbsp; &amp;nbsp;r25
&lt;br&gt;&amp;nbsp; 1a: &amp;nbsp; &amp;nbsp;af 93 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; push &amp;nbsp; &amp;nbsp;r26
&lt;br&gt;&amp;nbsp; 1c: &amp;nbsp; &amp;nbsp;bf 93 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; push &amp;nbsp; &amp;nbsp;r27
&lt;br&gt;&amp;nbsp; 1e: &amp;nbsp; &amp;nbsp;ef 93 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; push &amp;nbsp; &amp;nbsp;r30
&lt;br&gt;&amp;nbsp; 20: &amp;nbsp; &amp;nbsp;ff 93 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; push &amp;nbsp; &amp;nbsp;r31
&lt;br&gt;&amp;nbsp; 22: &amp;nbsp; &amp;nbsp;0e 94 00 00 &amp;nbsp; &amp;nbsp; call &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;; 0x0 &amp;lt;__vector_16&amp;gt;
&lt;br&gt;&amp;nbsp; 26: &amp;nbsp; &amp;nbsp;ff 91 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pop &amp;nbsp; &amp;nbsp;r31
&lt;br&gt;&amp;nbsp; 28: &amp;nbsp; &amp;nbsp;ef 91 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pop &amp;nbsp; &amp;nbsp;r30
&lt;br&gt;&amp;nbsp; 2a: &amp;nbsp; &amp;nbsp;bf 91 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pop &amp;nbsp; &amp;nbsp;r27
&lt;br&gt;&amp;nbsp; 2c: &amp;nbsp; &amp;nbsp;af 91 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pop &amp;nbsp; &amp;nbsp;r26
&lt;br&gt;&amp;nbsp; 2e: &amp;nbsp; &amp;nbsp;9f 91 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pop &amp;nbsp; &amp;nbsp;r25
&lt;br&gt;&amp;nbsp; 30: &amp;nbsp; &amp;nbsp;8f 91 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pop &amp;nbsp; &amp;nbsp;r24
&lt;br&gt;&amp;nbsp; 32: &amp;nbsp; &amp;nbsp;7f 91 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pop &amp;nbsp; &amp;nbsp;r23
&lt;br&gt;&amp;nbsp; 34: &amp;nbsp; &amp;nbsp;6f 91 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pop &amp;nbsp; &amp;nbsp;r22
&lt;br&gt;&amp;nbsp; 36: &amp;nbsp; &amp;nbsp;5f 91 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pop &amp;nbsp; &amp;nbsp;r21
&lt;br&gt;&amp;nbsp; 38: &amp;nbsp; &amp;nbsp;4f 91 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pop &amp;nbsp; &amp;nbsp;r20
&lt;br&gt;&amp;nbsp; 3a: &amp;nbsp; &amp;nbsp;3f 91 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pop &amp;nbsp; &amp;nbsp;r19
&lt;br&gt;&amp;nbsp; 3c: &amp;nbsp; &amp;nbsp;2f 91 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pop &amp;nbsp; &amp;nbsp;r18
&lt;br&gt;&amp;nbsp; 3e: &amp;nbsp; &amp;nbsp;0f 90 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pop &amp;nbsp; &amp;nbsp;r0
&lt;br&gt;&amp;nbsp; 40: &amp;nbsp; &amp;nbsp;0f be &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; out &amp;nbsp; &amp;nbsp;0x3f, r0 &amp;nbsp; &amp;nbsp;; 63
&lt;br&gt;&amp;nbsp; 42: &amp;nbsp; &amp;nbsp;0f 90 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pop &amp;nbsp; &amp;nbsp;r0
&lt;br&gt;&amp;nbsp; 44: &amp;nbsp; &amp;nbsp;1f 90 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pop &amp;nbsp; &amp;nbsp;r1
&lt;br&gt;&amp;nbsp; 46: &amp;nbsp; &amp;nbsp;18 95 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reti
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;From this simple test, I believe it should be very clear 4.3.2 is 
&lt;br&gt;indeed saving all the caller clobbered registers. &amp;nbsp;(also, it appears to 
&lt;br&gt;be calling itself because the linker has not yet inserted the actual 
&lt;br&gt;address of &amp;quot;some_random_function&amp;quot;) &amp;nbsp;It is horribly inefficient, but 
&lt;br&gt;looks correct to me.
&lt;br&gt;&lt;br&gt;Maybe you're using version 4.3.0 or something similar? &amp;nbsp;Type &amp;quot;avr-gcc 
&lt;br&gt;-v&amp;quot; to see the version.
&lt;br&gt;&lt;br&gt;&lt;br&gt;-Paul
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt;// compile with avr-gcc -Wall -mmcu=atmega168 -g -Os -c isr.c
&lt;br&gt;// disassemble with: avr-objdump -d isr.o
&lt;br&gt;&lt;br&gt;#include &amp;lt;avr/io.h&amp;gt;
&lt;br&gt;#include &amp;lt;avr/interrupt.h&amp;gt;
&lt;br&gt;&lt;br&gt;extern void some_random_function(void);
&lt;br&gt;&lt;br&gt;ISR(TIMER0_OVF_vect)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; some_random_function();
&lt;br&gt;}
&lt;br&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26571396&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/assembly-c-mix-and-interrupts-tp26421328p26571396.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26570372</id>
	<title>RE: assembly-c mix and interrupts</title>
	<published>2009-11-29T23:12:33Z</published>
	<updated>2009-11-29T23:12:33Z</updated>
	<author>
		<name>darkschine</name>
	</author>
	<content type="html">&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Weddington, Eric wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;&amp;nbsp;Many times in the embedded software world, you have to deal with trade-offs.
&lt;br&gt;&lt;br&gt;Sure you could design an ISR that way and do the unit testing the way you describe. And I'm sure that it would make your unit testing easier. The trade-off though is that it makes the ISR very inefficient. It has been said on this mailing list as well as on the AVR Freaks website forums that calling functions in an ISR is a Bad Idea, if you want to keep your ISR short. And you *do* want to keep your ISR as short as possible.
&lt;br&gt;&lt;br&gt;When an ISR calls a function, the compiler has no idea what registers the called function will use. So, to be conservative, the compiler will generate code to push/pop practically all registers, thus causing more code bloat and more time in the ISR prologue. That is your trade-off. If you think that ease of testing is better priority than a short ISR, then by all means go ahead. I know that most embedded software engineers on this list would rather have a short-as-possible ISR instead of that testing scheme. It's all a matter of priorities and trade-offs.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
I see your point, I guess it all depends on the application.
&lt;br&gt;&lt;br&gt;The issue I am trying to draw attention to is that, in my case, the compiler is not being conservative so the push/pop of volatile registers must be done manually.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/assembly-c-mix-and-interrupts-tp26421328p26570372.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26570247</id>
	<title>RE: assembly-c mix and interrupts</title>
	<published>2009-11-29T22:46:38Z</published>
	<updated>2009-11-29T22:46:38Z</updated>
	<author>
		<name>Weddington, Eric</name>
	</author>
	<content type="html">&amp;nbsp;
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26570247&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-gcc-list-bounces+eric.weddington=atmel.com@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; [mailto:avr-gcc-list-bounces+eric.weddington=atmel.com@nongnu.
&lt;br&gt;&amp;gt; org] On Behalf Of darkschine
&lt;br&gt;&amp;gt; Sent: Sunday, November 29, 2009 11:12 PM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26570247&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-gcc-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: Re: [avr-gcc-list] assembly-c mix and interrupts
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In my opinion, the best algorithm for an interrupt would be:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ISR(vector){
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;data=getData();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;processData(data)
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; then unit testing can be carried out on processData() and 
&lt;br&gt;&amp;gt; getData() leaving
&lt;br&gt;&amp;gt; little testing required for the interrupt itself
&lt;/div&gt;&lt;br&gt;Many times in the embedded software world, you have to deal with trade-offs.
&lt;br&gt;&lt;br&gt;Sure you could design an ISR that way and do the unit testing the way you describe. And I'm sure that it would make your unit testing easier. The trade-off though is that it makes the ISR very inefficient. It has been said on this mailing list as well as on the AVR Freaks website forums that calling functions in an ISR is a Bad Idea, if you want to keep your ISR short. And you *do* want to keep your ISR as short as possible.
&lt;br&gt;&lt;br&gt;When an ISR calls a function, the compiler has no idea what registers the called function will use. So, to be conservative, the compiler will generate code to push/pop practically all registers, thus causing more code bloat and more time in the ISR prologue. That is your trade-off. If you think that ease of testing is better priority than a short ISR, then by all means go ahead. I know that most embedded software engineers on this list would rather have a short-as-possible ISR instead of that testing scheme. It's all a matter of priorities and trade-offs.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26570247&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/assembly-c-mix-and-interrupts-tp26421328p26570247.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26570023</id>
	<title>Re: assembly-c mix and interrupts</title>
	<published>2009-11-29T22:11:10Z</published>
	<updated>2009-11-29T22:11:10Z</updated>
	<author>
		<name>darkschine</name>
	</author>
	<content type="html">What I was trying to say was:
&lt;br&gt;&lt;br&gt;ISR(vector){
&lt;br&gt;&amp;nbsp; &amp;nbsp;interruptHandler();
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;interruptHandler() was blindly destroying volatile registers which ISR should have been preserving since they are the callers responsibility. ISR was not preserving these registers because it was not aware that these registers were currently in use. The attitude of the ISR seems to be that the problem registers should have been stored before the ISR was triggered. The problem registers are used to carry arguments and return values between function calls and the ISR can be triggered at ANY time, so any chance of avoiding this problem is impossible
&lt;br&gt;&lt;br&gt;A solution to the problem would have been:
&lt;br&gt;&lt;br&gt;ISR(vector){
&lt;br&gt;&amp;nbsp; &amp;nbsp;asm(&amp;quot;push r18&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .....
&lt;br&gt;&amp;nbsp; &amp;nbsp;asm(&amp;quot;push r31&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp;interruptHandler();
&lt;br&gt;&amp;nbsp; &amp;nbsp;asm(&amp;quot;pop r31&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .....
&lt;br&gt;&amp;nbsp; &amp;nbsp;asm(&amp;quot;pop r18&amp;quot;);
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;or like you said, constrain the ISR to the ISR() macro. But this reduces abstraction and the ability to test the code.
&lt;br&gt;&lt;br&gt;In my opinion, the best algorithm for an interrupt would be:
&lt;br&gt;&lt;br&gt;ISR(vector){
&lt;br&gt;&amp;nbsp; &amp;nbsp;data=getData();
&lt;br&gt;&amp;nbsp; &amp;nbsp;processData(data)
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;then unit testing can be carried out on processData() and getData() leaving little testing required for the interrupt itself</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/assembly-c-mix-and-interrupts-tp26421328p26570023.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26569735</id>
	<title>Re: assembly-c mix and interrupts</title>
	<published>2009-11-29T21:18:06Z</published>
	<updated>2009-11-29T21:18:06Z</updated>
	<author>
		<name>Joerg Wunsch</name>
	</author>
	<content type="html">darkschine &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26569735&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;zhpctw3dash@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; my code was actually already written in C and looked something like:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ISR(vector){
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;interruptHandler();
&lt;br&gt;&amp;gt; }
&lt;br&gt;&lt;br&gt;Which is less than ideal because the compiler *always* has to preserve
&lt;br&gt;all the registers that could possibly be destroyed by
&lt;br&gt;interruptHandler(). &amp;nbsp;If possible, always write the code directly into
&lt;br&gt;the ISR.
&lt;br&gt;&lt;br&gt;&amp;gt; The compiler does not make sure that all necessary registers are
&lt;br&gt;&amp;gt; saved and restored properly and apparently I am the first to notice
&lt;br&gt;&amp;gt; this.
&lt;br&gt;&lt;br&gt;The chances that this is really the case are about 1E-6. ;-)
&lt;br&gt;&lt;br&gt;As the thread subject is about assembly-C mix, it is much more likely
&lt;br&gt;that your mix is the reason rather than the compiler-generated code
&lt;br&gt;that has been used by millions of AVR-GCC users before.
&lt;br&gt;&lt;br&gt;&amp;gt; I'm starting to wish I wrote the whole thing in assembly! ;)
&lt;br&gt;&lt;br&gt;You should probably have written the whole thing in C instead, as this
&lt;br&gt;completely avoids the class of errors you are currently running into.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;cheers, J&amp;quot;org &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .-.-. &amp;nbsp; --... ...-- &amp;nbsp; -.. . &amp;nbsp;DL8DTL
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.sax.de/~joerg/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sax.de/~joerg/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NIC: JW11-RIPE
&lt;br&gt;Never trust an operating system you don't have sources for. ;-)
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26569735&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/assembly-c-mix-and-interrupts-tp26421328p26569735.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26559564</id>
	<title>Re: assembly-c mix and interrupts</title>
	<published>2009-11-28T21:56:04Z</published>
	<updated>2009-11-28T21:56:04Z</updated>
	<author>
		<name>darkschine</name>
	</author>
	<content type="html">&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;David Brown-4 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;So any function generated by the compiler, or compatible functions 
&lt;br&gt;written in assembly by hand, can freely use the call-used registers 
&lt;br&gt;(SREG, r18-r27, r30-r31) without preserving or restoring them. &amp;nbsp;But if 
&lt;br&gt;it wants to use the call-saved registers (r2-r17, r28-r29), it must save 
&lt;br&gt;them on entry and restore them on exit.
&lt;br&gt;&lt;br&gt;An interrupt routine must also preserve any call-used registers it 
&lt;br&gt;needs, including SREG and r0. &amp;nbsp;It must also preserve the current r1 and 
&lt;br&gt;set it to 0 before certain compiler-generated code is executed. &amp;nbsp;If the 
&lt;br&gt;interrupt routine is going to call other functions, it must preserve 
&lt;br&gt;/all/ the call-used registers, since the other functions may trash them. 
&lt;br&gt;&amp;nbsp; On the other hand, it does not need to preserve any of the call-saved 
&lt;br&gt;registers, as the called function will preserve these as needed.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
Thanks David. This was precisely the issue!
&lt;br&gt;My interrupt routine was calling other functions but not preserving the call-used registers.
&lt;br&gt;my code was actually already written in C and looked something like:
&lt;br&gt;&lt;br&gt;ISR(vector){
&lt;br&gt;&amp;nbsp; &amp;nbsp;interruptHandler();
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;The compiler does not make sure that all necessary registers are saved and restored properly and apparently I am the first to notice this. I guess the ISR preserves the call-used registers it uses, but does not preserve the call-used registers that may be in use prior to the interrupt before transfering control to the ignorant interruptHandler() function.
&lt;br&gt;&lt;br&gt;I wish I could say this was the end of my troubles.
&lt;br&gt;&lt;br&gt;&amp;nbsp; char *test =&amp;quot;test&amp;quot;;
&lt;br&gt;&amp;nbsp; writeChar(test[0]);
&lt;br&gt;&amp;nbsp; writeChar(test[1]);
&lt;br&gt;&amp;nbsp; writeChar('x');
&lt;br&gt;&amp;nbsp; waitForInput();
&lt;br&gt;&lt;br&gt;The output on the LCD is &amp;quot;\0\0x&amp;quot;
&lt;br&gt;&lt;br&gt;but put in another function in the same file, the output is &amp;quot;tex&amp;quot; as expected! I'm starting to wish I wrote the whole thing in assembly! ;)
&lt;br&gt;&lt;br&gt;Can anyone suggest a possible cause for this problem?</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/assembly-c-mix-and-interrupts-tp26421328p26559564.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26547764</id>
	<title>Re: Volatile bad compiled while</title>
	<published>2009-11-27T13:06:02Z</published>
	<updated>2009-11-27T13:06:02Z</updated>
	<author>
		<name>Joerg Wunsch</name>
	</author>
	<content type="html">max2009tiny &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26547764&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mm@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; I understand that gcc miss, but if register is clause to change
&lt;br&gt;&amp;gt; storing possition of var and volatile is for &amp;quot;change defining on the
&lt;br&gt;&amp;gt; fly&amp;quot; i dont understand trouble for gcc compile this ok.
&lt;br&gt;&lt;br&gt;I don't pretend to understand enough of the internals of GCC. &amp;nbsp;As I
&lt;br&gt;understood it from a previous discussion, the unability to handle
&lt;br&gt;both, fixed register assignments and volatileness together is tied
&lt;br&gt;deep into the GCC code, and nothing that could easily be changed. &amp;nbsp;So
&lt;br&gt;in short, &amp;quot;volatile&amp;quot; can only be honoured for locations in memory, as
&lt;br&gt;it effectively demands to load/store the data from/to memory
&lt;br&gt;immediately before/after use. &amp;nbsp;This is impossible for a register
&lt;br&gt;variable (obviously).
&lt;br&gt;&lt;br&gt;So whatever you are arguing, you have to find a different solution for
&lt;br&gt;your code.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;cheers, J&amp;quot;org &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .-.-. &amp;nbsp; --... ...-- &amp;nbsp; -.. . &amp;nbsp;DL8DTL
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.sax.de/~joerg/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sax.de/~joerg/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NIC: JW11-RIPE
&lt;br&gt;Never trust an operating system you don't have sources for. ;-)
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26547764&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Volatile-bad-compiled-while-tp26513165p26547764.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26542046</id>
	<title>Re: Volatile bad compiled while</title>
	<published>2009-11-27T04:43:58Z</published>
	<updated>2009-11-27T04:43:58Z</updated>
	<author>
		<name>Paulo Marques</name>
	</author>
	<content type="html">max2009tiny wrote:
&lt;br&gt;&amp;gt; Ok thanks i use gcc 4.3.2
&lt;br&gt;&amp;gt; secondary question is if i remove volatile from code
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; register unsigned char lastrec asm(&amp;quot;r8&amp;quot;)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; then while generate asm efficient but dont work why?
&lt;br&gt;&amp;gt; &amp;nbsp; a0:	88 11 &amp;nbsp; &amp;nbsp; &amp;nbsp; 	cpse	r24, r8
&lt;br&gt;&amp;gt; &amp;nbsp; a2:	ff cf &amp;nbsp; &amp;nbsp; &amp;nbsp; 	rjmp	.-2 &amp;nbsp; &amp;nbsp; &amp;nbsp;	; 0xa2 &amp;lt;waitACK+0x2&amp;gt;
&lt;br&gt;&lt;br&gt;My educated guess (since you're not providing a full working example) is
&lt;br&gt;that the interrupt routine that is supposed to change r8 is saving and
&lt;br&gt;restoring its state in the prologue / epilogue. You might need to do a
&lt;br&gt;naked interrupt routine or write it all in assembly.
&lt;br&gt;&lt;br&gt;As others have said, unless you're really desperate to shave off a few
&lt;br&gt;cycles, all the issues that arise from trying to tweak the compiler's
&lt;br&gt;behavior are really not worth it. IMHO, you'd be better of trying some
&lt;br&gt;compiler options like David Brown suggested.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Paulo Marques
&lt;br&gt;Software Development Department - Grupo PIE, S.A.
&lt;br&gt;Phone: +351 252 290600, Fax: +351 252 290601
&lt;br&gt;Web: www.grupopie.com
&lt;br&gt;&lt;br&gt;&amp;quot;I have not yet begun to procrastinate&amp;quot;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26542046&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Volatile-bad-compiled-while-tp26513165p26542046.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26541867</id>
	<title>Re: Volatile bad compiled while</title>
	<published>2009-11-27T04:36:11Z</published>
	<updated>2009-11-27T04:36:11Z</updated>
	<author>
		<name>max2009tiny</name>
	</author>
	<content type="html">Thanks David but you miss,
&lt;br&gt;i write code for tiny2313 with 2048 bytes and without use registers and leave optimize work
&lt;br&gt;my code have 3266 bytes +60%
&lt;br&gt;then i make noinline for some functions and code reduce to 2666 bytes.
&lt;br&gt;Secondary count memory variables in code and max counted replace with register previously controlled in lss as not used
&lt;br&gt;globaly changed to register r2-r11 and r18-r20 &amp;nbsp;13 variables and code have now 2048 bytes.
&lt;br&gt;&lt;br&gt;Code works perfectly only while i must rewrite to asm.
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;David Brown-4 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;max2009tiny wrote:
&lt;br&gt;&amp;gt; OK
&lt;br&gt;&amp;gt; i can't drop register and i use on this code more register vars and all work
&lt;br&gt;&amp;gt; ok exept
&lt;br&gt;&amp;gt; while clause. That generate bad jump -4 .
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; My query is why not for removing register clause.
&lt;br&gt;&amp;gt; If memory store all code is +2 bytes for read and +2 any once write var and
&lt;br&gt;&amp;gt; this is over memory limit....
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;Here are some hints that might help you out:
&lt;br&gt;&lt;br&gt;You can't use &amp;quot;register volatile&amp;quot; variables - they don't work.
&lt;br&gt;&lt;br&gt;Using &amp;quot;register&amp;quot; variables will sometimes make code larger, since it 
&lt;br&gt;hinders the compiler - do some testing here to be sure.
&lt;br&gt;&lt;br&gt;Using __attribute__((noinline)) will also often make the code larger - 
&lt;br&gt;the compiler will spend more instructions putting data in the right 
&lt;br&gt;registers for the function call than it would by inlining small functions.
&lt;br&gt;&lt;br&gt;Generally speaking, the compiler is better at optimising when you let it 
&lt;br&gt;do its job than when you try and force it using hints like &amp;quot;register&amp;quot; 
&lt;br&gt;and &amp;quot;noinline&amp;quot;.
&lt;br&gt;&lt;br&gt;Make sure you use -combine and -fwhole-program to compile the code. 
&lt;br&gt;-fno-split-wide-types is also often helpful.
&lt;br&gt;&lt;br&gt;You can force a &amp;quot;volatile&amp;quot; read of a register using the register's 
&lt;br&gt;memory address:
&lt;br&gt;&lt;br&gt;__attribute__ ((noinline)) void waitACK(u08 cmack)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (cmack != *((volatile u08*)(0x0008))) ;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;Address 0x0008 is the address of the r8 register. &amp;nbsp;This will force a 
&lt;br&gt;volatile read as (using an lds instruction), but you will at least spare 
&lt;br&gt;the write.
&lt;br&gt;&lt;br&gt;If all else fails, it is sometimes best to use assembly.
&lt;br&gt;&lt;br&gt;mvh.,
&lt;br&gt;&lt;br&gt;David
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; David Brown-4 wrote:
&lt;br&gt;&amp;gt;&amp;gt; max2009tiny wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hi everybody. I make project on Tiny2313 and use 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; volatile register unsigned char lastrec asm(&amp;quot;r8&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; and lastrec is modified on rs232 rx isr.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; When compile little function
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; __attribute__ ((noinline)) void waitACK(u08 cmack)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; while(cmack!=lastrec) ;	//wait for reply request
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Fixing a variable to a register in this way is almost never a good idea. 
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; It is /possible/, because there are rare occasions when you want to do 
&lt;br&gt;&amp;gt;&amp;gt; so, but such cases are very rare. &amp;nbsp;It is also very easy to break other 
&lt;br&gt;&amp;gt;&amp;gt; parts of your program by using register variables like this, due to 
&lt;br&gt;&amp;gt;&amp;gt; conflicts with register usage in the library or the compiler. &amp;nbsp;See
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_regbind&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_regbind&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; (Note that explicitly recommends /not/ using r8 for this use.)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On some versions of gcc, using a &amp;quot;volatile register&amp;quot; variable will give 
&lt;br&gt;&amp;gt;&amp;gt; the warning &amp;quot;volatile register variables don't work as you might wish&amp;quot; 
&lt;br&gt;&amp;gt;&amp;gt; if -Wall or -Wvolatile-register-var is enabled. &amp;nbsp;For some reason, this 
&lt;br&gt;&amp;gt;&amp;gt; warning does not seem to be triggered by avr-gcc while testing. 
&lt;br&gt;&amp;gt;&amp;gt; However, the explanation from the manual remains relevant:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; -Wvolatile-register-var
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;Warn if a register variable is declared volatile. The volatile 
&lt;br&gt;&amp;gt;&amp;gt; modifier does not inhibit all optimizations that may eliminate reads 
&lt;br&gt;&amp;gt;&amp;gt; and/or writes to register variables. This warning is enabled by -Wall.
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Here are some other comments about global volatile register variables:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00657.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00657.html&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34351&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34351&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; In summary, you use &amp;quot;register&amp;quot; variables for data that is absolutely 
&lt;br&gt;&amp;gt;&amp;gt; speed-critical and used widely throughout your code, and for which 
&lt;br&gt;&amp;gt;&amp;gt; dedicating a register makes sense (i.e., almost never). &amp;nbsp;You use 
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;volatile&amp;quot; when you specifically want to limit the compiler's 
&lt;br&gt;&amp;gt;&amp;gt; optimisation of the variable. &amp;nbsp;&amp;quot;volatile register&amp;quot; is a conflict of 
&lt;br&gt;&amp;gt;&amp;gt; interests, and it does not work as you think it should - the compiler 
&lt;br&gt;&amp;gt;&amp;gt; cannot treat it as both a restricted volatile and a highly-optimised 
&lt;br&gt;&amp;gt;&amp;gt; register at the same time.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Drop the &amp;quot;register&amp;quot;, and your code will be fine.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;AVR-GCC-list@nongnu.org
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Volatile-bad-compiled-while-tp26513165p26541867.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26541329</id>
	<title>Re: Volatile bad compiled while</title>
	<published>2009-11-27T03:41:41Z</published>
	<updated>2009-11-27T03:41:41Z</updated>
	<author>
		<name>David Brown-4</name>
	</author>
	<content type="html">max2009tiny wrote:
&lt;br&gt;&amp;gt; OK
&lt;br&gt;&amp;gt; i can't drop register and i use on this code more register vars and all work
&lt;br&gt;&amp;gt; ok exept
&lt;br&gt;&amp;gt; while clause. That generate bad jump -4 .
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; My query is why not for removing register clause.
&lt;br&gt;&amp;gt; If memory store all code is +2 bytes for read and +2 any once write var and
&lt;br&gt;&amp;gt; this is over memory limit....
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;Here are some hints that might help you out:
&lt;br&gt;&lt;br&gt;You can't use &amp;quot;register volatile&amp;quot; variables - they don't work.
&lt;br&gt;&lt;br&gt;Using &amp;quot;register&amp;quot; variables will sometimes make code larger, since it 
&lt;br&gt;hinders the compiler - do some testing here to be sure.
&lt;br&gt;&lt;br&gt;Using __attribute__((noinline)) will also often make the code larger - 
&lt;br&gt;the compiler will spend more instructions putting data in the right 
&lt;br&gt;registers for the function call than it would by inlining small functions.
&lt;br&gt;&lt;br&gt;Generally speaking, the compiler is better at optimising when you let it 
&lt;br&gt;do its job than when you try and force it using hints like &amp;quot;register&amp;quot; 
&lt;br&gt;and &amp;quot;noinline&amp;quot;.
&lt;br&gt;&lt;br&gt;Make sure you use -combine and -fwhole-program to compile the code. 
&lt;br&gt;-fno-split-wide-types is also often helpful.
&lt;br&gt;&lt;br&gt;You can force a &amp;quot;volatile&amp;quot; read of a register using the register's 
&lt;br&gt;memory address:
&lt;br&gt;&lt;br&gt;__attribute__ ((noinline)) void waitACK(u08 cmack)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (cmack != *((volatile u08*)(0x0008))) ;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;Address 0x0008 is the address of the r8 register. &amp;nbsp;This will force a 
&lt;br&gt;volatile read as (using an lds instruction), but you will at least spare 
&lt;br&gt;the write.
&lt;br&gt;&lt;br&gt;If all else fails, it is sometimes best to use assembly.
&lt;br&gt;&lt;br&gt;mvh.,
&lt;br&gt;&lt;br&gt;David
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; David Brown-4 wrote:
&lt;br&gt;&amp;gt;&amp;gt; max2009tiny wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hi everybody. I make project on Tiny2313 and use 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; volatile register unsigned char lastrec asm(&amp;quot;r8&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; and lastrec is modified on rs232 rx isr.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; When compile little function
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; __attribute__ ((noinline)) void waitACK(u08 cmack)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; while(cmack!=lastrec) ;	//wait for reply request
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Fixing a variable to a register in this way is almost never a good idea. 
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; It is /possible/, because there are rare occasions when you want to do 
&lt;br&gt;&amp;gt;&amp;gt; so, but such cases are very rare. &amp;nbsp;It is also very easy to break other 
&lt;br&gt;&amp;gt;&amp;gt; parts of your program by using register variables like this, due to 
&lt;br&gt;&amp;gt;&amp;gt; conflicts with register usage in the library or the compiler. &amp;nbsp;See
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_regbind&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_regbind&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; (Note that explicitly recommends /not/ using r8 for this use.)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On some versions of gcc, using a &amp;quot;volatile register&amp;quot; variable will give 
&lt;br&gt;&amp;gt;&amp;gt; the warning &amp;quot;volatile register variables don't work as you might wish&amp;quot; 
&lt;br&gt;&amp;gt;&amp;gt; if -Wall or -Wvolatile-register-var is enabled. &amp;nbsp;For some reason, this 
&lt;br&gt;&amp;gt;&amp;gt; warning does not seem to be triggered by avr-gcc while testing. 
&lt;br&gt;&amp;gt;&amp;gt; However, the explanation from the manual remains relevant:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; -Wvolatile-register-var
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;Warn if a register variable is declared volatile. The volatile 
&lt;br&gt;&amp;gt;&amp;gt; modifier does not inhibit all optimizations that may eliminate reads 
&lt;br&gt;&amp;gt;&amp;gt; and/or writes to register variables. This warning is enabled by -Wall.
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Here are some other comments about global volatile register variables:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00657.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00657.html&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34351&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34351&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; In summary, you use &amp;quot;register&amp;quot; variables for data that is absolutely 
&lt;br&gt;&amp;gt;&amp;gt; speed-critical and used widely throughout your code, and for which 
&lt;br&gt;&amp;gt;&amp;gt; dedicating a register makes sense (i.e., almost never). &amp;nbsp;You use 
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;volatile&amp;quot; when you specifically want to limit the compiler's 
&lt;br&gt;&amp;gt;&amp;gt; optimisation of the variable. &amp;nbsp;&amp;quot;volatile register&amp;quot; is a conflict of 
&lt;br&gt;&amp;gt;&amp;gt; interests, and it does not work as you think it should - the compiler 
&lt;br&gt;&amp;gt;&amp;gt; cannot treat it as both a restricted volatile and a highly-optimised 
&lt;br&gt;&amp;gt;&amp;gt; register at the same time.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Drop the &amp;quot;register&amp;quot;, and your code will be fine.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541329&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Volatile-bad-compiled-while-tp26513165p26541329.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26540180</id>
	<title>Re: Volatile bad compiled while</title>
	<published>2009-11-27T02:02:09Z</published>
	<updated>2009-11-27T02:02:09Z</updated>
	<author>
		<name>max2009tiny</name>
	</author>
	<content type="html">Ok thanks i use gcc 4.3.2
&lt;br&gt;secondary question is if i remove volatile from code
&lt;br&gt;&amp;nbsp;
&lt;br&gt;register unsigned char lastrec asm(&amp;quot;r8&amp;quot;)
&lt;br&gt;&lt;br&gt;then while generate asm efficient but dont work why?
&lt;br&gt;&amp;nbsp; a0:	88 11 &amp;nbsp; &amp;nbsp; &amp;nbsp; 	cpse	r24, r8
&lt;br&gt;&amp;nbsp; a2:	ff cf &amp;nbsp; &amp;nbsp; &amp;nbsp; 	rjmp	.-2 &amp;nbsp; &amp;nbsp; &amp;nbsp;	; 0xa2 &amp;lt;waitACK+0x2&amp;gt;
&lt;br&gt;&lt;br&gt;and without register volatile unsigned char lastrec
&lt;br&gt;make work but big code
&lt;br&gt;&lt;br&gt;&amp;nbsp; ac:	80 91 62 00 	lds	r24, 0x0062
&lt;br&gt;&amp;nbsp; b0:	98 17 &amp;nbsp; &amp;nbsp; &amp;nbsp; 	cp	r25, r24
&lt;br&gt;&amp;nbsp; b2:	e1 f7 &amp;nbsp; &amp;nbsp; &amp;nbsp; 	brne	.-8 &amp;nbsp; &amp;nbsp; &amp;nbsp;	; 0xac &amp;lt;waitACK+0x2&amp;gt;
&lt;br&gt;&lt;br&gt;I understand that gcc miss, but if register is clause to change storing possition of var
&lt;br&gt;and volatile is for &amp;quot;change defining on the fly&amp;quot; i dont understand trouble for gcc compile this ok.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Joerg Wunsch wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;max2009tiny &amp;lt;mm@canor-audio.com&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Hi everybody. I make project on Tiny2313 and use
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; volatile register unsigned char lastrec asm(&amp;quot;r8&amp;quot;)
&lt;br&gt;&lt;br&gt;&amp;quot;volatile register&amp;quot; doesn't work.
&lt;br&gt;&lt;br&gt;There used to be a warning for this, which has been dropped in the
&lt;br&gt;past. &amp;nbsp;GCC 4.4 does have the warning back:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34351&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34351&lt;/a&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;cheers, J&amp;quot;org &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .-.-. &amp;nbsp; --... ...-- &amp;nbsp; -.. . &amp;nbsp;DL8DTL
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.sax.de/~joerg/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sax.de/~joerg/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NIC: JW11-RIPE
&lt;br&gt;Never trust an operating system you don't have sources for. ;-)
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;AVR-GCC-list@nongnu.org
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Volatile-bad-compiled-while-tp26513165p26540180.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26538327</id>
	<title>Re: Volatile bad compiled while</title>
	<published>2009-11-26T22:19:45Z</published>
	<updated>2009-11-26T22:19:45Z</updated>
	<author>
		<name>Joerg Wunsch</name>
	</author>
	<content type="html">max2009tiny &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538327&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mm@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Hi everybody. I make project on Tiny2313 and use
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; volatile register unsigned char lastrec asm(&amp;quot;r8&amp;quot;)
&lt;br&gt;&lt;br&gt;&amp;quot;volatile register&amp;quot; doesn't work.
&lt;br&gt;&lt;br&gt;There used to be a warning for this, which has been dropped in the
&lt;br&gt;past. &amp;nbsp;GCC 4.4 does have the warning back:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34351&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34351&lt;/a&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;cheers, J&amp;quot;org &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .-.-. &amp;nbsp; --... ...-- &amp;nbsp; -.. . &amp;nbsp;DL8DTL
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.sax.de/~joerg/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sax.de/~joerg/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NIC: JW11-RIPE
&lt;br&gt;Never trust an operating system you don't have sources for. ;-)
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538327&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Volatile-bad-compiled-while-tp26513165p26538327.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26530491</id>
	<title>Re: Volatile bad compiled while</title>
	<published>2009-11-26T06:49:59Z</published>
	<updated>2009-11-26T06:49:59Z</updated>
	<author>
		<name>max2009tiny</name>
	</author>
	<content type="html">OK
&lt;br&gt;i can't drop register and i use on this code more register vars and all work ok exept
&lt;br&gt;while clause. That generate bad jump -4 .
&lt;br&gt;&lt;br&gt;My query is why not for removing register clause.
&lt;br&gt;If memory store all code is +2 bytes for read and +2 any once write var and this is over memory limit....
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;David Brown-4 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;max2009tiny wrote:
&lt;br&gt;&amp;gt; Hi everybody. I make project on Tiny2313 and use 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; volatile register unsigned char lastrec asm(&amp;quot;r8&amp;quot;)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; and lastrec is modified on rs232 rx isr.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; When compile little function
&lt;br&gt;&amp;gt; __attribute__ ((noinline)) void waitACK(u08 cmack)
&lt;br&gt;&amp;gt; {
&lt;br&gt;&amp;gt; while(cmack!=lastrec) ;	//wait for reply request
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;&lt;br&gt;Fixing a variable to a register in this way is almost never a good idea. 
&lt;br&gt;&amp;nbsp; It is /possible/, because there are rare occasions when you want to do 
&lt;br&gt;so, but such cases are very rare. &amp;nbsp;It is also very easy to break other 
&lt;br&gt;parts of your program by using register variables like this, due to 
&lt;br&gt;conflicts with register usage in the library or the compiler. &amp;nbsp;See
&lt;br&gt;&lt;br&gt;&amp;lt;&lt;a href=&quot;http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_regbind&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_regbind&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;(Note that explicitly recommends /not/ using r8 for this use.)
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On some versions of gcc, using a &amp;quot;volatile register&amp;quot; variable will give 
&lt;br&gt;the warning &amp;quot;volatile register variables don't work as you might wish&amp;quot; 
&lt;br&gt;if -Wall or -Wvolatile-register-var is enabled. &amp;nbsp;For some reason, this 
&lt;br&gt;warning does not seem to be triggered by avr-gcc while testing. 
&lt;br&gt;However, the explanation from the manual remains relevant:
&lt;br&gt;&lt;br&gt;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;-Wvolatile-register-var
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Warn if a register variable is declared volatile. The volatile 
&lt;br&gt;modifier does not inhibit all optimizations that may eliminate reads 
&lt;br&gt;and/or writes to register variables. This warning is enabled by -Wall.
&lt;br&gt;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;&lt;br&gt;&lt;br&gt;Here are some other comments about global volatile register variables:
&lt;br&gt;&lt;br&gt;&amp;lt;&lt;a href=&quot;http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00657.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00657.html&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34351&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34351&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;In summary, you use &amp;quot;register&amp;quot; variables for data that is absolutely 
&lt;br&gt;speed-critical and used widely throughout your code, and for which 
&lt;br&gt;dedicating a register makes sense (i.e., almost never). &amp;nbsp;You use 
&lt;br&gt;&amp;quot;volatile&amp;quot; when you specifically want to limit the compiler's 
&lt;br&gt;optimisation of the variable. &amp;nbsp;&amp;quot;volatile register&amp;quot; is a conflict of 
&lt;br&gt;interests, and it does not work as you think it should - the compiler 
&lt;br&gt;cannot treat it as both a restricted volatile and a highly-optimised 
&lt;br&gt;register at the same time.
&lt;br&gt;&lt;br&gt;Drop the &amp;quot;register&amp;quot;, and your code will be fine.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;AVR-GCC-list@nongnu.org
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Volatile-bad-compiled-while-tp26513165p26530491.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26528898</id>
	<title>Re: Volatile bad compiled while</title>
	<published>2009-11-26T04:38:54Z</published>
	<updated>2009-11-26T04:38:54Z</updated>
	<author>
		<name>David Brown-4</name>
	</author>
	<content type="html">max2009tiny wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi everybody. I make project on Tiny2313 and use 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; volatile register unsigned char lastrec asm(&amp;quot;r8&amp;quot;)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; and lastrec is modified on rs232 rx isr.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; When compile little function
&lt;br&gt;&amp;gt; __attribute__ ((noinline)) void waitACK(u08 cmack)
&lt;br&gt;&amp;gt; {
&lt;br&gt;&amp;gt; while(cmack!=lastrec) ;	//wait for reply request
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;Fixing a variable to a register in this way is almost never a good idea. 
&lt;br&gt;&amp;nbsp; It is /possible/, because there are rare occasions when you want to do 
&lt;br&gt;so, but such cases are very rare. &amp;nbsp;It is also very easy to break other 
&lt;br&gt;parts of your program by using register variables like this, due to 
&lt;br&gt;conflicts with register usage in the library or the compiler. &amp;nbsp;See
&lt;br&gt;&lt;br&gt;&amp;lt;&lt;a href=&quot;http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_regbind&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_regbind&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;(Note that explicitly recommends /not/ using r8 for this use.)
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On some versions of gcc, using a &amp;quot;volatile register&amp;quot; variable will give 
&lt;br&gt;the warning &amp;quot;volatile register variables don't work as you might wish&amp;quot; 
&lt;br&gt;if -Wall or -Wvolatile-register-var is enabled. &amp;nbsp;For some reason, this 
&lt;br&gt;warning does not seem to be triggered by avr-gcc while testing. 
&lt;br&gt;However, the explanation from the manual remains relevant:
&lt;br&gt;&lt;br&gt;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;-Wvolatile-register-var
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Warn if a register variable is declared volatile. The volatile 
&lt;br&gt;modifier does not inhibit all optimizations that may eliminate reads 
&lt;br&gt;and/or writes to register variables. This warning is enabled by -Wall.
&lt;br&gt;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;&lt;br&gt;&lt;br&gt;Here are some other comments about global volatile register variables:
&lt;br&gt;&lt;br&gt;&amp;lt;&lt;a href=&quot;http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00657.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00657.html&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34351&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34351&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;In summary, you use &amp;quot;register&amp;quot; variables for data that is absolutely 
&lt;br&gt;speed-critical and used widely throughout your code, and for which 
&lt;br&gt;dedicating a register makes sense (i.e., almost never). &amp;nbsp;You use 
&lt;br&gt;&amp;quot;volatile&amp;quot; when you specifically want to limit the compiler's 
&lt;br&gt;optimisation of the variable. &amp;nbsp;&amp;quot;volatile register&amp;quot; is a conflict of 
&lt;br&gt;interests, and it does not work as you think it should - the compiler 
&lt;br&gt;cannot treat it as both a restricted volatile and a highly-optimised 
&lt;br&gt;register at the same time.
&lt;br&gt;&lt;br&gt;Drop the &amp;quot;register&amp;quot;, and your code will be fine.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-GCC-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26528898&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-GCC-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-gcc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Volatile-bad-compiled-while-tp26513165p26528898.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26513165</id>
	<title>Volatile bad compiled while</title>
	<published>2009-11-25T06:03:46Z</published>
	<updated>2009-11-25T06:03:46Z</updated>
	<author>
		<name>max2009tiny</name>
	</author>
	<content type="html">Hi everybody. I make project on Tiny2313 and use 
&lt;br&gt;&lt;br&gt;volatile register unsigned char lastrec asm(&amp;quot;r8&amp;quot;)
&lt;br&gt;&lt;br&gt;and lastrec is modified on rs232 rx isr.
&lt;br&gt;&lt;br&gt;When compile little function
&lt;br&gt;__attribute__ ((noinline)) void waitACK(u08 cmack)
&lt;br&gt;{
&lt;br&gt;while(cmack!=lastrec) ;	//wait for reply request
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;compiler make bad asm
&lt;br&gt;&amp;nbsp; a0:	98 2d &amp;nbsp; &amp;nbsp; &amp;nbsp; 	mov	r25, r8
&lt;br&gt;&amp;nbsp; a2:	98 17 &amp;nbsp; &amp;nbsp; &amp;nbsp; 	cp	r25, r24
&lt;br&gt;&amp;nbsp; a4:	e9 f7 &amp;nbsp; &amp;nbsp; &amp;nbsp; 	brne	.-4 &amp;nbsp; &amp;nbsp; &amp;nbsp;	; 0xa2 &amp;lt;waitACK&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;To avoid i change while to asm as follow, but i need know why this gcc make. Thanks.
&lt;br&gt;&lt;br&gt;000000a0 &amp;lt;waitACK&amp;gt;:
&lt;br&gt;__attribute__ ((noinline)) void waitACK(u08 cmack)
&lt;br&gt;{
&lt;br&gt;// cmd to wait is in txcmd
&lt;br&gt;// use std ack packet 0x4 0x0 0x2 0xresult 0xtxcmd 0xcksum
&lt;br&gt;&lt;br&gt;asm(&amp;quot; mov	r25, r8 ;\n cp r25, r24 ;\n brne .-6 ;&amp;quot;);
&lt;br&gt;&amp;nbsp; a0:	98 2d &amp;nbsp; &amp;nbsp; &amp;nbsp; 	mov	r25, r8
&lt;br&gt;&amp;nbsp; a2:	98 17 &amp;nbsp; &amp;nbsp; &amp;nbsp; 	cp	r25, r24
&lt;br&gt;&amp;nbsp; a4:	e9 f7 &amp;nbsp; &amp;nbsp; &amp;nbsp; 	brne	.-6 &amp;nbsp; &amp;nbsp; &amp;nbsp;	; 0xa0 &amp;lt;waitACK&amp;gt;
&lt;br&gt;&lt;br&gt;//while(cmack!=lastrec) ;	//wait for reply request
&lt;br&gt;}
&lt;br&gt;&amp;nbsp; a6:	08 95 &amp;nbsp; &amp;nbsp; &amp;nbsp; 	ret
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Volatile-bad-compiled-while-tp26513165p26513165.html" />
</entry>

</feed>
