From: <Mit Microsoft Internet Explorer 5 gespeichert>
Date: Sun, 27 Jan 2002 14:20:50 +0100

From [email-masked] Tue Jan 02 19:13:16 2001
Received: from odin.he.net ([216.218.181.2])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14DKhA-0001RH-00
for <[email-masked]>; Tue, 02 Jan 2001 19:13:16 +1300
Received: from jpk1 (adsl-200.world-net.co.nz [210.55.228.200]) by odin.he.net (8.8.6/8.8.2) with SMTP id WAA09893 for <[email-masked]>; Mon, 1 Jan 2001 22:13:16 -0800
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: Windows Eudora Light Version 1.5.2
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: [avr-gcc-list] Test post - ignore
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 2 19:14:04 2001
X-Original-Date: Mon, 1 Jan 2001 22:13:16 -0800

Test post - ignore.

From [email-masked] Thu Jan 04 00:38:52 2001
Received: from smtp.tor.axxent.ca ([209.250.128.26] helo=mail.tor.axxent.ca)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14DmFm-0002de-00
for <[email-masked]>; Thu, 04 Jan 2001 00:38:51 +1300
Received: from localhost (dns03.tor.axxent.ca [209.250.128.6])
by mail.tor.axxent.ca (8.11.0/8.9.3) with ESMTP id f03Bd0h25548
for <[email-masked]>; Wed, 3 Jan 2001 06:39:00 -0500 (EST)
Received: by localhost (Postfix, from userid 41217)
id 552D448919; Wed, 3 Jan 2001 06:39:00 -0500 (EST)
To: [email-masked]
From: [email-masked]
Mime-Version: 1.0
Content-Type: multipart/mixed;
boundary="-----------------------------7d139c3b1cca005e"
Message-Id: <20010103113900.552D448919@localhost>
Subject: [avr-gcc-list] Looks like it is working from the user end
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 4 00:39:04 2001
X-Original-Date: Wed, 3 Jan 2001 06:39:00 -0500 (EST)

This is ...

-------------------------------7d139c3b1cca005e
Content-Type: text/plain;
charset="iso-8859-1"

Hi Jason
Just checking the interface, and it has issued all the
right commands and stuff. Looks real good.
Carl
.

From [email-masked] Thu Jan 04 21:33:02 2001
Received: from odin.he.net ([216.218.181.2])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14E5pV-0003Ov-00
for <[email-masked]>; Thu, 04 Jan 2001 21:33:01 +1300
Received: from jpk1 (adsl-200.world-net.co.nz [210.55.228.200]) by odin.he.net (8.8.6/8.8.2) with SMTP id AAA06792 for <[email-masked]>; Thu, 4 Jan 2001 00:33:13 -0800
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: Windows Eudora Light Version 1.5.2
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] Looks like it is working from the user end
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 4 21:34:04 2001
X-Original-Date: Thu, 4 Jan 2001 00:33:13 -0800

Did I mention the eAVR and pAVR mailing lists? probably forgot.

See
http://avr.jpk.co.nz/mailman/listinfo/eavr-list
http://avr.jpk.co.nz/mailman/listinfo/pavr-list

Cheers,

Jason

At 06:39 3/01/01 -0500, you wrote:
>Hi Jason
> Just checking the interface, and it has issued all the
>right commands and stuff. Looks real good.
> Carl
>.
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
>

From [email-masked] Mon Jan 08 22:14:28 2001
Received: from odin.he.net ([216.218.181.2])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14FYNn-0000An-00
for <[email-masked]>; Mon, 08 Jan 2001 22:14:27 +1300
Received: from jpk1 (adsl-200.world-net.co.nz [210.55.228.200]) by odin.he.net (8.8.6/8.8.2) with SMTP id BAA02360 for <[email-masked]>; Mon, 8 Jan 2001 01:14:54 -0800
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: Windows Eudora Light Version 1.5.2
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email-masked]
From: "Ron Kreymborg" <[email-masked]> (by way of Jason Kyle <[email-masked]>)
Subject: [avr-gcc-list] [avr] GCCAVR Bug
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Mon Jan 8 22:45:04 2001
X-Original-Date: Mon, 8 Jan 2001 01:14:54 -0800

Hi All

This little C snippet embodies a bug in gccavr that cost me considerable
trackdown time in a larger program. The key is the if statement combined
with the following statement containing an array reference. If you run this
in AVRStudio the array statement gets executed every time. Doesn't matter if
the array is local or global. Change the following statement to a simple
variable assign and all is well. Change the "if" to (a > b) and all is well.

#include <stdlib.h>

#define LIMIT 25.0
#define MAXENTRY 5

int main(void);

int sum[MAXENTRY];

int main(void)
{
int i;
float a, b;

a = 10.0;
b = LIMIT;
for (i=0; i<MAXENTRY; i++)
{
if (a >= b)
{
sum[i] = sum[i] + 1;
}
b += LIMIT;
}

return 0;
}

I was going to post this off to Volker but he seems to have vanished. I then
thought I would go look for the bug in the gccavr source, but the actual
compiler code that generates the avr statements does not seem to be part of
his package.

Does anybody know who we can refer gccavr bugs to? Does anybody know whether
the AVR port to gcc is available so we can try to fix this sort of bug
ourselves?

Cheers
Ron Kreymborg

AVR, it's just better.

From [email-masked] Tue Jan 09 06:46:43 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14FgNW-0000cc-00
for <[email-masked]>; Tue, 09 Jan 2001 06:46:42 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.149])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id UAA15752
for <[email-masked]>; Mon, 8 Jan 2001 20:47:10 +0300
Message-Id: <[email-masked]>
From: Denis Chertykov <[email-masked]>
To: [email-masked]
Subject: [avr-gcc-list] Test mailing list
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 9 06:47:04 2001
X-Original-Date: Mon, 8 Jan 2001 20:47:09 +0300

I will happy if it will work.

Denis.

From [email-masked] Tue Jan 09 08:10:04 2001
Received: from diamond.itnet.com.pl
([195.116.64.1] helo=diamond.itnet.pl ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14FhgA-0000h8-00
for <[email-masked]>; Tue, 09 Jan 2001 08:10:03 +1300
Received: from marekm.home (pf107.gdansk.sdi.tpnet.pl [213.77.129.107])
by diamond.itnet.pl (8.9.3/8.9.3) with ESMTP id UAA31189
for <[email-masked]>; Mon, 8 Jan 2001 20:11:31 +0100
Received: (from marekm@localhost)
by marekm.home (8.9.3/8.9.3/Debian 8.9.3-21) id UAA09033
for [email-masked]; Mon, 8 Jan 2001 20:10:06 +0100
From: Marek Michalkiewicz <[email-masked]>
Message-Id: <[email-masked]>
To: [email-masked]
X-Mailer: ELM [version 2.4ME+ PL66 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] test ignore
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 9 08:11:04 2001
X-Original-Date: Mon, 8 Jan 2001 20:10:06 +0100 (CET)

This is a test - does the new avr-gcc list really work...

Marek

From [email-masked] Tue Jan 09 09:59:38 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14FjOA-0000md-00
for <[email-masked]>; Tue, 09 Jan 2001 09:59:36 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.145])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id XAA10636
for <[email-masked]>; Mon, 8 Jan 2001 23:59:55 +0300
Message-Id: <[email-masked]>
From: Denis Chertykov <[email-masked]>
To: [email-masked]
Subject: [avr-gcc-list] GCC 3.0 thread
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 9 10:00:04 2001
X-Original-Date: Mon, 8 Jan 2001 23:59:53 +0300

Today I have readed [email-masked].
GCC 3.0 maintainer want to create a GCC 3.0 CVS thread (In two weeks).
IE GCC 3.0 coming soon.
GCC 3.0 will have an avr port.

I'm very interested in bug reports.

Denis.

From [email-masked] Tue Jan 09 10:03:40 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14FjS6-0000n2-00
for <[email-masked]>; Tue, 09 Jan 2001 10:03:38 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.145])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id AAA12244;
Tue, 9 Jan 2001 00:04:05 +0300
To: "Larry Barello" <[email-masked]>
Cc: "Marek Michalkiewicz" <[email-masked]>,
"Denis Chertykov" <[email-masked]>, [email-masked]
Subject: Re: [avr-gcc-list] test ignore
References: <[email-masked]> <000401c079ae$2b60abc0$0200000a@larry>
From: Denis Chertykov <[email-masked]>
In-Reply-To: "Larry Barello"'s message of "Mon, 8 Jan 2001 11:56:15 -0800"
Message-ID: <[email-masked]>
Lines: 12
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 9 10:04:04 2001
X-Original-Date: 08 Jan 2001 23:56:49 +0300

"Larry Barello" <[email-masked]> writes:

> Hey, glad to see you are still interested in Avr-gcc and you are on the new
> list.

Hi Larry !

May be we can got a mail addresses from the old list and send a
"welcome to the new list" message.
If no then I have a small archive.

Denis.

From [email-masked] Tue Jan 09 21:30:54 2001
Received: from odin.he.net ([216.218.181.2])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14FuBC-0001DF-00
for <[email-masked]>; Tue, 09 Jan 2001 21:30:54 +1300
Received: from jpk1 (adsl-200.world-net.co.nz [210.55.228.200]) by odin.he.net (8.8.6/8.8.2) with SMTP id AAA14687 for <[email-masked]>; Tue, 9 Jan 2001 00:31:26 -0800
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: Windows Eudora Light Version 1.5.2
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: [avr-gcc-list] Getting a list of previous subscribers
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 9 21:31:03 2001
X-Original-Date: Tue, 9 Jan 2001 00:31:26 -0800

This email was sent from the old list mid last year, I think it has many of
the email addresses listed. Shall I email these people? Does anyone
recognise any addresses? Is it incomplete?

No response to email send to Uros at the moment, probably on holiday like
the rest of us should be!

Jason Kyle

Return-Path: <[email-masked]>
From: [email-masked]
Date: Tue, 27 Jun 2000 10:45:33 +0200 (CEST)
Apparently-to: [email-masked]
To: [email-masked], [email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked],
[email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked], [email-masked],
[email-masked], [email-masked],
[email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked], [email-masked],
[email-masked], [email-masked],
[email-masked], [email-masked], [email-masked]

From [email-masked] Tue Jan 09 21:38:49 2001
Received: from odin.he.net ([216.218.181.2])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14FuIq-0001Dx-00
for <[email-masked]>; Tue, 09 Jan 2001 21:38:48 +1300
Received: from jpk1 (adsl-200.world-net.co.nz [210.55.228.200]) by odin.he.net (8.8.6/8.8.2) with SMTP id AAA15735 for <[email-masked]>; Tue, 9 Jan 2001 00:39:21 -0800
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: Windows Eudora Light Version 1.5.2
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] [avr] GCCAVR Bug
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 9 21:39:04 2001
X-Original-Date: Tue, 9 Jan 2001 00:39:21 -0800

Anyone know if this was fixed? Seem to recall something about it a long
time ago. Ron is using the Volker Oth win32 build (2.95.2 + patch). Tried
it with avr-gcc-20001225 libc-20000730 and the code looked okay to me.

At 01:14 8/01/01 -0800, you wrote:
>Hi All
>
>This little C snippet embodies a bug in gccavr that cost me considerable
>trackdown time in a larger program. The key is the if statement combined
>with the following statement containing an array reference. If you run this
>in AVRStudio the array statement gets executed every time. Doesn't matter if
>the array is local or global. Change the following statement to a simple
>variable assign and all is well. Change the "if" to (a > b) and all is well.
>
>#include <stdlib.h>
>
>#define LIMIT 25.0
>#define MAXENTRY 5
>
>int main(void);
>
>int sum[MAXENTRY];
>
>int main(void)
>{
> int i;
> float a, b;
>
> a = 10.0;
> b = LIMIT;
> for (i=0; i<MAXENTRY; i++)
> {
> if (a >= b)
> {
> sum[i] = sum[i] + 1;
> }
> b += LIMIT;
> }
>
> return 0;
>}
>
>I was going to post this off to Volker but he seems to have vanished. I then
>thought I would go look for the bug in the gccavr source, but the actual
>compiler code that generates the avr statements does not seem to be part of
>his package.
>
>Does anybody know who we can refer gccavr bugs to? Does anybody know whether
>the AVR port to gcc is available so we can try to fix this sort of bug
>ourselves?
>
>Cheers
>Ron Kreymborg
>
>
>
>
>AVR, it's just better.
>
>
>
>
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
>

From [email-masked] Wed Jan 10 02:11:42 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14FyYt-0001WM-00
for <[email-masked]>; Wed, 10 Jan 2001 02:11:40 +1300
Received: (from j@localhost)
by ida.interface-business.de id f09DCAZ05534;
Tue, 9 Jan 2001 14:12:10 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
In-Reply-To: <[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] GCC 3.0 thread
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 10 09:06:04 2001
X-Original-Date: Tue, 9 Jan 2001 14:12:10 +0100 (MET)

[email-masked] (Denis Chertykov) wrote:

> Today I have readed [email-masked].
> GCC 3.0 maintainer want to create a GCC 3.0 CVS thread (In two weeks).
> IE GCC 3.0 coming soon.
> GCC 3.0 will have an avr port.

I recently tried to build the 2001-01-01 snapshot of gcc, but so far
failed. I locally fixed^H^H^H^H^Hhacked away the inconsistency
between the macro REGISTER_MOVE_COST() being defined (in the
machine-dependant headers) as taking three parameters, but being
called with only two params throughout the entire gcc/ subdirectory
(the `MODE' parameter wasn't used in the avr part anyway), and i
locally fixed the bug where __tmp_reg__ and __zero_reg__ were
incorrectly defined (function asm_file_start()) to be 0 and 1 resp.,
as opposed to be r0 and r1.

However, the resulting code was generating a movw instructions when
copiling libgcc vor architecture avr4 (ATmega?), which is unknown to
the latest official version of avr-as from binutils, and avr-as also
complained about the architecture being redefined (in an .arch
pseudo-op) since the compiler already calls avr-as with the -mmcu=
argument. So apparently, the current snapshot of gcc is incompatible
with the latest binutils release...

Does anybody know what's the latest version of gcc that was compatible
with binutils, and that was at least fully compilable (for the AVR
target) without patching?

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Wed Jan 10 02:42:00 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Fz2E-0001Y3-00
for <[email-masked]>; Wed, 10 Jan 2001 02:41:59 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id OAA15834
for <[email-masked]>; Tue, 9 Jan 2001 14:42:28 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Debugging of AVR GCC output?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 10 09:06:13 2001
X-Original-Date: Tue, 09 Jan 2001 14:42:27 +0100

Hello,

Are there some free source-level simulators/debuggers out there which
understand the code produced by avr-gvv + binutils?

I tried AVR Studio 3.21:

I have applied the avrobj patch to the current CVS snapshot of binutils.
Afterwards avr-objcopy understands the -O avrobj option, but AVR Studio
complains that it cannot open the source and after that "Invalid Nordic
Format".

Is there a way to get the gdb from CVS targeted to avr? (I tried the
same way as binutils and gcc, but configure failed)

Greetings
Gunnar

From [email-masked] Wed Jan 10 09:19:54 2001
Received: from anchor-post-32.mail.demon.net ([194.217.242.90])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14G5FJ-0001v3-00
for <[email-masked]>; Wed, 10 Jan 2001 09:19:54 +1300
Received: from spamtastic.demon.co.uk ([194.222.170.126] helo=benny.spamtastic.demon.co.uk)
by anchor-post-32.mail.demon.net with esmtp (Exim 2.12 #1)
id 14G5Fr-00078j-0W; Tue, 9 Jan 2001 20:20:28 +0000
Received: from smudge.spamtastic.demon.co.uk ([192.168.1.10])
by benny.spamtastic.demon.co.uk with smtp (Exim 3.12 #1 (Debian))
id 14G5Fq-0003JR-00; Tue, 09 Jan 2001 20:20:26 +0000
Message-ID: <[email-masked]>
From: "Lee Mitchell" <[email-masked]>
To: "Gunnar Henne" <[email-masked]>,
"AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Debugging of AVR GCC output?
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 10 09:20:04 2001
X-Original-Date: Tue, 9 Jan 2001 20:20:55 -0000

----- Original Message -----
From: Gunnar Henne <[email-masked]>
To: AVR GCC List <[email-masked]>
Sent: Tuesday, January 09, 2001 1:42 PM
Subject: [avr-gcc-list] Debugging of AVR GCC output?

> Hello,
>
> Are there some free source-level simulators/debuggers out there which
> understand the code produced by avr-gvv + binutils?
>
> I tried AVR Studio 3.21:
>
> I have applied the avrobj patch to the current CVS snapshot of binutils.
> Afterwards avr-objcopy understands the -O avrobj option, but AVR Studio
> complains that it cannot open the source and after that "Invalid Nordic
> Format".
>
> Is there a way to get the gdb from CVS targeted to avr? (I tried the
> same way as binutils and gcc, but configure failed)
>

Copy the file /avrgcc/avr/lib/src/gcrt1.S into your project directory and
try again. that worked for me.

Lee Mitchell
www.spamtastic.demon.co.uk
[email-masked]

From [email-masked] Wed Jan 10 14:58:08 2001
Received: from sttlpop5.sttl.uswest.net ([206.81.192.5])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14GAWd-00028u-00
for <[email-masked]>; Wed, 10 Jan 2001 14:58:08 +1300
Received: (qmail 19203 invoked by alias); 10 Jan 2001 01:58:42 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 19146 invoked by uid 0); 10 Jan 2001 01:58:41 -0000
Received: from dslppp-gw4-c208.sttl.uswest.net (HELO larry) (216.160.109.208)
by sttlpop5.sttl.uswest.net with SMTP; 10 Jan 2001 01:58:41 -0000
Message-ID: <00d801c07aa9$3cd61a60$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Debugging of AVR GCC output?
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 10 14:59:04 2001
X-Original-Date: Tue, 9 Jan 2001 17:53:00 -0800

You need to have the source and .obj modules in the same directory that they
were ASSEMBLED in for the AvrObj stuff to work. It is a limitation of
Astudio.

I am glad to hear that the avrobj patch is still around.

Hmm, how hard is it to grab the CVS source, patches, etc. and build on
Redhat 7.0? I am still struggling with the DOS version on Volker Oth's web
site from a year ago. I got Linux up on an old box, but have not made much
further progress.

----- Original Message -----
From: "Gunnar Henne" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
Sent: Tuesday, January 09, 2001 5:42 AM
Subject: [avr-gcc-list] Debugging of AVR GCC output?

> Hello,
>
> Are there some free source-level simulators/debuggers out there which
> understand the code produced by avr-gvv + binutils?
>
> I tried AVR Studio 3.21:
>
> I have applied the avrobj patch to the current CVS snapshot of binutils.
> Afterwards avr-objcopy understands the -O avrobj option, but AVR Studio
> complains that it cannot open the source and after that "Invalid Nordic
> Format".
>

From [email-masked] Wed Jan 10 17:07:55 2001
Received: from hawk.prod.itd.earthlink.net ([207.217.120.22])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14GCYF-0002Dj-00
for <[email-masked]>; Wed, 10 Jan 2001 17:07:55 +1300
Received: from earthlink.net (1Cust123.tnt1.brownwood.tx.da.uu.net [63.28.230.123])
by hawk.prod.itd.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id UAA20645
for <[email-masked]>; Tue, 9 Jan 2001 20:08:24 -0800 (PST)
Message-ID: <[email-masked]>
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Subject: Re: [avr-gcc-list] [avr] GCCAVR Bug
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 10 17:08:04 2001
X-Original-Date: Tue, 09 Jan 2001 22:07:00 -0600

Jason,

You mentioned in one of your recent posts, two items: avr-gcc-20001225
and libc-20000730. I thought I saw on the avr list on egroups that this
was a snapshot of gcc. Is that correct?

On someone else's post, they said it was simply a matter of building gcc
for the avr. I even thought they had included the build switch for
that, but I can't seem to find it. I went to the gcc.gnu.org site, and
found that the 2.95.2 is still the current release.

I have a copy of gcc-2.95.2 for my linux machine. I searched for a
reference for "avr", in the config subdirectrory, but found none.
How/Where does one get the proper gcc tools to configure a
cross-compiling gcc for the avr? Hate to be so dumb, but I'm bating
zero on this one.

Thanks,

Dale Seaburg

From [email-masked] Wed Jan 10 20:43:24 2001
Received: from odin.he.net ([216.218.181.2])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14GFuj-0002My-00
for <[email-masked]>; Wed, 10 Jan 2001 20:43:21 +1300
Received: from jpk1 (adsl-200.world-net.co.nz [210.55.228.200]) by odin.he.net (8.8.6/8.8.2) with SMTP id XAA25475 for <[email-masked]>; Tue, 9 Jan 2001 23:43:41 -0800
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: Windows Eudora Light Version 1.5.2
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: [avr-gcc-list] Snapshots etc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 10 20:44:04 2001
X-Original-Date: Tue, 9 Jan 2001 23:43:41 -0800

Hi Dale,

Sorry but i've confused the issue by referring to my avr target build of gcc
snapshot 20001225 as avr-gcc-20001225. It was built from
gcc-core-20001225.tar.gz binutils-001025 libc-20000730.

The current release of gcc does not have support for the avr target, you can
patch it using the year-old patches but it is better to build it from
unstable snapshots of CVS gcc and binutils as all bug fixes and changes are
applied. There are sometimes problems, in the most recent build I did I
ended up using an earlier binutils with gcc-core-20001225 as the later
binutils although building itself successfully manages to break gcc during
make. I would like to hear of other's successes / failures so we can save
other the hair pulling exercise.

Not that I can read Japaneese, but I noticed that they seem to have had
success with binutils-001202.tar.bz2 gcc-core-20001127.tar.gz
avr-libc-20001125.tar.gz
http://ww2.tiki.ne.jp/~maro/AVR/index.html#20001203

It is simply a matter of doing the following in this order:
Get bintuils snapshot, unbzip2 and untar then

./configure --target=avr
make
make install (as root)

Get gcc-core snapshot, untar then
./configure --target=avr --enable-languages=c
make
make install (as root)

Get avr-libc (latest is 20001125), untar then
cd src
make
make install (as root)

Note that this installs to the default location of /usr/local/avr, this can
be changed by adding prefix=/WANTED_PATH

Jason Kyle

At 22:07 9/01/01 -0600, you wrote:
>Jason,
>
>You mentioned in one of your recent posts, two items: avr-gcc-20001225
>and libc-20000730. I thought I saw on the avr list on egroups that this
>was a snapshot of gcc. Is that correct?
>
>On someone else's post, they said it was simply a matter of building gcc
>for the avr. I even thought they had included the build switch for
>that, but I can't seem to find it. I went to the gcc.gnu.org site, and
>found that the 2.95.2 is still the current release.
>
>I have a copy of gcc-2.95.2 for my linux machine. I searched for a
>reference for "avr", in the config subdirectrory, but found none.
>How/Where does one get the proper gcc tools to configure a
>cross-compiling gcc for the avr? Hate to be so dumb, but I'm bating
>zero on this one.
>
>Thanks,
>
>Dale Seaburg
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
>

From [email-masked] Wed Jan 10 22:53:45 2001
Received: from odin.he.net ([216.218.181.2])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14GHwu-0002VA-00
for <[email-masked]>; Wed, 10 Jan 2001 22:53:45 +1300
Received: from jpk1 (adsl-200.world-net.co.nz [210.55.228.200]) by odin.he.net (8.8.6/8.8.2) with SMTP id BAA07264 for <[email-masked]>; Wed, 10 Jan 2001 01:54:22 -0800
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: Windows Eudora Light Version 1.5.2
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] Snapshots etc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 10 22:54:04 2001
X-Original-Date: Wed, 10 Jan 2001 01:54:22 -0800

Just tried the following:

gcc-core-20010107.tar.gz
ftp://ftp.freesoftware.com/pub/sourceware/gcc/snapshots/2001-01-08/gcc-core-
20010108.tar.gz
binutils-010109.tar.bz2
ftp://sourceware.cygnus.com/pub/binutils/snapshots/binutils-010109.tar.bz2
avr-libc-20001125.tar.gz
http://www1.itnet.pl/amelektr/avr/libc/avr-libc-20001125.tar.gz

No problems at all, builds fine. Tested it with a couple of programs for
8515, nothing unusual happened.

Jason Kyle

From [email-masked] Thu Jan 11 05:53:36 2001
Received: from pop.gmx.net ([194.221.183.20] helo=mail.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14GOVD-0002nl-00
for <[email-masked]>; Thu, 11 Jan 2001 05:53:35 +1300
Received: (qmail 10024 invoked by uid 0); 10 Jan 2001 16:53:43 -0000
Received: from 13dial48.xnet.ro (HELO suiramcompy) (217.10.215.48)
by mail.gmx.net (mp001-rz3) with SMTP; 10 Jan 2001 16:53:43 -0000
From: "Marius Harjoi" <[email-masked]>
To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Importance: Normal
Subject: [avr-gcc-list] avr-gcc debug
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 11 05:54:05 2001
X-Original-Date: Wed, 10 Jan 2001 18:59:31 +0200

Hello All,

I'm glad that avr-gcc mail list is back!
I've just found a very interesting link at
http://www.vak.ru/software/avr.html. Does anybody tried that CASC thing?

Marius Harjoi

From [email-masked] Thu Jan 11 08:36:36 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14GR2q-0002xw-00
for <[email-masked]>; Thu, 11 Jan 2001 08:36:30 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.162])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA16480;
Wed, 10 Jan 2001 22:36:54 +0300
Message-Id: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Subject: Re: [avr-gcc-list] GCC 3.0 thread
To: [email-masked] (Joerg Wunsch)
Cc: [email-masked]
References: <[email-masked]> <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 11 08:37:04 2001
X-Original-Date: Wed, 10 Jan 2001 22:36:53 +0300

[email-masked] (J Wunsch) writes:
> ....
> ...

You use wrong binutils version.

> Does anybody know what's the latest version of gcc that was compatible
> with binutils, and that was at least fully compilable (for the AVR
> target) without patching?

The CVS GCC is compatible with the CVS binutils.

Denis.

From [email-masked] Thu Jan 11 08:36:49 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14GR37-0002y1-00
for <[email-masked]>; Thu, 11 Jan 2001 08:36:46 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.162])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA16505;
Wed, 10 Jan 2001 22:37:15 +0300
Message-Id: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Subject: Re: [avr-gcc-list] Getting a list of previous subscribers
To: Jason Kyle <[email-masked]>
Cc: [email-masked]
References: <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 11 08:37:13 2001
X-Original-Date: Wed, 10 Jan 2001 22:37:13 +0300

Jason Kyle <[email-masked]> writes:

> This email was sent from the old list mid last year, I think it has many of
> the email addresses listed. Shall I email these people? Does anyone
> recognise any addresses? Is it incomplete?

Yes.
I don't see my address and Marek Michalkiewicz address.

Denis.

From [email-masked] Thu Jan 11 08:37:28 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14GR3k-0002y6-00
for <[email-masked]>; Thu, 11 Jan 2001 08:37:26 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.162])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA16530;
Wed, 10 Jan 2001 22:37:34 +0300
Message-Id: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Subject: Re: [avr-gcc-list] [avr] GCCAVR Bug
To: Dale Seaburg <[email-masked]>
Cc: [email-masked]
References: <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 11 08:38:04 2001
X-Original-Date: Wed, 10 Jan 2001 22:37:32 +0300

Dale Seaburg <[email-masked]> writes:

> I have a copy of gcc-2.95.2 for my linux machine. I searched for a
> reference for "avr", in the config subdirectrory, but found none.
> How/Where does one get the proper gcc tools to configure a
> cross-compiling gcc for the avr? Hate to be so dumb, but I'm bating
> zero on this one.

You must use gcc/binutils snapshots or CVS repository.

Denis.

From [email-masked] Thu Jan 11 08:37:51 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14GR47-0002yi-00
for <[email-masked]>; Thu, 11 Jan 2001 08:37:49 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.162])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA16566;
Wed, 10 Jan 2001 22:38:18 +0300
Message-Id: <[email-masked]>
From: Denis Chertykov <[email-masked]>
To: Jason Kyle <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] [avr] GCCAVR Bug
References: <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 11 08:38:11 2001
X-Original-Date: Wed, 10 Jan 2001 22:38:14 +0300

Jason Kyle <[email-masked]> writes:

> Anyone know if this was fixed? Seem to recall something about it a long
> time ago. Ron is using the Volker Oth win32 build (2.95.2 + patch). Tried
> it with avr-gcc-20001225 libc-20000730 and the code looked okay to me.
>
> At 01:14 8/01/01 -0800, you wrote:
> >Hi All
> >
> >This little C snippet embodies a bug in gccavr that cost me considerable
> >trackdown time in a larger program. The key is the if statement combined
> >with the following statement containing an array reference. If you run this
> >in AVRStudio the array statement gets executed every time. Doesn't matter if
> >the array is local or global. Change the following statement to a simple
> >variable assign and all is well. Change the "if" to (a > b) and all is well.
> >
> >#include <stdlib.h>
> >
> >#define LIMIT 25.0
> >#define MAXENTRY 5
> >
> >int main(void);
> >
> >int sum[MAXENTRY];
> >
> >int main(void)
> >{
> > int i;
> > float a, b;
> >
> > a = 10.0;
> > b = LIMIT;
> > for (i=0; i<MAXENTRY; i++)
> > {
> > if (a >= b)
> > {
> > sum[i] = sum[i] + 1;
> > }
> > b += LIMIT;
> > }
> >
> > return 0;
> >}
> >

Today I have tried this example.
I havn't a bug.

Denis.

From [email-masked] Thu Jan 11 08:38:16 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14GR4W-0002yn-00
for <[email-masked]>; Thu, 11 Jan 2001 08:38:13 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.162])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA16619;
Wed, 10 Jan 2001 22:38:39 +0300
Message-Id: <[email-masked]>
From: Denis Chertykov <[email-masked]>
To: "Marius Harjoi" <[email-masked]>
Cc: <[email-masked]>
Subject: Re: [avr-gcc-list] avr-gcc debug
References: <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 11 08:39:04 2001
X-Original-Date: Wed, 10 Jan 2001 22:38:37 +0300

"Marius Harjoi" <[email-masked]> writes:

> Hello All,
>
> I'm glad that avr-gcc mail list is back!
> I've just found a very interesting link at
> http://www.vak.ru/software/avr.html. Does anybody tried that CASC thing?

Also you can look to:
http://home.overta.ru/users/denisc

Denis.

From [email-masked] Thu Jan 11 04:31:07 2001
Received: from mail.kdt.de ([195.8.224.4])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14GNDO-0002jd-00
for <[email-masked]>; Thu, 11 Jan 2001 04:31:06 +1300
Received: from tachyon.henne.lokal (line0676.kdt.de [213.240.147.118])
by mail.kdt.de (8.11.1/8.11.0) with ESMTP id f0AFVZH16485;
Wed, 10 Jan 2001 16:31:36 +0100
Received: from localhost (gunnar@localhost)
by tachyon.henne.lokal (8.11.0/8.8.7) with ESMTP id f0A70k219884;
Wed, 10 Jan 2001 08:00:46 +0100
From: Gunnar Henne <[email-masked]>
To: Larry Barello <[email-masked]>
cc: [email-masked]
Subject: Re: [avr-gcc-list] Debugging of AVR GCC output?
In-Reply-To: <00d801c07aa9$3cd61a60$0200000a@larry>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 11 09:19:05 2001
X-Original-Date: Wed, 10 Jan 2001 08:00:46 +0100 (CET)

Hello Larry,

On Tue, 9 Jan 2001, Larry Barello wrote:

> You need to have the source and .obj modules in the same directory that they
> were ASSEMBLED in for the AvrObj stuff to work. It is a limitation of
> Astudio.

I read this, but I didnt know that this applies also to the libraray
source.

>
> I am glad to hear that the avrobj patch is still around.

It is around, but the youngest Version I found was a half year old.

>
> Hmm, how hard is it to grab the CVS source, patches, etc. and build on
> Redhat 7.0?

Its not quite easy if you do it the first time. I can give some hints:
Check out the actual CVS Sources according to the instructions on the GNU
pages.
Before you try to apply the avrobj patch, check if you can build
avr-binutils and avr-gcc normally.

Dont try to build avr-gdb, when I tried it configure failed.

I used ./configure --target=avr --prefix=/opt/avrgcc
--exec-prefix=/opt/avrgcc

for binutils and gcc.

First build and install binutils, then set the path to
include .../avrgcc/bin and build gcc

You can expect the compilation of gcc to fail in a late phase, this is
caused by some libraries, which are not really needed. Just make install
should succeed.

When applying the avrobj patch you have to make a link from
src/binutils/bfd to ../bfd and make a symbolic link to binutils named eqal
to the pathname in the avrobj patch.

These are hacking Instructions and worked for me, please correct me, if
something could be done better.

If there is interest I can put my hacked sources and binaries somewhere to
download. You can still use cvs up on my sources, to keep with the actual
development.
Its funny to write and successfully compile C++ code for
AVRs. ;-)

Greetings
Gunnar

From [email-masked] Thu Jan 11 10:43:18 2001
Received: from falcon.prod.itd.earthlink.net ([207.217.120.74])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14GT1a-00034W-00
for <[email-masked]>; Thu, 11 Jan 2001 10:43:18 +1300
Received: from earthlink.net (1Cust182.tnt1.brownwood.tx.da.uu.net [63.28.230.182])
by falcon.prod.itd.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id NAA20335;
Wed, 10 Jan 2001 13:43:46 -0800 (PST)
Message-ID: <[email-masked]>
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Denis Chertykov <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] [avr] GCCAVR Bug
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 11 10:44:04 2001
X-Original-Date: Wed, 10 Jan 2001 15:42:25 -0600

Thanks Denis for the help.

I found the gcc snapshot that Jason references: avr-gcc-20001225. But
in the binutils area, I only see the most recent: 20010108. Will this
be OK? Jason references libc-20000730, and that may still be the valid
date within the binutils snapshot.

I do all of my internet stuff with a Win2000 machine, and transfer it to
my LAN'd linux box later. So, I can't tell immediately if I'm
successful or not. I avoided the CVS avenue because of no 'net
connection with the linux box directly. I've never played with CVS, but
it looked like I needed a direct connection from the web site
instructions.

One more question(s): even though I say I have gcc-2.5.2, it is not
installed. My current gcc -v is pgcc-2.91.66. Will this be OK to use
to build the avr-gcc? If I need to upgrade to gcc-2.95.2, will I need
an upgrade of binutils? How will this impact my non-avr activities?
Seems like such dumb questions, but I do use gcc for a C application
that I maintain, and I don't want to "rock the boat". My current linux
version is 2.2.9.

I'm sure I'll have a bunch more questions before this is through, so
please be patient with me :-)

Thanks again,
Dale.

Denis Chertykov wrote:
>
> Dale Seaburg <[email-masked]> writes:
>
> > I have a copy of gcc-2.95.2 for my linux machine. I searched for a
> > reference for "avr", in the config subdirectrory, but found none.
> > How/Where does one get the proper gcc tools to configure a
> > cross-compiling gcc for the avr? Hate to be so dumb, but I'm bating
> > zero on this one.
>
> You must use gcc/binutils snapshots or CVS repository.
>
> Denis.

From [email-masked] Thu Jan 11 13:28:47 2001
Received: from pop.gmx.net ([194.221.183.20] helo=mail.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14GVbi-0003Aw-00
for <[email-masked]>; Thu, 11 Jan 2001 13:28:46 +1300
Received: (qmail 1060 invoked by uid 0); 11 Jan 2001 00:28:09 -0000
Received: from ppp32.tc.dntis.ro (HELO suiramcompy) (193.230.253.33)
by mail.gmx.net (mail02) with SMTP; 11 Jan 2001 00:28:09 -0000
From: "Marius Harjoi" <[email-masked]>
To: <[email-masked]>
Subject: RE: [avr-gcc-list] avr-gcc debug
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
In-Reply-To: <[email-masked]>
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Importance: Normal
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 11 13:29:04 2001
X-Original-Date: Thu, 11 Jan 2001 02:33:53 +0200

Can I use gdb 4.18 with current snapshot of avr-gcc and binutils?
I'm trying to port ucos-ii to avr-gcc. I really do need a simulator or a
debugger. What plans do you have about a simulator or about debugger?

Thanks

-----Original Message-----
From: [email-masked]
[mailto:[email-masked]]On Behalf Of Denis Chertykov
Sent: 10 ianuarie 2001 21:39
To: Marius Harjoi
Cc: [email-masked]
Subject: Re: [avr-gcc-list] avr-gcc debug

"Marius Harjoi" <[email-masked]> writes:

> Hello All,
>
> I'm glad that avr-gcc mail list is back!
> I've just found a very interesting link at
> http://www.vak.ru/software/avr.html. Does anybody tried that CASC thing?

Also you can look to:
http://home.overta.ru/users/denisc

Denis.

_______________________________________________
avr-gcc-list mailing list
[email-masked]
http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Thu Jan 11 15:46:30 2001
Received: from sttlpop5.sttl.uswest.net ([206.81.192.5])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14GXkz-0003G8-00
for <[email-masked]>; Thu, 11 Jan 2001 15:46:30 +1300
Received: (qmail 20615 invoked by alias); 11 Jan 2001 02:47:05 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 20583 invoked by uid 0); 11 Jan 2001 02:47:05 -0000
Received: from dslppp-gw4-c208.sttl.uswest.net (HELO larry) (216.160.109.208)
by sttlpop5.sttl.uswest.net with SMTP; 11 Jan 2001 02:47:05 -0000
Message-ID: <00c301c07b79$2ae6c540$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "Gunnar Henne" <[email-masked]>
Cc: <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Debugging of AVR GCC output?
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 11 15:47:04 2001
X-Original-Date: Wed, 10 Jan 2001 18:42:44 -0800

Gunnar: Do your binaries work with either Win98 or Redhat 7.0 on a Pentium
PC?

I would love to just have binaries and not take on any additional work right
now (e.g. learn Linux any more than what I already know.)

----- Original Message -----
From: "Gunnar Henne" <[email-masked]>
...
> If there is interest I can put my hacked sources and binaries somewhere to
> download. You can still use cvs up on my sources, to keep with the actual
> development.
> Its funny to write and successfully compile C++ code for
> AVRs. ;-)
>
> Greetings
> Gunnar
>
>
>
>

From [email-masked] Thu Jan 11 21:11:43 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Gcpi-0003SD-00
for <[email-masked]>; Thu, 11 Jan 2001 21:11:43 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id JAA21682
for <[email-masked]>; Thu, 11 Jan 2001 09:12:22 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
References: <[email-masked]> <00c301c07b79$2ae6c540$0200000a@larry>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Getting avr-gcc compiled using cygnus compiler?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 11 21:52:04 2001
X-Original-Date: Thu, 11 Jan 2001 09:12:19 +0100

Hello Larry,

Larry Barello schrieb:
>
> Gunnar: Do your binaries work with either Win98 or Redhat 7.0 on a Pentium
> PC?

My Linux-Binaries are compiled under RedHat 7.0 and work fine.

I have sucessfully build avr-binutils with avrobj patch using the cygnus
compiler an NT4.0. They should work an Win98 too.

When compiling gcc with cygnus (actual download) I get the following
error:
-Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long
-DHAVE_CONFIG_H -
o cc1.exe \
c-parse.o c-lang.o c-errors.o c-lex.o c-pragma.o c-decl.o
c-typeck.o c-c
onvert.o c-aux-info.o c-common.o c-semantics.o c-dump.o libcpp.a
toplev.o libba
ckend.a obstack.o -ladvapi32 ../libiberty/libiberty.a
c-parse.o(.text+0xf140): undefined reference to `_imp__gettext'
c-decl.o(.text+0x12bc6): undefined reference to `_imp__gettext'
c-decl.o(.text+0x12bee): undefined reference to `_imp__gettext'
c-decl.o(.text+0x12c3e): undefined reference to `_imp__gettext'
c-decl.o(.text+0x12c66): undefined reference to `_imp__gettext'
c-decl.o(.text+0x12d12): more undefined references to `_imp__gettext'
follow
toplev.o(.text+0xd376): undefined reference to `_imp__bindtextdomain'
toplev.o(.text+0xd389): undefined reference to `_imp__textdomain'
toplev.o(.text+0xdf25): undefined reference to `_imp__gettext'
toplev.o(.text+0xe07d): undefined reference to `_imp__gettext'
libbackend.a(timevar.o)(.text+0x8bc): undefined reference to
`_imp__gettext'
libbackend.a(timevar.o)(.text+0xb65): undefined reference to
`_imp__gettext'
libbackend.a(timevar.o)(.text+0xe1c): undefined reference to
`_imp__gettext'
libbackend.a(diagnostic.o)(.text+0x12ef): more undefined references to
`_imp__ge
ttext' follow
collect2: ld returned 1 exit status
make: *** [cc1.exe] Error 1

My Linux-Binaries are at home. I will put them to download this evening.

Please visit http://www.combio.de/avr and check if there available.

Greetings

Gunnar

From [email-masked] Thu Jan 11 22:45:13 2001
Received: from ns.mtu.ru ([195.34.32.10] helo=mtu.ru)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14GeIC-0003Ww-00
for <[email-masked]>; Thu, 11 Jan 2001 22:45:13 +1300
X-Recipient: [email-masked]
Received: from dicomp.ru (unknown [212.30.172.162])
by mtu.ru (Postfix) with ESMTP id 5108B810C
for <[email-masked]>; Thu, 11 Jan 2001 12:45:16 +0300 (MSK)
(envelope-from [email-masked])
Received: from vlas [212.30.172.174] by dicomp.ru (FTGate 2, 2, 2, 1);
Thu, 11 Jan 2001 12:51:43 +0300
Message-ID: <018d01c07bb3$33281080$aeac1ed4@vlas>
From: "Andrew Vlasov" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]> <00c301c07b79$2ae6c540$0200000a@larry> <[email-masked]>
Subject: Re: [avr-gcc-list] Getting avr-gcc compiled using cygnus compiler?
MIME-Version: 1.0
Content-Type: text/plain;
charset="koi8-r"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 11 22:46:04 2001
X-Original-Date: Thu, 11 Jan 2001 12:45:15 +0300

Hi,

I have 'last cygwin' + 'binutils-010109' + 'gcc-20010108'

When build gcc have the same problem with 'gettext'.
This problem may be avoided by --with-included-gettext:

1) configure --target=avr --enable-languages="c" --with-included-gettext
2) make
ends normal, but
3) make install
is hanged at 'sed', so can't install!

Andrew

> When compiling gcc with cygnus (actual download) I get the following
> error:
> -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long
> -DHAVE_CONFIG_H -
> o cc1.exe \
> c-parse.o c-lang.o c-errors.o c-lex.o c-pragma.o c-decl.o
> c-typeck.o c-c
> onvert.o c-aux-info.o c-common.o c-semantics.o c-dump.o libcpp.a
> toplev.o libba
> ckend.a obstack.o -ladvapi32 ../libiberty/libiberty.a
> c-parse.o(.text+0xf140): undefined reference to `_imp__gettext'
> c-decl.o(.text+0x12bc6): undefined reference to `_imp__gettext'
> c-decl.o(.text+0x12bee): undefined reference to `_imp__gettext'
> c-decl.o(.text+0x12c3e): undefined reference to `_imp__gettext'
> c-decl.o(.text+0x12c66): undefined reference to `_imp__gettext'
> c-decl.o(.text+0x12d12): more undefined references to `_imp__gettext'
> follow
> toplev.o(.text+0xd376): undefined reference to `_imp__bindtextdomain'
> toplev.o(.text+0xd389): undefined reference to `_imp__textdomain'
> toplev.o(.text+0xdf25): undefined reference to `_imp__gettext'
> toplev.o(.text+0xe07d): undefined reference to `_imp__gettext'
> libbackend.a(timevar.o)(.text+0x8bc): undefined reference to
> `_imp__gettext'
> libbackend.a(timevar.o)(.text+0xb65): undefined reference to
> `_imp__gettext'
> libbackend.a(timevar.o)(.text+0xe1c): undefined reference to
> `_imp__gettext'
> libbackend.a(diagnostic.o)(.text+0x12ef): more undefined references to
> `_imp__ge
> ttext' follow
> collect2: ld returned 1 exit status
> make: *** [cc1.exe] Error 1

From [email-masked] Thu Jan 11 22:55:28 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14GeS2-0003Xe-00
for <[email-masked]>; Thu, 11 Jan 2001 22:55:26 +1300
Received: (qmail 8048 invoked from network); 11 Jan 2001 09:57:20 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 11 Jan 2001 09:57:20 -0000
Received: from fri.uni-lj.si ([193.2.76.118]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with ESMTP id AAA18703
for <[email-masked]>; Thu, 11 Jan 2001 10:48:47 +0100
Message-ID: <[email-masked]>
From: [email-masked] (Robert Rozman)
X-Mailer: Mozilla 4.51 [sl] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] How many parameters to function ?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 11 23:27:04 2001
X-Original-Date: Thu, 11 Jan 2001 10:58:46 +0100

Hello,

I notice strange behaviour of avr-gcc. If I specify three or more
parameters for function, all parameters more than two have zero value.

Is there any restrictions on number of parameters or I'm just doing
something wrong ? - I'm using win32 port from Volker Oth.

Thanks in advance,

Robert Rozman

From [email-masked] Thu Jan 11 23:00:25 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14GeWt-0003YD-00
for <[email-masked]>; Thu, 11 Jan 2001 23:00:24 +1300
Received: (qmail 8188 invoked from network); 11 Jan 2001 10:02:27 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 11 Jan 2001 10:02:27 -0000
Received: from fri.uni-lj.si ([193.2.76.118]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with ESMTP id AAA18838
for <[email-masked]>; Thu, 11 Jan 2001 10:53:53 +0100
Message-ID: <[email-masked]>
From: [email-masked] (Robert Rozman)
X-Mailer: Mozilla 4.51 [sl] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Latest win32 port ?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 11 23:27:11 2001
X-Original-Date: Thu, 11 Jan 2001 11:03:53 +0100

Hello,

there is a lot of discussion going on about snapshots, compiling avr-gcc
and similar. At least for me it's very complicated to figure out about
latest win32 port. I have one from Volker Oth but it seems outdated (Is
anyone else maintaining his work ?).

What is the latest (preferably stable) win32 port that could be
installed without any complicated procedures ?

Are there any "tutorial for dummies" to compile perhaps latest win32
port that need compiling ?

Maybe there are also some other users that just can't follow this fast
running train of snapshots, bug fixes, patches and similar.

Thanks in advance,

Robert Rozman

From [email-masked] Fri Jan 12 00:32:46 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14GfyG-0003dY-00
for <[email-masked]>; Fri, 12 Jan 2001 00:32:45 +1300
Received: (from j@localhost)
by ida.interface-business.de id f0BBXQf12474;
Thu, 11 Jan 2001 12:33:26 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
<[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] GCC 3.0 thread
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 12 00:33:04 2001
X-Original-Date: Thu, 11 Jan 2001 12:33:26 +0100 (MET)

Denis Chertykov <[email-masked]> wrote:

> You use wrong binutils version.

What's the version that is required? I'm using the most recent
_release_ one (i hesitate to use beta software unless really
necessary), which is binutils-2.10.1 (November 2000).

Since the current snapshot doesn't compile with that version, do you
know whether gcc-3.0 will also be accompanied by a new (official)
version of binutils?

>> Does anybody know what's the latest version of gcc that was compatible
>> with binutils, and that was at least fully compilable (for the AVR
>> target) without patching?

> The CVS GCC is compatible with the CVS binutils.

At least not with a _release_ of binutils, that was merely my
question. I was in hope to find an earlier version of gcc that would
work with binutils-2.10.1.

But what about the internal consistency compilation problems i
mentioned? Have they been fixed meanwhile?

I can't download the full > 10 GB of gcc source code each day, just in
order to check whether it's fixed now.

spasibo bolshoye za otviet!
--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Fri Jan 12 00:43:18 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Gg8R-0003eR-00
for <[email-masked]>; Fri, 12 Jan 2001 00:43:16 +1300
Received: (from j@localhost)
by ida.interface-business.de id f0BBhw812554;
Thu, 11 Jan 2001 12:43:58 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
In-Reply-To: <[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] How many parameters to function ?
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 12 00:44:04 2001
X-Original-Date: Thu, 11 Jan 2001 12:43:58 +0100 (MET)

[email-masked] (Robert Rozman) wrote:

> Is there any restrictions on number of parameters or I'm just doing
> something wrong ? - I'm using win32 port from Volker Oth.

I have no problems compiling the following. If i look at the
generated assembler file (avr-gcc -S -mmcu=... ), it looks completely
OK:

int
func(int a, int b, int c, int d, int e, int f, int g)
{

return a + b + c + d + e + f + g;
}

int
main(void)
{
func(3, 5, 8, 9, 24, 30, 1);

return 0;
}

Parameters a through e are being passed directly (r24/r25 down through
r16/r17), the remainder is being passed as reference to constant
values. I'd assume for more parameters to be passed on stack, but
didn't try yet.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Fri Jan 12 00:51:39 2001
Received: from falcon.prod.itd.earthlink.net ([207.217.120.74])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14GgGY-0003f5-00
for <[email-masked]>; Fri, 12 Jan 2001 00:51:39 +1300
Received: from earthlink.net (1Cust208.tnt1.brownwood.tx.da.uu.net [63.28.230.208])
by falcon.prod.itd.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id DAA16493
for <[email-masked]>; Thu, 11 Jan 2001 03:52:20 -0800 (PST)
Message-ID: <[email-masked]>
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: avg-gcc list <[email-masked]>
Subject: Re: [avr-gcc-list] Snapshots etc
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 12 00:52:04 2001
X-Original-Date: Thu, 11 Jan 2001 05:51:01 -0600

Jason,

Thanks for the help. That did the trick. I would have never guessed
where to get the libc stuff. I did download the binutils from
freesoftware, instead of cygnus, because I was at freesoftware first
;-). It's the previous date snapshot, but it all seemed to build OK.

Do you or others have an example makefile and perhaps a test C program
that I could use? I have an STK200, and a SIMM100 board that plugs into
a DT003 board to test with (both have 8535's). A few months back, when
I just started to play, I used the STK200 kit's Windows 3.1 software and
ISP dongle. I assume I can still use the STK200 dongle with linux?
What software does everyone use to convert the avr-ld output to .hex and
then download to the target? Or, is a conversion to .hex needed?
Perhaps not.

Thanks again for the clear instructions.

Dale.

Jason Kyle writes:

> Just tried the following:
>
> gcc-core-20010107.tar.gz
> ftp://ftp.freesoftware.com/pub/sourceware/gcc/snapshots/2001-01-08/gcc-core-
> 20010108.tar.gz
> binutils-010109.tar.bz2
> ftp://sourceware.cygnus.com/pub/binutils/snapshots/binutils-010109.tar.bz2
> avr-libc-20001125.tar.gz
> http://www1.itnet.pl/amelektr/avr/libc/avr-libc-20001125.tar.gz
>
> No problems at all, builds fine. Tested it with a couple of programs for
> 8515, nothing unusual happened.

From [email-masked] Fri Jan 12 01:56:23 2001
Received: from smtp.tor.axxent.ca ([209.250.128.26] helo=mail.tor.axxent.ca)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14GhHB-0003i4-00
for <[email-masked]>; Fri, 12 Jan 2001 01:56:22 +1300
Received: from digicom (dial-0065.tor.axxent.ca [216.249.0.65])
by mail.tor.axxent.ca (8.11.0/8.9.3) with ESMTP id f0BCv2703042
for <[email-masked]>; Thu, 11 Jan 2001 07:57:02 -0500 (EST)
Received: from cwall by digicom with local (Exim 3.12 #1 (Debian))
id 14GhJ3-0000A9-00; Thu, 11 Jan 2001 07:58:17 -0500
From: carl wall <[email-masked]>
To: avg-gcc list <[email-masked]>
Subject: Re: [avr-gcc-list] Snapshots etc
Message-ID: <[email-masked]>
Mail-Followup-To: carl wall <cwall>,
avg-gcc list <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Thu, Jan 11, 2001 at 05:51:01AM -0600
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 12 01:57:04 2001
X-Original-Date: Thu, 11 Jan 2001 07:58:17 -0500

Dale
this is from an answer from the old mailing list. As you can
see avr-objcopy is the program that converts between formats.

>I tihnk this should be a FAQ, it took me a while to find out... Basically
>you need the binutils set up, which gives you avr-objcopy. Then it goes
>something like:
>
> avr-gcc -c prog.c -o prog.o
> avr-gcc -o prog prog.o
> avr-objcopy -O ihex prog prog.ihex
>... and you end up with an intel hex format that you can use with uisp:
>
> uisp -v=2 -dstk200 --erase --upload if=prog.ihex
> Hope this helps,
> Simon.

The copy of uisp (Debian) that I have does not work with my parallel
port, so I use the utilities from this page. I have to be root to use
them, could make them suid root, but figure Jason's pavr project
is just about finished and that uses the serial port, and will work with
the STK200 board on any cpu platform with a serial port, that uisp has
been ported to.

STK200 parallel port

http://www.cnhtech.com/~avr1/

Jason' pavr project

http://avr.jpk.co.nz/pavr/pavr.html

Cheers
Carl

On Thu, Jan 11, 2001 at 05:51:01AM -0600, Dale Seaburg wrote:
>
> Do you or others have an example makefile and perhaps a test C program
> that I could use? I have an STK200, and a SIMM100 board that plugs into
> a DT003 board to test with (both have 8535's). A few months back, when
> I just started to play, I used the STK200 kit's Windows 3.1 software and
> ISP dongle. I assume I can still use the STK200 dongle with linux?
> What software does everyone use to convert the avr-ld output to .hex and
> then download to the target? Or, is a conversion to .hex needed?
> Perhaps not.
>

--
Carl A. Wall VE3APY Toronto, Ontario, Canada
"Created on DEBIAN 2.2, an alternative to Microsoft Systems
and a GNU/Linux distribution of Open Source programming"

From [email-masked] Fri Jan 12 02:08:00 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14GhSR-0003io-00
for <[email-masked]>; Fri, 12 Jan 2001 02:07:59 +1300
Received: (from j@localhost)
by ida.interface-business.de id f0BD8h414272;
Thu, 11 Jan 2001 14:08:43 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] Snapshots etc
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 12 02:08:07 2001
X-Original-Date: Thu, 11 Jan 2001 14:08:43 +0100 (MET)

Dale Seaburg <[email-masked]> wrote:

I don't use STK200, but a rather simple `programmer' that's merely
just a cable from the parallel port, plus a programming software a
fellow FreeBSD programmer wrote. So no help possible on the
programmer's part, although i think you should be able to use the UISP
programmer for the STK200. You can find it on www1.itnet.pl as well.

> What software does everyone use to convert the avr-ld output to .hex
> and then download to the target? Or, is a conversion to .hex
> needed?

I'm using the following generic Makefile in my AVR project directory.
Suppose you've got a file named `foo.c' containing the source code,
you can do the following with it:

make foo.s -- will compile the C code into an assembler file,
mainly for code review purposes

make foo.bin -- will compile the C code into an ELF file foo.out first,
then convert it into a raw binary download file foo.bin

make foo.hex -- will compile the C code into an ELF file foo.out first,
then convert it into an Intel hex file foo.hex

make foo.srec -- will compile the C code into an ELF file foo.out first,
then convert it into a Motorola S-record file foo.srec

make clean -- will remove all the intermediate files; caution, it'll
also clean out .s files!, if you have valuable assembler
source files in that directory, better name them ending
in .S (which means an assembler file to be piped through
the C preprocessor, avr-gcc should know this from the .S
suffix already)

(`make all' is provided as a no-op. If you remove those couple of
lines, just calling `make' would default to `make clean', which is
probably not what you want. ;-)

CC= avr-gcc
CFLAGS= -O2 -Wall -mmcu=at90s2333

..SUFFIXES: .s .bin .out .hex .srec

..c.s:
$(CC) $(CFLAGS) -S $<

..o.out:
$(CC) $(CFLAGS) -o $@ $<

..out.bin:
avr-objcopy -O binary $< $@

..out.hex:
avr-objcopy -O ihex $< $@

..out.srec:
avr-objcopy -O srec $< $@

all:
@echo "Cannot make \`all' here."

clean:
rm -f *~ *.out *.bin *.hex *.srec *.s *.o

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Fri Jan 12 02:52:32 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Gi9W-0003li-00
for <[email-masked]>; Fri, 12 Jan 2001 02:52:31 +1300
Received: (from j@localhost)
by ida.interface-business.de id f0BDrDN14499;
Thu, 11 Jan 2001 14:53:13 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] Snapshots etc
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 12 02:53:04 2001
X-Original-Date: Thu, 11 Jan 2001 14:53:13 +0100 (MET)

[email-masked] (J Wunsch) wrote:

> CC= avr-gcc
> CFLAGS= -O2 -Wall -mmcu=at90s2333
>
> ..SUFFIXES: .s .bin .out .hex .srec
^^
>
> ..c.s:
^^
> $(CC) $(CFLAGS) -S $<

Ooops. That mailing list software seems to be a little surprising...
It stupidly converts all lines with a leading dot into two leading
dots. Remove one of those dots in order to use my example Makefile.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Fri Jan 12 02:32:35 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14GhqE-0003kD-00
for <[email-masked]>; Fri, 12 Jan 2001 02:32:35 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id OAA17596
for <[email-masked]>; Thu, 11 Jan 2001 14:33:16 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Uploaded Win32 binaries from snapshot (AvrStudio problem)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 12 11:01:04 2001
X-Original-Date: Thu, 11 Jan 2001 14:33:15 +0100

Hello,

I compiled the snapshots, mentioned in this list, and put them an a
Webserver:

they are compiled for the prefix /avrgcc and have not really been
tested.

http://combio.de/avr/avr-binutils-010109-cygwin.tar.gz

http://combio.de/avr/avr-gcc-20010108-cygwin.tar.gz

http://combio.de/avr/avr-libc-20001125-cygwin.tar.gz

The avrobj Patch is included, but I still cant use AvrStudio.
When I open the avrobj-file, there is a delay of a few seconds, then I
get the following Messages:"Your Object File has been changed! Reload
now?" (Yes) ->
error: One ore More files cannot be found -> Error in Nordic object
file.

Your Object File has been changed! Reload now?" (No) -> Nothing seems to
happen

Greetings Gunnar

From [email-masked] Fri Jan 12 11:29:52 2001
Received: from ns.orbitel.bg ([195.24.32.2] helo=orbitel.bg)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14GqEB-0004CH-00
for <[email-masked]>; Fri, 12 Jan 2001 11:29:52 +1300
Received: (qmail 7066 invoked from network); 11 Jan 2001 22:30:34 -0000
Received: from unknown (HELO home) (212.95.170.65)
by ns.orbitel.bg with SMTP; 11 Jan 2001 22:30:34 -0000
From: "Alexander Popov" <[email-masked]>
To: [email-masked]
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Reply-to: [email-masked]
Message-ID: <3A5E4714.13603.1C18D91@localhost>
Priority: normal
X-mailer: Pegasus Mail for Win32 (v3.12c)
Subject: [avr-gcc-list] Hello again!
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 12 11:30:04 2001
X-Original-Date: Thu, 11 Jan 2001 23:51:48 +0200

Hello again!
I'm very happy the AVR-GCC list is alive!

Alexander Popov

From [email-masked] Fri Jan 12 18:17:20 2001
Received: from hawk.prod.itd.earthlink.net ([207.217.120.22])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14GwaW-0004RB-00
for <[email-masked]>; Fri, 12 Jan 2001 18:17:20 +1300
Received: from earthlink.net (1Cust4.tnt1.brownwood.tx.da.uu.net [63.28.230.4])
by hawk.prod.itd.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id VAA01194
for <[email-masked]>; Thu, 11 Jan 2001 21:18:03 -0800 (PST)
Message-ID: <[email-masked]>
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: avg-gcc list <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Thanks
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 12 18:18:04 2001
X-Original-Date: Thu, 11 Jan 2001 23:16:43 -0600

A big thanks to Jason, Carl and especially to Joerg.

I have successfully built the avr-binutils, avr-gcc and avr-libc. I
used the Makefile that Joerg gave me to simplify my compiling and
conversion to .hex file format. And, finally, again, thanks to Joerg
and his suggestions, I was able to build uisp.

However, that one (uisp) was a bit tricky. I had to go into the DAPA.C
file and hand edit the #defines because it could not find my lp.h
include file, or so it seems. Specifically, I had to enter the 0xNN
values for LP_PAUTOLF, LP_PSTROBE, LP_PINITP and LP_PBUSY (that were in
the original lp.h). I have a lot to learn, I guess, how C works when it
comes to locating include files ;-) C can be SO stupid at times, or is
it the operator that is stupid... :)

I then found on my DOS machine a zip file of gcc test scripts that
Volker Oth had made to test the DOS translation of avr-gcc he had made.
I never did install the avr-gcc dos version. I unzipped them on the
linux box and did a 'make gcctest1.hex', followed by a 'uisp -v=2
-dstk200 --erase --upload if=gcctest1.hex'

Wow! It worked! I did have to go into that first test and add in one
more loop to slow down the blinking of the LED's. But, it worked!

Now, I can use my STK200 dongle to ISP my projects. Also, it looks like
(with my very limited testing so far) that what may have been broken in
the past now seems to work.

Thanks again to everyone who contributed to this success.

Dale Seaburg

From [email-masked] Fri Jan 12 19:51:56 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Gy43-0004Un-00
for <[email-masked]>; Fri, 12 Jan 2001 19:51:55 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id HAA29898;
Fri, 12 Jan 2001 07:52:36 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: Larry Barello <[email-masked]>,
AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Getting avr-gcc compiled using cygnus compiler?
References: <[email-masked]> <00c301c07b79$2ae6c540$0200000a@larry> <[email-masked]> <007901c07be6$4ae39fe0$0200000a@larry>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 12 20:41:04 2001
X-Original-Date: Fri, 12 Jan 2001 07:52:35 +0100

Hello,

Larry Barello wrote:
> I got the cygwin binaries. I need to find the dll.

I have now uploaded the dll:

Please visit http://www.combio.de/avr

Greetings

Gunnar

From [email-masked] Fri Jan 12 21:18:25 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14GzPj-0004ZU-00
for <[email-masked]>; Fri, 12 Jan 2001 21:18:24 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id JAA13734
for <[email-masked]>; Fri, 12 Jan 2001 09:19:10 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Binaries for win32 and linux (RPM) available
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 12 21:26:04 2001
X-Original-Date: Fri, 12 Jan 2001 09:19:09 +0100

Hello,

I have compiled the development tools for both platforms.
You can download the linux binaries as single tar.gz files for gcc,
binutils and libc or as a complete RPM, which installs under
/opt/avrgcc.

For your convenience I created a minimal index.html:

http://combio.de/avr/index.html

Greetings Gunnar

--
Gunnar Henne Email: [email-masked]
oTRIs GmbH & Co. KG Tel. : 0231 / 10616-21
Landgrafenstr. 153 Fax. : 0231 / 10615-44
44139 Dortmund

From [email-masked] Fri Jan 12 22:39:06 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14H0fo-0004ed-00
for <[email-masked]>; Fri, 12 Jan 2001 22:39:05 +1300
Received: (from j@localhost)
by ida.interface-business.de id f0C9dlo26045;
Fri, 12 Jan 2001 10:39:47 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] Thanks
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 12 22:40:05 2001
X-Original-Date: Fri, 12 Jan 2001 10:39:47 +0100 (MET)

Dale Seaburg <[email-masked]> wrote:

> A big thanks to Jason, Carl and especially to Joerg.

Oh, don't forget Denis. Without his work, we wouldn't have something
to talk about in this mailing list at all. ;-) The presence of avr-gcc
was my prime reason to chose AVR for future microcontroller projects.

> However, that one (uisp) was a bit tricky. I had to go into the DAPA.C
> file and hand edit the #defines because it could not find my lp.h
> include file, or so it seems. [...]

uisp is indeed tricky. I started porting it to FreeBSD, but i
eventually gave up. FreeBSD offers a more abstracted layer to access
the parallel port, called `ppi'. This driver doesn't require
superuser privileges, and it cooperates with other potential users of
the parallel port, i. e. the printer spooler wouldn't have a problem
to talk to the printer at times where ppi is currently not being used.
Another advantage is that inb()/outb() are restricted to the IA32
(aka. ix86) architecture, while ppi(4) is supported on any platform
with a parallel port (well, FreeBSD doesn't support that many
platforms right now).

Anyway, uisp doesn't seem to be maintained anymore. Someone else here
in a German newsgroup told me that he's been doing a similar port for
Linux in the past (obviously Linux also offers some architecture-
independant parallel port driver now), but there seems to be no way to
exchange this modifications to other potential users of uisp.

My gripe with uisp was that there was no way to convince it to
actually talk to my chips where the chip ID has been erased. I don't
know how this happens, but Atmel's application note AVR910 describes
this phenomenon: under some circumstances, it's possible that an AVR
chip doesn't repsond with the correct chip ID. AVR910 talks about the
ID being 3 * 0xff, i've seen this, as well as 3 * 0x00 on one AVR 1200
chip. The programmer i'm using now is able to override this, but uisp
never worked when i tried to hack the code to override the chip ID.

Oh, i'm seeing KG5LT. Interestingly enough, my first `serious' AVR
project i'm thinking about will be a replacement for the
fixed-frequency crystal oscillators of old VHF walkie-talkies, to be
replaced by a DDS oscillator controlled by an AVR. Hope i'll get it
working some day...

73 de DL8DTL
--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Sat Jan 13 06:26:07 2001
Received: from avocet.prod.itd.earthlink.net ([207.217.121.50])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14H7xn-0004zE-00
for <[email-masked]>; Sat, 13 Jan 2001 06:26:07 +1300
Received: from earthlink.net (1Cust84.tnt1.brownwood.tx.da.uu.net [63.28.230.84])
by avocet.prod.itd.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id JAA22015;
Fri, 12 Jan 2001 09:26:38 -0800 (PST)
Message-ID: <[email-masked]>
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Joerg Wunsch <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] Thanks
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 13 06:27:06 2001
X-Original-Date: Fri, 12 Jan 2001 11:25:15 -0600

Joerg,

Thank you for correcting my oversight. I did not mean to slight Denis
by not mentioning his excellent contribution to this whole avr-gcc
effort. I was merely wanted to thank those who gave me specific detail
that got me off dead-center and moving forward. Sometimes when one is
new to a subject, they need a small push in the right direction to get
going. Thanks again for that push!

J Wunsch wrote:
>
> Dale Seaburg <[email-masked]> wrote:
>
> > A big thanks to Jason, Carl and especially to Joerg.
>
> Oh, don't forget Denis. Without his work, we wouldn't have something
> to talk about in this mailing list at all. ;-) The presence of avr-gcc
> was my prime reason to chose AVR for future microcontroller projects.
> ...
> My gripe with uisp was that there was no way to convince it to
> actually talk to my chips where the chip ID has been erased. I don't
> know how this happens, but Atmel's application note AVR910 describes
> this phenomenon: under some circumstances, it's possible that an AVR
> chip doesn't repsond with the correct chip ID. AVR910 talks about the
> ID being 3 * 0xff, i've seen this, as well as 3 * 0x00 on one AVR 1200
> chip. The programmer i'm using now is able to override this, but uisp
> never worked when i tried to hack the code to override the chip ID.

This sounds like a challenge. ;-) I can't say I'm up to it, mainly
because I found out yesterday, that I'm going to be gainfully employed
again (for at least about 300 hours) contracting to my old employer -
from whom I took early retirement two years ago. I do programming on
mainframes (HP3000 and HP-UX) and from time to time on PC's (MS Access,
Visual Basic, Excel Macros, etc.) That employment will keep me busy for
a while. My "play time" will be devoted to learning Java for using
Dallas Semi's 1-wire iButton products for some Renewable Energy
applications I want to explore. And, lastly, I'm NOT a fan of the C
language. That in itself is a major challenge to me! But, as you can
see, I'm still attempting to learn ;-)

> Oh, i'm seeing KG5LT. Interestingly enough, my first `serious' AVR
> project i'm thinking about will be a replacement for the
> fixed-frequency crystal oscillators of old VHF walkie-talkies, to be
> replaced by a DDS oscillator controlled by an AVR. Hope i'll get it
> working some day...

Now, you have piqued my curiosity, Joerg. Keep us informed on your
progress. I've always wanted to build a "crystal replacement" for
rock-bound rigs, such as commercial two-way radios that are cheaply had
at swapfests. A few years back I looked into Qualcomm's efforts with
their DDS chip, but did not pursue it.

>
> 73 de DL8DTL

73 - Dale. KG5LT

From [email-masked] Sat Jan 13 08:03:00 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=marekm.home)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14H9TP-00055S-00
for <[email-masked]>; Sat, 13 Jan 2001 08:02:58 +1300
Received: (from marekm@localhost)
by marekm.home (8.9.3/8.9.3/Debian 8.9.3-21) id UAA11077;
Fri, 12 Jan 2001 20:00:42 +0100
From: Marek Michalkiewicz <[email-masked]>
Message-Id: <[email-masked]>
Subject: uisp - was Re: [avr-gcc-list] Thanks
In-Reply-To: <[email-masked]> from J Wunsch
at "Jan 12, 2001 10:39:47 am"
To: Joerg Wunsch <[email-masked]>
CC: [email-masked]
X-Mailer: ELM [version 2.4ME+ PL66 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 13 08:03:05 2001
X-Original-Date: Fri, 12 Jan 2001 20:00:42 +0100 (CET)

> uisp is indeed tricky. I started porting it to FreeBSD, but i
> eventually gave up. FreeBSD offers a more abstracted layer to access
> the parallel port, called `ppi'. This driver doesn't require
> superuser privileges, and it cooperates with other potential users of
> the parallel port, i. e. the printer spooler wouldn't have a problem
> to talk to the printer at times where ppi is currently not being used.
> Another advantage is that inb()/outb() are restricted to the IA32
> (aka. ix86) architecture, while ppi(4) is supported on any platform
> with a parallel port (well, FreeBSD doesn't support that many
> platforms right now).

Sounds a lot like the Linux ppdev driver (standard in "soon to be stable"
2.4 kernel, not yet in "really stable" 2.2.x but kernel patch exists and
is also distributed with uisp for convenience).

> Anyway, uisp doesn't seem to be maintained anymore. Someone else here
> in a German newsgroup told me that he's been doing a similar port for
> Linux in the past (obviously Linux also offers some architecture-
> independant parallel port driver now), but there seems to be no way to
> exchange this modifications to other potential users of uisp.

It _is_ now maintained by me. You can get it from

http://www.itnet.pl/amelektr/avr/uisp/

Bug reports and patches are welcome. The Linux ppdev driver is now
supported. I don't know much about *BSD but I think it shouldn't be
that hard. (Probably time for adding autoconf/automake to make
porting uisp easier... Someone might also want to do a win32 port that
actually works on NT, unlike Atmel's AVR ISP last time I checked.)

> My gripe with uisp was that there was no way to convince it to
> actually talk to my chips where the chip ID has been erased. I don't
> know how this happens, but Atmel's application note AVR910 describes
> this phenomenon: under some circumstances, it's possible that an AVR
> chip doesn't repsond with the correct chip ID. AVR910 talks about the
> ID being 3 * 0xff, i've seen this, as well as 3 * 0x00 on one AVR 1200

I'll try to see how hard would be to add an option to force device
type. The chips I have been using so far (2313, 8515, 8535, ATmega163)
never had this problem, but I have reports about other problems with the
1200 as well (it seems the -dno-poll -dno-retry options are required).
But I would say that chips that don't report the correct ID are seriously
broken. Well, we have to support them if there are many on the market...

If these chip IDs are programmed from outside into some kind of flash
memory cells (not hardwired in each chip), perhaps it would be a good
idea to try to ask Atmel how to fix these broken chips by programming
the correct ID again.

Marek

From [email-masked] Sat Jan 13 08:40:01 2001
Received: from gull.prod.itd.earthlink.net ([207.217.121.85])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14HA3M-00057F-00
for <[email-masked]>; Sat, 13 Jan 2001 08:40:00 +1300
Received: from earthlink.net (1Cust84.tnt1.brownwood.tx.da.uu.net [63.28.230.84])
by gull.prod.itd.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id LAA06227;
Fri, 12 Jan 2001 11:39:38 -0800 (PST)
Message-ID: <[email-masked]>
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Marek Michalkiewicz <[email-masked]>
CC: [email-masked]
Subject: Re: uisp - was Re: [avr-gcc-list] Thanks
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 13 08:40:06 2001
X-Original-Date: Fri, 12 Jan 2001 13:38:17 -0600

Marek,

It's good to see that you are maintaining uisp. I'm curious why I ran
into the compile problem that I did with uisp? I did download it from
your site you mention below just a few days ago.

Specifically, it couldn't find LP_PSTROBE et al defines (which were in
the lp.h file). Where was it looking for the lp.h file? Mine was in:
/usr/src/linux/include/linux/sys, if I remember right. Actually, I
think it found the file, but didn't do the proper substitution when it
was redefined by the line in DAPA.C: #define DAPA_SCK LP_PSTROBE.

If my memory serves me, I think it was during the linking stage that it
growled at me complaining that it couldn't find LP_PSTROBE etc. It
remains a mystery to me what actually took place (why/when the compiler
actually complained). As I said in my earlier post, I simply sub'd in
the actual 0xNN values that were in the lp.h header file that the DAPA.C
file needed. I hope I'm making sense here.

Do I need a patch or something? Was I missing something? Just curious,
now that I have it working. Was there a switch for the make that I
didn't apply?

Marek Michalkiewicz wrote:
> ...
> It _is_ now maintained by me. You can get it from
>
> http://www.itnet.pl/amelektr/avr/uisp/
>
> Bug reports and patches are welcome. The Linux ppdev driver is now
> supported. I don't know much about *BSD but I think it shouldn't be
> that hard. (Probably time for adding autoconf/automake to make
> porting uisp easier... Someone might also want to do a win32 port that
> actually works on NT, unlike Atmel's AVR ISP last time I checked.)

That's why I did my early avr playing from a DOS machine instead of my
NT box.

Dale.

From [email-masked] Sat Jan 13 08:45:50 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14HA8x-00057p-00
for <[email-masked]>; Sat, 13 Jan 2001 08:45:48 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.131])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA04612;
Fri, 12 Jan 2001 22:46:30 +0300
To: "Marius Harjoi" <[email-masked]>
Cc: <[email-masked]>
Subject: Re: [avr-gcc-list] avr-gcc debug
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
In-Reply-To: "Marius Harjoi"'s message of "Thu, 11 Jan 2001 02:33:53 +0200"
Message-ID: <[email-masked]>
Lines: 11
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 13 08:46:05 2001
X-Original-Date: 12 Jan 2001 22:39:13 +0300

"Marius Harjoi" <[email-masked]> writes:

> Can I use gdb 4.18 with current snapshot of avr-gcc and binutils?
> I'm trying to port ucos-ii to avr-gcc. I really do need a simulator or a
> debugger. What plans do you have about a simulator or about debugger?

You can use gdb 4.18 with current snapshot of avr-gcc and binutils.

I have initial version of the simulator, but it's not completed and tested.

Denis

From [email-masked] Sat Jan 13 08:46:16 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14HA9O-000581-00
for <[email-masked]>; Sat, 13 Jan 2001 08:46:14 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.131])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA04657;
Fri, 12 Jan 2001 22:46:54 +0300
To: [email-masked] (Joerg Wunsch)
Cc: [email-masked]
Subject: Re: [avr-gcc-list] GCC 3.0 thread
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
In-Reply-To: [email-masked]'s message of "Thu, 11 Jan 2001 12:33:26 +0100 (MET)"
Message-ID: <[email-masked]>
Lines: 43
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 13 08:47:04 2001
X-Original-Date: 12 Jan 2001 22:39:37 +0300

[email-masked] (J Wunsch) writes:

> Denis Chertykov <[email-masked]> wrote:
>
> > You use wrong binutils version.
>
> What's the version that is required? I'm using the most recent
> _release_ one (i hesitate to use beta software unless really
> necessary), which is binutils-2.10.1 (November 2000).

Use the binutils from CVS.

> Since the current snapshot doesn't compile with that version, do you
> know whether gcc-3.0 will also be accompanied by a new (official)
> version of binutils?

Probably no.
But, "binutils peoples" are want to release a new version of binutils.
GCC releases and binutils releases is different events.

> At least not with a _release_ of binutils, that was merely my
> question. I was in hope to find an earlier version of gcc that would
> work with binutils-2.10.1.

May be you newer found it.

> But what about the internal consistency compilation problems i
> mentioned? Have they been fixed meanwhile?

You don't point to any real bug.

>
> I can't download the full > 10 GB of gcc source code each day, just in
> order to check whether it's fixed now.

Use CVS. It's really nice.

> spasibo bolshoye za otviet!

koi8 for Russian.
(In private mails. list members can't read by russian)

Denis.

From [email-masked] Sat Jan 13 08:46:02 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14HA99-00057u-00
for <[email-masked]>; Sat, 13 Jan 2001 08:46:00 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.131])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA04637;
Fri, 12 Jan 2001 22:46:41 +0300
To: Dale Seaburg <[email-masked]>
Cc: Denis Chertykov <[email-masked]>, [email-masked]
Subject: Re: [avr-gcc-list] [avr] GCCAVR Bug
References: <[email-masked]> <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
In-Reply-To: Dale Seaburg's message of "Wed, 10 Jan 2001 15:42:25 -0600"
Message-ID: <[email-masked]>
Lines: 22
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 13 08:47:17 2001
X-Original-Date: 12 Jan 2001 22:39:24 +0300

Dale Seaburg <[email-masked]> writes:

> Thanks Denis for the help.
>
> I found the gcc snapshot that Jason references: avr-gcc-20001225. But
> in the binutils area, I only see the most recent: 20010108. Will this
> be OK? Jason references libc-20000730, and that may still be the valid
> date within the binutils snapshot.

Probably yes.

> One more question(s): even though I say I have gcc-2.5.2, it is not
> installed. My current gcc -v is pgcc-2.91.66. Will this be OK to use
> to build the avr-gcc? If I need to upgrade to gcc-2.95.2, will I need
> an upgrade of binutils? How will this impact my non-avr activities?
> Seems like such dumb questions, but I do use gcc for a C application
> that I maintain, and I don't want to "rock the boat". My current linux
> version is 2.2.9.

IMHO: pgcc-2.91.66 will be OK.

Denis.

From [email-masked] Sat Jan 13 13:02:16 2001
Received: from pop.gmx.net ([194.221.183.20] helo=mail.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14HE9A-0005Jw-00
for <[email-masked]>; Sat, 13 Jan 2001 13:02:16 +1300
Received: (qmail 392 invoked by uid 0); 13 Jan 2001 00:02:31 -0000
Received: from ppp12.tc.dntis.ro (HELO suiramcompy) (193.230.253.13)
by mail.gmx.net (mp002-rz3) with SMTP; 13 Jan 2001 00:02:31 -0000
From: "Marius Harjoi" <[email-masked]>
To: "Denis Chertykov" <[email-masked]>
Cc: <[email-masked]>
Subject: RE: [avr-gcc-list] avr-gcc debug
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Importance: Normal
In-Reply-To: <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 13 13:03:04 2001
X-Original-Date: Sat, 13 Jan 2001 02:08:22 +0200

Hello,

I need the SPI interface to communicate with ad7705 A/D converter. Denis,
what do you think about using serial interface as in CASC
(http://www.vak.ru/software/avr.html)? I'd like to try that, but I'll start
to cut my stk300 only if I know that you agree with that solution, and
somehow you will include that in your support for GDB. Or what about an
at90s to do the programming and serial interface and other things which may
be useful for debug?
I have some projects that I want to publish on a web page, unfortunately
all the source code is written for IAR. I already start porting but the lack
of a simulator or a debugger is giving me headache, especially at the ucos
part..
I know I'm asking a lot of things to someone which does the work for FREE
and with limited time but anyway.. it worth a try :)

Marius

-----Original Message-----
From: [email-masked]
[mailto:[email-masked]]On Behalf Of Denis Chertykov
Sent: 12 ianuarie 2001 21:39
To: Marius Harjoi
Cc: [email-masked]
Subject: Re: [avr-gcc-list] avr-gcc debug

"Marius Harjoi" <[email-masked]> writes:

> Can I use gdb 4.18 with current snapshot of avr-gcc and binutils?
> I'm trying to port ucos-ii to avr-gcc. I really do need a simulator or a
> debugger. What plans do you have about a simulator or about debugger?

You can use gdb 4.18 with current snapshot of avr-gcc and binutils.

I have initial version of the simulator, but it's not completed and tested.

Denis

_______________________________________________
avr-gcc-list mailing list
[email-masked]
http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Sat Jan 13 16:53:20 2001
Received: from sys27.hou.wt.net ([205.230.159.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14HHkl-0005TF-00
for <[email-masked]>; Sat, 13 Jan 2001 16:53:19 +1300
Received: from mjones233 (216-119-133-136.ipset13.wt.net [216.119.133.136])
by sys27.hou.wt.net (8.9.3/8.9.3) with SMTP id VAA52282;
Fri, 12 Jan 2001 21:53:50 -0600 (CST)
Message-ID: <000b01c07d13$ffbe8320$74626262@mjones233>
From: "Mike Jones" <[email-masked]>
To: "Dale Seaburg" <[email-masked]>,
"avg-gcc list" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Thanks
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 13 16:54:05 2001
X-Original-Date: Fri, 12 Jan 2001 21:50:40 -0600

So was this a Linux or Win32 version of the executables? If Win32 how about
a zip of the directory to make it a bit easier for some of the rest of us
that have not done much in this area.

Mike
----- Original Message -----
From: "Dale Seaburg" <[email-masked]>
To: "avg-gcc list" <[email-masked]>
Sent: Thursday, January 11, 2001 11:16 PM
Subject: [avr-gcc-list] Thanks

> A big thanks to Jason, Carl and especially to Joerg.
>
> I have successfully built the avr-binutils, avr-gcc and avr-libc. I
> used the Makefile that Joerg gave me to simplify my compiling and
> conversion to .hex file format. And, finally, again, thanks to Joerg
> and his suggestions, I was able to build uisp.
>
> However, that one (uisp) was a bit tricky. I had to go into the DAPA.C
> file and hand edit the #defines because it could not find my lp.h
> include file, or so it seems. Specifically, I had to enter the 0xNN
> values for LP_PAUTOLF, LP_PSTROBE, LP_PINITP and LP_PBUSY (that were in
> the original lp.h). I have a lot to learn, I guess, how C works when it
> comes to locating include files ;-) C can be SO stupid at times, or is
> it the operator that is stupid... :)
>
> I then found on my DOS machine a zip file of gcc test scripts that
> Volker Oth had made to test the DOS translation of avr-gcc he had made.
> I never did install the avr-gcc dos version. I unzipped them on the
> linux box and did a 'make gcctest1.hex', followed by a 'uisp -v=2
> -dstk200 --erase --upload if=gcctest1.hex'
>
> Wow! It worked! I did have to go into that first test and add in one
> more loop to slow down the blinking of the LED's. But, it worked!
>
> Now, I can use my STK200 dongle to ISP my projects. Also, it looks like
> (with my very limited testing so far) that what may have been broken in
> the past now seems to work.
>
> Thanks again to everyone who contributed to this success.
>
> Dale Seaburg
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Sat Jan 13 17:20:41 2001
Received: from albatross.prod.itd.earthlink.net ([207.217.120.120])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14HIBE-0005Ul-00
for <[email-masked]>; Sat, 13 Jan 2001 17:20:41 +1300
Received: from earthlink.net (1Cust41.tnt1.brownwood.tx.da.uu.net [63.28.230.41])
by albatross.prod.itd.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id UAA17491;
Fri, 12 Jan 2001 20:21:24 -0800 (PST)
Message-ID: <[email-masked]>
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Mike Jones <[email-masked]>
CC: avg-gcc list <[email-masked]>
Subject: Re: [avr-gcc-list] Thanks
References: <[email-masked]> <000b01c07d13$ffbe8320$74626262@mjones233>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 13 17:21:04 2001
X-Original-Date: Fri, 12 Jan 2001 22:20:00 -0600

Mike,

This was for Linux. I downloaded the sources. But, under Linux, that
is generally no problem because of the included compilers (unlike
Windoze). And, this gave me the opportunity to prefix the gcc
cross-compiler with "avr-" to differentiate it from the original gcc.

Gunnar Henne posted earlier today his URL:
http://combio.de/avr/index.html which has both the win32 and linux
stuff. These are binaries, meaning they should be ready to go after
unzipping and installing. Correct me Gunnar, if I have that wrong.

Dale.

Mike Jones wrote:
>
> So was this a Linux or Win32 version of the executables? If Win32 how about
> a zip of the directory to make it a bit easier for some of the rest of us
> that have not done much in this area.
>
> Mike
> ----- Original Message -----
> From: "Dale Seaburg" <[email-masked]>
> To: "avg-gcc list" <[email-masked]>
> Sent: Thursday, January 11, 2001 11:16 PM
> Subject: [avr-gcc-list] Thanks
>
> > A big thanks to Jason, Carl and especially to Joerg.
> >
> > I have successfully built the avr-binutils, avr-gcc and avr-libc. I
> > used the Makefile that Joerg gave me to simplify my compiling and
> > conversion to .hex file format. And, finally, again, thanks to Joerg
> > and his suggestions, I was able to build uisp.
> >...

From [email-masked] Sun Jan 14 01:02:14 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=marekm.home)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14HPNb-0005m2-00
for <[email-masked]>; Sun, 14 Jan 2001 01:02:05 +1300
Received: (from marekm@localhost)
by marekm.home (8.9.3/8.9.3/Debian 8.9.3-21) id NAA17770;
Sat, 13 Jan 2001 13:01:22 +0100
From: Marek Michalkiewicz <[email-masked]>
Message-Id: <[email-masked]>
Subject: Re: uisp - was Re: [avr-gcc-list] Thanks
In-Reply-To: <[email-masked]> from Dale Seaburg at "Jan 12,
2001 01:38:17 pm"
To: Dale Seaburg <[email-masked]>
CC: Marek Michalkiewicz <[email-masked]>, [email-masked]
X-Mailer: ELM [version 2.4ME+ PL66 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 14 01:03:03 2001
X-Original-Date: Sat, 13 Jan 2001 13:01:22 +0100 (CET)

> It's good to see that you are maintaining uisp. I'm curious why I ran
> into the compile problem that I did with uisp? I did download it from
> your site you mention below just a few days ago.

Are you sure you got the latest version (uisp-20001216.tar.gz)?

> Specifically, it couldn't find LP_PSTROBE et al defines (which were in
> the lp.h file). Where was it looking for the lp.h file? Mine was in:
> /usr/src/linux/include/linux/sys, if I remember right. Actually, I
> think it found the file, but didn't do the proper substitution when it
> was redefined by the line in DAPA.C: #define DAPA_SCK LP_PSTROBE.

The current version already contains the necessary include files.

Marek

From [email-masked] Sun Jan 14 04:44:40 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14HSr8-0005uI-00
for <[email-masked]>; Sun, 14 Jan 2001 04:44:38 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.179])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id QAA06263
for <[email-masked]>; Sat, 13 Jan 2001 16:51:24 +0300
To: [email-masked]
From: Denis Chertykov <[email-masked]>
Message-ID: <[email-masked]>
Lines: 28
X-Mailer: Gnus v5.7/Emacs 20.4
Subject: [avr-gcc-list] binutils: next release
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 14 04:45:04 2001
X-Original-Date: 13 Jan 2001 16:44:07 +0300

------- Start of forwarded message -------
To: [email-masked]
Subject: Re: next release
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Sat, 13 Jan 2001 12:16:55 +0000
From: Philip Blundell <[email-masked]>
Message-Id: <[email-masked]>

On 27 Dec, I wrote:

>So, it's that time again when thoughts inevitably turn to a new version of
>GNU binutils. I'd like to aim for a release at the start of March, with a
>freeze at the end of January.

I'm not aware of any outstanding problems that should delay the release now.
Unless anything turns up, I plan to make the branch in a week's time, on Jan
20 - this will also be the cut-off date for new features.

Does anybody know what the status is on Linux/MIPS? I'd also be grateful if
someone could test the current code on Solaris and DJGPP.

p.

------- End of forwarded message -------

From [email-masked] Sun Jan 14 05:55:21 2001
Received: from hawk.prod.itd.earthlink.net ([207.217.120.22])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14HTxZ-0005xY-00
for <[email-masked]>; Sun, 14 Jan 2001 05:55:21 +1300
Received: from earthlink.net (1Cust118.tnt1.brownwood.tx.da.uu.net [63.28.230.118])
by hawk.prod.itd.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id IAA17559;
Sat, 13 Jan 2001 08:55:34 -0800 (PST)
Message-ID: <[email-masked]>
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Marek Michalkiewicz <[email-masked]>
CC: [email-masked]
Subject: Re: uisp - was Re: [avr-gcc-list] Thanks
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 14 05:56:04 2001
X-Original-Date: Sat, 13 Jan 2001 10:54:12 -0600

Marek,

Marek Michalkiewicz wrote:
> ...
> Are you sure you got the latest version (uisp-20001216.tar.gz)?

No! I simply, and inadvertently, got what was near the top of the list
(sheepish grin). My most humble apologies.

> ...
> The current version already contains the necessary include files.

I downloaded the latest (20001216), and was pleasantly surprised to find
new features. I read in the README that you encountered (and corrected
- 20000930) the same problem I had with the 0.2b release - parallel port
bit definitions (lp.h file).

I do have a question or two: what is the difference between these two
switches: -dstk200 and -davrisp? I have the cable/dongle from my
STK200, so I assume, and use the -dstk200 option. I'm assuming, because
you differentiate, the Atmel AVR ISP (cable?) must be not the same as
the cable from the STK200. Is this correct?

With regard to the --segment option, is this for selecting which area
(flash, eeprom or fuse) gets uploaded? It appears from the --help that
if one were to use the srec format for the upload file that this would
be auto-selected. Is this assumption correct?

Perhaps, I need to look for a FAQ so I don't bother folks with these
endless questions ;-)

Thanks for the help.

Dale

From [email-masked] Sun Jan 14 06:18:53 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=marekm.home)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14HUJr-0005yh-00
for <[email-masked]>; Sun, 14 Jan 2001 06:18:24 +1300
Received: (from marekm@localhost)
by marekm.home (8.9.3/8.9.3/Debian 8.9.3-21) id SAA19553;
Sat, 13 Jan 2001 18:18:17 +0100
From: Marek Michalkiewicz <[email-masked]>
Message-Id: <[email-masked]>
Subject: Re: uisp - was Re: [avr-gcc-list] Thanks
In-Reply-To: <[email-masked]> from Dale Seaburg at "Jan 13,
2001 10:54:12 am"
To: Dale Seaburg <[email-masked]>
CC: Marek Michalkiewicz <[email-masked]>, [email-masked]
X-Mailer: ELM [version 2.4ME+ PL66 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 14 06:19:04 2001
X-Original-Date: Sat, 13 Jan 2001 18:18:17 +0100 (CET)

> I do have a question or two: what is the difference between these two
> switches: -dstk200 and -davrisp? I have the cable/dongle from my
> STK200, so I assume, and use the -dstk200 option. I'm assuming, because
> you differentiate, the Atmel AVR ISP (cable?) must be not the same as
> the cable from the STK200. Is this correct?

I added it from the hacked version of uisp I received some time ago.
For the STK200 (and probably STK300 too), use -dstk200 as before, I don't
know really where this different "Atmel AVR ISP" came from ;)

> With regard to the --segment option, is this for selecting which area
> (flash, eeprom or fuse) gets uploaded? It appears from the --help that

Yes. It works for downloading (device -> file) too. (The download/upload
names are a bit confusing, read/write would be better I think.)

> if one were to use the srec format for the upload file that this would
> be auto-selected. Is this assumption correct?

It may be auto-selected if the name encoded in the header of the file
(ASCII converted to hex) is one of flash/eeprom/fuse. AVA did this,
binutils encodes the name of the output file instead (like a.out.srec)
so it is best to use --segment to be sure.

Marek

From [email-masked] Sun Jan 14 04:58:11 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14HT4D-0005vL-00
for <[email-masked]>; Sun, 14 Jan 2001 04:58:10 +1300
Received: (qmail 9973 invoked from network); 13 Jan 2001 14:13:52 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 13 Jan 2001 14:13:52 -0000
Received: from robi ([193.2.76.192]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with SMTP id AAA19096
for <[email-masked]>; Sat, 13 Jan 2001 15:05:13 +0100
Message-ID: <[email-masked]>
From: [email-masked] (Robert Rozman)
To: "AVR GCC List" <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Subject: [avr-gcc-list] Binaries for win32 - under win98 too ?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 14 11:06:03 2001
X-Original-Date: Sat, 13 Jan 2001 15:16:06 +0100

Hello,

I've installed latest win32 binaries. I tried my project that used to
compile with older Volker Oth's binaries under win98 and win2000.

With new binaries it compiles under win2000, but not under win98
('virtual memory exhausted').

Any advice or experience on that ?

Thanks in advance,

Robert Rozman.

-----Izvorno sporoèilo-----
Od: Gunnar Henne <[email-masked]>
Za: AVR GCC List <[email-masked]>
Datum: 12. januar 2001 9:23
Zadeva: [avr-gcc-list] Binaries for win32 and linux (RPM) available

>Hello,
>
>I have compiled the development tools for both platforms.
>You can download the linux binaries as single tar.gz files for gcc,
>binutils and libc or as a complete RPM, which installs under
>/opt/avrgcc.
>
>For your convenience I created a minimal index.html:
>
>http://combio.de/avr/index.html
>
>Greetings Gunnar
>
>--
>Gunnar Henne Email: [email-masked]
>oTRIs GmbH & Co. KG Tel. : 0231 / 10616-21
>Landgrafenstr. 153 Fax. : 0231 / 10615-44
>44139 Dortmund
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Sun Jan 14 11:33:02 2001
Received: from hawk.prod.itd.earthlink.net ([207.217.120.22])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14HZEL-0007j2-00
for <[email-masked]>; Sun, 14 Jan 2001 11:33:02 +1300
Received: from earthlink.net (1Cust234.tnt1.brownwood.tx.da.uu.net [63.28.230.234])
by hawk.prod.itd.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id OAA20208;
Sat, 13 Jan 2001 14:33:51 -0800 (PST)
Message-ID: <[email-masked]>
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Robert Rozman <[email-masked]>
CC: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Binaries for win32 - under win98 too ?
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 14 11:34:04 2001
X-Original-Date: Sat, 13 Jan 2001 16:32:29 -0600

Robert,

Go to Start -> Settings -> Control Panel -> double-click System Icon ->
click Performance Tab -> click Virtual Memory Button -> click "let me
select my own Virtual Memory settings" button. Then bump up the min/max
settings. The values are based on how much RAM you have, but if you
have plenty of Harddrive space left, double what it says you have now.

Hope this helps. I use Win2000 myself, but I just happen to have a copy
of W98 on my portable.

Dale.

Robert Rozman wrote:
>
> Hello,
>
> I've installed latest win32 binaries. I tried my project that used to
> compile with older Volker Oth's binaries under win98 and win2000.
>
> With new binaries it compiles under win2000, but not under win98
> ('virtual memory exhausted').
>
> Any advice or experience on that ?

From [email-masked] Sun Jan 14 14:48:39 2001
Received: from sttlpop3.sttl.uswest.net ([206.81.192.3])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14HcHd-0007qz-00
for <[email-masked]>; Sun, 14 Jan 2001 14:48:38 +1300
Received: (qmail 20502 invoked by alias); 14 Jan 2001 01:49:29 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 20460 invoked by uid 0); 14 Jan 2001 01:49:28 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop3.sttl.uswest.net with SMTP; 14 Jan 2001 01:49:28 -0000
Message-ID: <000501c07dcc$a32b53e0$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "Dale Seaburg" <[email-masked]>
Cc: <[email-masked]>
References: <[email-masked]> <[email-masked]>
Subject: Re: [avr-gcc-list] Binaries for win32 - under win98 too ?
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 14 14:49:04 2001
X-Original-Date: Sat, 13 Jan 2001 17:52:17 -0800

I have win98 second edition and this doesn't help. It is ironic to think I
might finally "upgrade" to win2000 to make GCC work.

----- Original Message -----
From: "Dale Seaburg" <[email-masked]>

> Robert,
>
> Go to Start -> Settings -> Control Panel -> double-click System Icon ->
> click Performance Tab -> click Virtual Memory Button -> click "let me
> select my own Virtual Memory settings" button. Then bump up the min/max
> settings. The values are based on how much RAM you have, but if you
> have plenty of Harddrive space left, double what it says you have now.
>
> Hope this helps. I use Win2000 myself, but I just happen to have a copy
> of W98 on my portable.
>
> Dale.
>
> Robert Rozman wrote:
> >
> > Hello,
> >
> > I've installed latest win32 binaries. I tried my project that used to
> > compile with older Volker Oth's binaries under win98 and win2000.
> >
> > With new binaries it compiles under win2000, but not under win98
> > ('virtual memory exhausted').
> >

From [email-masked] Sun Jan 14 15:13:39 2001
Received: from swan.prod.itd.earthlink.net ([207.217.120.123])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Hcfq-0007sF-00
for <[email-masked]>; Sun, 14 Jan 2001 15:13:38 +1300
Received: from earthlink.net (1Cust40.tnt1.brownwood.tx.da.uu.net [63.28.230.40])
by swan.prod.itd.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id SAA25973
for <[email-masked]>; Sat, 13 Jan 2001 18:14:29 -0800 (PST)
Message-ID: <[email-masked]>
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: avg-gcc list <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Atmel .asm to avr-as xlator
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 14 15:14:04 2001
X-Original-Date: Sat, 13 Jan 2001 20:13:08 -0600

OK, now that I have my avr-gcc tools working (except for gdb, but I
won't go into that now - it can wait), I have some code examples given
me that were written for the Atmel/IAR assembler. Does anyone have a
utility to translate these files into code that the avr-as will handle?

I hand edited the 8515def.inc file, and now it doesn't cause the avr-as
fits. But, it looks like the next piece of code will be somewhat harder
because of its length, and I don't always know what avr-as is expecting
when it hits a snag in the IAR-compatible file.

Any help or words of wisdom / comments / guffaws? ;-)

Thanks, again.

Dale.

From [email-masked] Sun Jan 14 11:47:25 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14HZSG-0007jx-00
for <[email-masked]>; Sun, 14 Jan 2001 11:47:25 +1300
Received: (qmail 17470 invoked from network); 13 Jan 2001 22:49:49 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 13 Jan 2001 22:49:49 -0000
Received: from robi ([193.2.76.192]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with SMTP id AAA23047;
Sat, 13 Jan 2001 23:41:10 +0100
Message-ID: <[email-masked]>
From: [email-masked] (Robert Rozman)
To: "Dale Seaburg" <[email-masked]>,
"Robert Rozman" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
Subject: Re: [avr-gcc-list] Binaries for win32 - under win98 too ?
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 14 17:46:04 2001
X-Original-Date: Sat, 13 Jan 2001 23:51:59 +0100

Hello,

I did it already before, but also with 128Meg of virtual and 128Meg of real
RAM it didn't work. I just need a word of experience that latest avr-gcc
binaries work under win 98 somewhere else, so I know that I should look for
the problem somewhere else (not win98).

Thanks in advance,

Robert Rozman

-----Izvorno sporoèilo-----
Od: Dale Seaburg <[email-masked]>
Za: Robert Rozman <[email-masked]>
Kp: AVR GCC List <[email-masked]>
Datum: 13. januar 2001 23:29
Zadeva: Re: [avr-gcc-list] Binaries for win32 - under win98 too ?

>Robert,
>
>Go to Start -> Settings -> Control Panel -> double-click System Icon ->
>click Performance Tab -> click Virtual Memory Button -> click "let me
>select my own Virtual Memory settings" button. Then bump up the min/max
>settings. The values are based on how much RAM you have, but if you
>have plenty of Harddrive space left, double what it says you have now.
>
>Hope this helps. I use Win2000 myself, but I just happen to have a copy
>of W98 on my portable.
>
>Dale.
>
>Robert Rozman wrote:
>>
>> Hello,
>>
>> I've installed latest win32 binaries. I tried my project that used to
>> compile with older Volker Oth's binaries under win98 and win2000.
>>
>> With new binaries it compiles under win2000, but not under win98
>> ('virtual memory exhausted').
>>
>> Any advice or experience on that ?
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Sun Jan 14 18:53:05 2001
Received: from snipe.prod.itd.earthlink.net ([207.217.120.62])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Hg6C-000815-00
for <[email-masked]>; Sun, 14 Jan 2001 18:53:04 +1300
Received: from earthlink.net (1Cust92.tnt1.brownwood.tx.da.uu.net [63.28.230.92])
by snipe.prod.itd.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id VAA27464;
Sat, 13 Jan 2001 21:53:55 -0800 (PST)
Message-ID: <[email-masked]>
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Robert Rozman <[email-masked]>
CC: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Binaries for win32 - under win98 too ?
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 14 18:54:04 2001
X-Original-Date: Sat, 13 Jan 2001 23:52:34 -0600

Robert,

I gave you my best shot. It'll have to be someone else on this list who
has far more knowledge than I to answer your question. Sorry.

Dale.

Robert Rozman wrote:
>
> Hello,
>
> I did it already before, but also with 128Meg of virtual and 128Meg of real
> RAM it didn't work. I just need a word of experience that latest avr-gcc
> binaries work under win 98 somewhere else, so I know that I should look for
> the problem somewhere else (not win98).

From [email-masked] Mon Jan 15 03:07:41 2001
Received: from finch-post-12.mail.demon.net ([194.217.242.41])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Hnor-0008JM-00
for <[email-masked]>; Mon, 15 Jan 2001 03:07:41 +1300
Received: from spamtastic.demon.co.uk ([194.222.170.126] helo=benny.spamtastic.demon.co.uk)
by finch-post-12.mail.demon.net with esmtp (Exim 2.12 #1)
id 14Hnpj-000OB1-0C; Sun, 14 Jan 2001 14:08:35 +0000
Received: from smudge.spamtastic.demon.co.uk ([192.168.1.10])
by benny.spamtastic.demon.co.uk with smtp (Exim 3.12 #1 (Debian))
id 14Hnph-0007OH-00; Sun, 14 Jan 2001 14:08:33 +0000
Message-ID: <[email-masked]>
From: "Lee Mitchell" <[email-masked]>
To: "Robert Rozman" <[email-masked]>,
"Dale Seaburg" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Binaries for win32 - under win98 too ?
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Mon Jan 15 03:08:04 2001
X-Original-Date: Sun, 14 Jan 2001 14:09:07 -0000

----- Original Message -----
From: Robert Rozman <[email-masked]>
To: Dale Seaburg <[email-masked]>; Robert Rozman
<[email-masked]>
Cc: AVR GCC List <[email-masked]>
Sent: Saturday, January 13, 2001 10:51 PM
Subject: Re: [avr-gcc-list] Binaries for win32 - under win98 too ?

> Hello,
>
> I did it already before, but also with 128Meg of virtual and 128Meg of
real
> RAM it didn't work. I just need a word of experience that latest avr-gcc
> binaries work under win 98 somewhere else, so I know that I should look
for
> the problem somewhere else (not win98).
>
> Thanks in advance,
>
> Robert Rozman
>

I can confirm that i get the same problem under Win95.
Lee Mitchell
www.spamtastic.demon.co.uk
[email-masked]

From [email-masked] Mon Jan 15 00:15:17 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14Hl81-0008D3-00
for <[email-masked]>; Mon, 15 Jan 2001 00:15:17 +1300
Received: (qmail 26509 invoked from network); 14 Jan 2001 11:17:44 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 14 Jan 2001 11:17:44 -0000
Received: from robi ([193.2.76.192]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with SMTP id AAA26691;
Sun, 14 Jan 2001 12:09:05 +0100
Message-ID: <[email-masked]>
From: [email-masked] (Robert Rozman)
To: "Larry Barello" <[email-masked]>
Cc: <[email-masked]>
Subject: Re: [avr-gcc-list] Binaries for win32 - under win98 too ?
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Mon Jan 15 12:23:03 2001
X-Original-Date: Sun, 14 Jan 2001 12:20:05 +0100

Hello,

I just tell you my experience on thought of upgrading to win2000. It looks
like my 1 year old motherboard (Celeron 333) is one of those, that are on
compatibility list of Win2000, but some drivers don't work. One of them is
IDE driver - so my disks are connected not as (U)DMA but in PIO mode. You
can imagine what this means for CPU !!!

So in the moment, I prefer using older binaries (from Volker OTH) under
win98 and wait for fix other than 'crying' in win2000 when CPU is polling my
disks and doing all the transfers.

Hope this helps.

regards,

Robert Rozman
-----Izvorno sporoèilo-----
Od: Larry Barello <[email-masked]>
Za: Dale Seaburg <[email-masked]>
Kp: [email-masked] <[email-masked]>
Datum: 14. januar 2001 2:58
Zadeva: Re: [avr-gcc-list] Binaries for win32 - under win98 too ?

>I have win98 second edition and this doesn't help. It is ironic to think I
>might finally "upgrade" to win2000 to make GCC work.
>
>----- Original Message -----
>From: "Dale Seaburg" <[email-masked]>
>
>
>> Robert,
>>
>> Go to Start -> Settings -> Control Panel -> double-click System Icon ->
>> click Performance Tab -> click Virtual Memory Button -> click "let me
>> select my own Virtual Memory settings" button. Then bump up the min/max
>> settings. The values are based on how much RAM you have, but if you
>> have plenty of Harddrive space left, double what it says you have now.
>>
>> Hope this helps. I use Win2000 myself, but I just happen to have a copy
>> of W98 on my portable.
>>
>> Dale.
>>
>> Robert Rozman wrote:
>> >
>> > Hello,
>> >
>> > I've installed latest win32 binaries. I tried my project that used to
>> > compile with older Volker Oth's binaries under win98 and win2000.
>> >
>> > With new binaries it compiles under win2000, but not under win98
>> > ('virtual memory exhausted').
>> >
>
>
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Mon Jan 15 10:31:24 2001
Received: from bw150zhb.bluewin.ch ([195.186.1.68])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14HukF-0000Bg-00
for <[email-masked]>; Mon, 15 Jan 2001 10:31:23 +1300
Received: from homepc (bw3-18pub107.bluewin.ch [62.202.18.107])
by bw150zhb.bluewin.ch (8.9.3/8.9.3) with SMTP id WAA08788
for <[email-masked]>; Sun, 14 Jan 2001 22:31:47 +0100 (MET)
Message-ID: <000901c07e71$6c19ac80$6b12ca3e@homepc>
From: "Peter Fleury" <[email-masked]>
To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] avr-gcc problem on Win9x, possible solution
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Mon Jan 15 12:23:17 2001
X-Original-Date: Sun, 14 Jan 2001 22:31:53 +0100

Hi,

I search the cygwin forum for references about this "Virtual memory =
exhausted!" message and I found out from these postings that the same =
error message also happed when GCC 2.97 is used native on Cygwin on
Windows.

From the message
http://sources.redhat.com/ml/cygwin/2000-11/msg01098.html
you can see that it has something to do with memory allocation.

Another message suggests to configure GCC with the following
configure option:
--with-gc=3Dsimple=20
http://sources.redhat.com/ml/cygwin/2000-11/msg01094.html

Maybe Gunnar could try out to compile avr-gcc using the above=20
option.

Regards
Peter

From [email-masked] Mon Jan 15 15:13:05 2001
Received: from hawk.prod.itd.earthlink.net ([207.217.120.22])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Hz8q-0000Mf-00
for <[email-masked]>; Mon, 15 Jan 2001 15:13:04 +1300
Received: from earthlink.net (1Cust219.tnt2.brownwood.tx.da.uu.net [63.26.135.219])
by hawk.prod.itd.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id SAA03140
for <[email-masked]>; Sun, 14 Jan 2001 18:14:00 -0800 (PST)
Message-ID: <[email-masked]>
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: avg-gcc list <[email-masked]>
Subject: Re: [avr-gcc-list] Atmel .asm to avr-as xlator
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Mon Jan 15 15:14:03 2001
X-Original-Date: Sun, 14 Jan 2001 20:12:38 -0600

I thought of another question or two. Where do I find information (FAQ
or HOWTO, perhaps) on how to designate which segment you are in: Code
(.text ?) RAM (.data ?) and EEPROM (?). For that matter, how do you
specify these areas in a C program for the AVR? Code and RAM area I
could see, but how about EEPROM? Suppose you want to load your strings
in the flash area? I assume the C compiler automatically puts all
variables in the .data area (RAM). True? If I knew the answers to
these questions (and a zillion more ;-)), then I could write a small C
program, do avr-gcc -S to capture the assembly and see what avr-as is
expecting.

What is the equivalent of the .def directive, where you want to
equivalence a register to a name?

Also, what syntax is used to specify an origin (.org). What would be
the equivalent of this: .org 0x60 ?

I have hand edited most of the .asm files to conform to avr-as, but I
still have a few things like the above that I don't know how to handle -
I simply don't know the syntax that avr-as expects. If I could just lay
my hands on a good HOWTO or FAQ, maybe I'd not have to ask so many
questions :-)

Thanks for someone taking the time to help me.

Dale.

Dale Seaburg wrote:
>
> OK, now that I have my avr-gcc tools working (except for gdb, but I
> won't go into that now - it can wait), I have some code examples given
> me that were written for the Atmel/IAR assembler. Does anyone have a
> utility to translate these files into code that the avr-as will handle?
>
> I hand edited the 8515def.inc file, and now it doesn't cause the avr-as
> fits. But, it looks like the next piece of code will be somewhat harder
> because of its length, and I don't always know what avr-as is expecting
> when it hits a snag in the IAR-compatible file.
>
> Any help or words of wisdom / comments / guffaws? ;-)
>
> Thanks, again.
>
> Dale.
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Mon Jan 15 15:58:47 2001
Received: from harrier.prod.itd.earthlink.net ([207.217.121.12])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Hzr5-0000OY-00
for <[email-masked]>; Mon, 15 Jan 2001 15:58:47 +1300
Received: from earthlink.net (1Cust219.tnt2.brownwood.tx.da.uu.net [63.26.135.219])
by harrier.prod.itd.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id SAA26164
for <[email-masked]>; Sun, 14 Jan 2001 18:59:43 -0800 (PST)
Message-ID: <[email-masked]>
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: avg-gcc list <[email-masked]>
Subject: Re: [avr-gcc-list] Atmel .asm to avr-as xlator
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Mon Jan 15 15:59:04 2001
X-Original-Date: Sun, 14 Jan 2001 20:58:22 -0600

OK, you probably think I'm crazy by now. Here I am answering my own
email ;-) You're probably saying to me under your breath, RTFM. But, I
say I'm having problems (until now) FTFM (Finding The Fine Manual)!

I found Volker Oth's web-site: http://8bit.at/avr/ "Atmel For Dummys".
It's anything BUT a dummy site. But, then for folks like me, it was a
gold mine... take that anyway you want <G>

I found a few gold nuggets in his FAQ. Also, he has a link to Rich
Neswold's GNU Development Environment for the AVR Microcontroller. A
quick glance through the pages lets me know it's a true gold mine for
anyone serious about programming the AVR with avr-gcc. Excellent! Two
Thumbs Up!

Now I need to shut up and do some serious reading. Besides Rich's
manual, Volker suggests several lib files to look though for syntax
examples, plus his gcctest suite - which I have an early copy, but his
update includes a new one which may explain several of my questions.
Thanks, Volker. Let's hope they answer ALL of my questions.

Once I accomplish my conversion of the .asm avr files in DOS format to
the avr-as format, I plan on documenting what I've learned and
publishing on the list for your reading pleasure (boredom?).

Thanks,

Dale.

Dale Seaburg wrote:
>
> I thought of another question or two. Where do I find information (FAQ
> or HOWTO, perhaps) on how to designate which segment you are in: Code
> (.text ?) RAM (.data ?) and EEPROM (?). For that matter, how do you
> specify these areas in a C program for the AVR? Code and RAM area I
> could see, but how about EEPROM? Suppose you want to load your strings
> in the flash area? I assume the C compiler automatically puts all
> variables in the .data area (RAM). True? If I knew the answers to
> these questions (and a zillion more ;-)), then I could write a small C
> program, do avr-gcc -S to capture the assembly and see what avr-as is
> expecting.
>
> What is the equivalent of the .def directive, where you want to
> equivalence a register to a name?
>
> Also, what syntax is used to specify an origin (.org). What would be
> the equivalent of this: .org 0x60 ?
>
> I have hand edited most of the .asm files to conform to avr-as, but I
> still have a few things like the above that I don't know how to handle -
> I simply don't know the syntax that avr-as expects. If I could just lay
> my hands on a good HOWTO or FAQ, maybe I'd not have to ask so many
> questions :-)
>
> Thanks for someone taking the time to help me.
>
> Dale.
>
> Dale Seaburg wrote:
> >
> > OK, now that I have my avr-gcc tools working (except for gdb, but I
> > won't go into that now - it can wait), I have some code examples given
> > me that were written for the Atmel/IAR assembler. Does anyone have a
> > utility to translate these files into code that the avr-as will handle?
> >
> > I hand edited the 8515def.inc file, and now it doesn't cause the avr-as
> > fits. But, it looks like the next piece of code will be somewhat harder
> > because of its length, and I don't always know what avr-as is expecting
> > when it hits a snag in the IAR-compatible file.
> >
> > Any help or words of wisdom / comments / guffaws? ;-)
> >
> > Thanks, again.
> >
> > Dale.

From [email-masked] Mon Jan 15 23:08:27 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14I6Yp-0000e5-00
for <[email-masked]>; Mon, 15 Jan 2001 23:08:26 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id LAA22717
for <[email-masked]>; Mon, 15 Jan 2001 11:09:17 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Uploaded new binaries for Win98
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Mon Jan 15 23:09:04 2001
X-Original-Date: Mon, 15 Jan 2001 11:09:16 +0100

Hello,

I configured gcc as follows:
$ ./configure --prefix=/avrgcc --exec-prefix=/avrgcc --with-ggc=simple
--enable-languages="c" --with-included-gettext --with-gc=simple
--target=avr

Since I dont have access to a WIN9X machine, I cant test, if it works
now.

If it's still not working, someone else, who has the last stable cygwin
version (1.0), has to compile them.

http://combio.de/avr/avr-gcc-20010108-cygwin.tar.gz
(Old Version overwritten)

Good luck

Gunnar

From [email-masked] Tue Jan 16 00:21:22 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14I7hP-0000gz-00
for <[email-masked]>; Tue, 16 Jan 2001 00:21:20 +1300
Received: (from j@localhost)
by ida.interface-business.de id f0FBMI043881;
Mon, 15 Jan 2001 12:22:18 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
<[email-masked]>
<[email-masked]>
<[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] GCC 3.0 thread
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 00:22:04 2001
X-Original-Date: Mon, 15 Jan 2001 12:22:18 +0100 (MET)

Denis Chertykov <[email-masked]> wrote:

> Use the binutils from CVS.

Well, as i said, i'm reluctant to use too much beta software. I'm
maintaining the avr-* FreeBSD ports, and the general policy there is
to not use beta stuff (or i would have to prepare a second port just
for the beta version, to provide people the option to fall back to
`stable' versions).

>> But what about the internal consistency compilation problems i
>> mentioned? Have they been fixed meanwhile?
>
> You don't point to any real bug.

Hmm, maybe. The old compiler used

__tmp_reg__ = r0

while the new one uses

__tmp_reg__ = 0

Does that mean the current version of the assembler understands the
latter as well as the former as a valid register naming?

(Actually, there was a bug in my report, regarding the number of
parameters to REGISTER_MOVE_COST() being inconsistent between the
machine-dependent .h files and their usage in the machine-independent
..c files. But that might have been a temporary one of that particular
version.)

>> I can't download the full > 10 GB of gcc source code each day, just in
>> order to check whether it's fixed now.
>
> Use CVS. It's really nice.

Well, i know CVS and know it's nice:), we've been using at for FreeBSD
since 1993... But i don't want to become a gcc developer, and it's
not all that practical for daily work (in particular not when used as
remote CVS). I'll give it another try by using one of the snapshot
tarballs for binutils.

>> spasibo bolshoye za otviet!
>
> koi8 for Russian.

Hmm, sorry, i don't have an environment set up for KOI8-R. Also, your
English is certainly way better than my Russian. ;-) Nevermind...

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Tue Jan 16 00:30:02 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14I7po-0000hi-00
for <[email-masked]>; Tue, 16 Jan 2001 00:30:01 +1300
Received: (from j@localhost)
by ida.interface-business.de id f0FBV1c43945;
Mon, 15 Jan 2001 12:31:01 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: uisp - was Re: [avr-gcc-list] Thanks
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 00:31:04 2001
X-Original-Date: Mon, 15 Jan 2001 12:31:01 +0100 (MET)

Marek Michalkiewicz <[email-masked]> wrote:

(FreeBSD's ppi(4) driver.)

> Sounds a lot like the Linux ppdev driver (standard in "soon to be
> stable" 2.4 kernel, not yet in "really stable" 2.2.x but kernel
> patch exists and is also distributed with uisp for convenience).

Yep, i think that's what the guy here in the local newsgroup
mentioned.

> It _is_ now maintained by me. You can get it from

Nice to hear!

> Bug reports and patches are welcome. The Linux ppdev driver is now
> supported. I don't know much about *BSD but I think it shouldn't be
> that hard.

I have to dig up the patches i made. They were for an older version
of the code, so it'll require some work to back-integrate them into
your current work.

> I'll try to see how hard would be to add an option to force device
> type. The chips I have been using so far (2313, 8515, 8535, ATmega163)
> never had this problem, but I have reports about other problems with the
> 1200 as well (it seems the -dno-poll -dno-retry options are required).

Yep, the 1200 requires both those options (where at least one of the
options was undocumented when i looked last time). That is, the specs
for the 1200 say you must never issue the SCK pulsing in order to try
to resynchronize the protocol, so your only chance is to keep both SCK
and /RESET low right from the beginning, before applying Vcc to the
chip. (ISTR that this is problematic with the way uisp handles the
control lines, since the only chance to guarantee this is to leave the
control lines at low level after finishing uisp, so they are low
already before powering up the MCU next time.) Also, unlike the other
chips, the 1200 doesn't echo back the 0x53 in the initialization
sequence, you should merely blindly assume it did accept the init
sequence nevertheless (despite of still reacting with 0xff).

> But I would say that chips that don't report the correct ID are
> seriously broken. Well, we have to support them if there are many
> on the market...

No, they aren't _sold_ that way. New chips do always have the correct
ID. But it seems to be very easy to trash them, i don't have an idea
how it happened exactly, but it happened twice to me during
experiments. I'd assume there's an undocumented programming sequence
that allows programming the chip ID (and i accidentally issued that
sequence while experimenting, perhaps induced by shortcuts in my
circuitry or whatever). I'm afraid Atmel won't tell us, because this
would perhaps allow anybody to arbitrary program the IDs... The chips
are working well despite of the broken ID, so i didn't really destroy
anything inside the chip.

Does anybody have an idea about _whom_ to ask at Atmel for this?

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Tue Jan 16 02:46:12 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14I9xa-0000nP-00
for <[email-masked]>; Tue, 16 Jan 2001 02:46:11 +1300
Received: (qmail 24714 invoked from network); 15 Jan 2001 13:48:42 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 15 Jan 2001 13:48:42 -0000
Received: from fri.uni-lj.si ([193.2.76.118]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with ESMTP id AAA11191;
Mon, 15 Jan 2001 14:40:02 +0100
Message-ID: <[email-masked]>
From: [email-masked] (Robert Rozman)
X-Mailer: Mozilla 4.51 [sl] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: Gunnar Henne <[email-masked]>
CC: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Uploaded new binaries for Win98
References: <[email-masked]>
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 02:47:04 2001
X-Original-Date: Mon, 15 Jan 2001 14:50:02 +0100

Now it works under win95. But only short question :
- eep file seems empty - there is obvious some difference between eeprom in
older volker oth's avr-gcc and new one. Where could one read some
documentation about avr programming with avr-gcc (like older pdf file, that
give quite good description for eeprom, prog memory, interrupts etc) ?

Thanks in advance.

Robert Rozman

Gunnar Henne je napisal:

> Hello,
>
> I configured gcc as follows:
> $ ./configure --prefix=/avrgcc --exec-prefix=/avrgcc --with-ggc=simple
> --enable-languages="c" --with-included-gettext --with-gc=simple
> --target=avr
>
> Since I dont have access to a WIN9X machine, I cant test, if it works
> now.
>
> If it's still not working, someone else, who has the last stable cygwin
> version (1.0), has to compile them.
>
> http://combio.de/avr/avr-gcc-20010108-cygwin.tar.gz
> (Old Version overwritten)
>
> Good luck
>
> Gunnar
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Tue Jan 16 03:24:39 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14IAYo-0000pJ-00
for <[email-masked]>; Tue, 16 Jan 2001 03:24:38 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id PAA16828;
Mon, 15 Jan 2001 15:25:30 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
CC: Robert Rozman <[email-masked]>
Subject: Re: [avr-gcc-list] Uploaded new binaries for Win98
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 03:25:04 2001
X-Original-Date: Mon, 15 Jan 2001 15:25:28 +0100

Hello Robert,

Robert Rozman wrote:
>
> Now it works under win95.

Glad to hear this. :-)

> Where could one read some
> documentation about avr programming with avr-gcc (like older pdf file, that
> give quite good description for eeprom, prog memory, interrupts etc) ?

I suggest trying the way described in the old file. If ist doesn't work
that way look into tho actual avr-libc headers/sources.

Perhaps you want to bring the old document up to date. This would make
many new users happy.

Greetings
Gunnar

From [email-masked] Tue Jan 16 04:54:14 2001
Received: from pop.gmx.net ([194.221.183.20] helo=mail.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14IBxV-0000uq-00
for <[email-masked]>; Tue, 16 Jan 2001 04:54:13 +1300
Received: (qmail 4433 invoked by uid 0); 15 Jan 2001 15:54:41 -0000
Received: from unknown (HELO columbus.gmx.at) (62.140.34.242)
by mail.gmx.net (mp006-rz3) with SMTP; 15 Jan 2001 15:54:41 -0000
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.0.2
To: [email-masked],[email-masked]
From: Thomas Buchta <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: [avr-gcc-list] searching for avr-gcc assembler reference
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 04:55:03 2001
X-Original-Date: Mon, 15 Jan 2001 16:54:04 +0100

>Date: Mon, 15 Jan 2001 16:46:34 +0100
>To: [email-masked], [email-masked]
>From: Thomas Buchta <[email-masked]>
>Subject: searching for avr-gcc assembler
>
>Hello everybody!
>
>Im serching for a documentation or reference list of the avr-gcc
>assembler. Is there any other reference such as the 'AVR for Dummies'
>reference list. Im looking for syntax to generate big macros in assembler
>code and how to call an extern C-function in assembler?
>
>CU
>Thomas
>
>

From [email-masked] Tue Jan 16 04:55:17 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14IByV-0000uz-00
for <[email-masked]>; Tue, 16 Jan 2001 04:55:16 +1300
Received: (from j@localhost)
by ida.interface-business.de id f0FFuDN44665;
Mon, 15 Jan 2001 16:56:13 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]> <[email-masked]>
<[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] Uploaded new binaries for Win98
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 04:56:04 2001
X-Original-Date: Mon, 15 Jan 2001 16:56:13 +0100 (MET)

Gunnar Henne <[email-masked]> wrote:

>> Where could one read some
>> documentation about avr programming with avr-gcc (like older pdf file, that
>> give quite good description for eeprom, prog memory, interrupts etc) ?
>
> I suggest trying the way described in the old file. If ist doesn't work
> that way look into tho actual avr-libc headers/sources.

Try Rich Neswold's documentation:

http://www.enteract.com/~rneswold/avr/avr-lib.pdf

It doesn't cover every detail (for example, i found that he missed
the __attribute((".eeprom")) thing), and it's a little unix-centric,
but it provides a good reference for the library part.

I think Rich is now also following that list here...

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Tue Jan 16 05:11:12 2001
Received: from sttlpop5.sttl.uswest.net ([206.81.192.5])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14ICDw-0000wB-00
for <[email-masked]>; Tue, 16 Jan 2001 05:11:12 +1300
Received: (qmail 10793 invoked by alias); 15 Jan 2001 16:12:05 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 10765 invoked by uid 0); 15 Jan 2001 16:12:04 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop5.sttl.uswest.net with SMTP; 15 Jan 2001 16:12:04 -0000
Message-ID: <008701c07f0e$501cac60$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Suggestion for the list operators
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 05:12:04 2001
X-Original-Date: Mon, 15 Jan 2001 08:13:32 -0800

This may be heretical to the crowd, but here goes anyway: How about moving
this mail list to Egroups.com? I am on several lists and manage a couple on
that server and it works quite well. The BIG advantage is that you can
control your email flow (digest, individual and web only) and it archives
everything. They also have what seems like bullet proof anti-spam.

But wait, there's more! A files section for sharing stuff (limited to 20mb)
and a few other, probably less useful, functions.

Egroups is easy: www.egroups.com, register, create a group, submit a list of
members and you are done. If the moderator of this group does that, then
adds several other members to the moderator list, we shouldn't see the kind
of "information outage" we saw with the old avr-gcc list last fall. If one
person disappears into work, or what-ever, another can take over (not that
there is much to do once the list is set up...)

Cheers!

From [email-masked] Tue Jan 16 05:37:59 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ICdp-0000xu-00
for <[email-masked]>; Tue, 16 Jan 2001 05:37:58 +1300
Received: (from j@localhost)
by ida.interface-business.de id f0FGd2R44790;
Mon, 15 Jan 2001 17:39:02 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] searching for avr-gcc assembler reference
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 05:38:05 2001
X-Original-Date: Mon, 15 Jan 2001 17:39:02 +0100 (MET)

Thomas Buchta <[email-masked]> wrote:

>Im serching for a documentation or reference list of the avr-gcc
>assembler.

There's a documentation for gas (the GNU assembler) available in
texinfo format. You need an `info' browser to read it. Emacs has a
builtin one, there's also a separate tool named `info'. Don't know
about DOS/Windows tools.

>Is there any other reference such as the 'AVR for Dummies'
>reference list. Im looking for syntax to generate big macros in assembler
>code and how to call an extern C-function in assembler?

gas is mainly intended to be a backend assembler for high-level
languages. It doesn't seem to have the ability to use macros.

As for calling an external C function, it's probably best to have a
look into the compiler-generated assembler code.

The other way around might be more suitable: write all the framework
in C, and include your assembler code for time-critical functions
inside a C function as `asm("...");'.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Tue Jan 16 06:01:55 2001
Received: from smtp-out.hamburg.pop.de ([195.222.210.86] ident=mail)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ID10-0000zl-00
for <[email-masked]>; Tue, 16 Jan 2001 06:01:54 +1300
Received: from mail.hamburg.pop.de
([193.98.9.7] helo=mail.provi.de ident=mail)
by smtp-out.hamburg.pop.de with esmtp (Exim 3.20 #1)
id 14ID3B-0003ch-00
for [email-masked]; Mon, 15 Jan 2001 18:04:09 +0100
Received: from [212.79.42.226] (helo=naxos)
by mail.provi.de with smtp (Exim 3.20 #2)
id 14ID1v-0005g6-00
for [email-masked]; Mon, 15 Jan 2001 18:02:51 +0100
From: "Harald Kipp" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Reply-To: "Harald Kipp" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 2.00.1500 for OS/2 Warp 4.00
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <[email-masked]>
Subject: [avr-gcc-list] vararg bug?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 06:02:04 2001
X-Original-Date: Mon, 15 Jan 2001 18:03:16 +0100 (MEZ)

As this is my first appearence in this list, I'd
like to say hello to everybody. Being born and
living in Germany, my English might be a little
bit unpolished, but I'll try my very best. :-)

The topic: Using the Win32 port of 2.95.2,
I discovered a problem. Assume

int f2(a1, ...)
{
/* Some code */
}

int f1(b1)
{
/* Some code */
f2(x1, x2, x3);
ret y1;
}

int main(void)
{
/* Some code */
w1 = f1(z1);
}

Sometimes(!) it happened, that w1 is not y1.
After I checked the assembler output, I found,
that the compiler corrects the stack pointer
before returning from f1(), BUT AFTER the result
has been stored in R24:R25. The problem is, that
sometimes R24 or R25 is used for the stack pointer
update, which destroys the previously stored
result.

I tried to figure out, how the compiler selects
the register for the stack correction - without
any success.

Any ideas?

Btw., of course I asked Volker Oth, but he never
heard anything about this problem.

From [email-masked] Tue Jan 16 04:46:05 2001
Received: from [62.140.34.242] (helo=sfg.motion.at ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14IBpc-0000tu-00
for <[email-masked]>; Tue, 16 Jan 2001 04:46:04 +1300
Received: (qmail 18870 invoked from network); 15 Jan 2001 15:43:35 -0000
Received: from unknown (HELO columbus.stud4.tuwien.ac.at) (192.168.1.71)
by sfg.motion.at with SMTP; 15 Jan 2001 15:43:35 -0000
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.0.2
To: [email-masked],[email-masked]
From: Thomas Buchta <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: [avr-gcc-list] searching for avr-gcc assembler
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 08:49:06 2001
X-Original-Date: Mon, 15 Jan 2001 16:46:34 +0100

Hello everybody!

Im serching for a documentation or reference list of the avr-gcc assembler.
Is there any other reference such as the 'AVR for Dummies' reference list.
Im looking for syntax to generate big macros in assembler code and how to
call an extern C-function in assembler?

CU
Thomas

From [email-masked] Tue Jan 16 07:16:57 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14IEBb-00017Z-00
for <[email-masked]>; Tue, 16 Jan 2001 07:16:56 +1300
Received: (from rneswold@localhost)
by drmemory.fnal.gov (8.9.3/8.9.3) id MAA20600
for [email-masked]; Mon, 15 Jan 2001 12:17:50 -0600 (CST)
(envelope-from rneswold)
From: Rich Neswold <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] Uploaded new binaries for Win98
Message-ID: <[email-masked]>
Reply-To: [email-masked]
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Mon, Jan 15, 2001 at 04:56:13PM +0100
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.0-STABLE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 08:49:23 2001
X-Original-Date: Mon, 15 Jan 2001 12:17:50 -0600

Wasn't it 15-Jan-2001, at 04:56PM, when J Wunsch said:
> Try Rich Neswold's documentation:
>
> http://www.enteract.com/~rneswold/avr/avr-lib.pdf

Thanks for the plug! :-)

> It doesn't cover every detail (for example, i found that he missed
> the __attribute((".eeprom")) thing), and it's a little unix-centric,
> but it provides a good reference for the library part.

On page 21 of the document, I mention

__attribute__((section (".eeprom")))

Is this what you mean? Is there a slightly shorter format (the one you
mentioned)? Or did you forget the section keyword?

I'll update the document accordingly, although it does show one method of
setting up EEPROM variables.

--
Rich Neswold

efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

From [email-masked] Tue Jan 16 08:54:39 2001
Received: from smtp-out.hamburg.pop.de ([195.222.210.86] ident=mail)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14IFiB-0001Cr-00
for <[email-masked]>; Tue, 16 Jan 2001 08:54:39 +1300
Received: from mail.hamburg.pop.de
([193.98.9.7] helo=mail.provi.de ident=mail)
by smtp-out.hamburg.pop.de with esmtp (Exim 3.20 #1)
id 14IFkP-0006Qr-00
for [email-masked]; Mon, 15 Jan 2001 20:56:57 +0100
Received: from [212.79.42.226] (helo=naxos)
by mail.provi.de with smtp (Exim 3.20 #2)
id 14IFj9-0002D9-00
for [email-masked]; Mon, 15 Jan 2001 20:55:39 +0100
From: "Harald Kipp" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Reply-To: "Harald Kipp" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 2.00.1500 for OS/2 Warp 4.00
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <[email-masked]>
Subject: [avr-gcc-list] eeprom bytes swapped?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 08:55:04 2001
X-Original-Date: Mon, 15 Jan 2001 20:55:34 +0100 (MEZ)

Define:

char ee_str[] __attribute__ ((section(".eeprom"))) = "EEPROM String";
int ee_int __attribute__ ((section(".eeprom"))) = 0x1234;

All bytes are swapped. Printing the string using

ch = eeprom_rb((uint16_t)(&ee_str[i]))

for each character will print "EERPMOS rtni".

Reading the int

eeprom_rw((uint16_t)(&ee_int))

will return 0x3412.

What am I doing wrong?

Harald Kipp

From [email-masked] Tue Jan 16 11:04:54 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14IHkD-0001IU-00
for <[email-masked]>; Tue, 16 Jan 2001 11:04:54 +1300
Received: (qmail 4962 invoked from network); 15 Jan 2001 22:07:28 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 15 Jan 2001 22:07:28 -0000
Received: from robi ([193.2.76.192]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with SMTP id AAA17007
for <[email-masked]>; Mon, 15 Jan 2001 22:58:47 +0100
Message-ID: <[email-masked]>
From: [email-masked] (Robert Rozman)
To: <[email-masked]>
Subject: Re: [avr-gcc-list] Uploaded new binaries for Win98
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 11:05:04 2001
X-Original-Date: Mon, 15 Jan 2001 23:09:56 +0100

Hello,

I should be more specific about my problem. Under 'volker' avr-gcc I've
developed program and it goes OK (also there are some predefined eeprom
variables). But when I compile it with latest avr-gcc, reading .eep file
into uisp shows that it is empty.

I'd kindly ask for some advice (it should be some small thing that may be
changed in new avr-gcc). I do definitions in this way:

typedef struct {
int serial_num;
char name[MAX_NAME];
char address;
char status;
char operations; } node_par;

node_par podatki __attribute__ ((section (".eeprom"))) =
{SERIAL_NUM,"noname",'1',some_char, some_char};

Thanks in advance,

Robert Rozman

-----Izvorno sporoèilo-----
Od: Rich Neswold <[email-masked]>
Za: [email-masked] <[email-masked]>
Datum: 15. januar 2001 20:44
Zadeva: Re: [avr-gcc-list] Uploaded new binaries for Win98

>Wasn't it 15-Jan-2001, at 04:56PM, when J Wunsch said:
>> Try Rich Neswold's documentation:
>>
>> http://www.enteract.com/~rneswold/avr/avr-lib.pdf
>
>Thanks for the plug! :-)
>
>> It doesn't cover every detail (for example, i found that he missed
>> the __attribute((".eeprom")) thing), and it's a little unix-centric,
>> but it provides a good reference for the library part.
>
>On page 21 of the document, I mention
>
> __attribute__((section (".eeprom")))
>
>Is this what you mean? Is there a slightly shorter format (the one you
>mentioned)? Or did you forget the section keyword?
>
>I'll update the document accordingly, although it does show one method of
>setting up EEPROM variables.
>
>--
> Rich Neswold
>
> efax: 1.240.536.7092
> web: www.enteract.com/~rneswold/
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Tue Jan 16 11:46:40 2001
Received: from sttlpop5.sttl.uswest.net ([206.81.192.5])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14IIOc-0001KR-00
for <[email-masked]>; Tue, 16 Jan 2001 11:46:39 +1300
Received: (qmail 6972 invoked by alias); 15 Jan 2001 22:47:35 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 6495 invoked by uid 0); 15 Jan 2001 22:47:24 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop5.sttl.uswest.net with SMTP; 15 Jan 2001 22:47:24 -0000
Message-ID: <010801c07f45$8996b440$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Floating point support in latest GCC
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 11:47:04 2001
X-Original-Date: Mon, 15 Jan 2001 14:50:16 -0800

Hat's off to Gunnar for making working Win9x binaries available.

The stuff I downloaded from Gunnar didn't include source for the various
support libraries - was that an oversight? Or am I suppose to get that
source from somewhere else? I need to compile the fp library + re-compile
all other lib's so the avrobj stuff will work. I have all the source from
the Volker Oth's distribution, but question whether I should attempt to use
it, or spend my time looking for newer stuff.

Thanks.

From [email-masked] Tue Jan 16 12:17:54 2001
Received: from roar.music.columbia.edu ([128.59.195.116])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14IIsr-0001Mx-00
for <[email-masked]>; Tue, 16 Jan 2001 12:17:53 +1300
Received: from music.columbia.edu (IDENT:[email-masked] [128.59.116.34])
by roar.music.columbia.edu (8.11.0/8.11.0) with ESMTP id f0FNIvc16222
for <[email-masked]>; Mon, 15 Jan 2001 18:18:57 -0500
Message-ID: <[email-masked]>
From: douglas irving repetto <[email-masked]>
X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] hello world
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 12:18:04 2001
X-Original-Date: Mon, 15 Jan 2001 18:17:08 -0500

hi,

i've been using avrstudio on windows for awhile, but would like to move
my avr work to linux and start doing some work in C instead of asm.
however, i'm finding it difficult to figure out where to start, and i
can't find some basic info on the web. i've found the installation
guides, but not the how-tos. i

could someone post a simple step-by step explanation of how to go from a
simple C program (LED flashing or something) to running that program on
an avr chip? that probably sounds like a stupid request, but it would
really be helpful, and i imagine there are others that would benefit
from such a thing...

e.g.:

//helloworld.c
void main ()
{

//here's how you blink an LED
blinkit();
blah blah blah
}

void blinkit()
{
blah blah blah
}

-----

> gcc helloworld.c -o helloworld -lblahblahblah

-----

etc.

i've just downloaded and installed the rpm packages. i'm on a RH6.2 box,
but have access to other configs if needed. i have an old atmel AVR
board and a new STK200.

of course, if this already exists and i've missed, i'd love to have a
link!

thanks a lot,
douglas

--
douglas irving repetto
http://music.columbia.edu/~douglas
http://shoko.calarts.edu/musicdsp
http://music.columbia.edu/cmc/dorkbotnyc

From [email-masked] Tue Jan 16 13:56:18 2001
Received: from smtp.tor.axxent.ca ([209.250.128.26] helo=mail.tor.axxent.ca)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14IKQ4-0001S2-00
for <[email-masked]>; Tue, 16 Jan 2001 13:56:17 +1300
Received: from localhost (dns03.tor.axxent.ca [209.250.128.6])
by mail.tor.axxent.ca (8.11.0/8.9.3) with ESMTP id f0G0v8h18653;
Mon, 15 Jan 2001 19:57:08 -0500 (EST)
Received: by localhost (Postfix, from userid 41217)
id A35C34891D; Mon, 15 Jan 2001 19:57:07 -0500 (EST)
To: [email-masked], [email-masked]
From: [email-masked]
Subject: RE: [avr-gcc-list] hello world
Mime-Version: 1.0
Content-Type: multipart/mixed;
boundary="-----------------------------7d11d173e1c006e"
Message-Id: <20010116005707.A35C34891D@localhost>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 13:57:04 2001
X-Original-Date: Mon, 15 Jan 2001 19:57:07 -0500 (EST)

This is ...

-------------------------------7d11d173e1c006e
Content-Type: text/plain;
charset="iso-8859-1"

Check out

http://avr.jpk.co.nz

it has on the "Tools" page, links to various pages which have
the information you are looking for.

This mailing list also has a link to the archives, on the
sign up page which may be of help.

Cheers
Carl

|
|
| i've been using avrstudio on windows for awhile, but would like to move
| my avr work to linux and start doing some work in C instead of asm.
| however, i'm finding it difficult to figure out where to start, and i
| can't find some basic info on the web. i've found the installation
| guides, but not the how-tos. i
|
| could someone post a simple step-by step explanation of how to go from a
| simple C program (LED flashing or something) to running that program on
| an avr chip? that probably sounds like a stupid request, but it would
| really be helpful, and i imagine there are others that would benefit
| from such a thing...
|
|
| e.g.:
|
| //helloworld.c
| void main ()
| {
|
| //here's how you blink an LED
| blinkit();
| blah blah blah
| }
|
| void blinkit()
| {
| blah blah blah
| }
|
| -----
|
| > gcc helloworld.c -o helloworld -lblahblahblah
|
| -----
|
| etc.
|
| i've just downloaded and installed the rpm packages. i'm on a RH6.2 box,
| but have access to other configs if needed. i have an old atmel AVR
| board and a new STK200.
|
| of course, if this already exists and i've missed, i'd love to have a
| link!
|
| thanks a lot,
| douglas
|
| --
| douglas irving repetto
| http://music.columbia.edu/~douglas
| http://shoko.calarts.edu/musicdsp
| http://music.columbia.edu/cmc/dorkbotnyc
|
| _______________________________________________
| avr-gcc-list mailing list
| [email-masked]
| http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
| .
|

.

From [email-masked] Tue Jan 16 15:40:04 2001
Received: from roar.music.columbia.edu ([128.59.195.116])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14IM2V-0001XY-00
for <[email-masked]>; Tue, 16 Jan 2001 15:40:04 +1300
Received: from localhost (douglas@localhost)
by roar.music.columbia.edu (8.11.0/8.11.0) with ESMTP id f0G2f5117792;
Mon, 15 Jan 2001 21:41:05 -0500
From: douglas irving repetto <[email-masked]>
To: <[email-masked]>
cc: <[email-masked]>
Subject: RE: [avr-gcc-list] hello world
In-Reply-To: <20010116005707.A35C34891D@localhost>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 15:41:03 2001
X-Original-Date: Mon, 15 Jan 2001 21:41:05 -0500 (EST)

thanks carl, there's some very helpful stuff there!

sadly the most promising looking document, avr-lib.pdf still has most of
the basic things (like making a project, downloading the code to a device,
etc.) on the todo list...the things outlined on page 11, "Using the GNU
Tools" are exactly what i'm looking for! i'll write to the author to see
if he's made any progress.

thanks,
douglas

On Mon, 15 Jan 2001 [email-masked] wrote:

> Check out
>
> http://avr.jpk.co.nz
>
> it has on the "Tools" page, links to various pages which have
> the information you are looking for.
>
> This mailing list also has a link to the archives, on the
> sign up page which may be of help.
>
> Cheers
> Carl

--
douglas irving repetto
http://music.columbia.edu/~douglas
http://shoko.calarts.edu/musicdsp
http://music.columbia.edu/cmc/dorkbotnyc

From [email-masked] Tue Jan 16 20:54:22 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14IQwf-0001mV-00
for <[email-masked]>; Tue, 16 Jan 2001 20:54:22 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id IAA22054;
Tue, 16 Jan 2001 08:55:13 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: Larry Barello <[email-masked]>
CC: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Floating point support in latest GCC
References: <010801c07f45$8996b440$0200000a@larry>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 20:55:04 2001
X-Original-Date: Tue, 16 Jan 2001 08:55:12 +0100

Hello Larry,

Larry Barello schrieb:
>
> Hat's off to Gunnar for making working Win9x binaries available.

It wasn't that hard, the hint for the Win9X adaption came from this
list.

>
> The stuff I downloaded from Gunnar didn't include source for the various
> support libraries - was that an oversight?

No, I left off the sources intentionally. There are the original places
where you can download the latest sources. Seems, the locations should
go into a FAQ.

> I need to compile the fp library + re-compile
> all other lib's so the avrobj stuff will work.

Isn't the fp library now part of the avr-libc?
Why do you have to recompile to get AvrStudio to work?
I have by now not managed to debug an avr-gcc program using AvrStudio.
Perhaps you can send me a small working example, if you get it to work.

> I have all the source from
> the Volker Oth's distribution, but question whether I should attempt to use
> it, or spend my time looking for newer stuff.

The stuff from Volker Oth is quite outdated, as far as I know.

Greetings

Gunnar

From [email-masked] Tue Jan 16 20:58:56 2001
Received: from mail.tps.de ([195.126.171.2] ident=daemon)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14IR14-0001n1-00
for <[email-masked]>; Tue, 16 Jan 2001 20:58:55 +1300
Received: (from daemon@localhost)
by mail.tps.de (8.8.7/8.8.7) id IAA06646
for <[email-masked]>; Tue, 16 Jan 2001 08:59:53 +0100
Received: from UNKNOWN(193.96.199.65), claiming to be "goepplinux"
via SMTP by mail.tps.de, id smtpda06642; Tue Jan 16 08:58:52 2001
From: Matthias G?ppner <[email-masked]>
Organization: TSP
To: AVR GCC List <[email-masked]>
X-Mailer: KMail [version 1.0.21]
Content-Type: text/plain
MIME-Version: 1.0
Message-Id: <01011519053900.01266@goepplinux>
Content-Transfer-Encoding: 8bit
Subject: [avr-gcc-list] How to create an avr COF object file
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 20:59:04 2001
X-Original-Date: Mon, 15 Jan 2001 18:54:29 +0100

Hello,

does anybody know how to convert an avr object file supported by avr-objdump
(elf32-avr ...) into cof format (common object file format) to use it with the
simulator in avr-studio 3.0 ?

Thanks
Matthias

--
TSP - Teleprocessing Systems & Products mbH
Matthias Goeppner [email-masked]
Altenreuth 5 95326 Kulmbach - Germany
phone: +49 9221 804253 fax : +49 9221 8219015

From [email-masked] Tue Jan 16 21:08:49 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14IRAd-0001o7-00
for <[email-masked]>; Tue, 16 Jan 2001 21:08:48 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id JAA23134;
Tue, 16 Jan 2001 09:09:48 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: Matthias G?ppner <[email-masked]>
CC: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] How to create an avr COF object file
References: <01011519053900.01266@goepplinux>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 21:09:04 2001
X-Original-Date: Tue, 16 Jan 2001 09:09:47 +0100

Hello Matthias,

Matthias G?ppner schrieb:
> does anybody know how to convert an avr object file supported by avr-objdump
> (elf32-avr ...) into cof format (common object file format) to use it with the
> simulator in avr-studio 3.0 ?

Download the avr-binutils with avrobj patch included from my site:
http://www.combio.de/avr/index.html

the avr-objcopy understands the option "-O avrobj".

Unfortunately I have by now no success in building a project debuggable
with AvrStudio. :-(

Greetings
Gunnar

--
Gunnar Henne Email: [email-masked]
oTRIs GmbH & Co. KG Tel. : 0231 / 10616-21
Landgrafenstr. 153 Fax. : 0231 / 10615-44
44139 Dortmund

From [email-masked] Tue Jan 16 21:13:45 2001
Received: from pop.gmx.net ([194.221.183.20] helo=mail.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14IRFR-0001of-00
for <[email-masked]>; Tue, 16 Jan 2001 21:13:45 +1300
Received: (qmail 27197 invoked by uid 0); 16 Jan 2001 08:14:11 -0000
Received: from unknown (HELO columbus.gmx.at) (62.140.34.242)
by mail.gmx.net (mp012-rz3) with SMTP; 16 Jan 2001 08:14:11 -0000
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.0.2
To: [email-masked]
From: Thomas Buchta <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"; format=flowed
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] (no subject)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 21:14:04 2001
X-Original-Date: Tue, 16 Jan 2001 09:13:50 +0100

Thanks to J=F6rg Wunsch and Heinrich Vermeulen for information on AVR-gcc=20
assembler reference stuff.

CU
Thomas Buchta

From [email-masked] Tue Jan 16 21:52:17 2001
Received: from netti.nic.fi ([212.38.224.82])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14IRqh-0001rB-00
for <[email-masked]>; Tue, 16 Jan 2001 21:52:16 +1300
Received: (qmail 4158 invoked by uid 101); 16 Jan 2001 10:52:58 +0200
Message-ID: <[email-masked]>
To: <[email-masked]>
Subject: RE: [avr-gcc-list] hello world
From: <[email-masked]>
X-Mailer: TWIG 2.6.0.cvs
In-Reply-To: <[email-masked]>
X-Client-IP: 193.65.100.101
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 21:53:04 2001
X-Original-Date: Tue, 16 Jan 2001 08:52:58 -0000

I've also browsed the Web for good docs about avr-gcc ....
not much luck so far :-(
I followed the doc you mentioned (avr-lib.pdf) to setup
avr-gcc / binutils / libc on my linux box and downloaded the gcctest package from :
http://8bit.at/avr/

Using that, and a lot of Trial And Error, I now feel quite
comfortable with the tools :-) ???

For programming my STK-200 I use the SW found here :
http://www.cnhtech.com/~avr1/

BR Johan

douglas irving repetto <[email-masked]> wrote:
>
> thanks carl, there's some very helpful stuff there!
>
> sadly the most promising looking document, avr-lib.pdf still has most of
> the basic things (like making a project, downloading the code to a device,
> etc.) on the todo list...the things outlined on page 11, "Using the GNU
> Tools" are exactly what i'm looking for! i'll write to the author to see
> if he's made any progress.
>
> thanks,
> douglas
>
>
> On Mon, 15 Jan 2001 [email-masked] wrote:
>
> > Check out
> >
> > http://avr.jpk.co.nz
> >
> > it has on the "Tools" page, links to various pages which have
> > the information you are looking for.
> >
> > This mailing list also has a link to the archives, on the
> > sign up page which may be of help.
> >
> > Cheers
> > Carl
>
> --
> douglas irving repetto
> http://music.columbia.edu/~douglas
> http://shoko.calarts.edu/musicdsp
> http://music.columbia.edu/cmc/dorkbotnyc
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

--

________________________________________________________________
Ilmainen Internet @ http://www.nic.fi/

From [email-masked] Tue Jan 16 22:07:31 2001
Received: from odin.he.net ([216.218.181.2])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14IS5S-0001sD-00
for <[email-masked]>; Tue, 16 Jan 2001 22:07:30 +1300
Received: from jpk1 (adsl-200.world-net.co.nz [210.55.228.200]) by odin.he.net (8.8.6/8.8.2) with SMTP id BAA03818 for <[email-masked]>; Tue, 16 Jan 2001 01:08:32 -0800
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: Windows Eudora Light Version 1.5.2
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: [avr-gcc-list] Tutorial: Inline asm with gcc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 22:08:04 2001
X-Original-Date: Tue, 16 Jan 2001 01:08:32 -0800

For those asking questions about in-line asm etc, see

http://www.uwsg.iu.edu/hypermail/linux/kernel/9804.2/0818.html

for a real good intro to inline asm with gcc. It's 80x86 but still relevant
to the avr port of gcc.

Cheers,

Jason Kyle

From [email-masked] Tue Jan 16 23:18:20 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ITBy-0001vp-00
for <[email-masked]>; Tue, 16 Jan 2001 23:18:18 +1300
Received: (from j@localhost)
by ida.interface-business.de id f0GAJNL51134;
Tue, 16 Jan 2001 11:19:23 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]> <[email-masked]>
<[email-masked]>
<[email-masked]>
<[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] Uploaded new binaries for Win98
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 23:19:04 2001
X-Original-Date: Tue, 16 Jan 2001 11:19:23 +0100 (MET)

Rich Neswold <[email-masked]> wrote:

> On page 21 of the document, I mention
>
> __attribute__((section (".eeprom")))

Ooops! Sorry, i've missed that one!

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Tue Jan 16 23:39:24 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ITWM-0001xM-00
for <[email-masked]>; Tue, 16 Jan 2001 23:39:23 +1300
Received: (from j@localhost)
by ida.interface-business.de id f0GAeUB51189;
Tue, 16 Jan 2001 11:40:30 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <20010116005707.A35C34891D@localhost>
<[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] hello world
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 23:40:03 2001
X-Original-Date: Tue, 16 Jan 2001 11:40:30 +0100 (MET)

douglas irving repetto <[email-masked]> wrote:

> sadly the most promising looking document, avr-lib.pdf still has
> most of the basic things (like making a project, downloading the
> code to a device, etc.) on the todo list...the things outlined on
> page 11, "Using the GNU Tools" are exactly what i'm looking for!
> i'll write to the author to see if he's made any progress.

Since Rich's documentation was such a good help to me in getting
started, i decided to spend some time and contribute him one if his
`to-do' items. This still doesn't provide a step-by-step instruction
list, but basically the Makefile i recently posted here (which gets
you everything except the actual download to the part, since that
detail heavily depends on your programming software and hardware),
plus a circuit picture, plus a very very simple (simple-demo.c, that's
really a ``Hello world!'' style one), plus a more sophisticated demo
that extends the basic demo to something that demonstrates most of the
concepts used by avr-gcc and avr-libc within a single gimmick.

I expect Rich to integrate this into his document as his time permits.
For the time being, you can find it at

ftp://ftp.ifbus.de/pub/j_wunsch/avr-demo.tar.gz

Please don't announce that URL anywhere on a Web site, i'll remove the
file again once Rich has updated his documentation. Also, don't be
worried that you aren't allowed to read that directory (i. e. you
can't list the contents), downloading should work anyway.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Tue Jan 16 23:49:57 2001
Received: from odin.he.net ([216.218.181.2])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ITgb-0001yp-00
for <[email-masked]>; Tue, 16 Jan 2001 23:49:57 +1300
Received: from jpk1 (adsl-200.world-net.co.nz [210.55.228.200]) by odin.he.net (8.8.6/8.8.2) with SMTP id CAA14056 for <[email-masked]>; Tue, 16 Jan 2001 02:50:58 -0800
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: Windows Eudora Light Version 1.5.2
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] Suggestion for the list operators
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 16 23:50:04 2001
X-Original-Date: Tue, 16 Jan 2001 02:50:58 -0800

Larry,

At 08:13 15/01/01 -0800, you wrote:
>This may be heretical to the crowd, but here goes anyway: How about moving
>this mail list to Egroups.com? I am on several lists and manage a couple on
>that server and it works quite well. The BIG advantage is that you can
>control your email flow (digest, individual and web only) and it archives
>everything. They also have what seems like bullet proof anti-spam.

Perhaps a vist to GNU mailman's home might enlighten you to it's
capabilities http://www.lists.org
I see nothing you mention as BIG advantages that mailman doesn't already
provide, with perhaps the exception of web based mail posting - although if
it was worth having it's not impossible to add to the server... but it's an
email list!
Spam is very carefully controlled too, so are accidental mail loops etc.

>But wait, there's more! A files section for sharing stuff (limited to 20mb)
>and a few other, probably less useful, functions.

You said it, probably less useful :) Just took a look at the avr egroup, 2
files and 5 links (1 non-commercial) are all that has accumulated in over 2
years, sums it up nicely. 20MB is probably enough for sample code files
etc, but as noted on the sign-up page for the avr-gcc-list we have an ftp
site for this kind of thing. Over time i'm sure we will collect code
examples and other goodies in a structured manner.

>Egroups is easy: www.egroups.com, register, create a group, submit a list of
>members and you are done. If the moderator of this group does that, then
>adds several other members to the moderator list, we shouldn't see the kind
>of "information outage" we saw with the old avr-gcc list last fall. If one
>person disappears into work, or what-ever, another can take over (not that
>there is much to do once the list is set up...)

Go read the terms and conditions for egroups. I carefully considered using
egroups or listbot before deciding to setup a private system. The events
that led to the demise of medo.fov.uni-mb.si/mapp and it's mailing list
(it's back online now but minus the mailing list) were unfortunate but not
catastrophic as you can see by the mailing list you are subscribed to now.
If there comes a time when for reasons way out of my control the mailing
list looks like it will cease to exist I will ensure the relevent
information is passed onto an appropriate successor. Under prolonged
absence conditions list administration duties would be passed onto another
list member, secure list admin via https is available.

Egroups make no commitment at all to even provide service beyond today and
with the way these companies are traded for what I can only describe as
their "private" information (your deatails) it would not surprise me if the
situation changed one day, it's a commercial operation. The Atmel list on
listbot.com has advertising messages tagged to the *top* of many emails and
according to the egroups T&C they can do it too, although listbot do allow
you to have them removed by paying a fee. There's no such thing as a free
lunch!

In the interests of democracy I would move this list to egroups or similar
if the majority of subscribers considered it to be sensible.

Kind Regards,

Jason Kyle
avr-gcc-list administrator

From [email-masked] Wed Jan 17 01:09:08 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14IUvB-000242-00
for <[email-masked]>; Wed, 17 Jan 2001 01:09:06 +1300
Received: (from j@localhost)
by ida.interface-business.de id f0GCA9b51492;
Tue, 16 Jan 2001 13:10:09 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <20010116005707.A35C34891D@localhost>
<[email-masked]>
<[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] hello world
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 17 01:10:04 2001
X-Original-Date: Tue, 16 Jan 2001 13:10:09 +0100 (MET)

[email-masked] (J Wunsch) wrote:

> I expect Rich to integrate this into his document as his time permits.
> For the time being, you can find it at
>
> ftp://ftp.ifbus.de/pub/j_wunsch/avr-demo.tar.gz

For those of you who can't display the Postscript file (i'm seeing
some Internet Explorer users among those who downloaded the archive by
now), i've converted the circuit picture into PDF as well:

ftp://ftp.ifbus.de/pub/j_wunsch/demo-avr.pdf

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Wed Jan 17 09:43:09 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Icwb-0002bD-00
for <[email-masked]>; Wed, 17 Jan 2001 09:43:06 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.171])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id XAA29694;
Tue, 16 Jan 2001 23:43:59 +0300
To: "Harald Kipp" <[email-masked]>
Cc: "[email-masked]" <[email-masked]>
Subject: Re: [avr-gcc-list] vararg bug?
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
In-Reply-To: "Harald Kipp"'s message of "Mon, 15 Jan 2001 18:03:16 +0100 (MEZ)"
Message-ID: <[email-masked]>
Lines: 12
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 17 09:44:04 2001
X-Original-Date: 16 Jan 2001 23:36:40 +0300

"Harald Kipp" <[email-masked]> writes:

> Sometimes(!) it happened, that w1 is not y1.
> After I checked the assembler output, I found,
> that the compiler corrects the stack pointer
> before returning from f1(), BUT AFTER the result
> has been stored in R24:R25. The problem is, that
> sometimes R24 or R25 is used for the stack pointer
> update, which destroys the previously stored
> result.

Send me a normal testcase.

From [email-masked] Wed Jan 17 09:43:21 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Icwo-0002bK-00
for <[email-masked]>; Wed, 17 Jan 2001 09:43:19 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.171])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id XAA29710;
Tue, 16 Jan 2001 23:44:15 +0300
To: [email-masked] (Joerg Wunsch)
Cc: [email-masked]
Subject: Re: [avr-gcc-list] searching for avr-gcc assembler reference
References: <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
In-Reply-To: [email-masked]'s message of "Mon, 15 Jan 2001 17:39:02 +0100 (MET)"
Message-ID: <[email-masked]>
Lines: 10
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 17 09:44:22 2001
X-Original-Date: 16 Jan 2001 23:36:57 +0300

[email-masked] (J Wunsch) writes:

> gas is mainly intended to be a backend assembler for high-level
> languages. It doesn't seem to have the ability to use macros.

You wrong.
gas have a macros.

Also you can try to use `gasp' - Gnu Assembler Macro Preprocessor.

From [email-masked] Wed Jan 17 09:43:54 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14IcxL-0002bP-00
for <[email-masked]>; Wed, 17 Jan 2001 09:43:52 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.171])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id XAA29767;
Tue, 16 Jan 2001 23:44:43 +0300
To: [email-masked] (Joerg Wunsch)
Cc: [email-masked]
Subject: Re: [avr-gcc-list] GCC 3.0 thread
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
In-Reply-To: [email-masked]'s message of "Mon, 15 Jan 2001 12:22:18 +0100 (MET)"
Message-ID: <[email-masked]>
Lines: 43
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 17 09:44:39 2001
X-Original-Date: 16 Jan 2001 23:37:25 +0300

[email-masked] (J Wunsch) writes:

> >> But what about the internal consistency compilation problems i
> >> mentioned? Have they been fixed meanwhile?
> >
> > You don't point to any real bug.
>
> Hmm, maybe. The old compiler used
>
> __tmp_reg__ = r0
>
> while the new one uses
>
> __tmp_reg__ = 0
>
> Does that mean the current version of the assembler understands the
> latter as well as the former as a valid register naming?

Current avr-as understands `__tmp_reg__ = 0' and
(for example) `mov __tmp_reg__, r29'.

> (Actually, there was a bug in my report, regarding the number of
> parameters to REGISTER_MOVE_COST() being inconsistent between the
> machine-dependent .h files and their usage in the machine-independent
> ..c files. But that might have been a temporary one of that particular
> version.)

Show me a code examples and GCC version.

> >> I can't download the full > 10 GB of gcc source code each day, just in
> >> order to check whether it's fixed now.
> >
> > Use CVS. It's really nice.
>
> Well, i know CVS and know it's nice:), we've been using at for FreeBSD
> since 1993... But i don't want to become a gcc developer, and it's
> not all that practical for daily work (in particular not when used as
> remote CVS). I'll give it another try by using one of the snapshot
> tarballs for binutils.

Are you sure than you use a latest binutils (not a 2.10 branch).

Denis.

From [email-masked] Thu Jan 18 01:20:45 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14IrZz-0003SJ-00
for <[email-masked]>; Thu, 18 Jan 2001 01:20:43 +1300
Received: (from j@localhost)
by ida.interface-business.de id f0HCLfP59073;
Wed, 17 Jan 2001 13:21:41 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
<[email-masked]>
<[email-masked]>
<[email-masked]>
<[email-masked]>
<[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] GCC 3.0 thread
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 18 01:21:04 2001
X-Original-Date: Wed, 17 Jan 2001 13:21:41 +0100 (MET)

Denis Chertykov <[email-masked]> wrote:

> Current avr-as understands `__tmp_reg__ = 0' and
> (for example) `mov __tmp_reg__, r29'.

Ah, ok. I guess this also solves the problem that the old avr-gcc
produced invalid code for something like:

int r24;

void main(void) { r24 = 13; }

% avr-gcc -mmcu=at90s2313 -c foo.c
foo.c: In function `main':
foo.c:4: warning: return type of `main' is not `int'
/var/tmp/ccr59056.s: Assembler messages:
/var/tmp/ccr59056.s:32: Error: Ignoring attempt to re-define symbol

(r24 is being used directly as the assembler name for the variable in
the .data section, but is a reserved word for the assembler.)

>> (Actually, there was a bug in my report, regarding the number of
>> parameters to REGISTER_MOVE_COST() ...

> Show me a code examples and GCC version.

gcc-core-20010101.tar.gz:

gcc-20010101/gcc/config/avr/avr.h (and all the other MD files)
contains:

#define REGISTER_MOVE_COST(MODE, FROM, TO) ((FROM) == STACK_REG ? 6 \
: (TO) == STACK_REG ? 12 \
: 2)

gcc-20010101/gcc/regclass.c (and other files) use:

for (i = 0; i < N_REG_CLASSES; i++)
for (j = 0; j < N_REG_CLASSES; j++)
{
int cost = i == j ? 2 : REGISTER_MOVE_COST (i, j);
^^^^ only 2 params

That's been the last version i tried...

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Thu Jan 18 01:57:34 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Is9d-0003UF-00
for <[email-masked]>; Thu, 18 Jan 2001 01:57:33 +1300
Received: (from j@localhost)
by ida.interface-business.de id f0HCwjC59171;
Wed, 17 Jan 2001 13:58:45 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
<[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] searching for avr-gcc assembler reference
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 18 01:58:04 2001
X-Original-Date: Wed, 17 Jan 2001 13:58:45 +0100 (MET)

Denis Chertykov <[email-masked]> wrote:

> You wrong.
> gas have a macros.
>
> Also you can try to use `gasp' - Gnu Assembler Macro Preprocessor.

Well, but they are not built into gas... I only looked up the `info'
pages for gas.

I think most people who need to write some code portions directly in
assembler for gas use cpp anyway (like in OS projects, as in Linux or
the *BSDs). That provides a different macro option without being
built into gas itself. (avr-)gcc can handle this iff the file is
ending in .S (a capital S, not a lowercase one). For example, if the
following is stored in foo.S:

#define FUNC(name) .section .text; .type name,@function; name:

FUNC(foo)
ldi r23, 15
ret

running "avr-gcc -mmcu=at80XXXX -c foo.S" would work and produce the
appropriate foo.o file.

Yet another option would be m4, but i'm not aware of any tools that
support this combination smoothely, so you have to pipe them manually,
like in

m4 foobar.asm | avr-gas -o foobar.o

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Thu Jan 18 10:12:51 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Izss-0003wI-00
for <[email-masked]>; Thu, 18 Jan 2001 10:12:48 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.160])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id AAA28127;
Thu, 18 Jan 2001 00:13:42 +0300
To: [email-masked] (Joerg Wunsch)
Cc: [email-masked]
Subject: Re: [avr-gcc-list] searching for avr-gcc assembler reference
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
In-Reply-To: [email-masked]'s message of "Wed, 17 Jan 2001 13:58:45 +0100 (MET)"
Message-ID: <[email-masked]>
Lines: 82
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 18 10:13:06 2001
X-Original-Date: 18 Jan 2001 00:06:16 +0300

[email-masked] (J Wunsch) writes:

> Denis Chertykov <[email-masked]> wrote:
>
> > You wrong.
> > gas have a macros.
> >
> > Also you can try to use `gasp' - Gnu Assembler Macro Preprocessor.
>
> Well, but they are not built into gas... I only looked up the `info'
> pages for gas.

I can only repeat !!!
You wrong.
gas have a macros.

Fragment from info:

`.macro'
========

The commands `.macro' and `.endm' allow you to define macros that
generate assembly output. For example, this definition specifies a
macro `sum' that puts a sequence of numbers into memory:

.macro sum from=0, to=5
.long \from
.if \to-\from
sum "(\from+1)",\to
.endif
.endm

With that definition, `SUM 0,5' is equivalent to this assembly input:

.long 0
.long 1
.long 2
.long 3
.long 4
.long 5

`.macro MACNAME'
`.macro MACNAME MACARGS ...'
Begin the definition of a macro called MACNAME. If your macro
definition requires arguments, specify their names after the macro
name, separated by commas or spaces. You can supply a default
value for any macro argument by following the name with `=DEFLT'.
For example, these are all valid `.macro' statements:

`.macro comm'
Begin the definition of a macro called `comm', which takes no
arguments.

`.macro plus1 p, p1'
`.macro plus1 p p1'
Either statement begins the definition of a macro called
`plus1', which takes two arguments; within the macro
definition, write `\p' or `\p1' to evaluate the arguments.

`.macro reserve_str p1=0 p2'
Begin the definition of a macro called `reserve_str', with two
arguments. The first argument has a default value, but not
the second. After the definition is complete, you can call
the macro either as `reserve_str A,B' (with `\p1' evaluating
to A and `\p2' evaluating to B), or as `reserve_str ,B' (with
`\p1' evaluating as the default, in this case `0', and `\p2'
evaluating to B).

When you call a macro, you can specify the argument values either
by position, or by keyword. For example, `sum 9,17' is equivalent
to `sum to=17, from=9'.

`.endm'
Mark the end of a macro definition.

`.exitm'
Exit early from the current macro definition.

`\@'
`as' maintains a counter of how many macros it has executed in
this pseudo-variable; you can copy that number to your output with
`\@', but *only within a macro definition*.

From [email-masked] Thu Jan 18 10:13:03 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Izt3-0003wJ-00
for <[email-masked]>; Thu, 18 Jan 2001 10:13:00 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.160])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id AAA28140;
Thu, 18 Jan 2001 00:13:54 +0300
To: [email-masked] (Joerg Wunsch)
Cc: [email-masked]
Subject: Re: [avr-gcc-list] GCC 3.0 thread
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
In-Reply-To: [email-masked]'s message of "Wed, 17 Jan 2001 13:21:41 +0100 (MET)"
Message-ID: <[email-masked]>
Lines: 79
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 18 10:14:04 2001
X-Original-Date: 18 Jan 2001 00:06:35 +0300

[email-masked] (J Wunsch) writes:

> Denis Chertykov <[email-masked]> wrote:
>
> > Current avr-as understands `__tmp_reg__ = 0' and
> > (for example) `mov __tmp_reg__, r29'.
>
> Ah, ok. I guess this also solves the problem that the old avr-gcc
> produced invalid code for something like:
>
> int r24;
>
> void main(void) { r24 = 13; }

Yes.

> >> (Actually, there was a bug in my report, regarding the number of
> >> parameters to REGISTER_MOVE_COST() ...
>
> > Show me a code examples and GCC version.
>
> gcc-core-20010101.tar.gz:
>
> gcc-20010101/gcc/config/avr/avr.h (and all the other MD files)
> contains:
>
> #define REGISTER_MOVE_COST(MODE, FROM, TO) ((FROM) == STACK_REG ? 6 \
> : (TO) == STACK_REG ? 12 \
> : 2)
>
> gcc-20010101/gcc/regclass.c (and other files) use:
>
> for (i = 0; i < N_REG_CLASSES; i++)
> for (j = 0; j < N_REG_CLASSES; j++)
> {
> int cost = i == j ? 2 : REGISTER_MOVE_COST (i, j);
> ^^^^ only 2 params

You have a buggy snapshort. (gcc-20010101 was buggy)

Fragment from gcc/ChangeLog

2001-01-01 Alexandre Oliva <[email-masked]>

* tm.texi (REGISTER_MOVE_COST): Add a mode argument.
* reload.c (REGISTER_MOVE_COST): Likewise. Adjust all callers.
* reload1.c (REGISTER_MOVE_COST): Likewise.
* regclass.c (REGISTER_MOVE_COST): Likewise.
(move_cost, may_move_in_cost, may_move_out_cost): Add mode
dimension. Adjust all users.
(init_reg_sets_1): Iterate on all modes.
* config/1750a/1750a.h (REGISTER_MOVE_COST): Adjust.
* config/a29k/a29k.h (REGISTER_MOVE_COST): Adjust.
* config/alpha/alpha.h (REGISTER_MOVE_COST): Adjust.
* config/arc/arc.h (REGISTER_MOVE_COST): Adjust.
* config/arm/arm.h (REGISTER_MOVE_COST): Adjust.
* config/avr/avr.h (REGISTER_MOVE_COST): Adjust.
* config/c4x/c4x.h (REGISTER_MOVE_COST): Adjust.
* config/d30v/d30v.h (REGISTER_MOVE_COST): Adjust.
* config/dsp16xx/dsp16xx.h (REGISTER_MOVE_COST): Adjust.
* config/h8300/h8300.h (REGISTER_MOVE_COST): Adjust.
* config/i386/i386.h (REGISTER_MOVE_COST): Adjust.
* config/ia64/ia64.h (REGISTER_MOVE_COST): Adjust.
* config/m32r/m32r.h (REGISTER_MOVE_COST): Adjust.
* config/m68hc11/m68hc11.h (REGISTER_MOVE_COST): Adjust.
* config/m68k/m68k.h (REGISTER_MOVE_COST): Adjust.
* config/mcore/mcore.h (REGISTER_MOVE_COST): Adjust.
* config/mips/mips.h (REGISTER_MOVE_COST): Adjust.
* config/mn10200/mn10200.h (REGISTER_MOVE_COST): Adjust.
* config/mn10300/mn10300.h (REGISTER_MOVE_COST): Adjust.
* config/ns32k/ns32k.h (REGISTER_MOVE_COST): Adjust.
* config/pa/pa.h (REGISTER_MOVE_COST): Adjust.
* config/pdp11/pdp11.h (REGISTER_MOVE_COST): Adjust.
* config/pj/pj.h (REGISTER_MOVE_COST): Adjust.
* config/romp/romp.h (REGISTER_MOVE_COST): Adjust.
* config/rs6000/rs6000.h (REGISTER_MOVE_COST): Adjust.
* config/sh/sh.h (REGISTER_MOVE_COST): Adjust.
* config/sparc/sparc.h (REGISTER_MOVE_COST): Adjust.

From [email-masked] Thu Jan 18 22:48:25 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14JBg7-0004P6-00
for <[email-masked]>; Thu, 18 Jan 2001 22:48:24 +1300
Received: (from j@localhost)
by ida.interface-business.de id f0I9nUp05819;
Thu, 18 Jan 2001 10:49:30 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
<[email-masked]>
<[email-masked]>
<[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] searching for avr-gcc assembler reference
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 18 22:49:04 2001
X-Original-Date: Thu, 18 Jan 2001 10:49:30 +0100 (MET)

Denis Chertykov <[email-masked]> wrote:

> I can only repeat !!!
> You wrong.
> gas have a macros.
>
> Fragment from info:
>
> `.macro'

Hmm. Strange. Either i'm too stupid to find the appropriate section
in the info page here, or the info page and the actual code here
differ.

But thanks for the correction!
--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Fri Jan 19 05:00:51 2001
Received: from smtp.tor.axxent.ca ([209.250.128.26] helo=mail.tor.axxent.ca)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14JHUY-0004dD-00
for <[email-masked]>; Fri, 19 Jan 2001 05:00:50 +1300
Received: from digicom (dial-0343.tor.axxent.ca [216.249.1.89])
by mail.tor.axxent.ca (8.11.0/8.9.3) with ESMTP id f0IG21h27484
for <[email-masked]>; Thu, 18 Jan 2001 11:02:02 -0500 (EST)
Received: from cwall by digicom with local (Exim 3.12 #1 (Debian))
id 14JHW3-00008o-00; Thu, 18 Jan 2001 11:02:23 -0500
From: Carl Wall <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] searching for avr-gcc assembler reference
Message-ID: <[email-masked]>
Mail-Followup-To: [email-masked]
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Thu, Jan 18, 2001 at 10:49:30AM +0100
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 19 05:01:04 2001
X-Original-Date: Thu, 18 Jan 2001 11:02:23 -0500

> > gas have a macros.
>
> Hmm. Strange. Either i'm too stupid to find the appropriate section
> in the info page here, or the info page and the actual code here
> differ.
>
> But thanks for the correction!
> --
J"org Wunsch

In the Debian 2.2 release found it under the following

info as
Pseudo Ops
Macro

Cheers
Carl

From [email-masked] Fri Jan 19 06:12:55 2001
Received: from [193.101.57.9] (helo=ida.interface-business.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14JIcG-0004gE-00
for <[email-masked]>; Fri, 19 Jan 2001 06:12:54 +1300
Received: (from j@localhost)
by ida.interface-business.de id f0IHDmt07644;
Thu, 18 Jan 2001 18:13:48 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
<[email-masked]>
<[email-masked]>
<[email-masked]>
<[email-masked]>
<[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] searching for avr-gcc assembler reference
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 19 06:13:04 2001
X-Original-Date: Thu, 18 Jan 2001 18:13:48 +0100 (MET)

Carl Wall <[email-masked]> wrote:

> In the Debian 2.2 release found it under the following
>
> info as
> Pseudo Ops
> Macro

That's where i would have assumed it to be... Here's my list:

* List:: `.list'
* Long:: `.long EXPRESSIONS'
* Lsym:: `.lsym SYMBOL, EXPRESSION'
* Nolist:: `.nolist'
* Octa:: `.octa BIGNUMS'
* Org:: `.org NEW-LC , FILL'
* Psize:: `.psize LINES, COLUMNS'

Hmm. as -v says

% as -v
GNU assembler version 2.10.0 (i386-unknown-freebsd4) using BFD version 2.10.0

Nevermind... Now i know it's there, too.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Fri Jan 19 11:40:21 2001
Received: from bw150zhb.bluewin.ch ([195.186.1.68])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14JNjA-0004xn-00
for <[email-masked]>; Fri, 19 Jan 2001 11:40:20 +1300
Received: from homepc (zhb241pub180.bluewin.ch [195.186.241.180])
by bw150zhb.bluewin.ch (8.9.3/8.9.3) with SMTP id XAA06148
for <[email-masked]>; Thu, 18 Jan 2001 23:41:02 +0100 (MET)
Message-ID: <003101c0819f$bce548a0$b4f1bac3@homepc>
From: "Peter Fleury" <[email-masked]>
To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] AVR-Studio debugging working with new Win32 version of avr-gcc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 19 11:41:04 2001
X-Original-Date: Thu, 18 Jan 2001 23:40:59 +0100

Hello,

avr-gcc programs can be debugged using AVR Studio in the same way as =
with Volkers port.
You must recompile avr-libc:

copy the 'src' directory from avr-libc-20001125 to
c:\avrgcc\avr\lib\src

cd c:\avrgcc\avr\lib\src

modify the Makefile as follows

change=20
prefix=3D/usr/local/ =20
to
prefix=3Dc:\avrgcc
ABSPATH=3Dc:\avrgcc\avr\lib\src
=20
change
MD =3D ..
INSTAALL =3D ..
to
MD =3D $(subst /,\,mkdir $@)
INSTALL =3D $(subst \,/,cp -v -f $^)=20

remove 'install_headers' from target install:
(already installed by binary distribution of avr-libc)

change=20
mkdir -p =20
to=20
$(MD) (stuppied DOS mkdir doesn't like -p)

create sub-directories:
mkdir libc
mkdir avr3
mkdir avr4
mkdir avr5
mkdir avr3\libc
mkdir avr4\libc
mkdir avr5\libc
=20
then =20
make
and=20
make install
make clean

dont't delete the src directory, as AVR-Studio needs these sources
=20
you need the file 'cp.exe' from Volker's port.

Regards
Peter Fleury http://jump.to/fleury

From [email-masked] Fri Jan 19 17:55:20 2001
Received: from smtp2.ihug.co.nz ([203.109.252.8] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14JTa4-0005CD-00
for <[email-masked]>; Fri, 19 Jan 2001 17:55:20 +1300
Received: from guy (203-173-201-161.nzwide.ihug.co.nz [203.173.201.161])
by smtp2.ihug.co.nz (8.9.3/8.9.3/Debian 8.9.3-21) with SMTP id RAA22086;
Fri, 19 Jan 2001 17:56:32 +1300
X-Authentication-Warning: smtp2.ihug.co.nz: Host 203-173-201-161.nzwide.ihug.co.nz [203.173.201.161] claimed to be guy
Message-ID: <[email-masked]>
From: "Guy Robinson" <[email-masked]>
To: "Peter Fleury" <[email-masked]>, <[email-masked]>
References: <003101c0819f$bce548a0$b4f1bac3@homepc>
Subject: Re: [avr-gcc-list] AVR-Studio debugging working with new Win32 version of avr-gcc
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 19 17:56:04 2001
X-Original-Date: Fri, 19 Jan 2001 17:56:19 +1300

Thanks Peter, Just the following questions:

" create sub-directories:
mkdir libc
mkdir avr3
mkdir avr4
mkdir avr5
mkdir avr3\libc
mkdir avr4\libc
mkdir avr5\libc
"

Make these directories in avrgcc\avr\lib ?

When I try make I get an error saying it can't find
avrgcc\avr\lib\srcgcrt1.S

Where do I find this file?

I tried copying gcrt1.S to \lib and renaming it. I then got an error which
said 'Bad escape character in string, '?' assumed.

What am I doing wrong?

regards,

Guy

From [email-masked] Fri Jan 19 23:44:19 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14JZ1l-0005PN-00
for <[email-masked]>; Fri, 19 Jan 2001 23:44:18 +1300
Received: (qmail 19314 invoked from network); 19 Jan 2001 10:46:34 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 19 Jan 2001 10:46:34 -0000
Received: from fri.uni-lj.si ([193.2.76.118]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with ESMTP id AAA8462
for <[email-masked]>; Fri, 19 Jan 2001 11:37:35 +0100
Message-ID: <[email-masked]>
From: [email-masked] (Robert Rozman)
X-Mailer: Mozilla 4.51 [sl] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: "[email-masked]" <[email-masked]>
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Empty .eep file and example makefile
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 19 23:45:04 2001
X-Original-Date: Fri, 19 Jan 2001 11:47:33 +0100

Hello,

I've used older Volker Oth binary for win32. Now (thanks to Gunnar) I've
installed also newer version (much newer as I heard).

Now I'm compiling same project under newer avr-gcc (but with older
VOlker Oth makefiles and make utility) I suddenly notice that my .eep
file is empty.

I do eeprom variables and definitions in this way:

typedef struct {
int serial_num;
char name[MAX_NAME];
char address;
char status;
char operations; } node_par;

node_par podatki __attribute__ ((section (".eeprom"))) =
{SERIAL_NUM,"noname",'1',some_char, some_char};

-----
I kindly ask for correction and maybe some contributed makefile for
newer avr-gcc with bigger project (one target, several .h and .c files)
could help me (also maybe make utility). I see no mistake in syntax so
there must be something in makefile that doesn't create .eep file
correctly.

Thanks in advance,

Robert Rozman

From [email-masked] Sat Jan 20 03:31:41 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14JcZn-0005Xl-00
for <[email-masked]>; Sat, 20 Jan 2001 03:31:40 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id PAA03016
for <[email-masked]>; Fri, 19 Jan 2001 15:32:54 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Got AvrStudio 3.2 to work with avr-gcc :-)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 20 03:32:04 2001
X-Original-Date: Fri, 19 Jan 2001 15:32:53 +0100

Hello,

With a hint aof this list I finally succeeded in getting to work
AvrStudio.
A recompile of the libc-sources was needed.
I have now packed everything (inclusive libc-source) into a zip archive
on:
http://www.combio.de/avr

Usage is quite straightforward:
Extrakt to c:\avrgcc
Set Path to c:\avrgcc\bin;....
avr-gcc test.c -o test.elf
avr-objcopy -O avrobj test.elf test.obj

Open test.obj in AvrStudio and start tracing. :-)

Have fun

Gunnar

--
Gunnar Henne Email: [email-masked]
oTRIs GmbH & Co. KG Tel. : 0231 / 10616-21
Landgrafenstr. 153 Fax. : 0231 / 10615-44
44139 Dortmund

From [email-masked] Sat Jan 20 05:33:51 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14JeTz-0005ce-00
for <[email-masked]>; Sat, 20 Jan 2001 05:33:49 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.140])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id TAA07003;
Fri, 19 Jan 2001 19:34:47 +0300
To: [email-masked] (Robert Rozman)
Cc: "[email-masked]" <[email-masked]>
Subject: Re: [avr-gcc-list] Empty .eep file and example makefile
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
In-Reply-To: [email-masked]'s message of "Fri, 19 Jan 2001 11:47:33 +0100"
Message-ID: <[email-masked]>
Lines: 18
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 20 05:34:04 2001
X-Original-Date: 19 Jan 2001 19:27:29 +0300

[email-masked] (Robert Rozman) writes:

> Hello,
>
> I've used older Volker Oth binary for win32. Now (thanks to Gunnar) I've
> installed also newer version (much newer as I heard).
>
> Now I'm compiling same project under newer avr-gcc (but with older
> VOlker Oth makefiles and make utility) I suddenly notice that my .eep
> file is empty.

Read a "Quick overview of avr-binutils"
from my site: http://home.overta.ru/users/denisc

Or use:
avr-gcc c.c -c
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" -O srec c.o c.eep

From [email-masked] Sat Jan 20 05:48:38 2001
Received: from sttlpop2.sttl.uswest.net ([206.81.192.2])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14JeiL-0005dc-00
for <[email-masked]>; Sat, 20 Jan 2001 05:48:37 +1300
Received: (qmail 89060 invoked by alias); 19 Jan 2001 16:49:52 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 89003 invoked by uid 0); 19 Jan 2001 16:49:52 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop2.sttl.uswest.net with SMTP; 19 Jan 2001 16:49:52 -0000
Message-ID: <00e601c08238$403ea280$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] New Compiler warning
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 20 05:49:04 2001
X-Original-Date: Fri, 19 Jan 2001 08:47:29 -0800

I have installed Gunnar's release (very nice!)

I declare:
#define FLASH __attribute__ ((progmem))
void lcd_putstr(char *);
static char foo[] FLASH = "foo";
...
lcd_putstr(foo);

and get the following warning:
LcdTask.c:56: warning: passing arg 1 of `lcd_putstr' discards qualifiers
from pointer target type

I suspect the compiler is noticing that I am passing a FLASH reference where
it expects DATA. But I am unable to figure out the incantation needed to
make it stop complaining. Could someone enlighten me?

Thanks!

From [email-masked] Sat Jan 20 05:48:38 2001
Received: from sttlpop2.sttl.uswest.net ([206.81.192.2])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14JeiL-0005dd-00
for <[email-masked]>; Sat, 20 Jan 2001 05:48:37 +1300
Received: (qmail 89196 invoked by alias); 19 Jan 2001 16:49:55 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 89052 invoked by uid 0); 19 Jan 2001 16:49:52 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop2.sttl.uswest.net with SMTP; 19 Jan 2001 16:49:52 -0000
Message-ID: <00e701c08238$40ac7f80$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Another 2.97 question (linking with floating point)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 20 05:49:21 2001
X-Original-Date: Fri, 19 Jan 2001 08:51:17 -0800

Why does Gunnar's distribution link with "libgcc" instead of "libm" in my
application? My code is not finding fplib that should be in libm.a I am
not sure where to start looking. Here are excerpts from my map file: (maybe
I need to change some link order somewhere...) Maybe the libm wasn't built
correctly... Thanks, in advance, for your help.

######-- results (makefile output)---
avr-gcc NewBot.o MotorTask.o LcdTask.o maze.o mazesup.o lcdio.o lcd.o
Encoder.o adc_driver.o GP2D02.o
C:/mydocu~1/robotics/gccavr~1.5/avrx/avrx.a -Wl,--defsym,AvrXStack=0x25F,-Ma
p=NewBot.map,--cref,-v,--sort-common -mmcu=at90s8535 -o NewBot.elf
GNU ld version 2.10.91 (with BFD 010109)
/cygdrive/c/AVRGCC/BIN/../lib/gcc-lib/avr/2.97/../../../../avr/bin/ld.exe:
region text is full (NewBot.elf section .text)
MotorTask.o: In function `MotorTask':
/cygdrive/c/My Documents/Robotics/NewBot/MotorTask.c:139: undefined
reference to `cos'
/cygdrive/c/My Documents/Robotics/NewBot/MotorTask.c:140: undefined
reference to `sin'
/cygdrive/c/My Documents/Robotics/NewBot/MotorTask.c:145: undefined
reference to `fmod'

######-- map output (2.97..) --
C:/mydocu~1/robotics/gccavr~1.5/avrx/avrx.a(avrx_message.o)
C:/mydocu~1/robotics/gccavr~1.5/avrx/avrx.a(avrx_timequeue.o)
(AvrXIntSendMessage)
/cygdrive/c/AVRGCC/BIN/../lib/gcc-lib/avr/2.97/libgcc.a(_mulhi3.o)
MotorTask.o (__mulhi3)

######-- Old map output (2.95 ...) --
LOAD GP2D02.o
LOAD C:/mydocu~1/robotics/gccavr~1.5/avrx/avrx.a
0x0000025f AvrXStack=0x25f
LOAD C:\AVRGCC\BIN\..\lib\gcc-lib\avr\2.95.2\libgcc.a
LOAD C:\AVRGCC\BIN\..\lib\gcc-lib\avr\2.95.2\..\..\..\..\avr\lib\libc.a
LOAD C:\AVRGCC\BIN\..\lib\gcc-lib\avr\2.95.2\..\..\..\..\avr\lib\libm.a
LOAD C:\AVRGCC\BIN\..\lib\gcc-lib\avr\2.95.2\libgcc.a

Thanks for all your patience with my questions.

From [email-masked] Sat Jan 20 06:14:58 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Jf7o-0005fF-00
for <[email-masked]>; Sat, 20 Jan 2001 06:14:57 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id SAA02599;
Fri, 19 Jan 2001 18:15:31 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: Larry Barello <[email-masked]>
CC: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Another 2.97 question (linking with floating point)
References: <[email-masked]> <00e701c08238$40ac7f80$0200000a@larry>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 20 06:15:04 2001
X-Original-Date: Fri, 19 Jan 2001 18:15:30 +0100

Hello Larry,

Larry Barello schrieb:
>
> Why does Gunnar's distribution link with "libgcc" instead of "libm" in my
> application?

I think, its the normal behaviour to link only against libc.

> My code is not finding fplib that should be in libm.a I am
> not sure where to start looking.

The answer ist quite simple, and nearly every new Linux-gcc programmer
has had problems with ist:

To link libm.a you have to use the -lm (link math) switch to gcc.
I have just tried and stepped trough the sin library-code using
AvrStudio. :-)
(Nice new toy ;-)

Here are excerpts from my map file: (maybe

> /cygdrive/c/AVRGCC/BIN/../lib/gcc-lib/avr/2.97/../../../../avr/bin/ld.exe:
> region text is full (NewBot.elf section .text)
^^^^
This does not look good.

How do you generate the map output?

Greetings

Gunnar

--
Gunnar Henne Email: [email-masked]
oTRIs GmbH & Co. KG Tel. : 0231 / 10616-21
Landgrafenstr. 153 Fax. : 0231 / 10615-44
44139 Dortmund

From [email-masked] Sat Jan 20 07:33:29 2001
Received: from bw150zhb.bluewin.ch ([195.186.1.68])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14JgLo-0005n5-00
for <[email-masked]>; Sat, 20 Jan 2001 07:33:28 +1300
Received: from homepc (bw3-72pub14.bluewin.ch [62.202.72.14])
by bw150zhb.bluewin.ch (8.9.3/8.9.3) with SMTP id TAA03871
for <[email-masked]>; Fri, 19 Jan 2001 19:34:14 +0100 (MET)
Message-ID: <001901c08246$6d7ffd80$0e48ca3e@homepc>
From: "Peter Fleury" <[email-masked]>
To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] AVR-Studio debugging working with new Win32 release of avr-gcc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 20 07:34:05 2001
X-Original-Date: Fri, 19 Jan 2001 19:33:05 +0100

Hello,

I described in my previous posting how to build the sources of=20
avr-libc, but I incorretly specified one variable:

correct is:
ABSPATH=3Dc:\avrgcc\avr\lib\src\=20

note: trailling '\'

The mentioned sub-directories (libc, avr3 ..) must be created in=20

\avrgcc\avr\lib\src e.g. \avrgcc\avr\lib\src\libc\avr=20

(the makefile does not create these dirs because of limitations of
DOS mkdir)

The make command must be invoked in \avrgcc\avr\lib\src

Regards
Peter

From [email-masked] Sat Jan 20 09:52:28 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14JiWI-0005t5-00
for <[email-masked]>; Sat, 20 Jan 2001 09:52:27 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id VAA10705
for <[email-masked]>; Fri, 19 Jan 2001 21:53:44 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Wrong path infos in avrobj file
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 20 09:53:04 2001
X-Original-Date: Fri, 19 Jan 2001 21:53:43 +0100

Hello,

I have achieved to debug programs in AvrStudio, which consist of a main
c-file and some linked asm. Files. This works only, when there are no
c-files linked, which are compiled with the -g option.
I traced the problem down to the path info in the avrobj files. For
assembler files there is a proper dos path, but for c files there is a
path having /cygwin/c/ instead of c:/

examples
/cygdrive/c/avrgcc/avr/lib/src/./stdlib/atoi.c
c:/avrgcc/avr/lib/src/./fplib/divsf3x.S

How can I achieve to have the right path infos in my files?

Greetings
Gunnar

--
Gunnar Henne Email: [email-masked]
oTRIs GmbH & Co. KG Tel. : 0231 / 10616-21
Landgrafenstr. 153 Fax. : 0231 / 10615-44
44139 Dortmund

From [email-masked] Sun Jan 21 20:04:49 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14KEYS-0000Dc-00
for <[email-masked]>; Sun, 21 Jan 2001 20:04:49 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.137])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id KAA02630;
Sun, 21 Jan 2001 10:06:04 +0300
Message-Id: <[email-masked]>
From: Denis Chertykov <[email-masked]>
To: [email-masked]
Cc: [email-masked], [email-masked]
Subject: [avr-gcc-list] avr port: ".*rvbranch" bugfix
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 21 20:05:04 2001
X-Original-Date: Sun, 21 Jan 2001 10:06:02 +0300

Sun Jan 21 09:44:17 2001 Denis Chertykov <[email-masked]>

* config/avr/avr.c (ret_cond_branch): New argument (reverse) added.
If REVERSE nonzero then condition code in X must be reversed.
(encode_section_info): Optimise if/else.
(avr_function_value): Fix formatting.

* config/avr/avr.md (branch): Call to ret_cond_branch changed.
(difficult_branch): Likewise.
(rvbranch): Likewise.
(difficult_rvbranch): Likewise.

* config/avr/avr-protos.h (ret_cond_branch): Prototype changed.

* config/avr/libgcc.S: Fix comment.

Index: avr-protos.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/avr/avr-protos.h,v
retrieving revision 1.11
diff -c -3 -p -r1.11 avr-protos.h
*** avr-protos.h 2001/01/05 19:08:46 1.11
--- avr-protos.h 2001/01/21 07:04:53
*************** extern const char * out_movsi_mr_r PARA
*** 95,101 ****
extern const char * output_movsisf PARAMS ((rtx insn, rtx operands[], int *l));
extern const char * out_tstsi PARAMS ((rtx insn, int *l));
extern const char * out_tsthi PARAMS ((rtx insn, int *l));
! extern const char * ret_cond_branch PARAMS ((RTX_CODE cond, int len));

extern const char * ashlqi3_out PARAMS ((rtx insn, rtx operands[], int *len));
extern const char * ashlhi3_out PARAMS ((rtx insn, rtx operands[], int *len));
--- 95,101 ----
extern const char * output_movsisf PARAMS ((rtx insn, rtx operands[], int *l));
extern const char * out_tstsi PARAMS ((rtx insn, int *l));
extern const char * out_tsthi PARAMS ((rtx insn, int *l));
! extern const char * ret_cond_branch PARAMS ((rtx x, int len, int reverse));

extern const char * ashlqi3_out PARAMS ((rtx insn, rtx operands[], int *len));
extern const char * ashlhi3_out PARAMS ((rtx insn, rtx operands[], int *len));
Index: avr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/avr/avr.c,v
retrieving revision 1.36
diff -c -3 -p -r1.36 avr.c
*** avr.c 2001/01/05 19:08:46 1.36
--- avr.c 2001/01/21 07:05:03
*************** avr_jump_mode (x, insn)
*** 1194,1207 ****
return 2;
}

! /* return a AVR condition jump commands.
! LEN is a number returned by avr_jump_mode function. */

const char *
! ret_cond_branch (cond, len)
! RTX_CODE cond;
int len;
{
switch (cond)
{
case GT:
--- 1194,1212 ----
return 2;
}

! /* return an AVR condition jump commands.
! X is a comparison RTX.
! LEN is a number returned by avr_jump_mode function.
! if REVERSE nonzero then condition code in X must be reversed. */

const char *
! ret_cond_branch (x, len, reverse)
! rtx x;
int len;
+ int reverse;
{
+ RTX_CODE cond = reverse ? reverse_condition (GET_CODE (x)) : GET_CODE (x);
+
switch (cond)
{
case GT:
*************** ret_cond_branch (cond, len)
*** 1262,1278 ****
AS1 (brsh,_PC_+4) CR_TAB
AS1 (jmp,%0)));
default:
! switch (len)
! {
! case 1:
! return AS1 (br%j1,%0);
! case 2:
! return (AS1 (br%k1,_PC_+2) CR_TAB
! AS1 (rjmp,%0));
! default:
! return (AS1 (br%k1,_PC_+4) CR_TAB
! AS1 (jmp,%0));
! }
}
return "";
}
--- 1267,1300 ----
AS1 (brsh,_PC_+4) CR_TAB
AS1 (jmp,%0)));
default:
! if (reverse)
! {
! switch (len)
! {
! case 1:
! return AS1 (br%k1,%0);
! case 2:
! return (AS1 (br%j1,_PC_+2) CR_TAB
! AS1 (rjmp,%0));
! default:
! return (AS1 (br%j1,_PC_+4) CR_TAB
! AS1 (jmp,%0));
! }
! }
! else
! {
! switch (len)
! {
! case 1:
! return AS1 (br%j1,%0);
! case 2:
! return (AS1 (br%k1,_PC_+2) CR_TAB
! AS1 (rjmp,%0));
! default:
! return (AS1 (br%k1,_PC_+4) CR_TAB
! AS1 (jmp,%0));
! }
! }
}
return "";
}
*************** encode_section_info (decl)
*** 4736,4745 ****
{
if (TREE_CODE (decl) == FUNCTION_DECL)
SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1;
!
! if ((TREE_STATIC (decl) || DECL_EXTERNAL (decl))
! && TREE_CODE (decl) == VAR_DECL
! && avr_progmem_p (decl))
{
const char *dsec = ".progmem.data";
DECL_SECTION_NAME (decl) = build_string (strlen (dsec), dsec);
--- 4758,4766 ----
{
if (TREE_CODE (decl) == FUNCTION_DECL)
SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1;
! else if ((TREE_STATIC (decl) || DECL_EXTERNAL (decl))
! && TREE_CODE (decl) == VAR_DECL
! && avr_progmem_p (decl))
{
const char *dsec = ".progmem.data";
DECL_SECTION_NAME (decl) = build_string (strlen (dsec), dsec);
*************** avr_function_value (type, func)
*** 5102,5107 ****
--- 5123,5129 ----
tree func ATTRIBUTE_UNUSED;
{
unsigned int offs;
+
if (TYPE_MODE (type) != BLKmode)
return avr_libcall_value (TYPE_MODE (type));

Index: avr.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/avr/avr.md,v
retrieving revision 1.25
diff -c -3 -p -r1.25 avr.md
*** avr.md 2001/01/20 16:49:01 1.25
--- avr.md 2001/01/21 07:05:07
***************
*** 1937,1944 ****
"! (GET_CODE (operands[1]) == GT || GET_CODE (operands[1]) == GTU
|| GET_CODE (operands[1]) == LE || GET_CODE (operands[1]) == LEU)"
"*
! return ret_cond_branch (GET_CODE (operands[1]),
! avr_jump_mode (operands[0],insn));"
[(set_attr "type" "branch")
(set_attr "cc" "clobber")])

--- 1937,1943 ----
"! (GET_CODE (operands[1]) == GT || GET_CODE (operands[1]) == GTU
|| GET_CODE (operands[1]) == LE || GET_CODE (operands[1]) == LEU)"
"*
! return ret_cond_branch (operands[1], avr_jump_mode (operands[0],insn), 0);"
[(set_attr "type" "branch")
(set_attr "cc" "clobber")])

***************
*** 1952,1959 ****
"(GET_CODE (operands[1]) == GT || GET_CODE (operands[1]) == GTU
|| GET_CODE (operands[1]) == LE || GET_CODE (operands[1]) == LEU)"
"*
! return ret_cond_branch (GET_CODE (operands[1]),
! avr_jump_mode (operands[0],insn));"
[(set_attr "type" "branch1")
(set_attr "cc" "clobber")])

--- 1951,1957 ----
"(GET_CODE (operands[1]) == GT || GET_CODE (operands[1]) == GTU
|| GET_CODE (operands[1]) == LE || GET_CODE (operands[1]) == LEU)"
"*
! return ret_cond_branch (operands[1], avr_jump_mode (operands[0],insn), 0);"
[(set_attr "type" "branch1")
(set_attr "cc" "clobber")])

***************
*** 1968,1975 ****
"! (GET_CODE (operands[1]) == GT || GET_CODE (operands[1]) == GTU
|| GET_CODE (operands[1]) == LE || GET_CODE (operands[1]) == LEU)"
"*
! return ret_cond_branch (reverse_condition (GET_CODE (operands[1])),
! avr_jump_mode (operands[0],insn));"
[(set_attr "type" "branch1")
(set_attr "cc" "clobber")])

--- 1966,1972 ----
"! (GET_CODE (operands[1]) == GT || GET_CODE (operands[1]) == GTU
|| GET_CODE (operands[1]) == LE || GET_CODE (operands[1]) == LEU)"
"*
! return ret_cond_branch (operands[1], avr_jump_mode (operands[0], insn), 1);"
[(set_attr "type" "branch1")
(set_attr "cc" "clobber")])

***************
*** 1982,1989 ****
"(GET_CODE (operands[1]) == GT || GET_CODE (operands[1]) == GTU
|| GET_CODE (operands[1]) == LE || GET_CODE (operands[1]) == LEU)"
"*
! return ret_cond_branch (reverse_condition (GET_CODE (operands[1])),
! avr_jump_mode (operands[0],insn));"
[(set_attr "type" "branch")
(set_attr "cc" "clobber")])

--- 1979,1985 ----
"(GET_CODE (operands[1]) == GT || GET_CODE (operands[1]) == GTU
|| GET_CODE (operands[1]) == LE || GET_CODE (operands[1]) == LEU)"
"*
! return ret_cond_branch (operands[1], avr_jump_mode (operands[0], insn), 1);"
[(set_attr "type" "branch")
(set_attr "cc" "clobber")])

Index: libgcc.S
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/avr/libgcc.S,v
retrieving revision 1.10
diff -c -3 -p -r1.10 libgcc.S
*** libgcc.S 2001/01/20 16:49:01 1.10
--- libgcc.S 2001/01/21 07:05:07
*************** __prologue_saves__:
*** 597,603 ****
#endif /* defined (L_prologue) */

/*
! * This is a epilogue subroutine
*/
#if defined (L_epilogue)

--- 597,603 ----
#endif /* defined (L_prologue) */

/*
! * This is an epilogue subroutine
*/
#if defined (L_epilogue)

From [email-masked] Mon Jan 22 11:00:26 2001
Received: from bw150zhb.bluewin.ch ([195.186.1.68])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14KSXB-0000qN-00
for <[email-masked]>; Mon, 22 Jan 2001 11:00:25 +1300
Received: from homepc (bw3-77pub30.bluewin.ch [62.202.77.30])
by bw150zhb.bluewin.ch (8.9.3/8.9.3) with SMTP id XAA04966
for <[email-masked]>; Sun, 21 Jan 2001 23:01:20 +0100 (MET)
Message-ID: <001601c083f5$b1fc44e0$1e4dca3e@homepc>
From: "Peter Fleury" <[email-masked]>
To: <[email-masked]>
Subject: [avr-gcc-list] Wrong path infos in avrobj file
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Mon Jan 22 11:01:04 2001
X-Original-Date: Sun, 21 Jan 2001 23:01:19 +0100

Hello,

It looks to me that you have compiled avr-libc using the cygwin shell. =
This shell translates the 'C:' into a unix-like filesystem structure.

I compiled avr-libc from the Win32 command-prompt using the
make utility from Volkers port.=20

Greetings
Peter

From [email-masked] Tue Jan 23 00:35:38 2001
Received: from [193.101.57.9] (helo=ida.interface-business.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14KfG3-0001JN-00
for <[email-masked]>; Tue, 23 Jan 2001 00:35:36 +1300
Received: (from j@localhost)
by ida.interface-business.de id f0MBasl80660;
Mon, 22 Jan 2001 12:36:54 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <00e601c08238$403ea280$0200000a@larry>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] New Compiler warning
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 23 00:36:04 2001
X-Original-Date: Mon, 22 Jan 2001 12:36:54 +0100 (MET)

"Larry Barello" <[email-masked]> wrote:

> I suspect the compiler is noticing that I am passing a FLASH
> reference where it expects DATA. But I am unable to figure out the
> incantation needed to make it stop complaining. Could someone
> enlighten me?

I don't have the latest version of the compiler here (yet), but why
don't you simply add the FLASH macro to the parameter declaration?

void lcd_putstr(char FLASH *);

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Tue Jan 23 00:42:01 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14KfME-0001K2-00
for <[email-masked]>; Tue, 23 Jan 2001 00:42:00 +1300
Received: (from j@localhost)
by ida.interface-business.de id f0MBhNK80680;
Mon, 22 Jan 2001 12:43:23 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <20010116005707.A35C34891D@localhost>
<[email-masked]>
<[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] hello world
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 23 00:43:04 2001
X-Original-Date: Mon, 22 Jan 2001 12:43:23 +0100 (MET)

[email-masked] (J Wunsch) wrote:

> I expect Rich to integrate this into his document as his time permits.
> For the time being, you can find it at
>
> ftp://ftp.ifbus.de/pub/j_wunsch/avr-demo.tar.gz

I've now prepared a second version of it which also covers the one
major concept that was missing until now, i. e. how to handle the
EEPROM. (The value of the PWM is saved in two EEPROM cells after it
has been changed, and this value is used as the starting value after a
chip reset.) I've uploaded the new archive to the above file; only
demo.c has been changed in the archive, the remaining files are the
same as last time.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Tue Jan 23 01:33:46 2001
Received: from snitterly.nanoteq.co.za ([196.37.90.5] helo=huna.nanoteq.co.za)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14KgAJ-0001ME-00
for <[email-masked]>; Tue, 23 Jan 2001 01:33:45 +1300
Received: from heinie (196.37.90.246 [196.37.90.246]) by huna.nanoteq.co.za with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21)
id YBHFVWSS; Mon, 22 Jan 2001 12:57:26 +0200
Received: by heinie with Microsoft Mail
id <01C08471.2346FE80@heinie>; Mon, 22 Jan 2001 12:45:02 +0200
Message-ID: <01C08471.2346FE80@heinie>
From: Heinrich Vermeulen <[email-masked]>
To: "[email-masked]'" <[email-masked]>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="---- =_NextPart_000_01C08471.234E9FA0"
Subject: [avr-gcc-list] RE: Got AvrStudio 3.2 to work with avr-gcc (Gunnar Henne)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 23 12:29:04 2001
X-Original-Date: Mon, 22 Jan 2001 12:45:01 +0200

------ =_NextPart_000_01C08471.234E9FA0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Gunnar wrote,

>>Hello,
>>With a hint aof this list I finally succeeded in getting to work
>>AvrStudio.
>>A recompile of the libc-sources was needed.
>>I have now packed everything (inclusive libc-source) into a zip =
archive
>>on:
>>http://www.combio.de/avr
>>Usage is quite straightforward:
>>Extrakt to c:\avrgcc
>>Set Path to c:\avrgcc\bin;....
>>avr-gcc test.c -o test.elf
>>avr-objcopy -O avrobj test.elf test.obj
>>Open test.obj in AvrStudio and start tracing. :-)>>Gunnar

1) Are these changes only affecting Windows users or is it possible to =
use this libc sources to compile source code under Linux and then debug =
the code output using Windows AVR Studio?
2) If possible, how?

Thanks

Heinrich Vermeulen

------ =_NextPart_000_01C08471.234E9FA0
Content-Type: application/ms-tnef
Content-Transfer-Encoding: base64

eJ8+IgIKAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy
b3NvZnQgTWFpbC5Ob3RlADEIAQ2ABAACAAAAAgACAAEEkAYARAEAAAEAAAANAAAAAwAAMAIAAAAL
AA8OAAAAAAIB/w8BAAAAUwAAAAAAAACBKx+kvqMQGZ1uAN0BD1QCAAAAAGF2ci1nY2MtbGlzdEBh
dnIuanBrLmNvLm56AFNNVFAAYXZyLWdjYy1saXN0QGF2ci5qcGsuY28ubnoAAB4AAjABAAAABQAA
AFNNVFAAAAAAHgADMAEAAAAbAAAAYXZyLWdjYy1saXN0QGF2ci5qcGsuY28ubnoAAAMAFQwBAAAA
AwD+DwYAAAAeAAEwAQAAAB0AAAAnYXZyLWdjYy1saXN0QGF2ci5qcGsuY28ubnonAAAAAAIBCzAB
AAAAIAAAAFNNVFA6QVZSLUdDQy1MSVNUQEFWUi5KUEsuQ08uTloAAwAAOQAAAAALAEA6AQAAAAMA
cToAAAAAAgH2DwEAAAAEAAAAAAAAAko+AQSAAQA6AAAAUkU6IEdvdCBBdnJTdHVkaW8gMy4yIHRv
IHdvcmsgd2l0aCBhdnItZ2NjIChHdW5uYXIgSGVubmUpAP4SAQWAAwAOAAAA0QcBABYADAAtAAEA
AQAqAQEggAMADgAAANEHAQAWAAwAKAABAAEAJQEBCYABACEAAAAzQTRDNTcyRDUxRjBENDExOEI5
NTAwMDBFOEQ3MUQ2OAAGBwEDkAYAnAQAABQAAAALACMAAAAAAAMAJgAAAAAACwApAAAAAAADAC4A
AAAAAAMANgAAAAAAQAA5AOCMBV9ghMABHgBwAAEAAAA6AAAAUkU6IEdvdCBBdnJTdHVkaW8gMy4y
IHRvIHdvcmsgd2l0aCBhdnItZ2NjIChHdW5uYXIgSGVubmUpAAAAAgFxAAEAAAAWAAAAAcCEYF78
EFlOYfBdEdSLlQAA6NcdaAAAHgAeDAEAAAADAAAATVMAAB4AHwwBAAAAFwAAAFdpbmRvd3MvYWRt
aW4vSGVpbnJpY2gAAAMABhBpCJuTAwAHEC8CAAAeAAgQAQAAAGUAAABHVU5OQVJXUk9URSxIRUxM
TyxXSVRIQUhJTlRBT0ZUSElTTElTVElGSU5BTExZU1VDQ0VFREVESU5HRVRUSU5HVE9XT1JLQVZS
U1RVRElPQVJFQ09NUElMRU9GVEhFTElCQy1TAAAAAAIBCRABAAAA8AIAAOwCAAB5BAAATFpGdZfP
2fYDAAoAcmNwZzEyNf4yAP8CBgKkA+QF6wKDAFATA1QCAGNoCsBzZXT+MgYABsMCgw5QA9UHEwKD
MjMTz2Y0A8UCAHByQnES4nN0ZW0CgH1/CoAIzwnZAoAKgQ5xC2BueQ4QMDMU4AsKFOIB0CDQR3Vu
bgrBdwNgFzAGLAqFCoU+PkhlbAcX8Bx2HWBXaXRoIBhhIGgLgAVAYW9mZiAekAQAIGwEAAVASQwg
ZguAB0BseSBzmHVjYwngDnBkIAuAVCBnEsB0C4BnH2BvCxwQBbBrHPdBdnJTQHR1ZGlvLiJ4IJMY
YAWgbXADEGUgH0PDJNAfwGJjLXMIYSDg6QQgd2EEIG4g8yOYIBBlEoB2JNBubwfgCrBjymshIWUn
sHJ5H3Eh0XooC4BjCkAAkCexJWkp9yFBIgEewHoFIB6wJeAe4FcnsBz3AiA6HPdoAkBwUDovL3ct
oC4kcWIrI3EOcC8noHIc91VzzmEhgCFABCBxdR6AJNC1FyByC3BnLTACEHImMNMLICyYRXgwQWsF
QCIB2GM6XABgIxBnINAc9/MGYAVAUGEekTJLMpAuELhuOy41YRz3LoEtMuHLH2AHkHQt0CAtIhA2
s0UdkGY1q29iagWgcPkgkC1PHrAjEDihN0c2pM84oQqPGxgdYE9wCfA6R/chQiMHHrBuITAXIArA
MiEFMFBjIcEuIDotKfcdYBu0HIwxKqAHECTQJSF/ErAyYBKAGhAHkQIgIIFh/w6QBZAhsx5wPmAn
8AQgKZC/BJBCQQXAH5EegCgQbwQQ/yVwJMEiAUPRH2YlgCCgJcX/MkIkhSW0RwEOcEPAPmAEkOQg
TAuAdXg+QyUhA6D5DnBidSHhJTFIAwhgLVDHSqBDwUMaQVZSBgAjQ2o/OtUyKqBJH1BExiwvHtAn
8EyGOtVUQfFrc58cjB2AC4AFEBJwIFYEkPUHgHUkwG4cjAtGE7IMAV8WsBxBQvAc5heBAFSAAwAQ
EAAAAAADABEQAAAAAEAABzDgLjWsX4TAAUAACDDgLjWsX4TAAR4APQABAAAABQAAAFJFOiAAAAAA
AwANNP03AAAKTQ==

------ =_NextPart_000_01C08471.234E9FA0--

From [email-masked] Tue Jan 23 04:54:55 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14KjIz-0001VL-00
for <[email-masked]>; Tue, 23 Jan 2001 04:54:54 +1300
Received: (from rneswold@localhost)
by drmemory.fnal.gov (8.9.3/8.9.3) id JAA56295;
Mon, 22 Jan 2001 09:56:21 -0600 (CST)
(envelope-from rneswold)
From: Rich Neswold <[email-masked]>
To: [email-masked], AVR Mailing List <[email-masked]>
Message-ID: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="W/nzBZO5zC0uMSeA"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.0-STABLE
Subject: [avr-gcc-list] Updated AVR Document...
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 23 12:29:24 2001
X-Original-Date: Mon, 22 Jan 2001 09:56:21 -0600

--W/nzBZO5zC0uMSeA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello,

I've released a new version of the AVR-based GNU Tool document. You can get
it at:

http://www.enteract.com/~rneswold/avr/avr-lib-beta.pdf

It includes the following improvements:

- I've checked the function references against avr-libc-20001125 and
made the necessary changes (of which, there were very few.)

- I've added Joerg Wunsch's avr-demo to chapter 3 to give a real-world
example of using the tools. Thanks again, Joerg!

- The Appendix now has a section describing the register usage. This
section is based upon the text file that is bundled with the AVR libc
tarball.

Despite these improvements to the document, there are some drawbacks (hence
the "-beta" in the file name.) Things that need to be improved or fixed,
are:

- Chapter 2 is practically worthless now. The document now refers to
the 20001125 version of AVR-LIBC, which requires a version of GCC
from the CVS repository (if there is a snapshot that works with this
library, let me know!)

So I need to rewrite chapter 2 to show how to check GCC out of CVS,
etc., etc., etc.

- Once I get the latest GCC installed on my system, I need to verify
the sections of the document that refer to the tools' lesser
documented features (like parameters to __attribute__, like command
line options, etc.)

Anyways, I think the added material will be of use, so I'm releasing this
beta. Enjoy...

--=20
Rich Neswold

efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

--W/nzBZO5zC0uMSeA
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE6bFgkZmE+i9FKxdwRAu/eAKC0NLW4YJVznnO3pZSYl17dTDCxSwCg2HQY
NIswPOTk6QDA9Makvady4vQ=
=GrYJ
-----END PGP SIGNATURE-----

--W/nzBZO5zC0uMSeA--

From [email-masked] Tue Jan 23 19:42:50 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14KxAG-00027Z-00
for <[email-masked]>; Tue, 23 Jan 2001 19:42:49 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id HAA21734;
Tue, 23 Jan 2001 07:43:40 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: Heinrich Vermeulen <[email-masked]>
CC: "[email-masked]'" <[email-masked]>
References: <01C08471.2346FE80@heinie>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Re: Got AvrStudio 3.2 to work with avr-gcc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 23 19:43:04 2001
X-Original-Date: Tue, 23 Jan 2001 07:43:40 +0100

Hello Heinrich,

Heinrich Vermeulen wrote:

> 1) Are these changes only affecting Windows users or is it possible to use this libc sources to compile source code under Linux and then debug the code output using Windows AVR Studio?

At first I thought, it is possible to do this. But then I realized that
AvrStudio is VERY strange about pathnames. When you compile under Linux,
the Linux pathes are used in the debug info, which causes AvrStudio to
crash or refuse to work. :-(

I am working on cross compiling avr-gcc on Linux for Win32, because the
(now used) cygwin environment change my pathes (c:\test ->
/cygdrive/c/test).

My compiled binaries work fine, but because of the path-issue are yet
not useable for AvrStudio.

Greetings

Gunnar

From [email-masked] Wed Jan 24 01:28:11 2001
Received: from hertz.ikp.physik.tu-darmstadt.de ([130.83.24.91])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14L2YU-0002LM-00
for <[email-masked]>; Wed, 24 Jan 2001 01:28:11 +1300
Received: (from bon@localhost)
by hertz.ikp.physik.tu-darmstadt.de (8.10.2/8.10.2/SuSE Linux 8.10.0-0.3) id f0NCTir02649;
Tue, 23 Jan 2001 13:29:44 +0100
From: Uwe Bonnes <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <[email-masked]>
To: [email-masked]
X-Mailer: VM 6.72 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid
Subject: [avr-gcc-list] RE: Got AvrStudio 3.2 to work with avr-gcc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 24 01:29:04 2001
X-Original-Date: Tue, 23 Jan 2001 13:29:44 +0100 (MET)

Gunnar Henne asked:
1) Are these changes only affecting Windows users or is it possible to
use this libc sources to compile source code under Linux and then debug
the code output using Windows AVR Studio?

2) If possible, how?

Linux binutils will use Unix Pathes, and I think that the AVRStudio
only will understand DOS-Pathes. The cygwin compiled binutils seem to
have the same problem too. One could however think about adding
a Pathname translator to the unix tools.

Bye

Uwe Bonnes [email-masked]

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

From [email-masked] Wed Jan 24 22:53:10 2001
Received: from nets5.rz.rwth-aachen.de ([137.226.144.13])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14LMc1-0003C6-00
for <[email-masked]>; Wed, 24 Jan 2001 22:53:09 +1300
Received: from Ostermann-net.de (213_21_44_18.surf-callino.de [213.21.44.18])
by nets5.rz.rwth-aachen.de (8.10.1/8.10.1/5) with SMTP id f0O9sgm13521
for <[email-masked]>; Wed, 24 Jan 2001 10:54:43 +0100 (MET)
Message-Id: <[email-masked]>
From: Thorsten Ostermann <[email-masked]>
To: [email-masked]
X-Mailer: Thorsten Ostermann's registered AK-Mail 3.1 publicbeta2a [ger]
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] Re: Re: Got AvrStudio 3.2 to work with avr-gcc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 24 22:54:04 2001
X-Original-Date: Wed, 24 Jan 2001 10:34:17 +0100

Firtst of all: Hello everybody, I'm Thorsten Ostermann, student in
germany. I'm new to this list, so I thought it would be a nice idea to
say hello ;-)

> I am working on cross compiling avr-gcc on Linux for Win32, because
> the (now used) cygwin environment change my pathes (c:\test ->
> /cygdrive/c/test).

> My compiled binaries work fine, but because of the path-issue are
> yet not useable for AvrStudio.

Does this mean you plan to release a new avr-gcc binary for windows? I
asked Volker Oth for an update some days ago, but he said he does not
have the time to make this job. But as a long time windows user, I
prefer 'ready to run' distributions ;-)

Best regards
Thorsten
--
PGP welcome!
Thorsten online: http://www.ostermann-net.de/electronic/
Rund um Schrittmotor, Fr=E4s-Bohr-Plotter & Mikrocontroller

From [email-masked] Wed Jan 24 23:08:12 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14LMqZ-0003D4-00
for <[email-masked]>; Wed, 24 Jan 2001 23:08:11 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id LAA19577;
Wed, 24 Jan 2001 11:09:45 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: Thorsten Ostermann <[email-masked]>
CC: [email-masked]
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Re: Got AvrStudio 3.2 to work with avr-gcc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 24 23:09:04 2001
X-Original-Date: Wed, 24 Jan 2001 11:09:44 +0100

Hello Thorsten

Thorsten Ostermann wrote:

> Does this mean you plan to release a new avr-gcc binary for windows?

Yes, but I am stuck in two ways:

Under WinNT there seems to be no unix-shell except the cygwin one, so I
cant run configure. (cygwin sh mangles pathnames)

I tried to Cross-Compile gcc on Linux targeting Win32 (mingw32), but my
mingw32 LibC lacks some functions, which are needed to compile the
actual gcc.

In the moment, I am waiting, if my questions in several locations on the
net will get answered.
If someone tells my the trick, I will build a Win32 avr-gcc which
doesn't mangele the pathnames.

> But as a long time windows user, I
> prefer 'ready to run' distributions ;-)

My binaries are ready to run, but debugging *.c files with AvrStudio
does not work.

Greetings
Gunnar

From [email-masked] Wed Jan 24 23:17:07 2001
Received: from hertz.ikp.physik.tu-darmstadt.de ([130.83.24.91])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14LMzC-0003EH-00
for <[email-masked]>; Wed, 24 Jan 2001 23:17:06 +1300
Received: (from bon@localhost)
by hertz.ikp.physik.tu-darmstadt.de (8.10.2/8.10.2/SuSE Linux 8.10.0-0.3) id f0OAIgC05892;
Wed, 24 Jan 2001 11:18:42 +0100
From: Uwe Bonnes <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] Re: Re: Got AvrStudio 3.2 to work with avr-gcc
In-Reply-To: <[email-masked]>
References: <[email-masked]>
X-Mailer: VM 6.72 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 24 23:18:04 2001
X-Original-Date: Wed, 24 Jan 2001 11:18:41 +0100 (MET)

Thorsten Ostermann writes:
> Firtst of all: Hello everybody, I'm Thorsten Ostermann, student in
> germany. I'm new to this list, so I thought it would be a nice idea to
> say hello ;-)
>
> > I am working on cross compiling avr-gcc on Linux for Win32, because
> > the (now used) cygwin environment change my pathes (c:\test ->
> > /cygdrive/c/test).
>
> > My compiled binaries work fine, but because of the path-issue are
> > yet not useable for AvrStudio.
>
> Does this mean you plan to release a new avr-gcc binary for windows? I
> asked Volker Oth for an update some days ago, but he said he does not
> have the time to make this job. But as a long time windows user, I
> prefer 'ready to run' distributions ;-)
>

Why do people use cygwin to compile? I would prefer mingw, which
should preserve dos-pathes and doesn't need a cygnus special DLL, only
either MS supplied MSVCRT or CRTDLL.

Bye

Uwe Bonnes [email-masked]

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

From [email-masked] Thu Jan 25 05:00:11 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14LSLB-0003Si-00
for <[email-masked]>; Thu, 25 Jan 2001 05:00:10 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id QAA03492;
Wed, 24 Jan 2001 16:59:30 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: Larry Barello <[email-masked]>,
AVR GCC List <[email-masked]>
References: <[email-masked]> <[email-masked]> <026b01c08617$61f21a00$0200000a@larry>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Re: Got AvrStudio 3.2 to work with avr-gcc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 25 05:01:04 2001
X-Original-Date: Wed, 24 Jan 2001 16:59:28 +0100

Hello Larry,

Larry Barello schrieb:

I found that mingw has moved to sourcefourge. Just got some fresh
mingw32 stuff to play with.

> Although Michael Rickman doesn't seem to be involved with
> avr stuff any more, he might be able to point you in the
> right direction in getting GCC to compile with ming32 (he
> was the one who did the volker port).

I already emailed him a few days ago, but didn't get an answer. :-(

> He actually has his notes for the ming32 port:
> http://www.gwdg.de/~mrickma/ming/

These notes only apply to GDB.

I dont have the time to hack on the GCC sources and mingw32 libc to fit
to each other. I want to know a somehow straight way. There must be a
possibility to cross compile GCC using itself without much pain.

Thanks for your help!

Greetings

Gunnar

From [email-masked] Thu Jan 25 06:58:28 2001
Received: from mtiwmhc28.worldnet.att.net ([204.127.131.36])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14LUBf-0003bn-00
for <[email-masked]>; Thu, 25 Jan 2001 06:58:28 +1300
Received: from jimanji ([12.77.87.207]) by mtiwmhc28.worldnet.att.net
(InterMail vM.4.01.03.10 201-229-121-110) with SMTP
id <20010124175937.ORJE2550.mtiwmhc28.worldnet.att.net@jimanji>
for <[email-masked]>; Wed, 24 Jan 2001 17:59:37 +0000
Message-ID: <[email-masked]>
Reply-To: "Jim Pearce" <[email-masked]>
From: "Jim Pearce" <[email-masked]>
To: <[email-masked]>
Organization: Pegasus Technologies
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] GCC and uC_OS-II
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 25 06:59:04 2001
X-Original-Date: Wed, 24 Jan 2001 12:59:25 -0500

Hello List,

I am new to this list so greetings to all.

I wonder if anyone has translated to port of uC_OS-II that was made for the IAR AVR
compiler to the GCC AVR.

Thanks!

From [email-masked] Thu Jan 25 23:37:50 2001
Received: from bw211zhb.bluewin.ch ([195.186.1.211] helo=mta2n.bluewin.ch)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Ljmo-0004Ia-00
for <[email-masked]>; Thu, 25 Jan 2001 23:37:50 +1300
Received: from bw150zhb.bluewin.ch (172.21.1.38) by mta2n.bluewin.ch (5.1.056)
id 3A6F47A700002706 for [email-masked]; Wed, 24 Jan 2001 22:53:43 +0100
Received: from homepc (bw1-40pub39.bluewin.ch [195.186.40.39])
by bw150zhb.bluewin.ch (8.9.3/8.9.3) with SMTP id WAA12591
for <[email-masked]>; Wed, 24 Jan 2001 22:53:41 +0100 (MET)
Message-ID: <001401c08650$220da880$2728bac3@homepc>
From: "Peter Fleury" <[email-masked]>
To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] Binary of avr-libc with AVR Studio uploaded.
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Jan 25 23:38:04 2001
X-Original-Date: Wed, 24 Jan 2001 22:53:44 +0100

Hi,

Some or all expect me seem to have trouble debugging using=20
AVR Studio.

A gave some hints on this list how to compile avr-libc sources=20
on your PC, but this didn't seem to help.

I have prepared a zip-file with the whole \avrgcc\avr\lib
tree including installation instructions and uploaded it
on my home page:=20
http://members.nbci.com/_XMCM/peterfleury/avr-devtools.html

You still need to download the avr-binutils and avr-gcc from
gunnars site.

I hope that this helps.

Regards
Peter Fleury

From [email-masked] Fri Jan 26 06:34:19 2001
Received: from mail1.rdc1.il.home.com ([24.2.1.76])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14LqHq-0004dD-00
for <[email-masked]>; Fri, 26 Jan 2001 06:34:18 +1300
Received: from home.com ([24.15.107.158]) by mail1.rdc1.il.home.com
(InterMail vM.4.01.03.00 201-229-121) with ESMTP
id <[email-masked]>
for <[email-masked]>; Thu, 25 Jan 2001 09:35:55 -0800
Message-ID: <[email-masked]>
From: Charlie Brown <[email-masked]>
X-Mailer: Mozilla 4.7 [en] (Win98; U)
X-Accept-Language: en,el
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] stk500
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 26 06:35:04 2001
X-Original-Date: Thu, 25 Jan 2001 11:39:49 -0600

this is off topic a bit but i'm wondering if anyone knows a non-windows
(dos/bsd/linux) programmer software for stk500
turns out there's a command line version for stk500 but
it only runs in a windows dos-box not real dos
thanks ;)

i'm getting to avr-gcc, be patient..
i'm new to all this avr stuff ;)
have a nice day :)

From [email-masked] Fri Jan 26 08:11:30 2001
Received: from sys27.hou.wt.net ([205.230.159.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Lrnt-0004hG-00
for <[email-masked]>; Fri, 26 Jan 2001 08:11:29 +1300
Received: from wt.net (wm.hou.wt.net [216.119.141.200])
by sys27.hou.wt.net (8.9.3/8.9.3) with SMTP id NAA59964
for <[email-masked]>; Thu, 25 Jan 2001 13:13:08 -0600 (CST)
From: "Mike Jones" <[email-masked]>
Reply-to: [email-masked]
To: <[email-masked]>
Subject: Re: [avr-gcc-list] Binary of avr-libc with AVR Studio uploaded.
X-Mailer: DMailWeb Web to Mail Gateway 2.4e, http://netwinsite.com/top_mail.htm
Message-id: <[email-masked]>
X-User-Info: 149.58.101.253
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 26 08:12:04 2001
X-Original-Date: Thu, 25 Jan 2001 13:13:10 +0600

The make.exe that you included will not run under Windows NT 4.0. It claims
it is not a valid Windows program. This is even from within a cmd promt
window.

The make.exe that was in the old release did run OK but messes up the paths
in the obj files with the CYGWIN stuff.

Any ideas? I will confim proper operation in Windows 98 tonight, at home.

Mike

>Hi,
>
>Some or all expect me seem to have trouble debugging using
>AVR Studio.
>
>A gave some hints on this list how to compile avr-libc sources
>on your PC, but this didn't seem to help.
>
>I have prepared a zip-file with the whole \avrgcc\avr\lib
>tree including installation instructions and uploaded it
>on my home page:
> http://members.nbci.com/_XMCM/peterfleury/avr-devtools.html
>
>You still need to download the avr-binutils and avr-gcc from
>gunnars site.
>
>I hope that this helps.
>
>Regards
> Peter Fleury
>
>
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
>

From [email-masked] Fri Jan 26 08:11:56 2001
Received: from sys27.hou.wt.net ([205.230.159.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14LroK-0004hL-00
for <[email-masked]>; Fri, 26 Jan 2001 08:11:56 +1300
Received: from wt.net (wm.hou.wt.net [216.119.141.200])
by sys27.hou.wt.net (8.9.3/8.9.3) with SMTP id NAA60020
for <[email-masked]>; Thu, 25 Jan 2001 13:13:36 -0600 (CST)
From: "Mike Jones" <[email-masked]>
Reply-to: [email-masked]
To: <[email-masked]>
Subject: Re: [avr-gcc-list] Binary of avr-libc with AVR Studio uploaded.
X-Mailer: DMailWeb Web to Mail Gateway 2.4e, http://netwinsite.com/top_mail.htm
Message-id: <[email-masked]>
X-User-Info: 149.58.101.253
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 26 08:12:31 2001
X-Original-Date: Thu, 25 Jan 2001 13:13:39 +0600

The make.exe that you included will not run under Windows NT 4.0. It claims
it is not a valid Windows program. This is even from within a cmd promt
window.

The make.exe that was in the old release did run OK but messes up the paths
in the obj files with the CYGWIN stuff.

Any ideas? I will confim proper operation in Windows 98 tonight, at home.

Mike

>Hi,
>
>Some or all expect me seem to have trouble debugging using
>AVR Studio.
>
>A gave some hints on this list how to compile avr-libc sources
>on your PC, but this didn't seem to help.
>
>I have prepared a zip-file with the whole \avrgcc\avr\lib
>tree including installation instructions and uploaded it
>on my home page:
> http://members.nbci.com/_XMCM/peterfleury/avr-devtools.html
>
>You still need to download the avr-binutils and avr-gcc from
>gunnars site.
>
>I hope that this helps.
>
>Regards
> Peter Fleury
>
>
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
>

From [email-masked] Fri Jan 26 15:54:39 2001
Received: from mtiwmhc22.worldnet.att.net ([204.127.131.47])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Lz27-0004zz-00
for <[email-masked]>; Fri, 26 Jan 2001 15:54:39 +1300
Received: from jimanji ([12.77.87.68]) by mtiwmhc22.worldnet.att.net
(InterMail vM.4.01.03.10 201-229-121-110) with SMTP
id <20010126025547.KGPT2072.mtiwmhc22.worldnet.att.net@jimanji>
for <[email-masked]>; Fri, 26 Jan 2001 02:55:47 +0000
Message-ID: <[email-masked]>
Reply-To: "Jim Pearce" <[email-masked]>
From: "Jim Pearce" <[email-masked]>
To: <[email-masked]>
Organization: Pegasus Technologies
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] (no subject)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 26 15:55:04 2001
X-Original-Date: Thu, 25 Jan 2001 21:55:21 -0500

For all of you GCC experts out there, I apologize in advance if this is too obvious a
question!

I loaded the stuff per Peter's instructions. I also loaded Volker's old stuff to get his
test suite along with their make files.

I can do error free builds of the first 8 test cases but the ninth includes some assembler
files and it barfs. Here is the screen:

-------------------------------------------------------------- Begin
DOS -------------------------------------
C:\avrgcc\test\gcctest9>make
avr-gcc -x assembler-with-cpp -gstabs -mmcu=at90s8515 -I. sqrtMike.s -o sqrtMike.o
/cygdrive/c/AVRGCC/BIN/../lib/gcc-lib/avr/2.97/../../../../avr/lib/crts8515.o: In function
`__c_startup__':
C:/AVRGCC/avr/lib/src/gcrt1.S:287: undefined reference to `main'
C:\AVRGCC\BIN\MAKE.EXE: *** [sqrtMike.o] Error 1

C:\avrgcc\test\gcctest9>
------------------------------------------------------------ End
DOS -----------------------------------------

Well, I'm more than a little bewildered! I don't know where any of this crts8515.o stuff
came from in the process of assembling sqrtMike.s.

Does anyone have any hints?

Jim

******************************************************************************************
********************
Jim Pearce, PE W4DY V - (865) 717-1019
http://www.pegasustech.com
Director, Pegasus Technologies F - (865) 717-1044 http://sss-mag.com
254 Babbs Rd.
Lenoir City, TN 37771
******************************************************************************************
********************

From [email-masked] Fri Jan 26 17:39:43 2001
Received: from sttlpop4.sttl.uswest.net ([206.81.192.4])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14M0fm-00054V-00
for <[email-masked]>; Fri, 26 Jan 2001 17:39:42 +1300
Received: (qmail 15950 invoked by alias); 26 Jan 2001 04:40:55 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 15928 invoked by uid 0); 26 Jan 2001 04:40:55 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop4.sttl.uswest.net with SMTP; 26 Jan 2001 04:40:55 -0000
Message-ID: <009101c08752$a27330a0$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "Jim Pearce" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] (no subject)
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 26 17:40:04 2001
X-Original-Date: Thu, 25 Jan 2001 20:43:53 -0800

You didn't tell the compiler to just generate an object
module, so it tried to link it with the C runtime (gcrt1.s)
so you could load and execute the module. Since your module
probably didn't have main(void) {} in it, the linker barfed.

gcrt1.o comes from c:\avrgcc\avr\lib

Try adding the -c option to your command line.

Try avr-gcc --help | more to see all the options available
(!).

Cheers!

----- Original Message -----
From: "Jim Pearce" <[email-masked]>
> I can do error free builds of the first 8 test cases but
the ninth includes some assembler
> files and it barfs. Here is the screen:
>
> ----------------------------------------------------------
---- Begin
> DOS -------------------------------------
> C:\avrgcc\test\gcctest9>make
> avr-gcc -x
assembler-with-cpp -gstabs -mmcu=at90s8515 -I.
sqrtMike.s -o sqrtMike.o
>
/cygdrive/c/AVRGCC/BIN/../lib/gcc-lib/avr/2.97/../../../../a
vr/lib/crts8515.o: In function
> `__c_startup__':
> C:/AVRGCC/avr/lib/src/gcrt1.S:287: undefined reference to
`main'
> C:\AVRGCC\BIN\MAKE.EXE: *** [sqrtMike.o] Error 1
>
>

From [email-masked] Fri Jan 26 20:46:30 2001
Received: from nets5.rz.rwth-aachen.de ([137.226.144.13])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14M3aX-0005CC-00
for <[email-masked]>; Fri, 26 Jan 2001 20:46:29 +1300
Received: from Ostermann-net.de (s4m095.dialup.RWTH-Aachen.DE [137.226.8.95])
by nets5.rz.rwth-aachen.de (8.10.1/8.10.1/6) with SMTP id f0Q7mCP10495
for <[email-masked]>; Fri, 26 Jan 2001 08:48:12 +0100 (MET)
Message-Id: <[email-masked]>
From: Thorsten Ostermann <[email-masked]>
To: [email-masked]
X-Mailer: Thorsten Ostermann's registered AK-Mail 3.1 publicbeta2a [ger]
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] Re: stk500
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 26 20:47:04 2001
X-Original-Date: Fri, 26 Jan 2001 08:35:01 +0100

Hi Charlie

> this is off topic a bit but i'm wondering if anyone knows a
> non-windows (dos/bsd/linux) programmer software for stk500
> turns out there's a command line version for stk500 but
> it only runs in a windows dos-box not real dos

I don't knwo the STK500, but Ponyprog is available both for Windows and
Linux:
http://www.LancOS.com
And IIRC SP12 should fit for pure DOS:
http://www.xs4all.nl/~sbolt/e-spider_prog.html

Best regards
Thorsten
--
PGP welcome!
Thorsten online: http://www.ostermann-net.de/electronic/
Rund um Schrittmotor, Fr=E4s-Bohr-Plotter & Mikrocontroller

From [email-masked] Fri Jan 26 22:50:44 2001
Received: from atusks01.alcatel.at ([212.183.9.130] helo=mail.alcatel.at)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14M5Wl-0005Hb-00
for <[email-masked]>; Fri, 26 Jan 2001 22:50:43 +1300
Received: from alcatel.at (atusel33.aut.alcatel.at [146.112.129.215])
by mail.alcatel.at (8.9.3/8.9.3/1.20 01/12/01 22:50:08) with ESMTP id KAA25120;
Fri, 26 Jan 2001 10:52:15 +0100 (MET)
Message-ID: <[email-masked]>
From: Christoph Plattner <[email-masked]>
Organization: AAA
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.5.1 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
To: Charlie Brown <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] stk500
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 26 22:51:04 2001
X-Original-Date: Fri, 26 Jan 2001 10:52:15 +0100

I does not know st500, but the linux `uisp' tool can
be adapted and used for programming AVR chips. The parallel
printer port is connected to the in-system programming lines
directly or via adapters, like Altera's Byte-Blaster, and
you can program. This program tool can also be used inside
built process. For examale:
make all
make program
Second line programs the chip.

With friendly regards

-----------------------------------------------------------------
private: [email-masked]
company: [email-masked]

Charlie Brown wrote:
>
> this is off topic a bit but i'm wondering if anyone knows a non-windows
> (dos/bsd/linux) programmer software for stk500
> turns out there's a command line version for stk500 but
> it only runs in a windows dos-box not real dos
> thanks ;)
>
> i'm getting to avr-gcc, be patient..
> i'm new to all this avr stuff ;)
> have a nice day :)
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Fri Jan 26 23:05:53 2001
Received: from hertz.ikp.physik.tu-darmstadt.de ([130.83.24.91])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14M5lQ-0005Il-00
for <[email-masked]>; Fri, 26 Jan 2001 23:05:52 +1300
Received: (from bon@localhost)
by hertz.ikp.physik.tu-darmstadt.de (8.10.2/8.10.2/SuSE Linux 8.10.0-0.3) id f0QA7cm13742;
Fri, 26 Jan 2001 11:07:38 +0100
From: Uwe Bonnes <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <[email-masked]>
To: [email-masked]
X-Mailer: VM 6.72 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid
Subject: [avr-gcc-list] UISP
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 26 23:06:04 2001
X-Original-Date: Fri, 26 Jan 2001 11:07:38 +0100 (MET)

Hallo,

has there been any new release of the UIPS?

There have been many problems compiling the last release I know (
uisp-0.2b-1026) with regard of the parallel port. E.g. I once posted a
patch to use /dev/parport access against the direct port access and
has some problems with device recognition.

Bye

Uwe Bonnes [email-masked]

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

From [email-masked] Fri Jan 26 23:22:13 2001
Received: from atusks01.alcatel.at ([212.183.9.130] helo=mail.alcatel.at)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14M61E-0005Jy-00
for <[email-masked]>; Fri, 26 Jan 2001 23:22:13 +1300
Received: from alcatel.at (atusel33.aut.alcatel.at [146.112.129.215])
by mail.alcatel.at (8.9.3/8.9.3/1.20 01/12/01 22:50:08) with ESMTP id LAA26486;
Fri, 26 Jan 2001 11:20:35 +0100 (MET)
Message-ID: <[email-masked]>
From: Christoph Plattner <[email-masked]>
Organization: AAA
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.5.1 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
To: Uwe Bonnes <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] UISP
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Jan 26 23:23:04 2001
X-Original-Date: Fri, 26 Jan 2001 11:20:35 +0100

I think, there was one update, but I don't know, where I have
found it, and I also have not tested it yet.

With friendly regards

Christoph Plattner

Uwe Bonnes wrote:
>
> Hallo,
>
> has there been any new release of the UIPS?
>
> There have been many problems compiling the last release I know (
> uisp-0.2b-1026) with regard of the parallel port. E.g. I once posted a
> patch to use /dev/parport access against the direct port access and
> has some problems with device recognition.
>
> Bye
>
> Uwe Bonnes [email-masked]
>
> Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
> --------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

-----------------------------------------------------------------
private: [email-masked]
company: [email-masked]

From [email-masked] Sat Jan 27 04:28:05 2001
Received: from gold.uni-miskolc.hu ([193.6.10.1])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14MAnE-0005Y2-00
for <[email-masked]>; Sat, 27 Jan 2001 04:28:04 +1300
Received: from gold.uni-miskolc.hu (muszer.alt.uni-miskolc.hu [193.6.3.15])
by gold.uni-miskolc.hu (8.10.0/8.10.0) with ESMTP id f0QGRNf143402
for <[email-masked]>; Fri, 26 Jan 2001 16:27:24 GMT
Message-ID: <[email-masked]>
From: Peter Bozzay <[email-masked]>
Organization: University of Miskolc, Department of Logistics
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: hu
MIME-Version: 1.0
CC: [email-masked]
Subject: Re: [avr-gcc-list] UISP
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 27 04:29:04 2001
X-Original-Date: Fri, 26 Jan 2001 16:26:47 +0100

Hi,

> I think, there was one update, but I don't know, where I have
> found it, and I also have not tested it yet.
> > There have been many problems compiling the last release I know (
> > uisp-0.2b-1026) with regard of the parallel port. E.g. I once posted a
> > patch to use /dev/parport access against the direct port access and
> > has some problems with device recognition.

There are some versions here, the last is dated 16.12.2000.

www1.itnet.pl/amelektr/avr/uisp/

I've just downloaded, so not tested yet.

Regards,
Peter

From [email-masked] Sat Jan 27 04:35:57 2001
Received: from mtiwmhc22.worldnet.att.net ([204.127.131.47])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14MAur-0005Yg-00
for <[email-masked]>; Sat, 27 Jan 2001 04:35:57 +1300
Received: from jimanji ([12.77.84.37]) by mtiwmhc22.worldnet.att.net
(InterMail vM.4.01.03.10 201-229-121-110) with SMTP
id <20010126153713.PSRE2072.mtiwmhc22.worldnet.att.net@jimanji>
for <[email-masked]>; Fri, 26 Jan 2001 15:37:13 +0000
Message-ID: <[email-masked]>
Reply-To: "Jim Pearce" <[email-masked]>
From: "Jim Pearce" <[email-masked]>
To: <[email-masked]>
Organization: Pegasus Technologies
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] Error in Nordic object file
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 27 04:36:04 2001
X-Original-Date: Fri, 26 Jan 2001 10:36:46 -0500

Thanks Larry, the -c switch did the trick. For those of you who may be trying to use Volker's test cases and make files, you will
need to add this
switch to his make2 file. For GCCTEST9 to compile successfully you will need to edit the io8515.h file to add a definition for
16-bit access to
TCNT1 since he uses the macro __inw_atomic(TCNT1) and the io*.h files only define 8-bit access.

I am now trying to use the AVRStudio V3.21 and get the same error that Gunnar got earlier: One or More files cannot be found ->
Error in Nordic object
file.

I am using the avr-objcopy program as follows:

avr-objcopy -O avrobj gcctest9.elf gcctest9.obj
avr-objcopy -O srec gcctest9.elf gcctest9.rom
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" -O srec gcctest9.elf gcctest9.eep

Does anyone see a problem here or have other suggestions on getting AVRStudio to accept the obj file?

Thanks all-- Jim

From [email-masked] Sat Jan 27 05:19:15 2001
Received: from sttlpop4.sttl.uswest.net ([206.81.192.4])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14MBak-0005bI-00
for <[email-masked]>; Sat, 27 Jan 2001 05:19:14 +1300
Received: (qmail 38690 invoked by alias); 26 Jan 2001 16:20:31 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 38678 invoked by uid 0); 26 Jan 2001 16:20:31 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop4.sttl.uswest.net with SMTP; 26 Jan 2001 16:20:31 -0000
Message-ID: <002901c087b4$5e1e9720$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "Jim Pearce" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Error in Nordic object file
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-Mimeole: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 27 05:20:04 2001
X-Original-Date: Fri, 26 Jan 2001 08:23:00 -0800

The compiler is substituting "/cygwin/c" for "c:/" in the
paths to source modules. Astudio can't figure this out and
craps. Peter Fleury is not having this problem with
Gunnar's binaries, but everyone else is and it is very
confusing and frustrating because the current compiler is so
much cleaner/nicer than Volker's version (a year of
development will do that, you know :)

It is a limitation(?) of astudio that the source needs to be
in the directory that it was when the module was
compiled/assembled (debug information is largely pointers to
source files...) or it complains. It sure would be swell if
Atmel amended Astudio so one could put in a search path...

----- Original Message -----
From: "Jim Pearce" <[email-masked]>
>
> I am now trying to use the AVRStudio V3.21 and get the
same error that Gunnar got earlier: One or More files cannot
be found ->
> Error in Nordic object
> file.
>
> I am using the avr-objcopy program as follows:
>
> avr-objcopy -O avrobj gcctest9.elf gcctest9.obj
> avr-objcopy -O srec gcctest9.elf gcctest9.rom
> avr-objcopy -j
.eeprom --set-section-flags=.eeprom="alloc,load" -O srec
gcctest9.elf gcctest9.eep
>
> Does anyone see a problem here or have other suggestions
on getting AVRStudio to accept the obj file?
>
>

From [email-masked] Sat Jan 27 08:01:34 2001
Received: from mtiwmhc22.worldnet.att.net ([204.127.131.47])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ME7p-0005ms-00
for <[email-masked]>; Sat, 27 Jan 2001 08:01:33 +1300
Received: from jimanji ([12.77.84.37]) by mtiwmhc22.worldnet.att.net
(InterMail vM.4.01.03.10 201-229-121-110) with SMTP
id <20010126190245.SICG2072.mtiwmhc22.worldnet.att.net@jimanji>;
Fri, 26 Jan 2001 19:02:45 +0000
Message-ID: <[email-masked]>
Reply-To: "Jim Pearce" <[email-masked]>
From: "Jim Pearce" <[email-masked]>
To: "Larry Barello" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]> <002901c087b4$5e1e9720$0200000a@larry>
Subject: Re: [avr-gcc-list] Error in Nordic object file
Organization: Pegasus Technologies
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 27 08:02:04 2001
X-Original-Date: Fri, 26 Jan 2001 14:02:18 -0500

"Confusing and frustrating" I Couldn't have put it better myself! I have gone back over this list's archive trying to see it there
was anything that I missed about the cygwin problem -- I did not find anything. I am confused about the cygwin path issue. Is it
avr-gcc.exe, make.exe, or the libc that is the problem? I believe that I followed Peter Fleury's instructions to the letter but
I still get the Astudio problem.

Thanks all -- I feel better now.

Jim

----- Original Message -----
From: "Larry Barello" <[email-masked]>
To: "Jim Pearce" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
Sent: Friday, January 26, 2001 11:23 AM
Subject: Re: [avr-gcc-list] Error in Nordic object file

> The compiler is substituting "/cygwin/c" for "c:/" in the
> paths to source modules. Astudio can't figure this out and
> craps. Peter Fleury is not having this problem with
> Gunnar's binaries, but everyone else is and it is very
> confusing and frustrating because the current compiler is so
> much cleaner/nicer than Volker's version (a year of
> development will do that, you know :)
>
> It is a limitation(?) of astudio that the source needs to be
> in the directory that it was when the module was
> compiled/assembled (debug information is largely pointers to
> source files...) or it complains. It sure would be swell if
> Atmel amended Astudio so one could put in a search path...
>

From [email-masked] Sat Jan 27 09:00:12 2001
Received: from sttlpop4.sttl.uswest.net ([206.81.192.4])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14MF2Z-0005pp-00
for <[email-masked]>; Sat, 27 Jan 2001 09:00:11 +1300
Received: (qmail 11164 invoked by alias); 26 Jan 2001 20:01:27 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 11098 invoked by uid 0); 26 Jan 2001 20:01:26 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop4.sttl.uswest.net with SMTP; 26 Jan 2001 20:01:26 -0000
Message-ID: <005101c087d3$34905fa0$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]> <002901c087b4$5e1e9720$0200000a@larry> <[email-masked]>
Subject: Re: [avr-gcc-list] Error in Nordic object file
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-Mimeole: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 27 09:01:04 2001
X-Original-Date: Fri, 26 Jan 2001 11:55:04 -0800

It is the compiler. Compile a C program -S and inspect the
resulting assembly file. You will notice that all GCC stuff
(including headers) has the substitution. Anything you
make, no matter where it is found, won't.

This doesn't happen in hand coded assembly files so if you
have a GAS only project you can debug away in astudio. Add
a C file with -g (debug) and you are hosed. Type in
"avr-gcc --print-search-dir and the problem becomes
obvious.

----- Original Message -----
From: "Jim Pearce" <[email-masked]>

> "Confusing and frustrating" I Couldn't have put it better
myself! I have gone back over this list's archive trying to
see it there
> was anything that I missed about the cygwin problem -- I
did not find anything. I am confused about the cygwin path
issue. Is it
> avr-gcc.exe, make.exe, or the libc that is the problem? I
believe that I followed Peter Fleury's instructions to the
letter but

From [email-masked] Sat Jan 27 09:51:19 2001
Received: from pop.gmx.net ([194.221.183.20] helo=mail.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14MFq2-0005sU-00
for <[email-masked]>; Sat, 27 Jan 2001 09:51:18 +1300
Received: (qmail 28356 invoked by uid 0); 26 Jan 2001 20:52:11 -0000
Received: from ppp06.tc.dntis.ro (HELO suiramcompy) (193.230.253.7)
by mail.gmx.net (mail04) with SMTP; 26 Jan 2001 20:52:11 -0000
From: "Marius Harjoi" <[email-masked]>
To: <[email-masked]>
Subject: RE: [avr-gcc-list] Error in Nordic object file
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-Mimeole: Produced By Microsoft MimeOLE V5.50.4133.2400
Importance: Normal
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 27 09:52:03 2001
X-Original-Date: Fri, 26 Jan 2001 22:58:45 +0200

Hello all,

I didn't try that, but someone who did have compiled source code under
cygnus for the new version of gcc may try to write a program which scan the
created obj file and replace every occurrence of "/c/cygwin/dir1/dir2" with
" c:\dir1\dir2". It's not a solution but It may work...

Marius

-----Original Message-----
From: [email-masked]
[mailto:[email-masked]]On Behalf Of Jim Pearce
Sent: 26 ianuarie 2001 17:37
To: [email-masked]
Subject: [avr-gcc-list] Error in Nordic object file

Thanks Larry, the -c switch did the trick. For those of you who may be
trying to use Volker's test cases and make files, you will
need to add this
switch to his make2 file. For GCCTEST9 to compile successfully you will
need to edit the io8515.h file to add a definition for
16-bit access to
TCNT1 since he uses the macro __inw_atomic(TCNT1) and the io*.h files only
define 8-bit access.

I am now trying to use the AVRStudio V3.21 and get the same error that
Gunnar got earlier: One or More files cannot be found ->
Error in Nordic object
file.

I am using the avr-objcopy program as follows:

avr-objcopy -O avrobj gcctest9.elf gcctest9.obj
avr-objcopy -O srec gcctest9.elf gcctest9.rom
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" -O srec
gcctest9.elf gcctest9.eep

Does anyone see a problem here or have other suggestions on getting
AVRStudio to accept the obj file?

Thanks all-- Jim

_______________________________________________
avr-gcc-list mailing list
[email-masked]
http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Sat Jan 27 14:05:58 2001
Received: from [24.25.2.13] (helo=bsdhome.dyndns.org)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14MJoT-00064k-00
for <[email-masked]>; Sat, 27 Jan 2001 14:05:58 +1300
Received: from vger.bsdhome.com (vger [192.168.220.2])
by bsdhome.dyndns.org (8.11.1/8.11.1) with ESMTP id f0R17Eo42088;
Fri, 26 Jan 2001 20:07:14 -0500 (EST)
(envelope-from [email-masked])
Received: (from bsd@localhost)
by vger.bsdhome.com (8.11.1/8.11.1) id f0R17DS22712;
Fri, 26 Jan 2001 20:07:13 -0500 (EST)
(envelope-from bsd)
From: Brian Dean <[email-masked]>
To: Charlie Brown <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] stk500
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Thu, Jan 25, 2001 at 11:39:49AM -0600
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 27 14:06:04 2001
X-Original-Date: Fri, 26 Jan 2001 20:07:13 -0500

On Thu, Jan 25, 2001 at 11:39:49AM -0600, Charlie Brown wrote:
> this is off topic a bit but i'm wondering if anyone knows a non-windows
> (dos/bsd/linux) programmer software for stk500
> turns out there's a command line version for stk500 but
> it only runs in a windows dos-box not real dos
> thanks ;)

Well, I'll throw in a plug for my programming software. See:

http://www.bsdhome.com/avrprog/

It probably won't work on your stk500, but building the programmer for
my software is _really_ simple - only 6 wires connected to the
parallel port.

The main caveat is that it currently only supports FreeBSD. I don't
have a Linux system for porting the software, but I'll gladly accept
patches.

-Brian
--
Brian Dean [email-masked]

From [email-masked] Sat Jan 27 22:43:40 2001
Received: from bw211zhb.bluewin.ch ([195.186.1.211] helo=mta2n.bluewin.ch)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14MRtU-0006SK-00
for <[email-masked]>; Sat, 27 Jan 2001 22:43:40 +1300
Received: from bw150zhb.bluewin.ch (172.21.1.38) by mta2n.bluewin.ch (5.1.056)
id 3A702AFF0006BDDB for [email-masked]; Sat, 27 Jan 2001 10:44:57 +0100
Received: from homepc (bw3-8pub135.bluewin.ch [62.202.8.135])
by bw150zhb.bluewin.ch (8.9.3/8.9.3) with SMTP id KAA13646
for <[email-masked]>; Sat, 27 Jan 2001 10:44:57 +0100 (MET)
Message-ID: <002101c08845$d51332a0$8708ca3e@homepc>
From: "Peter Fleury" <[email-masked]>
To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] Found Solution for avr-gcc path problem
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Jan 27 22:44:04 2001
X-Original-Date: Sat, 27 Jan 2001 10:39:54 +0100

I finally found the reason why avr-gcc added a strange prefix to=20
the pathnames in the *.obj file.

It was a missing Windows Registry entry which is needed to=20
correctly translate pathnames into Windows drive:/directory/file.

The neccessary Windows Registry Fix can be found on my homepage:
http://members.nbci.com/_XMCM/peterfleury/avr-devtools.html

It will only work when the directory \avrgcc resides on=20
drive or partion C:

Peter Fleury

From [email-masked] Sun Jan 28 01:45:28 2001
Received: from [211.36.228.81] (helo=mail.sorimail.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14MUjQ-0006bc-00
for <[email-masked]>; Sun, 28 Jan 2001 01:45:28 +1300
Received: from kainote (unverified [211.186.101.148]) by mail.sorimail.net
(EMWAC SMTPRS 0.83) with SMTP id <[email-masked]>;
Sat, 27 Jan 2001 21:56:04 +0900
Message-ID: <007001c0885f$8809d3f0$3200a8c0@kainote>
From: "Woo-Hyun Kim" <[email-masked]>
To: "Peter Fleury" <[email-masked]>
Cc: "AVR Mailing List" <[email-masked]>
References: <002101c08845$d51332a0$8708ca3e@homepc>
Subject: Re: [avr-gcc-list] Found Solution for avr-gcc path problem
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: base64
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 28 01:46:03 2001
X-Original-Date: Sat, 27 Jan 2001 21:49:04 +0900

QnkgYXBwbHlpbmcgeW91ciBXaW5kb3dzIFJlZ2lzdHJ5IEZpeCwgSSBjb3VsZCBnZXQgYXZyLWdj
YyB3aXRoIEFWUi1TdHVkaW8gc3VwcG9ydC4NCkkgYWxzbyBjaGFuZ2VkIGF2cmdjYyBkaXJlY3Rv
cnkgZnJvbSAiYzpcYXZyZ2NjIiB0byAiYzpcdG9vbHNcYXZyZ2NjIiBpcyBwb3NzaWJsZSBieSBy
ZS1jb21waWxpbmcgbGliYy4NCkkgbWV0IGZvbGxvd2luZyBwcm9ibGVtcyB3aGVuIHJlLWNvbXBp
bGluZyBsaWJjLg0KDQoxLiBZb3VyIG1ha2UuZXhlIGluICJhdnItbGliYy0yMDAwMTEyNS1hdnJz
dHVkaW8uemlwIiBpcyB1bmV4Y3V0YWJsZSBvbiBteSBzeXN0ZW0od2luMmspLg0KPT4gU28gSSBj
aGFuZ2VkIHRvIG1ha2UuZXhlIGZyb20gIlZvbGtlciBPdGgicyBhdnItZ2NjIGRpc3RyaWJ1dGlv
bi4NCg0KMi4gWW91ciBtYWtlZmlsZSBpbiBhdnJnY2NcYXZyXGxpYlxzcmMgY2FuJ3QgY2xlYW4g
b2xkLWNvbXBpbGVkIGxpYmMuDQo9PiBJIGFkZGVkIHRoZSBmb2xsb3dpbmcgdGFyZ2V0IHRvIHRo
ZSBlbmQgb2YgeW91ciBtYWtlZmlsZQ0KDQpuZXdfY2xlYW4gOg0KICAgIHJtIC1yZiBhdnIzIGF2
cjQgYXZyNQ0KICAgIHJtIC1yZiBsaWJjIGxpYm0NCiAgICBybSAtcmYgLi5cYXZyMyAuLlxhdnI0
IC4uXGF2cjUNCiAgICBybSAtcmYgLi5cbGliYyAuLlxsaWJtDQogICAgbWtkaXIgYXZyMw0KICAg
IG1rZGlyIGF2cjQNCiAgICBta2RpciBhdnI1DQogICAgbWtkaXIgYXZyM1xsaWJjDQogICAgbWtk
aXIgYXZyNFxsaWJjDQogICAgbWtkaXIgYXZyNVxsaWJjDQogICAgbWtkaXIgYXZyM1xsaWJtDQog
ICAgbWtkaXIgYXZyNFxsaWJtDQogICAgbWtkaXIgYXZyNVxsaWJtDQogICAgbWtkaXIgbGliYw0K
ICAgIG1rZGlyIGxpYm0NCiAgICBta2RpciAuLlxhdnIzDQogICAgbWtkaXIgLi5cYXZyNA0KICAg
IG1rZGlyIC4uXGF2cjUNCiAgICBta2RpciAuLlxhdnIzXGxpYmMNCiAgICBta2RpciAuLlxhdnI0
XGxpYmMNCiAgICBta2RpciAuLlxhdnI1XGxpYmMNCiAgICBta2RpciAuLlxhdnIzXGxpYm0NCiAg
ICBta2RpciAuLlxhdnI0XGxpYm0NCiAgICBta2RpciAuLlxhdnI1XGxpYm0NCiAgICBta2RpciAu
LlxsaWJjDQogICAgbWtkaXIgLi5cbGlibQ0KDQpUaGVuIEkgZGlkDQpjOlx0b29sc1xhdnJnY2Nc
YXZyXGxpYlxzcmM+IG1ha2UgbmV3X2NsZWFuDQpjOlx0b29sc1xhdnJnY2NcYXZyXGxpYlxzcmM+
IG1ha2UNCmM6XHRvb2xzXGF2cmdjY1xhdnJcbGliXHNyYz4gbWFrZSBpbnN0YWxsDQoNCk5vdyBt
eSBhdnJnY2MgaXMgaW4gYzpcdG9vbHNcYXZyZ2NjIGFuZCBJJ20gdmVyeSBoYXBweSAhIDotKQ0K
ZXhjZXB0IHRoYXQgSSBjYW4ndCB1c2UgYnJlYWtwb2ludCBpbiBBVlItU3R1ZGlvLg0KDQpJIHJl
YWxseSB0aGFuayB0byBhdnJnY2MgZGV2ZWxvcGVycyBhbmQgeW91Lg0KDQpXb28tSHl1biBLaW0u
DQoNCg0KLS0tLS0gT3JpZ2luYWwgTWVzc2FnZSAtLS0tLSANCkZyb206ICJQZXRlciBGbGV1cnki
IDxwZmxldXJ5QGdteC5jaD4NClRvOiA8YXZyLWdjYy1saXN0QGF2ci5qcGsuY28ubno+DQpTZW50
OiBTYXR1cmRheSwgSmFudWFyeSAyNywgMjAwMSA2OjM5IFBNDQpTdWJqZWN0OiBbYXZyLWdjYy1s
aXN0XSBGb3VuZCBTb2x1dGlvbiBmb3IgYXZyLWdjYyBwYXRoIHByb2JsZW0NCg0KDQpJIGZpbmFs
bHkgZm91bmQgdGhlIHJlYXNvbiB3aHkgYXZyLWdjYyBhZGRlZCBhIHN0cmFuZ2UgcHJlZml4IHRv
IA0KdGhlIHBhdGhuYW1lcyBpbiB0aGUgKi5vYmogZmlsZS4NCg0KSXQgd2FzIGEgbWlzc2luZyBX
aW5kb3dzIFJlZ2lzdHJ5IGVudHJ5IHdoaWNoIGlzIG5lZWRlZCB0byANCmNvcnJlY3RseSB0cmFu
c2xhdGUgcGF0aG5hbWVzIGludG8gV2luZG93cyBkcml2ZTovZGlyZWN0b3J5L2ZpbGUuDQoNClRo
ZSBuZWNjZXNzYXJ5IFdpbmRvd3MgUmVnaXN0cnkgRml4IGNhbiBiZSBmb3VuZCBvbiBteSBob21l
cGFnZToNCmh0dHA6Ly9tZW1iZXJzLm5iY2kuY29tL19YTUNNL3BldGVyZmxldXJ5L2F2ci1kZXZ0
b29scy5odG1sDQoNCkl0IHdpbGwgb25seSB3b3JrIHdoZW4gdGhlIGRpcmVjdG9yeSBcYXZyZ2Nj
IHJlc2lkZXMgb24gDQpkcml2ZSBvciBwYXJ0aW9uIEM6DQoNClBldGVyIEZsZXVyeQ0KDQoNCg0K
DQoNCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fDQphdnIt
Z2NjLWxpc3QgbWFpbGluZyBsaXN0DQphdnItZ2NjLWxpc3RAYXZyLmpway5jby5ueg0KaHR0cDov
L2F2ci5qcGsuY28ubnovbWFpbG1hbi9saXN0aW5mby9hdnItZ2NjLWxpc3QNCg==

From [email-masked] Sun Jan 28 04:01:31 2001
Received: from invalid.ed.ntnu.no ([129.241.179.15])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14MWr3-0006ge-00
for <[email-masked]>; Sun, 28 Jan 2001 04:01:30 +1300
Received: from localhost (hembre@localhost)
by invalid.ed.ntnu.no (8.9.3/8.9.3) with ESMTP id QAA01068
for <[email-masked]>; Sat, 27 Jan 2001 16:09:13 +0100 (CET)
(envelope-from [email-masked])
From: Bernt Hustad Hembre <[email-masked]>
X-Sender: [email-masked]
To: AVR Mailing List <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] 24 bit integers
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 28 04:02:04 2001
X-Original-Date: Sat, 27 Jan 2001 16:09:13 +0100 (CET)

Hi.

I've tried to find out how int, char, long etc. is defined in gcc for avr.
I'm preaty sure char is 8 bit,
quite sure int is 16 bit
not at all sure that long is 32 bit.

I have a 24bit ADC (HI7191). It return either a 24bit signed or unsigned
integer. And I want to expand it to a 32 bit integer (long?).

Ie. I get adc_data[3] returned from the measuring routine.

I think this is right for unsigned:
thirtytwobit = adc_data[0] + (adc_data[1]*256) + (adc_data[2]*65536);

But how can I get it right for signed values?
Something like this?:
thirtytwobitsigned = (adc_data[0] + (adc_data[1]*256) +
((adc_data[2]&0x7f)*65536)) * (adc_data[2]&0x80) * (-1);

What is the size/accurancy of float, double etc.?
Where are these defined?

Thanks in advance.

Bernie
Tlf.: 92648923
[email-masked]

From [email-masked] Sun Jan 28 05:33:23 2001
Received: from mtiwmhc25.worldnet.att.net ([204.127.131.50])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14MYHy-0006kt-00
for <[email-masked]>; Sun, 28 Jan 2001 05:33:22 +1300
Received: from jimanji ([12.77.85.71]) by mtiwmhc25.worldnet.att.net
(InterMail vM.4.01.03.10 201-229-121-110) with SMTP
id <20010127163442.THIK29713.mtiwmhc25.worldnet.att.net@jimanji>
for <[email-masked]>; Sat, 27 Jan 2001 16:34:42 +0000
Message-ID: <[email-masked]>
Reply-To: "Jim Pearce" <[email-masked]>
From: "Jim Pearce" <[email-masked]>
To: <[email-masked]>
References: <002101c08845$d51332a0$8708ca3e@homepc>
Subject: Re: [avr-gcc-list] Found Solution for avr-gcc path problem
Organization: Pegasus Technologies
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 28 05:34:04 2001
X-Original-Date: Sat, 27 Jan 2001 11:34:34 -0500

The registry fix did the trick! Thank you so much!!!

Now I have to stop goofing off and do some programming!

Jim

From [email-masked] Sun Jan 28 06:44:42 2001
Received: from smtp.tor.axxent.ca ([209.250.128.26] helo=mail.tor.axxent.ca)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14MZOz-0006um-00
for <[email-masked]>; Sun, 28 Jan 2001 06:44:42 +1300
Received: from digicom (dial-0269.tor.axxent.ca [216.249.1.15])
by mail.tor.axxent.ca (8.11.0/8.9.3) with ESMTP id f0RHkVh14018
for <[email-masked]>; Sat, 27 Jan 2001 12:46:31 -0500 (EST)
Received: from cwall by digicom with local (Exim 3.12 #1 (Debian))
id 14MZSd-00004u-00; Sat, 27 Jan 2001 12:48:27 -0500
From: Carl Wall <[email-masked]>
To: AVR Mailing List <[email-masked]>
Subject: Re: [avr-gcc-list] 24 bit integers
Message-ID: <[email-masked]>
Mail-Followup-To: AVR Mailing List <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Sat, Jan 27, 2001 at 04:09:13PM +0100
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 28 06:45:04 2001
X-Original-Date: Sat, 27 Jan 2001 12:48:27 -0500

Bernt

You might want to check out "inttypes.h" which is located in
/usr/local/avr/include/ on my machine, it has what int, etc
are being defined as. Looks like "long" is int32_t and "unsigned
long" is unit32_t, and "long long" is int64_t if you need a few
more bits ;-))
Carl

On Sat, Jan 27, 2001 at 04:09:13PM +0100, Bernt Hustad Hembre wrote:
>
> Hi.
>
> I've tried to find out how int, char, long etc. is defined in gcc for avr.
> I'm preaty sure char is 8 bit,
> quite sure int is 16 bit
> not at all sure that long is 32 bit.
>
> I have a 24bit ADC (HI7191). It return either a 24bit signed or unsigned
> integer. And I want to expand it to a 32 bit integer (long?).
>
> Ie. I get adc_data[3] returned from the measuring routine.
>
> I think this is right for unsigned:
> thirtytwobit = adc_data[0] + (adc_data[1]*256) + (adc_data[2]*65536);
>
> But how can I get it right for signed values?
> Something like this?:
> thirtytwobitsigned = (adc_data[0] + (adc_data[1]*256) +
> ((adc_data[2]&0x7f)*65536)) * (adc_data[2]&0x80) * (-1);
>
> What is the size/accurancy of float, double etc.?
> Where are these defined?
>
> Thanks in advance.
>
> Bernie
> Tlf.: 92648923
> [email-masked]
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
Carl A. Wall VE3APY Toronto, Ontario, Canada
"Created on DEBIAN 2.2, an alternative to Microsoft Systems
and a GNU/Linux distribution of Open Source programming"

From [email-masked] Sun Jan 28 08:16:05 2001
Received: from mail2.rdc1.il.home.com ([24.2.1.77])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14MapR-0008PU-00
for <[email-masked]>; Sun, 28 Jan 2001 08:16:05 +1300
Received: from home.com ([24.15.107.158]) by mail2.rdc1.il.home.com
(InterMail vM.4.01.03.00 201-229-121) with ESMTP
id <[email-masked]>
for <[email-masked]>; Sat, 27 Jan 2001 11:17:50 -0800
Message-ID: <[email-masked]>
From: Charlie Brown <[email-masked]>
X-Mailer: Mozilla 4.7 [en] (Win98; U)
X-Accept-Language: en,el
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
References: <[email-masked]> <009101c08752$a27330a0$0200000a@larry>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] general avr discussion list/newsgroup/something help!
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 28 08:17:04 2001
X-Original-Date: Sat, 27 Jan 2001 13:21:51 -0600

well, i ordered and received an mcu00100 and have been using that to
program.
but i have some questions about how come the schematics for simple
led and switch programs work in the programmers
but not when i make them out on a breadboard
i don't want to bog you down with lots of beginner questions
but i am wondering if you know a good place to ask these?
i know this is gcc-avr mailing list but this is not really gcc related
so, do you know is there a general forum or something for avr that
is a good place to go?
thanks in advance.

if you care to try to help or have a possible solution off hand,
the problem is that when i program the simple led/switch programs they
work
in the dev board but for a at90s1200 program i used from gadre's book
when i wired the schematic up it showed led2 (portb pin 1)
always lighted even when the switch was not pressed
all the other switches work.
same when i use the program preinstalled on the stk500 8515 included
(pressing buttons would change led's, add, rotate, decrement, negate,
etc)
they start moving when i plug it in without pressing buttons.
i have a 6v power supply which really with a voltage tester puts out
more maybe 7v
could too much power perhaps be the problem?
or maybe it is something else??

thanks for any help
charlie b.

From [email-masked] Sun Jan 28 09:32:26 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Mc1J-0008SX-00
for <[email-masked]>; Sun, 28 Jan 2001 09:32:25 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.130])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id XAA23415
for <[email-masked]>; Sat, 27 Jan 2001 23:34:10 +0300
Message-Id: <[email-masked]>
From: Denis Chertykov <[email-masked]>
To: [email-masked]
Subject: [avr-gcc-list] binutils 2.11 branched
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 28 09:33:04 2001
X-Original-Date: Sat, 27 Jan 2001 23:34:09 +0300

I'm very interested in binutils bug reports.

I got following message from the binutils mailing list.

> From: Philip Blundell <[email-masked]>
> Subject: 2.11 branched
> To: [email-masked]
> Date: Sat, 27 Jan 2001 16:53:23 +0000X-From-Line: [email-masked] Sat Jan 27 16:53:23 2001
Return-Path: <binutils-return-7746-denisc=[email-masked]>
Received: from sourceware.cygnus.com (sourceware.cygnus.com [205.180.83.71])
by tigris.overta.ru (8.9.3/8.9.3) with SMTP id TAA27491
for <[email-masked]>; Sat, 27 Jan 2001 19:54:00 +0300
Received: (qmail 13676 invoked by alias); 27 Jan 2001 16:53:49 -0000
Mailing-List: contact [email-masked]; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:binutils-unsubscribe-denisc=[email-masked]>
List-Subscribe: <mailto:[email-masked]>
List-Archive: <http://sources.redhat.com/ml/binutils/>
List-Post: <mailto:[email-masked]>
List-Help: <mailto:[email-masked]>, <http://sources.redhat.com/ml/#faqs>
Sender: [email-masked]
Delivered-To: mailing list [email-masked]
Received: (qmail 13656 invoked from network); 27 Jan 2001 16:53:47 -0000
Received: from tazenda.demon.co.uk ([email-masked])
by sourceware.cygnus.com with SMTP; 27 Jan 2001 16:53:47 -0000
Received: from kings-cross.london.uk.eu.org [::ffff:192.168.2.83]
by tazenda.demon.co.uk with esmtp (Exim 3.11 #1 (Debian))
id 14MYbZ-000347-00; Sat, 27 Jan 2001 16:53:37 +0000
Received: from localhost
([::ffff:127.0.0.1] helo=tazenda.demon.co.uk ident=pb)
by kings-cross.london.uk.eu.org with esmtp (Exim 3.12 #1 (Debian))
id 14MYbL-0005DH-00
for <[email-masked]>; Sat, 27 Jan 2001 16:53:23 +0000
X-Mailer: exmh version 2.1.1 10/15/1999 (debian)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Message-Id: <[email-masked]>
X-UIDL: 96de0e57f08dcc1696755ce356c4ed48
Lines: 11
Xref: localhost.localdomain mail.binutils:5687
>From binutils-return-7746-denisc=[email-masked] Sat Jan 27 19:54:00 2001

>
> I've created the binutils-2_11-branch in CVS. Please check bug-fixes into
> this patch as well as the HEAD.
>
> I think there are still a pile of Linux/MIPS patches outstanding. They can
> also go into 2.11 if and when they are approved for the trunk.
>
> p.

Denis.

From [email-masked] Sun Jan 28 14:50:08 2001
Received: from sys32.hou.wt.net ([205.230.159.32])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Mgym-0000Cr-00
for <[email-masked]>; Sun, 28 Jan 2001 14:50:08 +1300
Received: from mjones233 (216-119-128-252.ipset8.wt.net [216.119.128.252])
by sys32.hou.wt.net (8.9.1/8.9.1) with SMTP id TAA01885;
Sat, 27 Jan 2001 19:52:01 -0600 (CST)
Message-ID: <003201c088cc$87418d60$74626262@mjones233>
From: "Mike Jones" <[email-masked]>
To: "Peter Fleury" <[email-masked]>, <[email-masked]>
References: <002101c08845$d51332a0$8708ca3e@homepc>
Subject: Re: [avr-gcc-list] Found Solution for avr-gcc path problem
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 28 14:51:04 2001
X-Original-Date: Sat, 27 Jan 2001 19:49:17 -0600

I get this message when I click on the link below:

Forbidden
You don't have permission to access /p/e/t/peterfleury/avr-devtools.html on
this server.

----------------------------------------------------------------------------
----

Apache/1.3.12 Server at members.nbci.com Port 80

Any clues to how I can get the fix?

Mike
----- Original Message -----
From: "Peter Fleury" <[email-masked]>
To: <[email-masked]>
Sent: Saturday, January 27, 2001 3:39 AM
Subject: [avr-gcc-list] Found Solution for avr-gcc path problem

> I finally found the reason why avr-gcc added a strange prefix to
> the pathnames in the *.obj file.
>
> It was a missing Windows Registry entry which is needed to
> correctly translate pathnames into Windows drive:/directory/file.
>
> The neccessary Windows Registry Fix can be found on my homepage:
> http://members.nbci.com/_XMCM/peterfleury/avr-devtools.html
>
> It will only work when the directory \avrgcc resides on
> drive or partion C:
>
> Peter Fleury
>
>
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Sun Jan 28 15:26:53 2001
Received: from [211.36.228.81] (helo=mail.sorimail.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14MhYK-0000EU-00
for <[email-masked]>; Sun, 28 Jan 2001 15:26:52 +1300
Received: from kainote (unverified [211.186.101.148]) by mail.sorimail.net
(EMWAC SMTPRS 0.83) with SMTP id <[email-masked]>;
Sun, 28 Jan 2001 11:37:28 +0900
Message-ID: <005301c088d2$467275f0$3200a8c0@kainote>
From: "Woo-Hyun Kim" <[email-masked]>
To: "Peter Fleury" <[email-masked]>
Cc: "AVR Mailing List" <[email-masked]>
References: <002101c08845$d51332a0$8708ca3e@homepc> <007001c0885f$8809d3f0$3200a8c0@kainote> <001b01c088a8$847ad6a0$b740ca3e@homepc>
Subject: Re: [avr-gcc-list] Found Solution for avr-gcc path problem
MIME-Version: 1.0
Content-Type: text/plain;
charset="ISO-8859-1"
Content-Transfer-Encoding: base64
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 28 15:27:04 2001
X-Original-Date: Sun, 28 Jan 2001 11:30:26 +0900

SSBzb2x2ZWQgdGhpcyBwcm9ibGVtLg0KDQpXaGVuIEkgb3BlbmVkICoub2JqIGZpbGUsIGdjcnQu
cyBzb3VyY2Ugd2luZG93IHdhcyBvcGVuZCBieSBkZWZhdWx0IC4NCkluIHRoYXQgd2luZG93LCBJ
IGNvdWxkIG5vdCB1c2UgYnJlYWtwb2ludC4NCg0KQnV0IEkgY291bGQgdXNlIGJyZWFrcG9pbnQg
aW4gbmV3IHNvdXJjZSB3aW5kb3cgaW52b2tlZA0KYnkgc2VsZWN0aW5nIG15X2NfZmlsZSBvciBz
X2ZpbGUgZnJvbSBzb3VyY2UgbGlzdCBib3ggYXQgdG9wIG9mIEFWUi1TdHVkaW8uDQoNCkknbSBu
b3cgbW9yZSBoYXBweS4gIDotKQ0KDQpUaGFuayB5b3UuDQoNCldvby1IeXVuIEtpbQ0KDQotLS0t
LSBPcmlnaW5hbCBNZXNzYWdlIC0tLS0tIA0KRnJvbTogIlBldGVyIEZsZXVyeSIgPHBmbGV1cnlA
Z214LmNoPg0KVG86ICJXb28tSHl1biBLaW0iIDx3b29reUBzb3JpbWFpbC5uZXQ+DQpTZW50OiBT
dW5kYXksIEphbnVhcnkgMjgsIDIwMDEgNjozMSBBTQ0KU3ViamVjdDogUmU6IFthdnItZ2NjLWxp
c3RdIEZvdW5kIFNvbHV0aW9uIGZvciBhdnItZ2NjIHBhdGggcHJvYmxlbQ0KDQoNCj4gSGksDQoN
Cj4gSSBrbm93IHRoYXQgbXkgc3VwcGxpZWQgbWFrZSBkb2VzIG5vdCBydW4gb24gTlQgYW5kIHdp
bjJrLiANCj4gVGhlIG1ha2VmaWxlIG5lZWRzIG1vcmUgY2xlYW51cC4gSSBoYXZlIGNyZWF0ZWQg
YSBuZXcgDQo+IHRhcmdldCAibWFrZWRpcnMiIHdoaWNoIGNyZWF0ZXMgdGhlIG5lZWRlZCBkaXJz
Lg0KPiBUaGUgdGFyZ2V0ICJjbGVhbiIgbm93IG9ubHkgcmVtb3ZlcyB0aGUgZmlsZXMgYW5kIGRp
cnMuDQoNCj4gV2h5IGNhbid0IHlvdSB1c2UgYnJlYWtwb2ludHMgaW4gQVZSIFN0dWRpby4gSSBj
YW4gdXNlIGJyZWFrcG9pbnRzLg0KPiBKdXN0IG1vdmUgYW5kIGNsaWNrIHRoZSBtb3VzZSB0byBs
aW5lIHdoZXJlIHlvdSB3YW50IHRvIHNldCBhDQo+IGJyZWFrcG9pbnQsIHRoZW4gcHJlc3MgRjku
IEEgYnJlYWtwb2ludCB3aWxsIGJlIG1hcmtlZCB3aXRoIGEgDQo+IHJlZCBzcWFyZS4gVGhlbiBz
ZWxlY3QgRGVidWctPkdvIChGNSkuIFByb2dyYW1tIHdpbGwgc3RvcC4NCg0KPiBQZXRlcg0KDQo=

From [email-masked] Sun Jan 28 16:51:38 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14MisL-0000Hl-00
for <[email-masked]>; Sun, 28 Jan 2001 16:51:37 +1300
Received: (from rneswold@localhost)
by drmemory.fnal.gov (8.9.3/8.9.3) id VAA74992;
Sat, 27 Jan 2001 21:53:19 -0600 (CST)
(envelope-from rneswold)
From: Rich Neswold <[email-masked]>
To: Brian Dean <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] stk500
Message-ID: <[email-masked]>
Reply-To: [email-masked]
References: <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="YiEDa0DAkWCtVeE4"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Fri, Jan 26, 2001 at 08:07:13PM -0500
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.0-STABLE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 28 16:52:04 2001
X-Original-Date: Sat, 27 Jan 2001 21:53:19 -0600

--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Wasn't it 26-Jan-2001, at 08:07PM, when Brian Dean said:
> Well, I'll throw in a plug for my programming software. See:
>=20
> http://www.bsdhome.com/avrprog/

I'm getting "Forbidden" errors. Is there an access problem?

> The main caveat is that it currently only supports FreeBSD.

CAVEAT!?! Why, that's a perk! :-)

--=20
Rich Neswold

efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

--YiEDa0DAkWCtVeE4
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE6c5euZmE+i9FKxdwRArhyAKCcv8Yn0cCrFtoPbUe/965n3PY4awCg3CVb
1QXi8QATGuEnWPvMCxiQA3U=
=fTq3
-----END PGP SIGNATURE-----

--YiEDa0DAkWCtVeE4--

From [email-masked] Sun Jan 28 17:11:38 2001
Received: from [24.25.2.13] (helo=bsdhome.dyndns.org)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14MjBg-0000Ir-00
for <[email-masked]>; Sun, 28 Jan 2001 17:11:36 +1300
Received: from vger.bsdhome.com (vger [192.168.220.2])
by bsdhome.dyndns.org (8.11.1/8.11.1) with ESMTP id f0S4CTo47703;
Sat, 27 Jan 2001 23:12:29 -0500 (EST)
(envelope-from [email-masked])
Received: (from bsd@localhost)
by vger.bsdhome.com (8.11.1/8.11.1) id f0S4CT410389;
Sat, 27 Jan 2001 23:12:29 -0500 (EST)
(envelope-from bsd)
From: Brian Dean <[email-masked]>
To: Rich Neswold <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] stk500
Message-ID: <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Sat, Jan 27, 2001 at 09:53:19PM -0600
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 28 17:12:04 2001
X-Original-Date: Sat, 27 Jan 2001 23:12:28 -0500

On Sat, Jan 27, 2001 at 09:53:19PM -0600, Rich Neswold wrote:

> > http://www.bsdhome.com/avrprog/
>
> I'm getting "Forbidden" errors. Is there an access problem?

Hmmm ... I don't see any errors in my logs, though I have seen several
successful accesses. I did note that the read bit on the parent
directly was turned off, but that shouldn't matter. At any rate, I
reset it so you may want to give it another try just in case. If you
still have trouble, I'd be happy to e-mail you a copy, just let me
know.

> > The main caveat is that it currently only supports FreeBSD.
>
> CAVEAT!?! Why, that's a perk! :-)

:)

Nice doc you produce, BTW, Rich. I'm referring to your
avr-lib-beta.pdf. That's a nice help.

-Brian
--
Brian Dean
[email-masked]
[email-masked]

From [email-masked] Sun Jan 28 18:08:29 2001
Received: from mail.kdt.de ([195.8.224.4])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Mk4i-0000Lf-00
for <[email-masked]>; Sun, 28 Jan 2001 18:08:29 +1300
Received: from tachyon.henne.lokal (line0670.kdt.de [213.240.147.112])
by mail.kdt.de (8.11.1/8.11.0) with ESMTP id f0S5ACU19777
for <[email-masked]>; Sun, 28 Jan 2001 06:10:12 +0100
Received: from combio.de (IDENT:[email-masked] [192.168.0.1])
by tachyon.henne.lokal (8.11.0/8.8.7) with ESMTP id f0RH9G120119
for <[email-masked]>; Sat, 27 Jan 2001 18:09:16 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Reply-To: [email-masked]
X-Mailer: Mozilla 4.75 [de] (X11; U; Linux 2.2.16-22 i586)
X-Accept-Language: en
MIME-Version: 1.0
To: AVR-GCC Mailinglist <[email-masked]>
References: <002101c08845$d51332a0$8708ca3e@homepc>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Re: Found Solution for avr-gcc path problem
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Jan 28 18:09:04 2001
X-Original-Date: Sat, 27 Jan 2001 18:09:15 +0100

Hello Peter,

Peter Fleury wrote:

> I finally found the reason why avr-gcc added a strange prefix to
> the pathnames in the *.obj file.
>
> It was a missing Windows Registry entry which is needed to
> correctly translate pathnames into Windows drive:/directory/file.

Then my thought concerning the registry was right. :-)

Nevertheless I have put great work into building an avr-gcc without
using the cygwin environment. It was very hard until I found the simple
solution.

I tried following:
1)
Installing Cygwin-Tools (complete) plus Mingw32-gcc
-> during make a lot of unresolved references of the linker

Tries 2) and 3) aimed at getting a cross-compiler from linux to win32,
which should generate the avr-gcc on linux

2)
Downloading Mingw32 gcc-patches from the net, trying to bild a
linux-hosted i386-mingw32-gcc
-> failed during making libio

3) Using my gcc-snapshot. Apply no patches, configuring for mingw32,
making installing -> works. Using my binutils snapshot -> same.
Compiling and installing the mingw-runtime and w32api from www.ming.org
-> libkernel32.a ist missing some win32 Functions -> no executable can
be generated

4) Installing an Cygwin-System on my NT box, but leaving out binutils,
gcc, loader, linker, libraries. Installing those from mingw32
(Downloaded in binary from www.mingw.org). Making symbolic links from
i386-mingw32-gcc to gcc, same with binutils. Configuring for target=avr
--host=i386-cygwin --target=i386-mingw32. Replacing ln in Makefile with
cp. Put fork, kill and signal dummy-functions in gcc/collect2.cpp. That
was it!

Now I have a mingw32 based avr-gcc, like in Volker Oth's distribution. I
did the same for binutils. Using the cygwin-environment I compiled the
avr-libc.

On monday I will replace the cygwin binaries with the mingw32 ones.

Greetings

Gunnar

From [email-masked] Mon Jan 29 01:13:37 2001
Received: from hawk.prod.itd.earthlink.net ([207.217.120.22])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Mqi8-0000cA-00
for <[email-masked]>; Mon, 29 Jan 2001 01:13:37 +1300
Received: from earthlink.net (1Cust187.tnt1.brownwood.tx.da.uu.net [63.28.230.187])
by hawk.prod.itd.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id EAA23368;
Sun, 28 Jan 2001 04:14:46 -0800 (PST)
Message-ID: <[email-masked]>
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: AVR-GCC Mailinglist <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] Re: Found Solution for avr-gcc path problem
References: <002101c08845$d51332a0$8708ca3e@homepc> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Mon Jan 29 01:14:04 2001
X-Original-Date: Sun, 28 Jan 2001 06:13:17 -0600

Hey, way to go Gunner! Perseverance pays off! Excellent work.

Dale Seaburg

Gunnar Henne wrote:
>
> Hello Peter,
>
> Peter Fleury wrote:
>
> > I finally found the reason why avr-gcc added a strange prefix to
> > the pathnames in the *.obj file.
> >
> > It was a missing Windows Registry entry which is needed to
> > correctly translate pathnames into Windows drive:/directory/file.
>
> Then my thought concerning the registry was right. :-)
>
> Nevertheless I have put great work into building an avr-gcc without
> using the cygwin environment. It was very hard until I found the simple
> solution.
>
> I tried following:
> 1)
> Installing Cygwin-Tools (complete) plus Mingw32-gcc
> -> during make a lot of unresolved references of the linker
>
> Tries 2) and 3) aimed at getting a cross-compiler from linux to win32,
> which should generate the avr-gcc on linux
>
> 2)
> Downloading Mingw32 gcc-patches from the net, trying to bild a
> linux-hosted i386-mingw32-gcc
> -> failed during making libio
>
> 3) Using my gcc-snapshot. Apply no patches, configuring for mingw32,
> making installing -> works. Using my binutils snapshot -> same.
> Compiling and installing the mingw-runtime and w32api from www.ming.org
> -> libkernel32.a ist missing some win32 Functions -> no executable can
> be generated
>
> 4) Installing an Cygwin-System on my NT box, but leaving out binutils,
> gcc, loader, linker, libraries. Installing those from mingw32
> (Downloaded in binary from www.mingw.org). Making symbolic links from
> i386-mingw32-gcc to gcc, same with binutils. Configuring for target=avr
> --host=i386-cygwin --target=i386-mingw32. Replacing ln in Makefile with
> cp. Put fork, kill and signal dummy-functions in gcc/collect2.cpp. That
> was it!
>
> Now I have a mingw32 based avr-gcc, like in Volker Oth's distribution. I
> did the same for binutils. Using the cygwin-environment I compiled the
> avr-libc.
>
> On monday I will replace the cygwin binaries with the mingw32 ones.
>
> Greetings
>
> Gunnar

From [email-masked] Mon Jan 29 10:14:11 2001
Received: from bw211zhb.bluewin.ch ([195.186.1.211] helo=mta2n.bluewin.ch)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Mz9H-0000zd-00
for <[email-masked]>; Mon, 29 Jan 2001 10:14:11 +1300
Received: from bw150zhb.bluewin.ch (172.21.1.38) by mta2n.bluewin.ch (5.1.056)
id 3A702AFF000B239E for [email-masked]; Sun, 28 Jan 2001 22:14:25 +0100
Received: from homepc (bw3-11pub226.bluewin.ch [62.202.11.226])
by bw150zhb.bluewin.ch (8.9.3/8.9.3) with SMTP id WAA06294
for <[email-masked]>; Sun, 28 Jan 2001 22:14:24 +0100 (MET)
Message-ID: <001a01c0896f$51a95180$e20bca3e@homepc>
From: "Peter Fleury" <[email-masked]>
To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] Mirror of my avr home page
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Mon Jan 29 10:15:04 2001
X-Original-Date: Sun, 28 Jan 2001 22:14:32 +0100

Because members.nbci.com, my website provider seems to have serious=20
problems, I created a mirror of my home page:
http://luna.spaceports.com/~pfleury

This mirror also includes my cywin registry-fix (in the development =
toosl section).

Peter

From [email-masked] Mon Jan 29 21:38:19 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14N9pK-0001Ps-00
for <[email-masked]>; Mon, 29 Jan 2001 21:38:19 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id JAA27881
for <[email-masked]>; Mon, 29 Jan 2001 09:40:14 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] New avr-gcc for win32 available
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Mon Jan 29 21:39:04 2001
X-Original-Date: Mon, 29 Jan 2001 09:40:13 +0100

Hello,

during the weekend I succeeded in compiling avr-gcc for win32 using the
cygwin-tools and mingw32 development tools. As a result the new binaries
are not dependend on a non-standard DLL.
The pathnames dont get mangled any more, without the need for registry
entries.
The Avr-Libc is recompiled in a way that Avr-Studio can use it. The
source is included. Please leave it in exact the same location. The
makefile works for me. You can modify it and make clean; make if you
want an other location than c:\avrgcc.

I have stripped the unix-tools from Volker Oths distribution, they are
included in a separate archive.

The location is:
http://combio.de/avr/index.html

AvrStudio now fully works!
You can step through your own source as well as libc-source. Both in
assembler and c. :-)

Greetings
Gunnar

From [email-masked] Tue Jan 30 04:10:05 2001
Received: from mail-ffm-p.arcor-ip.de ([145.253.2.10] helo=mail.arcor-ip.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14NFwT-0001ek-00
for <[email-masked]>; Tue, 30 Jan 2001 04:10:05 +1300
Received: from identecsolutions.de (213.23.20.17) by mail.arcor-ip.de; 29 Jan 2001 16:11:33 +0100
Received: from server1.identecsolutions.de (server1.identecsolutions.de [192.168.93.253])
by identecsolutions.de (8.11.0/8.11.0/isd.proxy/0.05/20010116) with ESMTP id f0TFBRA04114
for <[email-masked]>; Mon, 29 Jan 2001 16:11:28 +0100
Received: from identecsolutions.de (pc-frieder.identecsolutions.de [192.168.93.42])
by server1.identecsolutions.de (8.11.0/8.11.0/isd/0.05/20010112) with ESMTP id f0TFBRC02844
for <[email-masked]>; Mon, 29 Jan 2001 16:11:27 +0100
Message-ID: <[email-masked]>
From: Frieder Ferlemann <[email-masked]>
Organization: Identec Solutions Deutschland GmbH
MIME-Version: 1.0
To: [email-masked]
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] saving __zero_reg__ in interrupt
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 30 04:11:04 2001
X-Original-Date: Mon, 29 Jan 2001 16:11:29 +0100

Hi,

both gcc 2.97 and 2.95 save, clear and restore the __zero_reg__
in interrupt routines. (-->6 Bytes for each interrupt).
Saving/restoring seems redundant as this register
should hold (holds) zero anyway.

Is there a way to switch off this behaviour?

Thanks

Frieder

From [email-masked] Tue Jan 30 05:12:27 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14NGuo-0001hH-00
for <[email-masked]>; Tue, 30 Jan 2001 05:12:27 +1300
Received: from marekm by alf.amelek.gda.pl with local (Exim 3.16 #1 (Debian))
id 14NGuz-0002AQ-00; Mon, 29 Jan 2001 17:12:37 +0100
Subject: Re: [avr-gcc-list] saving __zero_reg__ in interrupt
In-Reply-To: <[email-masked]> "from Frieder Ferlemann
at Jan 29, 2001 04:11:29 pm"
To: Frieder Ferlemann <[email-masked]>
CC: [email-masked]
X-Mailer: ELM [version 2.4ME+ PL73 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Message-Id: <[email-masked]>
From: Marek Michalkiewicz <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 30 05:13:04 2001
X-Original-Date: Mon, 29 Jan 2001 17:12:37 +0100 (CET)

> both gcc 2.97 and 2.95 save, clear and restore the __zero_reg__
> in interrupt routines. (-->6 Bytes for each interrupt).
> Saving/restoring seems redundant as this register
> should hold (holds) zero anyway.

It is not - some code (generated by avr-gcc, or hand-optimized assembler)
uses this register as a second temporary register (it's OK as long as you
zero it after use). Interrupt comes in at the right moment (when r1 is
nonzero) and you lose.

> Is there a way to switch off this behaviour?

Don't ;)

Marek

From [email-masked] Tue Jan 30 06:20:08 2001
Received: from mail-ffm-p.arcor-ip.de ([145.253.2.10] helo=mail.arcor-ip.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14NHyK-0001jz-00
for <[email-masked]>; Tue, 30 Jan 2001 06:20:08 +1300
Received: from identecsolutions.de (213.23.20.173) by mail.arcor-ip.de; 29 Jan 2001 17:58:17 +0100
Received: from server1.identecsolutions.de (server1.identecsolutions.de [192.168.93.253])
by identecsolutions.de (8.11.0/8.11.0/isd.proxy/0.05/20010116) with ESMTP id f0TGwBA06274;
Mon, 29 Jan 2001 17:58:11 +0100
Received: from identecsolutions.de (pc-frieder.identecsolutions.de [192.168.93.42])
by server1.identecsolutions.de (8.11.0/8.11.0/isd/0.05/20010112) with ESMTP id f0TGwBC03230;
Mon, 29 Jan 2001 17:58:11 +0100
Message-ID: <[email-masked]>
From: Frieder Ferlemann <[email-masked]>
Organization: Identec Solutions Deutschland GmbH
MIME-Version: 1.0
To: Marek Michalkiewicz <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] saving __zero_reg__ in interrupt
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 30 06:21:04 2001
X-Original-Date: Mon, 29 Jan 2001 17:58:14 +0100

Hi Marek,

> > both gcc 2.97 and 2.95 save, clear and restore the __zero_reg__
> > in interrupt routines. (-->6 Bytes for each interrupt).
> > Saving/restoring seems redundant as this register
> > should hold (holds) zero anyway.
> It is not - some code (generated by avr-gcc, or hand-optimized assembler)
> uses this register as a second temporary register (it's OK as long as you
> zero it after use). Interrupt comes in at the right moment (when r1 is
> nonzero) and you lose.

... seems I'm looking for trouble:)
I did a scan with grep r1 *.lst and grep __zero_ *.lst over my listfiles
und luckily my code doesn't modify this register.
Guess my C-source is not too exotic:)
So it would work for me right now (TM).

> Don't ;)
it shurely is not wise to switch saving and restoring off,
without knowing when the compiler inserts it, but...

Bye

Frieder

From [email-masked] Tue Jan 30 06:42:28 2001
Received: from invalid.ed.ntnu.no ([129.241.179.15])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14NIJu-0001p8-00
for <[email-masked]>; Tue, 30 Jan 2001 06:42:27 +1300
Received: from localhost (hembre@localhost)
by invalid.ed.ntnu.no (8.9.3/8.9.3) with ESMTP id SAA18140;
Mon, 29 Jan 2001 18:50:10 +0100 (CET)
(envelope-from [email-masked])
From: Bernt Hustad Hembre <[email-masked]>
X-Sender: [email-masked]
To: Frieder Ferlemann <[email-masked]>
cc: Marek Michalkiewicz <[email-masked]>, [email-masked]
Subject: Re: [avr-gcc-list] saving __zero_reg__ in interrupt
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 30 06:43:04 2001
X-Original-Date: Mon, 29 Jan 2001 18:50:10 +0100 (CET)

On Mon, 29 Jan 2001, Frieder Ferlemann wrote:

> > zero it after use). Interrupt comes in at the right moment (when r1 is
> > nonzero) and you lose.
> ... seems I'm looking for trouble:)
> I did a scan with grep r1 *.lst and grep __zero_ *.lst over my listfiles
> und luckily my code doesn't modify this register.
> Guess my C-source is not too exotic:)
> So it would work for me right now (TM).

ATMega161 has a set of MUL instructions. They return the result in R0:R1.

> > Don't ;)
> it shurely is not wise to switch saving and restoring off,
> without knowing when the compiler inserts it, but...

A better solution would probably be to use a different register as the
zero-register in the future. But that will raise more compability
issues...

Bernie
Tlf.: 92648923
[email-masked]

From [email-masked] Tue Jan 30 07:02:32 2001
Received: from sttlpop2.sttl.uswest.net ([206.81.192.2])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14NIdL-0001qA-00
for <[email-masked]>; Tue, 30 Jan 2001 07:02:31 +1300
Received: (qmail 33941 invoked by alias); 29 Jan 2001 18:02:06 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 26528 invoked by uid 0); 29 Jan 2001 17:59:59 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop2.sttl.uswest.net with SMTP; 29 Jan 2001 17:59:59 -0000
Message-ID: <008b01c08a1d$bca9c060$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Can't Use Avrobj with EEPROM (can't find source file, nordic file error)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 30 07:03:04 2001
X-Original-Date: Mon, 29 Jan 2001 10:02:12 -0800

Thanks to Gunnar for the excellent support on avr-gcc for
Windows.

Unfortunately I can't seem to load *my* application! I have
narrowed the problem down to this: If I declare some EEPROM
variables the compiler is happy, but Astudio complains. If
I remove the EEPROM attribute everything works fine.

Am I doing something obviously wrong? Or is eeprom support
broken in 2.97?

#define EEPROM __attribute__ ((section(".eeprom")))

// Initialized data stored in EEPROM (tuning parameters)

int8_t EEPROM Kp = 16; // Proportional gain
int8_t EEPROM Kd = 12; // Derivative gain
int8_t EEPROM Td = 1; // Derivative period
int8_t EEPROM Ki = 0; // Integral gain
int8_t EEPROM Ko = 1; // Output factor
int16_t EEPROM Acceleration = 0x70;

From [email-masked] Tue Jan 30 17:44:08 2001
Received: from srvlis14.teleweb.pt ([212.16.129.134] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14NSeE-0002Ee-00
for <[email-masked]>; Tue, 30 Jan 2001 17:44:07 +1300
Received: from pama (p144a111.teleweb.pt [212.16.144.111])
by srvlis14.teleweb.pt (8.9.3/8.9.3) with SMTP id EAA13246
for <[email-masked]>; Tue, 30 Jan 2001 04:46:05 GMT
Message-ID: <004301c08a77$acf87800$6f9010d4@pama>
From: "Paulo Abreu" <[email-masked]>
To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] using avr-gcc for win32
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 30 17:45:04 2001
X-Original-Date: Tue, 30 Jan 2001 04:46:55 -0000

I downloaded win32 vertion from http://combio.de/avr/index.html

What should I do for using this compiler. Should I insert any path?

Thanks in advance,

Paulo Abreu

From [email-masked] Tue Jan 30 20:22:37 2001
Received: from atusks01.alcatel.at ([212.183.9.130] helo=mail.alcatel.at)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14NV7b-0002L1-00
for <[email-masked]>; Tue, 30 Jan 2001 20:22:36 +1300
Received: from alcatel.at (atusel33.aut.alcatel.at [146.112.129.215])
by mail.alcatel.at (8.9.3/8.9.3/1.21 01/27/01 21:43:09) with ESMTP id IAA20288;
Tue, 30 Jan 2001 08:24:16 +0100 (MET)
Message-ID: <[email-masked]>
From: Christoph Plattner <[email-masked]>
Organization: AAA
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.5.1 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
To: Larry Barello <[email-masked]>
CC: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Can't Use Avrobj with EEPROM (can't find source file,
nordic file error)
References: <008b01c08a1d$bca9c060$0200000a@larry>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 30 20:23:04 2001
X-Original-Date: Tue, 30 Jan 2001 08:24:16 +0100

Hello !

I had the problem, that the linker gives out an error,
that it has 2 overloapping addresses between the code
section and the eerpom section. I also use this
contruct described below, but all running under Linux.

Further there must be a official way to produce the HEX
file from code (section text) and one of setction EEPROM,
to program them independent with `uisp'.

I hope you can aslo help me, here.

Cheers
Christoph

Larry Barello wrote:
>
> Thanks to Gunnar for the excellent support on avr-gcc for
> Windows.
>
> Unfortunately I can't seem to load *my* application! I have
> narrowed the problem down to this: If I declare some EEPROM
> variables the compiler is happy, but Astudio complains. If
> I remove the EEPROM attribute everything works fine.
>
> Am I doing something obviously wrong? Or is eeprom support
> broken in 2.97?
>
> #define EEPROM __attribute__ ((section(".eeprom")))
>
> // Initialized data stored in EEPROM (tuning parameters)
>
> int8_t EEPROM Kp = 16; // Proportional gain
> int8_t EEPROM Kd = 12; // Derivative gain
> int8_t EEPROM Td = 1; // Derivative period
> int8_t EEPROM Ki = 0; // Integral gain
> int8_t EEPROM Ko = 1; // Output factor
> int16_t EEPROM Acceleration = 0x70;
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

-----------------------------------------------------------------
private: [email-masked]
company: [email-masked]

From [email-masked] Tue Jan 30 20:45:09 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14NVTQ-0002MH-00
for <[email-masked]>; Tue, 30 Jan 2001 20:45:08 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id IAA26830;
Tue, 30 Jan 2001 08:47:00 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: Paulo Abreu <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] using avr-gcc for win32
References: <004301c08a77$acf87800$6f9010d4@pama>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 30 20:46:04 2001
X-Original-Date: Tue, 30 Jan 2001 08:47:00 +0100

Hello Paulo,

Paulo Abreu schrieb:
> I downloaded win32 vertion from http://combio.de/avr/index.html
> What should I do for using this compiler. Should I insert any path?

Yes, set the PATH environment variable to c:\avrgcc\bin.

I suggest studying some sample makefiles.

Greetings Gunnar

--
Gunnar Henne Email: [email-masked]
oTRIs GmbH & Co. KG Tel. : 0231 / 10616-21
Landgrafenstr. 153 Fax. : 0231 / 10615-44
44139 Dortmund

From [email-masked] Tue Jan 30 21:09:34 2001
Received: from [211.36.228.81] (helo=mail.sorimail.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14NVr3-0002Nz-00
for <[email-masked]>; Tue, 30 Jan 2001 21:09:34 +1300
Received: from kainote (unverified [210.180.127.50]) by mail.sorimail.net
(EMWAC SMTPRS 0.83) with SMTP id <[email-masked]>;
Tue, 30 Jan 2001 17:20:20 +0900
Message-ID: <001801c08a94$8004e050$327fb4d2@kainote>
From: "Woo-Hyun Kim" <[email-masked]>
To: "AVR Mailing List" <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="ks_c_5601-1987"
Content-Transfer-Encoding: base64
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] AVR-GCC auto installation
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 30 21:10:04 2001
X-Original-Date: Tue, 30 Jan 2001 17:13:16 +0900

SGVsbG8gIQ0KDQpJIG1ha2UgYXZyLWdjYyBhdXRvIGluc3RhbGxhdGlvbiBhbmQgbGliYyBjb21w
aWxhdGlvbiBwcm9ncmFtIGJ5IG1vZGlmeWluZyBpbnN0YWxsLmluaSANCmluIFZvbGtlciBPdGgn
cyBhdnItZ2NjIGRpc3RyaWJ1dGlvbiBhbmQgYWRkaW5nIFBldGVyIEZsZXVyeSdzIGF2ci1saWJj
IGZvciBhdnItc3R1ZGlvLg0KDQpZb3UgY2FuIGVhc2lseSBpbnN0YWxsIGF2ci1nY2MgbGlrZSBW
b2xrZXIgT3RoJ3MgZGlzdHJpYnV0aW9uLg0KDQpHZXQgZm9sbG93aW5nIGZpbGVzIGZyb20gR3Vu
bmFyIEhlbm5lJ3Mgd2ViIHNpdGUuDQpodHRwOi8vY29tYmlvLmRlL2F2ci9hdnItYmludXRpbHMt
MDEwMTA5LWF2cm9iai1taW5ndzMyLnRhci5neg0KaHR0cDovL2NvbWJpby5kZS9hdnIvYXZyLWdj
Yy0yMDAxMDEwOC1taW5ndzMyLnRhci5neg0KaHR0cDovL2NvbWJpby5kZS9hdnIvYXZyLWxpYmMt
MjAwMDExMjUtbWluZ3czMi50YXIuZ3oNCmh0dHA6Ly9jb21iaW8uZGUvYXZyL3VuaXgtdG9vbHMu
dGFyLmd6DQoNCmFuZCBnZXQgZm9sbG93aW5nIGZpbGUgZnJvbSBteSB3ZWIgc2l0ZS4NCmh0dHA6
Ly9taWNyby5uZXcyMS5vcmcvYXZyL2djY19pbnN0L2F2ci1saWJjLXZvbGtlci1pbnN0YWxsLnpp
cA0KDQp0aGVuIGV4dHJhdCBhbGwgZmlsZXMgYW5kIG1lcmdlIGludG8gYXZyZ2NjIGFuZCBwdXQg
YXZyZ2NjIGluIGFueSBkaXJlY3RvcnkgeW91IHdhbnQuDQpOb3csIHlvdSBjYW4gZWFzaWx5IGlu
c3RhbGwgYXZyLWdjYyBhcyBmb2xsb3dzLg0KDQoNCioqIElOU1RBTEwgKioNCkFmdGVyIHVuemlw
cGluZywgeW91IG5lZWQgdG8gcnVuIElOU1RBTEwuRVhFIGluIHRoZSBpbnN0YWxsYXRpb24gZGly
ZWN0b3J5IG9uY2UgKGUuZy4gZG91YmxlIGNsaWNrIGl0IGluIHRoZSBleHBsb3JlcikuIFRoaXMg
d2lsbCBjcmVhdGUgYSBiYXRjaCBmaWxlIGNhbGxlZCBSVU4uQkFUIGluIHRoZSBpbnN0YWxsYXRp
b24gcGF0aC4gQWxzbywgYSBsaW5rIHRvIHRoaXMgYmF0Y2ggZmlsZShhdnItZ2NjLTIwMDEpIGlz
IGFkZGVkIG9uIHRoZSBkZXNrdG9wLiBTdWJzZXF1ZW50bHksIEFWUi1HQ0MncyBsaWJyYXJpZXMg
YXJlIGNvbXBpbGVkIC4uLiB0aGlzIGlzIG5lY2Vzc2FyeSB0byBlbmFibGUgdGhlIGRlYnVnZ2Vy
IHRvIGZpbmQgdGhlIGxpYnJhcmllcycgc291cmNlIGNvZGVzLiANCklmIHlvdSBtb3ZlIEFWUi1H
Q0MgbGF0ZXIgb24sIHlvdSBuZWVkIHRvIHJ1biBJTlNUQUxMLkVYRSBvbmNlIG1vcmUuIA0KVG8g
dXNlIHRoZSBjb21waWxlciwgc29tZSBlbnZpcm9ubWVudCB2YXJpYWJsZXMgaGF2ZSB0byBiZSBz
ZXQvY2hhbmdlZC4gVGhpcyBpcyBkb25lIGJ5IHJ1bm5pbmcgUlVOLkJBVCBpbiB0aGUgaW5zdGFs
bGF0aW9uIHBhdGggZWl0aGVyIGZyb20gdGhlIGNvbW1hbmQgbGluZSBvciBieSBkb3VibGUgY2xp
Y2tpbmcgdGhlIGRlc2t0b3AgbGluay4gWW91IG1pZ2h0IG1vdmUgdGhlIGxpbmsgdG8gdGhlIHN0
YXJ0IGZvbGRlciBvZiBjb3Vyc2Ugb3IgY2hhbmdlIGl0cyBwcm9wZXJ0aWVzLCBvZiBjb3Vyc2Uu
IA0K

From [email-masked] Tue Jan 30 21:16:46 2001
Received: from [211.36.228.81] (helo=mail.sorimail.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14NVy1-0002P5-00
for <[email-masked]>; Tue, 30 Jan 2001 21:16:45 +1300
Received: from kainote (unverified [210.180.127.50]) by mail.sorimail.net
(EMWAC SMTPRS 0.83) with SMTP id <[email-masked]>;
Tue, 30 Jan 2001 17:27:38 +0900
Message-ID: <003a01c08a95$8517e5f0$327fb4d2@kainote>
From: "Woo-Hyun Kim" <[email-masked]>
To: "AVR Mailing List" <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="ks_c_5601-1987"
Content-Transfer-Encoding: base64
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] AVR-GCC auto install(repost)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 30 21:17:03 2001
X-Original-Date: Tue, 30 Jan 2001 17:20:34 +0900

SSdtIHNvcnJ5Lg0KbXkgZS1tYWlsIGNsaWVudCdzIGRlZmF1bHQgc2V0dGluZyBpcyBpbiBodG1s
IG1vZGUuDQpzbyBJIHJlcG9zdCBpbiB0ZXh0IG1vZGUuDQoNCmFnYWluIEknbSBzb3JyeS4NCg0K
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KSGVsbG8gIQ0KDQpJIG1ha2UgYXZyLWdjYyBhdXRv
IGluc3RhbGxhdGlvbiBhbmQgbGliYyBjb21waWxhdGlvbiBwcm9ncmFtIGJ5IG1vZGlmeWluZyBp
bnN0YWxsLmluaSANCmluIFZvbGtlciBPdGgncyBhdnItZ2NjIGRpc3RyaWJ1dGlvbiBhbmQgYWRk
aW5nIFBldGVyIEZsZXVyeSdzIGF2ci1saWJjIGZvciBhdnItc3R1ZGlvLg0KDQpZb3UgY2FuIGVh
c2lseSBpbnN0YWxsIGF2ci1nY2MgbGlrZSBWb2xrZXIgT3RoJ3MgZGlzdHJpYnV0aW9uLg0KDQpH
ZXQgZm9sbG93aW5nIGZpbGVzIGZyb20gR3VubmFyIEhlbm5lJ3Mgd2ViIHNpdGUuDQpodHRwOi8v
Y29tYmlvLmRlL2F2ci9hdnItYmludXRpbHMtMDEwMTA5LWF2cm9iai1taW5ndzMyLnRhci5neg0K
aHR0cDovL2NvbWJpby5kZS9hdnIvYXZyLWdjYy0yMDAxMDEwOC1taW5ndzMyLnRhci5neg0KaHR0
cDovL2NvbWJpby5kZS9hdnIvYXZyLWxpYmMtMjAwMDExMjUtbWluZ3czMi50YXIuZ3oNCmh0dHA6
Ly9jb21iaW8uZGUvYXZyL3VuaXgtdG9vbHMudGFyLmd6DQoNCmFuZCBnZXQgZm9sbG93aW5nIGZp
bGUgZnJvbSBteSB3ZWIgc2l0ZS4NCmh0dHA6Ly9taWNyby5uZXcyMS5vcmcvYXZyL2djY19pbnN0
L2F2ci1saWJjLXZvbGtlci1pbnN0YWxsLnppcA0KDQp0aGVuIGV4dHJhdCBhbGwgZmlsZXMgYW5k
IG1lcmdlIGludG8gYXZyZ2NjIGFuZCBwdXQgYXZyZ2NjIGluIGFueSBkaXJlY3RvcnkgeW91IHdh
bnQuDQpOb3csIHlvdSBjYW4gZWFzaWx5IGluc3RhbGwgYXZyLWdjYyBhcyBmb2xsb3dzLg0KDQoN
CioqIElOU1RBTEwgKioNCkFmdGVyIHVuemlwcGluZywgeW91IG5lZWQgdG8gcnVuIElOU1RBTEwu
RVhFIGluIHRoZSBpbnN0YWxsYXRpb24gZGlyZWN0b3J5IG9uY2UgKGUuZy4gZG91YmxlIGNsaWNr
IGl0IGluIHRoZSBleHBsb3JlcikuIFRoaXMgd2lsbCBjcmVhdGUgYSBiYXRjaCBmaWxlIGNhbGxl
ZCBSVU4uQkFUIGluIHRoZSBpbnN0YWxsYXRpb24gcGF0aC4gQWxzbywgYSBsaW5rIHRvIHRoaXMg
YmF0Y2ggZmlsZShhdnItZ2NjLTIwMDEpIGlzIGFkZGVkIG9uIHRoZSBkZXNrdG9wLiBTdWJzZXF1
ZW50bHksIEFWUi1HQ0MncyBsaWJyYXJpZXMgYXJlIGNvbXBpbGVkIC4uLiB0aGlzIGlzIG5lY2Vz
c2FyeSB0byBlbmFibGUgdGhlIGRlYnVnZ2VyIHRvIGZpbmQgdGhlIGxpYnJhcmllcycgc291cmNl
IGNvZGVzLiANCklmIHlvdSBtb3ZlIEFWUi1HQ0MgbGF0ZXIgb24sIHlvdSBuZWVkIHRvIHJ1biBJ
TlNUQUxMLkVYRSBvbmNlIG1vcmUuIA0KVG8gdXNlIHRoZSBjb21waWxlciwgc29tZSBlbnZpcm9u
bWVudCB2YXJpYWJsZXMgaGF2ZSB0byBiZSBzZXQvY2hhbmdlZC4gVGhpcyBpcyBkb25lIGJ5IHJ1
bm5pbmcgUlVOLkJBVCBpbiB0aGUgaW5zdGFsbGF0aW9uIHBhdGggZWl0aGVyIGZyb20gdGhlIGNv
bW1hbmQgbGluZSBvciBieSBkb3VibGUgY2xpY2tpbmcgdGhlIGRlc2t0b3AgbGluay4gWW91IG1p
Z2h0IG1vdmUgdGhlIGxpbmsgdG8gdGhlIHN0YXJ0IGZvbGRlciBvZiBjb3Vyc2Ugb3IgY2hhbmdl
IGl0cyBwcm9wZXJ0aWVzLCBvZiBjb3Vyc2UuIA0K

From [email-masked] Tue Jan 30 21:25:24 2001
Received: from [211.36.228.81] (helo=mail.sorimail.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14NW6M-0002Pr-00
for <[email-masked]>; Tue, 30 Jan 2001 21:25:23 +1300
Received: from kainote (unverified [210.180.127.50]) by mail.sorimail.net
(EMWAC SMTPRS 0.83) with SMTP id <[email-masked]>;
Tue, 30 Jan 2001 17:36:16 +0900
Message-ID: <006c01c08a96$b9fac200$327fb4d2@kainote>
From: "Woo-Hyun Kim" <[email-masked]>
To: "AVR Mailing List" <[email-masked]>
References: <004301c08a77$acf87800$6f9010d4@pama>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] AVR-GCC auto install(repost)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 30 21:26:04 2001
X-Original-Date: Tue, 30 Jan 2001 17:29:13 +0900

I'm sorry.
my e-mail client's default setting is in html mode.
so I repost in text mode.

again I'm sorry.

----------------------------------------------------------------------------
------
Hello !

I make avr-gcc auto installation and libc compilation program by modifying
install.ini
in Volker Oth's avr-gcc distribution and adding Peter Fleury's avr-libc for
avr-studio.

You can easily install avr-gcc like Volker Oth's distribution.

Get following files from Gunnar Henne's web site.
http://combio.de/avr/avr-binutils-010109-avrobj-mingw32.tar.gz
http://combio.de/avr/avr-gcc-20010108-mingw32.tar.gz
http://combio.de/avr/avr-libc-20001125-mingw32.tar.gz
http://combio.de/avr/unix-tools.tar.gz

and get following file from my web site.
http://micro.new21.org/avr/gcc_inst/avr-libc-volker-install.zip

then extrat all files and merge into avrgcc and put avrgcc in any directory
you want.
Now, you can easily install avr-gcc as follows.

** INSTALL **
After unzipping, you need to run INSTALL.EXE in the installation directory
once (e.g. double click it in the explorer). This will create a batch file
called RUN.BAT in the installation path. Also, a link to this batch
file(avr-gcc-2001) is added on the desktop. Subsequently, AVR-GCC's
libraries are compiled ... this is necessary to enable the debugger to find
the libraries' source codes.
If you move AVR-GCC later on, you need to run INSTALL.EXE once more.
To use the compiler, some environment variables have to be set/changed. This
is done by running RUN.BAT in the installation path either from the command
line or by double clicking the desktop link. You might move the link to the
start folder of course or change its properties, of course.

From [email-masked] Tue Jan 30 21:45:16 2001
Received: from mail-ffm-p.arcor-ip.de ([145.253.2.10] helo=mail.arcor-ip.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14NWPb-0002R2-00
for <[email-masked]>; Tue, 30 Jan 2001 21:45:16 +1300
Received: from identecsolutions.de (213.23.20.16) by mail.arcor-ip.de; 30 Jan 2001 09:46:48 +0100
Received: from server1.identecsolutions.de (server1.identecsolutions.de [192.168.93.253])
by identecsolutions.de (8.11.0/8.11.0/isd.proxy/0.05/20010116) with ESMTP id f0U8kiA08663;
Tue, 30 Jan 2001 09:46:44 +0100
Received: from identecsolutions.de (pc-frieder.identecsolutions.de [192.168.93.42])
by server1.identecsolutions.de (8.11.0/8.11.0/isd/0.05/20010112) with ESMTP id f0U8kir04500;
Tue, 30 Jan 2001 09:46:44 +0100
Message-ID: <[email-masked]>
From: Frieder Ferlemann <[email-masked]>
Organization: Identec Solutions Deutschland GmbH
MIME-Version: 1.0
To: Bernt Hustad Hembre <[email-masked]>
CC: Marek Michalkiewicz <[email-masked]>, [email-masked]
Subject: Re: [avr-gcc-list] saving __zero_reg__ in interrupt
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Jan 30 21:46:04 2001
X-Original-Date: Tue, 30 Jan 2001 09:46:43 +0100

> ATMega161 has a set of MUL instructions. They return the result in R0:R1.
Thats why I don't see it on a 90S2313...

> A better solution would probably be to use a different register as the
> zero-register in the future. But that will raise more compability
> issues...
And they will be hard to debug....

On the other hand if one ever plans to change the register usage
it would be a good time to do it now?
(I'm not familiar with the release policy of gcc, but looking from
the outside: there was the avr patch to 2.95 and the next official
gcc version is not yet released.
So it is the last chance before an official gcc with AVR goes out?)

If R0:R1 got a special meaning for the Atmel Mega series, which registers
get a special meaning next?
Would it be save to use R2 as __zero_reg__ or rather R4 (in the hope
there will be a AVR Giga series)?

Bye

Frieder

From [email-masked] Wed Jan 31 00:11:20 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14NYgx-0002Xi-00
for <[email-masked]>; Wed, 31 Jan 2001 00:11:19 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id MAA20560
for <[email-masked]>; Tue, 30 Jan 2001 12:13:21 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
CC: AVR Mailing List <[email-masked]>
References: <004301c08a77$acf87800$6f9010d4@pama> <006c01c08a96$b9fac200$327fb4d2@kainote>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Re: AVR-GCC auto install (Updated avr-libc @ combio.de)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 31 00:12:04 2001
X-Original-Date: Tue, 30 Jan 2001 12:13:19 +0100

Hello,

Woo-Hyun Kim wrote:

> Get following files from Gunnar Henne's web site.
> ...
> http://combio.de/avr/avr-libc-20001125-mingw32.tar.gz

I have worked in your changes into my files. It is now not necessary to
download the above. Simply download
http://combio.de/avr/avr-libc-20001125-wininstall.tar.gz
and run install.
I have written a few sentences on
http://combio.de/avr/index.html

I have repackeged to keep all binaries in the same location and
rearrange the directories a bit.

Greetings

Gunnar

--
Gunnar Henne Email: [email-masked]
oTRIs GmbH & Co. KG Tel. : 0231 / 10616-21
Landgrafenstr. 153 Fax. : 0231 / 10615-44
44139 Dortmund

From [email-masked] Wed Jan 31 01:17:57 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14NZjQ-0002aV-00
for <[email-masked]>; Wed, 31 Jan 2001 01:17:56 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id NAA23377
for <[email-masked]>; Tue, 30 Jan 2001 13:19:59 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Small "Building an mingw32 cross-gcc" howto
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 31 01:18:04 2001
X-Original-Date: Tue, 30 Jan 2001 13:19:57 +0100

Hello,

there was some interest in the way I build my avr-gcc binaries.
I have summed up it in short and put it on my page:
http://combio.de/avr

Expect it to change as time goes on.

Greetings

Gunnar

--
Gunnar Henne Email: [email-masked]
oTRIs GmbH & Co. KG Tel. : 0231 / 10616-21
Landgrafenstr. 153 Fax. : 0231 / 10615-44
44139 Dortmund

From [email-masked] Wed Jan 31 03:10:38 2001
Received: from sttlpop2.sttl.uswest.net ([206.81.192.2])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14NbUT-0002ex-00
for <[email-masked]>; Wed, 31 Jan 2001 03:10:37 +1300
Received: (qmail 55712 invoked by alias); 30 Jan 2001 14:12:39 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 55688 invoked by uid 0); 30 Jan 2001 14:12:39 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop2.sttl.uswest.net with SMTP; 30 Jan 2001 14:12:39 -0000
Message-ID: <010801c08ac6$f84b0e40$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "Christoph Plattner" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <008b01c08a1d$bca9c060$0200000a@larry> <[email-masked]>
Subject: Re: [avr-gcc-list] Can't Use Avrobj with EEPROM (can't find source file, nordic file error)
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0105_01C08A83.7F2BCE20"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 31 03:11:04 2001
X-Original-Date: Tue, 30 Jan 2001 06:11:34 -0800

This is a multi-part message in MIME format.

------=_NextPart_000_0105_01C08A83.7F2BCE20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Here is an excerpt from my makefile... Peter Fleury's
Avrgcc code examples shows the way to fix the overlap
problem. Since I am not there yet, I have not investigated
fully. See the attached e-mail. I am assuming you know how
to get an .elf file...

BIN = avr-objcopy
FORMAT = ihex

%obj: %elf
$(BIN) -O avrobj $< $@

%hex: %elf
$(BIN) -O $(FORMAT) $< $@

%eep: %elf
$(BIN) -j
.eeprom --set-section-flags=.eeprom="alloc,load" -O
$(FORMAT) $< $@

----- Original Message -----
From: "Christoph Plattner" <[email-masked]>
>
> I had the problem, that the linker gives out an error,
> that it has 2 overloapping addresses between the code
> section and the eerpom section. I also use this
> contruct described below, but all running under Linux.
>
> Further there must be a official way to produce the HEX
> file from code (section text) and one of setction EEPROM,
> to program them independent with `uisp'.
>
> I hope you can aslo help me, here.
>

------=_NextPart_000_0105_01C08A83.7F2BCE20
Content-Type: message/rfc822;
name="Example with eeprom section support.eml"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="Example with eeprom section support.eml"

Return-Path: <[email-masked]>
Delivered-To: [email-masked]
Received: (qmail 27624 invoked by uid 0); 29 Jan 2001 22:13:04 -0000
Received: from mail6.uswest.net (204.147.80.24)
by sttlpop5.sttl.uswest.net with SMTP; 29 Jan 2001 22:13:04 -0000
Received: (qmail 77649 invoked from network); 29 Jan 2001 22:13:03 -0000
Received: from unknown (HELO mta2n.bluewin.ch) (195.186.1.211)
by mail6.uswest.net with SMTP; 29 Jan 2001 22:13:03 -0000
Received: from bw150zhb.bluewin.ch (172.21.1.38) by mta2n.bluewin.ch (5.1.056)
id 3A702AFF000FF4D7 for [email-masked]; Mon, 29 Jan 2001 23:11:35 +0100
Received: from homepc (bw3-75pub80.bluewin.ch [62.202.75.80])
by bw150zhb.bluewin.ch (8.9.3/8.9.3) with SMTP id XAA08124
for <[email-masked]>; Mon, 29 Jan 2001 23:11:34 +0100 (MET)
Date: Mon, 29 Jan 2001 23:11:34 +0100
Message-ID: <002901c08a40$7a34e200$504bca3e@homepc>
From: "Peter Fleury" <[email-masked]>
To: "Larry Barello" <[email-masked]>
Subject: Example with eeprom section support
MIME-Version: 1.0
Status: U
X-UIDL: 980806393.27952.sttlpop5.sttl.uswest.net
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

Hi Larry,

Thanks for the good speed news of the new mingw port. It still use the =
cygwin one.

I have you an examle program with eeprom section.
I could successfully debug it with AVR-Studio, although I still use
AVR Studio 3.0.

The EE-section support has changed or is broken a little.
A had to add
--change-section-lma=20
to *.elf *.eep target.=20
Without this flag I got an offset in the EE section.

This example program with makefile can be found on my homepage
(software section -> AVRGCC examples)
http://jump.to/fleury
http://luna.spaceports.com/~pfleury (new mirror)

Regards
Peter

------=_NextPart_000_0105_01C08A83.7F2BCE20--

From [email-masked] Wed Jan 31 03:57:14 2001
Received: from express.baneng.com ([199.86.92.2])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14NcDZ-0002hF-00
for <[email-masked]>; Wed, 31 Jan 2001 03:57:14 +1300
Received: from [192.9.200.68] by express.baneng.com (NTMail 5.03.0001/NY1628.00.9978dd2f) with ESMTP id kdrieaaa for [email-masked]; Tue, 30 Jan 2001 08:58:45 -0600
Reply-To: <[email-masked]>
From: "Mike Bechtold" <[email-masked]>
To: "Avr-Gcc-List (E-mail)" <[email-masked]>,
"Avr@eGroups (E-mail)" <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Importance: Normal
Subject: [avr-gcc-list] gcc asm help
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 31 03:58:04 2001
X-Original-Date: Tue, 30 Jan 2001 08:58:06 -0600

can any one help me code this example. I believed that I'm having problems
with the label sections

original code
// asm ("cp R24, R25"); // does ClocksUntilEOS==ClockCounts ?
// asm ("brne EnableOtherIRQs");
calling code.
brne(R24,R25, "EnableOtherIRQs"); // do I need quotes here?

macro to replace commented out code above.
#define brne(reg1, reg2, label) ({
asm volatile ( \
"cp R%0, R%1 \n" \
"brne %2\n" \
:: "I" ((uint8_t)(reg1)), \
"I" ((uint8_t)(reg2)), \
"g" (label) \ // what type do I use here?
); \
})
thanks
Mike

=========================================
Mike Bechtold
Software Technician with Banner Engineering
[email-masked]

From [email-masked] Wed Jan 31 07:02:16 2001
Received: from sttlpop2.sttl.uswest.net ([206.81.192.2])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14Nf6d-0002sL-00
for <[email-masked]>; Wed, 31 Jan 2001 07:02:16 +1300
Received: (qmail 31843 invoked by alias); 30 Jan 2001 18:04:19 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 31773 invoked by uid 0); 30 Jan 2001 18:04:18 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop2.sttl.uswest.net with SMTP; 30 Jan 2001 18:04:18 -0000
Message-ID: <017f01c08ae7$26c81860$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] My EEPROM problems with 2.97 and Astudio 3.2
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 31 07:03:04 2001
X-Original-Date: Tue, 30 Jan 2001 10:01:14 -0800

Well, I have a work around. Someone can have fun figuring
this one out.

If you have a minimal file:
---- foo.c ---
#define EEPROM __attribute__ ((section(".eeprom")))
char var1 EEPROM = 1;

int main(void) { while(1);}
-----
Compile, link and convert to avrobj format, it will fail to
load into Astudio.

It turns out that the following combinations of EEPROM
variables will either fail to load or load properly!!

1 - fail
2 - Ok
3 - fail
4 - Ok
5 - fail
6 - fail
7-10 appear to be Ok.

I didn't go any higher. I solved my immediate problems by
adding one dummy EEPROM variable to my source file to
increase the number of variables from 6 to 7.

From [email-masked] Wed Jan 31 09:33:59 2001
Received: from finch-post-12.mail.demon.net ([194.217.242.41])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14NhTS-0002yF-00
for <[email-masked]>; Wed, 31 Jan 2001 09:33:58 +1300
Received: from alcor.demon.co.uk ([194.222.121.124])
by finch-post-12.mail.demon.net with esmtp (Exim 2.12 #1)
id 14NhVO-000JCA-0C
for [email-masked]; Tue, 30 Jan 2001 20:35:58 +0000
Received: from alcor1 [192.168.0.1] by alcor.demon.co.uk (FTGate 2, 2, 2, 1);
Tue, 30 Jan 2001 20:34:48 +0000
Received: by localhost with Microsoft MAPI; Tue, 30 Jan 2001 20:34:48 -0000
Message-ID: <[email-masked]>
From: Chris Down <[email-masked]>
To: "Avr-Gcc-List (E-mail)" <[email-masked]>
Subject: Re: [avr-gcc-list] Can't Use Avrobj with EEPROM (can't find source file, nordic file error)
X-Mailer: Microsoft Internet E-mail/MAPI - 8.0.0.4211
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 31 09:34:05 2001
X-Original-Date: Tue, 30 Jan 2001 20:34:47 -0000

Peter Fleury wrote-
>have you an examle program with eeprom section.
>I could successfully debug it with AVR-Studio, although I still use
>AVR Studio 3.0.
>
>The EE-section support has changed or is broken a little.
>A had to add
> --change-section-lma
>to *.elf *.eep target.
>Without this flag I got an offset in the EE section.

I have been using Volker Oth's distribution and I have recently re-built
(using Cygwin) binutils, gcc ( both from the Cygnus CVS tree) and
avr-libc-20001125 with the Atmel AVR Studio patch. I have also found it
necessary to add the --change-section-lma to the .eep target. However I
have also found it necessary to add

-R .eeprom

to the .rom target.

Without this I get the eeprom code at the end of the rom image.

I am not an expert on binutils but it looks like the offset can be
expalined by looking at the ld scrips template , elf32avr.sc, as follows:-
-----
MEMORY
{
text ( rx) : ORIGIN = 0, LENGTH = $TEXT_LENGTH
data (rw!x) : ORIGIN = 0x800060, LENGTH = $DATA_LENGTH
eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = $EEPROM_LENGTH
}
.
.
----
In the latest version the eeprom origin is 0x810000 wheres in Volkers
distribution it was 0, Similarly the origin for data was 0x60 in Volkers
distribution as opposed to 0x800060 in the latest.

I have left the ld scripts intact and used the qualifiers in avr-objcopy,
but can anyone explain why the origins have been set as above?

Thanks

Chris Down

From [email-masked] Wed Jan 31 10:02:23 2001
Received: from bw211zhb.bluewin.ch ([195.186.1.211] helo=mta2n.bluewin.ch)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Nhux-0002zd-00
for <[email-masked]>; Wed, 31 Jan 2001 10:02:23 +1300
Received: from bw150zhb.bluewin.ch (172.21.1.38) by mta2n.bluewin.ch (5.1.056)
id 3A702AFF001452D1 for [email-masked]; Tue, 30 Jan 2001 22:02:46 +0100
Received: from homepc (bw1-226pub164.bluewin.ch [195.186.226.164])
by bw150zhb.bluewin.ch (8.9.3/8.9.3) with SMTP id WAA05733
for <[email-masked]>; Tue, 30 Jan 2001 22:02:44 +0100 (MET)
Message-ID: <000401c08b00$070b0f00$a4e2bac3@homepc>
From: "Peter Fleury" <[email-masked]>
To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] Bug: strlen inline expansion incorrect with -O3
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 31 10:03:05 2001
X-Original-Date: Tue, 30 Jan 2001 20:40:50 +0100

The following code returns wrong string len when
compiled with -O3, but correct result with -O2.

avr-gcc -c -g -O3 -mmcu=3Dat90s8515 test.c -o test.o

Can anybody reproduce this ?

Peter Fleury

------------ test.c ----------
#include <io.h>
#include <string.h>

int main(void)
{
size_t len;
char buffer[32];

outp(0xff, DDRB);
outp(0xff, PORTB);

strcpy(buffer,"12345");
len =3D strlen(buffer); // returns wrong length
outp(len,PORTB);

for(;;);
}
----------------------

From [email-masked] Wed Jan 31 13:17:02 2001
Received: from srvlis11.teleweb.pt ([212.16.129.131] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14NkxG-00037K-00
for <[email-masked]>; Wed, 31 Jan 2001 13:17:01 +1300
Received: from pama (p144a250.teleweb.pt [212.16.144.250])
by srvlis11.teleweb.pt (8.9.3/8.9.3) with SMTP id AAA09631
for <[email-masked]>; Wed, 31 Jan 2001 00:18:52 GMT
Message-ID: <005401c08b1b$82e334c0$889e10d4@pama>
From: "Paulo Abreu" <[email-masked]>
To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] debugging with avr-gcc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 31 13:18:04 2001
X-Original-Date: Wed, 31 Jan 2001 00:16:12 -0000

is it possible to use watch variables with avr-gcc win32 vertion?

From [email-masked] Wed Jan 31 14:04:06 2001
Received: from sttlpop2.sttl.uswest.net ([206.81.192.2])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14Nlgr-00039J-00
for <[email-masked]>; Wed, 31 Jan 2001 14:04:05 +1300
Received: (qmail 54335 invoked by alias); 31 Jan 2001 01:06:05 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 54186 invoked by uid 0); 31 Jan 2001 01:06:01 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop2.sttl.uswest.net with SMTP; 31 Jan 2001 01:06:01 -0000
Message-ID: <01ec01c08b21$f6702460$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "Paulo Abreu" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <005401c08b1b$82e334c0$889e10d4@pama>
Subject: Re: [avr-gcc-list] debugging with avr-gcc
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Jan 31 14:05:04 2001
X-Original-Date: Tue, 30 Jan 2001 16:59:39 -0800

No. The elf->avrobj conversion is pretty limited.

----- Original Message -----
From: "Paulo Abreu" <[email-masked]>

> is it possible to use watch variables with avr-gcc win32
vertion?
>
>

From [email-masked] Thu Feb 01 05:42:03 2001
Received: from sttlpop2.sttl.uswest.net ([206.81.192.2])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14O0KZ-0003hv-00
for <[email-masked]>; Thu, 01 Feb 2001 05:42:03 +1300
Received: (qmail 49964 invoked by alias); 31 Jan 2001 16:41:02 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 36242 invoked by uid 0); 31 Jan 2001 16:38:12 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop2.sttl.uswest.net with SMTP; 31 Jan 2001 16:38:12 -0000
Message-ID: <027001c08ba3$e862e7e0$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Register usage for parameter passing
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Feb 1 05:43:04 2001
X-Original-Date: Wed, 31 Jan 2001 08:34:35 -0800

Last year, passing a single char parameter between routines,
was done in R25.

There was some talk of changing it to R24 so that parameters
were aligned on word boundaries (e.g. char = R24, int =
R24:25, long = R22-25) etc. This was to accommodate the new
AVR cores and various multiply instructions (or something
like that).

It appears that indeed this change occured, but the
CtoAsm.inc file in the library source doesn't reflect this.

Is that an oversight, or am I looking in the right place?

From [email-masked] Thu Feb 01 06:14:50 2001
Received: from sttlpop2.sttl.uswest.net ([206.81.192.2])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14O0qH-0003jl-00
for <[email-masked]>; Thu, 01 Feb 2001 06:14:49 +1300
Received: (qmail 79645 invoked by alias); 31 Jan 2001 17:08:59 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 55944 invoked by uid 0); 31 Jan 2001 17:03:30 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop2.sttl.uswest.net with SMTP; 31 Jan 2001 17:03:30 -0000
Message-ID: <028b01c08ba7$677209a0$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Hmmm, buggy code generation in 2.97
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Feb 1 06:15:04 2001
X-Original-Date: Wed, 31 Jan 2001 08:59:53 -0800

The "else if" and "else" clauses return to the middle of the
"outp(~led, PORTB); statement rather than the "while(1)"
ie. jump to L19 vs L31

Is this a known code generation bug?

compiler: Gunnar's ming32 distribution
Compiler flags: -g -O3 -Wall
File: MessageTimers.c
www.barello.net/avrx/GCC-AvrX-2.5/gcc-avrx-2.5a.zip
------------
while(1)
{
outp(~led, PORTB);
pMsg = (pMyMessage)AvrXWaitMessage(&MyQueue);
if (pMsg == &SwitchMsg)
{
led ^= ~(pMsg->data);
AvrXAckMessage(&pMsg->mcb);
}
else if ((pTimerMessageBlock)pMsg == &Timer)
{
asm("rol %0\n"\
"\tbrcc .+2\n"\
"\tinc %0\n" ::"r" (led));
AvrXStartTimerMessage(&Timer, 150, &MyQueue);
}
else
{
AvrXHalt();
}
}

-------------- Produces This ----------------
.L31:
mov r28,r29
com r28
.L19:
.stabn 68,0,86,.LM12-flasher
.LM12:
/* #APP */
out 24, r28
.stabn 68,0,87,.LM13-flasher
.LM13:
/* #NOAPP */
ldi r24,lo8(MyQueue)
ldi r25,hi8(MyQueue)
rcall AvrXWaitMessage
mov r18,r24
mov r19,r25
.stabn 68,0,88,.LM14-flasher
.LM14:
ldi r24,hi8(SwitchMsg)
cpi r18,lo8(SwitchMsg)
cpc r19,r24
breq .L30
.stabn 68,0,93,.LM15-flasher
.LM15:
subi r18,lo8(Timer)
sbci r19,hi8(Timer)
brne .L27
.stabn 68,0,95,.LM16-flasher
.LM16:
/* #APP */
rol r29
brcc .+2
inc r29

.stabn 68,0,98,.LM17-flasher
.LM17:
/* #NOAPP */
ldi r20,lo8(MyQueue)
ldi r21,hi8(MyQueue)
ldi r22,lo8(150)
ldi r23,hi8(150)
ldi r24,lo8(Timer)
ldi r25,hi8(Timer)
rcall AvrXStartTimerMessage
rjmp .L19
.stabn 68,0,90,.LM18-flasher
.LM18:
.L30:
lds r20,SwitchMsg+4
com r20
eor r29,r20
.stabn 68,0,91,.LM19-flasher
.LM19:
mov r25,r19
mov r24,r18
rcall AvrXAckMessage
rjmp .L31
.L27:
.stabn 68,0,102,.LM20-flasher
.LM20:
rcall AvrXHalt
rjmp .L19

From [email-masked] Thu Feb 01 06:18:23 2001
Received: from sttlpop2.sttl.uswest.net ([206.81.192.2])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14O0ti-0003kH-00
for <[email-masked]>; Thu, 01 Feb 2001 06:18:23 +1300
Received: (qmail 93347 invoked by alias); 31 Jan 2001 17:12:42 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 71424 invoked by uid 0); 31 Jan 2001 17:07:09 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop2.sttl.uswest.net with SMTP; 31 Jan 2001 17:07:09 -0000
Message-ID: <029501c08ba7$e8ba59e0$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Possible buggy code in 2.97
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Feb 1 06:19:04 2001
X-Original-Date: Wed, 31 Jan 2001 09:04:31 -0800

Sorry, I should have done this first:

The problem goes away with -Os vs -O3

So this seems to be an optimization bug.

Cheers!

From [email-masked] Thu Feb 01 10:08:18 2001
Received: from natmail2.webmailer.de ([192.67.198.65] helo=post.webmailer.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14O4UD-0003xv-00
for <[email-masked]>; Thu, 01 Feb 2001 10:08:17 +1300
Received: from web.de ([193.227.194.131])
by post.webmailer.de (8.9.3/8.8.7) with ESMTP id WAA28731
for <[email-masked]>; Wed, 31 Jan 2001 22:10:24 +0100 (MET)
Message-ID: <[email-masked]>
From: Thomas Driehorn <[email-masked]>
X-Mailer: Mozilla 4.6 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] searching for scalable software delays
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Feb 1 10:09:04 2001
X-Original-Date: Wed, 31 Jan 2001 22:05:01 +0100

Hi there !

I'm searching for some reliable working software delay routines that can
be scaled in usec and msec - range. Code should be "independend" from
cpu xtal. (just define frequency and routine computes delay value ...)

Anybody has an idea ?

Thomas

From [email-masked] Thu Feb 01 10:21:39 2001
Received: from bw211zhb.bluewin.ch ([195.186.1.211] helo=mta2n.bluewin.ch)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14O4h8-0003ym-00
for <[email-masked]>; Thu, 01 Feb 2001 10:21:38 +1300
Received: from bw150zhb.bluewin.ch (172.21.1.38) by mta2n.bluewin.ch (5.1.056)
id 3A702AFF001901D5 for [email-masked]; Wed, 31 Jan 2001 22:22:23 +0100
Received: from homepc (bw3-66pub109.bluewin.ch [62.202.66.109])
by bw150zhb.bluewin.ch (8.9.3/8.9.3) with SMTP id WAA02472
for <[email-masked]>; Wed, 31 Jan 2001 22:22:22 +0100 (MET)
Message-ID: <001001c08bcb$ef9f7280$6d42ca3e@homepc>
From: "Peter Fleury" <[email-masked]>
To: <[email-masked]>
Subject: Re:[avr-gcc-list] My EEPROM problems with 2.97 and Astudio 3.2
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Feb 1 10:22:04 2001
X-Original-Date: Wed, 31 Jan 2001 22:22:32 +0100

avr-objcopy incorrectly adds the eeprom section to both the=20
rom output and obj output.
Solution:
add -R .eeprom to both the .obj and .rom target.=20

(AStudio gets confused when the source files at end of obj file
starts at an odd address)

=20

From [email-masked] Thu Feb 01 20:21:05 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14OE3E-0004LY-00
for <[email-masked]>; Thu, 01 Feb 2001 20:21:04 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id IAA17011;
Thu, 1 Feb 2001 08:23:11 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: Carl Wall <[email-masked]>, AVR GCC List <[email-masked]>
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Re: Win32 binaries
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Feb 1 20:22:04 2001
X-Original-Date: Thu, 01 Feb 2001 08:23:11 +0100

Hello Carl

Carl Wall wrote:
>
> Was unpacking the window binaries and noticed some duplicate files in the
> various packages.
> 1. Is it normal for this to occur?
> 2. Is there an order that the binaries should be unpackaged in.
I don't know whether it is needed, but I unpack the archives in the same
order as I compiled the stuff:
1) binutils
2) gcc
3) libc

Greetings
Gunnar

From [email-masked] Thu Feb 01 23:42:49 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14OHCJ-0004U9-00
for <[email-masked]>; Thu, 01 Feb 2001 23:42:49 +1300
Received: (qmail 3563 invoked from network); 1 Feb 2001 10:46:15 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 1 Feb 2001 10:46:15 -0000
Received: from fri.uni-lj.si ([193.2.76.118]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with ESMTP id AAA24449
for <[email-masked]>; Thu, 1 Feb 2001 11:37:03 +0100
Message-ID: <[email-masked]>
From: [email-masked] (Robert Rozman)
X-Mailer: Mozilla 4.51 [sl] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: "[email-masked]" <[email-masked]>
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] UART Bit banging source code ?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Thu Feb 1 23:43:04 2001
X-Original-Date: Thu, 01 Feb 2001 11:47:01 +0100

Hello,

I'm wondering if anyone is willing to share source code for serial port
with bit banging.

Thanks in advance,

Robert Rozman

From [email-masked] Fri Feb 02 02:10:41 2001
Received: from smtp.tor.axxent.ca ([209.250.128.26] helo=mail.tor.axxent.ca)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14OJVY-0004Zp-00
for <[email-masked]>; Fri, 02 Feb 2001 02:10:41 +1300
Received: from digicom (dial-0247.tor.axxent.ca [216.249.0.247])
by mail.tor.axxent.ca (8.11.0/8.9.3) with ESMTP id f11DCjh03173
for <[email-masked]>; Thu, 1 Feb 2001 08:12:45 -0500 (EST)
Received: from cwall by digicom with local (Exim 3.12 #1 (Debian))
id 14OJZe-00008G-00; Thu, 01 Feb 2001 08:14:54 -0500
From: Carl Wall <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] searching for scalable software delays
Message-ID: <[email-masked]>
Mail-Followup-To: [email-masked]
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Wed, Jan 31, 2001 at 10:05:01PM +0100
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Feb 2 02:11:04 2001
X-Original-Date: Thu, 1 Feb 2001 08:14:54 -0500

Hi Thomas
Check out the source code for the pavr project on
http://avr.jpk.co.nz
it has the code for what you want in its timming loops.
Cheers
Carl

On Wed, Jan 31, 2001 at 10:05:01PM +0100, Thomas Driehorn wrote:
> Hi there !
>
> I'm searching for some reliable working software delay routines that can
> be scaled in usec and msec - range. Code should be "independend" from
> cpu xtal. (just define frequency and routine computes delay value ...)

--
Carl A. Wall VE3APY Toronto, Ontario, Canada
"Created on DEBIAN 2.2, an alternative to Microsoft Systems
and a GNU/Linux distribution of Open Source programming"

From [email-masked] Fri Feb 02 08:11:28 2001
Received: from sttlpop3.sttl.uswest.net ([206.81.192.3])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14OP8h-0004tI-00
for <[email-masked]>; Fri, 02 Feb 2001 08:11:27 +1300
Received: (qmail 4441 invoked by alias); 1 Feb 2001 18:56:32 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 29562 invoked by uid 0); 1 Feb 2001 18:45:17 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop3.sttl.uswest.net with SMTP; 1 Feb 2001 18:45:17 -0000
Message-ID: <002701c08c7f$9e73d360$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Fw: Astudio errors
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Feb 2 08:12:04 2001
X-Original-Date: Thu, 1 Feb 2001 10:46:03 -0800

Just thought you might be interested...

----- Original Message -----
From: <[email-masked]>

> Mr. Barello,
>
> You are not able to use the GCC compiler if you want to
use source code debugging. The GCC compiler does not support
the format used in AVR Studio. This will change somewhere in
the future - AVR Studio are going to support formats
available in the GCC compiler. Still, these changes are not
just around the corner, so I am not able to inform you about
any release date.

From [email-masked] Fri Feb 02 08:48:23 2001
Received: from cicero1.cybercity.dk ([212.242.40.4])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14OPiQ-0004vZ-00
for <[email-masked]>; Fri, 02 Feb 2001 08:48:23 +1300
Received: from usr00.cybercity.dk (usr00.cybercity.dk [212.242.40.34])
by cicero1.cybercity.dk (Postfix) with ESMTP id 4B30415FC28
for <[email-masked]>; Thu, 1 Feb 2001 20:50:36 +0100 (CET)
Received: from noa3 (port68.cvx1-sl.ppp.cybercity.dk [212.242.177.69])
by usr00.cybercity.dk (8.9.3/8.9.3) with SMTP id UAA76397
for <[email-masked]>; Thu, 1 Feb 2001 20:50:30 +0100 (CET)
(envelope-from [email-masked])
Message-ID: <01d601c08c88$84f16f70$2ab1f2d4@noa3>
From: "Kasper Pedersen" <[email-masked]>
To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Gunnar's AVRGCC as install set
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Feb 2 08:49:04 2001
X-Original-Date: Thu, 1 Feb 2001 20:52:33 +0100

I tried the latest version of my install-builder-kit on Gunnar's win32
AVRGCC build.
If anyone has 9MB bandwidth to waste, it's here:

http://kkp.dhs.org/avrgcc20010130.exe

This one is for dummies. It's not perfect, but it works well.
(it adds nothing to Gunnar's build - except the installer/uninstaller - so
it's waste of bandwidth so far. I will add my PIC/AVR/AT89/ColdFire/3048F
programmer to it later.. )

/Kasper

From [email-masked] Fri Feb 02 03:27:42 2001
Received: from mail.tps.de ([195.126.171.2] ident=daemon)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14OKi4-0004d1-00
for <[email-masked]>; Fri, 02 Feb 2001 03:27:40 +1300
Received: (from daemon@localhost)
by mail.tps.de (8.8.7/8.8.7) id PAA11047;
Thu, 1 Feb 2001 15:29:41 +0100
Received: from UNKNOWN(193.96.199.65), claiming to be "goepplinux"
via SMTP by mail.tps.de, id smtpda11045; Thu Feb 1 15:29:36 2001
From: Matthias G?ppner <[email-masked]>
Organization: TSP
To: Thomas Driehorn <[email-masked]>
Subject: Re: [avr-gcc-list] searching for scalable software delays
X-Mailer: KMail [version 1.0.21]
Content-Type: text/plain
References: <[email-masked]>
Cc: [email-masked]
MIME-Version: 1.0
Message-Id: <01020115113700.00447@goepplinux>
Content-Transfer-Encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Feb 2 15:23:05 2001
X-Original-Date: Thu, 1 Feb 2001 14:50:30 +0100

Hello Thomas,

I have developed a module to register a timeout. When the timeout expires, a
callback function will be called. Many timeouts can run at same time.

Initialisation: timeoutInit()
registering timeout: timeout()
removing timeout: untimeout()

The resolution is 256 us, the maximum time range is 12 days at clock frequency
8 MHz. If you define CLOCK_4MHZ, it will run with 4MHz. For other frequencies
you must change the code yourself. The module uses 16 Bit-Counter T1 and
extends it to 32 Bit. Load is reduced by making use of compare interrupt A.

If you don't need many timers, why don't you just set a compare interrupt of
Timer 1?

Matthias

---------------------------------------------------------
/*
============================================================================
M O D U L: timeout.c
Copyright (C) TSP Cadolzburg 2001 All Rights Reserved
============================================================================
Job:
set/clear timeouts
============================================================================
*/

/*============================================================================*/
/* system includes */
/*============================================================================*/

#include <stdlib.h>
#include <io.h>
#include <sig-avr.h>
#include <interrupt.h>
#include <utils.h>
#include <timeout.h>

/*============================================================================*/
/* constants */
/*============================================================================*/

#ifdef MYMALLOC
# define TOUT_MAX 30
#endif

/*============================================================================*/
/* macros */
/*============================================================================*/

#define currentTime() (((avr_time_t) currentTimeHigh << 16) | __inw_atomic(TCNT1L))

#ifdef MYMALLOC
# define free(ptr) ptr->free = 1
#endif

/*============================================================================*/
/* types */
/*============================================================================*/

typedef unsigned long avr_time_t; /* limit 12.7 days at resolution 256 useconds */

/*
Struct to hold timeout events in an ordered list
*/
typedef struct timeoutevent toutEvent;

struct timeoutevent
{
int number; /* identification */
avr_time_t callTime; /* timeout expiration time */
void (*callbackFunction)(); /* function to handle timeout */
char *arg; /* function arguments */
toutEvent *next; /* next entry in timeout list */
#ifdef MYMALLOC
char free; /* malloc()-emulation: mark free entries in pool */
#endif
};

/*============================================================================*/
/* statics */
/*============================================================================*/
static short currentTimeHigh = 0;
static int interrupt_state = 0;

static /*volatile */ toutEvent *anchor = NULL;

#ifdef MYMALLOC
static toutEvent toutPool[TOUT_MAX];
#endif

/*============================================================================*/
/* function declaration */
/*============================================================================*/
static void setTimeout(void);
static void removeTimeout(toutEvent *tout);
#ifdef MYMALLOC
static toutEvent* toutMalloc(int dummySize);
#endif

/*============================================================================
NAME
toutInit

DESCRIPTION
toutInit configures interrupts for timeout module.
============================================================================*/
void
toutInit(void)
{
#ifdef MYMALLOC
{
toutEvent *tout;
int i;

/* mark all entries as free in malloc()-emulation */
for (i = 0, tout = toutPool; i < TOUT_MAX; i++)
{
tout->free = 1;
tout++;
}
}
#endif

/* disable PWM and OC1X output */
outp(0x00, TCCR1A);

/*
bit 7: Input Capture Noice Canceller: off
bit 6: Input Capture Edge select: falling
bit 3: Clear Timer/Counter1 on Compare Match: off
*/
#ifdef CLOCK_4MHZ
/* bit 2..0: Clock1 Prescale select: 256 = 100b */
outp(0x04, TCCR1B);
#else
/* bit 2..0: Clock1 Prescale select: 1024 = 101b */
outp(0x05, TCCR1B);
#endif

/* timer 1 initial value */
__outw_atomic(0x0000, TCNT1L);

/* timer 1 overflow interrupt enable */
setBit(TIMSK, TOIE1);

/* timer 1 output compare A disable (while no timeout is set) */
clearBit(TIMSK, OCIE1A);

/* Global enable interrupts */
sei();
} /* end of toutInit() */

/*============================================================================
NAME
timeout

DESCRIPTION
timeout() registers function callbackFunction, which will be called in
diffTime * 256 useconds with argument arg.

RETURN VALUE
timeout() returns an index of the timeout wich can be used to delete the
timeout or -1 on error (if no memory could be allocated).
============================================================================*/
int
timeout(void (*callbackFunction)(char *), /* function to be called after diffTime */
char *arg, /* function argument */
unsigned long diffTime) /* timeout * 256 useconds */
{
toutEvent *newTimeout;
toutEvent loopStartTout;
toutEvent *i = &loopStartTout;
static int nTimeout = 0;
int overflow = 0;

if ((newTimeout = malloc(sizeof(toutEvent))) == NULL)
return -1;

#ifdef CLOCK_4MHZ /* the maximum timeout for 4 MHz will only be 0x7fff ffff (6.36 days) */
diffTime <<= 1;
#endif

/* fill elements of new entry */
newTimeout->callTime = currentTime() + diffTime;

/* sort absolute times correctly despite of overflow in addition */
if (newTimeout->callTime < currentTime())
overflow = 1;
newTimeout->callbackFunction = callbackFunction;
newTimeout->arg = arg;
newTimeout->next = NULL;

/* avoid negative numbers because -1 is reserved for error */
newTimeout->number = (++nTimeout < 0 ? 0: nTimeout);

if (!interrupt_state)
cli();

/* sort new timeout chronological into list */
for (i->next = anchor;
i->next != NULL;
i = i->next)
{
/* on overflow of absolute time walk first to timeout after wraparound */
if (overflow && (i->next->callTime > currentTime()))
continue;

if (i->next->callTime > newTimeout->callTime)
{
/* append rest of list to new entry */
newTimeout->next = i->next;
break;
}
}
if (i->next == anchor)
{
/* insert before first element, overwrite timer */
anchor = newTimeout;

if(!interrupt_state)
/* in interrupt timeout will be set after execution of callback function */
setTimeout();
}
else
{
/* change link of previous entry to new timeout */
i->next = newTimeout;
}

if (!interrupt_state)
sei();

return nTimeout;
} /* end of timeout() */

/*============================================================================
NAME
untimeout

DESCRIPTION
This function removes the timeout with index n from timeout list. This will
be needed if a timeout becomes obsolete.
============================================================================*/
void
untimeout(int n)
{
toutEvent *i;

if (!interrupt_state)
cli();

for (i = anchor; i != NULL; i = i->next)
if (i->number == n)
{
removeTimeout(i);
setTimeout();
break;
}

if (!interrupt_state)
sei();
}

/*============================================================================
NAME
setTimeout

DESCRIPTION
- call all expired timeouts, starting with *anchor.
- If next timeout will expire in this cycle of T1 set an interrupt for it,
otherwise disable timeout interrupt.
============================================================================*/
static void
setTimeout(void)
{
unsigned short timeHigh;
unsigned short timeLow;

again:
if (anchor == NULL)
{
/* disable compare interrupt */
clearBit(TIMSK, OCIE1A);
return;
}
timeHigh = HIWORD(anchor->callTime);
timeLow = LOWORD(anchor->callTime);

/*
Check for expired timeouts:
Overflow doesn't matter because of checking for equal, not for smaller
*/
if ((timeHigh == currentTimeHigh) && (timeLow <= (unsigned short) (__inw_atomic(TCNT1L)))

/*
Check also if currentTimeHigh has been incremented due to
very long timeout callback functions.
It is unlikely that callback functions last longer than 5 seconds.
*/
|| (timeHigh + 1 == currentTimeHigh))
{
/* time already expired ? */
if (timeLow <= (unsigned short) (__inw_atomic(TCNT1L)))
{
toutEvent oldAnchor = *anchor;
/*
timeout is already expired; call callback function directly
and check next timeout in list
*/
removeTimeout(anchor);
oldAnchor.callbackFunction(oldAnchor.arg);
goto again;
}

/* set timeout */
__outw(timeLow, OCR1AL);

/* clear pending compare A interrupts according spec */
setBit(TIFR, OCF1A);

/* enable Output Compare Register A Interrupt */
setBit(TIMSK, OCIE1A);
}
else
{
/*
/* timeout isn't in range of T1; disable Output Compare Register A Interrupt */
clearBit(TIMSK, OCIE1A);
}

return;
}

/*============================================================================
NAME
removeTimeout

DESCRIPTION
Delete timeout from timeout list.
============================================================================*/
static void
removeTimeout(toutEvent *tout)
{
toutEvent *i;

if (tout == anchor)
{
anchor = tout->next;
}
else
{
for (i = anchor; i != NULL; i = i->next)
if (i->next == tout)
{
i->next = tout->next;
break;
}
}
free(tout);
}

/*============================================================================
NAME
(Timer 1 compare interrupt A service routine)

DESCRIPTION
call timeout callback function of expired interrupt and set new timeout interrupt
============================================================================*/
SIGNAL(SIG_OUTPUT_COMPARE1A)
{

#ifdef AVR_TESTLED
/* indicate interrupt on LED */
outp( inp(PORTB) ^ 0x02, PORTB);
#endif

/* only for security */
if (anchor == NULL)
{
/* oops - if this matters an interrupt has corrupted timeout list */
return;
}

/* prevents calling setTimeout() twice if a new timeout is set in callback function */
interrupt_state++;

{
toutEvent oldAnchor = *anchor;

removeTimeout(anchor);

/* DO the callback */
(oldAnchor.callbackFunction)(oldAnchor.arg);

/* set new timeout */
setTimeout();

}

interrupt_state--;
}

/*============================================================================
NAME
(Timer 1 overflow interrupt service routine)

DESCRIPTION
Increment software counter and set timeout interrupts in current cycle of T1.
============================================================================*/
SIGNAL(SIG_OVERFLOW1)
{

#ifdef AVR_TESTLED
/* indicate interrupt on LED */
outp( inp(PORTB) ^ 0x04, PORTB);
#endif

interrupt_state++;

currentTimeHigh++;

/*
previously set alarms (T1CompareInterrupt) will expire before this
overflow interrupt occurs; there is no need to test if an alarm is active
*/
setTimeout();

interrupt_state--;
}

/*============================================================================*/
/* helper functions */
/*============================================================================*/

#ifdef MYMALLOC
/*============================================================================
NAME
malloc

DESCRIPTION
malloc() allocates a structure to hold a timeout.

RETURN VALUE
pointer to allocated structure
============================================================================*/
static toutEvent *
malloc(int dummySize)
{
int i;
toutEvent *tout;

for (i = 0, tout = toutPool; i < TOUT_MAX; i++, tout++)
{
if(tout->free)
{
tout->free = 0;
return tout;
}
}
return NULL;
}
#endif

---------------------------------------------------------

Am Mit, 31 Jan 2001 schrieben Sie:
> Hi there !
>
> I'm searching for some reliable working software delay routines that can
> be scaled in usec and msec - range. Code should be "independend" from
> cpu xtal. (just define frequency and routine computes delay value ...)
>
> Anybody has an idea ?
>
> Thomas
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
--
TSP - Teleprocessing Systems & Products mbH
Matthias Goeppner [email-masked]
Altenreuth 5 95326 Kulmbach - Germany
phone: +49 9221 804253 fax : +49 9221 8219015

From [email-masked] Fri Feb 02 06:20:03 2001
Received: from cicero2.cybercity.dk ([212.242.40.53])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ONOs-0004kt-00
for <[email-masked]>; Fri, 02 Feb 2001 06:20:03 +1300
Received: from usr03.cybercity.dk (usr03.cybercity.dk [212.242.40.83])
by cicero2.cybercity.dk (Postfix) with ESMTP id EC10DFFF0D
for <[email-masked]>; Thu, 1 Feb 2001 18:22:13 +0100 (CET)
Received: from noa3 (port41.cvx1-sl.ppp.cybercity.dk [212.242.177.42])
by usr03.cybercity.dk (8.11.0/8.11.0) with SMTP id f11HM8I92847
for <[email-masked]>; Thu, 1 Feb 2001 18:22:13 +0100 (CET)
(envelope-from [email-masked])
Message-ID: <007001c08c73$caef9340$2ab1f2d4@noa3>
From: "Kasper Pedersen" <[email-masked]>
To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Gunner's AVRGCC as install set
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Fri Feb 2 15:23:16 2001
X-Original-Date: Thu, 1 Feb 2001 18:24:06 +0100

I tried the latest version of my install-builder-kit on Gunnar's win32
AVRGCC build.
If anyone has 9MB bandwidth to waste, it's here:

http://kkp.dhs.org/avrgcc20010130.exe

This one is for dummies. It's not perfect, but it works well.
(it adds nothing to Gunnar's build - except the installer/uninstaller - so
it's waste of bandwidth so far. I will add my PIC/AVR/AT89/ColdFire/3048F
programmer to it later.. )

/Kasper

From [email-masked] Sat Feb 03 00:40:01 2001
Received: from nets5.rz.rwth-aachen.de ([137.226.144.13])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14OeZM-0005YG-00
for <[email-masked]>; Sat, 03 Feb 2001 00:40:00 +1300
Received: from Ostermann-net.de (213_21_41_13.surf-callino.de [213.21.41.13])
by nets5.rz.rwth-aachen.de (8.10.1/8.10.1/6) with SMTP id f129F8L08038
for <[email-masked]>; Fri, 2 Feb 2001 10:15:09 +0100 (MET)
Message-Id: <[email-masked]>
From: Thorsten Ostermann <[email-masked]>
To: [email-masked]
X-Mailer: Thorsten Ostermann's registered AK-Mail 3.1 publicbeta2a [ger]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Diffenrces betwwen Volkers and Gunnars distribution?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Feb 3 00:41:04 2001
X-Original-Date: Fri, 2 Feb 2001 09:24:38 +0100

Before installing gunnars new release off gcc for win I'm wondering
about the changes made compared to Volker Oths version? I'm always
afraid of getting in trouble with any software update, especially with
compilers ;-)

Best regards
Thorsten

From [email-masked] Sat Feb 03 06:24:16 2001
Received: from smtp.tor.axxent.ca ([209.250.128.26] helo=mail.tor.axxent.ca)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14OjwV-0005lY-00
for <[email-masked]>; Sat, 03 Feb 2001 06:24:16 +1300
Received: from digicom (dial-0012.tor.axxent.ca [216.249.0.12])
by mail.tor.axxent.ca (8.11.0/8.9.3) with ESMTP id f12HQTh16609
for <[email-masked]>; Fri, 2 Feb 2001 12:26:29 -0500 (EST)
Received: from cwall by digicom with local (Exim 3.12 #1 (Debian))
id 14Ok0n-0000AM-00; Fri, 02 Feb 2001 12:28:41 -0500
From: Carl Wall <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] Diffenrces betwwen Volkers and Gunnars distribution?
Message-ID: <[email-masked]>
Mail-Followup-To: [email-masked]
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Fri, Feb 02, 2001 at 09:24:38AM +0100
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Feb 3 06:25:05 2001
X-Original-Date: Fri, 2 Feb 2001 12:28:41 -0500

Hi Thorsten
I installed Gunnar's binaries last night on an NT system. I Had Volker
installed before on the D drive. The binaries installed into a different
directory and where placed on the C drive. I installed them in the following
order Binutils, GCC, Libc and the gnu tools. A couple of files where
duplicated in the zip files and get over written so I think the order is
important. I then moved the run.bat file from the Volker installation
and modified it to reflect the new directory and removed the commands that
made the old libc files. Then I made a new short cut to the run.bat file.
After that I moved the gcctest directory and the make1 make2 files. This
moring I tested the rom file that I made on the system last night, and it
is running correctly on the stk200 board. If there are any other surprises
I have not run into them yet.
Cheers
Carl

On Fri, Feb 02, 2001 at 09:24:38AM +0100, Thorsten Ostermann wrote:
> Before installing gunnars new release off gcc for win I'm wondering
> about the changes made compared to Volker Oths version? I'm always
> afraid of getting in trouble with any software update, especially with
> compilers ;-)
>
> Best regards
> Thorsten
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
Carl A. Wall VE3APY Toronto, Ontario, Canada
"Created on DEBIAN 2.2, an alternative to Microsoft Systems
and a GNU/Linux distribution of Open Source programming"

From [email-masked] Sat Feb 03 11:32:32 2001
Received: from bw211zhb.bluewin.ch ([195.186.1.211] helo=mta2n.bluewin.ch)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Ookp-00061l-00
for <[email-masked]>; Sat, 03 Feb 2001 11:32:32 +1300
Received: from bw150zhb.bluewin.ch (172.21.1.38) by mta2n.bluewin.ch (5.1.056)
id 3A702AFF0021C744 for [email-masked]; Fri, 2 Feb 2001 23:33:02 +0100
Received: from homepc (bw3-64pub236.bluewin.ch [62.202.64.236])
by bw150zhb.bluewin.ch (8.9.3/8.9.3) with SMTP id XAA08397
for <[email-masked]>; Fri, 2 Feb 2001 23:33:01 +0100 (MET)
Message-ID: <003001c08d68$24fab820$ec40ca3e@homepc>
From: "Peter Fleury" <[email-masked]>
To: <[email-masked]>
Subject: Re:[avr-gcc-list] Diffenrces betwwen Volkers and Gunnars distribution
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sat Feb 3 11:33:04 2001
X-Original-Date: Fri, 2 Feb 2001 23:33:16 +0100

The difference between Volker's distribution (based on avr-gcc 2.95-2)
and Gunnars (based on avr-gcc 2.97) are mainly the followings:

1) different function call convention:
If you have written modules in ASM which need to be called by=20
avr-gcc C-modules, the ASM modules must be adapted
( single byte parameter now passed using r24, r22 .. )

2) bug with avr-objcopy with eeprom section
avr-objcopy incorrectly add the eeprom section to both the rom and =
the
AVR Studio obj file.
Workaround: add -R .eeprom to both the .rom and .obj target
=20
avr-gcc incorrectly adds an offset to the eeprom section
Workaround: add --change-section-lma .eeprom=3D0 to the .eep target.

3) Several reported bugs with flag -O3:
strlen() built-in line reports wrong result
Workaround: use -O2 or -Os

Peter Fleury [email-masked] http://jump.to/fleury

From [email-masked] Sun Feb 04 03:17:02 2001
Received: from [207.174.230.106] (helo=ozservers.com ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14P3Uq-0006cA-00
for <[email-masked]>; Sun, 04 Feb 2001 03:17:01 +1300
Received: (qmail 4485 invoked from network); 4 Feb 2001 05:15:56 -0000
Received: from d174-ps1-mel.alphalink.com.au (HELO research) (202.161.106.48)
by 207.174.230.165 with SMTP; 4 Feb 2001 05:15:56 -0000
Message-ID: <001201c08dec$ee63f3a0$306aa1ca@research>
From: "Ron Kreymborg" <[email-masked]>
To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] FP Library
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Feb 4 03:18:04 2001
X-Original-Date: Sun, 4 Feb 2001 01:23:34 +1100

I need a little help in understanding the /avrgcc/avr/lib/avr3, /avr4 and
/avr5 libraries in Gunnar's implementation (thanks Gunnar).

I am using a mega103, and I need the atof() and dtostre() functions which
were available in Volker's implementation. If I include the /avr3/libm.a
library which contains these functions, I get missing links to other support
functions like __udivmodq14 and fp_zero.

Direction to some doco would do, or perhaps what the link line should look
like.

Many thanks
Ron

From [email-masked] Sun Feb 04 04:15:56 2001
Received: from invalid.ed.ntnu.no ([129.241.179.15])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14P4Pq-0006eq-00
for <[email-masked]>; Sun, 04 Feb 2001 04:15:55 +1300
Received: from localhost (hembre@localhost)
by invalid.ed.ntnu.no (8.9.3/8.9.3) with ESMTP id QAA64379
for <[email-masked]>; Sat, 3 Feb 2001 16:25:14 +0100 (CET)
(envelope-from [email-masked])
From: Bernt Hustad Hembre <[email-masked]>
X-Sender: [email-masked]
To: AVR Mailing List <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] AVR Freaks.net
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Feb 4 04:16:04 2001
X-Original-Date: Sat, 3 Feb 2001 16:25:14 +0100 (CET)

Check out this new web-page:

http://www.avrfreaks.net

And of cource also check OmegaV's AVR resource page:
http://www.omegav.ntnu.no/avr

Bernie
Tlf.: 92648923
[email-masked]

From [email-masked] Sun Feb 04 06:47:49 2001
Received: from [166.114.83.4] (helo=lapaz.soboce.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14P6mq-0007AT-00
for <[email-masked]>; Sun, 04 Feb 2001 06:47:49 +1300
To: [email-masked]
Bcc:
From: [email-masked]
Message-ID: <[email-masked]>
X-MIMETrack: Serialize by Router on LaPaz/SOBOCE(Version 5.0.2c (Esp.)|8 febrero del
2000) at 03/02/2001 13.55.28
MIME-Version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: base64
Subject: [avr-gcc-list] gcc-compiler copy
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Feb 4 06:48:05 2001
X-Original-Date: Sat, 3 Feb 2001 13:52:20 -0400

DQouLi4NCg0KSSB3YW50ZWQgdG8gZG93bmxvYWQgYSBjb3B5IG9mIGF2ci1nY2MgY29tcGlsZXIg
bWFueSB0aW1lcyBidXQgSSBjb3VsZG4ndA0KYmVjYXVzZSBvZiBwb29yIGxpbmVzLg0KSSBhc2tl
ZCBhIGNvcHkgb2YgYXZyLWdjYyBjb21waWxlciB0byBzb21lIG1lbWJlcnMgb2YgdGhlIGxpc3Qg
aG93ZXZlciBpdA0Kc2VlbXMNCnRoZXkgY2FuJ3QgYmVjYXVzZSBvZiB0aGUgc2l6ZSBvZiBmaWxl
cy4NCg0KSXMgdGhlcmUgYSB3YXkgdGhhdCBzb21lb25lIHNhdmVzIGEgY29weSBvZiBhdnItZ2Nj
IGNvbXBpbGVyIG9uIGEgQ0QgYW5kDQpzZW5kcyBpdCB0byBtZT8NCkknZCBwYXkgdGhlIGNvc3Qg
KyBzaGlwcGluZyBjaGFyZ2VzLg0KDQpJJ2xsIGJlIHZlcnkgZ3JhdGVmdWwgaWYgeW91IGNhbiBo
ZWxwIG1lIQ0KDQpUSUENCkphdmllcg0KU2FudGEgQ3J1eiAtIEJvbGl2aWENCg0K

From [email-masked] Sun Feb 04 10:18:21 2001
Received: from bw211zhb.bluewin.ch ([195.186.1.211] helo=mta2n.bluewin.ch)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14PA4a-0008QZ-00
for <[email-masked]>; Sun, 04 Feb 2001 10:18:21 +1300
Received: from bw150zhb.bluewin.ch (172.21.1.38) by mta2n.bluewin.ch (5.1.056)
id 3A702AFF0024826C for [email-masked]; Sat, 3 Feb 2001 22:19:19 +0100
Received: from homepc (bw3-70pub234.bluewin.ch [62.202.70.234])
by bw150zhb.bluewin.ch (8.9.3/8.9.3) with SMTP id WAA06866
for <[email-masked]>; Sat, 3 Feb 2001 22:19:18 +0100 (MET)
Message-ID: <000d01c08e27$03c6c1c0$ea46ca3e@homepc>
From: "Peter Fleury" <[email-masked]>
To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] GCC documentation in Windows Help format
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Sun Feb 4 10:19:04 2001
X-Original-Date: Sat, 3 Feb 2001 22:19:33 +0100

I downloaded all GCC texinfo file directly from the GNU site using CVS and
converted it with a tool into a Windows Help file.

This file can be found here
http://luna.spaceports.com/~pfleury/GCCWinhelp.zip .

Regards
Peter Fleury

http://jump.to/fleury
http://luna.spaceports.com/~pfleury (mirror)

From [email-masked] Mon Feb 05 10:13:37 2001
Received: from [207.174.230.106] (helo=ozservers.com ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14PWTY-0000sJ-00
for <[email-masked]>; Mon, 05 Feb 2001 10:13:36 +1300
Received: (qmail 8818 invoked from network); 5 Feb 2001 12:12:37 -0000
Received: from d355-ps0-mel.alphalink.com.au (HELO research) (202.161.105.101)
by 207.174.230.165 with SMTP; 5 Feb 2001 12:12:37 -0000
Message-ID: <000901c08ef0$4ec80340$6569a1ca@research>
From: "Ron Kreymborg" <[email-masked]>
To: <[email-masked]>
References: <001201c08dec$ee63f3a0$306aa1ca@research>
Subject: Re: [avr-gcc-list] FP Library
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Mon Feb 5 10:14:04 2001
X-Original-Date: Mon, 5 Feb 2001 08:20:19 +1100

Further to my earlier request about the "undefined" dtostre and atof
functions, here is a small test program that can be easily cut and pasted
for testing.

#include <stdlib.h>
int main(void);
const char *number = "0.487467";
char result[20];
int main(void)
{
float theNumber;
// Convert ascii to floating point
theNumber = (float)atof(number);
// Convert back to a scientific format.
dtostre(theNumber, output, 4, 0x6);
// This should leave "+4.8747E-01" in result.
return 0;
}

My bare bones test compile and link lines were:

avr-gcc -c -mmcu=atmega103 test_dtostre.c -o test_dtostre.o

avr-gcc test_dtostre.o -lm -o test_dtostre.elf

I would appreciate any clues here if it is something I am doing wrong.

Ron

From [email-masked] Tue Feb 06 08:57:57 2001
Received: from pop3.web.de ([212.227.116.81] helo=smtp.web.de)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14Prlt-0001lw-00
for <[email-masked]>; Tue, 06 Feb 2001 08:57:57 +1300
Received: from panacea by smtp.web.de with smtp
(freemail 4.2.1.5 #31) id m14ProE-000wGaC; Mon, 5 Feb 2001 21:00 +0100
Message-ID: <004801c08fae$49bc69e0$fe78a8c0@panacea>
From: =?iso-8859-1?Q?Andr=E9_van_Ooyen?= <[email-masked]>
To: <[email-masked]>
Subject: [avr-gcc-list] Linker Problems
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0045_01C08FB6.A8DD5030"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Feb 6 08:58:05 2001
X-Original-Date: Mon, 5 Feb 2001 21:00:24 +0100

This is a multi-part message in MIME format.

------=_NextPart_000_0045_01C08FB6.A8DD5030
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello!

I tried Gunnar's new compile of avr-gcc 2.97 and tested some compiles =
with Volker's gcctest files. No problems with 8515 but
for example with at90s2313 I get after make:

avr-gcc -c -g -O3 -Wall -Wstrict-prototypes -Wa,-ahlms=3Dgcctest1.lst=20
-mmcu=3Dat90s2313 -I. gcctest1.c gcctest1.o
avr-gcc gcctest.o -Wl, -Map=3Dgcctest1.map, --cref -mmcu=3Dat90s2313
-o gcctest1.elf
E:\avrgcc\bin\..\lib\gcc-lib\avr\2.97\..\..\..\..\avr\bin\ld.exe:
cannot open linker script file ldscripts/avr23xx.x: No such file =
or=20
directory

What's the problem ?

Thanx,
Andr=E9

P.S.: Source is:
#include <io.h>

typedef unsigned char u08;

int main( void )
{
u08 led, i, j, k;

outp(0xff,DDRB); /* use all pins on PortB for output */

led =3D 1; /* init variable representing the LED =
state */

for (;;) {
outp(~led, PORTB); /* invert the output since a zero means: =
LED on */
led <<=3D 1; /* move to next LED */
if (!led) /* overflow: start with Port B0 again */
led =3D 1;
for (i=3D0; i<255; i++) /* outer delay loop */
for(j=3D0; j<255;j++) /* inner delay loop */
k++; /* just do something - could also be a =
NOP */
}
}

------=_NextPart_000_0045_01C08FB6.A8DD5030
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>Hello!</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I tried Gunnar's new compile of avr-gcc =
2.97 and=20
tested some compiles with Volker's gcctest files. No problems with 8515=20
but</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>for example with at90s2313 I get =
</FONT><FONT=20
face=3DArial size=3D2>after make:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>avr-gcc -c -g -O3 -Wall =
-Wstrict-prototypes=20
-Wa,-ahlms=3Dgcctest1.lst </FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;-mmcu=3Dat90s2313=20
-I. gcctest1.c gcctest1.o</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>avr-gcc gcctest.o -Wl, =
-Map=3Dgcctest1.map, --cref=20
-mmcu=3Dat90s2313</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -o =

gcctest1.elf</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>E:\avrgcc\bin\..\lib\gcc-lib\avr\2.97\..\..\..\..\avr\bin\ld.exe=
:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
cannot open=20
linker script file ldscripts/avr23xx.x: No such file or </FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;directory</FONT>=
</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>What's the problem ?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanx,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Andr=E9</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>P.S.: Source is:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>#include &lt;io.h&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>typedef unsigned char&nbsp; =
u08;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>int main( void )<BR>{<BR>&nbsp;&nbsp; =
u08 led, i,=20
j, k;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;=20
outp(0xff,DDRB);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;=20
/* use all pins on PortB for output */</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp; led =3D=20
1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
/* init variable representing the LED state */</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp; for (;;)=20
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; outp(~led,=20
PORTB);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* invert the output since a zero =
means:=20
LED on */<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; led &lt;&lt;=3D=20
1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;=20
/* move to next LED */<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if=20
(!led)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;=20
/* overflow: start with Port B0 again=20
*/<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; led =
=3D=20
1;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (i=3D0; i&lt;255; =
i++)&nbsp;&nbsp;=20
/* outer delay loop=20
*/<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
for(j=3D0;=20
j&lt;255;j++) /* inner delay loop=20
*/<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;=20
k++;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
/* just=20
do something - could also be a NOP */<BR>&nbsp;&nbsp;=20
}<BR>}</FONT></DIV></FONT></DIV></BODY></HTML>

------=_NextPart_000_0045_01C08FB6.A8DD5030--

From [email-masked] Tue Feb 06 08:52:18 2001
Received: from pop.gmx.net ([194.221.183.20] helo=mail.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14PrgP-0001lM-00
for <[email-masked]>; Tue, 06 Feb 2001 08:52:17 +1300
Received: (qmail 13472 invoked by uid 0); 5 Feb 2001 19:54:14 -0000
Received: from 1-58.k.dial.o-tel-o.net (HELO panacea) (212.144.1.58)
by mail.gmx.net (mp004-rz3) with SMTP; 5 Feb 2001 19:54:14 -0000
Message-ID: <003301c08fad$6e6438f0$fe78a8c0@panacea>
From: =?iso-8859-1?Q?Andr=E9_van_Ooyen?= <[email-masked]>
To: <[email-masked]>
Subject: [avr-gcc-list] Linker Problems
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_001E_01C08FB5.9DF3FF80"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Feb 6 12:17:04 2001
X-Original-Date: Mon, 5 Feb 2001 20:52:56 +0100

This is a multi-part message in MIME format.

------=_NextPart_000_001E_01C08FB5.9DF3FF80
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello!

I tried Gunnar's new compile of avr-gcc 2.97 and tested some compiles =
with Volker's gcctest files. No problems with 8515 but
for example with at90s2313 I get after make:

avr-gcc -c -g -O3 -Wall -Wstrict-prototypes -Wa,-ahlms=3Dgcctest1.lst=20
-mmcu=3Dat90s2313 -I. gcctest1.c gcctest1.o
avr-gcc gcctest.o -Wl, -Map=3Dgcctest1.map, --cref -mmcu=3Dat90s2313
-o gcctest1.elf
E:\avrgcc\bin\..\lib\gcc-lib\avr\2.97\..\..\..\..\avr\bin\ld.exe:
cannot open linker script file ldscripts/avr23xx.x: No such file =
or=20
directory

What's the problem ?

Thanx,
Andr=E9

P.S.: Source is:
#include <io.h>

typedef unsigned char u08;

int main( void )
{
u08 led, i, j, k;

outp(0xff,DDRB); /* use all pins on PortB for output */

led =3D 1; /* init variable representing the LED =
state */

for (;;) {
outp(~led, PORTB); /* invert the output since a zero means: =
LED on */
led <<=3D 1; /* move to next LED */
if (!led) /* overflow: start with Port B0 again */
led =3D 1;
for (i=3D0; i<255; i++) /* outer delay loop */
for(j=3D0; j<255;j++) /* inner delay loop */
k++; /* just do something - could also be a =
NOP */
}
}

------=_NextPart_000_001E_01C08FB5.9DF3FF80
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello!</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I tried Gunnar's new compile of avr-gcc =
2.97 and=20
tested some compiles with Volker's gcctest files. No problems with 8515=20
but</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>for example with at90s2313 I get =
</FONT><FONT=20
face=3DArial size=3D2>after make:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>avr-gcc -c -g -O3 -Wall =
-Wstrict-prototypes=20
-Wa,-ahlms=3Dgcctest1.lst </FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;-mmcu=3Dat90s2313=20
-I. gcctest1.c gcctest1.o</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>avr-gcc gcctest.o -Wl, =
-Map=3Dgcctest1.map, --cref=20
-mmcu=3Dat90s2313</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -o =

gcctest1.elf</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>E:\avrgcc\bin\..\lib\gcc-lib\avr\2.97\..\..\..\..\avr\bin\ld.exe=
:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
cannot open=20
linker script file ldscripts/avr23xx.x: No such file or </FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;directory</FONT>=
</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>What's the problem ?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanx,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Andr=E9</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>P.S.: Source is:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>#include &lt;io.h&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>typedef unsigned char&nbsp; =
u08;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>int main( void )<BR>{<BR>&nbsp;&nbsp; =
u08 led, i,=20
j, k;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;=20
outp(0xff,DDRB);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;=20
/* use all pins on PortB for output */</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp; led =3D=20
1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
/* init variable representing the LED state */</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp; for (;;)=20
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; outp(~led,=20
PORTB);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* invert the output since a zero =
means:=20
LED on */<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; led &lt;&lt;=3D=20
1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;=20
/* move to next LED */<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if=20
(!led)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;=20
/* overflow: start with Port B0 again=20
*/<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; led =
=3D=20
1;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (i=3D0; i&lt;255; =
i++)&nbsp;&nbsp;=20
/* outer delay loop=20
*/<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
for(j=3D0;=20
j&lt;255;j++) /* inner delay loop=20
*/<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;=20
k++;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
/* just=20
do something - could also be a NOP */<BR>&nbsp;&nbsp;=20
}<BR>}</FONT></DIV></BODY></HTML>

------=_NextPart_000_001E_01C08FB5.9DF3FF80--

From [email-masked] Tue Feb 06 20:27:33 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Q2XD-0002F2-00
for <[email-masked]>; Tue, 06 Feb 2001 20:27:32 +1300
Received: from oTRIs.de (DHCP9.o3s.de [192.168.2.108])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id IAA28463;
Tue, 6 Feb 2001 08:29:54 +0100
Message-ID: <[email-masked]>
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: =?iso-8859-1?Q?Andr=E9?= van Ooyen <[email-masked]>
CC: [email-masked]
References: <004801c08fae$49bc69e0$fe78a8c0@panacea>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by o3s.o3s.de id IAA28463
Subject: [avr-gcc-list] Re: Linker Problems
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Tue Feb 6 20:28:04 2001
X-Original-Date: Tue, 06 Feb 2001 08:29:53 +0100

Hello Andr=E9,

> cannot open linker script file ldscripts/avr23xx.x: No such
> What's the problem ?

Try to remove the following line from install.ini
echo " rm -fR %this_short%\avr\lib\*"
If it works (try to install under an other location) I will remove the
line permanentely.

Greetings

Gunnar

--=20
Gunnar Henne Email: [email-masked]
oTRIs GmbH & Co. KG Tel. : 0231 / 10616-21
Landgrafenstr. 153 Fax. : 0231 / 10615-44
44139 Dortmund

From [email-masked] Wed Feb 07 00:30:41 2001
Received: from mail.azisa.co.za ([196.14.124.43])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Q6KU-0002PG-00
for <[email-masked]>; Wed, 07 Feb 2001 00:30:40 +1300
Received: by MAIL with Internet Mail Service (5.5.2650.21)
id <D9GX8CJ4>; Tue, 6 Feb 2001 13:35:33 +0200
Message-ID: <934C10A9A64AD4119440009027E09988046DB2@MAIL>
From: Jan Cilliers <[email-masked]>
To: "[email-masked]'" <[email-masked]>
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: text/plain;
charset="iso-8859-1"
Subject: [avr-gcc-list] GDB..
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
Date: Wed Feb 7 00:31:04 2001
X-Original-Date: Tue, 6 Feb 2001 13:35:27 +0200

Hi,

I got the latest snapshots of avr-gcc, the binutils and avr-libs installed.
I having trouble installing gdb-4.18 with these snapshots. There are some
error about undefined labels or something. Does anybody know if gdb-5.0
includes the avr port? Which snapshots can I use with gdb?

Jan.

From [email-masked] Wed Feb 07 23:10:20 2001
Received: from pop3.web.de ([212.227.116.81] helo=smtp.web.de)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14QRYI-0003KR-00
for <[email-masked]>; Wed, 07 Feb 2001 23:10:19 +1300
Received: from panacea by smtp.web.de with smtp
(freemail 4.2.1.5 #31) id m14QRak-000tQ7C; Wed, 7 Feb 2001 11:12 +0100
Message-ID: <000a01c090ee$8c8ad9a0$fe78a8c0@panacea>
From: =?iso-8859-1?Q?Andr=E9_van_Ooyen?= <[email-masked]>
To: <[email-masked]>
Subject: [avr-gcc-list] Re: Linker Problems
Date: Wed, 7 Feb 2001 11:12:58 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0007_01C090F6.ED6270A0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_0007_01C090F6.ED6270A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello again,

thanks Gunnar, it seems to work.

AVR Studio 3.21 can simulate the source but I didn't check it
any further in real hardware.

Greeting

Andr=E9

------=_NextPart_000_0007_01C090F6.ED6270A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello again,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>thanks Gunnar, it seems to =
work.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>AVR Studio 3.21 can simulate the source =
but I=20
didn't check it</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>any further in real =
hardware.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Greeting</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Andr=E9</FONT></DIV></BODY></HTML>

------=_NextPart_000_0007_01C090F6.ED6270A0--

From [email-masked] Sat Feb 10 02:53:58 2001
Received: from nuustak.csir.co.za ([146.64.10.11])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14RDzb-0005LX-00
for <[email-masked]>; Sat, 10 Feb 2001 02:53:56 +1300
Received: from CS-IMO.CSIR.CO.ZA (cs-imo.csir.co.za [146.64.10.94])
by nuustak.csir.co.za (8.10.1/8.10.1) with SMTP id f19Dsh917335
for <[email-masked]>; Fri, 9 Feb 2001 15:54:43 +0200 (SAT)
Disclaimer: The CSIR exercises no editorial control over E-mail
messages originating in the organisation and the views in this
message are therefore not necessarily those of the CSIR and/or
its employees.
Received: from GW-IMO-Message_Server by CS-IMO.CSIR.CO.ZA
with Novell_GroupWise; Fri, 09 Feb 2001 15:54:47 +0200
Message-Id: <[email-masked]>
X-Mailer: Novell GroupWise Internet Agent 5.5.4.1
Date: Fri, 09 Feb 2001 15:54:30 +0200
From: "Peter Bosscha" <[email-masked]>
To: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="=_90CB24B7.35543806"
Subject: [avr-gcc-list] SRAM Usage
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a MIME message. If you are reading this text, you may want to
consider changing to a mail reader or gateway that understands how to
properly handle MIME multipart messages.

--=_90CB24B7.35543806
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hi,

I'm using the windows port of AVR-GCC (Volker Oth) and have completed a =
few projects.
Only recently I've discovered that the linker seems to be rather generous =
with SRAM.=20
Looking at the map file I find that between modules of a project there is =
always a fill until the next 0 nibble, I could define a single byte in a =
module which then actually wastes another 15 bytes. The same happens when =
I mix bytes and arrays of chars, again there is an allignment, this time =
within the module, to the next nibble.

Anyone any ideas ? I would expect that one can adjust the linker to do =
this differently ?

Thanks in advance

Peter Bosscha

--=_90CB24B7.35543806
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Description: HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1"=
>
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR></HEAD>
<BODY style=3D"MARGIN-TOP: 2px; FONT: 10pt Arial; MARGIN-LEFT: 2px"=20
bgColor=3D#ffffff>
<DIV>Hi,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I'm using the windows port of AVR-GCC (Volker Oth) and have completed =
a few=20
projects.</DIV>
<DIV>Only recently I've discovered that the linker&nbsp;seems to be=20
rather&nbsp;generous with SRAM. </DIV>
<DIV>Looking at the map file I find that&nbsp;between modules of a =
project=20
there&nbsp;is always a fill until the next 0 nibble, I could define a =
single=20
byte in a module&nbsp;which then actually wastes another 15 bytes. The =
same=20
happens when I mix bytes and arrays of chars, again there is an allignment,=
this=20
time within the module,&nbsp;&nbsp;to the next nibble.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Anyone any ideas ? I would expect that one can adjust the linker to =
do this=20
differently ?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks in advance</DIV>
<DIV>&nbsp;</DIV>
<DIV>Peter Bosscha</DIV></BODY></HTML>

--=_90CB24B7.35543806--

From [email-masked] Sat Feb 10 04:20:59 2001
Received: from sttlpop5.sttl.uswest.net ([206.81.192.5])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14RFM2-0005Po-00
for <[email-masked]>; Sat, 10 Feb 2001 04:20:58 +1300
Received: (qmail 17385 invoked by alias); 9 Feb 2001 15:23:41 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 17327 invoked by uid 0); 9 Feb 2001 15:23:40 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop5.sttl.uswest.net with SMTP; 9 Feb 2001 15:23:40 -0000
Message-ID: <004101c092ac$d0f018c0$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "Peter Bosscha" <[email-masked]>,
"AVR GCC List" <[email-masked]>
Cc: <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] SRAM Usage
Date: Fri, 9 Feb 2001 07:20:55 -0800
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_003C_01C09268.D771FE00"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_003C_01C09268.D771FE00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

You need the compiler from a couple months ago, vs the one on Volkers =
web site which is over a year old. The new compiler packs SRAM =
properly. Try: http://combio.de/avr/ for the PC and Linux versions. =20

Beware: there are a few issues with the new compiler.
1. Register passing conventions have changed R24, R22, R20.. for byte =
P1, P2, P3...
2. Linker messes up eeprom section (add "-R .eeprom" to both hex and =
avrobj targets)
3. The compiler was built with weird address range for eeprom so you =
need to relocate the eeprom to zero (add "--change-section-lma =
.eeprom=3D0" to eeprom target)

Cheers!
----- Original Message -----=20
From: Peter Bosscha=20
Hi,

I'm using the windows port of AVR-GCC (Volker Oth) and have completed =
a few projects.
Only recently I've discovered that the linker seems to be rather =
generous with SRAM.=20
Looking at the map file I find that between modules of a project there =
is always a fill until the next 0 nibble, I could define a single byte =
in a module which then actually wastes another 15 bytes. The same =
happens when I mix bytes and arrays of chars, again there is an =
allignment, this time within the module, to the next nibble.

Anyone any ideas ? I would expect that one can adjust the linker to do =
this differently ?

Thanks in advance

Peter Bosscha

------=_NextPart_000_003C_01C09268.D771FE00
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4207.2601" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY style=3D"MARGIN-TOP: 2px; FONT: 10pt Arial; MARGIN-LEFT: 2px"=20
bgColor=3D#ffffff>
<DIV><FONT face=3D"Courier New">You need the compiler from a couple =
months ago, vs=20
the one on Volkers web site which is over a year old.&nbsp; The new =
compiler=20
packs SRAM properly.&nbsp; Try: </FONT><FONT face=3D"Courier =
New">&nbsp;<A=20
href=3D"http://combio.de/avr/">http://combio.de/avr/</A>&nbsp;</FONT><FON=
T=20
face=3D"Courier New">for the PC and Linux versions.&nbsp; </FONT></DIV>
<DIV><FONT face=3D"Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New">Beware: there are a few issues with the =
new=20
compiler.</FONT></DIV>
<DIV><FONT face=3D"Courier New">1. Register passing conventions have =
changed R24,=20
R22, R20.. for byte P1, P2, P3...</FONT></DIV>
<DIV><FONT face=3D"Courier New">2. Linker messes up eeprom section (add =
"-R=20
.eeprom" to both hex and avrobj targets)</FONT></DIV>
<DIV><FONT face=3D"Courier New">3. The compiler was built with weird =
address range=20
for eeprom so you need to relocate the eeprom to zero (add =
"--change-section-lma=20
.eeprom=3D0" to eeprom target)</FONT></DIV>
<DIV><FONT face=3D"Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New">Cheers!</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
<A title=[email-masked] =
href=3D"mailto:[email-masked]">Peter=20
Bosscha</A> </DIV>
<DIV>Hi,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I'm using the windows port of AVR-GCC (Volker Oth) and have =
completed a=20
few projects.</DIV>
<DIV>Only recently I've discovered that the linker&nbsp;seems to be=20
rather&nbsp;generous with SRAM. </DIV>
<DIV>Looking at the map file I find that&nbsp;between modules of a =
project=20
there&nbsp;is always a fill until the next 0 nibble, I could define a =
single=20
byte in a module&nbsp;which then actually wastes another 15 bytes. The =
same=20
happens when I mix bytes and arrays of chars, again there is an =
allignment,=20
this time within the module,&nbsp;&nbsp;to the next nibble.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Anyone any ideas ? I would expect that one can adjust the linker =
to do=20
this differently ?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks in advance</DIV>
<DIV>&nbsp;</DIV>
<DIV>Peter Bosscha</DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_003C_01C09268.D771FE00--

From [email-masked] Mon Feb 12 09:09:47 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14S2ob-0000g4-00
for <[email-masked]>; Mon, 12 Feb 2001 09:09:45 +1300
Received: from mm.amelek.gda.pl ([192.168.1.1] ident=mail)
by alf.amelek.gda.pl with esmtp (Exim 3.16 #1 (Debian))
id 14S2nq-0005Pj-00
for <[email-masked]>; Sun, 11 Feb 2001 21:08:58 +0100
Received: from marekm by mm.amelek.gda.pl with local (Exim 3.22 #1 (Debian))
id 14S2np-00078c-00; Sun, 11 Feb 2001 21:08:57 +0100
To: [email-masked]
Date: Sun, 11 Feb 2001 21:08:57 +0100 (CET)
CC: [email-masked]
X-Mailer: ELM [version 2.4ME+ PL66 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Message-Id: <[email-masked]>
From: Marek Michalkiewicz <[email-masked]>
Subject: [avr-gcc-list] New avr-libc and uisp releases
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

after a long time, I've just made new releases of avr-libc and uisp,
available on my own server (that's why I've been quiet for so long ;)

http://www.amelek.gda.pl/avr/libc/avr-libc-20010211.tar.gz
http://www.amelek.gda.pl/avr/uisp/uisp-20010211.tar.gz

Very few changes I'm afraid. uisp now supports the parallel cable
described at http://www.bsdhome.com/avrprog/ and attempts to support
parallel port access using FreeBSD ppi driver (completely untested).

Please also report any problems with this server to me. The old
archive at http://www.itnet.pl/amelektr/avr/ will exist for some time
but will not be updated. (Actually I was going to upload these new
files there too, but the box is refusing ssh connections right now.)

Thanks,
Marek

From [email-masked] Mon Feb 12 09:13:25 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14S2s7-0000gY-00
for <[email-masked]>; Mon, 12 Feb 2001 09:13:24 +1300
Received: from mm.amelek.gda.pl ([192.168.1.1] ident=mail)
by alf.amelek.gda.pl with esmtp (Exim 3.16 #1 (Debian))
id 14S2rR-0005Q2-00
for <[email-masked]>; Sun, 11 Feb 2001 21:12:41 +0100
Received: from marekm by mm.amelek.gda.pl with local (Exim 3.22 #1 (Debian))
id 14S2rR-00079N-00
for <[email-masked]>; Sun, 11 Feb 2001 21:12:41 +0100
In-Reply-To: <[email-masked]> from Marek Michalkiewicz at
"Feb 11, 2001 09:08:57 pm"
To: [email-masked]
Date: Sun, 11 Feb 2001 21:12:41 +0100 (CET)
X-Mailer: ELM [version 2.4ME+ PL66 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Message-Id: <[email-masked]>
From: Marek Michalkiewicz <[email-masked]>
Subject: [avr-gcc-list] Re: New avr-libc and uisp releases
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> after a long time, I've just made new releases of avr-libc and uisp,
> available on my own server (that's why I've been quiet for so long ;)
>
> http://www.amelek.gda.pl/avr/libc/avr-libc-20010211.tar.gz
> http://www.amelek.gda.pl/avr/uisp/uisp-20010211.tar.gz
>
> Very few changes I'm afraid. uisp now supports the parallel cable
> described at http://www.bsdhome.com/avrprog/ and attempts to support
> parallel port access using FreeBSD ppi driver (completely untested).
>
> Please also report any problems with this server to me. The old
^^^^
By "this server" I mean www.amelek.gda.pl, not www.bsdhome.com of
course - that's what happens when you write faster than you think :)

Marek

From [email-masked] Mon Feb 12 14:09:54 2001
Received: from mtiwmhc24.worldnet.att.net ([204.127.131.49])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14S7V3-0000sT-00
for <[email-masked]>; Mon, 12 Feb 2001 14:09:54 +1300
Received: from jimanji ([12.93.208.159]) by mtiwmhc24.worldnet.att.net
(InterMail vM.4.01.03.10 201-229-121-110) with SMTP
id <20010212010914.HIXB6676.mtiwmhc24.worldnet.att.net@jimanji>
for <[email-masked]>; Mon, 12 Feb 2001 01:09:14 +0000
Message-ID: <[email-masked]>
Reply-To: "Jim Pearce" <[email-masked]>
From: "Jim Pearce" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]>
Subject: [avr-gcc-list] Bit Operations
Date: Sun, 11 Feb 2001 20:08:51 -0500
Organization: Pegasus Technologies
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Is there any way using GCC to force bit based I/O instead of doing ugly ANDs and ORs of entire 8-bit ports?

Thanks,

Jim

From [email-masked] Mon Feb 12 14:57:45 2001
Received: from mail.brainlink.com ([149.2.32.129] helo=brainlink.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14S8FN-0000uV-00
for <[email-masked]>; Mon, 12 Feb 2001 14:57:45 +1300
Received: from [64.152.24.11] (HELO brainlink.com)
by brainlink.com (CommuniGate Pro SMTP 3.3.2)
with ESMTP id 4585100 for [email-masked]; Sun, 11 Feb 2001 21:06:43 -0500
Message-ID: <[email-masked]>
Date: Sun, 11 Feb 2001 21:04:25 -0500
From: Ormund Williams <[email-masked]>
Reply-To: AVR-GCC <[email-masked]>
Organization: ORMLAB Inc
X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.2.12-20 i586)
X-Accept-Language: en
MIME-Version: 1.0
To: AVR-GCC <[email-masked]>
Subject: Re: [avr-gcc-list] Bit Operations
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Jim Pearce wrote:
>
> Is there any way using GCC to force bit based I/O instead of doing ugly ANDs and ORs of entire 8-bit ports?
>
> Thanks,
>
> Jim
>
Hi Jim

The avr-libc has bit-IO macros that compile as single asm instructions
for setting and clearing bits on a port. Marek just posted the latest,
avr-libc-20010211.

--
Ormund

From [email-masked] Tue Feb 13 00:38:44 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14SHJb-0001H6-00
for <[email-masked]>; Tue, 13 Feb 2001 00:38:43 +1300
Received: from oTRIs.de (DHCP27.o3s.de [192.168.2.126])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id MAA16241
for <[email-masked]>; Mon, 12 Feb 2001 12:38:35 +0100
Message-ID: <[email-masked]>
Date: Mon, 12 Feb 2001 12:38:34 +0100
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Uploaded new avr-libc-wininstall was Re: New avr-libc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello

Marek Michalkiewicz wrote:
>
> Hi,
>
> after a long time, I've just made new releases of avr-libc and uisp,
> available on my own server (that's why I've been quiet for so long ;)

I have made a new win-install for this Version on my server:
http://combio.de/avr/avr-libc-20010211-wininstall.tar.gz

This is NOT included in the install (.exe) program for whole avr-gcc!
(Kasper do you want to make a new one?)

Marek, would you take my makefile? I has some modifications for Windows,
which should not affect the rest.

Greetings
Gunnar Henne

--
Gunnar Henne Email: [email-masked]
oTRIs GmbH & Co. KG Tel. : 0231 / 10616-21
Landgrafenstr. 153 Fax. : 0231 / 10615-44
44139 Dortmund

From [email-masked] Tue Feb 13 01:53:30 2001
Received: from [211.36.228.81] (helo=mail.sorimail.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14SITx-0001K9-00
for <[email-masked]>; Tue, 13 Feb 2001 01:53:29 +1300
Received: from kainote (unverified [210.180.127.50]) by mail.sorimail.net
(EMWAC SMTPRS 0.83) with SMTP id <[email-masked]>;
Mon, 12 Feb 2001 22:02:20 +0900
Message-ID: <000c01c094f3$03b23bb0$327fb4d2@kainote>
From: "Woo-Hyun Kim" <[email-masked]>
To: "Gunnar Henne" <[email-masked]>
Cc: "AVR Mailing List" <[email-masked]>
References: <[email-masked]> <[email-masked]>
Subject: Re: [avr-gcc-list] Uploaded new avr-libc-wininstall was Re: New avr-libc
Date: Mon, 12 Feb 2001 21:55:01 +0900
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Gunnar Henne!

I have uploaded "install.ini" and "Makefile" which are not require
clean1.bat and clean2.bat

Please, visit on following URL.

http://micro.new21.org/avr/gcc_inst/

Regards. :-)

Woo-Hyun Kim

----- Original Message -----
From: "Gunnar Henne" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
Sent: Monday, February 12, 2001 8:38 PM
Subject: [avr-gcc-list] Uploaded new avr-libc-wininstall was Re: New
avr-libc

> Hello
>
> Marek Michalkiewicz wrote:
> >
> > Hi,
> >
> > after a long time, I've just made new releases of avr-libc and uisp,
> > available on my own server (that's why I've been quiet for so long ;)
>
> I have made a new win-install for this Version on my server:
> http://combio.de/avr/avr-libc-20010211-wininstall.tar.gz
>
> This is NOT included in the install (.exe) program for whole avr-gcc!
> (Kasper do you want to make a new one?)
>
> Marek, would you take my makefile? I has some modifications for Windows,
> which should not affect the rest.
>
> Greetings
> Gunnar Henne
>
> --
> Gunnar Henne Email: [email-masked]
> oTRIs GmbH & Co. KG Tel. : 0231 / 10616-21
> Landgrafenstr. 153 Fax. : 0231 / 10615-44
> 44139 Dortmund
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Tue Feb 13 03:37:31 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14SK6c-0001OR-00
for <[email-masked]>; Tue, 13 Feb 2001 03:37:30 +1300
Received: from oTRIs.de (DHCP27.o3s.de [192.168.2.126])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id PAA13792;
Mon, 12 Feb 2001 15:37:25 +0100
Message-ID: <[email-masked]>
Date: Mon, 12 Feb 2001 15:37:24 +0100
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: Woo-Hyun Kim <[email-masked]>,
AVR GCC List <[email-masked]>
References: <[email-masked]> <[email-masked]> <000c01c094f3$03b23bb0$327fb4d2@kainote>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Re: Uploaded new avr-libc-wininstall was Re: New avr-libc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Woo-Hyun Kim,

Woo-Hyun Kim wrote:

> I have uploaded "install.ini" and "Makefile" which are not require
> clean1.bat and clean2.bat

Thank you, I have modified my archive accordingly.

Greetings

Gunnar

From [email-masked] Tue Feb 13 05:18:13 2001
Received: from nuustak.csir.co.za ([146.64.10.11])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14SLg3-0001T8-00
for <[email-masked]>; Tue, 13 Feb 2001 05:18:12 +1300
Received: from CS-IMO.CSIR.CO.ZA (cs-imo.csir.co.za [146.64.10.94])
by nuustak.csir.co.za (8.10.1/8.10.1) with SMTP id f1CGI3916329
for <[email-masked]>; Mon, 12 Feb 2001 18:18:03 +0200 (SAT)
Disclaimer: The CSIR exercises no editorial control over E-mail
messages originating in the organisation and the views in this
message are therefore not necessarily those of the CSIR and/or
its employees.
Received: from GW-IMO-Message_Server by CS-IMO.CSIR.CO.ZA
with Novell_GroupWise; Mon, 12 Feb 2001 18:18:02 +0200
Message-Id: <[email-masked]>
X-Mailer: Novell GroupWise Internet Agent 5.5.4.1
Date: Mon, 12 Feb 2001 18:17:53 +0200
From: "Peter Bosscha" <[email-masked]>
To: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="=_7C27C3AA.EA8BE7E4"
Subject: [avr-gcc-list] New Compiler Questions
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a MIME message. If you are reading this text, you may want to
consider changing to a mail reader or gateway that understands how to
properly handle MIME multipart messages.

--=_7C27C3AA.EA8BE7E4
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hi All,

Downloaded the newer AVR compiler and most of the stuff seems to be =
working. (At least my SRAM problem is fixed)
BUT:

- It generates bigger code (True ?)
- I cannot link for mega103 (I get a: cannot open linker script file =
....atmega103.x)

Regards
Peter

--=_7C27C3AA.EA8BE7E4
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Description: HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1"=
>
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR></HEAD>
<BODY style=3D"MARGIN-TOP: 2px; FONT: 10pt Arial; MARGIN-LEFT: 2px"=20
bgColor=3D#ffffff>
<DIV>Hi All,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Downloaded the newer AVR compiler and&nbsp;most of the stuff seems to =
be=20
working. (At least my SRAM problem is fixed)</DIV>
<DIV>BUT:</DIV>
<DIV>&nbsp;</DIV>
<DIV>- It generates bigger code (True ?)</DIV>
<DIV>- I cannot link for mega103 (I get a: cannot open linker script =
file=20
....atmega103.x)</DIV>
<DIV>&nbsp;</DIV>
<DIV>Regards</DIV>
<DIV>Peter</DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

--=_7C27C3AA.EA8BE7E4--

From [email-masked] Tue Feb 13 07:51:33 2001
Received: from pop.gmx.net ([194.221.183.20] helo=mail.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14SO4S-0001dx-00
for <[email-masked]>; Tue, 13 Feb 2001 07:51:32 +1300
Received: (qmail 19816 invoked by uid 0); 12 Feb 2001 18:51:26 -0000
Received: from p3ee0aeb2.dip.t-dialin.net (HELO peter.holter) (62.224.174.178)
by mail.gmx.net (mp010-rz3) with SMTP; 12 Feb 2001 18:51:26 -0000
Received: from localhost (peter@localhost)
by peter.holter (8.10.2/8.9.3) with ESMTP id f1CImwK02048
for <[email-masked]>; Mon, 12 Feb 2001 19:48:58 +0100
Date: Mon, 12 Feb 2001 19:48:58 +0100 (MET)
From: Peter <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] Variables in external SRAM
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,
i have an external device that i can treat a sram, and i want to write to
it via a variable. But my compiler complains when i try something like
this:
char test;
&test = 0xFFFF;

i know i can do
*(char*)(0xFFFF) = 0xAB;
but i want to write to a variable.
I'm not good in programming c code, but the code above means
"value of the char pointer with the address 0xFFFF", is this right?

Thank you, Peter Holtermann

From [email-masked] Tue Feb 13 11:18:26 2001
Received: from ra.chl.chalmers.se ([129.16.214.138])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14SRIe-0001m9-00
for <[email-masked]>; Tue, 13 Feb 2001 11:18:25 +1300
Received: from blackbeast (dynamic-193-193.dialup.chalmers.se [129.16.193.193])
by ra.chl.chalmers.se (8.9.3+Sun/8.9.3) with SMTP id XAA16097
for <[email-masked]>; Mon, 12 Feb 2001 23:18:17 +0100 (MET)
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1
Date: Mon, 12 Feb 2001 23:23:43 +0100
To: [email-masked]
From: Karl Thoren <[email-masked]>
Subject: Re: [avr-gcc-list] New Compiler Questions
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

At 18:17 2001-02-12 +0200, you wrote:
>
> Hi All,
>
> Downloaded the newer AVR compiler and most of the stuff seems to be working.
> (At least my SRAM problem is fixed)
> BUT:
>
> - It generates bigger code (True ?)
> - I cannot link for mega103 (I get a: cannot open linker script file
> ....atmega103.x)
>

I also have found this problem. I have tested to use 90S2313, but it cannot
link. ( I also get : cannot open linker script file ...)

It works with Volker Oth's version (Dated 2000/02/13).

/Karl

From [email-masked] Tue Feb 13 14:55:39 2001
Received: from [209.172.26.13] (helo=email.netonecom.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14SUgs-0001vZ-00
for <[email-masked]>; Tue, 13 Feb 2001 14:55:38 +1300
Received: from netonecom.net (catudal.netonecom.net [216.65.187.222])
by email.netonecom.net (8.11.2/8.11.0) with ESMTP id f1D1sZZ23265
for <[email-masked]>; Mon, 12 Feb 2001 20:54:35 -0500 (EST)
Message-ID: <[email-masked]>
Date: Mon, 12 Feb 2001 20:53:50 -0500
From: Michel Catudal <[email-masked]>
Organization: Pas =?iso-8859-1?Q?organis=E9?= par Ti-Mou
X-Mailer: Mozilla 4.76 [Joual] (X11; U; Linux 2.2.16 i586)
X-Accept-Language: fr-CA, en-US
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] New compiler won't compile
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

My Linux is SuSE 7.0 professional with the latest updates. I use a very recent libc for the AVR

Trying to compile gcc gives me this :

/usr/src/packages/BUILD/avr-gcc-20010108/gcc/xgcc -B/usr/src/packages/BUILD/avr-gcc-20010108/gcc/ -B/usr/local/avr/bin/ -B/usr/local/avr/lib/ -isystem /usr/local/avr/include -O2 -DCROSS_COMPILE
-DIN_GCC -W -W
all -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -DDF=SF -Dinhibit_libc -m
call-prologues -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I. -I./. -I./config -I./
../include -DL_divdi3 -c ./libgcc2.c -o libgcc/./_divdi3.o
/tmp/ccj2gpfo.s: Assembler messages:
/tmp/ccj2gpfo.s:119: Error: register required
/tmp/ccj2gpfo.s:219: Error: register required

<snip>

/tmp/ccj2gpfo.s:2444: Error: register required
/tmp/ccj2gpfo.s:2445: Error: register required
make[2]: *** [libgcc/./_divdi3.o] Error 1
make[2]: Leaving directory `/usr/src/packages/BUILD/avr-gcc-20010108/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/usr/src/packages/BUILD/avr-gcc-20010108/gcc'
make: *** [all-gcc] Error 2
Bad exit status from /var/tmp/rpm-tmp.22988 (%build)

Fixing /usr/src/packages/BUILD/avr-gcc-20010108/gcc/gcc/config/avr/avr.c

void
asm_file_start (file)
FILE *file;
{
output_file_directive (file, main_input_filename);
fprintf (file, "\t.arch %s\n", avr_mcu_name);
fputs ("__SREG__ = 0x3f\n"
"__SP_H__ = 0x3e\n"
"__SP_L__ = 0x3d\n", file);

fputs ("__tmp_reg__ = 0\n"
"__zero_reg__ = 1\n"
"_PC_ = 2\n", file);

commands_in_file = 0;
commands_in_prologues = 0;
commands_in_epilogues = 0;
}

to :

void
asm_file_start (file)
FILE *file;
{
output_file_directive (file, main_input_filename);
fprintf (file, "\t.arch %s\n", avr_mcu_name);
fputs ("__SREG__ = 0x3f\n"
"__SP_H__ = 0x3e\n"
"__SP_L__ = 0x3d\n", file);

fputs ("__tmp_reg__ = r0\n"
"__zero_reg__ = r1\n"
"_PC_ = 2\n", file);

commands_in_file = 0;
commands_in_prologues = 0;
commands_in_epilogues = 0;
}

I get this after :

make[2]: Entering directory `/usr/src/packages/BUILD/avr-gcc-20010108/gcc'for d in libgcc avr3 libgcc/avr3 avr4 libgcc/avr4 avr5 libgcc/avr5; do \
if [ -d $d ]; then true; else mkdir $d; fi \
done
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
/usr/src/packages/BUILD/avr-gcc-20010108/gcc/xgcc -B/usr/src/packages/BUILD/avr-gcc-20010108/gcc/ -B/usr/local/avr/bin/ -B/usr/local/avr/lib/ -isystem /usr/local/avr/include -O2 -DCROSS_COMPILE
-DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -DDF=SF -Dinhibit_libc -mcall-prologues -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I.
-I. -I. -I./. -I./config -I./../include -mmcu=avr3 -DL_muldi3 -c ./libgcc2.c -o libgcc/avr3/_muldi3.o
/tmp/ccezKwnw.s: Assembler messages:
/tmp/ccezKwnw.s:2: Fatal error: redefinition of mcu type `avr3'
make[2]: *** [libgcc/avr3/_muldi3.o] Error 1
make[2]: Leaving directory `/usr/src/packages/BUILD/avr-gcc-20010108/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/usr/src/packages/BUILD/avr-gcc-20010108/gcc'
make: *** [all-gcc] Error 2

--
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://www.netonecom.net/~bbcat
We have all kinds of links
and many SuSE 7.0 Linux RPM packages

From [email-masked] Tue Feb 13 17:57:11 2001
Received: from sttlpop4.sttl.uswest.net ([206.81.192.4])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14SXWY-00022H-00
for <[email-masked]>; Tue, 13 Feb 2001 17:57:10 +1300
Received: (qmail 45186 invoked by alias); 13 Feb 2001 04:56:40 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 45153 invoked by uid 0); 13 Feb 2001 04:56:40 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop4.sttl.uswest.net with SMTP; 13 Feb 2001 04:56:40 -0000
Message-ID: <021201c09579$4eb77040$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Variables in external SRAM
Date: Mon, 12 Feb 2001 20:51:38 -0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

You were trying to change the address of an already declared
variable, test. Instead, Test should be a *pointer* to the
variable you want to change:

char *test; // Declare a pointer to a char
...
test = (char *)0xFFFF; // Set that pointer to 0xFFFF;
*test = 0xEE; // Now set the char pointed to by
the pointer to 0xEE

However, the way you did do it
*(char*)0xFFFF = 0xEE;
would be the prefered way to deal with memory mapped i/o,
unless you i/o device has several registers and accessing it
via a pointer to a structure would be more efficient. The
GCC compiler is *very* good when dealing with pointers to
things. It is hard to hand write better code. E.g.

typedef struct
{
char data;
char control; // Control register
char foo; // i/o device internal buffer
}
myIOdevice;

myIOdevice *dev = 0x345E; // declare a pointer to base of
io device
...
dev->control = 0x34; // Set control register
dev->data = 0x00 // Clear data register
if (dev->foo) // Read/test foo register ...
{

}

etc.

----- Original Message -----
From: "Peter" <[email-masked]>
To: <[email-masked]>
Sent: Monday, February 12, 2001 10:48 AM
Subject: [avr-gcc-list] Variables in external SRAM

> Hi,
> i have an external device that i can treat a sram, and i
want to write to
> it via a variable. But my compiler complains when i try
something like
> this:
> char test;
> &test = 0xFFFF;
>
> i know i can do
> *(char*)(0xFFFF) = 0xAB;
> but i want to write to a variable.
> I'm not good in programming c code, but the code above
means
> "value of the char pointer with the address 0xFFFF", is
this right?
>

From [email-masked] Tue Feb 13 21:43:32 2001
Received: from nuustak.csir.co.za ([146.64.10.11])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Sb3a-0002Al-00
for <[email-masked]>; Tue, 13 Feb 2001 21:43:31 +1300
Received: from CS-IMO.CSIR.CO.ZA (cs-imo.csir.co.za [146.64.10.94])
by nuustak.csir.co.za (8.10.1/8.10.1) with SMTP id f1D8hM919513
for <[email-masked]>; Tue, 13 Feb 2001 10:43:24 +0200 (SAT)
Disclaimer: The CSIR exercises no editorial control over E-mail
messages originating in the organisation and the views in this
message are therefore not necessarily those of the CSIR and/or
its employees.
Received: from GW-IMO-Message_Server by CS-IMO.CSIR.CO.ZA
with Novell_GroupWise; Tue, 13 Feb 2001 10:42:58 +0200
Message-Id: <[email-masked]>
X-Mailer: Novell GroupWise Internet Agent 5.5.4.1
Date: Tue, 13 Feb 2001 10:42:44 +0200
From: "Peter Bosscha" <[email-masked]>
To: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="=_ABF01482.DABBD7D8"
Subject: [avr-gcc-list] Update: New Compiler Questions
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a MIME message. If you are reading this text, you may want to
consider changing to a mail reader or gateway that understands how to
properly handle MIME multipart messages.

--=_ABF01482.DABBD7D8
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

HI All,

Just felt I should share this; I got into trouble by using the single file =
from Kasper Pedersen.=20
I downloaded all the separate stuff (binutils, gcc etc.), installed it and =
now everything is working.

Still not too happy about the bigger code size though .. .anyone anything =
intelligent to comment ?

--=_ABF01482.DABBD7D8
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Description: HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1"=
>
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR></HEAD>
<BODY style=3D"MARGIN-TOP: 2px; FONT: 10pt Arial; MARGIN-LEFT: 2px"=20
bgColor=3D#ffffff>
<DIV>HI All,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Just felt I should share this; I got into trouble by using the&nbsp;si=
ngle=20
file from Kasper Pedersen. </DIV>
<DIV>I downloaded all the separate stuff (binutils, gcc etc.), installed =
it and=20
now everything is working.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Still not too happy about the bigger code size though .. .anyone =
anything=20
intelligent to comment ?</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

--=_ABF01482.DABBD7D8--

From [email-masked] Wed Feb 14 02:01:11 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14Sf4v-0002K2-00
for <[email-masked]>; Wed, 14 Feb 2001 02:01:10 +1300
Received: (qmail 10529 invoked from network); 13 Feb 2001 13:02:53 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 13 Feb 2001 13:02:53 -0000
Received: from fri.uni-lj.si ([193.2.76.118]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with ESMTP id AAA10259
for <[email-masked]>; Tue, 13 Feb 2001 13:53:17 +0100
Message-ID: <[email-masked]>
Date: Tue, 13 Feb 2001 14:03:14 +0100
From: [email-masked] (Robert Rozman)
X-Mailer: Mozilla 4.51 [sl] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: "[email-masked]" <[email-masked]>
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Strange makefile error
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I ran out of ideas what is wrong with my makefile. Funny is that it
works under Volker Oth distribution with no problems, but under newer
avr-gcc distributions it complains:

On 'make clean' I get something like this:

rm -force *.o *.eep
rm: not found
and then MAKE:Error 2

If I type what is written (rm -force ...) it executes ok.
Exactly same happens with avr-objcopy when it tries to create files on
make command.

Any idea (I'm using win95) on what is causing this strange behaviour ?

Thanks in advance,

Robert Rozman

From [email-masked] Wed Feb 14 03:20:25 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14SgJb-0002NK-00
for <[email-masked]>; Wed, 14 Feb 2001 03:20:24 +1300
Received: (qmail 12824 invoked from network); 13 Feb 2001 14:22:02 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 13 Feb 2001 14:22:02 -0000
Received: from fri.uni-lj.si ([193.2.76.118]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with ESMTP id AAA11555;
Tue, 13 Feb 2001 15:12:28 +0100
Message-ID: <[email-masked]>
Date: Tue, 13 Feb 2001 15:22:24 +0100
From: [email-masked] (Robert Rozman)
X-Mailer: Mozilla 4.51 [sl] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: Robert Rozman <[email-masked]>
CC: "[email-masked]" <[email-masked]>
Subject: Re: [avr-gcc-list] Strange makefile error
References: <[email-masked]>
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

It seems like the error is caused if project files reside on different
disk than avrgcc distribution.

Maybe this will save some time to anybody.

Regards,

Robert Rozman

Robert Rozman je napisal:

> Hello,
>
> I ran out of ideas what is wrong with my makefile. Funny is that it
> works under Volker Oth distribution with no problems, but under newer
> avr-gcc distributions it complains:
>
> On 'make clean' I get something like this:
>
> rm -force *.o *.eep
> rm: not found
> and then MAKE:Error 2
>
> If I type what is written (rm -force ...) it executes ok.
> Exactly same happens with avr-objcopy when it tries to create files on
> make command.
>
> Any idea (I'm using win95) on what is causing this strange behaviour ?
>
> Thanks in advance,
>
> Robert Rozman
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Wed Feb 14 07:46:09 2001
Received: from ppp146.pcnet.ro
([213.154.129.154] helo=rally.localdomain ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14SkSg-0002cA-00
for <[email-masked]>; Wed, 14 Feb 2001 07:46:03 +1300
Received: from localhost (cburneci@localhost)
by rally.localdomain (8.9.3/8.8.7) with ESMTP id UAA00660
for <[email-masked]>; Tue, 13 Feb 2001 20:46:27 +0200
Date: Tue, 13 Feb 2001 20:46:25 +0200 (EET)
From: Cristian Burneci <[email-masked]>
Reply-To: [email-masked]
To: [email-masked]
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] Re: New Compiler Questions
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Tue, 13 Feb 2001 [email-masked] wrote:

Don't know about the linker problem, but yes, the new version of the
compiler seemsi to generate bigger code. Some of my projects which
previously occupied about 80% of the flash of a AT90S8535, now get out of
code when linked.
I am talking about the Linux version. I haven't downloaded the Win32
version yet.
I suspect some libraries had become bigger since the previous releases.
I'll further investigate.

>Message: 6
>Date: Mon, 12 Feb 2001 18:17:53 +0200
>From: "Peter Bosscha" <[email-masked]>
>To: <[email-masked]>
>Subject: [avr-gcc-list] New Compiler Questions
>
>Hi All,
>
>Downloaded the newer AVR compiler and most of the stuff seems to be =
>working. (At least my SRAM problem is fixed)
>BUT:
>
>- It generates bigger code (True ?)
>- I cannot link for mega103 (I get a: cannot open linker script file =
>....atmega103.x)
>
>Regards
>Peter

From [email-masked] Wed Feb 14 11:57:43 2001
Received: from cicero2.cybercity.dk ([212.242.40.53])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14SoOE-0002lv-00
for <[email-masked]>; Wed, 14 Feb 2001 11:57:42 +1300
Received: from usr05.cybercity.dk (usr05.cybercity.dk [212.242.40.85])
by cicero2.cybercity.dk (Postfix) with ESMTP id BA50BFFF45
for <[email-masked]>; Tue, 13 Feb 2001 23:57:45 +0100 (CET)
Received: from noa3 (port19.cvx1-sl.ppp.cybercity.dk [212.242.177.20])
by usr05.cybercity.dk (8.9.3/8.9.3) with SMTP id XAA46748
for <[email-masked]>; Tue, 13 Feb 2001 23:57:53 +0100 (CET)
(envelope-from [email-masked])
Message-ID: <007801c09610$aa6bf9a0$0264a8c0@noa3>
From: "Kasper Pedersen" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]> <[email-masked]>
Subject: Re: [avr-gcc-list] Uploaded new avr-libc-wininstall was Re: New avr-libc
Date: Tue, 13 Feb 2001 23:59:47 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

From: "Gunnar Henne" <[email-masked]>
> This is NOT included in the install (.exe) program for whole avr-gcc!
> (Kasper do you want to make a new one?)

I did a new one. It's uploading to the server at the moment.

http://kkp.dhs.org/avrgcc20010211.exe
9.398.913 bytes

And thank you for providing an alternate download point.

/Kasper

From [email-masked] Wed Feb 14 22:56:06 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14SyfM-0003BK-00
for <[email-masked]>; Wed, 14 Feb 2001 22:56:05 +1300
Received: (from j@localhost)
by ida.interface-business.de id f1E9tq263330;
Wed, 14 Feb 2001 10:55:52 +0100 (MET)
Date: Wed, 14 Feb 2001 10:55:52 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] Re: New Compiler Questions
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Cristian Burneci <[email-masked]> wrote:

> I suspect some libraries had become bigger since the previous releases.
> I'll further investigate.

I think the library organization is not yet optimal. I don't quite
remember what it was, i think it were the EEPROM routines where i
noticed it recently. Since too many functions are contained within a
single source code file (and thus a single object file), and the
linker can only load entire object files into the resulting binary,
referencing a single function might bloat the generated code with
functions that aren't actually used.

The solution would be to break down the library source into more
source code modules, so each module only contains a single function.

(When building a libc for an operating system that supports shared
libs and on-demand paging, that's not so much of a problem like here
for an MCU which has to link everything statically and is scarce on
ROM.)

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Thu Feb 15 06:59:06 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14T6Cm-0003XG-00
for <[email-masked]>; Thu, 15 Feb 2001 06:59:05 +1300
Received: (qmail 21111 invoked from network); 14 Feb 2001 18:00:34 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 14 Feb 2001 18:00:34 -0000
Received: from robi ([193.2.76.192]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with SMTP id AAA2531
for <[email-masked]>; Wed, 14 Feb 2001 18:50:49 +0100
Message-ID: <[email-masked]>
From: [email-masked] (Robert Rozman)
To: <[email-masked]>
Date: Wed, 14 Feb 2001 19:05:47 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Subject: [avr-gcc-list] Dallas 1-wire - any source code ?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I'm designing custom home automation system. I'd like to use Dallas 1-wire
as local (in a room) bus. If anyone is willing to share any code and also
experience on this kind of bus (cabling, pitfalls, etc...) I'd be grateful.

I'm also interested in code for automatic detection of devices on 1-wire
bus.

Thanks in advance,

Robert Rozman

From [email-masked] Thu Feb 15 07:09:34 2001
Received: from nets5.rz.rwth-aachen.de ([137.226.144.13])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14T6Mv-0003Y6-00
for <[email-masked]>; Thu, 15 Feb 2001 07:09:33 +1300
Received: from Ostermann-net.de (s4m033.dialup.RWTH-Aachen.DE [137.226.8.33])
by nets5.rz.rwth-aachen.de (8.10.1/8.10.1/6) with SMTP id f1EI9aZ29657
for <[email-masked]>; Wed, 14 Feb 2001 19:09:37 +0100 (MET)
Message-Id: <[email-masked]>
Date: Wed, 14 Feb 2001 09:11:35 +0100
From: Thorsten Ostermann <[email-masked]>
To: [email-masked]
X-Mailer: Thorsten Ostermann's registered AK-Mail 3.1 publicbeta2a [ger]
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] Multipart Msgs. was: Update: New Compiler Questions
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> Date: Tue, 13 Feb 2001 10:42:44 +0200
> From: "Peter Bosscha" <[email-masked]>
> To: <[email-masked]>
> Subject: [avr-gcc-list] Update: New Compiler Questions

> This is a MIME message. If you are reading this text, you may want
> to consider changing to a mail reader or gateway that understands
> how to properly handle MIME multipart messages.

No, I don't want to change my mailreader only to read MIME messages. It
won't even help, 'cause the daily-digest function of avr-gcc-list does
not support MIME. So please write *plain text*. Thanks in advance.

Thorsten - just CNR
--
PGP welcome!
Thorsten online: http://www.ostermann-net.de/electronic/
Rund um Schrittmotor, Fr=E4s-Bohr-Plotter & Mikrocontroller

From [email-masked] Thu Feb 15 08:46:38 2001
Received: from natmail2.webmailer.de ([192.67.198.65] helo=post.webmailer.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14T7sr-0003c6-00
for <[email-masked]>; Thu, 15 Feb 2001 08:46:37 +1300
Received: from web.de ([193.227.192.33])
by post.webmailer.de (8.9.3/8.8.7) with ESMTP id UAA22378
for <[email-masked]>; Wed, 14 Feb 2001 20:46:43 +0100 (MET)
Message-ID: <[email-masked]>
Date: Wed, 14 Feb 2001 20:42:11 +0100
From: Thomas Driehorn <[email-masked]>
X-Mailer: Mozilla 4.6 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] memory usage of avr program
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi there !

I've run several times into problems with dynamically allocated memory
with my MEGA103. I have sometimes problems with overlapping memories ...
So there's the question :

How can I determine how much bytes are used for static variables by my
program ? I first thought the map-file could help me, but I couldn't get
rid on the information I was searching for ...

Any hints ?

From [email-masked] Thu Feb 15 23:22:02 2001
Received: from [193.101.57.9] (helo=ida.interface-business.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14TLXx-00048p-00
for <[email-masked]>; Thu, 15 Feb 2001 23:21:59 +1300
Received: (from j@localhost)
by ida.interface-business.de id f1FALvV71646;
Thu, 15 Feb 2001 11:21:57 +0100 (MET)
Date: Thu, 15 Feb 2001 11:21:57 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] memory usage of avr program
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Thomas Driehorn <[email-masked]> wrote:

> How can I determine how much bytes are used for static variables by my
> program ?

avr-size <ELF-file>

Section text is the program `text', bss + data are the variables.
(bss are uninitialized variables which are zeroed out by the run-time
system, data are pre-initialized variables).

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Thu Feb 15 23:44:41 2001
Received: from www37.gmx.net ([213.165.64.87])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14TLtw-0004AQ-00
for <[email-masked]>; Thu, 15 Feb 2001 23:44:41 +1300
Received: (qmail 30771 invoked by uid 0); 15 Feb 2001 10:44:18 -0000
Date: Thu, 15 Feb 2001 11:44:18 +0100 (MET)
From: Frank Della Contrada <[email-masked]>
To: [email-masked]
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-Authenticated-Sender: [email-masked]
X-Authenticated-IP: [195.222.225.162]
Message-ID: <[email-masked]>
X-Mailer: WWW-Mail 1.5 (Global Message Exchange)
X-Flags: 0001
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] New to avr-gcc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I will start developing on linux with avr-gcc.
So my questions are:
1. What do I need?
2. Where to find it?
3. Is there a simulator/debugger (like astudio) for linux available?

Thanks in advance
Frank

--
Sent through GMX FreeMail - http://www.gmx.net

From [email-masked] Fri Feb 16 05:47:52 2001
Received: from mtiwmhc24.worldnet.att.net ([204.127.131.49])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14TRZP-0004PC-00
for <[email-masked]>; Fri, 16 Feb 2001 05:47:52 +1300
Received: from jimanji ([12.93.208.102]) by mtiwmhc24.worldnet.att.net
(InterMail vM.4.01.03.10 201-229-121-110) with SMTP
id <20010215164731.PDDS6676.mtiwmhc24.worldnet.att.net@jimanji>
for <[email-masked]>; Thu, 15 Feb 2001 16:47:31 +0000
Message-ID: <[email-masked]>
Reply-To: "Jim Pearce" <[email-masked]>
From: "Jim Pearce" <[email-masked]>
To: <[email-masked]>
Date: Thu, 15 Feb 2001 11:46:16 -0500
Organization: Pegasus Technologies
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] Astudio Question
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello all:

I am trying to use AVR Studio V3.21 with the object file generated by gcc. It mostly works but the dissassembly view of my main( )
does not show the code from the beginning of the module. For example, here is my map file:

.text 0x00000064 0x2bc MyTest.o
0x0000011a _overflow0_
0x000000e2 junk_routine
0x000000a4 task1
0x0000021c send_packet
0x0000012a task2
0x000002d8 send_word
0x000002ee main
0x000002a4 send_block
0x000001c2 CRC
0x00000064 task3
0x00000294 send_preamble

Showing that task3( ) starts at 64. Astudio starts its dissassembly at C8. Has anyone else had this problem? Is it me or it? Any
work arounds?

Thanks!

Jim

From [email-masked] Fri Feb 16 06:06:56 2001
Received: from sttlpop2.sttl.uswest.net ([206.81.192.2])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14TRrr-0004QC-00
for <[email-masked]>; Fri, 16 Feb 2001 06:06:55 +1300
Received: (qmail 99267 invoked by alias); 15 Feb 2001 17:06:59 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 99084 invoked by uid 0); 15 Feb 2001 17:06:57 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop2.sttl.uswest.net with SMTP; 15 Feb 2001 17:06:56 -0000
Message-ID: <023801c09771$b69b3ee0$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>,
<[email-masked]>
Date: Thu, 15 Feb 2001 09:06:50 -0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Looking for Alan Brown @electrans.com
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Alan, if you see this: I got your message, but your mail
provider bounces my replies. Do you have an alternate email
address?

From [email-masked] Sat Feb 17 02:57:10 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14TlNl-0005Hc-00
for <[email-masked]>; Sat, 17 Feb 2001 02:57:09 +1300
Received: from oTRIs.de (DHCP27.o3s.de [192.168.2.126])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id OAA01853
for <[email-masked]>; Fri, 16 Feb 2001 14:57:16 +0100
Message-ID: <[email-masked]>
Date: Fri, 16 Feb 2001 14:57:15 +0100
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Windows setup program mirrored
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I have put Kasper's new setup program (avrgcc20010211.exe) on my
download page at
http://www.combio.de/avr/index.html

Greetings

Gunnar

--
Gunnar Henne Email: [email-masked]
oTRIs GmbH & Co. KG Tel. : 0231 / 10616-21
Landgrafenstr. 153 Fax. : 0231 / 10615-44
44139 Dortmund

From [email-masked] Tue Feb 20 21:28:17 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14V89f-0001kw-00
for <[email-masked]>; Tue, 20 Feb 2001 21:28:16 +1300
Received: from oTRIs.de (DHCP27.o3s.de [192.168.2.126])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id JAA22398
for <[email-masked]>; Tue, 20 Feb 2001 09:28:37 +0100
Message-ID: <[email-masked]>
Date: Tue, 20 Feb 2001 09:28:35 +0100
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Monitor + Debugger for AVR-gcc available
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

Vladimir Subrt send me a link to his page:
http://sweb.cz/rt-soft/

I don't have the hardware to try it out. Please check the software and
report to me.
If it works I will make a link (and mirror) on my download-page.

Currently only Windows seems to be supported.

Greetings

Gunnar Henne

From [email-masked] Wed Feb 21 04:35:02 2001
Received: from moutvdom00.kundenserver.de ([195.20.224.149])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14VEog-00021I-00
for <[email-masked]>; Wed, 21 Feb 2001 04:35:02 +1300
Received: from [195.20.224.209] (helo=mrvdom02.schlund.de)
by moutvdom00.kundenserver.de with esmtp (Exim 2.12 #2)
id 14VEp4-0001oN-00
for [email-masked]; Tue, 20 Feb 2001 16:35:26 +0100
Received: from pc19f7731.dip.t-dialin.net ([193.159.119.49] helo=Karsten-Becker.de)
by mrvdom02.schlund.de with esmtp (Exim 2.12 #2)
id 14VEp8-0007jx-00
for [email-masked]; Tue, 20 Feb 2001 16:35:30 +0100
Message-ID: <[email-masked]>
Date: Tue, 20 Feb 2001 16:34:12 +0100
From: Karsten Becker <[email-masked]>
X-Mailer: Mozilla 4.7 [de] (Win98; I)
X-Accept-Language: de
MIME-Version: 1.0
To: "[email-masked]" <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] "hello world" for Atmel :-)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,
I'm new to Atmel and to avr-gcc. Can anyone give me small a "hello
world" code, and the commands required to compile it. And maybe a hint
where I can get a list of supported libraries.
Thanks in advance
Karsten

From [email-masked] Wed Feb 21 05:19:01 2001
Received: from rfhs0012.fh-regensburg.de ([194.95.104.12])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14VFVE-00023J-00
for <[email-masked]>; Wed, 21 Feb 2001 05:19:00 +1300
Received: from stud.fh-regensburg.de (rfhcip035.fh-regensburg.de [194.95.106.35])
by rfhs0012.fh-regensburg.de (8.9.3/8.9.3-FH-Regensburg) with ESMTP id RAA26587;
Tue, 20 Feb 2001 17:18:15 +0100 (MET)
Message-ID: <[email-masked]>
Date: Tue, 20 Feb 2001 17:19:27 +0100
From: Jochen Pernsteiner <[email-masked]>
Organization: FH Regensburg
X-Mailer: Mozilla 4.75 [en]C-URRZ (Win95; U)
X-Accept-Language: de,en,da
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] External SRAM - change bss section?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

how can I convince the compiler (or linker) that I have external
SRAM connected to my 4414 or 8515 ?

The problem is that I want to use a large array as global variable,
but the linker says that the bss section is to small.
The compiler switch "-minit-stack" doesn't work of course, since it
doesn't change the bss section. There is also a switch "-Tbss" for
the linker, but it changes the starting address for bss. What I want
is to change the end address of bss!

For example this little (and useless) program won't compile:

int array[500];

int main()
{
return 0;
}

Any hint how it can be done?

From [email-masked] Wed Feb 21 06:18:43 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14VGQz-00025o-00
for <[email-masked]>; Wed, 21 Feb 2001 06:18:42 +1300
Received: (from j@localhost)
by ida.interface-business.de id f1KHJB701720;
Tue, 20 Feb 2001 18:19:11 +0100 (MET)
Date: Tue, 20 Feb 2001 18:19:11 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] "hello world" for Atmel :-)
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Karsten Becker <[email-masked]> wrote:

> I'm new to Atmel and to avr-gcc. Can anyone give me small a "hello
> world" code, and the commands required to compile it. And maybe a hint
> where I can get a list of supported libraries.

Please search the archives of this mailing list for Rich Neswold's
documentation for avr-libc (& Co.), it now contains a simple demo.

Further, i've once posted here that i've got a more advanced demo
(which is upwards comptabile to the "Hello world" demo in Rich's
paper), it's still available at
ftp://ftp.ifbus.de/pub/j_wunsch/avr-demo.tar.gz .

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Wed Feb 21 06:29:48 2001
Received: from email.netonecom.net ([209.172.26.13] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14VGbj-0002AY-00
for <[email-masked]>; Wed, 21 Feb 2001 06:29:48 +1300
Received: from netonecom.net (catudal.netonecom.net [216.65.187.222])
by email.netonecom.net (8.11.2/8.11.0) with ESMTP id f1KHUGK22352
for <[email-masked]>; Tue, 20 Feb 2001 12:30:17 -0500 (EST)
Message-ID: <[email-masked]>
Date: Tue, 20 Feb 2001 12:29:42 -0500
From: Michel Catudal <[email-masked]>
Organization: Pas =?iso-8859-1?Q?organis=E9?= par Ti-Mou
X-Mailer: Mozilla 4.76 [Joual] (X11; U; Linux 2.2.16 i586)
X-Accept-Language: fr-CA, en-US
MIME-Version: 1.0
CC: [email-masked]
Subject: Re: [avr-gcc-list] External SRAM - change bss section?
References: <[email-masked]>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by email.netonecom.net id f1KHUGK22352
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Jochen Pernsteiner a =E9crit :
>=20
> Hello,
>=20
> how can I convince the compiler (or linker) that I have external
> SRAM connected to my 4414 or 8515 ?
>=20
> The problem is that I want to use a large array as global variable,
> but the linker says that the bss section is to small.
> The compiler switch "-minit-stack" doesn't work of course, since it
> doesn't change the bss section. There is also a switch "-Tbss" for
> the linker, but it changes the starting address for bss. What I want
> is to change the end address of bss!
>=20
>=20
> For example this little (and useless) program won't compile:
>=20
> int array[500];
>=20
> int main()
> {
> return 0;
> }
>=20

You could try this

int *array;
array =3D (int *) 0x8000;

I haven't tried on this compiler but it would normally work
just about on any compiler with a linear 16 bits addressing.

Make sure you put a valid address.

--=20
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://www.netonecom.net/~bbcat
We have all kinds of links
and many SuSE 7.0 Linux RPM packages

From [email-masked] Wed Feb 21 09:07:15 2001
Received: from mail.tps.de ([195.126.171.2] ident=daemon)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14VJ45-0002HY-00
for <[email-masked]>; Wed, 21 Feb 2001 09:07:14 +1300
Received: (from daemon@localhost)
by mail.tps.de (8.8.7/8.8.7) id VAA01147;
Tue, 20 Feb 2001 21:07:34 +0100
Received: from UNKNOWN(193.96.199.65), claiming to be "goepplinux"
via SMTP by mail.tps.de, id smtpdb01143; Tue Feb 20 21:06:35 2001
From: Matthias G?ppner <[email-masked]>
Organization: TSP
To: Jochen Pernsteiner <[email-masked]>
Subject: Re: [avr-gcc-list] External SRAM - change bss section?
Date: Tue, 20 Feb 2001 20:05:50 +0100
X-Mailer: KMail [version 1.0.21]
Content-Type: text/plain
References: <[email-masked]>
MIME-Version: 1.0
Message-Id: <01022020154801.00470@goepplinux>
Content-Transfer-Encoding: 8bit
Cc: [email-masked]
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Jochen,

with the following description the linker uses the external SRAM and also does
the organization for you:

copy the "avr85xx.x "-linker script from the ldscripts directory in your
avr-gcc path. Then you can modify the MEMORY section in the linker script:

MEMORY
{
text (rx) : ORIGIN = 0, LENGTH = 8K
data (rw!x) : ORIGIN = 0x60, LENGTH = 8K
eeprom (rw!x) : ORIGIN = 0, LENGTH = 512
}

This example extends the data section to 8KByte SRAM.

Then you must tell the linker to use this linker script with option

-Wl,--script,avr85xx.x

Also you have to enable the SRAM with a command in your
program by setting the SRE bit in the MCUCR register.

Hope I could help
Matthias

Am Die, 20 Feb 2001 schrieben Sie:
> Hello,
>
> how can I convince the compiler (or linker) that I have external
> SRAM connected to my 4414 or 8515 ?
>
> The problem is that I want to use a large array as global variable,
> but the linker says that the bss section is to small.
> The compiler switch "-minit-stack" doesn't work of course, since it
> doesn't change the bss section. There is also a switch "-Tbss" for
> the linker, but it changes the starting address for bss. What I want
> is to change the end address of bss!
>
>
> For example this little (and useless) program won't compile:
>
> int array[500];
>
> int main()
> {
> return 0;
> }
>
>
> Any hint how it can be done?
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
--
TSP - Teleprocessing Systems & Products mbH
Matthias Goeppner [email-masked]
Altenreuth 5 95326 Kulmbach - Germany
phone: +49 9221 804253 fax : +49 9221 8219015

From [email-masked] Wed Feb 21 10:28:04 2001
Received: from deborah.paradise.net.nz ([203.96.152.32])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14VKKK-0002Kj-00
for <[email-masked]>; Wed, 21 Feb 2001 10:28:04 +1300
Received: from mailserver.pertronic.co.nz (203-96-145-60.adsl.paradise.net.nz [203.96.145.60])
by deborah.paradise.net.nz (8.10.1/8.10.1) with ESMTP id f1KLSc502382
for <[email-masked]>; Wed, 21 Feb 2001 10:28:38 +1300 (NZDT)
Received: by mailserver.pertronic.co.nz with XtraMail-SMTP/POP3-Server (v1.2 78220005830) for <[email-masked]> at Wed, 21 Feb 2001 10:27:34 +1300
Message-ID: <001901c09b84$aa21bce0$0b01a8c0@simon>
From: "Simon Eatough" <[email-masked]>
To: <[email-masked]>
Subject: re: [avr-gcc-list] Monitor + Debugger for AVR-gcc available
Date: Wed, 21 Feb 2001 10:32:45 +1300
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0016_01C09BF1.A10A3C00"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_0016_01C09BF1.A10A3C00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi=20

Another alternative RS232 debugger patch for gdb is on Serge Vakulenko's =
site http://www.vak.ru/software/casc.html.

Cheers

Simon=20

------=_NextPart_000_0016_01C09BF1.A10A3C00
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Another alternative RS232 debugger =
patch for gdb=20
is&nbsp;on Serge Vakulenko's&nbsp;site <A=20
href=3D"http://www.vak.ru/software/casc.html">http://www.vak.ru/software/=
casc.html</A>.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Cheers</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; Simon=20
<BR></DIV></FONT></BODY></HTML>

------=_NextPart_000_0016_01C09BF1.A10A3C00--

From [email-masked] Wed Feb 21 11:56:54 2001
Received: from mta03.mail.au.uu.net ([203.2.192.83] helo=mta03.mail.mel.aone.net.au)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14VLiI-0002OB-00
for <[email-masked]>; Wed, 21 Feb 2001 11:56:54 +1300
Received: from mail.tekelek.com.au ([203.12.190.241])
by mta03.mail.mel.aone.net.au with ESMTP
id <[email-masked]>
for <[email-masked]>; Wed, 21 Feb 2001 09:57:27 +1100
To: <[email-masked]>
X-Mailer: Lotus Notes Release 5.0.5 September 22, 2000
Message-ID: <[email-masked]>
From: [email-masked]
Date: Wed, 21 Feb 2001 09:21:37 +0930
X-MIMETrack: Serialize by Router on Zeus/Tekelek(Release 5.0.6a |January 17, 2001) at 02/21/2001
09:27:25 AM
MIME-Version: 1.0
Content-type: text/plain; charset=us-ascii
Subject: [avr-gcc-list] math.h library functions
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Greetings,
I have a gumby gcc-avr question. Is there an updated math.h library
that I can use which has the atan2 function implemented. I am using the
Win32 port of the gcc compiler as my employer will only use NT (*doh!*) and
not a true multitasking operating system (*smirk*). Any help would be
greatly appreciated, at the moment it looks like I will have to port the
code to Hitachi but I would prefer to use Atmel.

Matthew

From [email-masked] Thu Feb 22 10:21:22 2001
Received: from bru5-smtp-out2.be.uu.net ([194.7.1.6])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14VghN-0003Fa-00
for <[email-masked]>; Thu, 22 Feb 2001 10:21:22 +1300
Received: from computerrudi (uu212-190-4-127.unknown.uunet.be [212.190.4.127])
by bru5-smtp-out2.be.uu.net (8.11.2/8.11.2) with SMTP id f1LLLv724186
for <[email-masked]>; Wed, 21 Feb 2001 22:21:57 +0100 (MET)
Message-ID: <003d01c09c4c$fd317ba0$7f04bed4@computerrudi>
From: "rudi gerrits" <[email-masked]>
To: "avr forum" <[email-masked]>
Date: Wed, 21 Feb 2001 22:26:44 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_003A_01C09C55.5EA1F740"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] new AVR-GCC bug
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_003A_01C09C55.5EA1F740
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

I am happy to see that the SRAM allocation bug is fixed in the latest =
avr-gcc version.
-> avrgcc20010211.exe , downloaded from http://combio.de/avr/index.html

However , a new bug seems to have popped up.

The following code is emitted wrong:

while ((inp(USR) & (1<<RXC)) =3D=3D 0)=20
{
if ( i =3D=3D 5) =20
{
// receive timeout
return 0;
}
}

It worked fine with Volker's version.=20
If I remove the inner statements it works like it should have.
Same problem if the while() loop is changed into a for() loop.
It seems that the bit test is translated into this :

in r18,11
tst r18
brlt .L18
=20
With the old compiler the "brlt" was "brge".

Can someone look into this ?

Thanks.

Rudi Gerrits

------=_NextPart_000_003A_01C09C55.5EA1F740
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Hi,</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>I am happy to see that the SRAM allocation bug is =
fixed in the=20
latest avr-gcc version.</FONT></DIV>
<DIV><FONT size=3D2>-&gt;&nbsp;avrgcc20010211.exe , downloaded from <A=20
href=3D"http://combio.de/avr/index.html"><FONT=20
size=3D3>http://combio.de/avr/index.html</FONT></A><BR></FONT></DIV>
<DIV><FONT size=3D2>However , a new bug seems to have popped =
up.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>The following code is emitted wrong:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>&nbsp;while ((inp(USR) &amp; (1&lt;&lt;RXC)) =3D=3D =
0)=20
<BR>&nbsp;{<BR>&nbsp;&nbsp;&nbsp;if ( i =3D=3D=20
5)&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;//=
=20
receive timeout<BR>&nbsp;&nbsp;&nbsp;&nbsp;return=20
0;<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;}<BR></FONT></DIV>
<DIV><FONT size=3D2>It worked fine with Volker's version. </FONT></DIV>
<DIV><FONT size=3D2>If I remove the inner statements it works like it =
should=20
have.</FONT></DIV>
<DIV><FONT size=3D2>Same problem if the while() loop is changed into a =
for()=20
loop.</FONT></DIV>
<DIV><FONT size=3D2>It seems that the bit test is translated into this=20
:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp;in r18,11<BR>&nbsp;&nbsp;&nbsp;tst =

r18<BR>&nbsp;&nbsp;&nbsp;brlt .L18<BR>&nbsp;</FONT></DIV>
<DIV><FONT size=3D2>With the old compiler the "brlt" was =
"brge".</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Can someone look into this ?</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Thanks.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Rudi Gerrits</DIV></FONT></BODY></HTML>

------=_NextPart_000_003A_01C09C55.5EA1F740--

From [email-masked] Fri Feb 23 00:30:37 2001
Received: from blegroup.demon.co.uk
([158.152.198.111] helo=localhost.localdomain ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14VtxD-0003lT-00
for <[email-masked]>; Fri, 23 Feb 2001 00:30:36 +1300
Received: (from root@localhost)
by localhost.localdomain (8.9.3/8.9.3) id MAA28891
for [email-masked]; Thu, 22 Feb 2001 12:37:51 GMT
Received: from lee.blegroup.demon.co.uk (lee.blegroup.demon.co.uk [192.168.1.2])
by localhost.localdomain (8.9.3/8.9.3) with SMTP id MAA28847
for <[email-masked]>; Thu, 22 Feb 2001 12:37:44 GMT
Message-ID: <[email-masked]>
From: "Lee Mitchell" <[email-masked]>
To: <[email-masked]>
Date: Thu, 22 Feb 2001 11:35:41 -0000
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-scanner: scanned by Inflex 0.1.5 - (http://www.inflex.co.za/)
Subject: [avr-gcc-list] grrr, what am I doing wrong ???
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi folks,
I have previously been using a quite old version of avr-gcc. Now, before
i start work on a new project, i decided to upgrade my tools to the latest
version.
I downloaded the avrgcc20010211.exe file and ran it installing the tools in
c:\avrgcc

However, when I try and build the libraries by runing the install program in
c:\avrgcc
I get the following errors and the libraries are not compiled.
I am using Windows 95 and have tried to install the tools on 2 machines
(both win95) and have had the same failure on both machines.

rm -fr avr3
rm -fr avr4
rm -fr avr5
rm -fr libc
rm -fr libm
rm -f *.o
rm -f *.a
mkdir avr3
mkdir avr4
mkdir avr5
mkdir avr3\libc
mkdir avr4\libc
mkdir avr5\libc
mkdir avr3\libm
mkdir avr4\libm
mkdir avr5\libm
mkdir libc
mkdir libm
avr-gcc -x
assembler-with-cpp -mmcu=at90s1200 -I./../include -I. -Wa,-gstabs -c
C:\AVRGCC/lib/avr-libc-20010211/src/gcrt1.S -o crts1200.o
C:\WINDOWS\TEMP\ccduh3fb.s: Assembler messages:
C:\WINDOWS\TEMP\ccduh3fb.s:0: Warning: Unknown escape '\A' in string:
Ignored
C:\WINDOWS\TEMP\ccduh3fb.s:0: Warning: Unknown escape '\A' in string:
Ignored
C:\WINDOWS\TEMP\ccduh3fb.s:0: Warning: Unknown escape '\A' in string:
Ignored
C:\WINDOWS\TEMP\ccduh3fb.s:0: Warning: Unknown escape '\A' in string:
Ignored
C:\WINDOWS\TEMP\ccduh3fb.s:0: Warning: Unknown escape '\A' in string:
Ignored
C:\WINDOWS\TEMP\ccduh3fb.s:0: Warning: Unknown escape '\A' in string:
Ignored
C:\WINDOWS\TEMP\ccduh3fb.s:2: Error: Bad escaped character in string, '?'
assumed
C:/AVRGCC/lib/avr-libc-20010211/src/macros.inc:28: Error: Bad escaped
character in string, '?' assumed
C:?VRGCC/lib/avr-libc-20010211/src/gcrt1.S:54: Error: Bad escaped character
in string, '?' assumed
C:?VRGCC/lib/avr-libc-20010211/src/gcrt1.S:125: Error: Bad escaped character
in string, '?' assumed
C:?VRGCC/lib/avr-libc-20010211/src/gcrt1.S:173: Error: Bad escaped character
in string, '?' assumed
C:?VRGCC/lib/avr-libc-20010211/src/gcrt1.S:203: Error: Bad escaped character
in string, '?' assumed
C:\AVRGCC\BIN\MAKE.EXE: *** [crts1200.o] Error 1

Any help would be greatly appreciated as I am due to start writing code
within the next few weeks !

Cheers,
Lee Mitchell

From [email-masked] Fri Feb 23 04:57:15 2001
Received: from smtp.tor.axxent.ca ([209.250.128.26] helo=mail.tor.axxent.ca)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Vy7G-0003vq-00
for <[email-masked]>; Fri, 23 Feb 2001 04:57:14 +1300
Received: from digicom (dial-0426.tor.axxent.ca [216.249.1.172])
by mail.tor.axxent.ca (8.11.0/8.9.3) with ESMTP id f1MFvgO27083;
Thu, 22 Feb 2001 10:57:42 -0500 (EST)
Received: from cwall by digicom with local (Exim 3.12 #1 (Debian))
id 14VyAj-0001pR-00; Thu, 22 Feb 2001 11:00:49 -0500
Date: Thu, 22 Feb 2001 11:00:49 -0500
From: Carl Wall <[email-masked]>
To: Lee Mitchell <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] grrr, what am I doing wrong ???
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Thu, Feb 22, 2001 at 11:35:41AM -0000
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Lee

Have you removed any dos enviourment variables from your c:\autoeexec.bat
file, that where in there for the old avr-gcc. There is a warning about this
on the www.avrfreeks.net avrgcc install page, about doing this for any
reinstalls or upgrades. About a week ago I did an install on an NT4 box and
it worked, do not know if the file has changed since I did it. Before I
did it, I erased the existing avr-gcc file directory.

When you get it up and going there is also an updated make file on
avrfreeks.net with some workarounds for this release of avr-gcc, you might
want to download that, it is a modified Volker make file.
Carl

On Thu, Feb 22, 2001 at 11:35:41AM -0000, Lee Mitchell wrote:
> Hi folks,
> I have previously been using a quite old version of avr-gcc. Now, before
> i start work on a new project, i decided to upgrade my tools to the latest
> version.
> I downloaded the avrgcc20010211.exe file and ran it installing the tools in
> c:\avrgcc
>
> However, when I try and build the libraries by runing the install program in
> c:\avrgcc
> I get the following errors and the libraries are not compiled.
> I am using Windows 95 and have tried to install the tools on 2 machines
> (both win95) and have had the same failure on both machines.
>
> Any help would be greatly appreciated as I am due to start writing code
> within the next few weeks !
>
> Cheers,
> Lee Mitchell
>

--
Carl A. Wall VE3APY Toronto, Ontario, Canada
"Created on DEBIAN 2.2, an alternative to Microsoft Systems
and a GNU/Linux distribution of Open Source programming"

From [email-masked] Fri Feb 23 05:53:16 2001
Received: from blegroup.demon.co.uk
([158.152.198.111] helo=localhost.localdomain ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14VyzS-0003yK-00
for <[email-masked]>; Fri, 23 Feb 2001 05:53:15 +1300
Received: (from root@localhost)
by localhost.localdomain (8.9.3/8.9.3) id RAA32083
for [email-masked]; Thu, 22 Feb 2001 17:59:42 GMT
Received: from lee.blegroup.demon.co.uk (lee.blegroup.demon.co.uk [192.168.1.2])
by localhost.localdomain (8.9.3/8.9.3) with SMTP id RAA31992;
Thu, 22 Feb 2001 17:59:27 GMT
Message-ID: <[email-masked]>
From: "Lee Mitchell" <[email-masked]>
To: "Carl Wall" <[email-masked]>
Cc: <[email-masked]>
References: <[email-masked]> <[email-masked]>
Subject: Re: [avr-gcc-list] grrr, what am I doing wrong ???
Date: Thu, 22 Feb 2001 16:57:23 -0000
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-scanner: scanned by Inflex 0.1.5 - (http://www.inflex.co.za/)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

woohoo !!
thanks, that worked :-)

----- Original Message -----
From: Carl Wall <[email-masked]>
To: Lee Mitchell <[email-masked]>
Cc: <[email-masked]>
Sent: Thursday, February 22, 2001 4:00 PM
Subject: Re: [avr-gcc-list] grrr, what am I doing wrong ???

> Hi Lee
>
> Have you removed any dos enviourment variables from your
c:\autoeexec.bat
> file, that where in there for the old avr-gcc. There is a warning about
this
> on the www.avrfreeks.net avrgcc install page, about doing this for any
> reinstalls or upgrades. About a week ago I did an install on an NT4 box
and
> it worked, do not know if the file has changed since I did it. Before I
> did it, I erased the existing avr-gcc file directory.
>
> When you get it up and going there is also an updated make file on
> avrfreeks.net with some workarounds for this release of avr-gcc, you might
> want to download that, it is a modified Volker make file.
> Carl
>
> On Thu, Feb 22, 2001 at 11:35:41AM -0000, Lee Mitchell wrote:
> > Hi folks,
> > I have previously been using a quite old version of avr-gcc. Now,
before
> > i start work on a new project, i decided to upgrade my tools to the
latest
> > version.
> > I downloaded the avrgcc20010211.exe file and ran it installing the tools
in
> > c:\avrgcc
> >
> > However, when I try and build the libraries by runing the install
program in
> > c:\avrgcc
> > I get the following errors and the libraries are not compiled.
> > I am using Windows 95 and have tried to install the tools on 2 machines
> > (both win95) and have had the same failure on both machines.
> >
> > Any help would be greatly appreciated as I am due to start writing code
> > within the next few weeks !
> >
> > Cheers,
> > Lee Mitchell
> >
>
> --
> Carl A. Wall VE3APY Toronto, Ontario, Canada
> "Created on DEBIAN 2.2, an alternative to Microsoft Systems
> and a GNU/Linux distribution of Open Source programming"

From [email-masked] Fri Feb 23 07:19:13 2001
Received: from smtp.tor.axxent.ca ([209.250.128.26] helo=mail.tor.axxent.ca)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14W0Ke-00046X-00
for <[email-masked]>; Fri, 23 Feb 2001 07:19:13 +1300
Received: from digicom (dial-0896.tor.axxent.ca [216.249.3.134])
by mail.tor.axxent.ca (8.11.0/8.9.3) with ESMTP id f1MIJpO13847
for <[email-masked]>; Thu, 22 Feb 2001 13:19:52 -0500 (EST)
Received: from cwall by digicom with local (Exim 3.12 #1 (Debian))
id 14W0OJ-00006Q-00; Thu, 22 Feb 2001 13:22:59 -0500
Date: Thu, 22 Feb 2001 13:22:59 -0500
From: Carl Wall <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] grrr, what am I doing wrong ???
Message-ID: <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Thu, Feb 22, 2001 at 04:57:23PM -0000
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> woohoo !!
> thanks, that worked :-)
>
Hi Lee

Glad that it works now for you. If you check the mailing list archives
on Feb 3 Peter Fleury wrote a message on the Diffenrces between Volkers
and Gunnars distributions, you might like to give it a read. Also
a couple of bugs have been showing up with -O3 so you might want to use
-O or -O2 optimiaztion.

Cheers
Carl

--
Carl A. Wall VE3APY Toronto, Ontario, Canada
"Created on DEBIAN 2.2, an alternative to Microsoft Systems
and a GNU/Linux distribution of Open Source programming"

From [email-masked] Sat Feb 24 01:32:28 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14WHOM-0004nd-00
for <[email-masked]>; Sat, 24 Feb 2001 01:32:11 +1300
Received: (qmail 1473 invoked from network); 23 Feb 2001 12:34:39 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 23 Feb 2001 12:34:39 -0000
Received: from fri.uni-lj.si ([193.2.76.118]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with ESMTP id AAA22434
for <[email-masked]>; Fri, 23 Feb 2001 13:24:48 +0100
Message-ID: <[email-masked]>
Date: Fri, 23 Feb 2001 13:34:43 +0100
From: [email-masked] (Robert Rozman)
X-Mailer: Mozilla 4.51 [sl] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: "[email-masked]" <[email-masked]>
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Simple menu implementation
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I need to implement simple menu structure for communication with user
via 2X16 character LCD and 4 keys (up one level,left,right,accept) in my
custom home automation system. Since I'm not so experienced my code
would look like mess and will need much more space than really needed.

So if someone has some startup code or menu implementation that would
help me get started I'd be very grateful.

Thanks in advance,
regards,
Robert Rozman

From [email-masked] Sat Feb 24 01:49:08 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14WHel-0004oc-00
for <[email-masked]>; Sat, 24 Feb 2001 01:49:07 +1300
Received: (qmail 1781 invoked from network); 23 Feb 2001 12:51:04 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 23 Feb 2001 12:51:04 -0000
Received: from fri.uni-lj.si ([193.2.76.118]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with ESMTP id AAA22671
for <[email-masked]>; Fri, 23 Feb 2001 13:41:13 +0100
Message-ID: <[email-masked]>
Date: Fri, 23 Feb 2001 13:51:08 +0100
From: [email-masked] (Robert Rozman)
X-Mailer: Mozilla 4.51 [sl] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: "[email-masked]" <[email-masked]>
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Array of strings in prog. mem.
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I'm having troubles with putting array of strings into program memory.
As long as I don't put progmem attribute in front of my array of days
("days[]={"Mon","Tue", ... ) program works, but it copies array to
RAM. I don't want that, I'd like to keep them in prog. mem.
But if I put them in prog.mem. with attribute command and interpret them
with PRG_RDB macro it doesn't work.

Could someone give me advice how to do this properly.

Thanks in advance,

Robert Rozman

From [email-masked] Sat Feb 24 11:36:10 2001
Received: from smtp.tor.axxent.ca ([209.250.128.26] helo=mail.tor.axxent.ca)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14WQor-0005El-00
for <[email-masked]>; Sat, 24 Feb 2001 11:36:10 +1300
Received: from digicom (dial-0811.tor.axxent.ca [216.249.3.49])
by mail.tor.axxent.ca (8.11.0/8.9.3) with ESMTP id f1NMalc04757
for <[email-masked]>; Fri, 23 Feb 2001 17:36:47 -0500 (EST)
Received: from cwall by digicom with local (Exim 3.12 #1 (Debian))
id 14WQsY-00007P-00; Fri, 23 Feb 2001 17:39:58 -0500
Date: Fri, 23 Feb 2001 17:39:58 -0500
From: Carl Wall <[email-masked]>
To: "[email-masked]" <[email-masked]>
Subject: Re: [avr-gcc-list] Array of strings in prog. mem.
Message-ID: <[email-masked]>
Mail-Followup-To: "[email-masked]" <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Fri, Feb 23, 2001 at 01:51:08PM +0100
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Robert
Check the code for pavr on avr.jpk.co.nz it has arrays which
are stored in program memory, and may be of help.
Cheers
Carl

On Fri, Feb 23, 2001 at 01:51:08PM +0100, Robert Rozman wrote:
> I'm having troubles with putting array of strings into program memory.
> As long as I don't put progmem attribute in front of my array of days
> ("days[]={"Mon","Tue", ... ) program works, but it copies array to
> RAM. I don't want that, I'd like to keep them in prog. mem.
> But if I put them in prog.mem. with attribute command and interpret them
> with PRG_RDB macro it doesn't work.
>

--
Carl A. Wall VE3APY Toronto, Ontario, Canada
"Created on DEBIAN 2.2, an alternative to Microsoft Systems
and a GNU/Linux distribution of Open Source programming"

From [email-masked] Sun Feb 25 01:56:08 2001
Received: from smtp.tor.axxent.ca ([209.250.128.26] helo=mail.tor.axxent.ca)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14WeF5-0005oA-00
for <[email-masked]>; Sun, 25 Feb 2001 01:56:07 +1300
Received: from digicom (dial-0140.tor.axxent.ca [216.249.0.140])
by mail.tor.axxent.ca (8.11.0/8.9.3) with ESMTP id f1OCuqc14291
for <[email-masked]>; Sat, 24 Feb 2001 07:56:52 -0500 (EST)
Received: from cwall by digicom with local (Exim 3.12 #1 (Debian))
id 14WeIv-00008R-00; Sat, 24 Feb 2001 08:00:05 -0500
Date: Sat, 24 Feb 2001 08:00:04 -0500
From: Carl Wall <[email-masked]>
To: "[email-masked]" <[email-masked]>
Subject: Re: [avr-gcc-list] Array of strings in prog. mem.
Message-ID: <[email-masked]>
Mail-Followup-To: "[email-masked]" <[email-masked]>
References: <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Fri, Feb 23, 2001 at 05:39:58PM -0500
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Robert
Another thing to check is the optimization level there are reports
that -O3 is giving some problems on the latest builds, try -O or -O2
and see if that helps.
Cheers
Carl
> On Fri, Feb 23, 2001 at 01:51:08PM +0100, Robert Rozman wrote:
> > I'm having troubles with putting array of strings into program memory.
> > As long as I don't put progmem attribute in front of my array of days
> > ("days[]={"Mon","Tue", ... ) program works, but it copies array to
> > RAM. I don't want that, I'd like to keep them in prog. mem.
> > But if I put them in prog.mem. with attribute command and interpret them
> > with PRG_RDB macro it doesn't work.
> >
>
> --
> Carl A. Wall VE3APY Toronto, Ontario, Canada
> "Created on DEBIAN 2.2, an alternative to Microsoft Systems
> and a GNU/Linux distribution of Open Source programming"
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
Carl A. Wall VE3APY Toronto, Ontario, Canada
"Created on DEBIAN 2.2, an alternative to Microsoft Systems
and a GNU/Linux distribution of Open Source programming"

From [email-masked] Sun Feb 25 12:11:58 2001
Received: from ux7.cso.uiuc.edu ([128.174.5.35] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Wnr3-0007kG-00
for <[email-masked]>; Sun, 25 Feb 2001 12:11:57 +1300
Received: from uiuc.edu (el262b.ece.uiuc.edu [128.174.113.41])
by ux7.cso.uiuc.edu (8.11.0/8.11.0) with ESMTP id f1ONCiq21314
for <[email-masked]>; Sat, 24 Feb 2001 17:12:44 -0600 (CST)
Message-ID: <[email-masked]>
Date: Sat, 24 Feb 2001 11:14:44 -0600
From: Kevin <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.18pre21 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] trouble with compiling example code
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I am using linux and followed the gcc installation instructions laid out
by Rich Neswold's GNU Development Environment for the AVR
Microcontroller packet. I am a newbie with the gcc development tools.

My question is when I try and compile the sample code to test and see if
the compiler works I get the error message that the header files (ie.
io.h etc.) cannot be found or doesn't exist. Is there something
I missed in the installation or do I have to do something to get the
header files to be recognized.

Any help would be appreciated.

Regards,
Kevin

From [email-masked] Sun Feb 25 13:00:04 2001
Received: from mtiwmhc22.worldnet.att.net ([204.127.131.47])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Wobb-0007mv-00
for <[email-masked]>; Sun, 25 Feb 2001 13:00:03 +1300
Received: from jimanji ([12.93.210.139]) by mtiwmhc22.worldnet.att.net
(InterMail vM.4.01.03.16 201-229-121-116-20010115) with SMTP
id <20010225000021.KNHK26039.mtiwmhc22.worldnet.att.net@jimanji>;
Sun, 25 Feb 2001 00:00:21 +0000
Message-ID: <[email-masked]>
Reply-To: "Jim Pearce" <[email-masked]>
From: "Jim Pearce" <[email-masked]>
To: "Kevin" <[email-masked]>,
<[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] trouble with compiling example code
Date: Sat, 24 Feb 2001 18:59:45 -0500
Organization: Pegasus Technologies
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Did you download this version?

http://www.combio.de/avr/avrgcc20010211.exe

This should work straight out of the box (if you are MS Win based). Good Luck!

Jim

----- Original Message -----
From: "Kevin" <[email-masked]>
To: <[email-masked]>
Sent: Saturday, February 24, 2001 12:14 PM
Subject: [avr-gcc-list] trouble with compiling example code

> Hello,
>
> I am using linux and followed the gcc installation instructions laid out
> by Rich Neswold's GNU Development Environment for the AVR
> Microcontroller packet. I am a newbie with the gcc development tools.
>
> My question is when I try and compile the sample code to test and see if
> the compiler works I get the error message that the header files (ie.
> io.h etc.) cannot be found or doesn't exist. Is there something
> I missed in the installation or do I have to do something to get the
> header files to be recognized.
>
> Any help would be appreciated.
>
> Regards,
> Kevin
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Sun Feb 25 19:26:17 2001
Received: from mailout04.sul.t-online.com ([194.25.134.18])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14WudM-00082f-00
for <[email-masked]>; Sun, 25 Feb 2001 19:26:16 +1300
Received: from fwd06.sul.t-online.com
by mailout04.sul.t-online.com with smtp
id 14Wue8-0003Pk-01; Sun, 25 Feb 2001 07:27:04 +0100
Received: from vivaldi (520013112276-0001@[217.1.69.15]) by fwd06.sul.t-online.com
with smtp id 14Wue1-1AU2ICC; Sun, 25 Feb 2001 07:26:57 +0100
From: [email-masked] (Nicolas Nickisch)
To: <[email-masked]>
Date: Sun, 25 Feb 2001 07:27:56 +0100
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0000_01C09EFC.790AEC00"
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-Sender: [email-masked]
Subject: [avr-gcc-list] What's wrong with this preprocessor statement
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_0000_01C09EFC.790AEC00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Hi, I am trying to implement a delay-loop with the following
#define-statement:

#define delay2(microseconds) { unsigned long x; x=((( (unsigned long)
microseconds*F_CPU)/(13000000)));while(x--){}}

in the main-program the loop is called by delay2(200)

As you can see the x-varaibale is loaded with as a counter for the
while-loop, calculated according to the MC-Frequency.

In the version stated above something is wirng. The compiler gives no
complains but in the AVR-Studio the 'delay2' is ignored. The program just
jumps to the next statement.

#define delay2(microseconds) { unsigned int x; x=(((
microseconds*F_CPU)/(13000000)));while(x--){}}

This version works but is limited to a delay of about 230µs (greater values
for microseconds lead to an integer overflow error - the program has an dead
end then)
It seems to be a question of long-values to get this running.
Can you help me ?

I tried to develop this as a better version of the following code:

#define delay_mcs(x) delay((((x*F_CPU)/6000000)))
#define delay_ms(x) delay((((x*F_CPU)/6000)))
#define delay_s(x) delay((((x*F_CPU)/6)))

extern void delay(long);

......

void delay(long microseconds)
// minimale Verzögerung: 5 µs!
{
while(microseconds--) {};
return;
}

Any ideas ?

Dr. med. Nicolas Nickisch
Thomaestr. 6
65193 Wiesbaden

[email-masked]
[email-masked]

------=_NextPart_000_0000_01C09EFC.790AEC00
Content-Type: text/x-vcard;
name="Nicolas Nickisch.vcf"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="Nicolas Nickisch.vcf"

BEGIN:VCARD
VERSION:2.1
N:Nickisch;Nicolas;;Doktor
FN:Nicolas Nickisch
TEL;HOME;VOICE:+49 (0611) 541578
TEL;CELL;VOICE:+49 (0172) 611 1578
ADR;WORK;ENCODING=3DQUOTED-PRINTABLE:;;St. =
Josefs-Hospital=3D0D=3D0ASolmsstr. 15;Wiesbaden;;65189
LABEL;WORK;ENCODING=3DQUOTED-PRINTABLE:St. =
Josefs-Hospital=3D0D=3D0ASolmsstr. 15=3D0D=3D0AWiesbaden 65189
ADR;HOME:;;Thomaestr. 6;Wiesbaden;;65193;Deutschland
LABEL;HOME;ENCODING=3DQUOTED-PRINTABLE:Thomaestr. 6=3D0D=3D0AWiesbaden =
65193=3D0D=3D0ADeutschland
BDAY:20001115
EMAIL;PREF;INTERNET:[email-masked]
EMAIL;INTERNET:[email-masked]
REV:20001105T123130Z
END:VCARD

------=_NextPart_000_0000_01C09EFC.790AEC00--

From [email-masked] Mon Feb 26 02:38:51 2001
Received: from mailout02.sul.t-online.com ([194.25.134.17])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14X1Nz-0008IW-00
for <[email-masked]>; Mon, 26 Feb 2001 02:38:51 +1300
Received: from fwd05.sul.t-online.com
by mailout02.sul.t-online.com with smtp
id 14X1Oo-0006KM-03; Sun, 25 Feb 2001 14:39:42 +0100
Received: from vivaldi (520013112276-0001@[217.1.69.47]) by fwd05.sul.t-online.com
with smtp id 14X1OW-0xrA3MC; Sun, 25 Feb 2001 14:39:24 +0100
From: [email-masked] (Nicolas Nickisch)
To: <[email-masked]>
Date: Sun, 25 Feb 2001 14:40:24 +0100
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-Sender: [email-masked]
Subject: [avr-gcc-list] WG: What's wrong with this preprocessor statement
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi, I am trying to implement a delay-loop with the following
#define-statement:

#define delay2(microseconds) { unsigned long x; x=((( (unsigned long)
microseconds*F_CPU)/(13000000)));while(x--){}}

in the main-program the loop is called by delay2(200)

As you can see the x-varaibale is loaded with as a counter for the
while-loop, calculated according to the MC-Frequency.

In the version stated above something is wirng. The compiler gives no
complains but in the AVR-Studio the 'delay2' is ignored. The program just
jumps to the next statement.

#define delay2(microseconds) { unsigned int x; x=(((
microseconds*F_CPU)/(13000000)));while(x--){}}

This version works but is limited to a delay of about 230µs (greater values
for microseconds lead to an integer overflow error - the program has an dead
end then)
It seems to be a question of long-values to get this running.
Can you help me ?

I tried to develop this as a better version of the following code:

#define delay_mcs(x) delay((((x*F_CPU)/6000000)))
#define delay_ms(x) delay((((x*F_CPU)/6000)))
#define delay_s(x) delay((((x*F_CPU)/6)))

extern void delay(long);

......

void delay(long microseconds)
// minimale Verzögerung: 5 µs!
{
while(microseconds--) {};
return;
}

Any ideas ?

Dr. med. Nicolas Nickisch
Thomaestr. 6
65193 Wiesbaden

[email-masked]
[email-masked]

From [email-masked] Mon Feb 26 03:53:39 2001
Received: from hertz.ikp.physik.tu-darmstadt.de ([130.83.24.91])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14X2YL-0008LZ-00
for <[email-masked]>; Mon, 26 Feb 2001 03:53:38 +1300
Received: (from bon@localhost)
by hertz.ikp.physik.tu-darmstadt.de (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) id f1PEsRo05346;
Sun, 25 Feb 2001 15:54:27 +0100
X-Authentication-Warning: hertz.ikp.physik.tu-darmstadt.de: bon set sender to [email-masked] using -f
From: Uwe Bonnes <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <[email-masked]>
Date: Sun, 25 Feb 2001 15:54:27 +0100
To: <[email-masked]>
Subject: Re: [avr-gcc-list] What's wrong with this preprocessor statement
In-Reply-To: <[email-masked]>
References: <[email-masked]>
X-Mailer: VM 6.90 under Emacs 20.7.1
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>>>>> "Nicolas" == Nicolas Nickisch <[email-masked]> writes:

Nicolas> Hi, I am trying to implement a delay-loop with the following
Nicolas> #define-statement:

Nicolas> #define delay2(microseconds) { unsigned long x; x=((( (unsigned
Nicolas> long) microseconds*F_CPU)/(13000000)));while(x--){}}

...

Nicolas> Any ideas ?

Nicolas,

did you compile with optimization? Then perhaps the loop was optimized away.

Put the "volatile" keyword before the variable and try again.

Bye
--
Uwe Bonnes [email-masked]

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

From [email-masked] Mon Feb 26 16:37:52 2001
Received: from email.netonecom.net ([209.172.26.13] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XETv-0000QV-00
for <[email-masked]>; Mon, 26 Feb 2001 16:37:52 +1300
Received: from netonecom.net (catudal.netonecom.net [216.65.187.222])
by email.netonecom.net (8.11.2/8.11.0) with ESMTP id f1Q3cYD07139
for <[email-masked]>; Sun, 25 Feb 2001 22:38:35 -0500 (EST)
Message-ID: <[email-masked]>
Date: Sun, 25 Feb 2001 22:38:10 -0500
From: Michel Catudal <[email-masked]>
Organization: Pas =?iso-8859-1?Q?organis=E9?= par Ti-Mou
X-Mailer: Mozilla 4.76 [Joual] (X11; U; Linux 2.2.16 i586)
X-Accept-Language: fr-CA, en-US
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] GCC compile problems
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I tried to compile gcc-20010205 and I get several errors.
I installed avr-binutils-010225 , I've tried previous
versions down to avr-binutils-010109 with identical results.
After looking into the source of the binutils it seems
to me that movw is not defined at all for the avr.

Before making any changes to
/usr/src/packages/BUILD/avr-gcc-20010205/gcc/config/avr/avr.c
I had a lot of error messages about invalid registers so I
changed in the following code a 0 to r0 and a 1 to r1
Then I had an error about a double definition of processor avr3 in
a temporary .s file. I commented the .arch line and the messages
went away. Now I get an error message telling me that movw is
not defined which seems to be correct as I can't find it in the
binutils. Is there anyone who has a working binutils source tree that would work
with the latest gcc? Obviously that code must have compiled correctly
at one time or another somewhere. I do not wish to ignore the error
messages considering that the code not generated is some code I want.

void
asm_file_start (file)
FILE *file;
{
output_file_directive (file, main_input_filename);
// fprintf (file, "\t.arch %s\n", avr_mcu_name);
fputs ("__SREG__ = 0x3f\n"
"__SP_H__ = 0x3e\n"
"__SP_L__ = 0x3d\n", file);

fputs ("__tmp_reg__ = r0\n" <---- Here it was 0 instead of r0
"__zero_reg__ = r1\n" <---- Here it was 1 instead of r1
"_PC_ = 2\n", file);

commands_in_file = 0;
commands_in_prologues = 0;
commands_in_epilogues = 0;
}

--
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://www.netonecom.net/~bbcat
We have all kinds of links
and many SuSE 7.0 Linux RPM packages

From [email-masked] Mon Feb 26 22:36:24 2001
Received: from isy.liu.se ([130.236.48.10])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XK4p-0000da-00
for <[email-masked]>; Mon, 26 Feb 2001 22:36:19 +1300
Received: from baugi.isy.liu.se (baugi.isy.liu.se [130.236.53.36])
by isy.liu.se (8.11.2/8.11.2) with ESMTP id f1Q9bA928341
for <[email-masked]>; Mon, 26 Feb 2001 10:37:10 +0100 (MET)
Received: from baugi.isy.liu.se (baugi.isy.liu.se [130.236.53.36])
by baugi.isy.liu.se (8.9.3+Sun/8.9.1) with SMTP id KAA02120
for <[email-masked]>; Mon, 26 Feb 2001 10:37:09 +0100 (MET)
Message-Id: <[email-masked]>
Date: Mon, 26 Feb 2001 10:37:09 +0100 (MET)
From: Jonas Carlsson <[email-masked]>
Reply-To: Jonas Carlsson <[email-masked]>
To: [email-masked]
MIME-Version: 1.0
Content-Type: TEXT/plain; charset=us-ascii
Content-MD5: C/3u2vtdIbO2yk00pSnSCA==
X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.3.5 SunOS 5.7 sun4u sparc
Subject: [avr-gcc-list] Code Size
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

How could I get information about how much of the program memory
that have been used ?
Can I read it in some file that avr-gcc generates ?

It would be nice to know that 59% of the program memory is used
or 1K bytes of program memory or something like that.

// Jonas Carlsson

From [email-masked] Mon Feb 26 22:38:10 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XK6a-0000e9-00
for <[email-masked]>; Mon, 26 Feb 2001 22:38:09 +1300
Received: (from j@localhost)
by ida.interface-business.de id f1Q9crj43322;
Mon, 26 Feb 2001 10:38:53 +0100 (MET)
Date: Mon, 26 Feb 2001 10:38:53 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] trouble with compiling example code
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Jim Pearce" <[email-masked]> wrote:

> http://www.combio.de/avr/avrgcc20010211.exe This should work
> straight out of the box (if you are MS Win based). Good Luck!

But he wrote that he's running it on Linux... ;-)

Kevin, go look to see where io.h & Co. have been installed
(a `locate io2333.h' should give you a hint). Somehow the compiler
doesn't seem to pick up that location into its default #include
path, you can add that location with -I/path/to/your/files. Or,
the installation step didn't really install those files at all.

(For me, they are under /usr/local/avr/include.)

> Jim
>
> ----- Original Message -----

[Please, no full quotes. It looks stupid and wastes bandwidth.]

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Mon Feb 26 22:42:33 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XKAo-0000eb-00
for <[email-masked]>; Mon, 26 Feb 2001 22:42:31 +1300
Received: (from j@localhost)
by ida.interface-business.de id f1Q9hKp43331;
Mon, 26 Feb 2001 10:43:20 +0100 (MET)
Date: Mon, 26 Feb 2001 10:43:20 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] What's wrong with this preprocessor statement
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Uwe Bonnes <[email-masked]> wrote:

> did you compile with optimization? Then perhaps the loop was
> optimized away.

ISTR a comment (somewhere in gcc's doc) that gcc never optimizes
simple for() loops of the form:

for (i = 0; i < NFOO; i++) ;

because the compiler recognizes this as a form of a delay loop. Don't
know whether this is also true for variations like while() loops of
the same form.

OTOH, Nicolas wrote that he's simulating it in AVR Studio. Quite
possible that the simulator behaves differently than a real CPU.
(IMHO, the simulator shouldn't see the macro name `delay2' at all
since there should be no traces left from it after running through
cpp. But i've got no experience with it, maybe they are parsing the C
source code by itself.)

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Mon Feb 26 22:45:10 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XKDK-0000f6-00
for <[email-masked]>; Mon, 26 Feb 2001 22:45:08 +1300
Received: (from j@localhost)
by ida.interface-business.de id f1Q9jwR43341;
Mon, 26 Feb 2001 10:45:58 +0100 (MET)
Date: Mon, 26 Feb 2001 10:45:58 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] GCC compile problems
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Michel Catudal <[email-masked]> wrote:

> After looking into the source of the binutils it seems
> to me that movw is not defined at all for the avr.
>
> Before making any changes to
> /usr/src/packages/BUILD/avr-gcc-20010205/gcc/config/avr/avr.c
> I had a lot of error messages about invalid registers so I
> changed in the following code a 0 to r0 and a 1 to r1
> Then I had an error about a double definition of processor avr3 in
> a temporary .s file.

Been there, done that. That all looks like you're working with a too
old version of avr-as. I haven't tried myself with a newer one, but
you ought to fetch a recent copy of GNU binutils (only available as a
snapshot, not as an official release yet). (I didn't try myself since
then, due to lack of time.)

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Mon Feb 26 23:06:29 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XKXz-0000gR-00
for <[email-masked]>; Mon, 26 Feb 2001 23:06:27 +1300
Received: (from j@localhost)
by ida.interface-business.de id f1QA7IQ43428;
Mon, 26 Feb 2001 11:07:18 +0100 (MET)
Date: Mon, 26 Feb 2001 11:07:18 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] Code Size
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Jonas Carlsson <[email-masked]> wrote:

> How could I get information about how much of the program memory
> that have been used ?
> Can I read it in some file that avr-gcc generates ?

avr-size <name of your ELF output file>

..text is the code size, .data is the size of initialized data (RAM),
..bss is the size of uninitialized data (will be zeroed out by the
runtime startup code).

For more detailed information, you can either use linker map files, or
analyze the output of avr-nm. If you look at my extended example code
(ftp://ftp.ifbus.de/pub/j_wunsch/avr-demo.tar.gz), the initial comment
contains a rather detailed summary about how the various code sizes in
the generated binary file.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Tue Feb 27 02:40:44 2001
Received: from invalid.ed.ntnu.no ([129.241.179.15])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XNtL-0000oo-00
for <[email-masked]>; Tue, 27 Feb 2001 02:40:43 +1300
Received: from localhost (hembre@localhost)
by invalid.ed.ntnu.no (8.9.3/8.9.3) with ESMTP id OAA22693
for <[email-masked]>; Mon, 26 Feb 2001 14:42:20 +0100 (CET)
(envelope-from [email-masked])
Date: Mon, 26 Feb 2001 14:42:20 +0100 (CET)
From: Bernt Hustad Hembre <[email-masked]>
X-Sender: [email-masked]
To: AVR Mailing List <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] Suggestion: Split the list into two lists.
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This list contains mainly questions and answers easily devided into two
nearly equal parts: Installing Q&A and programming Q&A.

I suggest to make a new list:
avr-gcc-install-list

This makes it much easier to find answers to install questions and it
keeps annoying (imho :) installquestions apart from the more interesting
programming discussions.

Any opinions?

Bernie
Tlf.: 92648923
[email-masked]

From [email-masked] Tue Feb 27 06:04:41 2001
Received: from smtp.tor.axxent.ca ([209.250.128.26] helo=mail.tor.axxent.ca)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XR4j-0000wX-00
for <[email-masked]>; Tue, 27 Feb 2001 06:04:41 +1300
Received: from digicom (dial-0047.tor.axxent.ca [216.249.0.47])
by mail.tor.axxent.ca (8.11.0/8.9.3) with ESMTP id f1QH5Zc15591
for <[email-masked]>; Mon, 26 Feb 2001 12:05:35 -0500 (EST)
Received: from cwall by digicom with local (Exim 3.12 #1 (Debian))
id 14XR8o-0000Ag-00; Mon, 26 Feb 2001 12:08:54 -0500
Date: Mon, 26 Feb 2001 12:08:53 -0500
From: Carl Wall <[email-masked]>
To: AVR Mailing List <[email-masked]>
Subject: Re: [avr-gcc-list] Suggestion: Split the list into two lists.
Message-ID: <[email-masked]>
Mail-Followup-To: AVR Mailing List <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Mon, Feb 26, 2001 at 02:42:20PM +0100
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Mon, Feb 26, 2001 at 02:42:20PM +0100, Bernt Hustad Hembre wrote:
>
> This list contains mainly questions and answers easily devided into two
> nearly equal parts: Installing Q&A and programming Q&A.
>
> Any opinions?
>
I think the install questions will drop off, as people start to use
the new packages that have been made for Windows and Linux, and the new
install pages on www.avrfreaks.net will help get the users passed the
install questions that we are seeing now. So I do not see the need for
a new list.
Cheers
Carl
--
Carl A. Wall VE3APY Toronto, Ontario, Canada
"Created on DEBIAN 2.2, an alternative to Microsoft Systems
and a GNU/Linux distribution of Open Source programming"

From [email-masked] Tue Feb 27 06:36:39 2001
Received: from email.netonecom.net ([209.172.26.13] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XRZe-000121-00
for <[email-masked]>; Tue, 27 Feb 2001 06:36:38 +1300
Received: from netonecom.net (catudal.netonecom.net [216.65.187.222])
by email.netonecom.net (8.11.2/8.11.0) with ESMTP id f1QHbWf17668
for <[email-masked]>; Mon, 26 Feb 2001 12:37:32 -0500 (EST)
Message-ID: <[email-masked]>
Date: Mon, 26 Feb 2001 12:37:03 -0500
From: Michel Catudal <[email-masked]>
Organization: Pas =?iso-8859-1?Q?organis=E9?= par Ti-Mou
X-Mailer: Mozilla 4.76 [Joual] (X11; U; Linux 2.2.16 i586)
X-Accept-Language: fr-CA, en-US
MIME-Version: 1.0
CC: [email-masked]
Subject: Re: [avr-gcc-list] GCC compile problems
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by email.netonecom.net id f1QHbWf17668
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

J Wunsch a =E9crit :
>=20
> Michel Catudal <[email-masked]> wrote:
>=20
> > After looking into the source of the binutils it seems
> > to me that movw is not defined at all for the avr.
> >
> > Before making any changes to
> > /usr/src/packages/BUILD/avr-gcc-20010205/gcc/config/avr/avr.c
> > I had a lot of error messages about invalid registers so I
> > changed in the following code a 0 to r0 and a 1 to r1
> > Then I had an error about a double definition of processor avr3 in
> > a temporary .s file.
>=20
> Been there, done that. That all looks like you're working with a too
> old version of avr-as. I haven't tried myself with a newer one, but
> you ought to fetch a recent copy of GNU binutils (only available as a
> snapshot, not as an official release yet). (I didn't try myself since
> then, due to lack of time.)

the binutils I've tried are among the latest

avr-binutils-010109.src.tar.bz2
avr-binutils-010203.src.tar.bz2
avr-binutils-010225.src.tgz -> feb 25th 2001

ftp://sourceware.cygnus.com/pub/binutils/snapshots/

These are the ones I tried with identical results.
the avr- was added by me to differentiate it with something else.
I downloaded from=20
It seems that at one time someone accidentally removed a portion of
the avr files or that was never put there in the first place.
Whoever is maintaining the avr tree is not keeping up with what is
on the web and runs a different tree than the one published.

There is a new one today which I haven't checked yet.

--=20
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://www.netonecom.net/~bbcat
We have all kinds of links
and many SuSE 7.0 Linux RPM packages

From [email-masked] Tue Feb 27 07:46:15 2001
Received: from mailout01.sul.t-online.com ([194.25.134.80])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XSf0-00014z-00
for <[email-masked]>; Tue, 27 Feb 2001 07:46:15 +1300
Received: from fwd07.sul.t-online.com
by mailout01.sul.t-online.com with smtp
id 14XSft-0005G6-00; Mon, 26 Feb 2001 19:47:09 +0100
Received: from fuckup (049614688-0001@[217.80.112.131]) by fmrl07.sul.t-online.com
with esmtp id 14XSfm-0XixtIC; Mon, 26 Feb 2001 19:47:02 +0100
Received: from thomas by fuckup with local (Exim 3.22 #1 (Debian))
id 14XSlF-0001zE-00
for <[email-masked]>; Mon, 26 Feb 2001 19:52:41 +0100
Date: Mon, 26 Feb 2001 19:52:41 +0100
From: Thomas Strathmann <[email-masked]>
To: AVR-gcc Liste <[email-masked]>
Subject: Re: [avr-gcc-list] Suggestion: Split the list into two lists.
Message-ID: <20010226195240.A7633@fuckup>
Reply-To: Thomas Strathmann <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.15i
In-Reply-To: <[email-masked]>; from [email-masked] on Mon, Feb 26, 2001 at 02:42:20PM +0100
X-GPG-Fingerprint: BD19 3566 A822 8A48 4389 D54F 0391 7F38 FBF4 4B37
X-Operating-System: Debian GNU/Linux
X-Homepage: http://home.t-online.de/~thomas.strathmann
X-Sender: [email-masked]
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> This list contains mainly questions and answers easily devided into two
> nearly equal parts: Installing Q&A and programming Q&A.
>
> I suggest to make a new list:
> avr-gcc-install-list
>
> This makes it much easier to find answers to install questions and it
> keeps annoying (imho :) installquestions apart from the more interesting
> programming discussions.
>
> Any opinions?

Yes, but I would rather split this list into

avr-gcc-win
avr-gcc-native (or what else)

At least, I'd like anyone who posts on this list to put
a tag of some sort ([WIN] and [NAT] comes to mind) in front
of the mail's subject, so getting the interesting mails is
easier. Just my 2 cents.

Greets,
Thomas

--
Thomas S. Strathmann
http://home.t-online.de/~thomas.strathmann

From [email-masked] Tue Feb 27 09:16:30 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XU4B-000197-00
for <[email-masked]>; Tue, 27 Feb 2001 09:16:28 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.138])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id XAA20702;
Mon, 26 Feb 2001 23:17:00 +0300
To: [email-masked] (Joerg Wunsch)
Cc: [email-masked]
Subject: Re: [avr-gcc-list] What's wrong with this preprocessor statement
References: <[email-masked]> <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 26 Feb 2001 23:09:41 +0300
In-Reply-To: [email-masked]'s message of "Mon, 26 Feb 2001 10:43:20 +0100 (MET)"
Message-ID: <[email-masked]>
Lines: 19
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

[email-masked] (J Wunsch) writes:

> Uwe Bonnes <[email-masked]> wrote:
>
> > did you compile with optimization? Then perhaps the loop was
> > optimized away.
>
> ISTR a comment (somewhere in gcc's doc) that gcc never optimizes
> simple for() loops of the form:
>
> for (i = 0; i < NFOO; i++) ;
>
> because the compiler recognizes this as a form of a delay loop. Don't
> know whether this is also true for variations like while() loops of
> the same form.

Today it's not a true.
Now GCC can optimize out such loops.

From [email-masked] Tue Feb 27 09:18:17 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XU61-00019d-00
for <[email-masked]>; Tue, 27 Feb 2001 09:18:15 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.138])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id XAA20919;
Mon, 26 Feb 2001 23:18:51 +0300
To: Michel Catudal <[email-masked]>
Cc: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] GCC compile problems
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 26 Feb 2001 23:11:33 +0300
In-Reply-To: Michel Catudal's message of "Sun, 25 Feb 2001 22:38:10 -0500"
Message-ID: <[email-masked]>
Lines: 11
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Michel Catudal <[email-masked]> writes:

> I tried to compile gcc-20010205 and I get several errors.
> I installed avr-binutils-010225 , I've tried previous
> versions down to avr-binutils-010109 with identical results.
> After looking into the source of the binutils it seems
> to me that movw is not defined at all for the avr.

binutils snapshorts created from 2.10 branch.
You must use binutils from the CVS repository !!!

From [email-masked] Tue Feb 27 17:33:28 2001
Received: from email.netonecom.net ([209.172.26.13] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XbpI-0001U0-00
for <[email-masked]>; Tue, 27 Feb 2001 17:33:28 +1300
Received: from netonecom.net (catudal.netonecom.net [216.65.187.222])
by email.netonecom.net (8.11.2/8.11.0) with ESMTP id f1R4YDD03358
for <[email-masked]>; Mon, 26 Feb 2001 23:34:14 -0500 (EST)
Message-ID: <[email-masked]>
Date: Mon, 26 Feb 2001 23:33:52 -0500
From: Michel Catudal <[email-masked]>
Organization: Pas =?iso-8859-1?Q?organis=E9?= par Ti-Mou
X-Mailer: Mozilla 4.76 [Joual] (X11; U; Linux 2.2.16 i586)
X-Accept-Language: fr-CA, en-US
MIME-Version: 1.0
CC: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] GCC compile problems
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by email.netonecom.net id f1R4YDD03358
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Denis Chertykov a =E9crit :
>=20
> Michel Catudal <[email-masked]> writes:
>=20
> > I tried to compile gcc-20010205 and I get several errors.
> > I installed avr-binutils-010225 , I've tried previous
> > versions down to avr-binutils-010109 with identical results.
> > After looking into the source of the binutils it seems
> > to me that movw is not defined at all for the avr.
>=20
> binutils snapshorts created from 2.10 branch.
> You must use binutils from the CVS repository !!!
>=20

If I knew where that CVS repository of binutils is, that could be possibl=
e.

I do have the CVS of gcc

--=20
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://www.netonecom.net/~bbcat
We have all kinds of links
and many SuSE 7.0 Linux RPM packages

From [email-masked] Tue Feb 27 21:40:42 2001
Received: from odin.he.net ([216.218.181.2])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XfgX-0001e0-00
for <[email-masked]>; Tue, 27 Feb 2001 21:40:41 +1300
Received: from jpk1 (adsl-200.world-net.co.nz [210.55.228.200]) by odin.he.net (8.8.6/8.8.2) with SMTP id AAA23856 for <[email-masked]>; Tue, 27 Feb 2001 00:41:32 -0800
Date: Tue, 27 Feb 2001 00:41:32 -0800
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: Windows Eudora Light Version 1.5.2
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: [avr-gcc-list] CVS source for binutils
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>> binutils snapshorts created from 2.10 branch.
>> You must use binutils from the CVS repository !!!
>>
>
>If I knew where that CVS repository of binutils is, that could be possible.
>
>I do have the CVS of gcc

http://www.gnu.org/software/binutils/binutils.html

Details of binutils CVS are here

From [email-masked] Tue Feb 27 23:35:03 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XhTB-0001jE-00
for <[email-masked]>; Tue, 27 Feb 2001 23:35:02 +1300
Received: (from j@localhost)
by ida.interface-business.de id f1RAZvB60483;
Tue, 27 Feb 2001 11:35:57 +0100 (MET)
Date: Tue, 27 Feb 2001 11:35:57 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
<[email-masked]>
<[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] What's wrong with this preprocessor statement
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Denis Chertykov <[email-masked]> wrote:

> Today it's not a true.
> Now GCC can optimize out such loops.

Out of curiosity: when does gcc optimize them out? All versions of
gcc i tried (AVR, FreeBSD/i386, Linux/i386, Solaris/Sparc,
HP-UX/PA-RISC, all of them were 2.95.2 versions) don't optimize it
away in the following file, not even with -O3 (which implies
-fstrength-reduce, which is documented to perform the loop variable
elimination):

void
foo(void)
{
int i;

for (i = 0; i < 10000; i++) ;
}

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Wed Feb 28 00:07:24 2001
Received: from smtp.routing.net ([213.160.64.56])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XhyW-0001ky-00
for <[email-masked]>; Wed, 28 Feb 2001 00:07:24 +1300
Received: from mail.routing.net ([213.160.64.57]) by smtp.routing.net with Microsoft SMTPSVC(5.5.1877.447.44);
Tue, 27 Feb 2001 12:05:01 +0100
Received: from postbox.invers.com (62.227.42.143)
by mail.routing.net with MERCUR-SMTP/POP3/IMAP4-Server (v3.30.03 AS-0098316)
for <[email-masked]>; Tue, 27 Feb 2001 12:03:15 +0100
Received: from carsten (carsten.invers.com [192.168.2.17])
by postbox.invers.com (8.11.0/8.8.8) with SMTP id f1RAvqA22059
for <[email-masked]>; Tue, 27 Feb 2001 11:57:53 +0100
X-Authentication-Warning: postbox.invers.com: Host carsten.invers.com [192.168.2.17] claimed to be carsten
From: =?iso-8859-1?Q?Carsten_Ri=DFler?= <[email-masked]>
To: <[email-masked]>
Date: Tue, 27 Feb 2001 12:00:42 +0100
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Importance: Normal
Subject: [avr-gcc-list] C-Source Debugging with AVR Studio and GCC
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

After Compiling with the -g Option I'm now able to track thru my C-Source
while debugging with AVR Studio. Does anybody know HOWTO set watches on C
Variables with AVR-Studio 3.20 and avr-libc-2001125.
If it is possible I would like to know how to Change the Values while
debugging or how to add Watches on C Variables.
CU Carsten Rissler

From [email-masked] Wed Feb 28 04:07:01 2001
Received: from pop.sttl.uswest.net ([206.81.192.3] helo=sttlpop3.sttl.uswest.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14XliO-0001uj-00
for <[email-masked]>; Wed, 28 Feb 2001 04:07:00 +1300
Received: (qmail 15528 invoked by alias); 27 Feb 2001 15:07:55 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 15498 invoked by uid 0); 27 Feb 2001 15:07:54 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by pop.sttl.uswest.net with SMTP; 27 Feb 2001 15:07:54 -0000
Message-ID: <007b01c0a0cf$2e419be0$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] C-Source Debugging with AVR Studio and GCC
Date: Tue, 27 Feb 2001 07:07:04 -0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Can't do it with the avrobj produced by avr-objcopy. It is
a limitation of avr-objcopy.

Sometime in the next 6-8 months Astudio 4.x will come out
and support .elf directly. Then you should have full
debug/watch/data structures. Astudio 4.x *won't* support
the old avr-isp stuff. It will only support the STK500
programmer. That shouldn't be a big deal to anyone in this
group.

----- Original Message -----
From: "Carsten Rißler" <[email-masked]>

> After Compiling with the -g Option I'm now able to track
thru my C-Source
> while debugging with AVR Studio. Does anybody know HOWTO
set watches on C
> Variables with AVR-Studio 3.20 and avr-libc-2001125.
> If it is possible I would like to know how to Change the
Values while
> debugging or how to add Watches on C Variables.
> CU Carsten Rissler
>

From [email-masked] Wed Feb 28 04:07:01 2001
Received: from pop.sttl.uswest.net ([206.81.192.3] helo=sttlpop3.sttl.uswest.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14XliO-0001uk-00
for <[email-masked]>; Wed, 28 Feb 2001 04:07:01 +1300
Received: (qmail 15568 invoked by alias); 27 Feb 2001 15:07:56 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 15514 invoked by uid 0); 27 Feb 2001 15:07:55 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by pop.sttl.uswest.net with SMTP; 27 Feb 2001 15:07:55 -0000
Message-ID: <007c01c0a0cf$2e9d2960$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
Subject: Re: [avr-gcc-list] What's wrong with this preprocessor statement
Date: Tue, 27 Feb 2001 07:07:59 -0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Denis is probably referring to the 2.97 version...

----- Original Message -----
From: "J Wunsch" <[email-masked]>

> Denis Chertykov <[email-masked]> wrote:
>
> > Today it's not a true.
> > Now GCC can optimize out such loops.
>
> Out of curiosity: when does gcc optimize them out? All
versions of
> gcc i tried (AVR, FreeBSD/i386, Linux/i386, Solaris/Sparc,
> HP-UX/PA-RISC, all of them were 2.95.2 versions) don't
optimize it
> away in the following file, not even with -O3 (which
implies
> -fstrength-reduce, which is documented to perform the loop
variable
> elimination):

From [email-masked] Wed Feb 28 04:39:13 2001
Received: from nuustak.csir.co.za ([146.64.10.11])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XmDX-0001x1-00
for <[email-masked]>; Wed, 28 Feb 2001 04:39:12 +1300
Received: from CS-IMO.CSIR.CO.ZA (cs-imo.csir.co.za [146.64.10.94])
by nuustak.csir.co.za (8.10.1/8.10.1) with SMTP id f1RFdkj04311
for <[email-masked]>; Tue, 27 Feb 2001 17:39:47 +0200 (SAT)
Disclaimer: The CSIR exercises no editorial control over E-mail
messages originating in the organisation and the views in this
message are therefore not necessarily those of the CSIR and/or
its employees.
Received: from GW-IMO-Message_Server by CS-IMO.CSIR.CO.ZA
with Novell_GroupWise; Tue, 27 Feb 2001 17:39:46 +0200
Message-Id: <[email-masked]>
X-Mailer: Novell GroupWise Internet Agent 5.5.4.1
Date: Tue, 27 Feb 2001 17:39:23 +0200
From: "Peter Bosscha" <[email-masked]>
To: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="=_510AFD52.53325F65"
Subject: [avr-gcc-list] avr-gcc bug (Win)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a MIME message. If you are reading this text, you may want to
consider changing to a mail reader or gateway that understands how to
properly handle MIME multipart messages.

--=_510AFD52.53325F65
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hi,

Found a bug in branch logic together with the BRGE instruction.=20
I'm using avr-libc-20010211 and -O2 and -Os give the same (erroneous) =
result.
Tried to simplify this as much as possible so the code is a joke.

Have a look at the following:

unsigned char mycall(unsigned char parm)
{
return 0x80;
}

int main(void)
{
unsigned char i,a,b;

a=3Dmycall(0);
b=3Dmycall(1);
do {
if (a) {
i =3D mycall(0);
if (i & 0x80) {
mycall(1);
} else {
if (b) {
mycall(2);
}
}
}
} while(1);
return 1;
}

In this example the jump at if (i & 0x80) goes the wrong way.

- Change the statement to if (i) and the problem goes away
- Change the nesting level (comment out the outer do-while) and the =
problem goes away
- Take out the if (b) and the problem goes away

Changing the outer while into for(;;) does not help either.

So ... 2 questions:

- is everyone else getting this too ?
- if so, where to report this ?

Greetings
Peter Bosscha

P.S. The Mime bit is not my idea, talk to my Sysadmin if you don't like =
it..

--=_510AFD52.53325F65
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Description: HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1"=
>
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR></HEAD>
<BODY style=3D"MARGIN-TOP: 2px; FONT: 10pt Arial; MARGIN-LEFT: 2px"=20
bgColor=3D#ffffff>
<DIV>Hi,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Found a bug in branch logic&nbsp;together with the BRGE instruction. =
</DIV>
<DIV>I'm using avr-libc-20010211 and&nbsp;-O2 and -Os give the same =
(erroneous)=20
result.</DIV>
<DIV>
<DIV>Tried to simplify this as much as possible so the code is a=20
joke.</DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>Have a look at the following:</DIV>
<DIV>&nbsp;</DIV>
<DIV>unsigned char mycall(unsigned char parm)<BR>{<BR>&nbsp;return=20
0x80;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>int main(void)<BR>{<BR>unsigned char i,a,b;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;a=3Dmycall(0);<BR>&nbsp;b=3Dmycall(1);<BR>&nbsp;do {<BR>&nbsp;&n=
bsp;if=20
(a) {<BR>&nbsp;&nbsp;&nbsp;i =3D mycall(0);<BR>&nbsp;&nbsp;&nbsp;if (i =
&amp; 0x80)=20
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;mycall(1);<BR>&nbsp;&nbsp;&nbsp;} else=20
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;if (b)=20
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mycall(2);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<=
BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;}<BR>&nbsp;}=20
while(1);<BR>&nbsp;return 1;<BR>}<BR></DIV>
<DIV>In this example the jump at if (i &amp; 0x80) goes the wrong =
way.</DIV>
<DIV>&nbsp;</DIV>
<DIV>- Change the statement to if (i) and the problem goes away</DIV>
<DIV>- Change the nesting level (comment out the outer do-while) and the =
problem=20
goes away</DIV>
<DIV>- Take out the if (b) and the problem goes away</DIV>
<DIV>&nbsp;</DIV>
<DIV>Changing the outer while into for(;;) does not help either.</DIV>
<DIV>&nbsp;</DIV>
<DIV>So ... 2 questions:</DIV>
<DIV>&nbsp;</DIV>
<DIV>- is everyone else getting this too ?</DIV>
<DIV>-&nbsp;if so, where to report this ?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Greetings</DIV>
<DIV>Peter Bosscha</DIV>
<DIV>&nbsp;</DIV>
<DIV>P.S. The Mime bit is not my idea, talk to my Sysadmin if you don't =
like=20
it..</DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

--=_510AFD52.53325F65--

From [email-masked] Wed Feb 28 10:31:32 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XriU-0002E0-00
for <[email-masked]>; Wed, 28 Feb 2001 10:31:31 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.145])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id AAA28251;
Wed, 28 Feb 2001 00:32:25 +0300
To: "Peter Bosscha" <[email-masked]>
Cc: <[email-masked]>
Subject: Re: [avr-gcc-list] avr-gcc bug (Win)
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 28 Feb 2001 00:25:06 +0300
In-Reply-To: "Peter Bosscha"'s message of "Tue, 27 Feb 2001 17:39:23 +0200"
Message-ID: <[email-masked]>
Lines: 93
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Peter Bosscha" <[email-masked]> writes:

> Content-type: text/plain ; charset = US-ASCII
>
> Hi,
>
> Found a bug in branch logic together with the BRGE instruction.
> I'm using avr-libc-20010211 and -O2 and -Os give the same (erroneous) result.
> Tried to simplify this as much as possible so the code is a joke.
>
> Have a look at the following:
>
> unsigned char mycall(unsigned char parm)
> {
> return 0x80;
> }
>
> int main(void)
> {
> unsigned char i,a,b;
>
> a=mycall(0);
> b=mycall(1);
> do {
> if (a) {
> i = mycall(0);
> if (i & 0x80) {
> mycall(1);
> } else {
> if (b) {
> mycall(2);
> }
> }
> }
> } while(1);
> return 1;
> }
>
> In this example the jump at if (i & 0x80) goes the wrong way.

Point me to a wrong place in generated code.
My avr-gcc (CVS version) generates:

.global main
.type main,@function
main:
/* prologue: frame size=0 */
ldi r28,lo8(__stack - 0)
ldi r29,hi8(__stack - 0)
out __SP_H__,r29
out __SP_L__,r28
/* prologue end (size=4) */
ldi r24,lo8(0)
rcall mycall
mov r29,r24
ldi r24,lo8(1)
rcall mycall
mov r28,r24
.L11:
tst r29
breq .L11
ldi r24,lo8(0)
rcall mycall
tst r24
brlt .L12
tst r28
brne .L13
rjmp .L11
.L12:
ldi r24,lo8(1)
rcall mycall
rjmp .L11
.L13:
ldi r24,lo8(2)
rcall mycall
rjmp .L11
/* epilogue: frame size=0 */
__stop_progIi__:
rjmp __stop_progIi__
/* epilogue end (size=1) */
/* function main size 27 (22) */

> So ... 2 questions:
>
> - is everyone else getting this too ?

Few weeks ago I have corrected such bug in GCC CVS.
I can't understand why I read bug reports about it.

> - if so, where to report this ?

This mailing list si a right place.

From [email-masked] Wed Feb 28 10:31:41 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Xrid-0002E5-00
for <[email-masked]>; Wed, 28 Feb 2001 10:31:40 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.145])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id AAA28259;
Wed, 28 Feb 2001 00:32:37 +0300
To: "Peter Bosscha" <[email-masked]>
Cc: <[email-masked]>
Subject: Re: [avr-gcc-list] avr-gcc bug (Win)
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
In-Reply-To: "Peter Bosscha"'s message of "Tue, 27 Feb 2001 17:39:23 +0200"
X-Mailer: Gnus v5.7/Emacs 20.4
Date: 28 Feb 2001 00:25:18 +0300
Message-ID: <[email-masked]>
Lines: 93
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Peter Bosscha" <[email-masked]> writes:

> Content-type: text/plain ; charset = US-ASCII
>
> Hi,
>
> Found a bug in branch logic together with the BRGE instruction.
> I'm using avr-libc-20010211 and -O2 and -Os give the same (erroneous) result.
> Tried to simplify this as much as possible so the code is a joke.
>
> Have a look at the following:
>
> unsigned char mycall(unsigned char parm)
> {
> return 0x80;
> }
>
> int main(void)
> {
> unsigned char i,a,b;
>
> a=mycall(0);
> b=mycall(1);
> do {
> if (a) {
> i = mycall(0);
> if (i & 0x80) {
> mycall(1);
> } else {
> if (b) {
> mycall(2);
> }
> }
> }
> } while(1);
> return 1;
> }
>
> In this example the jump at if (i & 0x80) goes the wrong way.

Point me to a wrong place in generated code.
My avr-gcc (CVS version) generates:

.global main
.type main,@function
main:
/* prologue: frame size=0 */
ldi r28,lo8(__stack - 0)
ldi r29,hi8(__stack - 0)
out __SP_H__,r29
out __SP_L__,r28
/* prologue end (size=4) */
ldi r24,lo8(0)
rcall mycall
mov r29,r24
ldi r24,lo8(1)
rcall mycall
mov r28,r24
.L11:
tst r29
breq .L11
ldi r24,lo8(0)
rcall mycall
tst r24
brlt .L12
tst r28
brne .L13
rjmp .L11
.L12:
ldi r24,lo8(1)
rcall mycall
rjmp .L11
.L13:
ldi r24,lo8(2)
rcall mycall
rjmp .L11
/* epilogue: frame size=0 */
__stop_progIi__:
rjmp __stop_progIi__
/* epilogue end (size=1) */
/* function main size 27 (22) */

> So ... 2 questions:
>
> - is everyone else getting this too ?

Few weeks ago I have corrected such bug in GCC CVS.
I can't understand why I read bug reports about it.

> - if so, where to report this ?

This mailing list is a right place.

From [email-masked] Wed Feb 28 10:31:50 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Xrim-0002EA-00
for <[email-masked]>; Wed, 28 Feb 2001 10:31:49 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.145])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id AAA28274;
Wed, 28 Feb 2001 00:32:46 +0300
To: [email-masked] (Joerg Wunsch)
Cc: [email-masked]
Subject: Re: [avr-gcc-list] What's wrong with this preprocessor statement
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 28 Feb 2001 00:25:27 +0300
In-Reply-To: [email-masked]'s message of "Tue, 27 Feb 2001 11:35:57 +0100 (MET)"
Message-ID: <[email-masked]>
Lines: 42
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

[email-masked] (J Wunsch) writes:

> Denis Chertykov <[email-masked]> wrote:
>
> > Today it's not a true.
> > Now GCC can optimize out such loops.
>
> Out of curiosity: when does gcc optimize them out? All versions of
> gcc i tried (AVR, FreeBSD/i386, Linux/i386, Solaris/Sparc,
> HP-UX/PA-RISC, all of them were 2.95.2 versions) don't optimize it
> away in the following file, not even with -O3 (which implies
> -fstrength-reduce, which is documented to perform the loop variable
> elimination):
>
> void
> foo(void)
> {
> int i;
>
> for (i = 0; i < 10000; i++) ;
> }

Current avr-gcc (CVS version) generates:

.global foo
.type foo,@function
foo:
/* prologue: frame size=0 */
/* prologue end (size=0) */
ldi r24,lo8(9999)
ldi r25,hi8(9999)
.L7:
subi r24,lo8(-(-625)) <---------- Will be executed only 16 times
sbci r25,hi8(-(-625)) <----------
brpl .L7
/* epilogue: frame size=0 */
ret
/* epilogue end (size=1) */
/* function foo size 7 (6) */
.Lfe2:
.size foo,.Lfe2-foo

From [email-masked] Wed Feb 28 12:00:58 2001
Received: from sttlpop5.sttl.uswest.net ([206.81.192.5])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14Xt73-0002Im-00
for <[email-masked]>; Wed, 28 Feb 2001 12:00:57 +1300
Received: (qmail 3988 invoked by alias); 27 Feb 2001 22:57:45 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 22058 invoked by uid 0); 27 Feb 2001 22:53:27 -0000
Received: from ssdslppp170.sttl.uswest.net (HELO larry) (216.160.111.170)
by sttlpop5.sttl.uswest.net with SMTP; 27 Feb 2001 22:53:27 -0000
Message-ID: <003f01c0a110$388bab40$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]> <[email-masked]>
Date: Tue, 27 Feb 2001 14:50:46 -0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Reporting bugs
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

When reporting bugs include as much relevant information as
possible. Since Denis is the guy fixing bugs and, as far as
I can see, doing it gratis, it is our job to make his job as
easy as possible.

1. stripped down sample code and possibly the resulting
assembly code.
2. version of compiler being used ( 'avr-gcc -v' will tell
you )
3. If it is a library problem, then that version.

If you don't know the exact version, like me, then at least
say where and when you got it from.

So, is CVS the version of avr-gcc what we should be using?
Or is it safer to stick with a major release, like 2.97
20010108 (Gunnar's win/linux release)? Or, is that the
latest?

Cheers!

From [email-masked] Wed Feb 28 16:27:53 2001
Received: from email.netonecom.net ([209.172.26.13] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XxHM-0002T9-00
for <[email-masked]>; Wed, 28 Feb 2001 16:27:53 +1300
Received: from netonecom.net (catudal.netonecom.net [216.65.187.222])
by email.netonecom.net (8.11.2/8.11.0) with ESMTP id f1S3SnO07206
for <[email-masked]>; Tue, 27 Feb 2001 22:28:50 -0500 (EST)
Message-ID: <[email-masked]>
Date: Tue, 27 Feb 2001 22:28:20 -0500
From: Michel Catudal <[email-masked]>
Organization: Pas =?iso-8859-1?Q?organis=E9?= par Ti-Mou
X-Mailer: Mozilla 4.76 [Joual] (X11; U; Linux 2.2.16 i586)
X-Accept-Language: fr-CA, en-US
MIME-Version: 1.0
CC: [email-masked]
Subject: Re: [avr-gcc-list] CVS source for binutils
References: <[email-masked]>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by email.netonecom.net id f1S3SnO07206
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Jason Kyle a =E9crit :
>=20
> >> binutils snapshorts created from 2.10 branch.
> >> You must use binutils from the CVS repository !!!
> >>
> >
> >If I knew where that CVS repository of binutils is, that could be poss=
ible.
> >
> >I do have the CVS of gcc
>=20
> http://www.gnu.org/software/binutils/binutils.html
>=20

Thank you but that won't help me, they link to RedHat
I allready downloaded the binutils from there this morning.

I downloaded the CVS tree of gcc=20

I set CVSROOT to
:pserver:[email-masked]:/cvs/gcc

cvs -z 9 cp gcc
which downloaded the whole tree of gcc

I used these commands

cvs -z 9 -d :pserver:[email-masked]:/cvs/src login
enter "anoncvs" as login
cvs -z 9 -d :pserver:[email-masked]:/cvs/src co binutils =
=20

The results of compile are absolutely identical just like I showed in a p=
revious
message.

in gcc/config/avr/avr.c
I had to do the exact same changes as I made in the released snapshots to=
get
the gcc to compile. I am still getting the same error message being an un=
defined
movw.=20

That would imply that some file have been trashed at some time and no one=
noticed
because they allready have a working tree at home or are not checking the=
avr portion
at all in the new packages.

I am running SuSE 7.0 on a K6 550Mhz, 60G of hard disks (57G for Linux an=
d 3G for winblows)
and 128M of ram.

void
asm_file_start (file)
FILE *file;
{
output_file_directive (file, main_input_filename);
// fprintf (file, "\t.arch %s\n", avr_mcu_name); <--- Commenting this r=
emove allready defined avr3 messages
fputs ("__SREG__ =3D 0x3f\n"
"__SP_H__ =3D 0x3e\n"
"__SP_L__ =3D 0x3d\n", file);
=20
fputs ("__tmp_reg__ =3D r0\n" <---- it was 0 instead of r0
"__zero_reg__ =3D r1\n" <---- it was 1 instead of r1
"_PC_ =3D 2\n", file);
=20
commands_in_file =3D 0;
commands_in_prologues =3D 0;
commands_in_epilogues =3D 0;
} =
=20

--=20
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://www.netonecom.net/~bbcat
We have all kinds of links
and many SuSE 7.0 Linux RPM packages

From [email-masked] Wed Feb 28 16:48:29 2001
Received: from sys32.hou.wt.net ([205.230.159.32])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14XxbJ-0002UI-00
for <[email-masked]>; Wed, 28 Feb 2001 16:48:29 +1300
Received: from mjones233 (216-119-137-128.ipset17.wt.net [216.119.137.128])
by sys32.hou.wt.net (8.9.1/8.9.1) with SMTP id VAA07382
for <[email-masked]>; Tue, 27 Feb 2001 21:49:36 -0600 (CST)
Message-ID: <008301c0a139$45aac080$74626262@mjones233>
From: "Mike Jones" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]> <[email-masked]>
Subject: Re: [avr-gcc-list] avr-gcc bug (Win)
Date: Tue, 27 Feb 2001 21:48:10 -0600
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

here is what I get using a slightly modified makefile from Volker's test
suite (uses -o3) and the latest windows32 version downloaded from
http://combio.de/avr

Notice that R28 and R29 have apparently swapped function and in line 92 it
uses "brge" instead of "brlt". Otherwise they look the same.

Obviously, this code is not generated by the same version of the compiler. I
did remove lots of extraneous lines of AS source to make the code stand out
better, including the C source that was inserted as comments.

1 .file "test.c"
2 .arch at90s8515
3 __SREG__ = 0x3f
4 __SP_H__ = 0x3e
5 __SP_L__ = 0x3d
6 __tmp_reg__ = 0
7 __zero_reg__ = 1
8 _PC_ = 2
40 .LM1:
44 .LM2:
45 0000 80E8 ldi r24,lo8(128)
46 0002 90E0 ldi r25,hi8(128)
48 .LM3:
53 .Lfe1:
60 main:
62 .LM4:
64 0006 C0E0 ldi r28,lo8(__stack - 0)
65 0008 D0E0 ldi r29,hi8(__stack - 0)
66 000a DEBF out __SP_H__,r29
67 000c CDBF out __SP_L__,r28
70 .LM5:
71 .LBB2:
72 000e 80E0 ldi r24,lo8(0)
73 0010 F7DF rcall mycall
74 0012 C82F mov r28,r24
76 .LM6:
77 0014 81E0 ldi r24,lo8(1)
78 0016 F4DF rcall mycall
79 0018 D82F mov r29,r24
80 .L11:
82 .LM7:
83 001a CC23 tst r28
84 001c F1F3 breq .L11
86 .LM8:
87 001e 80E0 ldi r24,lo8(0)
88 0020 EFDF rcall mycall
90 .LM9:
91 0022 8823 tst r24
92 0024 1CF4 brge .L12
94 .LM10:
95 0026 DD23 tst r29
96 0028 21F4 brne .L13
97 002a F7CF rjmp .L11
99 .LM11:
100 .L12:
101 002c 81E0 ldi r24,lo8(1)
102 002e E8DF rcall mycall
103 0030 F4CF rjmp .L11
105 .LM12:
106 .L13:
107 0032 82E0 ldi r24,lo8(2)
108 0034 E5DF rcall mycall
110 .LM13:
111 0036 F1CF rjmp .L11
112 .LBE2:
114 __stop_progIi__:
115 0038 FFCF rjmp __stop_progIi__

Mike

----- Original Message -----
From: "Denis Chertykov" <[email-masked]>
To: "Peter Bosscha" <[email-masked]>
Cc: <[email-masked]>
Sent: Tuesday, February 27, 2001 3:25 PM
Subject: Re: [avr-gcc-list] avr-gcc bug (Win)

> "Peter Bosscha" <[email-masked]> writes:
>
> > Content-type: text/plain ; charset = US-ASCII
> >
> > Hi,
> >
> > Found a bug in branch logic together with the BRGE instruction.
> > I'm using avr-libc-20010211 and -O2 and -Os give the same (erroneous)
result.
> > Tried to simplify this as much as possible so the code is a joke.
> >
> > Have a look at the following:
> >
> > unsigned char mycall(unsigned char parm)
> > {
> > return 0x80;
> > }
> >
> > int main(void)
> > {
> > unsigned char i,a,b;
> >
> > a=mycall(0);
> > b=mycall(1);
> > do {
> > if (a) {
> > i = mycall(0);
> > if (i & 0x80) {
> > mycall(1);
> > } else {
> > if (b) {
> > mycall(2);
> > }
> > }
> > }
> > } while(1);
> > return 1;
> > }
> >
> > In this example the jump at if (i & 0x80) goes the wrong way.
>
> Point me to a wrong place in generated code.
> My avr-gcc (CVS version) generates:
>
>
> .global main
> .type main,@function
> main:
> /* prologue: frame size=0 */
> ldi r28,lo8(__stack - 0)
> ldi r29,hi8(__stack - 0)
> out __SP_H__,r29
> out __SP_L__,r28
> /* prologue end (size=4) */
> ldi r24,lo8(0)
> rcall mycall
> mov r29,r24
> ldi r24,lo8(1)
> rcall mycall
> mov r28,r24
> .L11:
> tst r29
> breq .L11
> ldi r24,lo8(0)
> rcall mycall
> tst r24
> brlt .L12
> tst r28
> brne .L13
> rjmp .L11
> .L12:
> ldi r24,lo8(1)
> rcall mycall
> rjmp .L11
> .L13:
> ldi r24,lo8(2)
> rcall mycall
> rjmp .L11
> /* epilogue: frame size=0 */
> __stop_progIi__:
> rjmp __stop_progIi__
> /* epilogue end (size=1) */
> /* function main size 27 (22) */
>
> > So ... 2 questions:
> >
> > - is everyone else getting this too ?
>
> Few weeks ago I have corrected such bug in GCC CVS.
> I can't understand why I read bug reports about it.
>
> > - if so, where to report this ?
>
> This mailing list si a right place.
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Wed Feb 28 22:07:31 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Y2a0-0002gh-00
for <[email-masked]>; Wed, 28 Feb 2001 22:07:29 +1300
Received: from mm.amelek.gda.pl ([192.168.1.1] ident=mail)
by alf.amelek.gda.pl with esmtp (Exim 3.16 #1 (Debian))
id 14Y2ZT-00023P-00; Wed, 28 Feb 2001 10:06:55 +0100
Received: from marekm by mm.amelek.gda.pl with local (Exim 3.22 #1 (Debian))
id 14Y2ZT-0001Yo-00; Wed, 28 Feb 2001 10:06:55 +0100
Date: Wed, 28 Feb 2001 10:06:55 +0100
To: Mike Jones <[email-masked]>
Cc: [email-masked], [email-masked]
Subject: Re: [avr-gcc-list] avr-gcc bug (Win)
Message-ID: <[email-masked]>
References: <[email-masked]> <[email-masked]> <008301c0a139$45aac080$74626262@mjones233>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.15i
In-Reply-To: <008301c0a139$45aac080$74626262@mjones233>; from [email-masked] on Tue, Feb 27, 2001 at 09:48:10PM -0600
From: Marek Michalkiewicz <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

On Tue, Feb 27, 2001 at 09:48:10PM -0600, Mike Jones wrote:
> here is what I get using a slightly modified makefile from Volker's test
> suite (uses -o3) and the latest windows32 version downloaded from
> http://combio.de/avr

That's the problem - I still see gcc-20010108 there, and this bug has
been fixed in CVS later (2001-01-21).
Cc: [email-masked] - please update to a newer version (yes I know
gcc is so big, but this was a serious bug which has bitten me too).

Hope this helps,
Marek

PS. to Mike Jones - please fix your mailer config, charset "Windows-1252"
is illegal :). (we have the same problem here in Poland, lots of people
send mails in windows-1250 instead of the correct iso-8859-2 standard,
M$ let you choose either one but windows-* is unfortunately the default)

From [email-masked] Wed Feb 28 23:20:22 2001
Received: from nuustak.csir.co.za ([146.64.10.11])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Y3iR-0002kJ-00
for <[email-masked]>; Wed, 28 Feb 2001 23:20:16 +1300
Received: from CS-IMO.CSIR.CO.ZA (cs-imo.csir.co.za [146.64.10.94])
by nuustak.csir.co.za (8.10.1/8.10.1) with SMTP id f1SALBj08011
for <[email-masked]>; Wed, 28 Feb 2001 12:21:11 +0200 (SAT)
Disclaimer: The CSIR exercises no editorial control over E-mail
messages originating in the organisation and the views in this
message are therefore not necessarily those of the CSIR and/or
its employees.
Received: from GW-IMO-Message_Server by CS-IMO.CSIR.CO.ZA
with Novell_GroupWise; Wed, 28 Feb 2001 12:21:10 +0200
Message-Id: <[email-masked]>
X-Mailer: Novell GroupWise Internet Agent 5.5.4.1
Date: Wed, 28 Feb 2001 12:20:50 +0200
From: "Peter Bosscha" <[email-masked]>
To: <[email-masked]>
Cc: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="=_1942B206.55345951"
Subject: [avr-gcc-list] avr-gcc bug - Part 2
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a MIME message. If you are reading this text, you may want to
consider changing to a mail reader or gateway that understands how to
properly handle MIME multipart messages.

--=_1942B206.55345951
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Please be aware that I'm using Win NT, downloaded my stuff from:

http://combio.de/avr/ (Also pointed to from www.avrfreaks.net)
=20
Tried to change processors that did not help either.
My code looks as follows:

.global main
main:
/* prologue: frame size=3D0 */
ldi r28,lo8(__stack - 0)
ldi r29,hi8(__stack - 0)
out __SP_H__,r29
out __SP_L__,r28
/* prologue end (size=3D4) */
ldi r24,lo8(0)
rcall mycall
mov r28,r24
ldi r24,lo8(1)
rcall mycall
mov r29,r24
.L11:
tst r28
breq .L11
ldi r24,lo8(0)
rcall mycall
tst r24
brge .L12
tst r29
brne .L13
rjmp .L11
.L12:
ldi r24,lo8(1)
rcall mycall
rjmp .L11
.L13:
ldi r24,lo8(2)
rcall mycall
rjmp .L11
__stop_progIi__:
rjmp __stop_progIi__
/* epilogue end (size=3D1) */
/* function main size 27 (22) */

Differences between this code and Dennis's are:
- registers handling (R28 / R29)
- BRGE instruction instead of BRLT

The only possible solution in my mind is that the fix has not found its =
way from Linux into the Windows version.

--=_1942B206.55345951
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Description: HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1"=
>
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR></HEAD>
<BODY style=3D"MARGIN-TOP: 2px; FONT: 10pt Arial; MARGIN-LEFT: 2px"=20
bgColor=3D#ffffff>
<DIV>Please be aware that I'm using Win NT, downloaded my stuff from:</DIV>=

<DIV>&nbsp;</DIV>
<DIV><A href=3D"http://combio.de/avr/">http://combio.de/avr/</A>&nbsp;(Also=
=20
pointed to from <A href=3D"http://www.avrfreaks.net">www.avrfreaks.net</A>)=
</DIV>
<DIV>&nbsp;</DIV>
<DIV>Tried to change processors that did not help either.</DIV>
<DIV>My code looks as follows:</DIV>
<DIV>&nbsp;</DIV>
<DIV>.global&nbsp;main<BR>main:<BR>/* prologue: frame size=3D0=20
*/<BR>&nbsp;&nbsp;&nbsp;&nbsp; ldi r28,lo8(__stack -=20
0)<BR>&nbsp;&nbsp;&nbsp;&nbsp; ldi r29,hi8(__stack -=20
0)<BR>&nbsp;&nbsp;&nbsp;&nbsp; out __SP_H__,r29<BR>&nbsp;&nbsp;&nbsp;&nbsp;=
out=20
__SP_L__,r28<BR>/* prologue end (size=3D4) */<BR>&nbsp;&nbsp;&nbsp;&nbsp; =
ldi=20
r24,lo8(0)<BR>&nbsp;&nbsp;&nbsp;&nbsp; rcall mycall<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;=20
mov r28,r24<BR>&nbsp;&nbsp;&nbsp;&nbsp; ldi=20
r24,lo8(1)<BR>&nbsp;&nbsp;&nbsp;&nbsp; rcall mycall<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;=20
mov r29,r24<BR>.L11:<BR>&nbsp;&nbsp;&nbsp;&nbsp; tst=20
r28<BR>&nbsp;&nbsp;&nbsp;&nbsp; breq .L11<BR>&nbsp;&nbsp;&nbsp;&nbsp; =
ldi=20
r24,lo8(0)<BR>&nbsp;&nbsp;&nbsp;&nbsp; rcall mycall<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;=20
tst r24<BR>&nbsp;&nbsp;&nbsp;&nbsp; brge .L12<BR>&nbsp;&nbsp;&nbsp;&nbsp; =
tst=20
r29<BR>&nbsp;&nbsp;&nbsp;&nbsp; brne .L13<BR>&nbsp;&nbsp;&nbsp;&nbsp; =
rjmp=20
.L11<BR>.L12:<BR>&nbsp;&nbsp;&nbsp;&nbsp; ldi=20
r24,lo8(1)<BR>&nbsp;&nbsp;&nbsp;&nbsp; rcall mycall<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;=20
rjmp .L11<BR>.L13:<BR>&nbsp;&nbsp;&nbsp;&nbsp; ldi=20
r24,lo8(2)<BR>&nbsp;&nbsp;&nbsp;&nbsp; rcall mycall<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;=20
rjmp .L11<BR>__stop_progIi__:<BR>&nbsp;&nbsp;&nbsp;&nbsp; rjmp=20
__stop_progIi__<BR>/* epilogue end (size=3D1) */<BR>/* function main size =
27 (22)=20
*/</DIV>
<DIV>&nbsp;</DIV>
<DIV>Differences between this code and Dennis's are:</DIV>
<DIV>-&nbsp;registers handling (R28 / R29)</DIV>
<DIV>-&nbsp;BRGE instruction instead of&nbsp;BRLT</DIV>
<DIV>&nbsp;</DIV>
<DIV>The only possible solution&nbsp;in my mind is that the fix has not =
found=20
its way from Linux into the Windows version.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

--=_1942B206.55345951--

From [email-masked] Thu Mar 01 06:13:42 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14YAAX-00030O-00
for <[email-masked]>; Thu, 01 Mar 2001 06:13:41 +1300
Received: from oTRIs.de (DHCP27.o3s.de [192.168.2.126])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id SAA15642
for <[email-masked]>; Wed, 28 Feb 2001 18:14:35 +0100
Message-ID: <[email-masked]>
Date: Wed, 28 Feb 2001 18:14:34 +0100
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] New linux binaries available
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I got a CVS snapshot of today and compiled binutils, gcc and avr-libc.
They are on my download page
http://www.combio.de/avr/index.html

This version is completely untested.

I have difficulties in patching the CVS Sources with the avrobj-patch.
When I get it to work I will inform you.

Meanwhile you can try it yourself, the sources are also on my page. ;-)

Greetings

Gunnar

From [email-masked] Thu Mar 01 09:50:15 2001
Received: from sttlpop2.sttl.uswest.net ([206.81.192.2])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14YDY6-0003Cx-00
for <[email-masked]>; Thu, 01 Mar 2001 09:50:14 +1300
Received: (qmail 91298 invoked by alias); 28 Feb 2001 20:51:14 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 90983 invoked by uid 0); 28 Feb 2001 20:51:08 -0000
Received: from dslppp-gw4-d8.sttl.uswest.net (HELO larry) (216.160.110.8)
by sttlpop2.sttl.uswest.net with SMTP; 28 Feb 2001 20:51:08 -0000
Message-ID: <003b01c0a1c8$4e17fd20$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "avrx" <[email-masked]>,
"AVR GCC List" <[email-masked]>,
<[email-masked]>
Date: Wed, 28 Feb 2001 12:48:50 -0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] new version of AvrX released
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I re-worked AvrX for the 2.97 release of avr-gcc at Gunnar
Henne's site. A zip file of kernel, samples and test cases
is out at http://www.barello.net/avrx

AvrX is a very stripped down RTOS for the AVR processors.
Some 35 API supporting Task management, Single step,
semaphores, message queues and timer queue. Fully
pre-emptive and interrupt driven, fully supports avr-gcc in
both tasks and interrupt handlers. ~800 words complete.
Less for typical applications that don't use all features.
It is practical to have 4 tasks running concurrently on an
8515 w/512 bytes of sram.

I am using the new code base in my robotics projects and it
seems stable. I have not yet gone through all test and
sample code - for example the makefiles have not been
updated to reflect the avr-objcopy problems when emitting
eeprom files...

Cheers!

Larry Barello
http://www.barello.net

From [email-masked] Thu Mar 01 14:22:53 2001
Received: from email.netonecom.net ([209.172.26.13] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14YHnw-0003Nt-00
for <[email-masked]>; Thu, 01 Mar 2001 14:22:53 +1300
Received: from netonecom.net (catudal.netonecom.net [216.65.187.222])
by email.netonecom.net (8.11.2/8.11.0) with ESMTP id f211Nrd23996
for <[email-masked]>; Wed, 28 Feb 2001 20:23:53 -0500 (EST)
Message-ID: <[email-masked]>
Date: Wed, 28 Feb 2001 20:23:17 -0500
From: Michel Catudal <[email-masked]>
Organization: Pas =?iso-8859-1?Q?organis=E9?= par Ti-Mou
X-Mailer: Mozilla 4.76 [Joual] (X11; U; Linux 2.2.16 i586)
X-Accept-Language: fr-CA, en-US
MIME-Version: 1.0
CC: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] New linux binaries available
References: <[email-masked]>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by email.netonecom.net id f211Nrd23996
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Gunnar Henne a =E9crit :
>=20
> Hello,
>=20
> I got a CVS snapshot of today and compiled binutils, gcc and avr-libc.
> They are on my download page
> http://www.combio.de/avr/index.html
>=20
> This version is completely untested.
>=20
> I have difficulties in patching the CVS Sources with the avrobj-patch.
> When I get it to work I will inform you.
>=20
> Meanwhile you can try it yourself, the sources are also on my page. ;-)
>=20
> Greetings
>=20
> Gunnar
>=20

I am puzzled as to how you managed to compile this. I compiled and instal=
led=20
binutils but the gcc doesn't compile. It barfs before finishing. What is
your secret? or are you ignoring some errors?

--=20
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://www.netonecom.net/~bbcat
We have all kinds of links
and many SuSE 7.0 Linux RPM packages

From [email-masked] Thu Mar 01 21:07:04 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14YO74-0003d7-00
for <[email-masked]>; Thu, 01 Mar 2001 21:07:02 +1300
Received: from oTRIs.de (DHCP27.o3s.de [192.168.2.126])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id JAA09981
for <[email-masked]>; Thu, 1 Mar 2001 09:08:07 +0100
Message-ID: <[email-masked]>
Date: Thu, 01 Mar 2001 09:08:06 +0100
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by o3s.o3s.de id JAA09981
Subject: [avr-gcc-list] Re: New linux binaries available
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Salut Michel

Michel Catudal a =E9crit:

> I am puzzled as to how you managed to compile this. I compiled and inst=
alled
> binutils but the gcc doesn't compile. It barfs before finishing. What i=
s
> your secret?

A good magician never tells his secrets. ;-)

>or are you ignoring some errors?

This is it. The compilation fails for some not needed parts. You can
ignore this und just make install, which will run through without
errors.

You can download the spec file from my page to build a RH7 RPM.

Greetings

Gunnar

--=20
Gunnar Henne Email: [email-masked]
oTRIs GmbH & Co. KG Tel. : 0231 / 10616-21
Landgrafenstr. 153 Fax. : 0231 / 10615-44
44139 Dortmund

From [email-masked] Fri Mar 02 00:09:58 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14YQy5-0003l9-00
for <[email-masked]>; Fri, 02 Mar 2001 00:09:58 +1300
Received: (qmail 29412 invoked from network); 1 Mar 2001 11:12:51 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 1 Mar 2001 11:12:51 -0000
Received: from fri.uni-lj.si ([193.2.76.118]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with ESMTP id AAA11550
for <[email-masked]>; Thu, 1 Mar 2001 12:02:47 +0100
Message-ID: <[email-masked]>
Date: Thu, 01 Mar 2001 12:12:42 +0100
From: [email-masked] (Robert Rozman)
X-Mailer: Mozilla 4.51 [sl] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: "[email-masked]" <[email-masked]>
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Use of variables and programming in avr-gcc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I'm relatively newbie to avr-gcc. I've not found any reference/advice on
how to declare variables and how to use them in avr-gcc. Ther is only
one Application note on atmel site about efficient programming in C, but
it is for one of commercial compilers.

I've several question and I'd kindly ask if someone from more
experienced guys is willing to organize his experience in few sentences
of advice to novice users. Among other I have few specific questions:
- do recomendations from mentioned application note apply also for
avr-gcc ? if not, what should be done differently ?
- what declaration keywords are really implemented and what is their
effect (const, register, volatile, ...) and how exactly to use them ?
- is it better to keep SRAM variables in structures - as APP note
recomends) or not ?

I'd kindly ask for answers in code space and also from speed point of
view.

Thanks in advance and special thanks to all guys working on avr-gcc,

Robert Rozman

From [email-masked] Fri Mar 02 03:24:41 2001
Received: from [193.101.57.9] (helo=ida.interface-business.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14YU0K-0003sj-00
for <[email-masked]>; Fri, 02 Mar 2001 03:24:31 +1300
Received: (from j@localhost)
by ida.interface-business.de id f21EOsZ73531;
Thu, 1 Mar 2001 15:24:54 +0100 (MET)
Date: Thu, 1 Mar 2001 15:24:54 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] Use of variables and programming in avr-gcc
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

[email-masked] (Robert Rozman) wrote:

> - do recomendations from mentioned application note apply also for
> avr-gcc ? if not, what should be done differently ?

I just noticed this application note, but will take some time to read
it more thoroughly. Basically, the coding rules should be the same
regardless of the compiler used, although it might be that gcc uses
different registers internally for some things.

> - what declaration keywords are really implemented and what is their
> effect (const, register, volatile, ...) and how exactly to use them ?

`const' is implemented, but in C, it's merely a hint to the compiler
to warn the user when attempts are made (and detected by the compiler)
to write to that variable. In any case, an (initialized) variable is
created for it, which is basically a waste of space. Thus, it's
common practice to use a #define for actually defining a constant
value. (Things are different in C++, where `const' really declares a
constant that doesn't allocate space in the data segment.)

`register' is implemented but should be avoided. The compiler often
knows much better which variables should be kept in registers.

`volatile' is implemented and is very much required in a
microcontroller environment. It is used to prevent the compiler from
optimizing access to some variable. You need this if your variable
can be modified outside the compiler's code flow view, like in an
interrupt routine.

> - is it better to keep SRAM variables in structures - as APP note
> recomends) or not ?

Well, the simplest way to find out is to use their example code, and
try it. :) I did so, and compiled the C file into assembler source
with `avr-gcc -O3 -S foo.c'. Here's the result:

main:
/* prologue: frame size=0 */
ldi r28,lo8(0x25f - 0)
ldi r29,hi8(0x25f - 0)
out __SP_L__,r28
out __SP_H__,r29
/* prologue end (size=4) */
ldi r30,lo8(global)
ldi r31,hi8(global)
ld r24,Z
subi r24,lo8(-(1))
st Z,r24
lds r24,min
subi r24,lo8(-(1))
sts min,r24
/* epilogue: frame size=0 */
__stop_progIi__:
rjmp __stop_progIi__

If you compare this with the generated code in the application note,
you'll see that gcc generates code not identical but very similar. In
particular, structure elements are accessed through the Z register as
well, while regular variables are accessed through LDS/STS. (Note
that gcc optimized the entire conditionalizing away, since the
conditional statement after the `if' wasn't used, thus you don't see
the value `60' anwhere in the code.)

> I'd kindly ask for answers in code space and also from speed point of
> view.

See above, it's probably always best to have a look at the generated
assembler code.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Fri Mar 02 06:31:05 2001
Received: from email.netonecom.net ([209.172.26.13] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14YWut-000450-00
for <[email-masked]>; Fri, 02 Mar 2001 06:31:04 +1300
Received: from netonecom.net (catudal.netonecom.net [216.65.187.222])
by email.netonecom.net (8.11.2/8.11.0) with ESMTP id f21HVnF05986;
Thu, 1 Mar 2001 12:31:50 -0500 (EST)
Message-ID: <[email-masked]>
Date: Thu, 01 Mar 2001 12:31:08 -0500
From: Michel Catudal <[email-masked]>
Organization: Pas =?iso-8859-1?Q?organis=E9?= par Ti-Mou
X-Mailer: Mozilla 4.76 [Joual] (X11; U; Linux 2.2.16 i586)
X-Accept-Language: fr-CA, en-US
MIME-Version: 1.0
To: Gunnar Henne <[email-masked]>
CC: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Re: New linux binaries available
References: <[email-masked]> <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by email.netonecom.net id f21HVnF05986
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Gunnar Henne a =E9crit :
>=20
> Salut Michel
>=20
> Michel Catudal a =E9crit:
>=20
> > I am puzzled as to how you managed to compile this. I compiled and in=
stalled
> > binutils but the gcc doesn't compile. It barfs before finishing. What=
is
> > your secret?
>=20
> A good magician never tells his secrets. ;-)
>=20
> >or are you ignoring some errors?
>=20
> This is it. The compilation fails for some not needed parts. You can
> ignore this=20

Unless you do need support for the mega. Someone must have got this to
work at one time or another otherwise I fail to see the logic of releasin=
g
such code. From what I see there are 3 problems here.

1- In the generation of an assembler file some junk is generated
in gcc/config/avr/avr.c which gives an illegal opcode use, meaning
that in a case where you can only use a register an immediate value is us=
ed.
Replacing the 0 and 1 as I described previously to r0 and r1 satisfies
the compiler.
2- Overriding of processor .arch command doesn't seem to be valid anymore
Commenting the offending line in avr.c removes the error messages which
complains about something allready defined.
3- movw is not defined in binutils which makes the compiler barf at that
point. It would appear to me that the code had been there at one time
but somehow it got yanked out during a patching. Unless the maintainer
was to compile the code each time an update is made there is no way for
him or her to know the problem.
If someone has the information that is missing please let me know.
I would fix it myself but have no idea how the information is entered.
Having written some C Compilers myself in the past I see no problem in do=
ing
that if someone could point to me at some documentation on how to enter t=
he
processor definitions. I guess I could figure it out somehow but I don't =
feel
like spending 100% of my free time in the next few days to figure out som=
ething
that is most likely documented in details somewhere.

For those interested I do provide several binaries and source for SuSE
much like Gunnar Henne does for RedHat. Just follow the proper links at
my web site. I don't plan on having the binaries for the latest CVS=20
untill this issue is resolved.

>und just make install, which will run through without
> errors.
>=20
> You can download the spec file from my page to build a RH7 RPM.
>=20

I allready looked at it, thanks anyway.

--=20
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://www.netonecom.net/~bbcat
We have all kinds of links
and many SuSE 7.0 Linux RPM packages

From [email-masked] Fri Mar 02 08:46:50 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14YZ2G-0004Ak-00
for <[email-masked]>; Fri, 02 Mar 2001 08:46:49 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.131])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA27315;
Thu, 1 Mar 2001 22:47:49 +0300
To: Michel Catudal <[email-masked]>
Cc: Gunnar Henne <[email-masked]>, AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Re: New linux binaries available
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 01 Mar 2001 22:40:29 +0300
In-Reply-To: Michel Catudal's message of "Thu, 01 Mar 2001 12:31:08 -0500"
Message-ID: <[email-masked]>
Lines: 40
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Michel Catudal <[email-masked]> writes:

> Gunnar Henne a =E9crit :
> >=20
> > Salut Michel
> >=20
> > Michel Catudal a =E9crit:
> >=20
> > > I am puzzled as to how you managed to compile this. I compiled and in=
> stalled
> > > binutils but the gcc doesn't compile. It barfs before finishing. What=
> is
> > > your secret?
> >=20
> > A good magician never tells his secrets. ;-)
> >=20
> > >or are you ignoring some errors?
> >=20
> > This is it. The compilation fails for some not needed parts. You can
> > ignore this=20
>
> Unless you do need support for the mega. Someone must have got this to
> work at one time or another otherwise I fail to see the logic of releasin=
> g
> such code. From what I see there are 3 problems here.
>
> 1- In the generation of an assembler file some junk is generated
> in gcc/config/avr/avr.c which gives an illegal opcode use, meaning
> that in a case where you can only use a register an immediate value is us=
> ed.
> Replacing the 0 and 1 as I described previously to r0 and r1 satisfies
> the compiler.

if it is then:
YOU USE OLD VERSION OF BINUTILS !!!

Use CVS version.

Denis.

From [email-masked] Fri Mar 02 13:29:47 2001
Received: from email.netonecom.net ([209.172.26.13] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14YdS6-0004LZ-00
for <[email-masked]>; Fri, 02 Mar 2001 13:29:47 +1300
Received: from netonecom.net (catudal.netonecom.net [216.65.187.222])
by email.netonecom.net (8.11.2/8.11.0) with ESMTP id f220Uoa21741
for <[email-masked]>; Thu, 1 Mar 2001 19:30:50 -0500 (EST)
Message-ID: <[email-masked]>
Date: Thu, 01 Mar 2001 19:30:05 -0500
From: Michel Catudal <[email-masked]>
Organization: Pas =?iso-8859-1?Q?organis=E9?= par Ti-Mou
X-Mailer: Mozilla 4.76 [Joual] (X11; U; Linux 2.2.16 i586)
X-Accept-Language: fr-CA, en-US
MIME-Version: 1.0
CC: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Re: New linux binaries available
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by email.netonecom.net id f220Uoa21741
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Denis Chertykov a =E9crit :
>=20
> > > This is it. The compilation fails for some not needed parts. You ca=
n
> > > ignore this=3D20
> >
> > Unless you do need support for the mega. Someone must have got this t=
o
> > work at one time or another otherwise I fail to see the logic of rele=
asin=3D
> > g
> > such code. From what I see there are 3 problems here.
> >
> > 1- In the generation of an assembler file some junk is generated
> > in gcc/config/avr/avr.c which gives an illegal opcode use, meaning
> > that in a case where you can only use a register an immediate value i=
s us=3D
> > ed.
> > Replacing the 0 and 1 as I described previously to r0 and r1 satisfie=
s
> > the compiler.
>=20
> if it is then:
> YOU USE OLD VERSION OF BINUTILS !!!
>=20
> Use CVS version.
>=20
> Denis.

I used these commands

cvs -z 9 -d :pserver:[email-masked]:/cvs/src login
enter "anoncvs" as login
cvs -z 9 -d :pserver:[email-masked]:/cvs/src co binutils =
=20

If this is the wrong CVS site please tell us where the good one is.

--=20
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://www.netonecom.net/~bbcat
We have all kinds of links
and many SuSE 7.0 Linux RPM packages

From [email-masked] Fri Mar 02 22:53:15 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14YmFO-0004fs-00
for <[email-masked]>; Fri, 02 Mar 2001 22:53:14 +1300
Received: from oTRIs.de (DHCP27.o3s.de [192.168.2.126])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id KAA16204
for <[email-masked]>; Fri, 2 Mar 2001 10:54:22 +0100
Message-ID: <[email-masked]>
Date: Fri, 02 Mar 2001 10:54:20 +0100
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Which CVS Version?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I build the binaries, but don't have enough time to test them as it is
needed.
I know how to get the sources from CVS in an arbitrary point of time in
the past. If the current version ist instable or not working please tell
me when there was a known stable version.

I have managed to change the avrobj patch so that it fits to the current
binutils CVS sources.

For my builds I use the gcc + binutils sources from CVS checked out in
the same time.

Greetings

Gunnar

--
Gunnar Henne Email: [email-masked]
oTRIs GmbH & Co. KG Tel. : 0231 / 10616-21
Landgrafenstr. 153 Fax. : 0231 / 10615-44
44139 Dortmund

From [email-masked] Sat Mar 03 02:16:10 2001
Received: from gateway.utbm.fr ([193.48.246.2] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14YpPl-0004nh-00
for <[email-masked]>; Sat, 03 Mar 2001 02:16:10 +1300
Received: from sunserv.utbm.fr (sunserv.utbm.fr [192.168.1.16])
by gateway.utbm.fr (8.9.3/jtpda-5.3.2) with ESMTP id OAA07465
for <[email-masked]>; Fri, 2 Mar 2001 14:17:19 +0100
Received: (from lcourtes@localhost)
by sunserv.utbm.fr (8.9.3+Sun/8.9.3) id OAA21461
for [email-masked]; Fri, 2 Mar 2001 14:17:18 +0100 (MET)
Date: Fri, 2 Mar 2001 14:17:17 +0100
From: Ludovic COURTES <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
X-Mailer: Mutt 1.0pre2us
In-Reply-To: <[email-masked]>
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by gateway.utbm.fr id OAA07465
Subject: [avr-gcc-list] Inline asm constraints...
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi !

I am new to this mailing list but I have already been working for
two years with avr-gcc on an ATMega103 (i am working in the framework
of a robotics club in order to participate in the 'e=3Dm6' French Robotic=
s
Cup - some of you might know it).

Some instructions do work only on registers above 15 (such as sbci, and
most of instructions with immediate values i guess). Therefore, I'd like
to know if there is a special constraint when writing inline assembler
to tell gcc to use registers above 15...

Thanks.

--=20
Ludovic Court=E8s
Universit=E9 de Technologie de Belfort-Montb=E9liard
Unitec (Club de Robotique de l'UTBM)

From [email-masked] Sat Mar 03 08:22:57 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Yv8i-00055g-00
for <[email-masked]>; Sat, 03 Mar 2001 08:22:56 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.149])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA20184;
Fri, 2 Mar 2001 22:24:00 +0300
To: Michel Catudal <[email-masked]>
Cc: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Re: New linux binaries available
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 02 Mar 2001 22:16:42 +0300
In-Reply-To: Michel Catudal's message of "Thu, 01 Mar 2001 19:30:05 -0500"
Message-ID: <[email-masked]>
Lines: 114
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Michel Catudal <[email-masked]> writes:

>
> I used these commands
>
> cvs -z 9 -d :pserver:[email-masked]:/cvs/src login
> enter "anoncvs" as login
> cvs -z 9 -d :pserver:[email-masked]:/cvs/src co binutils
> =

I'm use "anoncvs.cygnus.com:/cvs/src"

Compare my log with your.

# cvs -z9 log tc-avr.c

RCS file: /cvs/src/src/gas/config/tc-avr.c,v
Working file: tc-avr.c
head: 1.10
branch:
locks: strict
access list:
symbolic names:
x86_64versiong3: 1.10
binutils-2_11-branch: 1.10.0.2
binutils-2_10_1: 1.1
binutils-2_10: 1.1
binutils-2_10-branch: 1.1.0.2
binutils-2_10-branchpoint: 1.1
binutils_latest_snapshot: 1.10
keyword substitution: kv
total revisions: 10; selected revisions: 10
description:
----------------------------
revision 1.10
date: 2000/09/15 01:06:52; author: kazu; state: Exp; lines: +56 -56
2000-09-14 Kazu Hirata <[email-masked]>

* config/tc-a29k.c: Fix formatting.
* config/tc-alpha.c: Likewise.
* config/tc-arc.c: Likewise.
* config/tc-arc.h: Likewise.
* config/tc-arm.c: Likewise.
* config/tc-arm.h: Likewise.
* config/tc-avr.c: Likewise.
* config/tc-avr.h: Likewise.
* config/tc-tic30.c: Likewise.
* config/tc-tic30.h: Likewise.
* config/tc-tic54x.c: Likewise.
* config/tc-tic54x.h: Likewise.
* config/tc-tic80.c: Likewise.
* config/tc-tic80.h: Likewise.
----------------------------
revision 1.9
date: 2000/08/06 14:03:58; author: denisc; state: Exp; lines: +18 -31
* config/tc-avr.c: Use PARAMS macro in function declarations.
Don't declare md_pcrel_from_section (already in tc-avr.h).
(avr_operands): Use AVR_UNDEF_P and AVR_SKIP_P macros.
(avr_operand): Don't set (unsigned) op_mask to -1.
----------------------------
revision 1.8
date: 2000/07/28 00:42:18; author: nickc; state: Exp; lines: +209 -179
Fix formatting
----------------------------
revision 1.7
date: 2000/07/03 22:25:33; author: nickc; state: Exp; lines: +156 -69
Tidy up formatting.
Add -mall-opcodes, -mno-skip-bug, -mno-wrap.
----------------------------
revision 1.6
date: 2000/06/27 01:45:30; author: nickc; state: Exp; lines: +27 -23
Applied Marek Michalkiewicz <[email-masked]>'s patch to ehance the AVR port.
----------------------------
revision 1.5
date: 2000/06/07 18:56:15; author: denisc; state: Exp; lines: +3 -1
* config/tc-avr.c (avr_operand): fix the fomratting of the comment.
----------------------------
revision 1.4
date: 2000/06/07 17:42:44; author: denisc; state: Exp; lines: +28 -215
* config/tc-avr.c (AVR_ISA_???): moved to include/opcode/avr.h
(REGISTER_P): likewise.
(avr_opcodes): uses include/opcode/avr.h
(avr_operand): enable ld r,Z or st r,Z for at90s1200.
----------------------------
revision 1.3
date: 2000/05/01 11:14:05; author: denisc; state: Exp; lines: +49 -58
* config/tc-avr.c: ATTRIBUTE_UNUSED added to the necessary places.
More comments added.
(md_begin): Removed "construct symbols for each register name".
Because register names conflicts with GCC generated function
names.
(avr_operand): Now constant numbers can be used as a register
identifiers (0 as r0, 31 as r31).
(md_assemble): use skip_space () before parsing instruction
operands.
----------------------------
revision 1.2
date: 2000/05/01 08:48:32; author: denisc; state: Exp; lines: +185 -48
* config/tc-avr.c: New AVR_ISA_ defined.
(md_assemble): Handle opcodes with optional operands (lpm,elpm).
(avr_operand): Handle 'a', 'v' and 'z' constraint letters needed
for `fmul', `movw' and `lpm R,Z' instructions.
(avr_operands): Warn if current opcode is a two-word instruction
and previous opcode was cpse/sbic/sbis/sbrc/sbrs.
(avr_opcodes): New commands added.
(REGISTER_P): Check 'a' and 'v' constraint letters.
(mcu_types): New MCU added.
----------------------------
revision 1.1
date: 2000/03/27 08:39:13; author: amodra; state: Exp;
ATMEL AVR microcontroller support.
=============================================================================

From [email-masked] Sat Mar 03 08:23:08 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Yv8t-00055n-00
for <[email-masked]>; Sat, 03 Mar 2001 08:23:07 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.149])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA20199;
Fri, 2 Mar 2001 22:24:16 +0300
To: Ludovic COURTES <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Inline asm constraints...
References: <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 02 Mar 2001 22:16:57 +0300
In-Reply-To: Ludovic COURTES's message of "Fri, 2 Mar 2001 14:17:17 +0100"
Message-ID: <[email-masked]>
Lines: 20
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Ludovic COURTES <[email-masked]> writes:

> Hi !
>
> I am new to this mailing list but I have already been working for
> two years with avr-gcc on an ATMega103 (i am working in the framework
> of a robotics club in order to participate in the 'e=3Dm6' French Robotic=
> s
> Cup - some of you might know it).
>
> Some instructions do work only on registers above 15 (such as sbci, and
> most of instructions with immediate values i guess). Therefore, I'd like
> to know if there is a special constraint when writing inline assembler
> to tell gcc to use registers above 15...
>

Read gcc.info -> Machine Description -> Constraints -> Machine Constraints
Search for "AVR".

From [email-masked] Sat Mar 03 13:33:13 2001
Received: from natmail2.webmailer.de ([192.67.198.65] helo=post.webmailer.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Yzyy-0005Hk-00
for <[email-masked]>; Sat, 03 Mar 2001 13:33:12 +1300
Received: from dani (host131-163.circular.de [212.86.163.131] (may be forged))
by post.webmailer.de (8.9.3/8.8.7) with SMTP id BAA18228
for <[email-masked]>; Sat, 3 Mar 2001 01:34:23 +0100 (MET)
From: "Daniel Mittag" <[email-masked]>
To: <[email-masked]>
Date: Sat, 3 Mar 2001 01:38:57 +0100
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] UART Receive Problems
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I have a general problem using the UART of the AT90S2333:
I've written a little test programm (in C) that receives values over the
UART and visualizes them via 6 LED's that are connected to PORTB (PB0-PB5).
(just bit0-5 are displayed as PORTB of the 2333 is only 6 bits wide.
On the pc-side, I've done a output proggy that allows you to enter a value
and send it over COM2.
I't quiet simple, it only sends a value to the COM2 hardware adress,
baudrate, parity and stopbits are defined by windows98 enviroment, not by
the program. I use 9600baud, 8,N,1. (Same on the Atmel side, of course)

The problem is that the Atmel MCU receives a byte but not the one I sent.
The received bytes
seem to be shifted and negated in some way, when I first leftshift and then
negate
( ~(byte<<1)) the byte on the sender side, the atmel displays correct values
but then I just can use values between 0 and 128, 129 will be displayed as 1
and so on.

I'm a AVR newbie, so maybe it's a obvious thing, but I don't get it, please
help!

Thanks in advance!

Daniel Mittag
DMS Dance Music Service

*** the receiver program: (compiled with AVR-GCC) ***

// Testprogramm Atmel AT90S2333

#include <io.h>
#include <signal.h>
#include <interrupt.h>

SIGNAL(SIG_UART_RECV)
{
outp(inp(UDR), PORTB);
}

void main(void)
{

sbi(UCR, RXCIE); //Recieved Complete Interrupt Enabled
sbi(UCR, RXEN); //Recieved Enabled
outp(51, UBRR); //Baudrate 9600

outp(63, DDRB); //PortB = Output
outp(0, PORTB);
sei(); //Enable Global Interrupts

while(1){};

}

*** the sender: (compiled with MS Visual C++ 6.0)***

#include <conio.h> //_inp(), _outp()
#include <stdio.h> //Ein-u.Ausgabe (?)

void main(void)
{

int input;
clock_t time;

while(1)
{
scanf("%d", &input);
printf("\nEingelesen: %d\n", input);
_outp(0x2F8, input); // <- ~(input<<1)!!
}
}

From [email-masked] Sat Mar 03 16:41:35 2001
Received: from email.netonecom.net ([209.172.26.13] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Z2vG-0005PC-00
for <[email-masked]>; Sat, 03 Mar 2001 16:41:34 +1300
Received: from netonecom.net (catudal.netonecom.net [216.65.187.222])
by email.netonecom.net (8.11.2/8.11.0) with ESMTP id f233giL14545
for <[email-masked]>; Fri, 2 Mar 2001 22:42:45 -0500 (EST)
Message-ID: <[email-masked]>
Date: Fri, 02 Mar 2001 22:41:51 -0500
From: Michel Catudal <[email-masked]>
Organization: Pas =?iso-8859-1?Q?organis=E9?= par Ti-Mou
X-Mailer: Mozilla 4.76 [Joual] (X11; U; Linux 2.2.16 i586)
X-Accept-Language: fr-CA, en-US
MIME-Version: 1.0
CC: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Re: New linux binaries available
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by email.netonecom.net id f233giL14545
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Denis Chertykov a =E9crit :
>=20
> Michel Catudal <[email-masked]> writes:
>=20
> >
> > I used these commands
> >
> > cvs -z 9 -d :pserver:[email-masked]:/cvs/src login
> > enter "anoncvs" as login
> > cvs -z 9 -d :pserver:[email-masked]:/cvs/src co binutils
> > =3D
>=20
> I'm use "anoncvs.cygnus.com:/cvs/src"
>=20
> Compare my log with your.
>=20
> # cvs -z9 log tc-avr.c
>=20
<snip>

My log is identical to yours.

--=20
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://www.netonecom.net/~bbcat
We have all kinds of links
and many SuSE 7.0 Linux RPM packages

From [email-masked] Sat Mar 03 19:37:27 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Z5fS-0005Vx-00
for <[email-masked]>; Sat, 03 Mar 2001 19:37:26 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.158])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id JAA03574;
Sat, 3 Mar 2001 09:37:54 +0300
To: Michel Catudal <[email-masked]>
Cc: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Re: New linux binaries available
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 03 Mar 2001 09:30:35 +0300
In-Reply-To: Michel Catudal's message of "Fri, 02 Mar 2001 22:41:51 -0500"
Message-ID: <[email-masked]>
Lines: 30
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Michel Catudal <[email-masked]> writes:

> Denis Chertykov a =E9crit :
> >=20
> > Michel Catudal <[email-masked]> writes:
> >=20
> > >
> > > I used these commands
> > >
> > > cvs -z 9 -d :pserver:[email-masked]:/cvs/src login
> > > enter "anoncvs" as login
> > > cvs -z 9 -d :pserver:[email-masked]:/cvs/src co binutils
> > > =3D
> >=20
> > I'm use "anoncvs.cygnus.com:/cvs/src"
> >=20
> > Compare my log with your.
> >=20
> > # cvs -z9 log tc-avr.c
> >=20
> <snip>
>
> My log is identical to yours.

So, compile binutils.
Compile your C file as `avr-gcc -Os -S your-c-file', than
cd to binutils/gas build directory and run
`as-new your-c-file.s'

Is you have `Error: register required' ?

From [email-masked] Sun Mar 04 11:27:34 2001
Received: from moutvdom00.kundenserver.de ([195.20.224.149])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ZKUv-0007cr-00
for <[email-masked]>; Sun, 04 Mar 2001 11:27:34 +1300
Received: from [195.20.224.220] (helo=mrvdom04.kundenserver.de)
by moutvdom00.kundenserver.de with esmtp (Exim 2.12 #2)
id 14ZKW9-0004MX-00
for [email-masked]; Sat, 3 Mar 2001 23:28:49 +0100
Received: from p3ee05ad8.dip.t-dialin.net ([62.224.90.216] helo=Karsten-Becker.de)
by mrvdom04.kundenserver.de with esmtp (Exim 2.12 #2)
id 14ZKW6-00022F-00
for [email-masked]; Sat, 3 Mar 2001 23:28:46 +0100
Message-ID: <[email-masked]>
Date: Sat, 03 Mar 2001 23:28:55 +0100
From: Karsten Becker <[email-masked]>
X-Mailer: Mozilla 4.7 [de] (Win98; I)
X-Accept-Language: de
MIME-Version: 1.0
To: "[email-masked]" <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Problem with source
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,
I'm new to avr-gcc and i'm just playing around a bit with the gcctests.
I tried following source:
#include "uart.h"
#include <progmem.h>
#include <io8515.h>

int main(void)
{
u08 outdat;
/* Initialise UART */
UART_Init();
for (;;) { /* loop forever */
outdat=PINC;
PRINT("The number is:");
UART_Printfu08(outdat);
EOL();
}
}

But the only output I get is the number is 13 without pushing any
buttons?
Whats wrong with this source?
kind regards
Karsten

From [email-masked] Sun Mar 04 11:40:23 2001
Received: from sttlpop4.sttl.uswest.net ([206.81.192.4])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14ZKhK-0007dj-00
for <[email-masked]>; Sun, 04 Mar 2001 11:40:23 +1300
Received: (qmail 97371 invoked by alias); 3 Mar 2001 22:41:09 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 97362 invoked by uid 0); 3 Mar 2001 22:41:09 -0000
Received: from dslppp-gw4-d8.sttl.uswest.net (HELO larry) (216.160.110.8)
by sttlpop4.sttl.uswest.net with SMTP; 3 Mar 2001 22:41:09 -0000
Message-ID: <02d401c0a431$f0454c40$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "Karsten Becker" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Problem with source
Date: Sat, 3 Mar 2001 14:32:55 -0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

You can't read the pins by simple assignment. All you are
doing is printing out the address of PINC!

Try:
outdat = inp(PINC); // Check iomacros.h to verify the
syntax..

----- Original Message -----
From: "Karsten Becker" <[email-masked]>
> Hi,
> I'm new to avr-gcc and i'm just playing around a bit with
the gcctests.
> I tried following source:
> #include "uart.h"
> #include <progmem.h>
> #include <io8515.h>
>
> int main(void)
> {
> u08 outdat;
> /* Initialise UART */
> UART_Init();
> for (;;) { /* loop forever */
> outdat=PINC;
> PRINT("The number is:");
> UART_Printfu08(outdat);
> EOL();
> }
> }
>
> But the only output I get is the number is 13 without
pushing any
> buttons?
> Whats wrong with this source?

From [email-masked] Mon Mar 05 04:03:04 2001
Received: from invalid.ed.ntnu.no ([129.241.179.15])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14Za2J-0008Fu-00
for <[email-masked]>; Mon, 05 Mar 2001 04:03:04 +1300
Received: from localhost (hembre@localhost)
by invalid.ed.ntnu.no (8.9.3/8.9.3) with ESMTP id QAA12575
for <[email-masked]>; Sun, 4 Mar 2001 16:05:27 +0100 (CET)
(envelope-from [email-masked])
Date: Sun, 4 Mar 2001 16:05:27 +0100 (CET)
From: Bernt Hustad Hembre <[email-masked]>
X-Sender: [email-masked]
To: AVR Mailing List <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] Undefined reference - Why?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi.

I have some problems with this litle code-piece

---- start test.c ----

#include <math.h>

void a_function(int tall);

int main(void){
int hoyde;
double trykk;

hoyde = pow(2,2);
a_function(hoyde);
// trykk = hoyde * 1.234;

return 0;
} /* main */

void a_function(int tall){
}

---- end test.c ----

This is what happends:

M:\prosjekt\tuger\hw\firmware>make
make: *** Warning: File `tuger.c' has modification time in the future
(2001-03-0
4 15:58:04 > 2001-03-04 15:55:54)
avr-gcc -c -g -O3 -Wall -Wstrict-prototypes -Wa,-ahlms=tuger.lst
-mmcu=at90s4433
-I. tuger.c -o tuger.o
tuger.c: In function `main':
tuger.c:8: warning: unused variable `trykk'
avr-gcc tuger.o -Wl,-Map=tuger.map,--cref -mmcu=at90s4433 -o tuger.elf
tuger.o: In function `main':
M:\prosjekt\tuger\hw\firmware/tuger.c:10: undefined reference to `pow'
make: *** [tuger.elf] Error 1

But if I change this:

a_function(hoyde);
// trykk = hoyde * 1.234;

to this:

// a_function(hoyde);
trykk = hoyde * 1.234;

It compiles without any errormessages...

Version:
M:\prosjekt\tuger\hw\firmware>avr-gcc --version
2.97

Installed on a Win2000 5.00.2195
Installed using the file
http://www.avrfreaks.com/AVRGCC/Download/avrgcc20010211.exe
(Gunnar Henne's distibution).

Any suggestions?

Bernie
Tlf.: 92648923
[email-masked]

From [email-masked] Mon Mar 05 06:44:25 2001
Received: from invalid.ed.ntnu.no ([129.241.179.15])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ZcYS-0008Qz-00
for <[email-masked]>; Mon, 05 Mar 2001 06:44:24 +1300
Received: from localhost (hembre@localhost)
by invalid.ed.ntnu.no (8.9.3/8.9.3) with ESMTP id SAA13474
for <[email-masked]>; Sun, 4 Mar 2001 18:46:51 +0100 (CET)
(envelope-from [email-masked])
Date: Sun, 4 Mar 2001 18:46:51 +0100 (CET)
From: Bernt Hustad Hembre <[email-masked]>
X-Sender: [email-masked]
To: AVR Mailing List <[email-masked]>
Subject: Re: [avr-gcc-list] Undefined reference - Why?
In-Reply-To: <20010304165549.A2168@touch>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Sun, 4 Mar 2001, it was written:

> > It compiles without any errormessages...
> What do you expect ? You are compiling with -O3. If you comment out
> a_function(hoyde) the optimzer recognices that hoyde and trykk are
> calculated but _never_ used. So they will be optimized out. Compile this
> withou any optimization and you get what you expected. You can also try
> "return hoyde" instead of "return 0".

Ok. I can see why the errormessage dissapairs. But the interesting
question (for me anyway) is why do the errormessage appair in the first
place?

I use pow() like this:

hoyde = pow(2,2);

Whats wrong with this?

math.h defines pow:
extern double pow (double, double) __ATTR_CONST__;

Where do avr-gcc assume to find the objectfile where pow() is included?

Bernie
Tlf.: 92648923
[email-masked]

From [email-masked] Mon Mar 05 05:00:30 2001
Received: from [194.97.6.205] (helo=plato.exmail.de)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14Zavt-0008IX-00
for <[email-masked]>; Mon, 05 Mar 2001 05:00:29 +1300
Received: (qmail 16346 invoked from network); 4 Mar 2001 16:01:39 -0000
Received: from r593.muc.dial.surf-callino.de (HELO touch.rotters.de) (213.21.3.85)
by plato.exmail.de with SMTP; 4 Mar 2001 16:01:39 -0000
Received: (from rotter@localhost)
by touch.rotters.de (8.10.2/8.10.2/SuSE Linux 8.10.0-0.3) id f24Ftnb02185;
Sun, 4 Mar 2001 16:55:49 +0100
Date: Sun, 4 Mar 2001 16:55:49 +0100
From: Klaus Rotter <>
To: Bernt Hustad Hembre <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Undefined reference - Why?
Message-ID: <20010304165549.A2168@touch>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Sun, Mar 04, 2001 at 04:05:27PM +0100
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Sun, Mar 04, 2001 at 04:05:27PM +0100, Bernt Hustad Hembre wrote:
> #include <math.h>
> void a_function(int tall);
> int main(void){
> int hoyde;
> double trykk;
>
> hoyde = pow(2,2);
> a_function(hoyde);
> // trykk = hoyde * 1.234;
> return 0;
> } /* main */
>
> void a_function(int tall){
> }

> M:\prosjekt\tuger\hw\firmware/tuger.c:10: undefined reference to `pow'

> But if I change this:
> a_function(hoyde);
> // trykk = hoyde * 1.234;
> to this:
> // a_function(hoyde);
> trykk = hoyde * 1.234;
> It compiles without any errormessages...

What do you expect ? You are compiling with -O3. If you comment out
a_function(hoyde) the optimzer recognices that hoyde and trykk are
calculated but _never_ used. So they will be optimized out. Compile this
withou any optimization and you get what you expected. You can also try
"return hoyde" instead of "return 0".

--
Klaus Rotter * mailto:[email-masked]

From [email-masked] Mon Mar 05 20:38:35 2001
Received: from smtp.routing.net ([213.160.64.56])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ZpZj-0000YO-00
for <[email-masked]>; Mon, 05 Mar 2001 20:38:35 +1300
Received: from mail.routing.net ([213.160.64.57]) by smtp.routing.net with Microsoft SMTPSVC(5.5.1877.447.44);
Mon, 5 Mar 2001 08:37:44 +0100
Received: from postbox.invers.com (62.155.235.56)
by mail.routing.net with MERCUR-SMTP/POP3/IMAP4-Server (v3.30.03 AS-0098316)
for <[email-masked]>; Mon, 5 Mar 2001 08:39:23 +0100
Received: from carsten (carsten.invers.com [192.168.2.17])
by postbox.invers.com (8.11.0/8.8.8) with SMTP id f257UkR17825
for <[email-masked]>; Mon, 5 Mar 2001 08:30:46 +0100
X-Authentication-Warning: postbox.invers.com: Host carsten.invers.com [192.168.2.17] claimed to be carsten
From: =?iso-8859-1?Q?Carsten_Ri=DFler?= <[email-masked]>
To: <[email-masked]>
Date: Mon, 5 Mar 2001 08:32:37 +0100
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Importance: Normal
Subject: [avr-gcc-list] Using 8515 Timer Interupts
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

HI
While Trying to use the Timer0 Interupt with the 8515 and AVR-Studio 3.22 I
got some Issues.
It is not possible to Step the C Code thru the TImer Interupt Funktions, it
is possible to step thru UART Interupt funktions.
Even without AVR-Studio I was not able to use the INTERRUPT Definiton with
INTERRUPT (TIMER0_OFV)
{....
}
as described in io8515.h and right mapped to 0xE
only
SIGNAL (SIG_OVERFLOW0)
{....
}
worked with real proz but not with the Studio.
Cause of I'm a Newbie in using timers it would be nice if someone has some
sample Code.
Thanx
CU Carsten

From [email-masked] Mon Mar 05 22:42:39 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ZrVm-0000da-00
for <[email-masked]>; Mon, 05 Mar 2001 22:42:38 +1300
Received: from oTRIs.de (DHCP27.o3s.de [192.168.2.126])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id KAA28721
for <[email-masked]>; Mon, 5 Mar 2001 10:43:58 +0100
Message-ID: <[email-masked]>
Date: Mon, 05 Mar 2001 10:43:51 +0100
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
References: <[email-masked]> <020d01c0a32b$e92f8260$0200000a@larry>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Re: Which CVS Version?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Larry,

> Gunnar: have/will you update the win/dos version on your web
> site?

It costs me some time to build a windows version, so I want to know
whether the Version is OK before I do the build.

Denis, what version worked for you?

Greetings

Gunnar

From [email-masked] Mon Mar 05 23:38:55 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ZsOB-0000gE-00
for <[email-masked]>; Mon, 05 Mar 2001 23:38:53 +1300
Received: (from j@localhost)
by ida.interface-business.de id f25Ae6X93614;
Mon, 5 Mar 2001 11:40:06 +0100 (MET)
Date: Mon, 5 Mar 2001 11:40:06 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] UART Receive Problems
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Daniel Mittag" <[email-masked]> wrote:

> The problem is that the Atmel MCU receives a byte but not the one I
> sent. The received bytes seem to be shifted and negated in some
> way, ...

What are you using as hardware drivers for the serial port? The port
is working fine with something like a MAX232, but those drivers are
negating! So at least, you need a single inverter (can be a
transistor at very minimum).

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Mon Mar 05 23:41:17 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ZsQU-0000gi-00
for <[email-masked]>; Mon, 05 Mar 2001 23:41:16 +1300
Received: (from j@localhost)
by ida.interface-business.de id f25AgTQ93625;
Mon, 5 Mar 2001 11:42:29 +0100 (MET)
Date: Mon, 5 Mar 2001 11:42:29 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] Undefined reference - Why?
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Bernt Hustad Hembre <[email-masked]> wrote:

> avr-gcc tuger.o -Wl,-Map=tuger.map,--cref -mmcu=at90s4433 -o tuger.elf
> tuger.o: In function `main':
> M:\prosjekt\tuger\hw\firmware/tuger.c:10: undefined reference to `pow'

Add a `-lm' to the linker command line above. This will include the
math library. It's a very common error when programming in the Unix
environment. Unfortunately, there's no way how the `#include
<math.h>' could trigger the linker to also include the appropriate
object code library.
--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Tue Mar 06 12:06:41 2001
Received: from sttlpop2.sttl.uswest.net ([206.81.192.2])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14a43s-0001HS-00
for <[email-masked]>; Tue, 06 Mar 2001 12:06:40 +1300
Received: (qmail 84142 invoked by alias); 5 Mar 2001 23:08:01 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 83836 invoked by uid 0); 5 Mar 2001 23:07:56 -0000
Received: from aadslppp240.sttl.uswest.net (HELO larry) (216.160.75.240)
by sttlpop2.sttl.uswest.net with SMTP; 5 Mar 2001 23:07:56 -0000
Message-ID: <009101c0a5c9$38430620$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
Date: Mon, 5 Mar 2001 15:01:36 -0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Floating Point - Just how broken?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Is floating point comparisons suppose to work in the 2.97
20010118 release? It appears that the branch logic is wrong
coming out of C code.

I recall hearing about this but I thought it was fixed. Or
do I need the newest compiler (20010211 release)?

I have been getting my compilers from Gunnar Henne's site
(windows).

From [email-masked] Tue Mar 06 20:27:16 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14aBsG-0001bs-00
for <[email-masked]>; Tue, 06 Mar 2001 20:27:13 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.139])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id KAA16342;
Tue, 6 Mar 2001 10:28:27 +0300
To: Gunnar Henne <[email-masked]>
Cc: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Re: Which CVS Version?
References: <[email-masked]> <020d01c0a32b$e92f8260$0200000a@larry> <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 06 Mar 2001 10:21:08 +0300
In-Reply-To: Gunnar Henne's message of "Mon, 05 Mar 2001 10:43:51 +0100"
Message-ID: <[email-masked]>
Lines: 20
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Gunnar Henne <[email-masked]> writes:

> Hello Larry,
>
> > Gunnar: have/will you update the win/dos version on your web
> > site?
>
> It costs me some time to build a windows version, so I want to know
> whether the Version is OK before I do the build.
>
> Denis, what version worked for you?

I'm use avr-gcc for GCC development and I don't know which CVS
versions of avr-gcc (and general GCC) stable and which broken.
From time to time I test avr-gcc with gcc.c-torture/execute/*.c it's
about 300 tests.
I'm planning to test avr-gcc on this week or on next week.

Denis.

From [email-masked] Tue Mar 06 20:27:32 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14aBsW-0001bx-00
for <[email-masked]>; Tue, 06 Mar 2001 20:27:30 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.139])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id KAA16360;
Tue, 6 Mar 2001 10:28:36 +0300
To: "Larry Barello" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
Subject: Re: [avr-gcc-list] Floating Point - Just how broken?
References: <009101c0a5c9$38430620$0200000a@larry>
From: Denis Chertykov <[email-masked]>
Date: 06 Mar 2001 10:21:17 +0300
In-Reply-To: "Larry Barello"'s message of "Mon, 5 Mar 2001 15:01:36 -0800"
Message-ID: <[email-masked]>
Lines: 29
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Larry Barello" <[email-masked]> writes:

> Is floating point comparisons suppose to work in the 2.97
> 20010118 release? It appears that the branch logic is wrong
> coming out of C code.
>
> I recall hearing about this but I thought it was fixed. Or
> do I need the newest compiler (20010211 release)?

I have fixed this bug 21-Jan-2001.

ChangeLog entry:

Sun Jan 21 09:44:17 2001 Denis Chertykov <[email-masked]>

* config/avr/avr.c (ret_cond_branch): New argument (reverse) added.
If REVERSE nonzero then condition code in X must be reversed.
(encode_section_info): Optimise if/else.
(avr_function_value): Fix formatting.

* config/avr/avr.md (branch): Call to ret_cond_branch changed.
(difficult_branch): Likewise.
(rvbranch): Likewise.
(difficult_rvbranch): Likewise.

* config/avr/avr-protos.h (ret_cond_branch): Prototype changed.

* config/avr/libgcc.S: Fix comment.

From [email-masked] Tue Mar 06 23:03:31 2001
Received: from nuustak.csir.co.za ([146.64.10.11])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14aEJV-0001iH-00
for <[email-masked]>; Tue, 06 Mar 2001 23:03:30 +1300
Received: from CS-IMO.CSIR.CO.ZA (cs-imo.csir.co.za [146.64.10.94])
by nuustak.csir.co.za (8.10.1/8.10.1) with SMTP id f26A4db25171
for <[email-masked]>; Tue, 6 Mar 2001 12:04:40 +0200 (SAT)
Disclaimer: The CSIR exercises no editorial control over E-mail
messages originating in the organisation and the views in this
message are therefore not necessarily those of the CSIR and/or
its employees.
Received: from GW-IMO-Message_Server by CS-IMO.CSIR.CO.ZA
with Novell_GroupWise; Tue, 06 Mar 2001 12:04:35 +0200
Message-Id: <[email-masked]>
X-Mailer: Novell GroupWise Internet Agent 5.5.4.1
Date: Tue, 06 Mar 2001 12:04:34 +0200
From: "Peter Bosscha" <[email-masked]>
To: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="=_6338F023.DEBFD27D"
Subject: [avr-gcc-list] Function pointers
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a MIME message. If you are reading this text, you may want to
consider changing to a mail reader or gateway that understands how to
properly handle MIME multipart messages.

--=_6338F023.DEBFD27D
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Has anyone ever tried the following:

typedef struct {
char name[8];
char minchars;
void (*func)(void);
} Cmnds;

/* Commands */
Cmnds PROGMEM c[] =3D {
{"HELP", 1,help},
{"DUMP", 1,dumpmem},
{"",0, 0}
};

It compiles ok but the address for the function always comes out weird.
Any suggestions ?

--=_6338F023.DEBFD27D
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Description: HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1"=
>
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR></HEAD>
<BODY style=3D"MARGIN-TOP: 2px; FONT: 10pt Arial; MARGIN-LEFT: 2px"=20
bgColor=3D#ffffff>
<DIV>Has anyone ever tried the following:</DIV>
<DIV>&nbsp;</DIV>
<DIV>typedef struct {<BR>&nbsp; char name[8];<BR>&nbsp; char minchars;<BR>&=
nbsp;=20
void (*func)(void);<BR>} Cmnds;</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>/* Commands */<BR>Cmnds PROGMEM c[] =3D=20
{<BR>&nbsp;{"HELP",&nbsp;1,help},<BR>&nbsp;{"DUMP",&nbsp;1,dumpmem},<BR>&nb=
sp;{"",0,=20
0}<BR>};<BR></DIV>
<DIV>It compiles ok but the address for the function always comes out=20
weird.</DIV>
<DIV>Any suggestions ?</DIV></BODY></HTML>

--=_6338F023.DEBFD27D--

From [email-masked] Tue Mar 06 23:06:51 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14aEMk-0001il-00
for <[email-masked]>; Tue, 06 Mar 2001 23:06:50 +1300
Received: from oTRIs.de (DHCP27.o3s.de [192.168.2.126])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id LAA23291
for <[email-masked]>; Tue, 6 Mar 2001 11:08:10 +0100
Message-ID: <[email-masked]>
Date: Tue, 06 Mar 2001 11:08:02 +0100
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
References: <[email-masked]> <020d01c0a32b$e92f8260$0200000a@larry> <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Re: Which CVS Version?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

Denis Chertykov wrote:

> I'm planning to test avr-gcc on this week or on next week.

Ok, please inform me of the tests result. If it is positive I will build
a new win32 executable.

For the others:
Please be patient meanwhile or try the linux-version available as RPM
package in my download page.

Greetings

Gunnar

--
Gunnar Henne Email: [email-masked]
oTRIs GmbH & Co. KG Tel. : 0231 / 10616-21
Landgrafenstr. 153 Fax. : 0231 / 10615-44
44139 Dortmund

From [email-masked] Tue Mar 06 23:48:50 2001
Received: from [212.73.238.45] (helo=mail2.ikoula.com)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14aF1N-0001lL-00
for <[email-masked]>; Tue, 06 Mar 2001 23:48:50 +1300
Received: from GWENAELLE (193.253.237.30[193.253.237.30])by VADOR(MailMax 3.073) with ESMTP id 63361084 for <[email-masked]>; Tue, 06 Mar 2001 11:58:01 +0100 PST
Message-ID: <[email-masked]>
From: "thierry coulon" <[email-masked]>
To: <[email-masked]>
Date: Tue, 6 Mar 2001 11:52:22 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_001C_01C0A633.E78945D0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.3018.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
Subject: [avr-gcc-list] About the ATMEL 89C2051
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

C'est un message de format MIME en plusieurs parties.

------=_NextPart_000_001C_01C0A633.E78945D0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,=20

I'm looking for information to compile a program in C for an ATMEL =
89C2051 processor and I don't find any information about it. I guess =
this chip is 8051 compatible but it's only a guess, any help will be =
welcomed.

Thanks for your attention

RGDS

Thierry Coulon

------=_NextPart_000_001C_01C0A633.E78945D0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello, </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I'm looking for information to compile =
a program in=20
C for an ATMEL 89C2051 processor and&nbsp;I don't find any information =
about it.=20
I guess this chip is 8051 compatible but it's only a guess, any help =
will be=20
welcomed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for your attention</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>RGDS</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thierry =
Coulon</FONT></DIV></BODY></HTML>

------=_NextPart_000_001C_01C0A633.E78945D0--

From [email-masked] Wed Mar 07 00:06:33 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14aFIW-0001mQ-00
for <[email-masked]>; Wed, 07 Mar 2001 00:06:32 +1300
Received: from oTRIs.de (DHCP27.o3s.de [192.168.2.126])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id MAA30365;
Tue, 6 Mar 2001 12:07:59 +0100
Message-ID: <[email-masked]>
Date: Tue, 06 Mar 2001 12:07:51 +0100
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.6 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>, [email-masked]
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Re: About the ATMEL 89C2051
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Thierry,

thierry coulon wrote:
> I guess
> this chip is 8051 compatible but it's only a guess, any help will be
> welcomed.

You guess right: it is 8051 compatible, so you are wrong in this list.
Please visit sdcc.sourceforge.net. You can get a datasheet from
www.atmel.com.

Greetings

Gunnnar

--
Gunnar Henne Email: [email-masked]
oTRIs GmbH & Co. KG Tel. : 0231 / 10616-21
Landgrafenstr. 153 Fax. : 0231 / 10615-44
44139 Dortmund

From [email-masked] Wed Mar 07 21:06:45 2001
Received: from mx0.gmx.net ([213.165.64.100])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14aYy3-0002bR-00
for <[email-masked]>; Wed, 07 Mar 2001 21:06:43 +1300
Received: (qmail 7034 invoked by uid 0); 7 Mar 2001 08:07:43 -0000
Date: Wed, 7 Mar 2001 09:07:43 +0100 (MET)
From: Klaus Rudolph <[email-masked]>
To: [email-masked]
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-Authenticated-Sender: [email-masked]
X-Authenticated-IP: [194.120.191.3]
Message-ID: <[email-masked]>
X-Mailer: WWW-Mail 1.5 (Global Message Exchange)
X-Flags: 0001
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] avr-as macro calls with char constant
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi All,

I have a problem with assembler macro calls. I find no
way to get a char constant work within a macro call, only
the hex constant works fine. Why? Is there a way to change
this behavior. A work around maybe?
Here the example:

********************************************

#define maintmp r18

; The macro which works fine

.macro WorkAtKey Key Function
cpi maintmp, \Key
brne l1_WorkAtKey\@
rcall \Function
rjmp start
l1_WorkAtKey\@:
.endm

; the macro calls for function to key assignment
start:
WorkAtKey 0x61 func1 ; this works well
;WorkAtKey 'b' func2 ; this gives the error ***ERROR***
; is there a way to make that work with direct
; giving the char quoted or not to the macro call????

;and the functions ...

func1:
ret

func2:
ret

************************************************
EOF

Thanks

Klaus

P.S. In hope this list is not only for discuss C-language problems
with the avr? If so, tell me. Thanks

--
Sent through GMX FreeMail - http://www.gmx.net

From [email-masked] Wed Mar 07 22:41:53 2001
Received: from nuustak.csir.co.za ([146.64.10.11])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14aaS6-0002fN-00
for <[email-masked]>; Wed, 07 Mar 2001 22:41:51 +1300
Received: from CS-IMO.CSIR.CO.ZA (cs-imo.csir.co.za [146.64.10.94])
by nuustak.csir.co.za (8.10.1/8.10.1) with SMTP id f279h0105711
for <[email-masked]>; Wed, 7 Mar 2001 11:43:00 +0200 (SAT)
Disclaimer: The CSIR exercises no editorial control over E-mail
messages originating in the organisation and the views in this
message are therefore not necessarily those of the CSIR and/or
its employees.
Received: from GW-IMO-Message_Server by CS-IMO.CSIR.CO.ZA
with Novell_GroupWise; Wed, 07 Mar 2001 11:42:56 +0200
Message-Id: <[email-masked]>
X-Mailer: Novell GroupWise Internet Agent 5.5.4.1
Date: Wed, 07 Mar 2001 11:42:51 +0200
From: "Peter Bosscha" <[email-masked]>
To: <[email-masked]>
Cc: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Subject: [avr-gcc-list] Function pointers (again)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I seem to have caused some confusion with the previous mail.
Yes, I'm aware that when accessing the struct, the generated code accesses =
Ram and not the Flash.
But, what I'm after is generating the right address in the struct in the =
first place, that's the bit that's bothering me even more.
The idea is that the Z register gets filled from the struct followed by an =
icall.
Looking in the rom file at the struct however, the address filled in the =
struct is definitely not that of the actual function.

Regards
Peter
(Hey ! managed to switch of my HTML attachments, making progress ...)

From [email-masked] Thu Mar 08 00:45:27 2001
Received: from mail.tor.axxent.ca ([209.250.128.26])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14acNi-0002k6-00
for <[email-masked]>; Thu, 08 Mar 2001 00:45:27 +1300
Received: from digicom (dial-0087.tor.axxent.ca [216.249.0.87])
by mail.tor.axxent.ca (8.11.0/8.9.3) with ESMTP id f27BkvA07845
for <[email-masked]>; Wed, 7 Mar 2001 06:46:57 -0500 (EST)
Received: from cwall by digicom with local (Exim 3.12 #1 (Debian))
id 14acSp-00008o-00; Wed, 07 Mar 2001 06:50:43 -0500
Date: Wed, 7 Mar 2001 06:50:43 -0500
From: Carl Wall <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
Mail-Followup-To: [email-masked]
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Wed, Mar 07, 2001 at 09:07:43AM +0100
Subject: [avr-gcc-list] STK500 serial Communication Protocol
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Any one (Atmel?) have the serial communication protocol for the STK500,
so that the tools used under Linux, can be updated to work with this new
board?

Thanks
Carl
--
Carl A. Wall VE3APY Toronto, Ontario, Canada
"Created on DEBIAN 2.2, an alternative to Microsoft Systems
and a GNU/Linux distribution of Open Source programming"

From [email-masked] Thu Mar 08 03:01:56 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14aeVm-0002pZ-00
for <[email-masked]>; Thu, 08 Mar 2001 03:01:55 +1300
Received: from oTRIs.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id PAA28816
for <[email-masked]>; Wed, 7 Mar 2001 15:03:25 +0100
Message-ID: <[email-masked]>
Date: Wed, 07 Mar 2001 15:07:34 +0100
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] New Win32 binaries for testing
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I got the CVS sources from binutils + gcc compiled for Windows using the
mingw32 tools.

I have successfully compiled the avr-libc using the known scheme.
I tried to open a sample program with AStudio3.22 under Win2000, but it
hanged. :-(

http://www.combio.de/avr/binutils-2001.02.28.mingw32.tar.gz
http://www.combio.de/avr/gcc-2001.02.28.mingw32.tar.gz

Happy testing!

Gunnar
--
Gunnar Henne Email: [email-masked]
oTRIs GmbH & Co. KG Tel. : 0231 / 10616-21
Landgrafenstr. 153 Fax. : 0231 / 10615-44
44139 Dortmund

From [email-masked] Thu Mar 08 05:18:49 2001
Received: from citycenter.citilink.com ([209.98.8.5])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ageG-0002wQ-00
for <[email-masked]>; Thu, 08 Mar 2001 05:18:48 +1300
Received: (from dlarson@localhost) by citycenter.citilink.com (8.8.8/8.7.5) id KAA13827; Wed, 7 Mar 2001 10:13:11 -0600 (CST)
Posted-Date: Wed, 7 Mar 2001 10:13:11 -0600 (CST)
Message-Id: <[email-masked]>
From: "Dan Larson" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Wed, 07 Mar 2001 10:22:19 -0600
Reply-To: "Dan Larson" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 98 Standard (2.00.1500) For Windows NT (4.0.1381;3)
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Use of external RAM
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I am new to GCC in general, and also to the AVR line, so please forgive
a simple question...

Are there any special steps to use external RAM with the compiler?

I know about setting the SRE and SRW bits in MCUCR via a hook to the reset vector,
but I was wondering if there is anything that needs to be done to tell the compiler / runtime
library / linker about te extra RAM not built into the CPU. This would be with an 8515, mega103,
or mega161.

TIA,

Dan

From [email-masked] Thu Mar 08 12:53:17 2001
Received: from moutvdom00.kundenserver.de ([195.20.224.149])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ank4-0003HY-00
for <[email-masked]>; Thu, 08 Mar 2001 12:53:16 +1300
Received: from [195.20.224.209] (helo=mrvdom02.schlund.de)
by moutvdom00.kundenserver.de with esmtp (Exim 2.12 #2)
id 14anlY-0000GM-00
for [email-masked]; Thu, 8 Mar 2001 00:54:48 +0100
Received: from pc19f7723.dip.t-dialin.net ([193.159.119.35] helo=Karsten-Becker.de)
by mrvdom02.schlund.de with esmtp (Exim 2.12 #2)
id 14anlP-0001EN-00
for [email-masked]; Thu, 8 Mar 2001 00:54:39 +0100
Message-ID: <[email-masked]>
Date: Thu, 08 Mar 2001 00:53:37 +0100
From: Karsten Becker <[email-masked]>
X-Mailer: Mozilla 4.7 [de] (Win98; I)
X-Accept-Language: de
MIME-Version: 1.0
To: "[email-masked]" <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Using Inline ASM
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,
I really like AVR-Gcc now. You did a great job in this Software.

But i have a problem with my code
I want to to perform a swap on a variable so I use the command asm("swap
stat"); where stat is my u08 variable. The appearing error-msg
is:ccPmfefb.s:144: Error: constant value required
What is wrong with my code? (I'm absolutly sure it's my code ;-)
kind regards
Karsten

From [email-masked] Thu Mar 08 23:21:42 2001
Received: from [193.101.57.9] (helo=ida.interface-business.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14axYC-0003f1-00
for <[email-masked]>; Thu, 08 Mar 2001 23:21:41 +1300
Received: (from j@localhost)
by ida.interface-business.de id f28ANCI16186;
Thu, 8 Mar 2001 11:23:12 +0100 (MET)
Date: Thu, 8 Mar 2001 11:23:12 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] Using Inline ASM
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Karsten Becker <[email-masked]> wrote:

> I want to to perform a swap on a variable so I use the command asm("swap
> stat"); where stat is my u08 variable.

Someone recently (re-)posted an introduction to asm statements in gcc
here, you should find this in the archive of the list.

asm volatile("swap %0", "=r" (stat) : "0" (stat));

should do the trick. In short, it means that gcc must not move the
asm instruction away from that place in the code during optimization
(`volatile'), and that the compiler should assign exactly one register
("r") for the assembler statement which also gets the result by the
asm statement ("="), and that it should either keep the variable
`stat' in that register or it should arrange for code to copy the
contents in and out of that variable. The "0" means that the asm
instruction uses the same operand for input and output.

Too bad the optimizer doesn't completely detect the case in:

stat = (stat << 4) | (stat >> 4);

although it's not too bad at all:

mov r25,r24
swap r24
andi r24,0xf0
swap r25
andi r25,0x0f
or r25,r24

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Fri Mar 09 06:22:24 2001
Received: from hertz.ikp.physik.tu-darmstadt.de ([130.83.24.91])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14b47I-0003ui-00
for <[email-masked]>; Fri, 09 Mar 2001 06:22:20 +1300
Received: (from bon@localhost)
by hertz.ikp.physik.tu-darmstadt.de (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) id f28HNuD20792;
Thu, 8 Mar 2001 18:23:56 +0100
X-Authentication-Warning: hertz.ikp.physik.tu-darmstadt.de: bon set sender to [email-masked] using -f
From: Uwe Bonnes <[email-masked]>
Message-ID: <[email-masked]>
Date: Thu, 8 Mar 2001 18:23:56 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: [email-masked]
X-Mailer: VM 6.90 under Emacs 20.7.1
Subject: [avr-gcc-list] PonyProg Interface for UISP
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hallo Marek,

please find appended a patch to uisp-20010211 that adds the PonyProg
Interface to uisp. I had posted a similar patch last year.

Find more info about PonyProg at http://www.lancos.com/prog.html and in the
header of PonyProg.C.

The Ponyprog interface is very similar to the DAPA interface, but uses the
serial port instead of the parallel port. I use it heavily on my designs, as
I have to put only a few parts on the Microcontroller board (1 Sub-D Socket,
4 resistors, 2 Diodes, 2 Z-Diodes and one transistor) to get a fully
functional programming interface to the AVR board. Only a normal serial line
cable is needed to connect the PC to the board.

Because of lack of C++ knowledge I nearly duplicated AvrDummy.C to link down
to PonyProg.C where all the interface dependant code resides.

Main.c|
|-- AvrAtmel.C --- Serial.C
|
|-- AvrDummy.C --- DAPA.C
|
|-- PonyDummy.C -- PonyProg.C

I would like to hear for a solution that doesnt need PonyProg.C but would
reuse AvrDummy.C.

Ponyprog.C only uses the IOCTL interface to the serial port. No direct IO is
provided.

Bye
--
Uwe Bonnes [email-masked]

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

diff -uwrN uisp-20010211.orig/src/Main.C uisp-20010211/src/Main.C
--- uisp-20010211.orig/src/Main.C Sun Feb 11 20:44:17 2001
+++ uisp-20010211/src/Main.C Thu Mar 8 16:56:48 2001
@@ -12,6 +12,7 @@
#include "Terminal.h"
#include "MotIntl.h"
#include "AvrAtmel.h"
+#include "PonyDummy.h"
#ifndef NO_DAPA
# include "AvrDummy.h"
#endif
@@ -29,7 +30,8 @@
TTerminal terminal;

const char* version = "uisp version 0.2b, Uros Platise (c) 1997-1999\n"
-"uisp-20010211 update by Marek Michalkiewicz\n";
+"uisp-20010211 update by Marek Michalkiewicz\n"
+"ponyprog Interface by Uwe Bonnes [email-masked]\n";
const char* help_screen =
"Syntax: uisp [-v{=level}] [-h] [--help] [--version] [--hash=perbytes]\n"
" [-datmel]"
@@ -46,6 +48,7 @@
" [--segment=flash|eeprom|fuse] [--terminal]\n\n"
"Programming Methods:\n"
" -datmel Standard Atmel Serial Programmer/Atmel Low Cost Programmer\n"
+" -dpony Serial Programmer connected in PonyProg way\n"
#ifndef NO_DAPA
" -dapa Direct AVR Parallel Access\n"
" -dstk200 Parallel Starter-Kit 200\n"
@@ -73,6 +76,11 @@
" are listed. Set -dpart=auto for auto-select.\n"
" -dspeed Set speed of the serial interface (default 19200)\n"
"\n"
+"PonyProg Settings:\n"
+" -dserial Set serial interface as /dev/ttySx (default /dev/avr)\n"
+" -dinvert [mosi,miso,sck] Invert the given line\n"
+" -dreset account for additional reset delay (in milliseconds)\n"
+"\n"
"Functions:\n"
" --upload Upload \"input_file\" to the AVR memory.\n"
" --verify Verify \"input_file\" (processed after the --upload opt.)\n"
@@ -179,6 +187,7 @@
setgid(getgid());
setuid(getuid());
if (GetCmdParam("-datmel", false)){ device = new TAvrAtmel(); }
+ if (GetCmdParam("-dpony", false)){device = new TPonyDummy();}
}

/* Check Device's bad command line params. */
diff -uwrN uisp-20010211.orig/src/Makefile uisp-20010211/src/Makefile
--- uisp-20010211.orig/src/Makefile Sat Feb 10 15:26:58 2001
+++ uisp-20010211/src/Makefile Thu Mar 8 16:56:48 2001
@@ -35,10 +35,10 @@
CPPFLAGS= -Wall -O3 -g # -DHAVE_PPI # -DNO_DIRECT_IO # -DOLD_DELAY_LOOP # -DNO_DAPA

SRC = Main.C Terminal.C MotIntl.C Avr.C AvrAtmel.C AvrDummy.C \
- Serial.C DAPA.C
+ Serial.C DAPA.C PonyDummy.C PonyProg.C

OBJ = Main.o Terminal.o MotIntl.o Avr.o AvrAtmel.o AvrDummy.o \
- Serial.o DAPA.o
+ Serial.o DAPA.o PonyDummy.o PonyProg.o

all: uisp

diff -uwrN uisp-20010211.orig/src/PonyDummy.C uisp-20010211/src/PonyDummy.C
--- uisp-20010211.orig/src/PonyDummy.C Thu Jan 1 01:00:00 1970
+++ uisp-20010211/src/PonyDummy.C Thu Mar 8 16:56:48 2001
@@ -0,0 +1,503 @@
+/*
+ PonyDummy.C
+
+ Dummy device driver for the Ponyprog access
+ Uros Platise (c) 1999
+*/
+
+
+#include <string.h>
+#include "timeradd.h"
+#include "PonyDummy.h"
+#include "Error.h"
+
+/* Private Functions
+*/
+
+void TPonyDummy::EnableAvr(){
+ unsigned char prg [4] = { 0xAC, 0x53, 0, 0 };
+ int try_number = 32;
+ bool no_retry = GetCmdParam("-dno-retry", false);
+ const char *part_name = GetCmdParam("-dpart");
+
+ if (part_name && strcasecmp(part_name, "at90s1200") == 0)
+ no_retry = true; /* XXX */
+
+ /* Enable AVR programming mode */
+ do{
+ prg[0]=0xAC; prg[1]=0x53; prg[2]=prg[3]=0;
+ Send(prg, 4);
+ if (no_retry) break;
+ if (prg[2] == 0x53) break;
+ PulseSck();
+ } while (try_number--);
+
+ if (try_number<=32){
+ Info(2,"AVR Direct Parallel Access succeeded after %d retries.\n",
+ 32-try_number);
+ }
+
+ /* Get AVR Info */
+ vendor_code = GetPartInfo(0);
+ part_family = GetPartInfo(1);
+ part_number = GetPartInfo(2);
+ Identify();
+}
+
+TByte TPonyDummy::GetPartInfo(TAddr addr){
+ TByte info [4] = { 0x30, 0, addr, 0 };
+ Send(info, 4);
+ return info[3];
+}
+
+void TPonyDummy::WriteProgramMemoryPage()
+{
+ struct timeval t_start_wr, t_start_poll, t_wait, t_timeout, t_end, t_write;
+
+ bool poll_data = use_data_polling && TestFeatures(AVR_PAGE_POLL)
+ && (page_poll_byte != 0xFF);
+
+ TByte prg_page [4] = { 0x4C,
+ (TByte)((page_addr >> 9) & 0xff),
+ (TByte)((page_addr >> 1) & 0xff),
+ 0 };
+
+ gettimeofday(&t_start_wr, NULL);
+ t_wait.tv_sec = 0;
+ t_wait.tv_usec = Get_t_wd_flash();
+
+ Info(4, "Programming page address: %d (%.2x, %.2x, %.2x, %.2x)\n",
+ page_addr, prg_page[0], prg_page[1], prg_page[2], prg_page[3]);
+ Send(prg_page, 4);
+
+ gettimeofday(&t_start_poll, NULL);
+ timeradd(&t_start_poll, &t_wait, &t_timeout);
+
+ /* Wait */
+ do {
+ gettimeofday(&t_end, NULL);
+ if (poll_data) {
+ TByte rbyte = ReadByte(page_poll_addr);
+ if (rbyte == page_poll_byte)
+ break;
+ }
+ } while (timercmp(&t_end, &t_timeout, <));
+
+ /* Write Statistics */
+ timersub(&t_end, &t_start_wr, &t_write); /* t_write = t_end - t_start_wr */
+ if (poll_data) {
+ float write_time = 1.0e-6 * t_write.tv_usec + t_write.tv_sec;
+ total_poll_time += write_time;
+ if (max_poll_time < write_time)
+ max_poll_time = write_time;
+ if (min_poll_time > write_time)
+ min_poll_time = write_time;
+ total_poll_cnt++;
+ }
+
+ page_addr_fetched=false;
+ page_poll_byte = 0xFF;
+}
+
+
+/* Device Interface Functions
+*/
+
+TByte TPonyDummy::ReadByte(TAddr addr){
+ TByte readback = 0xFF;
+
+ CheckMemoryRange(addr);
+ if (segment==SEG_FLASH){
+ TByte hl = (addr&1) ? 0x28 : 0x20;
+ addr>>=1;
+ TByte flash [4] = { hl,
+ (TByte)((addr >> 8) & 0xff),
+ (TByte)(addr & 0xff),
+ 0 };
+ Send(flash, 4);
+ readback = flash[3];
+ }
+ else if (segment==SEG_EEPROM){
+ TByte eeprom [4] = { 0xA0,
+ (TByte)((addr>>8)&0xff),
+ (TByte)(addr&0xff),
+ 0 };
+ Send(eeprom, 4);
+ readback = eeprom[3];
+ }
+ else if (segment==SEG_FUSE) {
+ switch (addr) {
+ case 0:
+ if (TestFeatures(AVR_FUSE_RD))
+ readback = ReadFuseLowBits();
+ else if (TestFeatures(AVR_LOCK_RD76))
+ readback = ReadLockFuseBits();
+ break;
+ case 1:
+ if (TestFeatures(AVR_FUSE_HIGH))
+ readback = ReadFuseHighBits();
+ break;
+ case 2:
+ if (TestFeatures(AVR_CAL_RD))
+ readback = ReadCalByte();
+ break;
+ case 3:
+ readback = ReadLockBits();
+ break;
+ }
+ Info(3, "Read fuse/cal/lock: byte %d = 0x%02X\n",
+ (int) addr, (int) readback);
+ }
+ return readback;
+}
+
+/*
+ Read Lock/Fuse Bits: 7 6 5 4 3 2 1 0
+ 2333,4433,m103,m603,tn12,tn15: x x x x x LB2 LB1 x
+ 2323,8535: LB1 LB2 SPIEN x x x x FSTRT
+ 2343: LB1 LB2 SPIEN x x x x RCEN
+ tn22: LB1 LB2 SPIEN x x x x 0
+ m161,m163: x x BLB12 BLB11 BLB02 BLB01 LB2 LB1
+ */
+TByte
+TPonyDummy::ReadLockFuseBits()
+{
+ TByte lockfuse[4] = { 0x58, 0, 0, 0 };
+ Send(lockfuse, 4);
+ return lockfuse[3];
+}
+
+/*
+ Read Fuse Bits (Low): 7 6 5 4 3 2 1 0
+ 2333,4433: x x SPIEN BODLV BODEN CKSL2 CKSL1 CKSL0
+ m103,m603: x x SPIEN x EESAV 1 SUT1 SUT0
+ tn12: BODLV BODEN SPIEN RSTDI CKSL3 CKSL2 CKSL1 CKSL0
+ tn15: BODLV BODEN SPIEN RSTDI x x CKSL1 CKSL0
+ m161: x BTRST SPIEN BODLV BODEN CKSL2 CKSL1 CKSL0
+ m163: BODLV BODEN SPIEN x CKSL3 CKSL2 CKSL1 CKSL0
+ */
+TByte
+TPonyDummy::ReadFuseLowBits()
+{
+ TByte fuselow[4] = { 0x50, 0, 0, 0 };
+ Send(fuselow, 4);
+ return fuselow[3];
+}
+
+/*
+ Read Fuse Bits High: 7 6 5 4 3 2 1 0
+ m163: x x x x 1 BTSZ1 BTSZ0 BTRST
+ */
+TByte
+TPonyDummy::ReadFuseHighBits()
+{
+ TByte fusehigh[4] = { 0x58, 0x08, 0, 0 };
+ Send(fusehigh, 4);
+ return fusehigh[3];
+}
+
+/* Read Calibration Byte (m163, tn12) */
+TByte
+TPonyDummy::ReadCalByte()
+{
+ TByte cal[4] = { 0x38, 0, 0, 0 };
+ Send(cal, 4);
+ return cal[3];
+}
+
+/*
+ Write Fuse Bits (old): 7 6 5 4 3 2 1 0
+ 2323,8535: x x x 1 1 1 1 FSTRT
+ 2343: x x x 1 1 1 1 RCEN
+ 2333,4433: x x x BODLV BODEN CKSL2 CKSL1 CKSL0
+ m103,m603: x x x 1 EESAV 1 SUT1 SUT0
+ */
+void
+TPonyDummy::WriteOldFuseBits(TByte val)
+{
+ TByte oldfuse[4] = { 0xAC, (val & 0x1F) | 0xA0, 0, 0xD2 };
+ Send(oldfuse, 4);
+}
+
+/*
+ Write Fuse Bits (Low, new): 7 6 5 4 3 2 1 0
+ m161: 1 BTRST 1 BODLV BODEN CKSL2 CKSL1 CKSL0
+ m163: BODLV BODEN 1 1 CKSL3 CKSL2 CKSL1 CKSL0
+ tn12: BODLV BODEN SPIEN RSTDI CKSL3 CKSL2 CKSL1 CKSL0
+ tn15: BODLV BODEN SPIEN RSTDI 1 1 CKSL1 CKSL0
+
+ WARNING (tn12,tn15): writing SPIEN=1 disables further low voltage programming!
+ */
+void
+TPonyDummy::WriteFuseLowBits(TByte val)
+{
+ TByte fuselow[4] = { 0xAC, 0xA0, 0, val };
+ Send(fuselow, 4);
+}
+
+/*
+ Write Fuse Bits High: 7 6 5 4 3 2 1 0
+ m163: 1 1 1 1 1 BTSZ1 BTSZ0 BTRST
+ */
+void
+TPonyDummy::WriteFuseHighBits(TByte val)
+{
+ TByte fusehigh[4] = { 0xAC, 0xA8, 0, val };
+ Send(fusehigh, 4);
+}
+
+
+void TPonyDummy::WriteByte(TAddr addr, TByte byte, bool flush_buffer)
+{
+ struct timeval t_start_wr, t_start_poll, t_wait, t_timeout, t_end, t_write;
+ TByte rbyte=0;
+ bool device_not_erased=false;
+
+ /* Poll data if use_data_polling is enabled and if page mode
+ is enabled, flash is not selected */
+ bool poll_data = ((segment==SEG_FLASH && !page_size) || segment==SEG_EEPROM)
+ && use_data_polling && TestFeatures(AVR_BYTE_POLL);
+
+ CheckMemoryRange(addr);
+
+ /* For speed, don't program a byte that is already there
+ (such as 0xFF after chip erase). */
+ if (poll_data){
+ rbyte=ReadByte(addr);
+ if (rbyte == byte){return;}
+ if (rbyte != 0xff){device_not_erased=true;}
+ }
+
+ t_wait.tv_sec = 0;
+ t_wait.tv_usec = 500000;
+
+ gettimeofday(&t_start_wr, NULL);
+
+ if (segment==SEG_FLASH){
+
+ /* PAGE MODE PROGRAMMING:
+ If page mode is enabled cache page address.
+ When current address is out of the page address
+ flush page buffer and continue programming.
+ */
+ if (page_size) {
+ Info(4, "Loading data to address: %d (page_addr_fetched=%s)\n",
+ addr, page_addr_fetched?"Yes":"No");
+
+ if (page_addr_fetched && page_addr != (addr & ~(page_size - 1))){
+ WriteProgramMemoryPage();
+ }
+ if (page_addr_fetched==false){
+ page_addr=addr & ~(page_size - 1);
+ page_addr_fetched=true;
+ }
+ if (flush_buffer){WriteProgramMemoryPage();}
+ }
+
+ TByte hl = (addr&1) ? 0x48 : 0x40;
+ TByte flash [4] = { hl,
+ (TByte)((addr >> 9) & 0xff),
+ (TByte)((addr >> 1) & 0xff),
+ byte };
+ Send(flash, 4);
+
+ /* Remember the last non-0xFF byte written, for page write polling. */
+ if (byte != 0xFF) {
+ page_poll_addr = addr;
+ page_poll_byte = byte;
+ }
+
+ /* We do not need to wait for each byte in page mode programming */
+ if (page_size){return;}
+ t_wait.tv_usec = Get_t_wd_flash();
+ }
+ else if (segment==SEG_EEPROM){
+ TByte eeprom [4] = { 0xC0,
+ (TByte)((addr>>8)&0xff),
+ (TByte)(addr&0xff),
+ byte };
+ Send(eeprom, 4);
+ t_wait.tv_usec = Get_t_wd_eeprom();
+ }
+ else if (segment==SEG_FUSE) {
+ Info(3, "Write fuse/lock: byte %d = 0x%02X\n",
+ (int) addr, (int) byte);
+ switch (addr) {
+ case 0:
+ if (TestFeatures(AVR_FUSE_NEWWR))
+ WriteFuseLowBits(byte);
+ else if (TestFeatures(AVR_FUSE_OLDWR))
+ WriteOldFuseBits(byte);
+ break;
+ case 1:
+ if (TestFeatures(AVR_FUSE_HIGH))
+ WriteFuseHighBits(byte);
+ break;
+ /* calibration byte (addr == 2) is read only */
+ case 3:
+ WriteLockBits(byte);
+ break;
+ }
+ t_wait.tv_usec = Get_t_wd_eeprom();
+ }
+
+ gettimeofday(&t_start_poll, NULL);
+ /* t_timeout = now + t_wd_prog */
+ timeradd(&t_start_poll, &t_wait, &t_timeout);
+
+ do {
+ /* Data Polling: if the programmed value reads correctly, and
+ is not equal to any of the possible P1, P2 read back values,
+ it is done; else wait until tWD_PROG time has elapsed.
+ The busy loop here is to avoid rounding up the programming
+ wait time to 10ms timer ticks (for Linux/x86). Programming
+ is not really "hard real time" but 10ms instead of ~4ms for
+ every byte makes it slow. gettimeofday() reads the 8254
+ timer registers (or Pentium cycle counter if available),
+ so it has much better (microsecond) resolution.
+ */
+ gettimeofday(&t_end, NULL);
+ if (poll_data){
+ if ((byte == (rbyte = ReadByte(addr))) &&
+ (byte != 0) && (byte != 0x7F) && (byte != 0x80) && (byte != 0xFF)){
+ break;
+ }
+ }
+ } while (timercmp(&t_end, &t_timeout, <));
+
+ /* Write Statistics */
+ timersub(&t_end, &t_start_wr, &t_write); /* t_write = t_end - t_start_wr */
+ if (poll_data) {
+ float write_time = 1.0e-6 * t_write.tv_usec + t_write.tv_sec;
+ total_poll_time += write_time;
+ if (max_poll_time < write_time)
+ max_poll_time = write_time;
+ if (min_poll_time > write_time)
+ min_poll_time = write_time;
+ total_poll_cnt++;
+ }
+
+ if (poll_data && byte != rbyte){
+ if (device_not_erased){
+ Info(0, "Warning: It seems that device is not erased.\n"
+ " Erase it with the --erase option.\n");
+ }
+ Info(0, "Error: Data polling readback status: write=0x%02x read=0x%02x\n",
+ byte, rbyte);
+ throw Error_Device("If device was erased disable polling with the "
+ "-dno-poll option.");
+ }
+}
+
+void TPonyDummy::FlushWriteBuffer(){
+ if (page_addr_fetched){
+ WriteProgramMemoryPage();
+ }
+}
+
+void TPonyDummy::ChipErase(){
+ TByte chip_erase [4] = { 0xAC, 0x80, 0x00, 0x00 };
+ Info(1, "Erasing device ...\n");
+ Send (chip_erase, 4);
+ Delay_usec(Get_t_wd_erase());
+ PulseReset();
+ Info(1, "Reinitializing device\n");
+ EnableAvr();
+}
+
+/*
+ 0 = program (clear bit), 1 = leave unchanged
+ bit 0 = LB1
+ bit 1 = LB2
+ bit 2 = BLB01
+ bit 3 = BLB02
+ bit 4 = BLB11
+ bit 5 = BLB12
+ bit 6 = 1 (reserved)
+ bit 7 = 1 (reserved)
+ */
+void
+TPonyDummy::WriteLockBits(TByte bits)
+{
+ /* This handles both old (byte 2, bits 1-2)
+ and new (byte 4, bits 0-5) devices. */
+ TByte lock[4] = { 0xAC, 0xF9 | ((bits << 1) & 0x06), 0xFF, bits };
+ TByte rbits;
+
+ Info(1, "Writing lock bits ...\n");
+ Send(lock, 4);
+ Delay_usec(Get_t_wd_erase());
+ PulseReset();
+ Info(1, "Reinitializing device\n");
+ EnableAvr();
+ rbits = ReadLockBits();
+ if (rbits & ~bits)
+ Info(0, "Warning: lock bits write=0x%02X read=0x%02X\n",
+ (int) bits, (int) rbits);
+}
+
+TByte
+TPonyDummy::ReadLockBits()
+{
+ TByte rbits = 0xFF;
+ if (TestFeatures(AVR_LOCK_BOOT)) {
+ /* x x BLB12 BLB11 BLB02 BLB01 LB2 LB1 */
+ rbits = ReadLockFuseBits();
+ } else if (TestFeatures(AVR_LOCK_RD76)) {
+ rbits = ReadLockFuseBits();
+ /* LB1 LB2 x x x x x x -> 1 1 1 1 1 1 LB2 LB1 */
+ rbits = ((rbits >> 7) & 1) | ((rbits >> 5) & 1) | 0xFC;
+ } else if (TestFeatures(AVR_LOCK_RD12)) {
+ rbits = ReadLockFuseBits();
+ /* x x x x x LB2 LB1 x -> 1 1 1 1 1 1 LB2 LB1 */
+ rbits = ((rbits >> 1) & 3) | 0xFC;
+ } else if (GetPartInfo(0) == 0 &&
+ GetPartInfo(1) == 1 &&
+ GetPartInfo(2) == 2) {
+ rbits = 0xFC;
+ }
+ return rbits;
+}
+
+unsigned int TPonyDummy::GetPollCount()
+{
+ return total_poll_cnt;
+}
+
+float TPonyDummy::GetMinPollTime()
+{
+ return min_poll_time;
+}
+
+float TPonyDummy::GetMaxPollTime()
+{
+ return max_poll_time;
+}
+
+float TPonyDummy::GetTotPollTime()
+{
+ return total_poll_time;
+}
+
+void TPonyDummy::ResetMinMax(){
+ min_poll_time = 1.0;
+ max_poll_time = 0.0;
+ total_poll_time = 0.0;
+ total_poll_cnt = 0;
+}
+
+/* Constructor
+*/
+
+TPonyDummy::TPonyDummy():
+ use_data_polling(true){
+
+ ResetMinMax();
+
+ /* Device Command line options ... */
+ if (GetCmdParam("-dno-poll", false)){use_data_polling=false;}
+
+ EnableAvr();
+}
+
+/* eof */
diff -uwrN uisp-20010211.orig/src/PonyDummy.h uisp-20010211/src/PonyDummy.h
--- uisp-20010211.orig/src/PonyDummy.h Thu Jan 1 01:00:00 1970
+++ uisp-20010211/src/PonyDummy.h Thu Mar 8 16:56:48 2001
@@ -0,0 +1,53 @@
+/* AvrDummy.h, Uros Platise (c) 1999 */
+
+#ifndef __PONY_DUMMY
+#define __PONY_DUMMY
+
+#include "Global.h"
+#include "Avr.h"
+#include "PonyProg.h"
+
+class TPonyDummy: public TAvr, TPonyProg {
+private:
+ bool use_data_polling;
+ float min_poll_time, max_poll_time, total_poll_time;
+ unsigned long total_poll_cnt; /* bytes or pages */
+
+ void EnableAvr();
+ TByte GetPartInfo(TAddr addr);
+ void WriteProgramMemoryPage();
+ TByte ReadLockFuseBits();
+ TByte ReadFuseLowBits();
+ TByte ReadFuseHighBits();
+ TByte ReadCalByte();
+ void WriteOldFuseBits(TByte val); /* 5 bits */
+ void WriteFuseLowBits(TByte val);
+ void WriteFuseHighBits(TByte val);
+
+ /* lock bits */
+ void WriteLockBits(TByte bits);
+ TByte ReadLockBits();
+
+public:
+ /* Read byte from active segment at address addr. */
+ TByte ReadByte(TAddr addr);
+
+ /* Write byte to active segment at address addr */
+ void WriteByte(TAddr addr, TByte byte, bool flush_buffer=true);
+ void FlushWriteBuffer();
+
+ /* Chip Erase */
+ void ChipErase();
+
+ /* Transfer Statistics */
+ unsigned int GetPollCount();
+ float GetMinPollTime();
+ float GetTotPollTime();
+ float GetMaxPollTime();
+ void ResetMinMax();
+
+ TPonyDummy();
+ ~TPonyDummy(){}
+};
+
+#endif
diff -uwrN uisp-20010211.orig/src/PonyProg.C uisp-20010211/src/PonyProg.C
--- uisp-20010211.orig/src/PonyProg.C Thu Jan 1 01:00:00 1970
+++ uisp-20010211/src/PonyProg.C Thu Mar 8 16:56:48 2001
@@ -0,0 +1,349 @@
+/*
+ PonyProg.C
+
+ Device driver for Serial Programmer connected in the Ponyprog
+ way (http://www.cs.unibo.it/~lanconel
+
+ Uwe Bonnes [email-masked]
+
+ Short description of the Ponyprog Interface:
+ RS232 line -> ISP connection
+ TXD (out)-> RESET (in)
+ RTS (out)-> SCK (in)
+ DTR (out)-> MOSI (in)
+ CTS (in)-> MISO (out)
+
+ in the smallest configuration, only use a current
+ limiting resistor in the RS232 out lines, a 4V7 Z-Diode
+ to clamp the positive RS232 voltage. Maybe a Schottky diode
+ is needed on the Reset Line to clamp the negative voltage.
+ Most modern RS232 receivers should recognise the TTL levels
+ on their CTS inputline, also this is out of the RS232 specs.
+ This configuration needs no line inverted
+
+ A more secure version uses uses some Reset generator like the
+ MAX823/825 and feed the clamped RXD line via a possible transistor
+ inverter to the MAX 823/825 Master Reset Input. The additional
+ reset delay of these parts must be accounted with the
+ -reset=xxx (milliseconds) command line parameter.
+
+ Using 3 RS232 Receivers and one RS232 Transmitter needs more parts, but
+ gives a solution acording to the specs.
+
+ If the SPI interface is uses for more then programming, isolate
+ appropriate lines during programming, e.g. with Tristat drivers enabled
+ by the inverted TXD signal.
+
+ Account for inverting element in the lines with the
+ -dinvert mosi,miso,sck command line argument
+
+ I didn't get a version to work that uses a inverted reset line however.
+
+ For EAGLE sample drawings of different implementations of the Ponyprog
+ interface, ask [email-masked]
+
+ The Rs232 Driver in the PC is inverting!
+*/
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <ctype.h>
+#include <termios.h>
+#include <sys/ioctl.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <sys/time.h>
+#include "PonyProg.h"
+
+#if defined(TIOCMGET) && defined(TIOCMSET) && defined(TIOCSBRK) && defined(TIOCCBRK)
+
+/* Minimum RESET# high time in microseconds.
+ Should be enough to charge a capacitor between RESET# and GND
+ (it is recommended to use a voltage detector with open collector
+ output, and only something like 100 nF for noise immunity). */
+#ifndef RESET_DEACTIVATE_TIME
+#define RESET_DEACTIVATE_TIME 1000
+#endif
+
+/* Delay from RESET# low to sending program enable command
+ (the datasheet says it must be at least 20 ms). Also wait time
+ for crystal oscillator to start after possible power down mode. */
+#ifndef RESET_ACTIVATE_TIME
+#define RESET_ACTIVATE_TIME 30000
+#endif
+
+
+/* The IOMCM(GET|SET) IOCTL is quite slow. On a Dual P 366
+ I get around 250000 Calls per second. This is quite slow enough
+ for the lines to settle, so we don't need extra delays
+*/
+int inline TPonyProg::GetSendBit(int value)
+{
+ int result;
+
+ ioctl(fd,TIOCMSET, &flags);
+ if (mosi_invert) value = !value;
+ if (value) /* DTR is MOSI*/
+ flags |= TIOCM_DTR;
+ else
+ flags &= ~TIOCM_DTR;
+ ioctl(fd,TIOCMSET, &flags);/* Duration of this command must be longer than "SCK Low to MISO Valid" */
+ ioctl(fd,TIOCMGET, &flags);/* Duration of this command must be longer than "MOSI Setup to SCK HIGH" */
+ result =(miso_invert)? (~flags & TIOCM_CTS):(flags & TIOCM_CTS);
+ if (sck_invert)
+ {
+ flags &= ~TIOCM_RTS;
+ ioctl(fd,TIOCMSET, &flags);
+ flags |= TIOCM_RTS;
+ }
+ else
+ {
+ flags |= TIOCM_RTS;
+ ioctl(fd,TIOCMSET, &flags);
+ flags &= ~TIOCM_RTS;
+ }
+ return result;
+}
+
+void
+TPonyProg::PulseSck()
+{
+ OutSck(LOGICAL_ACTIVE);
+ OutSck(LOGICAL_INACTIVE);
+}
+
+void
+TPonyProg::PulseReset()
+{
+ /* necessary delays already included in these methods */
+ OutReset(LOGICAL_INACTIVE);
+ usleep(reset_delay); /* wait for the RESET Timer to go inactive
+ waiting longer doesn't harm*/
+ OutReset(LOGICAL_ACTIVE);
+}
+
+void TPonyProg::OutData(int b)
+{
+ int value= (mosi_invert)? !b:b;
+
+ ioctl(fd,TIOCMGET, &flags);
+ if (value)
+ flags |= TIOCM_DTR;
+ else
+ flags &= ~TIOCM_DTR;
+ ioctl(fd,TIOCMSET, &flags);
+}
+
+void TPonyProg::OutSck(int b)
+{
+ int value= (sck_invert)? !b:b;
+
+ ioctl(fd,TIOCMGET, &flags);
+ if (value)
+ flags |= TIOCM_RTS;
+ else
+ flags &= ~TIOCM_RTS;
+ ioctl(fd,TIOCMSET, &flags);
+}
+
+void TPonyProg::OutReset(int b)
+{
+ if (b == LOGICAL_ACTIVE)
+ ioctl(fd,TIOCSBRK,0);
+ else
+ ioctl(fd,TIOCCBRK,0);
+
+}
+void TPonyProg::Init()
+{
+ Info(1,"TPonyProg::Init called\n");
+ OutReset(LOGICAL_INACTIVE); /* deassert RESET */
+ usleep(reset_delay); /* wait for the RESET Timer to go inactive
+ waiting longer doesn't harm*/
+ OutData(LOGICAL_ACTIVE);
+ OutSck(LOGICAL_INACTIVE);
+ OutReset(LOGICAL_ACTIVE);
+ usleep(20000);
+}
+
+unsigned inline char TPonyProg::SendRecv(unsigned char b)
+{
+ unsigned char mask=0x80, received=0;
+
+ while (mask)
+ {
+ received |= (GetSendBit(b & mask))?mask:0;
+ mask >>=1;
+ }
+ return received;
+}
+
+int TPonyProg::Send (unsigned char* queue, int queueSize, int rec_queueSize=-1){
+ unsigned char *p = queue, ch;
+ int i = queueSize;
+
+ /*if (rec_queueSize==-1){rec_queueSize = queueSize;}
+ Info (4,"send(recv): ");*/
+ while (i--){
+ ch = SendRecv(*p);
+ /*Info (4,"%02x(%02x) ", *p,ch);*/
+ *p++ = ch;
+ }
+ /*Info(2,"\n");*/
+ return queueSize;
+}
+
+#ifndef MIN_SLEEP_USEC
+#define MIN_SLEEP_USEC 20000
+#endif
+
+void
+TPonyProg::Delay_usec(long t)
+{
+ struct timeval t1, t2;
+
+ if (t <= 0)
+ return; /* very short delay for slow machines */
+ gettimeofday(&t1, NULL);
+ if (t > MIN_SLEEP_USEC)
+ usleep(t - MIN_SLEEP_USEC);
+ /* loop for the remaining time */
+ t2.tv_sec = t / 1000000UL;
+ t2.tv_usec = t % 1000000UL;
+ timeradd(&t1, &t2, &t1);
+ do {
+ gettimeofday(&t2, NULL);
+ } while (timercmp(&t2, &t1, <));
+}
+
+int TPonyProg::OpenSerial(const char* devpathname)
+{
+ const char *devname;
+ int chars_read,flags;
+
+ // implement device locking in /var/lock/LCK..ttySx
+
+ devname=strrchr(devpathname, '/');
+ if (devname)
+ devname++;
+ else
+ devname=devpathname;
+ Info(0, "devpathname %s devname %s\n",devpathname,devname);
+ sprintf(lockname,"/var/lock/LCK..%s",devname);
+ fd = open ((const char *)lockname,O_RDWR|O_CREAT,0777);
+ if (fd == -1)
+ {
+ fd=open ((const char *)lockname,O_RDONLY);
+ if (fd == -1)
+ {
+ Info(0, "Can't open device %s and can't unlock %s\n",
+ devpathname,lockname);
+ exit(1);
+ }
+ lockname[0]=0;
+ chars_read = read(fd,temp,MAXLINESIZE-1);
+ temp[chars_read]=0;
+ Info(0, "PonyProg::OpenSerial locked by %s\n",
+ devname);
+ close(fd);
+ exit(1);
+ }
+
+ sprintf(temp,"%10d\n", (int) getpid() );
+ write(fd,temp,strlen(temp));
+ close(fd);
+
+ fd = open (devpathname,O_RDWR);
+ if (fd == -1)
+ {
+ Info(0, "Can't open %s\n",devpathname);
+ unlink(lockname);
+ exit(1);
+ }
+
+ /* Check if IOCTL are available during runtime*/
+
+ if ((ioctl(fd,TIOCCBRK,0) == -1) || (ioctl(fd,TIOCMGET, &flags)== -1))
+ {
+ Info(0, "PonyProg: Needed IOCTLs not available");
+ CloseSerial();
+ exit(1);
+ }
+ return fd;
+}
+
+void TPonyProg::CloseSerial()
+ {
+ close(fd);
+ unlink(lockname);
+ }
+
+/* constructor/Destructor
+ */
+
+struct termios pmode;
+
+TPonyProg::TPonyProg()
+{
+ const char* dev_name = "/dev/avr";
+ const char* val;
+ char *p;
+
+ if ((val=GetCmdParam("-dserial")))
+ {dev_name = val;}
+ if ((val=GetCmdParam("-dinvert")))
+ {
+ strncpy(temp,val,MAXLINESIZE-1);
+ for (p=temp; *p; p++)
+ *p=toupper(*p);
+ Info(1,"Inverting %s\n",temp);
+ if (strstr(temp,"SCK"))
+ sck_invert=1;
+ else
+ sck_invert=0;
+ if (strstr(temp,"MOSI"))
+ mosi_invert=1;
+ else
+ mosi_invert=0;
+ if (strstr(temp,"MISO"))
+ miso_invert=1;
+ else
+ miso_invert=0;
+ }
+ if ((val=GetCmdParam("-dreset")))
+ {
+ reset_delay=atoi(val);
+ Info(1,"Using reset delay %d\n",reset_delay);
+ }
+ else
+ {
+ reset_delay=20;
+ Info(1,"Using default reset delay\n");
+ }
+ reset_delay*= 1000;
+ if (GetCmdParam("-dno-poll", false))
+ {
+ Info(1,"Not using polling\n");
+ use_data_polling=false;
+ }
+
+ OpenSerial(dev_name);
+ Info(0, "Serial successfull opened\n");
+ Init();
+ Info(3, "Init\n");
+}
+
+TPonyProg::~TPonyProg()
+{
+ OutSck(LOGICAL_INACTIVE);
+ OutReset(LOGICAL_INACTIVE);
+ CloseSerial();
+ Info(0, "PonyProg ended\n");
+}
+#else
+WARN
+#endif /*IOCTL's not available for compiling*/
diff -uwrN uisp-20010211.orig/src/PonyProg.h uisp-20010211/src/PonyProg.h
--- uisp-20010211.orig/src/PonyProg.h Thu Jan 1 01:00:00 1970
+++ uisp-20010211/src/PonyProg.h Thu Mar 8 17:02:58 2001
@@ -0,0 +1,55 @@
+/*
+ PonyProg.h
+ Device driver for Serial Programmer connected in the Ponyprog
+ way (http://www.cs.unibo.it/~lanconel
+
+ Uwe Bonnes(c) copyright 2000
+*/
+
+#ifndef __PonyProg
+#define __PonyProg
+
+#include "Global.h"
+#include "Avr.h"
+
+#define MAXLINESIZE 256
+
+class TPonyProg{
+private:
+ int fd;
+ int mosi_invert;
+ int miso_invert;
+ int sck_invert;
+ int reset_delay;
+ int use_data_polling;
+ int flags;
+ char lockname[MAXLINESIZE];
+ char temp[MAXLINESIZE];
+ long n_per_ms;
+
+protected:
+ enum LogicalStates{LOGICAL_INACTIVE=0, LOGICAL_ACTIVE=1};
+
+private:
+ int GetSendBit(int);
+ void OutData(int);
+ void OutSck(int);
+ void OutReset(int);
+ int OpenSerial(const char* devpathname);
+ void CloseSerial();
+ unsigned char SendRecv(unsigned char b);
+
+
+public:
+
+ void PulseSck();
+ void PulseReset();
+ int Send(unsigned char*, int, int rec_queueSize=-1);
+ void Init();
+ void Delay_usec(long);
+
+ TPonyProg();
+ ~TPonyProg();
+};
+
+#endif

From [email-masked] Fri Mar 09 15:44:30 2001
Received: from [211.233.30.161] (helo=smail-12.hanmail.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14bCp4-0004Jg-00
for <[email-masked]>; Fri, 09 Mar 2001 15:40:07 +1300
Received: from www28.hanmail.net ([211.32.117.208])
by smail-12.hanmail.net (8.10.0/8.9.1) with ESMTP id f292dLc27228;
Fri, 9 Mar 2001 11:39:21 +0900
Received: (from hanadmin@localhost)
by www28.hanmail.net (8.10.0/8.9.1) id f292d9U00749;
Fri, 9 Mar 2001 11:39:09 +0900 (KST)
X-Originating-IP: [203.237.222.248]
From: "¾ÈÅÂ¿ø" <[email-masked]>
Reply-To: "¾ÈÅÂ¿ø" <[email-masked]>
Organization:
To: [email-masked]
X-Mailer: Daum Web Mailer 1.0
Date: Fri, 09 Mar 2001 11:39:09 KST
Message-Id: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=euc-kr
Content-Transfer-Encoding: base64
X-MIME-Autoconverted: from 8bit to base64 by smail-12.hanmail.net id f292dLc27228
Subject: [avr-gcc-list] i need help!!!
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

dGhhbmsgeW91IA0KYnV0IGknbSBzb3JyeSBpIG5lZWQgYSBpbiBrb3JlYW4gZGF0ZXNoZWV0
DQppIGRvbid0ICBmdWxuZXNzIGVuZ2xpc2gNCnNvIHZlcnkgaGFyZCB0cmFuc2xhdGlvbiBh
IHJlcG9ydA0KDQppJ20gc3R1ZHkgaGFyZCB0byBhdnIgZ2NjDQpnb29kIGJ5ZSEhIQ0KDQo9
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0Kv+y4
riDAzsXNs90sIERhdW0NCsbyu/0gvrK0wiC5q7fhIEUtbWFpbCDB1rzSIMfRuN7Az7PdDQrB
9rG4w8wgx9Gx2yCwy7v2vK268b26IERhdW0gRklSRUJBTEwNCmh0dHA6Ly93d3cuZGF1bS5u
ZXQNCg==

From [email-masked] Sat Mar 10 02:35:57 2001
Received: from mail.ams.de ([195.30.77.11] helo=mimesweeper.innobase.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14bN3k-0004h8-00
for <[email-masked]>; Sat, 10 Mar 2001 02:35:56 +1300
Received: from exchange.ams.de (unverified) by mimesweeper.innobase.com
(Content Technologies SMTPRS 4.1.5) with ESMTP id <[email-masked]>;
Fri, 9 Mar 2001 14:36:58 +0100
Received: by exchange.ams.de with Internet Mail Service (5.5.2653.19)
id <GS2CDD8D>; Fri, 9 Mar 2001 14:36:58 +0100
Message-ID: <[email-masked]>
From: Stefan Wimmer <[email-masked]>
To: "[email-masked]'" <[email-masked]>, [email-masked],
[email-masked], Atmel chip chat <[email-masked]>
Date: Fri, 9 Mar 2001 14:36:56 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
charset="iso-8859-1"
Subject: [avr-gcc-list] Hi, you C-Geeks (was: Which program do I need to program ATtiny15
L with STK200 cable?)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello, all you AVR/C-programmers out there,

I had a look at some AVR data sheets and found that the ATtiny15L is
programmed in low-voltage serial mode almost the same as a AT90S2333/4333.
The only differences are the address ranges for Flash/EEPROM programming and
the meaning and location of the Fuse bits.

So how complicated would it be for one of you to modify the programming
algorithm in programs like SP12, UISP, PonyProg, etc... ?

I'd offer some sample chips of the ATtiny15L (8 pin wide-SO housing) for
some tests.

Stefan

> ORIGINAL MESSAGE:
>
> >The ATtiny15s datasheet says that this chips can be
> programmed in serial
> >high voltage mode (which the STK200 wiggler wouldn't
> support) but also in
> >serial low voltage mode (which the STK200 dongle is doing
> with other AVRs
> >all day long).
> >
> >But the Atmel ISP software only lists ATtiny22. Are there
> other (free/cheap)
> >programs, that support programming of ATtiny15 with the
> STK200 dongle?
>
>Stefan Wimmer

From [email-masked] Sat Mar 10 03:29:37 2001
Received: from mail.ams.de ([195.30.77.11] helo=mimesweeper.innobase.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14bNtg-0004jT-00
for <[email-masked]>; Sat, 10 Mar 2001 03:29:37 +1300
Received: from exchange.ams.de (unverified) by mimesweeper.innobase.com
(Content Technologies SMTPRS 4.1.5) with ESMTP id <[email-masked]>;
Fri, 9 Mar 2001 15:30:19 +0100
Received: by exchange.ams.de with Internet Mail Service (5.5.2653.19)
id <GS2CD1HH>; Fri, 9 Mar 2001 15:30:19 +0100
Message-ID: <[email-masked]>
From: Stefan Wimmer <[email-masked]>
To: "[email-masked]'" <[email-masked]>,
"[email-masked]'" <[email-masked]>,
"[email-masked]'" <[email-masked]>,
'Atmel chip chat' <[email-masked]>
Date: Fri, 9 Mar 2001 15:30:15 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
charset="iso-8859-1"
Subject: [avr-gcc-list] Hi, you C-Geeks (was: Which program do I need to program ATtiny15
L with STK200 cable?)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Ok, forget what I wrote :)

I just found out that PonyProg already supports programming of the ATtiny15L
with either the serial interface or the STK200 wiggler.

Boy is internet fast - you can find solutions even before you have a problem
(if only you find it in time) :) :) :)

Stefan Wimmer

>So how complicated would it be for one of you to modify the programming
>algorithm in programs like SP12, UISP, PonyProg, etc... ?

From [email-masked] Sat Mar 10 03:37:44 2001
Received: from hertz.ikp.physik.tu-darmstadt.de ([130.83.24.91])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14bO1X-0004k8-00
for <[email-masked]>; Sat, 10 Mar 2001 03:37:43 +1300
Received: (from bon@localhost)
by hertz.ikp.physik.tu-darmstadt.de (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) id f29EdKs01889;
Fri, 9 Mar 2001 15:39:20 +0100
X-Authentication-Warning: hertz.ikp.physik.tu-darmstadt.de: bon set sender to [email-masked] using -f
From: Uwe Bonnes <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <[email-masked]>
Date: Fri, 9 Mar 2001 15:39:20 +0100
To: Stefan Wimmer <[email-masked]>
Cc: "[email-masked]'" <[email-masked]>, [email-masked],
[email-masked], Atmel chip chat <[email-masked]>
Subject: Re: [avr-gcc-list] Hi, you C-Geeks (was: Which program do I need to program ATtiny15
L with STK200 cable?)
In-Reply-To: <[email-masked]>
References: <[email-masked]>
X-Mailer: VM 6.90 under Emacs 20.7.1
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>>>>> "Stefan" == Stefan Wimmer <[email-masked]> writes:

Stefan> Hello, all you AVR/C-programmers out there, I had a look at some
Stefan> AVR data sheets and found that the ATtiny15L is programmed in
Stefan> low-voltage serial mode almost the same as a AT90S2333/4333.
Stefan> The only differences are the address ranges for Flash/EEPROM
Stefan> programming and the meaning and location of the Fuse bits.

Stefan> So how complicated would it be for one of you to modify the
Stefan> programming algorithm in programs like SP12, UISP, PonyProg,
Stefan> etc... ?

It looks like uisp-20010211 supports the ATtiny15:
hertz:~/tmp/cae/atmel/avr/uisp-20010211/src> grep -i tiny15 *
Avr.C: { "ATtiny15", 0x90, 0x06, 1024, 0, 64, 2000, 4000, AVR_TN15 },
AvrAtmel.C: {"TN15", 0x56, "ATtiny15", false},

Did you try that version? Where's the difference between th Tiny15 and
Tiny15L?

Bye
--
Uwe Bonnes [email-masked]

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

From [email-masked] Sun Mar 11 02:16:29 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14bjES-0005cW-00
for <[email-masked]>; Sun, 11 Mar 2001 02:16:29 +1300
Received: (qmail 6441 invoked from network); 10 Mar 2001 13:20:14 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 10 Mar 2001 13:20:14 -0000
Received: from robi ([193.2.76.192]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with SMTP id AAA29319
for <[email-masked]>; Sat, 10 Mar 2001 14:09:54 +0100
Message-ID: <[email-masked]>
From: [email-masked] (Robert Rozman)
To: <[email-masked]>
Date: Sat, 10 Mar 2001 14:20:41 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Subject: [avr-gcc-list] Calling functions (-udivhi3) from asm ?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

after some work in gcc, I have some small parts of project that I'd like to
implement in asm (I use avr-gcc assembler). But I ran into problems:
- I'd need function like itoa but I want function to return pointer to last
character - so I transferred itos.S into my project, make changes and the
try to compile - but I get error:

: undefined reference to '_udivhi3'

itoa.S calls this function with line :

XCALL _U(_udivhi3) ; quotient in rP1:rP0, remainder in r26:r27

I obviously don't know how to specifiy extern function in asm file.

But then I tried another solution for test - I've changed original itoa.S,
recompiled library and then used itoa as part of stdlib. But I get same type
of error. Is itoa functional as it is in original form or I'm doing
something wrong ?

Of cource right solution is if I change some global functions to include
them as custom parts of my project - but I'd like to know how to solve this
problem in asm file so main question remains :

How to properly call function '_udivhi3' from asm procedure ? What
definitions should I make ?

Thanks in advance,

Robert Rozman

From [email-masked] Sun Mar 11 04:51:29 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14bleS-0005iw-00
for <[email-masked]>; Sun, 11 Mar 2001 04:51:28 +1300
Received: (qmail 8421 invoked from network); 10 Mar 2001 15:55:14 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 10 Mar 2001 15:55:14 -0000
Received: from robi ([193.2.76.192]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with SMTP id AAA629
for <[email-masked]>; Sat, 10 Mar 2001 16:44:55 +0100
Message-ID: <[email-masked]>
From: [email-masked] (Robert Rozman)
To: <[email-masked]>
Date: Sat, 10 Mar 2001 16:55:40 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Subject: [avr-gcc-list] Efficient setting/clearing/checking bits in registers ?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I have an application that frequently uses setting/clearing and checking
separate bits in data registers. In avr-gcc I'm using following macros, but
I'm not sure if that is code space efficient solution - it seems they are
not compiled to compact SBR,CBR instructions for CPU.

#define SETBIT(x,y) (x |= (y))
#define CLEARBIT(x,y) (x &= (~y))
#define CHECKBIT(x,y) (x & (y))

Any advice would be appreciated.

Thanks in advance,

Robert Rozman

From [email-masked] Sun Mar 11 04:55:16 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14bli7-0005jT-00
for <[email-masked]>; Sun, 11 Mar 2001 04:55:15 +1300
Received: (qmail 8446 invoked from network); 10 Mar 2001 15:59:02 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 10 Mar 2001 15:59:02 -0000
Received: from robi ([193.2.76.192]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with SMTP id AAA668
for <[email-masked]>; Sat, 10 Mar 2001 16:48:43 +0100
Message-ID: <[email-masked]>
From: [email-masked] (Robert Rozman)
To: <[email-masked]>
Date: Sat, 10 Mar 2001 16:59:29 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Subject: [avr-gcc-list] Code space minimazation in avr-gcc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I'd like to hear some general hints from avr-gcc experts how to minimize
code space of a program. Obviously this could become a general problem,
since AVR products aren't growing so fast with program memory space.

Thanks in advance,

Robert Rozman

From [email-masked] Sun Mar 11 05:18:19 2001
Received: from pop.sttl.uswest.net ([206.81.192.3] helo=sttlpop3.sttl.uswest.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14bm4Q-0005kk-00
for <[email-masked]>; Sun, 11 Mar 2001 05:18:18 +1300
Received: (qmail 9773 invoked by alias); 10 Mar 2001 16:19:54 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 9743 invoked by uid 0); 10 Mar 2001 16:19:53 -0000
Received: from aadslppp19.sttl.uswest.net (HELO larry) (216.160.75.19)
by pop.sttl.uswest.net with SMTP; 10 Mar 2001 16:19:53 -0000
Message-ID: <011c01c0a97e$0bcafe00$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "Robert Rozman" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Calling functions (-udivhi3) from asm ?
Date: Sat, 10 Mar 2001 08:20:13 -0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

.extern _udivhi3

regarding setting/clearing bits:

find and look at iomacros.inc

efficient code:

Use automatics.
switch() is really efficient
pass pointers to structs that contain your data.

In general: generate assembly listings (-S) and learn about
what the compiler is doing. That will teach you a lot about
what works and what doesn't. The compiler guys won't like
you doing this because then you write to the peculiarities
of the compiler, but with small parts like AVR I think that
is mandatory.

Cheers!

----- Original Message -----
From: "Robert Rozman" <[email-masked]>
To: <[email-masked]>
Sent: Saturday, March 10, 2001 5:20 AM
Subject: [avr-gcc-list] Calling functions (-udivhi3) from
asm ?

> Hello,
>
> after some work in gcc, I have some small parts of project
that I'd like to
> implement in asm (I use avr-gcc assembler). But I ran into
problems:
> - I'd need function like itoa but I want function to
return pointer to last
> character - so I transferred itos.S into my project, make
changes and the
> try to compile - but I get error:
>
> : undefined reference to '_udivhi3'
>
> itoa.S calls this function with line :
>
> XCALL _U(_udivhi3) ; quotient in rP1:rP0, remainder in
r26:r27
>
> I obviously don't know how to specifiy extern function in
asm file.
>
> But then I tried another solution for test - I've changed
original itoa.S,
> recompiled library and then used itoa as part of stdlib.
But I get same type
> of error. Is itoa functional as it is in original form or
I'm doing
> something wrong ?
>
> Of cource right solution is if I change some global
functions to include
> them as custom parts of my project - but I'd like to know
how to solve this
> problem in asm file so main question remains :
>
> How to properly call function '_udivhi3' from asm
procedure ? What
> definitions should I make ?
>
> Thanks in advance,
>
> Robert Rozman
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Sun Mar 11 05:21:41 2001
Received: from pop.sttl.uswest.net ([206.81.192.3] helo=sttlpop3.sttl.uswest.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14bm7g-0005lE-00
for <[email-masked]>; Sun, 11 Mar 2001 05:21:40 +1300
Received: (qmail 14716 invoked by alias); 10 Mar 2001 16:23:04 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 14343 invoked by uid 0); 10 Mar 2001 16:22:54 -0000
Received: from aadslppp19.sttl.uswest.net (HELO larry) (216.160.75.19)
by pop.sttl.uswest.net with SMTP; 10 Mar 2001 16:22:54 -0000
Message-ID: <013701c0a97e$7745a400$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
Subject: Re: [avr-gcc-list] Calling functions (-udivhi3) from asm ?
Date: Sat, 10 Mar 2001 08:22:45 -0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Scratch that ".extern ..."

Any undefined symbol is automatically searched for
externally. You need to add the math library "libm.a" to
your link list.

Cheers!

From [email-masked] Sun Mar 11 08:04:56 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14bofa-0007QK-00
for <[email-masked]>; Sun, 11 Mar 2001 08:04:54 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.138])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA32068;
Sat, 10 Mar 2001 22:06:31 +0300
To: [email-masked] (Robert Rozman)
Cc: <[email-masked]>
Subject: Re: [avr-gcc-list] Calling functions (-udivhi3) from asm ?
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 10 Mar 2001 21:59:11 +0300
In-Reply-To: [email-masked]'s message of "Sat, 10 Mar 2001 14:20:41 +0100"
Message-ID: <[email-masked]>
Lines: 50
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

[email-masked] (Robert Rozman) writes:

> Hello,
>
> after some work in gcc, I have some small parts of project that I'd like to
> implement in asm (I use avr-gcc assembler). But I ran into problems:
> - I'd need function like itoa but I want function to return pointer to last
> character - so I transferred itos.S into my project, make changes and the
> try to compile - but I get error:
>
> : undefined reference to '_udivhi3'
>
> itoa.S calls this function with line :
>
> XCALL _U(_udivhi3) ; quotient in rP1:rP0, remainder in r26:r27
>
> I obviously don't know how to specifiy extern function in asm file.
>
> But then I tried another solution for test - I've changed original itoa.S,
> recompiled library and then used itoa as part of stdlib. But I get same type
> of error. Is itoa functional as it is in original form or I'm doing
> something wrong ?
>
> Of cource right solution is if I change some global functions to include
> them as custom parts of my project - but I'd like to know how to solve this
> problem in asm file so main question remains :
>
> How to properly call function '_udivhi3' from asm procedure ? What
> definitions should I make ?

In latest avr-gcc right name is `__udivmodhi4'

/*******************************************************
Division 16 / 16 => (result + remainder)
*******************************************************/
#define r_remL r26 /* remainder Low */
#define r_remH r27 /* remainder High */

/* return: remainder */
#define r_arg1L r24 /* dividend Low */
#define r_arg1H r25 /* dividend High */

/* return: quotient */
#define r_arg2L r22 /* divisor Low */
#define r_arg2H r23 /* divisor High */

#define r_cnt r21 /* loop count */

From [email-masked] Sun Mar 11 08:11:04 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14bolb-0007Qz-00
for <[email-masked]>; Sun, 11 Mar 2001 08:11:03 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.138])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA00353;
Sat, 10 Mar 2001 22:12:46 +0300
To: "Larry Barello" <[email-masked]>
Cc: <[email-masked]>, "AVR GCC List" <[email-masked]>
Subject: Re: [avr-gcc-list] Calling functions (-udivhi3) from asm ?
References: <013701c0a97e$7745a400$0200000a@larry>
From: Denis Chertykov <[email-masked]>
Date: 10 Mar 2001 22:05:26 +0300
In-Reply-To: "Larry Barello"'s message of "Sat, 10 Mar 2001 08:22:45 -0800"
Message-ID: <[email-masked]>
Lines: 10
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Larry Barello" <[email-masked]> writes:

> Scratch that ".extern ..."
>
> Any undefined symbol is automatically searched for
> externally. You need to add the math library "libm.a" to
> your link list.

You needn't libm.a
lib/gcc/avr/libgcc.a must have an `__udivmodhi4' (Right name).

From [email-masked] Sun Mar 11 08:11:12 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14boli-0007R6-00
for <[email-masked]>; Sun, 11 Mar 2001 08:11:11 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.138])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA00373;
Sat, 10 Mar 2001 22:12:54 +0300
To: "Larry Barello" <[email-masked]>
Cc: "Robert Rozman" <[email-masked]>,
"AVR GCC List" <[email-masked]>
Subject: Re: [avr-gcc-list] Calling functions (-udivhi3) from asm ?
References: <[email-masked]> <011c01c0a97e$0bcafe00$0200000a@larry>
From: Denis Chertykov <[email-masked]>
Date: 10 Mar 2001 22:05:34 +0300
In-Reply-To: "Larry Barello"'s message of "Sat, 10 Mar 2001 08:20:13 -0800"
Message-ID: <[email-masked]>
Lines: 6
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Larry Barello" <[email-masked]> writes:

> .extern _udivhi3

Really you needn't `.extern' in GNU assembler.

From [email-masked] Mon Mar 12 05:13:28 2001
Received: from vita.hk.net
([152.101.101.101] helo=hk.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14c8TH-00089v-00
for <[email-masked]>; Mon, 12 Mar 2001 05:13:27 +1300
Received: from hk.net (p41.tnt.hk.net [202.66.202.41])
by hk.net (8.9.1/8.9.1) with ESMTP id AAA16212
for <[email-masked]>; Mon, 12 Mar 2001 00:15:01 +0800 (HKT)
Message-ID: <[email-masked]>
Date: Mon, 12 Mar 2001 00:09:46 +0800
From: Kang Tin LAI <[email-masked]>
Organization: Solar System
X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 i86pc)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] AVR-GDB latest version?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

What latest version of GDB for AVR? Where?

Thank you.

KTL

From [email-masked] Mon Mar 12 09:37:33 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14cCap-0008NX-00
for <[email-masked]>; Mon, 12 Mar 2001 09:37:32 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.155])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id XAA04919
for <[email-masked]>; Sun, 11 Mar 2001 23:39:13 +0300
Date: Sun, 11 Mar 2001 23:39:12 +0300
Message-Id: <[email-masked]>
From: Denis Chertykov <[email-masked]>
To: [email-masked]
Subject: [avr-gcc-list] avr-gcc test results
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Today I have tested the gcc-3_0-branch of CVS version of avr-gcc.
Test results seems good.
Exclude is va-arg-6.c:

#include <stdarg.h>

f (int n, ...)
{
va_list args;

va_start (args, n);

if (va_arg (args, int) != 10)
abort ();
if (va_arg (args, long long) != 10000000000LL)
abort ();
if (va_arg (args, int) != 11)
abort ();
if (va_arg (args, long double) != 3.14L)
abort ();
if (va_arg (args, int) != 12)
abort ();
if (va_arg (args, int) != 13)
abort ();
if (va_arg (args, long long) != 20000000000LL)
abort ();
if (va_arg (args, int) != 14)
abort ();
if (va_arg (args, double) != 2.72)
abort ();

va_end(args);
}

main ()
{
f (4, 10, 10000000000LL, 11, 3.14L, 12, 13, 20000000000LL, 14, 2.72);
exit (0);
}

---------------------------
Which generates:

# va-arg-6.c:4: warning: return type defaults to `int'
# va-arg-6.c: In function `f':
# va-arg-6.c:10: warning: implicit declaration of function `abort'
# va-arg-6.c:29: warning: control reaches end of non-void function
# va-arg-6.c: At top level:
# va-arg-6.c:32: warning: return type defaults to `int'
# va-arg-6.c: In function `main':
# va-arg-6.c:34: warning: implicit declaration of function `exit'
# va-arg-6.c:33: Internal compiler error in expand_call, at calls.c:3090
# Please submit a full bug report, with preprocessed source if appropriate.
# See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
# make: *** [va-arg-6.o] Error 1

IMHO: it's avr related GCC bug. I will try to fix it.

Denis.

From [email-masked] Mon Mar 12 22:31:52 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14cOg9-0000Os-00
for <[email-masked]>; Mon, 12 Mar 2001 22:31:50 +1300
Received: from oTRIs.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id KAA26653
for <[email-masked]>; Mon, 12 Mar 2001 10:33:32 +0100
Message-ID: <[email-masked]>
Date: Mon, 12 Mar 2001 10:37:44 +0100
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
References: <[email-masked]> <000701c0a9ef$5752dca0$c769a1ca@research>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Re: New Win32 binaries for testing
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Ron,

Ron Kreymborg schrieb:
>
> Gunnar
>
> I downloaded your latest Windows avrgcc20010211.exe version but still looks
> like either you may not have the latest avrlib, or I am doing something
> wrong.

Please use the links, I provided in my last mail concerning this topic.
You have downloaded the old version. I will make links to the new
version on my download page if someone have successfully tested it.

Greetings

Gunnar

From [email-masked] Mon Mar 12 22:38:50 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14cOmt-0000Pb-00
for <[email-masked]>; Mon, 12 Mar 2001 22:38:49 +1300
Received: from oTRIs.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id KAA27304
for <[email-masked]>; Mon, 12 Mar 2001 10:40:33 +0100
Message-ID: <[email-masked]>
Date: Mon, 12 Mar 2001 10:44:45 +0100
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] avr-gcc test results
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Denis,

Denis Chertykov schrieb:

> IMHO: it's avr related GCC bug. I will try to fix it.

Please inform me, so that I can build binaries of this version.
Can I get the branch with
-r gcc-3_0-branch
?

Greetings
Gunnar

From [email-masked] Mon Mar 12 22:39:04 2001
Received: from [207.174.230.106] (helo=ozservers.com ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14cOn8-0000Pg-00
for <[email-masked]>; Mon, 12 Mar 2001 22:39:02 +1300
Received: (qmail 24861 invoked from network); 13 Mar 2001 03:54:08 -0000
Received: from d320-ps2-mel.alphalink.com.au (HELO research) (202.161.108.66)
by 207.174.230.165 with SMTP; 13 Mar 2001 03:54:08 -0000
Message-ID: <001d01c0aad9$2e6d15e0$426ca1ca@research>
From: "Ron Kreymborg" <[email-masked]>
To: <[email-masked]>
Date: Mon, 12 Mar 2001 20:42:34 +1100
Organization: Jennaron Research
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] avr-gcc testing
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Gunnar

I downloaded your latest Windows avrgcc20010211.exe version but still looks
like either you may not have the latest avrlib, or I am doing something
wrong.

After fixing a couple of minor bugs (pulling the definition for atof() out
of the comments section in stdlib.h, and pre-pending the two underscores to
the fp_zero calls in strtod.s), the test below program gives the link error:

C:/AVRGCC\BIN\..\lib\gcc-lib\avr\2.97\..\..\..\..\avr\lib\avr3\libm.a(dtostr
e.o): In function 'dtostre':
C:/AVRGCC/lib/avr-libc-20010211/src/./fplib/dtostre.S:221: undefined
reference to '__udivmodqi4'

The test program simply converts an ascii string to floating point and back
again:

#include <stdlib.h>
int main(void);
const char *number = "0.487467";
char result[20];
int main(void)
{
float theNumber;
// Convert ascii to floating point
theNumber = (float)atof(number);
// Convert back to a scientific format.
dtostre(theNumber, result, 4, 0x6);
// This should leave "+4.8747E-01" in result.
return 0;
}

I am compiling for a mega103 and I have included the -lm parameter in the
link parameters. I have tried to compile the darn avr-gcc compiler from the
CVS souces several times but without success, as otherwise I would fix this
problem myself.

Regards
Ron Kreymborg

----- Original Message -----
From: "Gunnar Henne" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
Sent: Thursday, March 08, 2001 1:07 AM
Subject: [avr-gcc-list] New Win32 binaries for testing

> Hello,
>
> I got the CVS sources from binutils + gcc compiled for Windows using the
> mingw32 tools.
>
> I have successfully compiled the avr-libc using the known scheme.
> I tried to open a sample program with AStudio3.22 under Win2000, but it
> hanged. :-(
>
> http://www.combio.de/avr/binutils-2001.02.28.mingw32.tar.gz
> http://www.combio.de/avr/gcc-2001.02.28.mingw32.tar.gz
>
> Happy testing!
>
> Gunnar
> --
> Gunnar Henne Email: [email-masked]
> oTRIs GmbH & Co. KG Tel. : 0231 / 10616-21
> Landgrafenstr. 153 Fax. : 0231 / 10615-44
> 44139 Dortmund
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

-----------------------------------------------------------------------
Jennaron Research Melbourne, Australia
-----------------------------------------------------------------------

From [email-masked] Tue Mar 13 00:06:54 2001
Received: from [207.174.230.106] (helo=ozservers.com ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14cQAA-0000TP-00
for <[email-masked]>; Tue, 13 Mar 2001 00:06:54 +1300
Received: (qmail 29258 invoked from network); 13 Mar 2001 05:22:16 -0000
Received: from d320-ps2-mel.alphalink.com.au (HELO research) (202.161.108.66)
by 207.174.230.165 with SMTP; 13 Mar 2001 05:22:16 -0000
Message-ID: <002001c0aae5$7c0048c0$426ca1ca@research>
From: "Ron Kreymborg" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]> <000701c0a9ef$5752dca0$c769a1ca@research> <[email-masked]>
Date: Mon, 12 Mar 2001 22:13:25 +1100
Organization: Jennaron Research
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] Re: New Win32 binaries for testing
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Gunnar,

I would love to help with the testing. I downloaded those two files and
although the compiler runs and states it is version 3.1, they are missing
the libraries and include files. Is there something I need to do first? If
so let me know the steps.

Regards
Ron

----- Original Message -----
From: "Gunnar Henne" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
Sent: Monday, March 12, 2001 8:37 PM
Subject: [avr-gcc-list] Re: New Win32 binaries for testing

> Hello Ron,
>
> Ron Kreymborg schrieb:
> >
> > Gunnar
> >
> > I downloaded your latest Windows avrgcc20010211.exe version but still
looks
> > like either you may not have the latest avrlib, or I am doing something
> > wrong.
>
> Please use the links, I provided in my last mail concerning this topic.
> You have downloaded the old version. I will make links to the new
> version on my download page if someone have successfully tested it.
>
> Greetings
>
> Gunnar
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Tue Mar 13 02:00:04 2001
Received: from atusks01.alcatel.at ([212.183.9.130] helo=mail.alcatel.at)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14cRve-0000YN-00
for <[email-masked]>; Tue, 13 Mar 2001 02:00:03 +1300
Received: from alcatel.at (atusel33.aut.alcatel.at [146.112.129.215])
by mail.alcatel.at (8.9.3/8.9.3/1.21 01/27/01 21:43:09) with ESMTP id OAA01443;
Mon, 12 Mar 2001 14:01:41 +0100 (MET)
Message-ID: <[email-masked]>
Date: Mon, 12 Mar 2001 14:01:40 +0100
From: Christoph Plattner <[email-masked]>
Organization: AAA
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.5.1 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
To: Robert Rozman <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] Code space minimazation in avr-gcc
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I also worked hard on this topic.

First of all try to use only few points accessing arrays.
For example I used following:

struct xxx_
aaa_t aaa;
aaa_t aab;
:
bbb_t bbb;
} xxx_t;

xxx_t xxx_array [ XXX_NUM ];

xxx_t * __xxx (int id)
{
/* no checks in ID are done.
you can add them.
On the other hand, using xxx_array [id] directly,
also no checks are used
*/
return xxx_array [ XXX_NUM ];
}

In the body of other function I access the array structrue
by
__xxx (k)->aaa = x;
etc...

If the array is often use, then you can spare much memory
in this way (FLASH !)

Further there is a compiler switch
-mcall-prologueslike
using common prolog/epilog sequences to spare space.

If you really want hard to save some bytes you can also use
-mint8 only using 8 instead of 16bit basic values. This saves
space on every "return" as the basic return value is always
casted on the base of the basic type (16bit). But not all of the
libc stuff can handle this (setjump/longjump).

I hope I could help ...

With friendly regards
Christoph

Robert Rozman wrote:
>
> Hello,
>
> I'd like to hear some general hints from avr-gcc experts how to minimize
> code space of a program. Obviously this could become a general problem,
> since AVR products aren't growing so fast with program memory space.
>
> Thanks in advance,
>
> Robert Rozman
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
+--------V--------+ [email-masked]
| A L C A T E L | -----------------------------
+-----------------+ Phone: +43 1 27722 3706
T A S Fax: +43 1 27722 3955

From [email-masked] Tue Mar 13 03:20:49 2001
Received: from sttlpop2.sttl.uswest.net ([206.81.192.2])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14cTBp-0000cD-00
for <[email-masked]>; Tue, 13 Mar 2001 03:20:49 +1300
Received: (qmail 47354 invoked by alias); 12 Mar 2001 14:22:41 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 47344 invoked by uid 0); 12 Mar 2001 14:22:41 -0000
Received: from aadslppp19.sttl.uswest.net (HELO larry) (216.160.75.19)
by sttlpop2.sttl.uswest.net with SMTP; 12 Mar 2001 14:22:41 -0000
Message-ID: <009401c0ab00$16877660$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "Ron Kreymborg" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]> <000701c0a9ef$5752dca0$c769a1ca@research> <[email-masked]> <002001c0aae5$7c0048c0$426ca1ca@research>
Subject: Re: [avr-gcc-list] Re: New Win32 binaries for testing
Date: Mon, 12 Mar 2001 06:21:12 -0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I just copied the old 20010211 directory, copied over the
3.1 binaries (avr-gcc, various avr-xxx,
lib/gcc-lib/avr/3.1/...) over and ran. It works great for
me. -O3 still broken. I have the newer libc stuff but the
makefile is broken for me so I just used the old ones. No
problems noted yet, but, then, I only use the FP stuff and
that I rebuilt by hand from the latest sources at Gunnar's
site.

----- Original Message -----
From: "Ron Kreymborg" <[email-masked]>
Subject: [avr-gcc-list] Re: New Win32 binaries for testing

> Hi Gunnar,
>
> I would love to help with the testing. I downloaded those
two files and
> although the compiler runs and states it is version 3.1,
they are missing
> the libraries and include files. Is there something I need
to do first? If
> so let me know the steps.
>
> Regards
> Ron

From [email-masked] Tue Mar 13 04:05:04 2001
Received: from bifrost.mjolner.dk
([130.225.4.254] helo=geri.mjolner.dk ident=hidden-user)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14cTsc-0000eE-00
for <[email-masked]>; Tue, 13 Mar 2001 04:05:03 +1300
Received: (qmail 26920 invoked by uid 2413); 12 Mar 2001 15:06:55 -0000
Date: Mon, 12 Mar 2001 16:06:55 +0100
From: Flemming Gram Christensen <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
User-Agent: Mutt/1.2.5i
Subject: [avr-gcc-list] stack handling
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi.

I'm new to this list, so please excuse me if this question is "often-asked"

I studied the way avr-gcc and the iar c compiler handles the stack.

In the documentation for iar it says the iar compiler uses two stacks:
one for return addresses (using call and return instructions) and another
for data (flushed local variables, structs etc.) accessed through the Y register.

avr-gcc is only using one stack. When a stack frame is needed the SP IO register
is raised using in/out instructions.

What are the pro and cons?

The iar way wastes some memory and special care is needed to ensure the two stacks
do not overwrites each other. But frame allocation and deallocation is efficient.

The gcc way uses more code space, but less memory.

Is there anything written on the codegeneration principles of avr-gcc?

Regards Flemming
--
Flemming Gram Christensen, M.Sc., Software Engineer, Mjølner Informatics
------------------------------------------------------------------------
Mjolner Informatics A/S Phone: +45 70 27 43 43
Helsingforsgade 27 Fax: +45 70 27 43 44
DK-8000 Aarhus C, Denmark E-mail: [email-masked]
------------------------------------------------------------------------

From [email-masked] Tue Mar 13 04:11:07 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14cTyU-0000ew-00
for <[email-masked]>; Tue, 13 Mar 2001 04:11:06 +1300
Received: from oTRIs.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id QAA27736
for <[email-masked]>; Mon, 12 Mar 2001 16:12:58 +0100
Message-ID: <[email-masked]>
Date: Mon, 12 Mar 2001 16:17:10 +0100
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
References: <[email-masked]> <000701c0a9ef$5752dca0$c769a1ca@research> <[email-masked]> <002001c0aae5$7c0048c0$426ca1ca@research> <009401c0ab00$16877660$0200000a@larry>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] New Win32 binaries on download page
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

Larry Barello wrote:
>
> I just copied the old 20010211 directory, copied over the
> 3.1 binaries (avr-gcc, various avr-xxx,
> lib/gcc-lib/avr/3.1/...) over and ran. It works great for
> me. -O3 still broken.

I put the links on my download page now.

See http://www.combio.de/avr

Greetings

Gunnar

From [email-masked] Tue Mar 13 05:28:27 2001
Received: from sttlpop2.sttl.uswest.net ([206.81.192.2])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14cVBK-0000iP-00
for <[email-masked]>; Tue, 13 Mar 2001 05:28:27 +1300
Received: (qmail 34789 invoked by alias); 12 Mar 2001 16:23:23 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 33760 invoked by uid 0); 12 Mar 2001 16:23:04 -0000
Received: from aadslppp19.sttl.uswest.net (HELO larry) (216.160.75.19)
by sttlpop2.sttl.uswest.net with SMTP; 12 Mar 2001 16:23:04 -0000
Message-ID: <00ce01c0ab10$e72baec0$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] stack handling
Date: Mon, 12 Mar 2001 08:19:39 -0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

What is odd is that all the alternative C compilers (ICC,
IAR and CodeVision) use the dual stack mechanism. As far as
I can tell the code impact is minimal, but, as you noted,
the SRAM impact is large and negative. Anything that
impacts SRAM on the AVR is a bad thing!

I think it is just history and that the way avr-gcc does it
is derived from the old PDP-ll days when C was developed and
it just happens to be more efficient on the AVR. I
certainly prefer the gcc way: it is simple to follow and
only one slab of memory needs to be allocated per process.

----- Original Message -----
From: "Flemming Gram Christensen" <[email-masked]>
To: <[email-masked]>
Sent: Monday, March 12, 2001 7:06 AM
Subject: [avr-gcc-list] stack handling

> Hi.
>
> I'm new to this list, so please excuse me if this question
is "often-asked"
>
> I studied the way avr-gcc and the iar c compiler handles
the stack.
>
> In the documentation for iar it says the iar compiler uses
two stacks:
> one for return addresses (using call and return
instructions) and another
> for data (flushed local variables, structs etc.) accessed
through the Y register.
>
> avr-gcc is only using one stack. When a stack frame is
needed the SP IO register
> is raised using in/out instructions.
>
> What are the pro and cons?
>
> The iar way wastes some memory and special care is needed
to ensure the two stacks
> do not overwrites each other. But frame allocation and
deallocation is efficient.
>
> The gcc way uses more code space, but less memory.
>
> Is there anything written on the codegeneration principles
of avr-gcc?
>
> Regards Flemming

From [email-masked] Tue Mar 13 11:01:00 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14caN8-0000yj-00
for <[email-masked]>; Tue, 13 Mar 2001 11:00:59 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.131])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id BAA10367;
Tue, 13 Mar 2001 01:02:17 +0300
To: Gunnar Henne <[email-masked]>
Cc: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] avr-gcc test results
References: <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
In-Reply-To: Gunnar Henne's message of "Mon, 12 Mar 2001 10:44:45 +0100"
X-Mailer: Gnus v5.7/Emacs 20.4
Date: 13 Mar 2001 00:54:57 +0300
Message-ID: <[email-masked]>
Lines: 23
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Gunnar Henne <[email-masked]> writes:

> Hello Denis,
>
> Denis Chertykov schrieb:
>
> > IMHO: it's avr related GCC bug. I will try to fix it.
>
> Please inform me, so that I can build binaries of this version.

IMHO: You can build binaries.
I'm familiar with this bug about two years.
avr-gcc havn't normal DImode support (DImode is a 8 byte integer
ie. "long long"). It's a generic GCC problem. I don't resolve it
because IMHO avr users needn't 8 byte integers.
Problems with DImode occurs only if you want to pass DImode variable
through stack. (like in printf).

> Can I get the branch with
> -r gcc-3_0-branch
> ?

My command was: cvs -z9 update -r gcc-3_0-branch

From [email-masked] Thu Mar 15 16:19:58 2001
Received: from femail12.sdc1.sfba.home.com ([24.0.95.108])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14dOIw-0002yJ-00
for <[email-masked]>; Thu, 15 Mar 2001 16:19:58 +1300
Received: from home.com ([24.0.128.184]) by femail12.sdc1.sfba.home.com
(InterMail vM.4.01.03.00 201-229-121) with ESMTP
id <[email-masked]>;
Wed, 14 Mar 2001 19:21:42 -0800
Message-ID: <[email-masked]>
Date: Wed, 14 Mar 2001 19:32:54 -0800
From: Wallace Owen <[email-masked]>
X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.2.12-20 i586)
X-Accept-Language: en
MIME-Version: 1.0
To: Flemming Gram Christensen <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] stack handling
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

The IAR way is especially useful on the AT90S1200, which has a hardware
stack for return addresses. Two stacks, one based on hardware for the
return addresses, one synthesized from (IIRC) the Y register for the data
stack makes the chip actually usable in C. Otherwise, the 1200 is limited
to assembly language, in my opinion. Of course, to really leverage what
little code space there is on a 1200 one must usually use assembly language
anyway, so the advantage is rather slim.

// Wally

Flemming Gram Christensen wrote:
>
> Hi.
>
> I'm new to this list, so please excuse me if this question is "often-asked"
>
> I studied the way avr-gcc and the iar c compiler handles the stack.
>

From [email-masked] Fri Mar 16 00:34:38 2001
Received: from gateway.utbm.fr ([193.48.246.2] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14dW1d-0003Gc-00
for <[email-masked]>; Fri, 16 Mar 2001 00:34:37 +1300
Received: from sunserv.utbm.fr (sunserv.utbm.fr [192.168.1.16])
by gateway.utbm.fr (8.9.3/jtpda-5.3.2) with ESMTP id MAA11540
for <[email-masked]>; Thu, 15 Mar 2001 12:36:17 +0100
Received: (from lcourtes@localhost)
by sunserv.utbm.fr (8.9.3+Sun/8.9.3) id MAA13482
for [email-masked]; Thu, 15 Mar 2001 12:36:14 +0100 (MET)
Date: Thu, 15 Mar 2001 12:36:14 +0100
From: Ludovic COURTES <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
X-Mailer: Mutt 1.0pre2us
In-Reply-To: <[email-masked]>
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by gateway.utbm.fr id MAA11540
Subject: [avr-gcc-list] strlen bug...
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I recently discovered that there was no way to compile any source
code which uses strlen() (the problem is at compile-time, not at
link-time). Maybe some of you already knew about it as it looks
like it is not specific to my program ('internal error').

Here is what i got :=20

avr-gcc -Wall -I../include/ -O9 -mmcu=3Datmega103 -c main.c -o main.o
main.c: In function `lcd_manager':
main.c:206: Unrecognizable insn:
(insn 112 108 113 (parallel[=20
(set (reg:HI 56)
(unspec:HI[=20
(mem:BLK (reg/f:HI 57) 0)
(const_int 0 [0x0])
(const_int 1 [0x1])
] 0))
] ) -1 (nil)
(nil))
main.c:206: Internal compiler error in extract_insn, at recog.c:2254
Please submit a full bug report, with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make: *** [main.o] Error 1

Anyway, if someone wants the whole source code, i can send it.

--=20
Ludovic Court=E8s
Universit=E9 de Technologie de Belfort-Montb=E9liard
Unitec (Club de Robotique de l'UTBM)

From [email-masked] Fri Mar 16 08:02:04 2001
Received: from ns.orbitel.bg ([195.24.32.2] helo=orbitel.bg)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14dd0d-0003bO-00
for <[email-masked]>; Fri, 16 Mar 2001 08:02:03 +1300
Received: (qmail 12954 invoked from network); 15 Mar 2001 19:04:08 -0000
Received: from unknown (HELO home) (212.95.170.252)
by ns.orbitel.bg with SMTP; 15 Mar 2001 19:04:08 -0000
From: "Alexander Popov" <[email-masked]>
To: [email-masked]
Date: Thu, 15 Mar 2001 21:04:51 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Reply-to: [email-masked]
Message-ID: <3AB12E73.28337.11776A4@localhost>
Priority: normal
X-mailer: Pegasus Mail for Win32 (v3.12c)
Subject: [avr-gcc-list] BCH code in avr-gcc needed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello, guys!
I have a problem which is very important to me to be solved quickly.

I must implement ECC (Error Correction Code) in the radio modem I am
writing on AT90S8515 using AVR-GCC. I have found a description of BCH
(63,48) code which suits my needs. It corrects all 1st and 2nd order errors.
The coding is OK, but I don't know how to decode. Direct table implementation
cannot be used because the syndrom is 15 bits. I use 'brute force' decoding
but it is too slow.
So how is the decoding of Cyclic coded data done? I've heard about
some 'factorisation' and 'Berlekemp algorithm', but I don't know how to use
them.

I've placed the datasheet describing this code at
http://sasho.hit.bg/ecc.pdf

Can someone help me, please!

Thanks in advance!

Alexander Popov

From [email-masked] Fri Mar 16 08:20:37 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ddIZ-0003cX-00
for <[email-masked]>; Fri, 16 Mar 2001 08:20:36 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.155])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA00840;
Thu, 15 Mar 2001 22:22:35 +0300
To: Ludovic COURTES <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] strlen bug...
References: <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 15 Mar 2001 22:15:14 +0300
In-Reply-To: Ludovic COURTES's message of "Thu, 15 Mar 2001 12:36:14 +0100"
Message-ID: <[email-masked]>
Lines: 35
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Ludovic COURTES <[email-masked]> writes:

> Hi,
>
> I recently discovered that there was no way to compile any source
> code which uses strlen() (the problem is at compile-time, not at
> link-time). Maybe some of you already knew about it as it looks
> like it is not specific to my program ('internal error').
>
> Here is what i got :=20
>
> avr-gcc -Wall -I../include/ -O9 -mmcu=3Datmega103 -c main.c -o main.o
> main.c: In function `lcd_manager':
> main.c:206: Unrecognizable insn:
> (insn 112 108 113 (parallel[=20
> (set (reg:HI 56)
> (unspec:HI[=20
> (mem:BLK (reg/f:HI 57) 0)
> (const_int 0 [0x0])
> (const_int 1 [0x1])
> ] 0))
> ] ) -1 (nil)
> (nil))
> main.c:206: Internal compiler error in extract_insn, at recog.c:2254
> Please submit a full bug report, with preprocessed source if appropriate.
> See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
> make: *** [main.o] Error 1
>
>
> Anyway, if someone wants the whole source code, i can send it.

Send me a small preprocessed example which generates this bug.

Denis.

From [email-masked] Fri Mar 16 10:30:02 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14dfJq-0003i0-00
for <[email-masked]>; Fri, 16 Mar 2001 10:30:02 +1300
Received: (qmail 31575 invoked from network); 15 Mar 2001 21:34:15 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 15 Mar 2001 21:34:15 -0000
Received: from robi ([193.2.76.192]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with SMTP id AAA21511
for <[email-masked]>; Thu, 15 Mar 2001 22:23:44 +0100
Message-ID: <[email-masked]>
From: [email-masked] (Robert Rozman)
To: <[email-masked]>
Date: Thu, 15 Mar 2001 22:35:02 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Subject: [avr-gcc-list] Assembler error message
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I'm trying to define assembler macro for clearing bits in register:

#define CLEARBIT_CONST(var,const_mask) \
asm volatile (\
"cbr %0, %1 "\
: /* no outputs */\
: "r" ((uint8_t) (var)), \
"i" ((uint8_t) (mask)) \
)

When I compile my program I get error:
c:\windows\temp\ccFvZigb.s: Assembler messages:
c:\windows\temp\ccFvZigb.s:3523 Error: number must be less than 256

I think it comes form inproper use of this macro - but how can I find error
in temp file ccFvZigb.s ? Why error is not shown on one of end files like
.s, .lst or similar ?

Thanks in advance,

Robert Rozman

-----Izvorno sporoèilo-----
Od: Ludovic COURTES <[email-masked]>
Za: [email-masked] <[email-masked]>
Datum: 15. marec 2001 12:37
Zadeva: [avr-gcc-list] strlen bug...

Hi,

I recently discovered that there was no way to compile any source
code which uses strlen() (the problem is at compile-time, not at
link-time). Maybe some of you already knew about it as it looks
like it is not specific to my program ('internal error').

Here is what i got :

avr-gcc -Wall -I../include/ -O9 -mmcu=atmega103 -c main.c -o main.o
main.c: In function `lcd_manager':
main.c:206: Unrecognizable insn:
(insn 112 108 113
rallel[
(set (reg:HI 56)
(unspec:HI[
(mem:BLK (reg/f:HI 57) 0)
(const_int 0 [0x0])
(const_int 1 [0x1])
] 0))
] ) -1 (nil)
(nil))
main.c:206: Internal compiler error in extract_insn, at recog.c:2254
Please submit a full bug report, with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make: *** [main.o] Error 1

Anyway, if someone wants the whole source code, i can send it.

--
Ludovic Courtès
Université de Technologie de Belfort-Montbéliard
Unitec (Club de Robotique de l'UTBM)

_______________________________________________
av
r-gcc-list mailing list
[email-masked]
http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Fri Mar 16 12:45:40 2001
Received: from cmailg5.svr.pol.co.uk ([195.92.195.175])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14dhR5-0003o4-00
for <[email-masked]>; Fri, 16 Mar 2001 12:45:39 +1300
Received: from modem-87.eglantine.dialup.pol.co.uk ([62.136.174.87] helo=lab)
by cmailg5.svr.pol.co.uk with smtp (Exim 3.13 #0)
id 14dhT5-0000Dc-00
for [email-masked]; Thu, 15 Mar 2001 23:47:44 +0000
Message-ID: <000f01c0adaa$d7459100$57ae883e@lab>
From: "Arreckx" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Assembler error message
Date: Thu, 15 Mar 2001 23:51:21 -0000
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

To locate the problem, compile the C code to generate some assembly.
(avr-gcc -S myfile.c -o myfile.s ).
You can then assemble this file. The error will be more easy to find then.

----- Original Message -----
From: "Robert Rozman" <[email-masked]>
To: <[email-masked]>
Sent: Thursday, March 15, 2001 9:35 PM
Subject: [avr-gcc-list] Assembler error message

> Hello,
>
> I'm trying to define assembler macro for clearing bits in register:
>
> #define CLEARBIT_CONST(var,const_mask) \
> asm volatile (\
> "cbr %0, %1 "\
> : /* no outputs */\
> : "r" ((uint8_t) (var)), \
> "i" ((uint8_t) (mask)) \
> )
>
> When I compile my program I get error:
> c:\windows\temp\ccFvZigb.s: Assembler messages:
> c:\windows\temp\ccFvZigb.s:3523 Error: number must be less than 256
>
> I think it comes form inproper use of this macro - but how can I find
error
> in temp file ccFvZigb.s ? Why error is not shown on one of end files like
> .s, .lst or similar ?
>
> Thanks in advance,
>
> Robert Rozman
>
>
>
> -----Izvorno sporoèilo-----
> Od: Ludovic COURTES <[email-masked]>
> Za: [email-masked] <[email-masked]>
> Datum: 15. marec 2001 12:37
> Zadeva: [avr-gcc-list] strlen bug...
>
>
> Hi,
>
> I recently discovered that there was no way to compile any source
> code which uses strlen() (the problem is at compile-time, not at
> link-time). Maybe some of you already knew about it as it looks
> like it is not specific to my program ('internal error').
>
> Here is what i got :
>
> avr-gcc -Wall -I../include/ -O9 -mmcu=atmega103 -c main.c -o main.o
> main.c: In function `lcd_manager':
> main.c:206: Unrecognizable insn:
> (insn 112 108 113
>
lel[
> (set (reg:HI 56)
> (unspec:HI[
> (mem:BLK (reg/f:HI 57) 0)
> (const_int 0 [0x0])
> (const_int 1 [0x1])
> ] 0))
> ] ) -1
(nil)
> (nil))
> main.c:206: Internal compiler error in extract_insn, at recog.c:2254
> Please submit a full bug report, with preprocessed source if appropriate.
> See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
> make: *** [main.o] Error 1
>
>
> Anyway, if someone wants the whole source code, i can send it.
>
> --
> Ludovic Courtès
> Université de Technologie de Belfort-Montbéliard
> Unitec (Club de Robotique de l'UTBM)
>
> _______________________________________________
> av
> r-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Sat Mar 17 04:49:39 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14dwTy-0004PZ-00
for <[email-masked]>; Sat, 17 Mar 2001 04:49:39 +1300
Received: (qmail 17022 invoked from network); 16 Mar 2001 15:53:51 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 16 Mar 2001 15:53:51 -0000
Received: from robi ([193.2.76.192]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with SMTP id AAA1101
for <[email-masked]>; Fri, 16 Mar 2001 16:43:19 +0100
Message-ID: <[email-masked]>
From: [email-masked] (Robert Rozman)
To: <[email-masked]>
Subject: Re: [avr-gcc-list] Assembler error message
Date: Fri, 16 Mar 2001 16:54:46 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

thanks for info. I did this and I ran acrross weird behaviour that could be
also caused by my mistake in macro.

So, I define macro:
#define CLEARBIT_CONST(var,mask) \
asm volatile (\
"cbr %0, %1 "\
: /* no outputs */\
: "r" ((u08) (var)), \
"i" ((u08) (mask)) \
)

and also

//IR_Status variable
#define IR_Avail 128 // biti v IR_Status

and then in program I do this:

volatile unsigned char IR_Status = 0x20;

....

CLEARBIT_CONST(IR_Status,IR_Avail);

and it gets converted to :

833:node3_6.c **** CLEARBIT_CONST(IR_Status,IR_Avail);
3519 .stabn 68,0,833,.LM356-main
3520 .LM356:
3521 ???? 8091 0000 lds r24,IR_Status
3522 /* #APP */
3523 ???? 8F77 cbr r24, -128
**** Error:number must be less than 256

---------End of snip

Why my IR_Avail constant of 128 gets converted to constant of -128 ?

Is everything OK with my macro definition ? Strange is, that other smaller
constants convert OK.

Thanks in advance,

Robert Rozman

From [email-masked] Sat Mar 17 08:19:15 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14dzko-0004bs-00
for <[email-masked]>; Sat, 17 Mar 2001 08:19:14 +1300
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.132])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA24650;
Fri, 16 Mar 2001 22:21:20 +0300
To: [email-masked] (Robert Rozman)
Cc: <[email-masked]>
Subject: Re: [avr-gcc-list] Assembler error message
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
In-Reply-To: [email-masked]'s message of "Fri, 16 Mar 2001 16:54:46 +0100"
X-Mailer: Gnus v5.7/Emacs 20.4
Date: 16 Mar 2001 22:13:55 +0300
Message-ID: <[email-masked]>
Lines: 41
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

[email-masked] (Robert Rozman) writes:

> Hello,
>
> thanks for info. I did this and I ran acrross weird behaviour that could be
> also caused by my mistake in macro.
>
> So, I define macro:
> #define CLEARBIT_CONST(var,mask) \
> asm volatile (\
> "cbr %0, %1 "\
> : /* no outputs */\
> : "r" ((u08) (var)), \
> "i" ((u08) (mask)) \
> )

You have an error because IMHO `cbr' isn't useful command and
GNU assembler (avr-as) don't support relocation for `cbr'.
(`cbr' isn't a command it's a translation to `andi rr, 0xff - NN')

Try to use:

#define CLEARBIT_CONST(var,mask) \
asm volatile (\
"andi %0, lo8(0xff - (%1)) "\
: /* no outputs */\
: "r" ((u08) (var)), \
"i" ((u08) (mask)) \
)

Or:

#define CLEARBIT_CONST(var,mask) \
asm volatile (\
"cbr %0, %1) "\
: /* no outputs */\
: "r" ((u08) (var)), \
"i" ((mask)) /* <-------- type casting to u08 removed */ \
)

From [email-masked] Sat Mar 17 09:45:37 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14e16O-0004fg-00
for <[email-masked]>; Sat, 17 Mar 2001 09:45:36 +1300
Received: (qmail 20985 invoked from network); 16 Mar 2001 20:49:54 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 16 Mar 2001 20:49:54 -0000
Received: from robi ([193.2.76.192]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with SMTP id AAA3436
for <[email-masked]>; Fri, 16 Mar 2001 21:39:22 +0100
Message-ID: <[email-masked]>
From: [email-masked] (Robert Rozman)
To: <[email-masked]>
Subject: Re: [avr-gcc-list] Assembler error message
Date: Fri, 16 Mar 2001 21:50:37 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

thanks for response. Only one short question:
- I'd like macro CLEARBIT_CONST to influence value of variable 'var'. Do I
have to add something to output section of macro too - as it is now, it
seems like it doesn't have any output or influence on variable.

Thanks in advance,

Robert Rozman

-----Izvorno sporoèilo-----
Od: Denis Chertykov <[email-masked]>
Za: Robert Rozman <[email-masked]>
Kp: [email-masked] <[email-masked]>
Datum: 16. marec 2001 20:17
Zadeva: Re: [avr-gcc-list] Assembler error message

>Try to use:
>
>#define CLEARBIT_CONST(var,mask) \
> asm volatile (\
> "andi %0, lo8(0xff - (%1)) "\
> : /* no outputs */\
> : "r" ((u08) (var)), \
> "i" ((u08) (mask)) \
> )
>
>
>Or:
>
>#define CLEARBIT_CONST(var,mask) \
> asm volatile (\
> "cbr %0, %1) "\
> : /* no outputs */\
> : "r" ((u08) (var)), \
> "i" ((mask)) /* <-------- type casting to u08 removed */ \
> )

From [email-masked] Sat Mar 17 11:29:10 2001
Received: from fe090.worldonline.dk ([212.54.64.152])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14e2ib-0004kA-00
for <[email-masked]>; Sat, 17 Mar 2001 11:29:10 +1300
Received: (qmail 16177 invoked by uid 0); 16 Mar 2001 22:30:49 -0000
Received: from 13.ppp1-20.worldonline.dk (HELO worldonline.dk) (212.54.79.141)
by fe090.worldonline.dk with SMTP; 16 Mar 2001 22:30:49 -0000
Message-ID: <[email-masked]>
Date: Fri, 16 Mar 2001 23:28:51 +0100
From: Jens Andersen <[email-masked]>
X-Mailer: Mozilla 4.08 [en] (Win95; I)
MIME-Version: 1.0
To: Robert Rozman <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] Assembler error message
References: <[email-masked]>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Robert,

I think that your problems come from the fact that the CBR instruction
requires
a register as the target, and as you want to modify a variable, this
wont work.

I assume that what you want to do, is to clear one or more bits in a
variable,
using a bit mask, so maybe you could try this.

//IR_Status variable
#define IR_Avail 128

volatile unsigned char IR_Status = 0x20;

#define CLEARBIT_CONST(var, mask) (var &= ~mask)

void main(void)
{
CLEARBIT_CONST(IR_Status, IR_Avail);
}

Compiled with option -O2 this generates the following assembler code.

10:test.c **** CLEARBIT_CONST(IR_Status, IR_Avail);
56 .stabn 68,0,10,.LM2-main
57 .LM2:
58 0008 8091 0000 lds r24,IR_Status
59 000c 8F77 andi r24,lo8(127)
60 000e 8093 0000 sts IR_Status,r24
11:test.c **** }

I think that this is as best as you can get it. :)

Best regards
Jens Andersen

Robert Rozman wrote:
>
> Hello,
>
> thanks for response. Only one short question:
> - I'd like macro CLEARBIT_CONST to influence value of variable 'var'. Do I
> have to add something to output section of macro too - as it is now, it
> seems like it doesn't have any output or influence on variable.
>
> Thanks in advance,
>
> Robert Rozman
>
> -----Izvorno sporoèilo-----
> Od: Denis Chertykov <[email-masked]>
> Za: Robert Rozman <[email-masked]>
> Kp: [email-masked] <[email-masked]>
> Datum: 16. marec 2001 20:17
> Zadeva: Re: [avr-gcc-list] Assembler error message
>
> >Try to use:
> >
> >#define CLEARBIT_CONST(var,mask) \
> > asm volatile (\
> > "andi %0, lo8(0xff - (%1)) "\
> > : /* no outputs */\
> > : "r" ((u08) (var)), \
> > "i" ((u08) (mask)) \
> > )
> >
> >
> >Or:
> >
> >#define CLEARBIT_CONST(var,mask) \
> > asm volatile (\
> > "cbr %0, %1) "\
> > : /* no outputs */\
> > : "r" ((u08) (var)), \
> > "i" ((mask)) /* <-------- type casting to u08 removed */ \
> > )
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Sun Mar 18 09:52:20 2001
Received: from smtphost5.home.se ([195.66.35.201] helo=smtp2.home.se)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14eOcV-0007Bn-00
for <[email-masked]>; Sun, 18 Mar 2001 09:52:20 +1200
Received: from [email-masked] [130.239.144.205] by home.se
with Novell Internet Messaging System Web Client; Sat, 17 Mar 2001 22:52:30
From: Gabriel Gerhardsson <[email-masked]>
To: [email-masked]
Date: Sat, 17 Mar 2001 21:52:30 GMT
X-Sender: Novell Internet Messaging System Web Client
MIME-Version: 1.0
Message-ID: <[email-masked]>
Content-type: text/plain; charset="ISO-8859-1"
Content-transfer-encoding: 8bit
Subject: [avr-gcc-list] Installing avr-gcc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi!

I'm about to install avr-gcc on a RedHat7.0 system and I'm a
bit worried about what the `make install` will do... Will it
overwrite the existing installation of gcc? Is there
anything like this that I should think of and make
preparations for, before I do the installation?
To make it clear what I want: I want to have gcc installed
and working for both x86 and avr.

I intend to follow the instructions on this site:
home.overta.ru/users/denisc/
Or does anyone have any other suggestions?

Any hints wellcome...
/Gabriel

From [email-masked] Sun Mar 18 20:35:26 2001
Received: from smtphost5.home.se ([195.66.35.201] helo=smtp2.home.se)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14eYer-0007aJ-00
for <[email-masked]>; Sun, 18 Mar 2001 20:35:25 +1200
Received: from [email-masked] [130.239.144.205] by home.se
with Novell Internet Messaging System Web Client; Sun, 18 Mar 2001 09:35:35
Subject: Re: [avr-gcc-list] Installing avr-gcc
From: Gabriel Gerhardsson <[email-masked]>
To: [email-masked]
Date: Sun, 18 Mar 2001 08:35:35 GMT
X-Sender: Novell Internet Messaging System Web Client
MIME-Version: 1.0
Message-ID: <[email-masked]>
Content-type: text/plain; charset="ISO-8859-1"
Content-transfer-encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> Hi Gabriel
> Go to http://avr.jpk.co.nz and look under "tools" which
will have
> the url of a site that has prebuilt binaries and the
sources, which
> will get installed in your /usr/local directory. They
are newer
> than the files from denis site.
> Cheers
> Carl
>

Thank you for your help. I installed the rpm and it's all
working very well.

Thanks
/Gabriel

From [email-masked] Sun Mar 18 21:59:27 2001
Received: from mail4.svr.pol.co.uk ([195.92.193.211])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14eZy1-0007dm-00
for <[email-masked]>; Sun, 18 Mar 2001 21:59:20 +1200
Received: from modem-238.erellont.dialup.pol.co.uk ([62.136.197.238] helo=lab)
by mail4.svr.pol.co.uk with smtp (Exim 3.13 #0)
id 14ea0B-0000tN-00; Sun, 18 Mar 2001 10:01:31 +0000
Message-ID: <006f01c0af92$ece9b880$e588883e@lab>
From: "Arreckx" <[email-masked]>
To: "Gabriel Gerhardsson" <[email-masked]>,
<[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Installing avr-gcc
Date: Sun, 18 Mar 2001 10:05:12 -0000
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> Hi!
>
> I'm about to install avr-gcc on a RedHat7.0 system and I'm a
> bit worried about what the `make install` will do... Will it
> overwrite the existing installation of gcc? Is there
> anything like this that I should think of and make
> preparations for, before I do the installation?
> To make it clear what I want: I want to have gcc installed
> and working for both x86 and avr.
>
> I intend to follow the instructions on this site:
> home.overta.ru/users/denisc/
> Or does anyone have any other suggestions?
>
> Any hints wellcome...
> /Gabriel

To be real safe, you could set -prefix in the build configure to something
like /usr/local/avr.

But even if you haven't, don't worry, at least it will not override your
existing gcc.

The GCC guys have thought of that. Different targets uses different names.
So avr-gcc tools are all prefixed 'avr-' in the common /bin directory.
(Typically /usr/local/bin).
The install will also create gcc, ar, as etc... for the avr, but will copy
these in an avr sub-directory.
Just watch for what goes in /usr/local/include. The avr install will copy at
least 3 headers in there. These headers are not avr specific but matches
with the latest GCC distribution. But these should still work fine.
Backup you /usr/lib and /usr/include in case of doubt, but it works for me !

Bill.

From [email-masked] Mon Mar 19 00:00:10 2001
Received: from [207.174.230.106] (helo=ozservers.com ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14ebr0-0007kD-00
for <[email-masked]>; Mon, 19 Mar 2001 00:00:10 +1200
Received: (qmail 4495 invoked from network); 19 Mar 2001 06:15:56 -0000
Received: from d268-ps4-mel.alphalink.com.au (HELO research) (202.161.111.14)
by 207.174.230.165 with SMTP; 19 Mar 2001 06:15:56 -0000
Message-ID: <004401c0afa3$fce574c0$0e6fa1ca@research>
From: "Ron Kreymborg" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]> <000701c0a9ef$5752dca0$c769a1ca@research> <[email-masked]>
Subject: Re: [avr-gcc-list] Re: New Win32 binaries for testing
Date: Sun, 18 Mar 2001 22:48:54 +1100
Organization: Jennaron Research
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Denis Chertykov or Michael Stumpf

Could you tell me (and perhaps Gunnar) if one need only #define the
L_udivmodqi4 variable in the avr libgcc.s to fix the current link problem
with dtostre.s. Or are there other solutions?

Regards
Ron Kreymborg

----- Original Message -----
From: "Gunnar Henne" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
Sent: Monday, March 12, 2001 8:37 PM
Subject: [avr-gcc-list] Re: New Win32 binaries for testing

> Hello Ron,
>
> Ron Kreymborg schrieb:
> >
> > Gunnar
> >
> > I downloaded your latest Windows avrgcc20010211.exe version but still
looks
> > like either you may not have the latest avrlib, or I am doing something
> > wrong.
>
> Please use the links, I provided in my last mail concerning this topic.
> You have downloaded the old version. I will make links to the new
> version on my download page if someone have successfully tested it.
>
> Greetings
>
> Gunnar
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Mon Mar 19 06:16:54 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ehjY-0007zL-00
for <[email-masked]>; Mon, 19 Mar 2001 06:16:53 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.137])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id VAA18429;
Sun, 18 Mar 2001 21:19:06 +0300
To: Jens Andersen <[email-masked]>
Cc: Robert Rozman <[email-masked]>, [email-masked]
Subject: Re: [avr-gcc-list] Assembler error message
References: <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 18 Mar 2001 21:11:47 +0300
In-Reply-To: Jens Andersen's message of "Fri, 16 Mar 2001 23:28:51 +0100"
Message-ID: <[email-masked]>
Lines: 38
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Jens Andersen <[email-masked]> writes:

> Hi Robert,
>
> I think that your problems come from the fact that the CBR instruction
> requires
> a register as the target, and as you want to modify a variable, this
> wont work.
>
> I assume that what you want to do, is to clear one or more bits in a
> variable,
> using a bit mask, so maybe you could try this.
>
> //IR_Status variable
> #define IR_Avail 128
>
> volatile unsigned char IR_Status = 0x20;
>
> #define CLEARBIT_CONST(var, mask) (var &= ~mask)
>
> void main(void)
> {
> CLEARBIT_CONST(IR_Status, IR_Avail);
> }
>
> Compiled with option -O2 this generates the following assembler code.
>
> 10:test.c **** CLEARBIT_CONST(IR_Status, IR_Avail);
> 56 .stabn 68,0,10,.LM2-main
> 57 .LM2:
> 58 0008 8091 0000 lds r24,IR_Status
> 59 000c 8F77 andi r24,lo8(127)
> 60 000e 8093 0000 sts IR_Status,r24
> 11:test.c **** }
>
> I think that this is as best as you can get it. :)

I'm agree with this.

From [email-masked] Mon Mar 19 16:30:35 2001
Received: from email.netonecom.net ([209.172.26.13] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14erJS-0008Pq-00
for <[email-masked]>; Mon, 19 Mar 2001 16:30:35 +1200
Received: from netonecom.net (catudal.netonecom.net [216.65.187.222])
by email.netonecom.net (8.11.2/8.11.0) with ESMTP id f2J4WKO15039;
Sun, 18 Mar 2001 23:32:22 -0500 (EST)
Message-ID: <[email-masked]>
Date: Sun, 18 Mar 2001 23:32:02 -0500
From: Michel Catudal <[email-masked]>
Organization: Pas =?iso-8859-1?Q?organis=E9?= par Ti-Mou
X-Mailer: Mozilla 4.76 [Joual] (X11; U; Linux 2.4.2 i586)
X-Accept-Language: fr-CA, en-US
MIME-Version: 1.0
To: Denis Chertykov <[email-masked]>
CC: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Re: New linux binaries available
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by email.netonecom.net id f2J4WKO15039
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Denis Chertykov a =E9crit :
>=20
> > My log is identical to yours.
>=20
> So, compile binutils.
> Compile your C file as `avr-gcc -Os -S your-c-file', than
> cd to binutils/gas build directory and run
> `as-new your-c-file.s'
>=20
> Is you have `Error: register required' ?
>=20

Sorry about the delay in responding but I've been busy with a son
with 2 broken arms, and a lot of other things.

Last night I downloaded both latest CVS trees. Binutils from the RedHat C=
VS
and gcc from the GCC CVS. Binutils compiled without any problem. I now ge=
t
some different errors on the compiler. I did compile a C program as you
requested. I didn't get any error.

Here is the result of the compile of gcc. I did assemble the generated fi=
le
with avr-as generated by the binutils and got no error. gcc seems to be
the thing that is broken right now.

I have binutils installed on /usr/local/bin

Adding -save-temps in /usr/src/packages/BUILD/avr-gcc-010317/gcc/libgcc.m=
k
to the first compile I get this

if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
./xgcc -B./ -B/usr/local/avr/bin/ -isystem /usr/local/avr/include -save-t=
emps -O2 -DCROSS_COMPILE -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-p=
rototypes -Wmissing-prototypes -isystem ./include=20
-DDF=3DSF -Dinhibit_libc -mcall-prologues -g1 -DIN_LIBGCC2 -D__GCC_FLOAT=
_NOT_NEEDED -Dinhibit_libc -I. -I. -I. -I./. -I./config -I./../include -D=
L_mulqi3 -xassembler-with-cpp -c ./config/avr/libgcc.S
-o libgcc/./_mulqi3.o
libgcc.s: Assembler messages:
libgcc.s:23: Error: suffix or operands invalid for `clr'
libgcc.s:23: Error: no such instruction: `clear result'
libgcc.s:25: Error: no such instruction: `sbrc r24,0'
libgcc.s:26: Error: too many memory references for `add'
libgcc.s:27: Error: too many memory references for `add'
libgcc.s:27: Error: no such instruction: `shift multiplicand'
libgcc.s:28: Error: no such instruction: `breq __mulqi3_exit'
libgcc.s:28: Error: no such instruction: `while multiplicand!=3D0'
libgcc.s:29: Error: no such instruction: `lsr r24'
libgcc.s:30: Error: no such instruction: `brne __mulqi3_loop'
libgcc.s:30: Error: no such instruction: `exit if multiplier=3D0'
libgcc.s:32: Error: too many memory references for `mov'
libgcc.s:32: Error: no such instruction: `result to return register'
make[1]: *** [libgcc/./_mulqi3.o] Error 1
make[1]: Leaving directory `/usr/src/packages/BUILD/avr-gcc-010317/gcc'

and this is libgcc.s generated

# 40 "config/avr/libgcc.S"
.section .text.libgcc, "ax", @progbits

.macro mov_l r_dest, r_src

mov \r_dest, \r_src

.endm

.macro mov_h r_dest, r_src

mov \r_dest, \r_src

.endm
# 69 "config/avr/libgcc.S"
.global __mulqi3
.func __mulqi3
__mulqi3:
clr r0 ; clear result
__mulqi3_loop:
sbrc r24,0
add r0,r22
add r22,r22 ; shift multiplicand
breq __mulqi3_exit ; while multiplicand !=3D 0
lsr r24 ;
brne __mulqi3_loop ; exit if multiplier =3D 0
__mulqi3_exit:
mov r24,r0 ; result to return register
ret

.endfunc

--=20
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://www.netonecom.net/~bbcat
We have all kinds of links
and many SuSE 7.0 Linux RPM packages

From [email-masked] Mon Mar 19 20:50:01 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14evMW-000086-00
for <[email-masked]>; Mon, 19 Mar 2001 20:50:00 +1200
Received: (qmail 25531 invoked from network); 19 Mar 2001 08:54:17 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 19 Mar 2001 08:54:17 -0000
Received: from robi ([193.2.76.192]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with SMTP id AAA22505
for <[email-masked]>; Mon, 19 Mar 2001 09:43:39 +0100
Message-ID: <[email-masked]>
From: [email-masked] (Robert Rozman)
To: <[email-masked]>
Subject: Re: [avr-gcc-list] Use of variables and programming in avr-gcc
Date: Mon, 19 Mar 2001 09:55:18 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

thanks Jorg for explanation. Carried by those advices I got an idea to keep
all global variables in struct, hoping that Z will point to them with
displacement and I'll save quite some bytes cause global variables are
accessed frequently.

But then I discovered that Z register is loaded again and again prior each
access through Z with displacement. This behaviour makes this approach non
oseful, but I still think that maybe somehow different I can get compiler to
optimize away those redundant loading of Z register.

I've used following program:
typedef struct {
char day;
char hour;
char min;
char sec;
} time_struct;

time_struct global ;

time_struct *time = &global;

char day;
char hour;
char min;
char sec;

int main(void)
{

day = 5;
hour= 9;
min = 10;
sec =10;

time->day = 5;
time->hour= 9;
time->min = 10;
time->sec =10;

for (;;) {} /* loop forever */
-----------------------------------------------
and I got:
44:test1.c **** day = 5;
75 .stabn 68,0,44,.LM2-main
76 .LM2:
77 0008 95E0 ldi r25,lo8(5)
78 000a 9093 0000 sts day,r25
45:test1.c **** hour= 9;
79 .stabn 68,0,45,.LM3-main
80 .LM3:
81 000e 29E0 ldi r18,lo8(9)
82 0010 2093 0000 sts hour,r18
46:test1.c **** min = 10;
83 .stabn 68,0,46,.LM4-main
84 .LM4:
85 0014 8AE0 ldi r24,lo8(10)
86 0016 8093 0000 sts min,r24
47:test1.c **** sec =10;
87 .stabn 68,0,47,.LM5-main
88 .LM5:
89 001a 8093 0000 sts sec,r24
48:test1.c ****
49:test1.c **** time->day = 5;
90 .stabn 68,0,49,.LM6-main
91 .LM6:
92 001e E091 0000 lds r30,time
93 0022 F091 0000 lds r31,(time)+1
94 0026 9083 st Z,r25
50:test1.c **** time->hour= 9;
95 .stabn 68,0,50,.LM7-main
96 .LM7:
97 0028 E091 0000 lds r30,time
98 002c F091 0000 lds r31,(time)+1
99 0030 2183 std Z+1,r18
51:test1.c **** time->min = 10;
100 .stabn 68,0,51,.LM8-main
101 .LM8:
102 0032 E091 0000 lds r30,time
103 0036 F091 0000 lds r31,(time)+1
104 003a 8283 std Z+2,r24
52:test1.c **** time->sec =10;
105 .stabn 68,0,52,.LM9-main
106 .LM9:
107 003c E091 0000 lds r30,time
108 0040 F091 0000 lds r31,(time)+1
109 0044 8383 std Z+3,r24
--------------------------------------

It can be seen that all but first loading register Z are redundant. If
compiler would optimize them away one could save a lot of bytes of coding
space when globals are frequently accessed.

So I kindly ask for advice, what I'm doing wrong in definition of struct or
pointer. I surely don't believe that avr-gcc is not capable of optimizing
such redundants away (in example I used -Os, but also -O3 doesn't change
things).

Thanks in advance,

Robert Rozman
}

-----Izvorno sporoèilo-----
Od: Robert Rozman <[email-masked]>
Za: [email-masked] <[email-masked]>
Datum: 1. marec 2001 12:06
Zadeva: [avr-gcc-list] Use of variables and programming in avr-gcc

>Hello,
>
>I'm relatively newbie to avr-gcc. I've not found any reference/advice on
>how to declare variables and how to use them in avr-gcc. Ther is only
>one Application note on atmel site about efficient programming in C, but
>it is for one of commercial compilers.
>
>I've several question and I'd kindly ask if someone from more
>experienced guys is willing to organize his experience in few sentences
>of advice to novice users. Among other I have few specific questions:
>- do recomendations from mentioned application note apply also for
>avr-gcc ? if not, what should be done differently ?
>- what declaration keywords are really implemented and what is their
>effect (const, register, volatile, ...) and how exactly to use them ?
>- is it better to keep SRAM variables in structures - as APP note
>recomends) or not ?
>
>I'd kindly ask for answers in code space and also from speed point of
>view.
>
>Thanks in advance and special thanks to all guys working on avr-gcc,
>
>Robert Rozman
>
>
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Mon Mar 19 21:43:21 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ewC7-0000Af-00
for <[email-masked]>; Mon, 19 Mar 2001 21:43:20 +1200
Received: (from j@localhost)
by ida.interface-business.de id f2J9jXF78657;
Mon, 19 Mar 2001 10:45:33 +0100 (MET)
Date: Mon, 19 Mar 2001 10:45:33 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] Use of variables and programming in avr-gcc
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

[email-masked] (Robert Rozman) wrote:

> But then I discovered that Z register is loaded again and again
> prior each access through Z with displacement.

I can reproduce this (at least with the old compiler, i. e. not the
version from gcc's CVS). I think that's a question for Denis.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Tue Mar 20 02:02:54 2001
Received: from gateway.coinco.com ([209.144.41.178] helo=exchange_ca.CoinCo.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14f0FJ-0000LN-00
for <[email-masked]>; Tue, 20 Mar 2001 02:02:54 +1200
Received: by exchange_ca.coinco.com with Internet Mail Service (5.5.2650.21)
id <F3V8MJDJ>; Mon, 19 Mar 2001 08:02:03 -0600
Message-ID: <[email-masked]>
From: Bart McCoard <[email-masked]>
To: [email-masked]
Date: Mon, 19 Mar 2001 08:02:03 -0600
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C0B07D.2CD9DD90"
Subject: [avr-gcc-list] progmem
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C0B07D.2CD9DD90
Content-Type: text/plain;
charset="iso-8859-1"

Greetings,

Does anyone know of an easy way to access a long in program memory? I want
to build a lookup table in program memory and then access it to perform
calculations. I know that I can call the PRG_RDB(temp_table[index]);
function 4 times to build the long. Is there a better way? I'm also not
sure how to define a (byte*) pointer to program memory so that I can access
each byte individually when building up the long value. Any help would be
appreciated.

#define tc 128
__attribute__ ((progmem)) long temp_table[] =
{-50.00*tc,-49.32*tc,-35.78*tc,-27.24*tc,-20.68*tc,-15.24*tc,-10.45*tc,
-6.183*tc,-2.202*tc, 1.516*tc, 5.055*tc,
8.503*tc, 11.83*tc, 15.11*tc,
18.40*tc, 21.69*tc, 25.00*tc, 28.37*tc,
31.83*tc, 35.40*tc, 39.15*tc,
43.10*tc, 47.32*tc, 51.87*tc, 56.87*tc,
62.43*tc, 68.87*tc, 76.53*tc,
86.27*tc, 96.28*tc, 108.8*tc, 110.0*tc,
110.0*tc};

long out, p1, p2;

p1 = temp_table[index];
p2 = temp_table[index+1];

out = p2-p1;

Thanks!
Bartman

------_=_NextPart_001_01C0B07D.2CD9DD90
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2652.35">
<TITLE>progmem</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Arial">Greetings,</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Does anyone know of an easy way to =
access a long in program memory?&nbsp; I want to build a lookup table =
in program memory and then access it to perform calculations.&nbsp; I =
know that I can call the PRG_RDB(temp_table[index]); function 4 times =
to build the long.&nbsp; Is there a better way?&nbsp; I'm also not sure =
how to define a (byte*) pointer to program memory so that I can access =
each byte individually when building up the long value.&nbsp; Any help =
would be appreciated.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">#define tc 128</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">__attribute__ ((progmem)) long =
temp_table[] =3D =
{-50.00*tc,-49.32*tc,-35.78*tc,-27.24*tc,-20.68*tc,-15.24*tc,-10.45*tc,<=
/FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp; -6.183*tc,-2.202*tc, 1.516*tc, 5.055*tc, =
8.503*tc, 11.83*tc, 15.11*tc,</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 18.40*tc, 21.69*tc, 25.00*tc, =
28.37*tc, 31.83*tc, 35.40*tc, 39.15*tc,</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 43.10*tc, 47.32*tc, 51.87*tc, =
56.87*tc, 62.43*tc, 68.87*tc, 76.53*tc,</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 86.27*tc, 96.28*tc, 108.8*tc, =
110.0*tc, 110.0*tc};</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">long out, p1, p2;</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; p1 =3D =
temp_table[index];</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; p2 =3D =
temp_table[index+1];</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; out =3D =
p2-p1;</FONT>
</P>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">Thanks!</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Bartman</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C0B07D.2CD9DD90--

From [email-masked] Tue Mar 20 11:12:45 2001
Received: from ns.orbitel.bg ([195.24.32.2] helo=orbitel.bg)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14f8pQ-0000k3-00
for <[email-masked]>; Tue, 20 Mar 2001 11:12:44 +1200
Received: (qmail 19839 invoked from network); 19 Mar 2001 23:15:04 -0000
Received: from unknown (HELO home) (212.95.170.136)
by ns.orbitel.bg with SMTP; 19 Mar 2001 23:15:04 -0000
From: "Alexander Popov" <[email-masked]>
To: [email-masked]
Date: Tue, 20 Mar 2001 01:14:47 +0200
MIME-Version: 1.0
Content-type: Multipart/Mixed; boundary=Message-Boundary-9774
Reply-to: [email-masked]
Message-ID: <3AB6AF07.2969.2E2BDE@localhost>
Priority: normal
X-mailer: Pegasus Mail for Win32 (v3.12c)
Subject: [avr-gcc-list] Re: progmem
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--Message-Boundary-9774
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body

Bart McCoard wrote:
>Does anyone know of an easy way to access a long in program memory?

I've writen a PRG_RDW which works ok for me. It reads words from program
memory. You may try to expand it for reading longs.

btw If someone experience problems with this macro, please inform me for I'm
using it in many programs. Thanks!

Alexander Popov

--Message-Boundary-9774
Content-type: text/plain; charset=US-ASCII
Content-disposition: inline
Content-description: Attachment information.

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

---- File information -----------
File: ap_macro.h
Date: 20 Mar 2001, 0:47
Size: 1229 bytes.
Type: Program-source

--Message-Boundary-9774
Content-type: Application/Octet-stream; name="ap_macro.h"; type=Program-source
Content-disposition: attachment; filename="ap_macro.h"
Content-transfer-encoding: BASE64

LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCi8qIE1hY3JvIGRlZmluaXRp
b25zIGZvciBhdnItZ2NjICovDQovKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAq
Lw0KLyogQWxleGFuZGVyIFBvcG92ICAgICAgICAgICAgICAgKi8NCi8qIHNhc2hvQHZpcC5i
ZyAgICAgICAgICAgICAgICAgICovDQovKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqLw0KDQojaWZuZGVmIF9BUF9NQUNST19IXw0KI2RlZmluZSBfQVBfTUFDUk9fSF8NCg0K
I2RlZmluZSBfX3BvcnRiaXR3cml0ZShwb3J0LCBiaXQsIHZhbHVlKSBkbyB7ICAgXA0KICAg
aWYoKHZhbHVlKSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXA0KICAgICAg
c2JpKChwb3J0KSwgKGJpdCkpOyAgICAgICAgICAgICAgICAgICAgICAgXA0KICAgZWxzZSAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXA0KICAgICAgY2JpKChw
b3J0KSwgKGJpdCkpOyAgICAgICAgICAgICAgICAgICAgICAgXA0KIH0gd2hpbGUgKDApDQoN
CiNkZWZpbmUgX19scG1fbWFjcm93KGFkZHIpICh7ICAgICBcDQogICB1bnNpZ25lZCB0LCBk
dW1teTsgICAgICAgICAgICAgXA0KICAgYXNtIHZvbGF0aWxlICggICAgICAgICAgICAgICAg
IFwNCiAgICAgICJscG0iICAgICAgICAgIlxuXHQiICAgICAgICBcDQogICAgICAibW92ICAl
QTAscjAiICAiXG5cdCIgICAgICAgXA0KICAgICAgImFkaXcgcjMwLDEiICAiXG5cdCIgICAg
ICAgIFwNCiAgICAgICJscG0iICAgICAgICAgIlxuXHQiICAgICAgICBcDQogICAgICAibW92
ICAlQjAscjAiICAiXG5cdCIgICAgICAgXA0KICAgICAgOiAiPXIiICh0KSwgIj16IiAoZHVt
bXkpICAgIFwNCiAgICAgIDogIjEiIChhZGRyKSAgICAgICAgICAgICAgICBcDQogICApOyAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgXA0KICAgdDsgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgIFwNCn0pDQoNCnN0YXRpYyBpbmxpbmUgdW5zaWduZWQgX19scG1faW5saW5l
dyhjb25zdCB1bnNpZ25lZCAgKmFkZHIpIF9fYXR0cmlidXRlX18oKGNvbnN0KSk7DQpzdGF0
aWMgaW5saW5lIHVuc2lnbmVkIF9fbHBtX2lubGluZXcoY29uc3QgdW5zaWduZWQgICphZGRy
KQ0Kew0KICAgcmV0dXJuIF9fbHBtX21hY3JvdyhhZGRyKTsNCn0NCg0KI2RlZmluZSBQUkdf
UkRXKGFkZHIpIF9fbHBtX2lubGluZXcoYWRkcikNCg0KI2VuZGlmDQo=

--Message-Boundary-9774--

From [email-masked] Wed Mar 21 02:28:04 2001
Received: from box.vrn.ru ([195.98.64.73])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14fN7D-0001K6-00
for <[email-masked]>; Wed, 21 Mar 2001 02:28:03 +1200
Received: from dialup-uas-122.vrn.ru ([195.98.95.122] verified)
by box.vrn.ru (CommuniGate Pro SMTP 3.4)
with ESMTP id 9256232 for [email-masked]; Tue, 20 Mar 2001 17:30:29 +0300
Date: Tue, 20 Mar 2001 17:31:01 +0300
From: Oleg Gladyshev <[email-masked]>
X-Mailer: The Bat! (v1.47 Halloween Edition) Personal
Reply-To: Oleg Gladyshev <[email-masked]>
Organization: VSU
X-Priority: 3 (Normal)
Message-ID: <[email-masked]>
To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Binutils
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello all!

Help me, please! I can't compile programs for AVR on my Linux.
Firstly I tried binutils-2.10 with gcc-core-2.95.2 (and patches for
avr). When I tried to compile avr-libc-20000514 i've got an error.
Then I downloaded binutils' snapshot from 16.03.2001 and gcc-core from
12.03.2001. All was compiled fine but binutils' linker (or 'as') doesn't work
correct. It generates wrong ihex code! For example, it made wrong
entry point for my function (moved by one instruction forward). And
instruction 'ldi r28,0xDF' was assemlied to E19F what means 'ldi
r25,0x1f'

PS: Sorry for my bad english.

--
Best regards,
Oleg mailto:[email-masked]

From [email-masked] Wed Mar 21 04:42:36 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14fPDO-0001Pr-00
for <[email-masked]>; Wed, 21 Mar 2001 04:42:35 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.155])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id TAA01558;
Tue, 20 Mar 2001 19:44:56 +0300
To: [email-masked] (Joerg Wunsch)
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Use of variables and programming in avr-gcc
References: <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 20 Mar 2001 19:37:37 +0300
In-Reply-To: [email-masked]'s message of "Mon, 19 Mar 2001 10:45:33 +0100 (MET)"
Message-ID: <[email-masked]>
Lines: 13
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

[email-masked] (J Wunsch) writes:

> [email-masked] (Robert Rozman) wrote:
>
> > But then I discovered that Z register is loaded again and again
> > prior each access through Z with displacement.
>
> I can reproduce this (at least with the old compiler, i. e. not the
> version from gcc's CVS). I think that's a question for Denis.

IMHO: part of optimizer is broken.

Try your example for CVS gcc for x86.

From [email-masked] Wed Mar 21 05:16:14 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14fPjw-0001RY-00
for <[email-masked]>; Wed, 21 Mar 2001 05:16:13 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.143])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id UAA07063;
Tue, 20 Mar 2001 20:18:37 +0300
To: Oleg Gladyshev <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Binutils
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 20 Mar 2001 20:11:17 +0300
In-Reply-To: Oleg Gladyshev's message of "Tue, 20 Mar 2001 17:31:01 +0300"
Message-ID: <[email-masked]>
Lines: 16
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Oleg Gladyshev <[email-masked]> writes:

> Hello all!
>
> Help me, please! I can't compile programs for AVR on my Linux.
> Firstly I tried binutils-2.10 with gcc-core-2.95.2 (and patches for
> avr). When I tried to compile avr-libc-20000514 i've got an error.
> Then I downloaded binutils' snapshot from 16.03.2001 and gcc-core from
> 12.03.2001. All was compiled fine but binutils' linker (or 'as') doesn't work
> correct. It generates wrong ihex code! For example, it made wrong
> entry point for my function (moved by one instruction forward). And
> instruction 'ldi r28,0xDF' was assemlied to E19F what means 'ldi
> r25,0x1f'

What commands you use ?

From [email-masked] Wed Mar 21 08:46:42 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14fT1c-0001ed-00
for <[email-masked]>; Wed, 21 Mar 2001 08:46:41 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.137])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id XAA04726;
Tue, 20 Mar 2001 23:49:02 +0300
To: "Ron Kreymborg" <[email-masked]>
Cc: <[email-masked]>
Subject: Re: [avr-gcc-list] Re: New Win32 binaries for testing
References: <[email-masked]> <000701c0a9ef$5752dca0$c769a1ca@research> <[email-masked]> <004401c0afa3$fce574c0$0e6fa1ca@research>
From: Denis Chertykov <[email-masked]>
Date: 20 Mar 2001 23:41:43 +0300
In-Reply-To: "Ron Kreymborg"'s message of "Sun, 18 Mar 2001 22:48:54 +1100"
Message-ID: <[email-masked]>
Lines: 12
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Ron Kreymborg" <[email-masked]> writes:

> Denis Chertykov or Michael Stumpf
>
> Could you tell me (and perhaps Gunnar) if one need only #define the
> L_udivmodqi4 variable in the avr libgcc.s to fix the current link problem
> with dtostre.s. Or are there other solutions?

I can't understand your problem.
File /usr/local/lib/gcc-lib/avr/libgcc.a must have `__udivmodqi4'
function.

From [email-masked] Wed Mar 21 18:16:10 2001
Received: from cicero0.cybercity.dk ([212.242.40.52])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14fbuj-00021K-00
for <[email-masked]>; Wed, 21 Mar 2001 18:16:09 +1200
Received: from usr01.cybercity.dk (usr01.cybercity.dk [212.242.40.35])
by cicero0.cybercity.dk (Postfix) with ESMTP id B8730102987
for <[email-masked]>; Wed, 21 Mar 2001 07:18:37 +0100 (CET)
Received: from noa3 (port0.cvx1-sl.ppp.cybercity.dk [212.242.177.1])
by usr01.cybercity.dk (8.9.3/8.9.3) with SMTP id HAA17277
for <[email-masked]>; Wed, 21 Mar 2001 07:16:38 +0100 (CET)
(envelope-from [email-masked])
Message-ID: <000901c0b1ce$ca4c47f0$01b1f2d4@noa3>
From: "Kasper Pedersen" <[email-masked]>
To: <[email-masked]>
Date: Wed, 21 Mar 2001 07:16:14 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] windows instal of Gunnar's build - test release
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

If anyone has bandwidth to waste and wants to live dangerously..
I haven't even used it myself yet (will have to do some conversion of my asm
modules)

http://www.anderskp.dk/files/avrgcc20010228bz.exe

This is a *test install utility* with gunnar's GCC build. I changed the
compression system to use libbz2 instead of zlib in order to make it
smaller, but it's still 13MB. I didn't get all the slack out, it seems.

That server will handle any amount of load.

/Kasper

From [email-masked] Thu Mar 22 01:22:16 2001
Received: from box.vrn.ru ([195.98.64.73])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14fiZ6-0002JE-00
for <[email-masked]>; Thu, 22 Mar 2001 01:22:16 +1200
Received: from dialup-uas-77.vrn.ru ([195.98.95.77] verified)
by box.vrn.ru (CommuniGate Pro SMTP 3.4)
with ESMTP id 9273586 for [email-masked]; Wed, 21 Mar 2001 16:24:45 +0300
Date: Wed, 21 Mar 2001 16:25:33 +0300
From: Oleg Gladyshev <[email-masked]>
X-Mailer: The Bat! (v1.47 Halloween Edition) Personal
Reply-To: Oleg Gladyshev <[email-masked]>
Organization: VSU
X-Priority: 3 (Normal)
Message-ID: <[email-masked]>
To: avr-gcc-list <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] floating point library
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello all,

How can I reduce size of my program which uses floats? I use simple
float operations and my program increases up to 6K (in flash)! IAR compiles same
program to 1,5K How can I optimise my gcc libraries?

--
Best regards,
Oleg mailto:[email-masked]

From [email-masked] Thu Mar 22 03:21:54 2001
Received: from sttlpop2.sttl.uswest.net ([206.81.192.2])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14fkQr-0002Nz-00
for <[email-masked]>; Thu, 22 Mar 2001 03:21:53 +1200
Received: (qmail 93467 invoked by alias); 21 Mar 2001 15:24:21 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 93460 invoked by uid 0); 21 Mar 2001 15:24:21 -0000
Received: from aadslppp19.sttl.uswest.net (HELO larry) (216.160.75.19)
by sttlpop2.sttl.uswest.net with SMTP; 21 Mar 2001 15:24:21 -0000
Message-ID: <000901c0b21b$3d5f70e0$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
Date: Wed, 21 Mar 2001 07:22:05 -0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Writing code to multiple targets
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I have a bunch of code written for the classic AVR on
avr-gcc/gas. I want to port it to the IAR compiler series
and I want to accommodate the various classes of AVR chips.
The latter is not so big a deal since the differences are
largely covered in the ioxxxx.h files. Yet, there are a few.
For example the clock divisor bits for TC0 change between
classic and mega103, the "names" of UCR and USR change
between classic and mega163.

1. Is there a preferred approach to dealing with these
differences beyond "#ifdef ATmega163 ..."

2. Does anyone have experience with writing code for both
IAR and Avr-gcc and is willing to share any macros/headers
they have developed to simplify the process?

From [email-masked] Thu Mar 22 03:46:10 2001
Received: from blegroup.demon.co.uk
([158.152.198.111] helo=localhost.localdomain ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14fkoK-0002Pb-00
for <[email-masked]>; Thu, 22 Mar 2001 03:46:09 +1200
Received: (from root@localhost)
by localhost.localdomain (8.9.3/8.9.3) id QAA20358
for [email-masked]; Wed, 21 Mar 2001 16:55:53 GMT
Received: from lee.blegroup.demon.co.uk (lee.blegroup.demon.co.uk [192.168.1.2])
by localhost.localdomain (8.9.3/8.9.3) with SMTP id QAA20314
for <[email-masked]>; Wed, 21 Mar 2001 16:55:46 GMT
Message-ID: <[email-masked]>
From: "Lee Mitchell" <[email-masked]>
To: "AVR GCC Mailing List" <[email-masked]>
Date: Wed, 21 Mar 2001 15:53:24 -0000
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-scanner: scanned by Inflex 0.1.5 - (http://www.inflex.co.za/)
Subject: [avr-gcc-list] Is this possibly a bug in avr-gcc ?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Greetings folks,
My application creates an array of 800 structures in external sram on a
Mega103. The structures are 24 bytes in size.

I also have a pointer of the same type as the structure that i initialise to
point to the first item in the array.
My program does tests on data contained in the array, and uses the pointer
to point to an item, does a test on the data in that item, then increments
the pointer.

My problem is that for 1 entry in the array, the pointer is being calculated
incorrectly.
(i'm using ptr++ to increment the pointer).

I made my program dump the values that were being calculated out of the
serial port, and the relavent info is shown below...

Addr 504 = 0x40b3
Addr 505 = 0x40cb
Addr 506 = 0x40e3
Addr 507 = 0x40fb
Addr 508 = 0x4113
Addr 509 = 0x412b
Addr 510 = 0x4143
Addr 511 = 0x415b
Addr 512 = 0x4173
Addr 513 = 0x418b
Addr 514 = 0x11a3
Addr 515 = 0x41bb
Addr 516 = 0x41d3
Addr 517 = 0x41eb
Addr 518 = 0x4203
Addr 519 = 0x421b
Addr 520 = 0x4233
Addr 521 = 0x424b
Addr 522 = 0x4263
Addr 523 = 0x427b
Addr 524 = 0x4293
Addr 525 = 0x42ab
Addr 526 = 0x42c3

Note the address calculated for entry 514 is completely wrong, although all
values around it are correct.
Is this a bug in avr-gcc or should I shut up and go read my program again
and again ?
If its a bug, is it known and fixed ? cos its screwing my program up and
giving me a headache ;-)

I'm using the following build of avr-gcc for win32 (from Gunnar Henne's
site).

C:\WINDOWS>avr-gcc -v
Reading specs from C:\AVRGCC\BIN\..\lib\gcc-lib\avr\2.97\specs
Configured with:
./configure --prefix=/avrgcc --exec-prefix=/avrgcc --with-ggc=simple --enabl
e-languages=c --with
included-gettext --with-gc=simple --target=avr --host=i386-mingw32 --build=i
386-cygwin
gcc version 2.97 20010108 (experimental)

Regards..

Lee Mitchell

From [email-masked] Thu Mar 22 08:13:41 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14fozD-0002eQ-00
for <[email-masked]>; Thu, 22 Mar 2001 08:13:40 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.148])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id XAA22695;
Wed, 21 Mar 2001 23:16:06 +0300
To: Oleg Gladyshev <[email-masked]>
Cc: avr-gcc-list <[email-masked]>
Subject: Re: [avr-gcc-list] floating point library
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 21 Mar 2001 23:08:47 +0300
In-Reply-To: Oleg Gladyshev's message of "Wed, 21 Mar 2001 16:25:33 +0300"
Message-ID: <[email-masked]>
Lines: 17
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Oleg Gladyshev <[email-masked]> writes:

> Hello all,
>
> How can I reduce size of my program which uses floats? I use simple
> float operations and my program increases up to 6K (in flash)! IAR compiles same
> program to 1,5K

It's because avr-gcc by default uses floatin point routines written on C.
I'm use such routines for avr-gcc testing.

> How can I optimise my gcc libraries?

As I know latest avr-libc have an assembler written fp routines.
Try avr-gcc ... -lm

http://www.amelek.gda.pl/avr/

From [email-masked] Thu Mar 22 22:28:53 2001
Received: from [207.174.230.106] (helo=ozservers.com ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14g2Kr-0003BR-00
for <[email-masked]>; Thu, 22 Mar 2001 22:28:53 +1200
Received: (qmail 28548 invoked from network); 23 Mar 2001 04:44:49 -0000
Received: from d87-ps2-mel.alphalink.com.au (HELO research) (202.161.107.87)
by 207.174.230.165 with SMTP; 23 Mar 2001 04:44:49 -0000
Message-ID: <00b001c0b2bb$eeacbba0$576ba1ca@research>
From: "Ron Kreymborg" <[email-masked]>
To: <[email-masked]>
Date: Thu, 22 Mar 2001 21:36:03 +1100
Organization: Jennaron Research
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] Re: New Win32 binaries for testing
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Thanks for the clue Denis. I found __udivmodqi4 in the 3.1 libgcc.a that
Gunnar made available in gcc-2001.02.28.mingw32, but my 2.97 version of the
compiler (ex avrgcc20010211.exe) naturally runs the cpp0.exe in the 2.97
library directory. I renamed the \avrgcc\lib\gcc-lib\3.1 directory to 3.1
and (along with my previous __fp_zero and atof patches), the linker at last
found the __udivmodqi4 entry. Phew! Dropped the obj into Studio and the
result was correct.

So Gunnar, I have tested at least this part of your good work.

Regards
Ron

> "Ron Kreymborg" <[email-masked]> writes:
>
> > Denis Chertykov or Michael Stumpf
> >
> > Could you tell me (and perhaps Gunnar) if one need only #define the
> > L_udivmodqi4 variable in the avr libgcc.s to fix the current link
problem
> > with dtostre.s. Or are there other solutions?
>
> I can't understand your problem.
> File /usr/local/lib/gcc-lib/avr/libgcc.a must have `__udivmodqi4'
> function.

-----------------------------------------------------------------------
Jennaron Research Melbourne, Australia
-----------------------------------------------------------------------

From [email-masked] Fri Mar 23 05:42:59 2001
Received: from email.netonecom.net ([209.172.26.13] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14g96w-0003S5-00
for <[email-masked]>; Fri, 23 Mar 2001 05:42:58 +1200
Received: from netonecom.net (catudal.netonecom.net [216.65.187.222])
by email.netonecom.net (8.11.2/8.11.0) with ESMTP id f2MHjFO06941
for <[email-masked]>; Thu, 22 Mar 2001 12:45:19 -0500 (EST)
Message-ID: <[email-masked]>
Date: Thu, 22 Mar 2001 12:45:12 -0500
From: Michel Catudal <[email-masked]>
Organization: Pas =?iso-8859-1?Q?organis=E9?= par Ti-Mou
X-Mailer: Mozilla 4.76 [Joual] (X11; U; Linux 2.4.2 i586)
X-Accept-Language: fr-CA, en-US
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] gcc+binutils under Linux
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I finally got the new gcc program to compile last night with no errors but
have some comment and questions to those who know.

There has been several months that I've been trying to get the new stuff to
compile. It has been broken since somewhere around october or november 2000.

So far I've not been able to get a straight answer as to what happened exactly.
As I was reading some README files I've noticed that the gcc team has combined
the two. Despite this fact the distribution is still made of two different
pieces by different group of people. Unless you know exactly what to do
there is no way in hell that you will get the two to work together for the
avr. Everyone I've talked to so far that are not involved in the project
tell me of errors in compilation much like what I got.

So after reading that bit of info I copied the directories on the binutils
tree over to the gcc tree and compiled. It barfed on some C++ errors. I figured
that since they appear to be errors of the gcc compiler that binutils might have
some broken files so I copied over the original tree of gcc back to whatever
I had. I reconfigured, compiled and it did its job without a single errors.
There are a lot of errors which are flagged as warning like compare between
unsigned and signed but that's another issue.

What has confused me in the whole episode is why there is no obvious mention
that you must combine the two to get anything to work.

I haven't tried the last approach with the new CVS but I would assume that it shouldn't
be much different than with the snapshots.

I will test to see if this works as expected. If I feel that it does I will post
both the SRPM and RPM files on my web site for those interested. I am using
SuSE 7.1 so these binaries should work on Mandrake and RedHat as well.
I will eventually have Debian package as well for Corel 2nd Edition.

I will try to keep up with the development and if I do find bugs will try
to fix them. I felt that I must first get the darn thing to compile before I
would attempt to make any search and fix bugs tasks.

--
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://www.netonecom.net/~bbcat
We have all kinds of links
and many SuSE 7.0 Linux RPM packages

From [email-masked] Fri Mar 23 06:49:20 2001
Received: from mtiwmhc28.worldnet.att.net ([204.127.131.36])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14gA99-0003Yo-00
for <[email-masked]>; Fri, 23 Mar 2001 06:49:20 +1200
Received: from jimanji ([12.93.209.87]) by mtiwmhc28.worldnet.att.net
(InterMail vM.4.01.03.16 201-229-121-116-20010115) with SMTP
id <20010322185115.DSGH6477.mtiwmhc28.worldnet.att.net@jimanji>
for <[email-masked]>; Thu, 22 Mar 2001 18:51:15 +0000
Message-ID: <[email-masked]>
Reply-To: "Jim Pearce" <[email-masked]>
From: "Jim Pearce" <[email-masked]>
To: <[email-masked]>
Date: Thu, 22 Mar 2001 13:50:09 -0500
Organization: Pegasus Technologies
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] crts8515.o for mega163
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I am moving from writing for the AT90S8515 to the mega163. I have changed the flag to "-mmcu=atmega163" in my compile command but I
still get crts8515.o linked according to my map file.

Is there anything else that I need to do to change the target processor?

Thanks all.

Jim

From [email-masked] Fri Mar 23 21:26:49 2001
Received: from atusks01.alcatel.at ([212.183.9.130] helo=mail.alcatel.at)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14gNqK-00046s-00
for <[email-masked]>; Fri, 23 Mar 2001 21:26:48 +1200
Received: from alcatel.at (atusel33.aut.alcatel.at [146.112.129.215])
by mail.alcatel.at (8.9.3/8.9.3/1.21 01/27/01 21:43:09) with ESMTP id KAA26596;
Fri, 23 Mar 2001 10:28:56 +0100 (MET)
Message-ID: <[email-masked]>
Date: Fri, 23 Mar 2001 10:28:56 +0100
From: Christoph Plattner <[email-masked]>
Organization: AAA
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.5.1 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
To: Michel Catudal <[email-masked]>
CC: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] gcc+binutils under Linux
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

It is not so curious, at it sounds !

See the thing as a 2-layered software.

The binutils (lower leyer) provide the code generating from
assembler, does the linking and library processing.

The C compiler a level (layer) higher is the artifical program,
which is able to parse high level language and do complicated
optimazation operations.

The gcc itself consists again of two parts, one is the front
end, doing this above mentioned artificial part, and translating
the code in a meta code (register transfer level), the other is
the backend, producing a machine dependent assembler code,
which is further by the binutils internally.

So the backend work is near the binutils work. But the
important frontend is the main work of the compiler and is
really a machine and binutils independent kind of work !!

Cheers
Christoph

Michel Catudal wrote:
>
> I finally got the new gcc program to compile last night with no errors but
> have some comment and questions to those who know.
>
> There has been several months that I've been trying to get the new stuff to
> compile. It has been broken since somewhere around october or november 2000.
>
> So far I've not been able to get a straight answer as to what happened exactly.
> As I was reading some README files I've noticed that the gcc team has combined
> the two. Despite this fact the distribution is still made of two different
> pieces by different group of people. Unless you know exactly what to do
> there is no way in hell that you will get the two to work together for the
> avr. Everyone I've talked to so far that are not involved in the project
> tell me of errors in compilation much like what I got.
>
> So after reading that bit of info I copied the directories on the binutils
> tree over to the gcc tree and compiled. It barfed on some C++ errors. I figured
> that since they appear to be errors of the gcc compiler that binutils might have
> some broken files so I copied over the original tree of gcc back to whatever
> I had. I reconfigured, compiled and it did its job without a single errors.
> There are a lot of errors which are flagged as warning like compare between
> unsigned and signed but that's another issue.
>
> What has confused me in the whole episode is why there is no obvious mention
> that you must combine the two to get anything to work.
>
> I haven't tried the last approach with the new CVS but I would assume that it shouldn't
> be much different than with the snapshots.
>
> I will test to see if this works as expected. If I feel that it does I will post
> both the SRPM and RPM files on my web site for those interested. I am using
> SuSE 7.1 so these binaries should work on Mandrake and RedHat as well.
> I will eventually have Debian package as well for Corel 2nd Edition.
>
> I will try to keep up with the development and if I do find bugs will try
> to fix them. I felt that I must first get the darn thing to compile before I
> would attempt to make any search and fix bugs tasks.
>
> --
> Tired of Microsoft's rebootive multitasking?
> then it's time to upgrade to Linux.
> http://www.netonecom.net/~bbcat
> We have all kinds of links
> and many SuSE 7.0 Linux RPM packages
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
+--------V--------+ [email-masked]
| A L C A T E L | -----------------------------
+-----------------+ Phone: +43 1 27722 3706
T A S Fax: +43 1 27722 3955

From [email-masked] Fri Mar 23 22:06:57 2001
Received: from innocence.interface-business.de ([193.101.57.202])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14gOTA-00048p-00
for <[email-masked]>; Fri, 23 Mar 2001 22:06:57 +1200
Received: from interface-business.de (uucp@localhost)
by innocence.interface-business.de with UUCP id f2NA9OL63295
for [email-masked]; Fri, 23 Mar 2001 11:09:24 +0100 (CET)
Received: (from j@localhost)
by B7173150.deutschepost.de id f2NA8om18830
for [email-masked]; Fri, 23 Mar 2001 11:08:50 +0100 (CET)
Date: Fri, 23 Mar 2001 11:08:50 +0100
From: J Wunsch <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
Reply-To: Joerg Wunsch <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.95.4i
X-Phone: +49-351-31809-14
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
Organization: interface business GmbH, Dresden
Subject: [avr-gcc-list] Anyone ever compiled avr-gcc on ! IA32 platforms?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

i recently noticed that my FreeBSD port of avr-gcc (*) failed to
compile on the Alpha architecture.

(*) A FreeBSD port is basically a packaging framework around software
that can be fetched from the Internet. It always adds dependencies
and description files, and could add patches if required, but despite
of the name, even software that compiles out of the box directly from
the Internet version needs a `port' in order to have a pre-compiled
binary package on the distribution CD-ROMs.

[Note that the following is all about gcc 2.95.x, since basically a
port builds upon Internet-available distribution files, i. e. i can't
afford to do something like a CVS checkout within a port. So should
the following problem already be fixed in the current development
version, i'll be glad to hear it as well.]

I was somewhat surprised by the fact, since i couldn't think of a way
why a cross-development software that works on host architecture A
would not run on host architecture B as well. I investigated a
little, and found that gcc's build framework by default generated a
CFLAGS macro of "-O -pipe -mcpu=ev4" on the Alpha host platform.
While this might be OK as far as it is used to generate code that is
intented to run on the host platform, like the compiler tools itself,
it gets completely bogus when it comes to the stage where the new-born
gcc tries to compile its libgcc. It seems to me that gcc's build
framework is, well, broken in this respect. First, IMHO it should
always use CFLAGS_FOR_TARGET in that case, but while this macro
appears to be generated at the top-level Makefile, it's not inherited
across the build hierarchy, so the subdirectory Makefiles only have
CFLAGS to use. Second, i couldn't find a way to convince the
configure script to set CFLAGS_FOR_TARGET different from the default
CFLAGS. (The original value of CFLAGS is somehow generated by
config.guess, that's where the -mcpu=ev4 seems to originate, although
i didn't find out how this is actually being created.)

By now, i cheated by forcing the configure script into always using
"-O -pipe" for CFLAGS (-O2 is broken on the Alpha, so i can't use
that), but i'd like to know whether there's a better way. Maybe i
simply overlooked something.

--
Joerg Wunsch NIC hdl: JW11-RIPE On the air: DL8DTL
See http://www.interface-business.de/~j/ for more information.

Some addresses in the headers might be wrong (sorry - I'm not the admin here).

From [email-masked] Fri Mar 23 23:35:54 2001
Received: from gold.uni-miskolc.hu ([193.6.10.1])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14gPrA-0004Ci-00
for <[email-masked]>; Fri, 23 Mar 2001 23:35:53 +1200
Received: from gold.uni-miskolc.hu (muszer.alt.uni-miskolc.hu [193.6.3.15])
by gold.uni-miskolc.hu (8.10.0/8.10.0) with ESMTP id f2NCXYQ30338
for <[email-masked]>; Fri, 23 Mar 2001 12:33:34 GMT
Message-ID: <[email-masked]>
Date: Fri, 23 Mar 2001 12:28:36 +0100
From: Peter Bozzay <[email-masked]>
Organization: University of Miskolc, Department of Logistics
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: hu
MIME-Version: 1.0
CC: avr-gcc-list <[email-masked]>
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] How can ignore unused functions?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I'm new in avr-gcc, perhaps it's a silly question:

If I have unused functions in source files, they enlarge the
compiled/linked code size gratuitously. Can this optimizable anyway?

Regards,
Peter

From [email-masked] Sat Mar 24 23:36:03 2001
Received: from mail.tor.axxent.ca ([209.250.128.26])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14gmKw-0005B1-00
for <[email-masked]>; Sat, 24 Mar 2001 23:36:02 +1200
Received: from digicom (dial-0112.tor.axxent.ca [216.249.0.112])
by mail.tor.axxent.ca (8.11.0/8.9.3) with ESMTP id f2OBcXi19260
for <[email-masked]>; Sat, 24 Mar 2001 06:38:33 -0500 (EST)
Received: from cwall by digicom with local (Exim 3.12 #1 (Debian))
id 14gmRv-0000An-00; Sat, 24 Mar 2001 06:43:15 -0500
Date: Sat, 24 Mar 2001 06:43:15 -0500
From: Carl Wall <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
Mail-Followup-To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Subject: [avr-gcc-list] Phil's stk200 linux programmer
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Phil Ray has released a new version of his Linux parallel port stk200
programming software. From the readme.

This is mostly a code clean-up release, with the exception
of the "-p" (no pause) switch, which allows skipping the "Insert the AVR
into the programmer..." prompt. Some people have requested this in order to
integrate the utilities into Makefiles or scripts. Additionally, all of the
programs now respond with help and version information to the "-h" and "-v"
prompts. The Makefile has been improved. Configuration information (which
hardware and port, etc.) is now in the Makefile. The man pages, originally
released separately, are now part of the package. It should now be easier to
make the utilities work with new parallel-port-programmer hardware as all of
the configuration information for each hardware platform is contained in a
header file.

http://www.cnhtech.com/~avr1/

If you build the stk200 dongle which is also on the site, you can program
avr chips without having a stk200 board.

Cheers
Carl

--
Carl A. Wall VE3APY Toronto, Ontario, Canada
"Created on DEBIAN 2.2, an alternative to Microsoft Systems
and a GNU/Linux distribution of Open Source programming"

From [email-masked] Sun Mar 25 02:09:19 2001
Received: from email.netonecom.net ([209.172.26.13] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14gojG-0005HP-00
for <[email-masked]>; Sun, 25 Mar 2001 02:09:19 +1200
Received: from netonecom.net (catudal.netonecom.net [216.65.187.222])
by email.netonecom.net (8.11.2/8.11.0) with ESMTP id f2OEC0w12770
for <[email-masked]>; Sat, 24 Mar 2001 09:12:00 -0500 (EST)
Message-ID: <[email-masked]>
Date: Sat, 24 Mar 2001 09:11:47 -0500
From: Michel Catudal <[email-masked]>
Organization: Pas =?iso-8859-1?Q?organis=E9?= par Ti-Mou
X-Mailer: Mozilla 4.76 [Joual] (X11; U; Linux 2.4.2 i586)
X-Accept-Language: fr-CA, en-US
MIME-Version: 1.0
CC: [email-masked]
Subject: Re: [avr-gcc-list] Phil's stk200 linux programmer
References: <[email-masked]>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by email.netonecom.net id f2OEC0w12770
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Carl Wall a =E9crit :
>=20
> Phil Ray has released a new version of his Linux parallel port stk200
> programming software. From the readme.
>=20
> This is mostly a code clean-up release, with the exception
> of the "-p" (no pause) switch, which allows skipping the "Insert the AV=
R
> into the programmer..." prompt. Some people have requested this in orde=
r to
> integrate the utilities into Makefiles or scripts. Additionally, all of=
the
> programs now respond with help and version information to the "-h" and =
"-v"
> prompts. The Makefile has been improved. Configuration information (whi=
ch
> hardware and port, etc.) is now in the Makefile. The man pages, origina=
lly
> released separately, are now part of the package. It should now be easi=
er to
> make the utilities work with new parallel-port-programmer hardware as a=
ll of
> the configuration information for each hardware platform is contained i=
n a
> header file.
>=20
> http://www.cnhtech.com/~avr1/
>=20
> If you build the stk200 dongle which is also on the site, you can pr=
ogram
> avr chips without having a stk200 board.
>=20
> Cheers
> Carl
>=20

I did release another programmer for the stk200 dongle and provide plans =
also
for a dongle. The difference with my programmer is that I increase the sp=
eed
of programming and it should work under a user. I do require you to have
the tvision library installed but do have it available on my web site as =
well.
The programmer runs in a turbo vision environment and uses the new parall=
el
port kernel driver.

--=20
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://www.netonecom.net/~bbcat
We have all kinds of links
and many SuSE 7.0 Linux RPM packages

From [email-masked] Tue Mar 27 00:23:07 2001
Received: from ha1.rdc2.nsw.optushome.com.au ([203.164.2.50] helo=mss.rdc2.nsw.optushome.com.au)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14hW1b-00007j-00
for <[email-masked]>; Tue, 27 Mar 2001 00:23:07 +1200
Received: from scottsP3 ([203.164.125.96]) by mss.rdc2.nsw.optushome.com.au
(InterMail vM.4.01.03.00 201-229-121) with SMTP
id <20010326122555.IWXU21116.mss.rdc2.nsw.optushome.com.au@scottsP3>
for <[email-masked]>; Mon, 26 Mar 2001 22:25:55 +1000
From: Scott Pitcher <[email-masked]>
Reply-To: [email-masked]
Organization: LETECH
To: [email-masked]
Date: Mon, 26 Mar 2001 22:32:30 +1000
X-Mailer: KMail [version 1.1.99]
Content-Type: text/plain;
charset="iso-8859-1"
MIME-Version: 1.0
Message-Id: <01032622323002.06742@scottsP3>
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] Simulating with AVR-Studio
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

We are porting a medium size assembler firmware application to the=20
avr-gcc environment. The code was written originally for the Atmel=20
assembler. I have managed to port the code to the avr-as assembler=20
and get it to work.

Our problem is that I can't source level simulate with AVR-Studio.=20
When I open the obj file, all I see is the gcrt1.S file. Once I step=20
off the end at the 'jmp main' instruction, the simulator goes away.=20
The only time it returns is when timer 0 interrupt triggers and it=20
moves the cursor to the interrupt vector.

I have tried various combinations of paths in the assembler source=20
files - both the includes and in the makefile. Nothing seems to help.=20
Before I started binding C code into the application it would not=20
even let me load the OBJ file ("Some source files are missing - Error=20
in Nordic object file"). Now, I have a C source file in the=20
application I can at least load the OBJ file, however, the only file=20
that it can "see" is the gcrt1.S file. I can debug the entire program=20
if I change the view to disassembly mode, however this makes it a=20
little difficult to debug.

Cheers

Scott

--=20

-----------------------------------------------
Scott Pitcher=09=[email-masked]
Product Engineer=09+61-418-368-051
LETECH=09=09=09Melbourne, Australia
-----------------------------------------------

From [email-masked] Tue Mar 27 00:47:21 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14hWP2-000096-00
for <[email-masked]>; Tue, 27 Mar 2001 00:47:20 +1200
Received: from oTRIs.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id OAA00455
for <[email-masked]>; Mon, 26 Mar 2001 14:50:03 +0200
Message-ID: <[email-masked]>
Date: Mon, 26 Mar 2001 14:54:24 +0200
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
References: <01032622323002.06742@scottsP3>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Re: Simulating with AVR-Studio
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Scott?

Scott Pitcher schrieb:

> Now, I have a C source file in the
> application I can at least load the OBJ file, however, the only file
> that it can "see" is the gcrt1.S file.

It seems the debug info could be loaded and is working, otherwise you
would not have seen the gcrt1.S file.

Perhaps you omitted the -g flag for gcc so that no debug info is
included in the module?

Regards

Gunnar

(http://combio.de/avr)

From [email-masked] Tue Mar 27 01:13:54 2001
Received: from mtiwmhc28.worldnet.att.net ([204.127.131.36])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14hWok-0000Ad-00
for <[email-masked]>; Tue, 27 Mar 2001 01:13:54 +1200
Received: from jimanji ([12.93.208.34]) by mtiwmhc28.worldnet.att.net
(InterMail vM.4.01.03.16 201-229-121-116-20010115) with SMTP
id <20010326131615.HDPH6477.mtiwmhc28.worldnet.att.net@jimanji>
for <[email-masked]>; Mon, 26 Mar 2001 13:16:15 +0000
Message-ID: <[email-masked]>
Reply-To: "Jim Pearce" <[email-masked]>
From: "Jim Pearce" <[email-masked]>
To: <[email-masked]>
References: <01032622323002.06742@scottsP3>
Subject: Re: [avr-gcc-list] Simulating with AVR-Studio
Date: Mon, 26 Mar 2001 08:16:19 -0500
Organization: Pegasus Technologies
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I sent a comment on this problem to the AvrX mail list. I just checked and it hasn't made it to the archive yet so I'll repeat it
here:

I mentioned in the avr-gcc list some time ago a problem that AVR studio sometimes does not show the disassembly that corresponds to
the current IP. This is almost always the case with the main() when using AvrX.

This kept bothering me so I dove into it to find out why. I now know what causes the problem and it appears to be a bug in AVR
Studio though there is a workaround.

Background:

The .obj file contains 9 byte records for every program memory word:

aa aa aa op op ff LL LL MM

aa = 24 bits of address
op = 16 bits of op code
ff = Source file number (there is a list of files at the end of the obj file)
LL = 16 bits of line number within that source file
MM = flag to indicate op code is a macro

The problem occurs when there is an op code in the AVR .obj file that is flagged as a macro and points to a different source file
from the one that holds the source for the module.

An example from main():
00 00 87 CF D8 00 00 3E 00 --> 0087 rjmp .L19 Source file 0, Line 3e, not a macro
00 00 88 C4 96 05 00 F3 01 --> 0088 rjmp _Epilog Source file 5, line F3, Is a macro
00 00 89 E0 80 00 00 5F 00 --> 0089 ldi r24,lo8(0) Source file 0, line 5f, not a macro

The presence of the macro line kills Studio's brains!

I fixed the problem by creating a #define instead of an inline for Epilog(); This seems to work!

Jim

To sum up: Don't use macros! AVR Studio dosen't like them.

If this is not your problem maybe you can use this a starting point for looking at a hex dump of your .obj file.

From [email-masked] Tue Mar 27 03:11:40 2001
Received: from blegroup.demon.co.uk
([158.152.198.111] helo=localhost.localdomain ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14hYeg-0000Fr-00
for <[email-masked]>; Tue, 27 Mar 2001 03:11:39 +1200
Received: (from root@localhost)
by localhost.localdomain (8.9.3/8.9.3) id RAA15647
for [email-masked]; Mon, 26 Mar 2001 17:21:41 +0100
Received: from lee.blegroup.demon.co.uk (lee.blegroup.demon.co.uk [192.168.1.2])
by localhost.localdomain (8.9.3/8.9.3) with SMTP id RAA15559
for <[email-masked]>; Mon, 26 Mar 2001 17:21:31 +0100
Message-ID: <[email-masked]>
From: "Lee Mitchell" <[email-masked]>
To: "AVR GCC Mailing List" <[email-masked]>
Date: Mon, 26 Mar 2001 16:19:04 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-scanner: scanned by Inflex 0.1.5 - (http://www.inflex.co.za/)
Subject: [avr-gcc-list] Bug found in __mulhi3 - was Is this possibly a bug in avr-gcc ?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I believe i have found a bug in code generated by avr-gcc.

The error is in a function called __mulhi3.

The bug occurs when the function is called with the paramaters :-

register R22 = 0x18
register R23 = 0x00
register R24 = 0x01
register R25 = 0x02

ie, the function is performing 0x201 * 0x18

The returned value is 0x18 instead of 0x3018 and is therefore incorrect.

The code generated for the function __mulhi3 is as follows :-

+00000F0F: 2755 CLR R21
+00000F10: 2744 CLR R20
+00000F11: FF80 SBRS R24,0
+00000F12: C002 RJMP +0x0002 ; Destination: 0x000F15
+00000F13: 0F46 ADD R20,R22
+00000F14: 1F57 ADC R21,R23
+00000F15: 0F66 ADD R22,R22
+00000F16: 1F77 ADC R23,R23
+00000F17: 0561 CPC R22,R1
+00000F18: F021 BREQ +0x04 ; Destination: 0x000F1D
+00000F19: 9596 LSR R25
+00000F1A: 9587 ROR R24
+00000F1B: 0591 CPC R25,R1
+00000F1C: F7A1 BRNE -0x0C ; Destination: 0x000F11
+00000F1D: 2F95 MOV R25,R21
+00000F1E: 2F84 MOV R24,R20
+00000F1F: 9508 RET

I have no idea where the source to this function is located, but i'm sure
some of you do !

Again, I am using the following build of avr-gcc :-

C:\WINDOWS>avr-gcc -v
Reading specs from C:\AVRGCC\BIN\..\lib\gcc-lib\avr\2.97\specs
Configured with:
./configure --prefix=/avrgcc --exec-prefix=/avrgcc --with-ggc=simple --enabl
e-languages=c --with
included-gettext --with-gc=simple --target=avr --host=i386-mingw32 --build=i
386-cygwin
gcc version 2.97 20010108 (experimental)

Is this known ?
Any more information that you good folks would like ?

Regards

Lee Mitchell

From [email-masked] Tue Mar 27 05:47:13 2001
Received: from ces1.ces.uoguelph.ca ([131.104.236.204] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14hb5D-0000MH-00
for <[email-masked]>; Tue, 27 Mar 2001 05:47:12 +1200
Received: from localhost (jlawson@localhost)
by CES1.ces.uoguelph.ca (8.10.2/8.10.2) with ESMTP id f2QHfZO27397
for <[email-masked]>; Mon, 26 Mar 2001 12:41:35 -0500
Date: Mon, 26 Mar 2001 12:41:35 -0500 (EST)
From: Jamie Lawson <[email-masked]>
To: <[email-masked]>
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] invalid bfd target
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi..

I'm attempting to use the Linux version (2001.2.28) of avrgcc. When
using the Makefile supplied with the gcctest files it gets as far as;

"invalid bfd target"

I can run the compile and assemble steps ok, but when trying to link
it keeps telling me it doesn't know what an atmega103. It does know
what an avrmega103 is, but it doesn't work either, or, more likely, I am
unsure where/how to set this.

Could someone explain this?

Thanks.

Jamie Lawson
Controlled Environment Systems Research Group
University of Guelph
Guelph, Ontario, Canada

From [email-masked] Tue Mar 27 12:20:34 2001
Received: from email.netonecom.net ([209.172.26.13] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14hhDt-0000gM-00
for <[email-masked]>; Tue, 27 Mar 2001 12:20:33 +1200
Received: from netonecom.net (catudal.netonecom.net [216.65.187.222])
by email.netonecom.net (8.11.2/8.11.0) with ESMTP id f2R0NLN28676;
Mon, 26 Mar 2001 19:23:21 -0500 (EST)
Message-ID: <[email-masked]>
Date: Mon, 26 Mar 2001 19:23:17 -0500
From: Michel Catudal <[email-masked]>
Organization: Pas =?iso-8859-1?Q?organis=E9?= par Ti-Mou
X-Mailer: Mozilla 4.76 [Joual] (X11; U; Linux 2.4.2 i586)
X-Accept-Language: fr-CA, en-US
MIME-Version: 1.0
To: Jamie Lawson <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] invalid bfd target
References: <[email-masked]>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by email.netonecom.net id f2R0NLN28676
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Jamie Lawson a =E9crit :
>=20
> Hi..
>=20
> I'm attempting to use the Linux version (2001.2.28) of avrgcc. When
> using the Makefile supplied with the gcctest files it gets as far as;
>=20
> "invalid bfd target"
>=20
> I can run the compile and assemble steps ok, but when trying to link
> it keeps telling me it doesn't know what an atmega103. It does know
> what an avrmega103 is, but it doesn't work either, or, more likely, I a=
m
> unsure where/how to set this.
>=20
> Could someone explain this?
>=20
> Thanks.
>=20
> Jamie Lawson
> Controlled Environment Systems Research Group
> University of Guelph
> Guelph, Ontario, Canada
>=20

I have compiled with success the files of sometimes last week. I had
to combine the binutils and gcc to get it to compile. I would have
put it on my website on the weekend but I was not able to upload
it to my nbci website. The source is close to 20M and the binaries
around 9M. It includes useless crap like java which is not even used
with the AVR. I will trim it when I get sometime.

The reason I was not able to upload it is that nbci seems to be down. My
ISP doesn't like when I put too much stuff on his hard disk and
nbci gives me lotsa free space, when it works that is. There are very
few sites that give you a lot of space. Usually it's 10 to 16M.

If you copy over the source of gcc on the source of binutils it should co=
mpile.
Get the latest snapshots though.

I should have my RPM and SRPM on the web as soon as I get a site that wor=
ks or
nbci gets back to life. My nbci site seems to be back up but I can't ftp
to it yet.

--=20
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://www.netonecom.net/~bbcat
We have all kinds of links
and many SuSE 7.0 Linux RPM packages

From [email-masked] Tue Mar 27 19:26:51 2001
Received: from f56.law11.hotmail.com ([64.4.17.56] helo=hotmail.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14hnsR-0000yD-00
for <[email-masked]>; Tue, 27 Mar 2001 19:26:51 +1200
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
Mon, 26 Mar 2001 23:29:16 -0800
Received: from 212.42.223.136 by lw11fd.law11.hotmail.msn.com with HTTP; Tue, 27 Mar 2001 07:29:16 GMT
X-Originating-IP: [212.42.223.136]
From: "Sergey Abovyan" <[email-masked]>
To: [email-masked]
Date: Tue, 27 Mar 2001 07:29:16 -0000
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
Message-ID: <[email-masked]>
X-OriginalArrivalTime: 27 Mar 2001 07:29:16.0515 (UTC) FILETIME=[A1104330:01C0B68F]
Subject: [avr-gcc-list] Does anyone have the daylight saving time chamges codes for AVR?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

If You have the daylight saving time changes codes for any Atmel
processor Please send them to me

Thanks

Sergey
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

From [email-masked] Tue Mar 27 20:20:21 2001
Received: from f145.law11.hotmail.com ([64.4.17.145] helo=hotmail.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14hoiD-00010q-00
for <[email-masked]>; Tue, 27 Mar 2001 20:20:21 +1200
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
Tue, 27 Mar 2001 00:22:46 -0800
Received: from 212.42.223.136 by lw11fd.law11.hotmail.msn.com with HTTP; Tue, 27 Mar 2001 08:22:46 GMT
X-Originating-IP: [212.42.223.136]
From: "Sergey Abovyan" <[email-masked]>
To: [email-masked]
Date: Tue, 27 Mar 2001 08:22:46 -0000
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
Message-ID: <[email-masked]>
X-OriginalArrivalTime: 27 Mar 2001 08:22:46.0875 (UTC) FILETIME=[1A9652B0:01C0B697]
Subject: [avr-gcc-list] Anyone have daylight saving time changes algorithm?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

If You have daylight saving time changes algorithm
Please send it to me

Thanks

Sergey

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

From [email-masked] Tue Mar 27 21:11:31 2001
Received: from odin.he.net ([216.218.181.2])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14hpVh-00013D-00
for <[email-masked]>; Tue, 27 Mar 2001 21:11:29 +1200
Received: from jpk1 (adsl-200.world-net.co.nz [210.55.228.200]) by odin.he.net (8.8.6/8.8.2) with SMTP id BAA22923 for <[email-masked]>; Tue, 27 Mar 2001 01:14:23 -0800
Date: Tue, 27 Mar 2001 01:14:23 -0800
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: Windows Eudora Light Version 1.5.2
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] Anyone have daylight saving time changes
algorithm?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

<Humour>
INC(hour) //At start of daylight savings
DEC(hour) //At end of daylight savings
</Humour>

You will probably find what you're looking for in Linux source code, can't
think of anywhere else where it would be available as code. NB this ain't
related to avr-gcc which is what this list if for, please post such
questions to appropriate mailing lists.

Jason Kyle

At 08:22 27/03/01 -0000, you wrote:
>If You have daylight saving time changes algorithm
>Please send it to me
>
>Thanks
>
>Sergey
>

From [email-masked] Tue Mar 27 21:28:44 2001
Received: from gateway.utbm.fr ([193.48.246.2] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14hpmN-00015o-00
for <[email-masked]>; Tue, 27 Mar 2001 21:28:44 +1200
Received: from sunserv.utbm.fr (sunserv.utbm.fr [192.168.1.16])
by gateway.utbm.fr (8.9.3/jtpda-5.3.2) with ESMTP id LAA02375
; Tue, 27 Mar 2001 11:31:19 +0200
Received: from sun1.GIutbm (sun1 [10.90.0.2])
by sunserv.utbm.fr (8.9.3+Sun/8.9.3) with SMTP id LAA00446;
Tue, 27 Mar 2001 11:31:14 +0200 (MEST)
Received: by sun1.GIutbm (SMI-8.6/SMI-SVR4)
id LAA02104; Tue, 27 Mar 2001 11:32:55 +0200
Date: Tue, 27 Mar 2001 11:32:54 +0200
From: Ludovic COURTES <[email-masked]>
To: [email-masked]
Cc: [email-masked], [email-masked]
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by gateway.utbm.fr id LAA02375
Subject: [avr-gcc-list] Troubles uploading to a Mega103
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I recently probed new home-made PCBs featuring a ATMega103 and I am havin=
g
troubles uploading to it. I use Uisp latest tarball (uisp-20010211.tar.gz=
)
with Dapa protocol.

Here is the problem : we managed to perform only one successful upload (t=
he
first one) and now the MCU behaves just as if it was locked (lock bits se=
t
to 0). But when we try to erase it (uisp -dapa --erase), it still remains
locked (i.e. the MCU just send back the bytes sent by uisp - for instance=
,
when uisp sends the command to get its signature bytes, it just responds =
by
sending 00, 01 and 02 instead of its signature).

So i compiled uisp with the -DDEBUG flag just to see what was going on an=
d
here is what i got :

[leo ~/tmp/uisp-20010211/src]$ uisp -dapa --verify if=3D~/unitec/code_avr=
/board_test/tiny_prg.srec -dt_wd_flash=3D80000
send(recv): AC(FF) 53(FF) 00(53) 00(00)=20
send(recv): 30(00) 00(30) 00(00) 00(FF)=20
send(recv): 30(00) 00(30) 01(00) 00(FF)=20
send(recv): 30(00) 00(30) 02(00) 00(FF)=20
An error has occurred durring the AVR initilization.
* Target status:
Vendor Code =3D 0xff, Part Family =3D 0xff, Part Number =3D 0xff
=20
Probably the wiring is incorrect or target might be `damaged'.
[leo ~/tmp/uisp-20010211/src]$ uisp -dapa --verify if=3D~/unitec/code_avr=
/board_test/tiny_prg.srec -dt_wd_flash=3D80000
send(recv): AC(01) 53(AC) 00(53) 00(00)=20
send(recv): 30(00) 00(30) 00(00) 00(00)=20
send(recv): 30(00) 00(30) 01(00) 00(01)=20
send(recv): 30(00) 00(30) 02(00) 00(02)=20
Cannot identify device because is it locked.
Verifying: flash
Segmentation fault

As you can see, the 'Enable Programming' command (0xAC530000) works fine,
but then, the signature bytes are wrong. Moreover, the strange thing is t=
hat
it first time (after power-up) it returns 0xFFFFFF as its signature bytes
and then, if we don't switch it off, it always returns 0x000102...
BTW, note that uisp continues even if device is locked and then crashes..=
. ;)

Well, if someone has already had this kind of problem, i would be glad
to know more about it !

Thanks,
Ludovic.

--
Ludovic Court=E8s
Universit=E9 de Technologie de Belfort-Montb=E9liard
Unitec (Club de Robotique de l'UTBM)

From [email-masked] Wed Mar 28 02:16:20 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14huGi-0001Hd-00
for <[email-masked]>; Wed, 28 Mar 2001 02:16:20 +1200
Received: (qmail 5092 invoked from network); 27 Mar 2001 14:21:30 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 27 Mar 2001 14:21:30 -0000
Received: from fri.uni-lj.si ([193.2.76.118]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with ESMTP id AAA11991
for <[email-masked]>; Tue, 27 Mar 2001 16:10:36 +0200
Message-ID: <[email-masked]>
Date: Tue, 27 Mar 2001 16:20:26 +0200
From: [email-masked] (Robert Rozman)
X-Mailer: Mozilla 4.51 [sl] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: "[email-masked]" <[email-masked]>
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Global variables and space efficient programming again
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

a little while ago I posted message concerning usage of main variables
in avr-gcc programs and code space efficient programming.

I have a program that uses quite some global variables (30-40). I
discovered that every access to this variable takes assembly
instructions (sts, std if I remember right) that results in quite
inefficient use of code space.

Then I forced variables into struct and define global pointer to this
struct and declare it as a r28,r29 register variable (this registers
were obviously reserved from other usage). I saved a lot of code space
(600 bytes in 8000 bytes) but it still seems that leaving this choice to
compiler would be better than forcing him to stay away from those
registers. If I do this, then avr-gcc is filling those registers at each
access, so all profit is lost .

Denis replied that obviously optimizer in avr-gcc is in some way broken.

I'd still like some advices from those, that have somehow solved this
problem, and maybe what are chances to fix this problem in avr-gcc.

Thanks in advance,

Robert Rozman

From [email-masked] Wed Mar 28 08:01:11 2001
Received: from citycenter.citilink.com ([209.98.8.5])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14hzeQ-0001Zq-00
for <[email-masked]>; Wed, 28 Mar 2001 08:01:11 +1200
Received: (from dlarson@localhost) by citycenter.citilink.com (8.8.8/8.7.5) id NAA07916; Tue, 27 Mar 2001 13:56:25 -0600 (CST)
Posted-Date: Tue, 27 Mar 2001 13:56:25 -0600 (CST)
Message-Id: <[email-masked]>
From: "Dan Larson" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Tue, 27 Mar 2001 14:02:29 -0600
Reply-To: "Dan Larson" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 98 Standard (2.00.1500) For Windows NT (4.0.1381;5)
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Freaky code wraparound...
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello all,

I am working on some LCD code for the ATMega103 on the STK-300 board
and I am having a very strange problem that is proving to be extremely
difficult to debug without an ICE.

What appears to be happening is that the device is continually executing
up until a certain point and then ending up back at the reset entry point.

I have verified that I am correctly turning off the watch dog in my _init_()
routine and there are no interrupts being generated. Also, in my _init_()
code I dump the high or low byte of the stack pointer to the LEDs depending
on which push button is pressed. Through the same mechanism I can also dump
MUCSR to determine the cause of the reset.

So far I have been able to determine the following:

1) It is *not* an external (BOR), or a power-up reset.

2) It is *not* the watchdog reset. I have the watch dog disabled and I also
inserted a spin-loop (infinite loop) at the beginning of main() to see
if the watchdog would trip. It doesn't.

3) The stack pointer appeared to be in an underflow condition when I dumped
it to the LEDs. The preamble code of main sets the stack at 0x0FF7 and the
value displayed on the LEDs was 0xFF8.

So far all of the clues point to stack corruption. This is most likely a bug
in the compiler output because I never manipulate the stack directly and I am
not overflowing any arrays or local variables. I highly suspect that the _init_()
routine is reached by the program counter "wrapping around" to zero, since the
previous two bytes pulled from the stack (SP & SP+1) are not zero, indicating that
address 0x0000 was not popped off the stack while returning from some function.

Now for the "Freaky" part. The problem has never occurred in the AVR Studio simulator.
I can spot no errors in the assembly output of the compiler that would corrupt the
stack. The code under the simulator never reaches 0x0000 after reset nor do stack
contents get written to out of context. I had originally been using the memory mapped
LCD interface on the STK-300 board, but I switched to using PORT I/O instead, suspecting
that there may have been some timing issues screwing up the CPU. I am now using 4-bit
mode on PORTA (yes, the external memory is turned off). I have scoped and verified
the timing on the LCD to be correct. I can even get it to display a few characters
some times, depending on how I arrange the code, but it always eventually goes wild
and ends up at the reset vector again before the main() code can finish.

I even borrowed my friends STK-300 kit and got the same results, thus ruling out
a bad CPU.

Does anyone know of any compiler bugs or have any tips the help me track this
problem down? I am using the win32 2.97 version of the compiler , downloaded from
AVR-FEAKS.

If I had access to an ICE, I am sure I would have found the problem by now, but I am
at my wits end with this.

Thanks!

Dan

From [email-masked] Wed Mar 28 09:50:53 2001
Received: from elektron.ikp.physik.tu-darmstadt.de ([130.83.24.72])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14i1Ma-0001eC-00
for <[email-masked]>; Wed, 28 Mar 2001 09:50:52 +1200
Received: (from bon@localhost)
by elektron.ikp.physik.tu-darmstadt.de (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) id f2RLrJ417945;
Tue, 27 Mar 2001 23:53:19 +0200
From: Uwe Bonnes <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <[email-masked]>
Date: Tue, 27 Mar 2001 23:53:18 +0200
To: Ludovic COURTES <[email-masked]>
Cc: [email-masked], [email-masked], [email-masked]
Subject: [avr-gcc-list] Troubles uploading to a Mega103
In-Reply-To: <[email-masked]>
References: <[email-masked]>
X-Mailer: VM 6.92 under Emacs 20.7.1
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Ludovic COURTES writes:
...
> As you can see, the 'Enable Programming' command (0xAC530000) works
> fine, but then, the signature bytes are wrong. Moreover, the
> strange thing is that it first time (after power-up) it returns
> 0xFFFFFF as its signature bytes and then, if we don't switch it
> off, it always returns 0x000102... BTW, note that uisp continues
> even if device is locked and then crashes... ;)
>
> Well, if someone has already had this kind of problem, i would be glad
> to know more about it !
>
Two ideas:

- your have some gate in some of the ISP lines, causing an inversion
- some more parts are conneted to the ISP lines and are not inactive
during reset causing some contentions

Bye

--
Uwe Bonnes [email-masked]

From [email-masked] Wed Mar 28 07:07:19 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14hyoH-0001Wi-00
for <[email-masked]>; Wed, 28 Mar 2001 07:07:18 +1200
Received: from mm.amelek.gda.pl ([192.168.1.1] ident=mail)
by alf.amelek.gda.pl with esmtp (Exim 3.16 #1 (Debian))
id 14hymO-0005VI-00; Tue, 27 Mar 2001 21:05:20 +0200
Received: from marekm by mm.amelek.gda.pl with local (Exim 3.22 #1 (Debian))
id 14hymK-0003Dr-00; Tue, 27 Mar 2001 21:05:16 +0200
Subject: Re: [avr-gcc-list] Bug found in __mulhi3 - was Is this possibly a bug
in avr-gcc ?
In-Reply-To: <[email-masked]> from Lee Mitchell
at "Mar 26, 2001 04:19:04 pm"
To: Lee Mitchell <[email-masked]>
Date: Tue, 27 Mar 2001 21:05:16 +0200 (CEST)
CC: AVR GCC Mailing List <[email-masked]>
X-Mailer: ELM [version 2.4ME+ PL66 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Message-Id: <[email-masked]>
From: Marek Michalkiewicz <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> The bug occurs when the function is called with the paramaters :-
>
> register R22 = 0x18
> register R23 = 0x00
> register R24 = 0x01
> register R25 = 0x02
>
> ie, the function is performing 0x201 * 0x18
>
> The returned value is 0x18 instead of 0x3018 and is therefore incorrect.

Congratulations - you found a real bug, I can reproduce this too.
I suspect one of the tests to exit the loop when arg1 or arg2 reaches
zero is wrong. But I don't yet see what is wrong... and that part of
the code has not changed for a very long time (except r20 -> r0), was
the same in 2.95.2 too.

> I have no idea where the source to this function is located, but i'm sure
> some of you do !

gcc/config/avr/libgcc.S

The chip I have is AT90S8535-8PI-0011. Not sure, could also be some
undocumented feature in setting flags? 513 * 1 = 1 is wrong too...

Marek

From [email-masked] Wed Mar 28 07:20:42 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14hz19-0001Xm-00
for <[email-masked]>; Wed, 28 Mar 2001 07:20:35 +1200
Received: from mm.amelek.gda.pl ([192.168.1.1] ident=mail)
by alf.amelek.gda.pl with esmtp (Exim 3.16 #1 (Debian))
id 14hz32-0005Wn-00; Tue, 27 Mar 2001 21:22:32 +0200
Received: from marekm by mm.amelek.gda.pl with local (Exim 3.22 #1 (Debian))
id 14hz2y-0004uw-00; Tue, 27 Mar 2001 21:22:28 +0200
Subject: Re: [avr-gcc-list] Bug found in __mulhi3 - was Is this possibly a bug
in avr-gcc ?
In-Reply-To: <[email-masked]> from Lee Mitchell
at "Mar 26, 2001 04:19:04 pm"
To: Lee Mitchell <[email-masked]>
Date: Tue, 27 Mar 2001 21:22:28 +0200 (CEST)
CC: AVR GCC Mailing List <[email-masked]>, [email-masked]
X-Mailer: ELM [version 2.4ME+ PL66 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Message-Id: <[email-masked]>
From: Marek Michalkiewicz <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> ie, the function is performing 0x201 * 0x18
>
> The returned value is 0x18 instead of 0x3018 and is therefore incorrect.

The patch below fixes it for me, but I don't know why ;).
"ror" was supposed to set the Z flag correctly... Denis?

Marek

--- libgcc.S.orig Sun Jan 21 14:07:52 2001
+++ libgcc.S Tue Mar 27 21:16:27 2001
@@ -142,6 +142,7 @@

lsr r_arg1H ; gets LSB of multiplier
ror r_arg1L
+ cp r_arg1L,__zero_reg__
cpc r_arg1H,__zero_reg__
brne __mulhi3_loop ; exit if multiplier = 0
__mulhi3_exit:

From [email-masked] Wed Mar 28 12:18:13 2001
Received: from clobntmail01.characterlink.net ([207.27.152.48])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14i3fA-0001lP-00
for <[email-masked]>; Wed, 28 Mar 2001 12:18:13 +1200
Received: from musunco ([207.32.36.197]) by clobntmail01.characterlink.net
(Post.Office MTA v3.1.2 release (PO205-101c)
ID# 0-38059U5000L500S0) with SMTP id AAA235
for <[email-masked]>; Tue, 27 Mar 2001 18:08:53 -0600
From: "Marlin Unruh" <[email-masked]>
To: <[email-masked]>
Date: Tue, 27 Mar 2001 17:22:32 -0700
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Subject: [avr-gcc-list] struct vs. global
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I was experiencing a problem with my program. I was using global registers
and the program was hitting the rhubarb. For testing purposes I had an LED
that is flashing at 1Hz. The time delay is interrupt driven. I noted that
the LED would stay on longer than normal, or would flash very fast. Very
erratic behavior. The code would hang, but no always consistent. I am not
using an emulator, so I really don't know what was happening, other than
'global registers crossing boundaries'. I then changed the variables
involved in the time delay, and timer flags, from 'global' to 'struct' now
the code is running perfect. Why is it that structures are preferred over
global variables? From what I saw it is unstable to use global's. Right?
Wrong? Why?

Marlin

From [email-masked] Wed Mar 28 19:12:09 2001
Received: from exchange.prism.co.za ([196.34.63.66])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14iA7k-00021v-00
for <[email-masked]>; Wed, 28 Mar 2001 19:12:09 +1200
Received: from HEINIE ([10.5.3.18]) by exchange.prism.co.za with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13)
id H3J33GMS; Wed, 28 Mar 2001 09:19:45 +0200
Reply-To: <[email-masked]>
From: "Heinrich Vermeulen" <[email-masked]>
To: <[email-masked]>
Date: Wed, 28 Mar 2001 09:09:25 +0200
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0)
Importance: Normal
In-Reply-To: <[email-masked]>
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Subject: [avr-gcc-list] RE: Troubles uploading to a Mega103
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Greetings Ludovic

You wrote -
"I use Uisp latest tarball (uisp-20010211.tar.gz= )with Dapa protocol.
Here is the problem : we managed to perform only one successful upload (t=
he first one) and now the MCU behaves just as if it was locked (lock bits
se=
t to 0). But when we try to erase it (uisp -dapa --erase), it still remains
locked (i.e. the MCU just send back the bytes sent by uisp - for instance=
,when uisp sends the command to get its signature bytes, it just responds =
by sending 00, 01 and 02 instead of its signature).
So i compiled uisp with the -DDEBUG flag just to see what was going on an=
d here is what i got :
send(recv): AC(FF) 53(FF) 00(53) 00(00)=20
send(recv): 30(00) 00(30) 00(00) 00(FF)=20
send(recv): 30(00) 00(30) 01(00) 00(FF)=20
send(recv): 30(00) 00(30) 02(00) 00(FF)=20
An error has occurred durring the AVR initilization.
* Target status:
Vendor Code =3D 0xff, Part Family =3D 0xff, Part Number =3D 0xff
"

We had the same problem with both the signature bytes being 1)FF FF FF and
being 2)00 01 02:
1)The ATMega103 loses its signature bytes for some reason after a few
erase/program cycles. The workaround is to change the UISP code. I made a
couple of changes already to the software already to accomodate these
defects (also to read/write fuse bits, correcting srec format downloads,
etc.). I can give you or anyone else this code if you so wish.

2)Are you holding in the reset line using an external reset while you are
talking to the ATMega103? If the external reset is kept LOW the signature
bytes will be FF FF FF when a
"uisp -dapa" command is performed but after that the signature bytes will be
00 01 02 when a
"uisp -dapa" command is performed. Make sure the reset line is not
externally made LOW when the UISP talks to it.

Heinrich Vermeulen
Prism Secure Solutions
[email-masked]
+27 12 663 8501

From [email-masked] Wed Mar 28 23:26:54 2001
Received: from ha1.rdc2.nsw.optushome.com.au ([203.164.2.50] helo=mss.rdc2.nsw.optushome.com.au)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14iE6H-0002Df-00
for <[email-masked]>; Wed, 28 Mar 2001 23:26:54 +1200
Received: from scottsP3 ([203.164.125.96]) by mss.rdc2.nsw.optushome.com.au
(InterMail vM.4.01.03.20 201-229-121-120-20010223) with SMTP
id <20010328112949.LZFR17266.mss.rdc2.nsw.optushome.com.au@scottsP3>
for <[email-masked]>; Wed, 28 Mar 2001 21:29:49 +1000
From: Scott Pitcher <[email-masked]>
Reply-To: [email-masked]
Organization: LETECH
To: [email-masked]
Subject: Re: [avr-gcc-list] Freaky code wraparound...
Date: Wed, 28 Mar 2001 21:36:18 +1000
X-Mailer: KMail [version 1.1.99]
Content-Type: text/plain;
charset="us-ascii"
MIME-Version: 1.0
Message-Id: <01032821361807.06742@scottsP3>
Content-Transfer-Encoding: quoted-printable
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I had a contractor who found a reset bug in one of our Mega103
applications. Apparently, if the Z register is incremented and rolls
over to zero, under some conditions a reset can result. His fix was
to manually increment each half of the register. I don't know if this
behaviour is documented.

Cheers

Scott

On Wednesday 28 March 2001 06:02, you wrote:
> extremely difficult to debug without an ICE.
>
> What appears to be happening is that the device is continually
> executing up until a certain point and then ending up back at the
> reset entry point.

-----------------------------------------------
Scott Pitcher=09=[email-masked]
Product Engineer=09+61-418-368-051
LETECH=09=09=09Melbourne, Australia
-----------------------------------------------

From [email-masked] Thu Mar 29 00:04:05 2001
Received: from mgate2.uni-hannover.de ([130.75.2.5] ident=zzismail)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14iEgG-0002FO-00
for <[email-masked]>; Thu, 29 Mar 2001 00:04:05 +1200
Received: from hgmlsun1.geml.uni-hannover.de by mgate2.uni-hannover.de
with LocalSMTP (PP) with ESMTP; Wed, 28 Mar 2001 14:06:12 +0200
Received: from geml.uni-hannover.de (hgmlat31 [130.75.43.51])
by hgmlsun1.geml.uni-hannover.de (8.9.3/8.9.3) with ESMTP
id OAA00066 for <[email-masked]>;
Wed, 28 Mar 2001 14:16:47 +0200 (MET DST)
Message-ID: <[email-masked]>
Date: Wed, 28 Mar 2001 13:12:49 +0200
From: Richter_Matthias <[email-masked]>
Organization: Uni Hannover
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i586)
X-Accept-Language: de, en
MIME-Version: 1.0
To: [email-masked]
Subject: [avr-gcc-list] itoa(): _udivhi3 undefined
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I wanted to use the function itoa() in my program. When I tried to
compile this program, I got this error message:

mr@asterix:> /opt/avrgcc/bin/avr-gcc -mmcu=at90s8515 -o lok2_1.out
lok2_1.c
lok2_1.c: In function `main':
lok2_1.c:56: warning: return type of `main' is not `int'
/opt/avrgcc/bin/../lib/gcc-lib/avr/2.97/../../../../avr/lib/libc.a(itoa.o):
In
function `itoa':
./misc/itoa.S:45: undefined reference to `_udivhi3'

I couldn't find the definition of '_udivhi3'. Where is it (should it
be?) defined?

(used version of gcc/binutils/libc: Gunnar's binary distribution
(20010228), Linux)

Matthias

From [email-masked] Thu Mar 29 02:51:30 2001
Received: from cicero0.cybercity.dk ([212.242.40.52])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14iHIH-0002MH-00
for <[email-masked]>; Thu, 29 Mar 2001 02:51:30 +1200
Received: from usr03.cybercity.dk (usr03.cybercity.dk [212.242.40.83])
by cicero0.cybercity.dk (Postfix) with ESMTP id 881CD10296F
for <[email-masked]>; Wed, 28 Mar 2001 16:54:29 +0200 (CEST)
Received: from noa3 (port143.cvx1-sl.ppp.cybercity.dk [212.242.177.144])
by usr03.cybercity.dk (8.11.2/8.11.0) with SMTP id f2SEsSU38886
for <[email-masked]>; Wed, 28 Mar 2001 16:54:28 +0200 (CEST)
(envelope-from [email-masked])
Message-ID: <002601c0b797$058f8390$90b1f2d4@noa3>
From: "Kasper Pedersen" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] RE: Troubles uploading to a Mega103
Date: Wed, 28 Mar 2001 16:54:38 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

----- Original Message -----
From: "Heinrich Vermeulen" <[email-masked]>
To: <[email-masked]>
Sent: Wednesday, March 28, 2001 9:09 AM
Subject: [avr-gcc-list] RE: Troubles uploading to a Mega103

> We had the same problem with both the signature bytes being 1)FF FF FF and
> being 2)00 01 02:
> 1)The ATMega103 loses its signature bytes for some reason after a few
> erase/program cycles. The workaround is to change the UISP code. I made
a
> couple of changes already to the software already to accomodate these
> defects (also to read/write fuse bits, correcting srec format downloads,
> etc.). I can give you or anyone else this code if you so wish.

I am very much interrested; Could you explain what not to do, what to do
instead, and your guess why? I have a similar programming utility, and I'd
like it _not_ to kill off my as-yet-unused 5 samples.

I noticed that there are 16 signature bytes in the 8535. I wonder what all
the remaining ones are - just unused decodes (I doubt it, why then use 4
bits and not 2) or something useful? I think I'll try searching the entire
'8535 ISP command space when I get the time.

/Kasper

From [email-masked] Thu Mar 29 05:09:20 2001
Received: from citycenter.citilink.com ([209.98.8.5])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14iJRf-0002Ss-00
for <[email-masked]>; Thu, 29 Mar 2001 05:09:19 +1200
Received: (from dlarson@localhost) by citycenter.citilink.com (8.8.8/8.7.5) id LAA11635; Wed, 28 Mar 2001 11:04:35 -0600 (CST)
Posted-Date: Wed, 28 Mar 2001 11:04:35 -0600 (CST)
Message-Id: <[email-masked]>
From: "Dan Larson" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Wed, 28 Mar 2001 11:10:32 -0600
Reply-To: "Dan Larson" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 98 Standard (2.00.1500) For Windows NT (4.0.1381;5)
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: Re: [avr-gcc-list] Freaky code wraparound... (UPDATE)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I am now convinced that there is either a bug in the avr-gcc compiler
or a problem with the Atmega103 / STK-300 board.

I changed the MCU target to at90s8515, recompiled, and downloaded the
code to an 8515 on my STK-500 board. The very same code worked flawlessly
with no unwanted code wraparound or spurious resets. I stripped all debug
code from my _init_() routine, but left the code to disable the watchdog
timer. I added a very long loop, in which the counter was displayed on the
LCD. It ran perfectly.

When I changed the target back to the atmega103 and downloaded the code
to the stk300 board, once again it failed by repeatedly wrapping to the
reset vector after displaying only one character on the first line.

The "freaky" and annoying part of this whole problem is that I can never
get the code to misbehave under the AVR Studio simulator. This convinces
me that there is something about the code generated by the compiler and / or
the atmega103 / stk300 that the simulator doesn't reproduce.

Without an ICE, I am afraid that I will never solve this problem and thus
cannot trust the atmega103, STK-300, or the compiler.

Can anyone provide further insight on what may be happening here?

So far I have had suggestions about the voltage on the board sagging and
the possibility of a bug with the Z register rolling over to zero causing
a reset.

I can rule out the Z register problem because the only place that the Z register
is used is loading up initialized globals from the flash memory in the startup
code. It always "resets" or "wraps" well after that.

I am pretty sure that the VCC on the board is OK because I was getting nice
crisp edges on the waveforms on my 'scope and they were rising all the way to 5V.
I also scoped the power and reset lines and found nothing unusual happening
as the code kept vectoring to 0x0000 every 27ms or so.... (well past the reset
of the LCD anyway..)

I have also updated to the latest win32 release as downloaded from AVR-Freaks.

The code I have will run fine when targeted for an 8515 and gets "freaky" when
targeted for an m103.

I would be glad to mail the files upon request if someone would like to take
a look at what is going on...

Thanks!

Dan

On Tue, 27 Mar 2001 14:02:29 -0600, Dan Larson wrote:

>Hello all,
>
>I am working on some LCD code for the ATMega103 on the STK-300 board
>and I am having a very strange problem that is proving to be extremely
>difficult to debug without an ICE.
>
>What appears to be happening is that the device is continually executing
>up until a certain point and then ending up back at the reset entry point.
>
>I have verified that I am correctly turning off the watch dog in my _init_()
>routine and there are no interrupts being generated. Also, in my _init_()
>code I dump the high or low byte of the stack pointer to the LEDs depending
>on which push button is pressed. Through the same mechanism I can also dump
>MUCSR to determine the cause of the reset.
>
>So far I have been able to determine the following:
>
>1) It is *not* an external (BOR), or a power-up reset.
>
>2) It is *not* the watchdog reset. I have the watch dog disabled and I also
>inserted a spin-loop (infinite loop) at the beginning of main() to see
>if the watchdog would trip. It doesn't.
>
>3) The stack pointer appeared to be in an underflow condition when I dumped
>it to the LEDs. The preamble code of main sets the stack at 0x0FF7 and the
>value displayed on the LEDs was 0xFF8.
>
>So far all of the clues point to stack corruption. This is most likely a bug
>in the compiler output because I never manipulate the stack directly and I am
>not overflowing any arrays or local variables. I highly suspect that the _init_()
>routine is reached by the program counter "wrapping around" to zero, since the
>previous two bytes pulled from the stack (SP & SP+1) are not zero, indicating that
>address 0x0000 was not popped off the stack while returning from some function.
>
>Now for the "Freaky" part. The problem has never occurred in the AVR Studio simulator.
>I can spot no errors in the assembly output of the compiler that would corrupt the
>stack. The code under the simulator never reaches 0x0000 after reset nor do stack
>contents get written to out of context. I had originally been using the memory mapped
>LCD interface on the STK-300 board, but I switched to using PORT I/O instead, suspecting
>that there may have been some timing issues screwing up the CPU. I am now using 4-bit
>mode on PORTA (yes, the external memory is turned off). I have scoped and verified
>the timing on the LCD to be correct. I can even get it to display a few characters
>some times, depending on how I arrange the code, but it always eventually goes wild
>and ends up at the reset vector again before the main() code can finish.
>
>I even borrowed my friends STK-300 kit and got the same results, thus ruling out
>a bad CPU.
>
>Does anyone know of any compiler bugs or have any tips the help me track this
>problem down? I am using the win32 2.97 version of the compiler , downloaded from
>AVR-FEAKS.
>
>If I had access to an ICE, I am sure I would have found the problem by now, but I am
>at my wits end with this.
>
>
>Thanks!
>
>Dan
>
>
>
>
>
>
>
>
>
>
>
>
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Thu Mar 29 05:14:19 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14iJWT-0002TO-00
for <[email-masked]>; Thu, 29 Mar 2001 05:14:18 +1200
Received: from mm.amelek.gda.pl ([192.168.1.1] ident=mail)
by alf.amelek.gda.pl with esmtp (Exim 3.16 #1 (Debian))
id 14iJXQ-0000I3-00; Wed, 28 Mar 2001 19:15:16 +0200
Received: from marekm by mm.amelek.gda.pl with local (Exim 3.22 #1 (Debian))
id 14iJXM-0000TF-00; Wed, 28 Mar 2001 19:15:12 +0200
To: [email-masked], [email-masked]
Date: Wed, 28 Mar 2001 19:15:12 +0200 (CEST)
CC: [email-masked], [email-masked], [email-masked]
X-Mailer: ELM [version 2.4ME+ PL66 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Message-Id: <[email-masked]>
From: Marek Michalkiewicz <[email-masked]>
Subject: [avr-gcc-list] [patch] AVR __mulhi3 fix
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I've just applied this, for now to the 3.1 tree - fixes an old but
serious bug (513 * 1 = 1) so I'm afraid it should go into 3.0 as well...

2001-03-28 Marek Michalkiewicz <[email-masked]>

* config/avr/libgcc.S (__mulhi3): Correct tests to exit the loop
when multiplier or multiplicand is zero.

Index: config/avr/libgcc.S
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/avr/libgcc.S,v
retrieving revision 1.11
diff -c -3 -p -r1.11 libgcc.S
*** libgcc.S 2001/01/21 07:08:46 1.11
--- libgcc.S 2001/03/28 17:00:46
*************** __mulhi3_skip1:
*** 137,147 ****
add r_arg2L,r_arg2L ; shift multiplicand
adc r_arg2H,r_arg2H

! cpc r_arg2L,__zero_reg__
breq __mulhi3_exit ; while multiplicand != 0

lsr r_arg1H ; gets LSB of multiplier
ror r_arg1L
cpc r_arg1H,__zero_reg__
brne __mulhi3_loop ; exit if multiplier = 0
__mulhi3_exit:
--- 137,149 ----
add r_arg2L,r_arg2L ; shift multiplicand
adc r_arg2H,r_arg2H

! cp r_arg2L,__zero_reg__
! cpc r_arg2H,__zero_reg__
breq __mulhi3_exit ; while multiplicand != 0

lsr r_arg1H ; gets LSB of multiplier
ror r_arg1L
+ cp r_arg1L,__zero_reg__
cpc r_arg1H,__zero_reg__
brne __mulhi3_loop ; exit if multiplier = 0
__mulhi3_exit:

From [email-masked] Thu Mar 29 05:23:02 2001
Received: from fly.hiwaay.net
([208.147.154.56] helo=mail.hiwaay.net ident=0)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14iJev-0002U6-00
for <[email-masked]>; Thu, 29 Mar 2001 05:23:01 +1200
Received: from electron (adsl-78-168-174.hsv.bellsouth.net [216.78.168.174])
by mail.hiwaay.net (8.11.3/8.11.3) with SMTP id f2SHQ0514955
for <[email-masked]>; Wed, 28 Mar 2001 11:26:00 -0600 (CST)
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: Windows Eudora Pro Version 2.2 (32)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Wed, 28 Mar 2001 11:42:59 -0600
To: [email-masked]
From: Eddie Burwell <[email-masked]>
Subject: [avr-gcc-list] [avr-gcc-list]RE: Troubles uploading to a Mega103
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This may or may not be helpful since you laid out your own board. I had some
troubles with the STK300 and uisp. It turned out my printer port must have
internal 1k resistors on the outputs. Because of this my printer port did
not have the umph to drive the lines on the STK300 and thus the logic
voltage levels were out of spec.

Eddie Burwell

From [email-masked] Thu Mar 29 06:29:20 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14iKh4-0002b7-00
for <[email-masked]>; Thu, 29 Mar 2001 06:29:19 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.153])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA29796;
Wed, 28 Mar 2001 22:32:10 +0400
To: Marek Michalkiewicz <[email-masked]>
Cc: Lee Mitchell <[email-masked]>,
AVR GCC Mailing List <[email-masked]>, [email-masked]
Subject: Re: [avr-gcc-list] Bug found in __mulhi3 - was Is this possibly a bug in avr-gcc ?
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 28 Mar 2001 22:25:33 +0400
In-Reply-To: Marek Michalkiewicz's message of "Tue, 27 Mar 2001 21:22:28 +0200 (CEST)"
Message-ID: <[email-masked]>
Lines: 23
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Marek Michalkiewicz <[email-masked]> writes:

> > ie, the function is performing 0x201 * 0x18
> >
> > The returned value is 0x18 instead of 0x3018 and is therefore incorrect.
>
> The patch below fixes it for me, but I don't know why ;).

I'm also can't understand why.

> "ror" was supposed to set the Z flag correctly... Denis?

IMHO: yes.

May be problem in `brne' or `cpc' ?

> lsr r_arg1H ; gets LSB of multiplier
> ror r_arg1L
> ! sbiw r_arg1L,0 <<-------------------------------- better
> brne __mulhi3_loop ; exit if multiplier = 0
> __mulhi3_exit:

From [email-masked] Thu Mar 29 06:45:20 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14iKwY-0002cI-00
for <[email-masked]>; Thu, 29 Mar 2001 06:45:19 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.153])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA32256;
Wed, 28 Mar 2001 22:48:16 +0400
To: [email-masked] (Robert Rozman)
Cc: "[email-masked]" <[email-masked]>
Subject: Re: [avr-gcc-list] Global variables and space efficient programming again
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 28 Mar 2001 22:41:39 +0400
In-Reply-To: [email-masked]'s message of "Tue, 27 Mar 2001 16:20:26 +0200"
Message-ID: <[email-masked]>
Lines: 53
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

[email-masked] (Robert Rozman) writes:

> Hello,
>
> a little while ago I posted message concerning usage of main variables
> in avr-gcc programs and code space efficient programming.
>
> I have a program that uses quite some global variables (30-40). I
> discovered that every access to this variable takes assembly
> instructions (sts, std if I remember right) that results in quite
> inefficient use of code space.
>
> Then I forced variables into struct and define global pointer to this
> struct and declare it as a r28,r29 register variable (this registers
> were obviously reserved from other usage). I saved a lot of code space
> (600 bytes in 8000 bytes) but it still seems that leaving this choice to
> compiler would be better than forcing him to stay away from those
> registers. If I do this, then avr-gcc is filling those registers at each
> access, so all profit is lost .

Send me examples.

>
> Denis replied that obviously optimizer in avr-gcc is in some way
> broken.

It's a generic GCC problem. You can try `-fstrict-aliasing'

About your previous example:
try: avr-gcc -Os -fstrict-aliasing -S test.c
^^^^^^^^^^^^^^^^

test.c:

struct time_struct
{
char day;
char hour;
char min;
char sec;
};

struct time_struct * const time;
/* --------^^^^^^^------------- This `const' important */
int main(void)
{
time->day = 5;
time->hour= 9;
time->min = 10;
time->sec =10;
}

From [email-masked] Thu Mar 29 08:18:32 2001
Received: from ha1.rdc2.nsw.optushome.com.au ([203.164.2.50] helo=mss.rdc2.nsw.optushome.com.au)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14iMOm-0002gf-00
for <[email-masked]>; Thu, 29 Mar 2001 08:18:32 +1200
Received: from scottsP3 ([203.164.125.96]) by mss.rdc2.nsw.optushome.com.au
(InterMail vM.4.01.03.20 201-229-121-120-20010223) with SMTP
id <20010328202130.QIVE17266.mss.rdc2.nsw.optushome.com.au@scottsP3>
for <[email-masked]>; Thu, 29 Mar 2001 06:21:30 +1000
From: Scott Pitcher <[email-masked]>
Reply-To: [email-masked]
Organization: LETECH
To: [email-masked]
Subject: Re: [avr-gcc-list] Freaky code wraparound... (UPDATE)
Date: Thu, 29 Mar 2001 06:27:58 +1000
X-Mailer: KMail [version 1.1.99]
Content-Type: text/plain;
charset="us-ascii"
References: <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Message-Id: <01032906275808.06742@scottsP3>
Content-Transfer-Encoding: quoted-printable
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Dan,

Your using the Mega103 development board from Atmel? There are plenty=20
of LEDs along the bottom of the board (PORTB?). You don't need ICE to=20
solve your problem - believe me. We have had all kinds of nasty or=20
weird problems with '103 assembler applications, including stuff like=20
the skip bugs etc. If you checkpoint your code using the LEDs on port=20
B, you should be able to trace the fault almost to the instruction.

You have to be a little smarter without the ice, but you can beat it.

Cheers

Scott

On Thursday 29 March 2001 03:10, you wrote:
> I am now convinced that there is either a bug in the avr-gcc
> compiler or a problem with the Atmega103 / STK-300 board.
>

-----------------------------------------------
Scott Pitcher=09=[email-masked]
Product Engineer=09+61-418-368-051
LETECH=09=09=09Melbourne, Australia
-----------------------------------------------

From [email-masked] Thu Mar 29 08:43:44 2001
Received: from citycenter.citilink.com ([209.98.8.5])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14iMn9-0002i2-00
for <[email-masked]>; Thu, 29 Mar 2001 08:43:44 +1200
Received: (from dlarson@localhost) by citycenter.citilink.com (8.8.8/8.7.5) id OAA03329; Wed, 28 Mar 2001 14:38:54 -0600 (CST)
Posted-Date: Wed, 28 Mar 2001 14:38:54 -0600 (CST)
Message-Id: <[email-masked]>
From: "Dan Larson" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Cc: "[email-masked]" <[email-masked]>
Date: Wed, 28 Mar 2001 14:44:49 -0600
Reply-To: "Dan Larson" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 98 Standard (2.00.1500) For Windows NT (4.0.1381;5)
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: Re: [avr-gcc-list] Freaky code wraparound... (UPDATE)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Thu, 29 Mar 2001 06:27:58 +1000, Scott Pitcher wrote:

>Hi Dan,
>
>Your using the Mega103 development board from Atmel? There are plenty
>of LEDs along the bottom of the board (PORTB?). You don't need ICE to
>solve your problem - believe me.

Well, thats exactly how I got as far as I did and came to the aforementioned
conclusions about stack corruption / code wrap around. I dumped the stack
pointer in _init_() and found that it had underflowed by one byte. How else
could it reach 0xff8 when the preamble code in main() set it to 0xff7 ?

>We have had all kinds of nasty or
>weird problems with '103 assembler applications, including stuff like
>the skip bugs etc.

Other than the errata sheets, is there some place where the bugs which have
been found are listed?

>If you checkpoint your code using the LEDs on port
>B, you should be able to trace the fault almost to the instruction.
>
>You have to be a little smarter without the ice, but you can beat it.

Yes, I agree. But, I fear that I am going to wear out my flash memory
debugging this way!, and I can't find any replacement m103's from Digi-Key
Pioneer Standard, Insight, or anywhere else for that matter!

BTW, Has anyone tried to order the STK-300 daughter boards from Kanda with any
success? (From the US ?)

>
>Cheers
>
>Scott
>

Thanks for the tips, Scott!

TTYL,

Dan

From [email-masked] Thu Mar 29 19:40:47 2001
Received: from mail.identecsolutions.de ([217.6.123.139])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14iX2z-00038M-00
for <[email-masked]>; Thu, 29 Mar 2001 19:40:46 +1200
Received: from server1.identecsolutions.de (server1.identecsolutions.de [192.168.93.253])
by mail.identecsolutions.de (8.11.2/8.11.2/isd.proxy/0.10/20010223) with ESMTP id f2T7hIr07783
for <[email-masked]>; Thu, 29 Mar 2001 09:43:18 +0200
Received: from identecsolutions.de (localhost [127.0.0.1])
by server1.identecsolutions.de (8.11.2/8.11.2/isd/0.07/20010216) with ESMTP id f2T7hHZ19004
for <[email-masked]>; Thu, 29 Mar 2001 09:43:17 +0200
Message-ID: <[email-masked]>
Date: Thu, 29 Mar 2001 09:43:15 +0200
From: Frieder Ferlemann <[email-masked]>
Organization: Identec Solutions Deutschland GmbH
X-Mailer: Mozilla 4.75 [en]C-CCK-MCD QXW03243 (Win98; U)
X-Accept-Language: de,en
MIME-Version: 1.0
To: [email-masked]
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] gcrt1.S variable initialization
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

one could save about 16 bytes during startup if there is no
need for initialized variables.
A conditional compile to the gcrt1.S could be inserted
which checks if there is something to copy.

Something like:
#if _etext != _edata
ldi ZL, lo8(_etext); load the end of .text segment
...
#endif
should work.

I hope you are not this tight on bits and bytes that you
need this:)

Frieder

From [email-masked] Fri Mar 30 05:00:24 2001
Received: from sttlpop2.sttl.uswest.net ([206.81.192.2])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14ifmZ-0003XG-00
for <[email-masked]>; Fri, 30 Mar 2001 05:00:23 +1200
Received: (qmail 1853 invoked by alias); 29 Mar 2001 17:03:24 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 1655 invoked by uid 0); 29 Mar 2001 17:03:22 -0000
Received: from aadslppp19.sttl.uswest.net (HELO larry) (216.160.75.19)
by sttlpop2.sttl.uswest.net with SMTP; 29 Mar 2001 17:03:22 -0000
Message-ID: <00b901c0b872$70787960$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Bug found in __mulhi3 - was Is this possibly a bug in avr-gcc ?
Date: Thu, 29 Mar 2001 08:57:45 -0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Can someone supply me with a fresh version of libgcc.a for the various AVR
variants with the fix for __mulhi3?

Will your files be compatible with those generated for Windows? If not, or
questionable, perhaps the source tree for libgcc? None of the
distributions on Gunnar's site seem to have the source...

I have a motor control algorithm running and I am amazed that it works as
well as it does given the nature of the problem: __mulhi3(0x02xx, 0xyyyy)
returns just xx * yyyy

Thanks!

From [email-masked] Fri Mar 30 22:14:24 2001
Received: from bifrost.mjolner.dk
([130.225.4.254] helo=geri.mjolner.dk ident=hidden-user)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14ivvE-0004n4-00
for <[email-masked]>; Fri, 30 Mar 2001 22:14:24 +1200
Received: (qmail 12802 invoked by uid 2413); 30 Mar 2001 10:17:29 -0000
Date: Fri, 30 Mar 2001 12:17:29 +0200
From: Flemming Gram Christensen <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
User-Agent: Mutt/1.2.5i
Subject: [avr-gcc-list] Can-bus
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi

Has anyone used the AVR+gcc to do communication on a Can-bus?

What hardware and software did you use?

Regards

--
Flemming Gram Christensen, M.Sc., Software Engineer, Mjølner Informatics
------------------------------------------------------------------------
Mjolner Informatics A/S Phone: +45 70 27 43 43
Helsingforsgade 27 Fax: +45 70 27 43 44
DK-8000 Aarhus C, Denmark E-mail: [email-masked]
------------------------------------------------------------------------

From [email-masked] Fri Mar 30 22:30:23 2001
Received: from gateway.utbm.fr ([193.48.246.2] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14iwAg-0004oK-00
for <[email-masked]>; Fri, 30 Mar 2001 22:30:22 +1200
Received: from sunserv.utbm.fr (sunserv.utbm.fr [192.168.1.16])
by gateway.utbm.fr (8.9.3/jtpda-5.3.2) with ESMTP id MAA09257
for <[email-masked]>; Fri, 30 Mar 2001 12:33:06 +0200
Received: (from lcourtes@localhost)
by sunserv.utbm.fr (8.9.3+Sun/8.9.3) id MAA15538
for [email-masked]; Fri, 30 Mar 2001 12:33:01 +0200 (MEST)
Date: Fri, 30 Mar 2001 12:33:01 +0200
From: Ludovic COURTES <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
X-Mailer: Mutt 1.0pre2us
In-Reply-To: <[email-masked]>
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by gateway.utbm.fr id MAA09257
Subject: [avr-gcc-list] Re: Troubles uploading to a Mega103
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi !

> We had the same problem with both the signature bytes being 1)FF FF FF =
and
> being 2)00 01 02:
> 1)The ATMega103 loses its signature bytes for some reason after a few
> erase/program cycles. The workaround is to change the UISP code. I ma=
de a
> couple of changes already to the software already to accomodate these=20
> defects (also to read/write fuse bits, correcting srec format downloads=
,
> etc.). I can give you or anyone else this code if you so wish.

Ok, but why would it lose its signature bytes ? I modified Uisp to force =
upload/
download even if signature bytes are wrong but the flash remains filled w=
ith
0xff's.

Anyway, I am interested in your changes to uisp (i agree, there are some =
defects
to fix) and i think you should send a patch to add your changes to the of=
ficial
version.

> 2)Are you holding in the reset line using an external reset while you a=
re
> talking to the ATMega103? If the external reset is kept LOW the signat=
ure
> bytes will be FF FF FF when a
> "uisp -dapa" command is performed but after that the signature bytes wi=
ll be
> 00 01 02 when a
> "uisp -dapa" command is performed. Make sure the reset line is not
> externally made LOW when the UISP talks to it.

No reset is not held down. But we had /PEN (Programming Enable) connected=
to
the GND instead of VCC (MCU was always in programming mode)... ;) And now=
we
have changed it, signature bytes are always 0xffffff (except if we lock i=
t).

Thanks,
Ludovic.

--=20
Ludovic Court=E8s
Universit=E9 de Technologie de Belfort-Montb=E9liard
Unitec (Club de Robotique de l'UTBM)

From [email-masked] Sat Mar 31 02:19:40 2001
Received: from penguin.nebnet.net ([207.32.36.253] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14izkY-000544-00
for <[email-masked]>; Sat, 31 Mar 2001 02:19:39 +1200
Received: from musunco (pm1s142.nebnet.net [207.32.36.142])
by penguin.nebnet.net (8.11.0/8.11.0) with SMTP id f2UEMiM10262
for <[email-masked]>; Fri, 30 Mar 2001 07:22:45 -0700
From: "Marlin Unruh" <[email-masked]>
To: <[email-masked]>
Date: Fri, 30 Mar 2001 07:24:24 -0700
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Importance: Normal
Subject: [avr-gcc-list] AVR+gcc and CAN-bus
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Flemming Gram Christensen:

I am currently working with AVR-GCC, the AT90S8535, AT90S8515, and
Microchips stand-a-lone CAN controller MCP2510. I have written the software
to control the CAN-bus chip. The communication to the chip is done on the
SPI port. The MCP2510 interrupts the MCU when a valid message has been
assembled. I have written code that works in layers, a lower layer to work
with the hardware, and a layer that is between the application and the lower
layer. You may want to look at the Philips SJA1000, it has a parallel port
interface. If I can help let me know.

To anyone that would know:

I was using some global variables that were filled and maintained by the
timer interrupts. The timing functions were erratic and the software would
hang inconsistently with interaction on the keypad, with uses the timing
function for repeat rate. I changed to 'struct' and everything worked
perfect. Why are global variables not as reliable as structures? I switched
from using Imagecrafts ICC-AVR compiler and never used structures without a
problem. For one thing on ICC-AVR structure code was not as efficient as
AVR-GCC. The big reason I switched was code size.

Regards,

Marlin

From [email-masked] Sat Mar 31 03:03:23 2001
Received: from sttlpop3.sttl.uswest.net ([206.81.192.3])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14j0Qs-00056n-00
for <[email-masked]>; Sat, 31 Mar 2001 03:03:23 +1200
Received: (qmail 10561 invoked by alias); 30 Mar 2001 15:06:27 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 10539 invoked by uid 0); 30 Mar 2001 15:06:27 -0000
Received: from aadslppp19.sttl.uswest.net (HELO larry) (216.160.75.19)
by sttlpop3.sttl.uswest.net with SMTP; 30 Mar 2001 15:06:27 -0000
Message-ID: <00fd01c0b92b$3fe86120$0200000a@larry>
From: "Larry Barello" <[email-masked]>
To: "Marlin Unruh" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] AVR+gcc and CAN-bus
Date: Fri, 30 Mar 2001 07:05:55 -0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

It is hard to say what the problem is. I have never noticed had any issues
of structs vs individual statics/globals on code stability. Code size is
another matter. Dereferencing through a pointer is very efficient on GCC.
Some possibilities for your problems:

1. If you are using the latest snapshot (3.1) -O3 is broken.

2. you (or the compiler) might have some issues with things being/not being
'volatile' between the interrupt handler and the main code. In other
words, you have to be aware of things changing w/o the compiler knowing
(e.g. an interrupt handler modifying a global variable used by main() or a
subroutine) because the compiler can optimize repeat accesses to variables
out of existence. This also applied to subroutines that return stuff -
both real and inline.

3. by changing the access method you might have simply shifted timing away
from some race condition.

4. For random events, the stack is always suspect. You gave no hints on
how you changed your code... Perhaps your stack needs went down?

----- Original Message -----
From: "Marlin Unruh" <[email-masked]>
...
>
> I was using some global variables that were filled and maintained by the
> timer interrupts. The timing functions were erratic and the software
would
> hang inconsistently with interaction on the keypad, with uses the timing
> function for repeat rate. I changed to 'struct' and everything worked
> perfect. Why are global variables not as reliable as structures? I
switched
> from using Imagecrafts ICC-AVR compiler and never used structures without
a
> problem. For one thing on ICC-AVR structure code was not as efficient as
> AVR-GCC. The big reason I switched was code size.
>

From [email-masked] Sat Mar 31 04:01:27 2001
Received: from penguin.nebnet.net ([207.32.36.253] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14j1L3-0005AG-00
for <[email-masked]>; Sat, 31 Mar 2001 04:01:26 +1200
Received: from musunco (ppp219.nebnet.net [207.32.36.219])
by penguin.nebnet.net (8.11.0/8.11.0) with SMTP id f2UG4MM16562;
Fri, 30 Mar 2001 09:04:23 -0700
From: "Marlin Unruh" <[email-masked]>
To: "Larry Barello" <[email-masked]>
Cc: "Avr-Gcc-List" <[email-masked]>
Date: Fri, 30 Mar 2001 09:06:02 -0700
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Importance: Normal
In-Reply-To: <00fd01c0b92b$3fe86120$0200000a@larry>
Subject: [avr-gcc-list] globals vs structures
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I never thought about some of the issues you have presented. I was having
some problem with not using 'volatile' variables in regards to interrupts. I
also compiled the code with Volker Oth's 2.95 and the problem was identical
as with 3.1. All I did was group the timing variables together into a
structure, changed the syntax to reference the structure and it worked. I am
currently using only 210 bytes of SRAM of 512. I assume the stack works from
0x1ff -> 0x1fe..... on the 8515. I suspect your answer 3. is right.

I general look at the *.lst files and altering my 'C' style of writing to
produce more efficient code. I try to keep the 'pushes' and 'pops' down, if
possible. Sometimes just changing the order that variable are worked with
helps.

Regards,
Marlin

-----Original Message-----
From: Larry Barello [mailto:[email-masked]]
Sent: Friday, March 30, 2001 8:06 AM
To: Marlin Unruh
Cc: AVR GCC List
Subject: Re: [avr-gcc-list] AVR+gcc and CAN-bus

It is hard to say what the problem is. I have never noticed had any issues
of structs vs individual statics/globals on code stability. Code size is
another matter. Dereferencing through a pointer is very efficient on GCC.
Some possibilities for your problems:

1. If you are using the latest snapshot (3.1) -O3 is broken.

2. you (or the compiler) might have some issues with things being/not being
'volatile' between the interrupt handler and the main code. In other
words, you have to be aware of things changing w/o the compiler knowing
(e.g. an interrupt handler modifying a global variable used by main() or a
subroutine) because the compiler can optimize repeat accesses to variables
out of existence. This also applied to subroutines that return stuff -
both real and inline.

3. by changing the access method you might have simply shifted timing away
from some race condition.

4. For random events, the stack is always suspect. You gave no hints on
how you changed your code... Perhaps your stack needs went down?

From [email-masked] Sat Mar 31 22:55:42 2001
Received: from natmail2.webmailer.de ([192.67.198.65] helo=post.webmailer.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14jJ2f-0006HD-00
for <[email-masked]>; Sat, 31 Mar 2001 22:55:38 +1200
Received: from driehorn.de (f-35-194.cvx-berlin.ipdial.viaginterkom.de [62.180.194.35])
by post.webmailer.de (8.9.3/8.8.7) with ESMTP id MAA14866
for <[email-masked]>; Sat, 31 Mar 2001 12:58:42 +0200 (MET DST)
Message-ID: <[email-masked]>
Date: Sat, 31 Mar 2001 12:54:09 +0200
From: Thomas Driehorn <[email-masked]>
X-Mailer: Mozilla 4.6 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] avr-gcc list-file: meaning of symbols
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi there !

I just had a look at my project's list-file. At the very end there's a
section showing defined symbols and undefined symbols.

What's the meaning of these symbols ? Especially having undefined
symbols doesn't sound nice. I also found the symbol __stack being
undefined which sounds even worse.

Any hints ?

Thomas

From [email-masked] Sun Apr 01 11:18:44 2001
Received: from odin.he.net ([216.218.181.2])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14jUdn-000076-00
for <[email-masked]>; Sun, 01 Apr 2001 11:18:43 +1200
Received: from jpk1 (adsl-200.world-net.co.nz [210.55.228.200]) by odin.he.net (8.8.6/8.8.2) with SMTP id PAA28054 for <[email-masked]>; Sat, 31 Mar 2001 15:17:57 -0800
Date: Sat, 31 Mar 2001 15:17:57 -0800
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: Windows Eudora Light Version 1.5.2
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: [avr-gcc-list] Test post - Ignore
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Slight system hick-up, just checking if back to normal.

From [email-masked] Sun Apr 01 11:38:07 2001
Received: from email.netonecom.net ([209.172.26.13] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14jUwY-00008F-00
for <[email-masked]>; Sun, 01 Apr 2001 11:38:07 +1200
Received: from netonecom.net (catudal.netonecom.net [216.65.187.222])
by email.netonecom.net (8.11.2/8.11.0) with ESMTP id f2VNbCV06822
for <[email-masked]>; Sat, 31 Mar 2001 18:37:12 -0500 (EST)
Message-ID: <[email-masked]>
Date: Sat, 31 Mar 2001 18:37:15 -0500
From: Michel Catudal <[email-masked]>
Organization: Pas =?iso-8859-1?Q?organis=E9?= par Ti-Mou
X-Mailer: Mozilla 4.76 [Joual] (X11; U; Linux 2.4.2 i586)
X-Accept-Language: fr-CA, en-US
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Question on astudio with wine
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I compiled snapshots of gcc and binutils, I had added the patches
for avrobj. My question is : has anyone ever got the avr-gcc code to work with the latest
AvrStudio.exe? It wouldn't work with the wine version that came with SuSE 7.1
but works with the one from the CVS. The old wine would just crash and not close.
I needed a killall -9 wine to flush it.

Now The problem is the obj file won't load. I get messages to the effect that some files
are missing.
I can load the intel hex file and trace thru the code but I get no debug information.

--
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://www.netonecom.net/~bbcat
We have all kinds of links
and many SuSE 7.0 Linux RPM packages

From [email-masked] Sun Apr 01 23:59:02 2001
Received: from mailout02.sul.t-online.com ([194.25.134.17])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14jgVZ-0000BI-00
for <[email-masked]>; Sun, 01 Apr 2001 23:59:02 +1200
Received: from fwd05.sul.t-online.com
by mailout02.sul.t-online.com with smtp
id 14jgUc-0006iI-00; Sun, 01 Apr 2001 13:58:02 +0200
Received: from tonline (520072611635-0001@[217.2.223.174]) by fmrl05.sul.t-online.com
with smtp id 14jgUZ-1yzXFYC; Sun, 1 Apr 2001 13:57:59 +0200
From: "Andreas Schwarz" <[email-masked]>
To: "avr-gcc" <[email-masked]>
Date: Sun, 1 Apr 2001 14:00:19 +0100
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-Sender: [email-masked]
Subject: [avr-gcc-list] How to use AT90S4433 A/D-Inputs?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

how can I use the A/D-Inputs of the AT90S4433 from Gcc?
Thanks

Andreas

From [email-masked] Mon Apr 02 09:42:48 2001
Received: from invalid.ed.ntnu.no ([129.241.179.15])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14jpcV-0000cA-00
for <[email-masked]>; Mon, 02 Apr 2001 09:42:48 +1200
Received: from localhost (hembre@localhost)
by invalid.ed.ntnu.no (8.9.3/8.9.3) with ESMTP id XAA35641;
Sun, 1 Apr 2001 23:46:04 +0200 (CEST)
(envelope-from [email-masked])
Date: Sun, 1 Apr 2001 23:46:03 +0200 (CEST)
From: Bernt Hustad Hembre <[email-masked]>
X-Sender: [email-masked]
To: Andreas Schwarz <[email-masked]>
cc: avr-gcc <[email-masked]>
Subject: Re: [avr-gcc-list] How to use AT90S4433 A/D-Inputs?
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Sun, 1 Apr 2001, Andreas Schwarz wrote:

> how can I use the A/D-Inputs of the AT90S4433 from Gcc?

Here's a simple example:

/* reurns the analog input channel ch */
int readADC(unsigned char ch){
if(ch<=7) outp(ch,ADMUX);

outp((((1<<ADEN)|(1<<ADSC))+7),ADCSR); /* Sets ADEN and ADSC and
selects the slowest AD-conversation rate */

while((unsigned char)(inp(ADCSR)&& (1<<ADSC))){
/* wait for the ADC to do it's stuff.*/
asm volatile ("nop");
}
return (ADCL+(ADCH*256));
}

This routine is not at all efficient (ie. you could either do something
usefull during the AD conversation or enter sleepmode to save power and
reduce noise). But it is a starting point. For any modification please
read the datasheet for the part you are using. (check out
www.avrfreaks.net).

Bernie
Tlf.: 92648923
[email-masked]

From [email-masked] Mon Apr 02 23:24:15 2001
Received: from smtp-out.hamburg.pop.de ([195.222.210.86] ident=mail)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14k2RS-000181-00
for <[email-masked]>; Mon, 02 Apr 2001 23:24:14 +1200
Received: from mail.hamburg.pop.de ([193.98.9.7] helo=mail.provi.de)
by smtp-out.hamburg.pop.de with esmtp (Exim 3.22 #1)
id 14k2Rw-0000cX-00
for [email-masked]; Mon, 02 Apr 2001 13:24:44 +0200
Received: from [212.79.46.217] (helo=stargate.pd-ef.de)
by mail.provi.de with smtp (Exim 3.20 #2)
id 14k2Qd-0003YI-00
for [email-masked]; Mon, 02 Apr 2001 13:23:25 +0200
Received: from helium.pd-ef.ef (helium.pd-ef.ef [192.168.30.2])
by stargate.pd-ef.de (Postfix) with ESMTP id 24B6E4C04
for <[email-masked]>; Mon, 2 Apr 2001 13:23:23 +0200 (MEST)
Received: from ProDesignCAD.de (titan.pd-ef.ef [192.168.30.22])
by helium.pd-ef.ef (Postfix) with ESMTP id 2B7067011
for <[email-masked]>; Mon, 2 Apr 2001 13:23:15 +0200 (MEST)
Message-ID: <[email-masked]>
Date: Mon, 02 Apr 2001 13:23:16 +0200
From: Steffen Ziemann <[email-masked]>
Organization: ProDesign Electronic & CAD-Layout
X-Mailer: Mozilla 4.73 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: avr-gcc <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] d90 or coff
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I'm using the avr-gcc and the ICE200.

Now, I've a problem : the gcc means, that it can not compile to an
cof-file (option -gcoff+ ) :

"cc1.exe: warning: `-gcoff+' not supported by this configuration of GCC"

Where is the mistake ?

Thanks Steffen

--
Pro Design Electronic & CAD-Layout
Dipl.-Ing. Steffen Ziemann
Hochheimer Str. 47 - D-99094 Erfurt
FON : +49 / (0)361 / 789 30 71
FAX : +49 / (0)361 / 789 30 80
E-MAIL : [email-masked]

From [email-masked] Tue Apr 03 04:34:29 2001
Received: from email.netonecom.net ([209.172.26.13] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14k7Hg-0001K9-00
for <[email-masked]>; Tue, 03 Apr 2001 04:34:28 +1200
Received: from netonecom.net (catudal.netonecom.net [216.65.187.222])
by email.netonecom.net (8.11.2/8.11.0) with ESMTP id f32GXRn27434;
Mon, 2 Apr 2001 12:33:31 -0400 (EDT)
Message-ID: <[email-masked]>
Date: Mon, 02 Apr 2001 12:33:25 -0400
From: Michel Catudal <[email-masked]>
Organization: Pas =?iso-8859-1?Q?organis=E9?= par Ti-Mou
X-Mailer: Mozilla 4.76 [Joual] (X11; U; Linux 2.4.2 i586)
X-Accept-Language: fr-CA, en-US
MIME-Version: 1.0
To: Carsten =?iso-8859-1?Q?Ri=DFler?= <[email-masked]>
Subject: Re: AW: [avr-gcc-list] Question on astudio with wine
References: <[email-masked]>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by email.netonecom.net id f32GXRn27434
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Carsten Ri=DFler a =E9crit :
>=20
> I use the -g option and almost everything works fine.
> I tried Gunnars Win32 Version of avr-gcc.
> It is possible to use ICE200 and trace truh the code but You can't set =
any
> Variables or use Watchwes during runtime.
> CU Carsten
>=20

I don't use windows at home and it doesn't work for me. It looks like the=
filename
given is in UNIX form and is not handled correctly thru wine by avrtools.
My windows installation is just there to get wine to work and when I need=
to
scan images, otherwise I have no use for it.

At work I'm stuck with it but I use IAR. As for that problem that you tal=
k
about, the new avrstudio is supposed to deal with it. With the older vers=
ion I had to
compile with full path information to be able to have watches. It didn't =
work for IAR
without that approach.

--=20
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://www.netonecom.net/~bbcat
We have all kinds of links
and many SuSE 7.0 Linux RPM packages

From [email-masked] Tue Apr 03 05:31:45 2001
Received: from sand7.global.net.uk ([195.147.246.253])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14k8B7-0001Mc-00
for <[email-masked]>; Tue, 03 Apr 2001 05:31:45 +1200
Received: from pd3s11a08.client.global.net.uk ([195.147.91.212] helo=cmd33)
by sand7.global.net.uk with esmtp (Exim 3.22 #1)
id 14k7zs-00034h-00
for [email-masked]; Mon, 02 Apr 2001 18:20:08 +0100
From: "Chris Deighton" <[email-masked]>
To: <[email-masked]>
Date: Mon, 2 Apr 2001 18:29:29 +0100
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
Subject: [avr-gcc-list] avr-gcc and C++ ?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

Is it possible to build a version of GCC that will compile C++ for AVRs? I'm
aware of the limitations imposed by the SRAM and code size, but I'd still
love to code in an object oriented style, albeit without the C++ standard
libraries, etc.

Many thanks,

Chris.

From [email-masked] Tue Apr 03 18:55:47 2001
Received: from mailg.telia.com ([194.22.194.26])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14kKjC-0001wG-00
for <[email-masked]>; Tue, 03 Apr 2001 18:55:46 +1200
Received: from d1o70.telia.com (d1o70.telia.com [62.20.148.241])
by mailg.telia.com (8.11.2/8.11.0) with ESMTP id f336st425559
for <[email-masked]>; Tue, 3 Apr 2001 08:54:55 +0200 (CEST)
Received: from jesper (t6o70p85.telia.com [195.67.239.205])
by d1o70.telia.com (8.10.2/8.10.1) with SMTP id f336stB10535
for <[email-masked]>; Tue, 3 Apr 2001 08:54:55 +0200 (CEST)
Message-ID: <003a01c0bc0b$016d5b20$65656565@jesper>
From: "Jesper Hansen" <[email-masked]>
To: <[email-masked]>
Date: Tue, 3 Apr 2001 08:54:58 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Subject: [avr-gcc-list] uC/OS-II port
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi !

I've ported Jean Labrosse's Realtime OS uC/OS-II to avr-gcc.
The new port is available from his website: www.ucos-ii.com or from
mine: www.myplace.nu/avr

/Jesper

From [email-masked] Tue Apr 03 21:57:53 2001
Received: from [148.122.208.25] (helo=fep2.mta.online.no)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14kNZR-00026B-00
for <[email-masked]>; Tue, 03 Apr 2001 21:57:53 +1200
Received: from [10.122.209.34] by fep2.mta.online.no
(InterMail vM.4.01.03.00 201-229-121) with ESMTP
id <20010403095707.YCP3231.fep2.mta.online.no@[10.122.209.34]>
for <[email-masked]>; Tue, 3 Apr 2001 11:57:07 +0200
X-Priority:
Sensitivity: Company-Confidential
From: <[email-masked]>
To: [email-masked]
Date: Tue, 3 Apr 2001 11:57:07 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Message-Id: <20010403095707.YCP3231.fep2.mta.online.no@[10.122.209.34]>
Subject: [avr-gcc-list] Inline Function
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello everybody!

I am new to the avr-gcc. I do not like macros. I would like to write inline functions.

Is it possible to compile an inline function in C with the avr-gcc and which compilerflags are necessary ?

Thanks.

From [email-masked] Tue Apr 03 21:42:47 2001
Received: from hindenburg-s.online.no ([148.122.208.19] helo=fep1.mta.online.no)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14kNKo-00023Q-00
for <[email-masked]>; Tue, 03 Apr 2001 21:42:47 +1200
Received: from acpfire.at ([195.70.106.130]) by fep1.mta.online.no
(InterMail vM.4.01.03.00 201-229-121) with SMTP
id <[email-masked]>
for <[email-masked]>; Tue, 3 Apr 2001 11:41:53 +0200
From: refr <[email-masked]>
Date: Tue, 03 Apr 2001 09:39:45 GMT
Message-ID: <[email-masked]>
To: [email-masked].
X-Mailer: Mozilla/3.0 (compatible; StarOffice/5.2;Win32)
X-Priority: 3 (Normal)
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] Inline Function
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello everybody!

I am new to the avr-gcc. I do not like macros. I would like to write=20=

inline functions.
Is it possible to compile an inline function in C with the avr-gcc and=20=

which compilerflags are necessary ?
Thanks.

From [email-masked] Tue Apr 03 22:45:31 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14kOJV-00028s-00
for <[email-masked]>; Tue, 03 Apr 2001 22:45:29 +1200
Received: (from j@localhost)
by ida.interface-business.de id f33Aih877273;
Tue, 3 Apr 2001 12:44:43 +0200 (MET DST)
Date: Tue, 3 Apr 2001 12:44:43 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <20010403095707.YCP3231.fep2.mta.online.no@[10.122.209.34]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] Inline Function
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

<[email-masked]> wrote:

[Please don't post twice.]

> Is it possible to compile an inline function in C with the avr-gcc
> and which compilerflags are necessary ?

It is, since gcc has been supporting inline functions for ages now.
You don't need any special compile-time options except that you must
not specify the -ansi option since this one disables all extensions in
the compiler over the ANSI (ISO) C standard. (Using the -pedantic
option would flag the non-standard usage of `inline' without causing a
fatal error.)

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Wed Apr 04 01:04:31 2001
Received: from [206.197.156.12] (helo=millerwelds.com)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14kQU2-0002Fj-00
for <[email-masked]>; Wed, 04 Apr 2001 01:04:31 +1200
Received: from MEMCO-Message_Server by millerwelds.com
with Novell_GroupWise; Tue, 03 Apr 2001 08:03:19 -0500
Message-Id: <[email-masked]>
X-Mailer: Novell GroupWise Internet Agent 5.5.4.1
Date: Tue, 03 Apr 2001 08:02:48 -0500
From: "TODD BATZLER" <[email-masked]>
To: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Subject: [avr-gcc-list] avr-gcc and TextPad editor
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Has anyone experienced a problem with TextPad or any other editor calling =
avr-gcc through a user configurable tool where they get the error similar =
to this from "make":=20

avr-gcc: installation problem, cannot exec 'cc1': No such file or =
directory

but if you call "make" from a Dos Prompt window everything works properly =
and make finds cc1.exe in the proper place and everything compiles??

Also, now because of the Daylight Savings Time change, I get a "clock =
skew" warning. How can I eliminate that? Do I have to change my "bios" =
clock along with the Windows date and time??

Todd Batzler
[email-masked]

From [email-masked] Wed Apr 04 01:16:05 2001
Received: from gateway.utbm.fr ([193.48.246.2] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14kQfD-0002Gq-00
for <[email-masked]>; Wed, 04 Apr 2001 01:16:04 +1200
Received: from sunserv.utbm.fr (sunserv.utbm.fr [192.168.1.16])
by gateway.utbm.fr (8.9.3/jtpda-5.3.2) with ESMTP id PAA09755
for <[email-masked]>; Tue, 3 Apr 2001 15:14:55 +0200
Received: (from lcourtes@localhost)
by sunserv.utbm.fr (8.9.3+Sun/8.9.3) id PAA03863
for [email-masked]; Tue, 3 Apr 2001 15:14:54 +0200 (MEST)
Date: Tue, 3 Apr 2001 15:14:54 +0200
From: Ludovic COURTES <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 1.0pre2us
In-Reply-To: <[email-masked]>
Subject: [avr-gcc-list] Uploading troubles solved...
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi !

I recently sent a mail concerning my troubles uploading to a Mega103
via the serial interface (with the MCU responding with wrong signature
bytes, 0xff, and so on...). I have now found what was going wrong and
it might be interesting for some people...

In fact, the problem with uploading came from the SUT (Start-up Time)
fuse bits : they were both programmed ("0"), which means that the MCU
should boot in 5 cycles, and setting them to "1" (so that the start-up
time is the longest available) made it work fine.

BTW, i added a '-dno-sig-check' option to uisp to bypass signature check,
otherwise i wouldn't have been able to modify fuse bits (i might send
a patch).

Ludovic.

--
Ludovic Courtes
University of Technology of Belfort-Montbeliard
Unitec (UTBM's students Robotics Club)

From [email-masked] Wed Apr 04 01:39:53 2001
Received: from gateway.utbm.fr ([193.48.246.2] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14kR2F-0002II-00
for <[email-masked]>; Wed, 04 Apr 2001 01:39:52 +1200
Received: from sunserv.utbm.fr (sunserv.utbm.fr [192.168.1.16])
by gateway.utbm.fr (8.9.3/jtpda-5.3.2) with ESMTP id PAA10379
for <[email-masked]>; Tue, 3 Apr 2001 15:39:08 +0200
Received: (from lcourtes@localhost)
by sunserv.utbm.fr (8.9.3+Sun/8.9.3) id PAA04780
for [email-masked]; Tue, 3 Apr 2001 15:39:08 +0200 (MEST)
Date: Tue, 3 Apr 2001 15:39:07 +0200
From: Ludovic COURTES <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 1.0pre2us
In-Reply-To: <[email-masked]>
Subject: [avr-gcc-list] __mulhi3 & malloc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi !

I am wondering about the __mulhi3 problem in avr-gcc : it seems to
be fixed now (by Marek Michalkiewicz), but it there somewhere where
we can find new Linux binaries including this bug fix ?

Also, i had heard there was no working malloc in avr-gcc (i've been
using an external malloc for one year). Could someone tell me more
about what's wrong with avr-gcc's malloc, or if it is fixed now ?

Thanks,
Ludovic.

--
Ludovic Courtes
University of Technology of Belfort-Montbeliard
Unitec (UTBM's students Robotics Club)

From [email-masked] Tue Apr 03 23:18:24 2001
Received: from mailrelay.bluelabs.se ([194.17.38.34])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14kOpL-0002B3-00
for <[email-masked]>; Tue, 03 Apr 2001 23:18:23 +1200
Received: from Blue-sth2.bluelabs.se (blue-sth2.bluelabs.se [194.17.38.229])
by mailrelay.bluelabs.se (Postfix) with ESMTP id E278517B9
for <[email-masked]>; Tue, 3 Apr 2001 13:17:09 +0200 (CEST)
To: [email-masked]
X-Mailer: Lotus Notes Release 5.0.5 September 22, 2000
Message-ID: <[email-masked]>
From: [email-masked]
Date: Tue, 3 Apr 2001 13:17:08 +0200
X-MIMETrack: Serialize by Router on Blue-sth2/srv/Bluelabs(Release 5.0.7 |March 21, 2001) at
2001-04-03 13:17:09
MIME-Version: 1.0
Content-type: text/plain; charset=us-ascii
Subject: [avr-gcc-list] cast from float to int problem
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi
I have got a problem when moving from gcc version "2.95.2 19991024
(release)" to "2.97 20010108 (experimental)".
I have a routine that should count pulses and make a calculation from how
many of them that where high, see code below. When compiling with the old
version the temp2 (unsigned char) variable gets the value 90 as expected
but when using the newer one I get 0. The temp (float) value gets the same
value in both cases (although I don't know how to read out the real value
from the memory). I have tested this in the simulator version 3.22.
Any ideas?

Thanks Magnus

volatile uint_16 high,i;
volatile float temp;
volatile uint_8 temp2;
// Measure temp on sensor 0
uint_8 Measure0(void)
{
high = 0;
// for (i=0;i<0xfffe;i++)
// {
// high += (inp(PORTB) & 0x1);
// }
high = 17890; // TEST 90 degrees
temp = ((float)high)/308.0098 + 31.9149 + 0.5; // 0.5 for round
temp2 = (uint_8)temp;
return temp2;
}

From [email-masked] Wed Apr 04 05:56:45 2001
Received: from mail4.svr.pol.co.uk ([195.92.193.211])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14kV2q-0002Tb-00
for <[email-masked]>; Wed, 04 Apr 2001 05:56:45 +1200
Received: from modem-77.arda.dialup.pol.co.uk ([62.136.122.77] helo=lab)
by mail4.svr.pol.co.uk with smtp (Exim 3.13 #0)
id 14kV29-00053m-00; Tue, 03 Apr 2001 18:56:02 +0100
Message-ID: <003801c0bc67$edf23220$4d7a883e@lab>
From: "Arreckx" <[email-masked]>
To: "Chris Deighton" <[email-masked]>,
<[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] avr-gcc and C++ ?
Date: Tue, 3 Apr 2001 19:00:11 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I am currently working on the C++ support for the AVR.
Indeed, the SRAM is limited (unless you add external RAM), but careful C++
design can be very efficient.

I have built the avr-g++ successfully (Windows and Linux) and I can compile
C++ files. I used the source from http://www.combio.de/avr/ to which I added
the g++ branch. I use cygwin to build in Windows, and everything works out
of the box.

What is good is that this compiler is the latest gcc and is very close to
the standard, and since Avr uses ELF format (rather than COFF), templates
and inline are dealt with in style. Rtti and exceptions are missing. But
this is a good thing. Gcc exceptions are enormous and C++ exception should
never be used on small and average size embedded system. Rtti will stop
developer from using dynamic cast, and probably multiple inheritance,
another good thing !

Unfortunately, I haven't manage to build the stdlibc++. This library is need
for a lot of the built-in C++ stuff, like calling constructors of global or
static object instances etc... configure is failing.
I don't think the stdlibc++ is right for the AVR anyway.
So what was done for libc will have to be done for libstdc++. I am looking
for buddies to help me with this task.

To prove what I was saying, here is the standard waggle test I always do on
a new target to check it is alive, but in C++.

#include <inttypes.h>
#include <io.h>

class waggle
{
// Construction
public:
explicit waggle( uint8_t port ) : _port(port) {}

// Data members
private:
uint8_t _port;
// Accessor
public:
uint8_t getPort() const
{ return _port; }

// Operation
public:
void start( const uint8_t bit ) const;
};

void waggle::start( const uint8_t bit ) const
{
for (;;)
{
__mmio((_port)) |= BV((bit));
__mmio((_port)) &= ~BV((bit));
}
}

static const uint8_t port = PORTC;

int main()
{
waggle Waggler( port );

Waggler.start( 4 );

return 0;
}

and the corresponding assembly it generates :

Disassembly of section .text:

00000000 <main>:
0: ce ef ldi r28, 0xFE ; 254
2: df e0 ldi r29, 0x0F ; 15
4: de bf out 0x3e, r29 ; 62
6: cd bf out 0x3d, r28 ; 61
8: 25 e1 ldi r18, 0x15 ; 21
a: 29 83 std Y+1, r18 ; 0x01
c: 60 e0 ldi r22, 0x00 ; 0
e: 8c 2f mov r24, r28
10: 9d 2f mov r25, r29
12: 01 96 adiw r24, 0x01 ; 1
14: 03 d0 rcall .+6 ; 0x1c
16: 80 e0 ldi r24, 0x00 ; 0
18: 90 e0 ldi r25, 0x00 ; 0

0000001a <__stop_progIi__>:
1a: ff cf rjmp .-2 ; 0x1a

0000001c <waggle::start(unsigned char) const>:
1c: b9 2f mov r27, r25
1e: a8 2f mov r26, r24
20: 46 2f mov r20, r22
22: 21 e0 ldi r18, 0x01 ; 1
24: 30 e0 ldi r19, 0x00 ; 0
26: 02 c0 rjmp .+4 ; 0x2c
28: 22 0f add r18, r18
2a: 33 1f adc r19, r19
2c: 4a 95 dec r20
2e: e2 f7 brpl .-8 ; 0x28
30: 92 2f mov r25, r18
32: 90 95 com r25
34: 6c 91 ld r22, X
36: e6 2f mov r30, r22
38: ff 27 eor r31, r31
3a: 50 a1 ldd r21, Z+32 ; 0x20
3c: 52 2b or r21, r18
3e: 50 a3 std Z+32, r21 ; 0x20
40: 4c 91 ld r20, X
42: e4 2f mov r30, r20
44: ff 27 eor r31, r31
46: 30 a1 ldd r19, Z+32 ; 0x20
48: 39 23 and r19, r25
4a: 30 a3 std Z+32, r19 ; 0x20
4c: f3 cf rjmp .-26 ; 0x34
4e: 08 95 ret
Disassembly of section .data:

Bill.

From [email-masked] Wed Apr 04 06:42:57 2001
Received: from fly.hiwaay.net
([208.147.154.56] helo=mail.hiwaay.net ident=0)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14kVlY-0002a8-00
for <[email-masked]>; Wed, 04 Apr 2001 06:42:56 +1200
Received: from maoi_nt (adsl-78-168-121.hsv.bellsouth.net [216.78.168.121])
by mail.hiwaay.net (8.11.3/8.11.3) with SMTP id f33IgE517468
for <[email-masked]>; Tue, 3 Apr 2001 13:42:14 -0500 (CDT)
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: Windows Eudora Pro Version 2.2 (32)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Tue, 03 Apr 2001 13:53:45 -0500
To: [email-masked]
From: Eddie Burwell <[email-masked]>
Subject: [avr-gcc-list] Linking libm.a?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I'm trying to compile a program which uses a multiplication of unsigned
shorts. In the listing it says:

UNDEFINED SYMBOLS
_mulhi3

I have #included math.h. I'm using a makefile from Volker Oth's examples. Do
I need to add something to the LDFLAGS line?

Thanks in advanced,
Eddie Burwell

From [email-masked] Wed Apr 04 11:57:27 2001
Received: from fly.hiwaay.net
([208.147.154.56] helo=mail.hiwaay.net ident=0)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14kafv-0002nK-00
for <[email-masked]>; Wed, 04 Apr 2001 11:57:27 +1200
Received: from maoi_nt (adsl-78-168-121.hsv.bellsouth.net [216.78.168.121])
by mail.hiwaay.net (8.11.3/8.11.3) with SMTP id f33Nuk510535
for <[email-masked]>; Tue, 3 Apr 2001 18:56:46 -0500 (CDT)
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: Windows Eudora Pro Version 2.2 (32)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Tue, 03 Apr 2001 20:08:17 -0500
To: [email-masked]
From: Eddie Burwell <[email-masked]>
Subject: [avr-gcc-list] Re:Linking libm.a?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Oops. I see from the archives this is being worked on.

Eddie Burwell

From [email-masked] Thu Apr 05 04:36:02 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14kqGC-0003Rr-00
for <[email-masked]>; Thu, 05 Apr 2001 04:36:00 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.154])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id UAA00482;
Wed, 4 Apr 2001 20:35:13 +0400
To: Ludovic COURTES <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] __mulhi3 & malloc
References: <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 04 Apr 2001 20:28:36 +0400
In-Reply-To: Ludovic COURTES's message of "Tue, 3 Apr 2001 15:39:07 +0200"
Message-ID: <[email-masked]>
Lines: 17
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Ludovic COURTES <[email-masked]> writes:

> Hi !
>
> I am wondering about the __mulhi3 problem in avr-gcc : it seems to
> be fixed now (by Marek Michalkiewicz), but it there somewhere where
> we can find new Linux binaries including this bug fix ?
>
> Also, i had heard there was no working malloc in avr-gcc (i've been
> using an external malloc for one year). Could someone tell me more
> about what's wrong with avr-gcc's malloc, or if it is fixed now ?

GCC havn't malloc.
avr-libc have malloc.

avr-libc have a malloc which I have written about year or two ago.
But, I don't test it and don't use it.

From [email-masked] Thu Apr 05 08:39:10 2001
Received: from deborah.paradise.net.nz ([203.96.152.32])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ku3a-0003fs-00
for <[email-masked]>; Thu, 05 Apr 2001 08:39:10 +1200
Received: from mailserver.pertronic.co.nz (203-79-84-68.adsl.paradise.net.nz [203.79.84.68])
by deborah.paradise.net.nz (8.11.3/8.11.3) with ESMTP id f34KcYg05138
for <[email-masked]>; Thu, 5 Apr 2001 08:38:34 +1200 (NZST)
Received: by mailserver.pertronic.co.nz with XtraMail-SMTP/POP3-Server (v1.2 78220005830) for <[email-masked]> at Thu, 5 Apr 2001 08:38:15 +1200
Content-Type: text/plain;
charset="iso-8859-1"
From: Simon Eatough <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] __mulhi3 & malloc
Date: Thu, 5 Apr 2001 08:45:24 +1200
X-Mailer: KMail [version 1.2]
References: <[email-masked]> <[email-masked]> <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Message-Id: <01040508452400.01246@Simon>
Content-Transfer-Encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Thursday 05 April 2001 07:07, you wrote:
> Ludovic COURTES <[email-masked]> writes:
> > Hi !
> >
> > I am wondering about the __mulhi3 problem in avr-gcc : it seems to
> > be fixed now (by Marek Michalkiewicz), but it there somewhere where
> > we can find new Linux binaries including this bug fix ?
> >
> > Also, i had heard there was no working malloc in avr-gcc (i've been
> > using an external malloc for one year). Could someone tell me more
> > about what's wrong with avr-gcc's malloc, or if it is fixed now ?
>
> GCC havn't malloc.
> avr-libc have malloc.
>
> avr-libc have a malloc which I have written about year or two ago.
> But, I don't test it and don't use it.
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

malloc works ok for me.

Cheers.

Simon Eatough

From [email-masked] Fri Apr 06 00:46:17 2001
Received: from ru1.mtu.ru ([195.34.32.101] helo=umail.ru)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14l99V-0004EV-00
for <[email-masked]>; Fri, 06 Apr 2001 00:46:17 +1200
Received: from [195.34.32.10] (HELO mtu.ru)
by umail.ru (CommuniGate Pro SMTP 3.4.1)
with ESMTP id 6720491 for [email-masked]; Thu, 05 Apr 2001 16:45:01 +0400
X-Recipient: [email-masked]
Received: from dicomp.ru (unknown [212.30.172.162])
by mtu.ru (Postfix) with ESMTP id 066557342
for <[email-masked]>; Thu, 5 Apr 2001 16:45:08 +0400 (MSD)
(envelope-from [email-masked])
Received: from vlas [212.30.172.174] by dicomp.ru (FTGate 2, 2, 2, 1);
Thu, 05 Apr 2001 16:56:27 +0400
Message-ID: <01e701c0bdce$3e12b560$aeac1ed4@vlas>
From: "Andrew Vlasov" <[email-masked]>
To: <[email-masked]>
References: <000901c0b21b$3d5f70e0$0200000a@larry>
Subject: Re: [avr-gcc-list] Writing code to multiple targets
Date: Thu, 5 Apr 2001 16:45:06 +0400
MIME-Version: 1.0
Content-Type: text/plain;
charset="koi8-r"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I'm also very interested by this problem.

I think, not any "#ifdef <platform>" in your code, it's must be in IO *.h
files common to all platforms:
IAR, GCC, ...,
or may be:
IAR_AVR, GCC_AVR, IAR_HC11, GCC_HC11, ..., PC-WIN32?.

The only company I found is Ramtex Inc. :
1. Problems with lack of I/O standardization:
http://www.ramtex.dk/standard/colack.htm
2. www.ramtex.dk/standard/iostand.pdf
3. SGSETUP also provides you with the possibility of standardizing the
syntax for I/O and interrupt operations :
http://www.ramtex.dk/ftp/freedemo.htm (NO ready AVR database):

Andrew

----- Original Message -----
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
Sent: Wednesday, March 21, 2001 7:22 PM
Subject: [avr-gcc-list] Writing code to multiple targets

> I have a bunch of code written for the classic AVR on
> avr-gcc/gas. I want to port it to the IAR compiler series
> and I want to accommodate the various classes of AVR chips.
> The latter is not so big a deal since the differences are
> largely covered in the ioxxxx.h files. Yet, there are a few.
> For example the clock divisor bits for TC0 change between
> classic and mega103, the "names" of UCR and USR change
> between classic and mega163.
>
> 1. Is there a preferred approach to dealing with these
> differences beyond "#ifdef ATmega163 ..."
>
> 2. Does anyone have experience with writing code for both
> IAR and Avr-gcc and is willing to share any macros/headers
> they have developed to simplify the process?
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Fri Apr 06 12:59:08 2001
Received: from web11507.mail.yahoo.com ([216.136.172.39])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14lKah-0004k7-00
for <[email-masked]>; Fri, 06 Apr 2001 12:59:07 +1200
Message-ID: <[email-masked]>
Received: from [200.64.169.116] by web11507.mail.yahoo.com; Thu, 05 Apr 2001 17:58:32 PDT
Date: Thu, 5 Apr 2001 17:58:32 -0700 (PDT)
From: Abiel Fernandez <[email-masked]>
To: [email-masked]
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: [avr-gcc-list] Storing float variables
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I need to store a float variable in EEPROM.

I'm doing this using

asm("lds r23,flValor");
asm("lds r24,flDir");
asm("lds r25,flDir+1");
asm("rcall eeprom_wb");
asm("lds r23,(flValor)+1");
asm("adiw r24,1");
asm("rcall eeprom_wb");
asm("lds r23,(flValor)+2");
asm("adiw r24,1");
asm("rcall eeprom_wb");
asm("lds r23,(flValor)+3");
asm("adiw r24,1");
asm("rcall eeprom_wb");

being flvalor the varible, and flDir the location in
EEprom.

Is there another way to do this?

Thankyou,

Abiel Fernandez.

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/

From [email-masked] Sat Apr 07 01:33:28 2001
Received: from [207.174.230.106] (helo=ozservers.com)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14lWMi-0005EP-00
for <[email-masked]>; Sat, 07 Apr 2001 01:33:28 +1200
Received: (qmail 2580 invoked from network); 7 Apr 2001 03:28:35 -0000
Received: from d166-ps1-mel.alphalink.com.au (HELO research) (202.161.106.40)
by 207.174.230.165 with SMTP; 7 Apr 2001 03:28:35 -0000
Message-ID: <004d01c0be9e$c91cec40$286aa1ca@research>
From: "Ron Kreymborg" <[email-masked]>
To: "Abiel Fernandez" <[email-masked]>,
<[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Storing float variables
Date: Fri, 6 Apr 2001 23:33:58 +1000
Organization: Jennaron Research
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I use a group of functions for each data type. For floats this is:

void eWriteFloat(float *numPtr, void *addr)
{
BYTE *ptr, *num;

ptr = (BYTE*)addr;
num = (BYTE*)numPtr;
eeprom_wb((int)ptr++, *num++);
eeprom_wb((int)ptr++, *num++);
eeprom_wb((int)ptr++, *num++);
eeprom_wb((int)ptr++, *num++);
}

Ron

----- Original Message -----
From: "Abiel Fernandez" <[email-masked]>
To: <[email-masked]>
Sent: Friday, April 06, 2001 10:58 AM
Subject: [avr-gcc-list] Storing float variables

>
> I need to store a float variable in EEPROM.
>
> I'm doing this using
>
> asm("lds r23,flValor");
> asm("lds r24,flDir");
> asm("lds r25,flDir+1");
> asm("rcall eeprom_wb");
> asm("lds r23,(flValor)+1");
> asm("adiw r24,1");
> asm("rcall eeprom_wb");
> asm("lds r23,(flValor)+2");
> asm("adiw r24,1");
> asm("rcall eeprom_wb");
> asm("lds r23,(flValor)+3");
> asm("adiw r24,1");
> asm("rcall eeprom_wb");
>
> being flvalor the varible, and flDir the location in
> EEprom.
>
> Is there another way to do this?
>
> Thankyou,
>
> Abiel Fernandez.

From [email-masked] Fri Apr 06 21:59:52 2001
Received: from finch-post-10.mail.demon.net ([194.217.242.38])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14lT1z-00056J-00
for <[email-masked]>; Fri, 06 Apr 2001 21:59:51 +1200
Received: from ame-wkh.demon.co.uk ([158.152.100.93])
by finch-post-10.mail.demon.net with esmtp (Exim 2.12 #1)
id 14lT1P-0001Sr-0A
for [email-masked]; Fri, 6 Apr 2001 09:59:15 +0000
Received: from blua [10.0.0.66] by ame-wkh.demon.co.uk (FTGate 2, 2, 0, 1);
Fri, 06 Apr 01 10:41:52 +0100
Message-ID: <001b01c0be7e$eacb6990$4200000a@blua>
From: "Howard Ive" <[email-masked]>
To: <[email-masked]>
Date: Fri, 6 Apr 2001 10:49:47 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0018_01C0BE87.4C712600"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Subject: [avr-gcc-list] Build Errors
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_0018_01C0BE87.4C712600
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi All,

I've searched the list for this problem and cannot understand why it's =
not common. I've installed the system on Windows 2000 and all is OK. On =
Windows 98 the installation process fails (makefile errors at line 275). =
However, I've manually setup the path and set parameters.

I get the following when compiling the working project under '98:

avr-gcc: Installation problem. Cannot exec 'cpp': No such file or =
directory.

I assume that this is refering to cpp.exe in C:\gccavr\bin, which is =
present on the path. I also get this error if I attempt to build the =
project directly from codewright on any platform.

If I copy all the files to the GCCAVR\BIN directory everything works OK.

Any help with this would be greatly appreciated.

Howard Ive

------=_NextPart_000_0018_01C0BE87.4C712600
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi All,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I've searched the list for this problem =
and cannot=20
understand why it's not common. I've installed the system on Windows =
2000 and=20
all is OK. On Windows 98 the installation process fails (makefile errors =
at line=20
275). However, I've manually setup the path and set =
parameters.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I get the following when compiling the =
working=20
project under '98:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D2>avr-gcc: Installation problem. =
Cannot exec=20
'cpp': No such file or directory.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I assume that this is refering to =
cpp.exe in=20
C:\gccavr\bin, which is present on the path. I also get this error if I =
attempt=20
to build the project directly from codewright on any =
platform.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>If I copy all the files to the =
GCCAVR\BIN directory=20
everything works OK.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Any help with this would be greatly=20
appreciated.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Howard Ive</FONT></DIV></BODY></HTML>

------=_NextPart_000_0018_01C0BE87.4C712600--

From [email-masked] Fri Apr 13 01:57:03 2001
Received: from penguin.nebnet.net ([207.32.36.253] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14nhan-0003k5-00
for <[email-masked]>; Fri, 13 Apr 2001 01:57:02 +1200
Received: from musunco (ppp208.nebnet.net [207.32.36.208])
by penguin.nebnet.net (8.11.0/8.11.0) with SMTP id f3CDuhM13750
for <[email-masked]>; Thu, 12 Apr 2001 07:56:45 -0600
From: "Marlin Unruh" <[email-masked]>
To: <[email-masked]>
Date: Thu, 12 Apr 2001 07:58:52 -0600
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Subject: [avr-gcc-list] Unable to generate reloads for: error
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I am getting the following error on a long switch statement. Is it because
the length of the switch? I have 43 case: conditions. The same code would
compile under ICC-AVR. The line number it is groaning about is the last line
of the function, which is right after the end of the switch.

_opcode.c: In function `ExeOpCode':
_opcode.c:196: Unable to generate reloads for:
(jump_insn 1007 1006 1008 (parallel[
(set (pc)
(mem/u:HI (plus:HI (reg:HI 24 r24)
(label_ref:HI 1009)) 0))
(use (label_ref 1009))
] ) 131 {*tablejump} (insn_list 1000 (nil))
(expr_list:REG_DEAD (reg:HI 24 r24)
(expr_list:REG_LABEL (code_label 1009 1008 1010 148 "" [num uses:
2])
(nil))))
make: *** [_opcode.o] Error 1

Help Wanted!

Marlin

From [email-masked] Fri Apr 13 04:39:18 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14nk7p-0003qK-00
for <[email-masked]>; Fri, 13 Apr 2001 04:39:18 +1200
Received: from mm.amelek.gda.pl ([192.168.1.1] ident=mail)
by alf.amelek.gda.pl with esmtp (Exim 3.16 #1 (Debian))
id 14nk5s-00063q-00; Thu, 12 Apr 2001 18:37:16 +0200
Received: from marekm by mm.amelek.gda.pl with local (Exim 3.22 #1 (Debian))
id 14nk5s-0004jX-00; Thu, 12 Apr 2001 18:37:16 +0200
Subject: Re: [avr-gcc-list] Unable to generate reloads for: error
In-Reply-To: <[email-masked]> from Marlin Unruh
at "Apr 12, 2001 07:58:52 am"
To: Marlin Unruh <[email-masked]>
Date: Thu, 12 Apr 2001 18:37:16 +0200 (CEST)
CC: [email-masked]
X-Mailer: ELM [version 2.4ME+ PL66 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Message-Id: <[email-masked]>
From: Marek Michalkiewicz <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> I am getting the following error on a long switch statement. Is it because
> the length of the switch? I have 43 case: conditions. The same code would
> compile under ICC-AVR. The line number it is groaning about is the last line
> of the function, which is right after the end of the switch.

What version of avr-gcc are you using (try "avr-gcc -v")?
There was a bug causing this kind of error, fixed a few months ago.
If you got this with the current version (CVS or recent snapshot),
then we still have a problem...

Marek

From [email-masked] Fri Apr 13 07:21:00 2001
Received: from penguin.nebnet.net ([207.32.36.253] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14nmeJ-00040i-00
for <[email-masked]>; Fri, 13 Apr 2001 07:21:00 +1200
Received: from musunco (pm3bs38.nebnet.net [207.32.36.38])
by penguin.nebnet.net (8.11.0/8.11.0) with SMTP id f3CJKuM32063;
Thu, 12 Apr 2001 13:20:57 -0600
From: "Marlin Unruh" <[email-masked]>
To: <[email-masked]>
Cc: <[email-masked]>
Date: Thu, 12 Apr 2001 13:23:04 -0600
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Subject: [avr-gcc-list] RE: unable to generate reloads for:
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I thought I was compiling with the latest, but I was using the version from
http://8bit.at/avr/ site. I have two versions 2.95 and 3.1. I tried 3.1 and
it compiles, w/ no errors.

Thank you....

-mu

From [email-masked] Fri Apr 13 08:28:06 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14nnhF-00043i-00
for <[email-masked]>; Fri, 13 Apr 2001 08:28:05 +1200
Received: (qmail 11834 invoked from network); 12 Apr 2001 19:03:00 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 12 Apr 2001 19:03:00 -0000
Received: from robi ([193.2.76.192]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with SMTP id AAA5658
for <[email-masked]>; Thu, 12 Apr 2001 21:51:42 +0200
Message-ID: <[email-masked]>
From: [email-masked] (Robert Rozman)
To: <[email-masked]>
Date: Thu, 12 Apr 2001 22:02:45 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Subject: [avr-gcc-list] ATMega 103 and avr-gcc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I'm thinking of switching from 8535 to ATMega103. I've successfully used
avr-gcc on AVR smaller platforms and I wonder if it goes as smoothly as on
nonMega devices.

Also, any positive or negative experience, opinion on ATMEga103 would
be appreciated.

Thanks in advance,

Robert Rozman

From [email-masked] Fri Apr 13 08:55:41 2001
Received: from citycenter.citilink.com ([209.98.8.5])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14no7w-00045F-00
for <[email-masked]>; Fri, 13 Apr 2001 08:55:40 +1200
Received: (from dlarson@localhost) by citycenter.citilink.com (8.8.8/8.7.5) id PAA10446; Thu, 12 Apr 2001 15:47:08 -0500 (CDT)
Posted-Date: Thu, 12 Apr 2001 15:47:08 -0500 (CDT)
Message-Id: <[email-masked]>
From: "Dan Larson" <[email-masked]>
To: "Robert Rozman" <[email-masked]>
Cc: "[email-masked]" <[email-masked]>
Date: Thu, 12 Apr 2001 15:58:33 -0600
Reply-To: "Dan Larson" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 98 Standard (2.00.1500) For Windows NT (4.0.1381;3)
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: Re: [avr-gcc-list] ATMega 103 and avr-gcc?, YES!, but watch out for PonyProg ...
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I am currently using the atmega103 and avr-gcc, but I have just started. It seems
to work well.

Watch out for PonyProg with the atmega103 ! I spent^h^h^h^h^h wasted much time
"debugging" some 4-bit LCD code on my STK-300. It turns out that PonyProg was
not correctly writing data into the '103 and corrupted instructions caused the
program counter to go wild and wrap around through the reset vector. Use
only AVR-ISP if you value your time. I have the AVR-ISP v 2.7 beta working
OK on my Win NT 4.0 system. The configuration doesn't auto-scan for the LPT
port successfuly, but setting it to LPT1 seems to work well enough even with the
printer driver on the same port.

A fellow STk-300 user tried my code (Thank You!) and it worked fine. When he
told me what he used to program *his* '103, I suddenly realized what the big difference
was between our setups and I gave AVR-ISP a try. Sure enough... it now works!
How many times do I need to re-learn *that* lesson again ? ;-\

Good Luck!

Dan

On Thu, 12 Apr 2001 22:02:45 +0200, Robert Rozman wrote:

>Hello,
>
>I'm thinking of switching from 8535 to ATMega103. I've successfully used
>avr-gcc on AVR smaller platforms and I wonder if it goes as smoothly as on
>nonMega devices.
>
>Also, any positive or negative experience, opinion on ATMEga103 would
>be appreciated.
>
>Thanks in advance,
>
>
>Robert Rozman
>
>
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Fri Apr 13 09:49:07 2001
Received: from viemta04.chello.at ([195.34.133.54])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14noxe-00047m-00
for <[email-masked]>; Fri, 13 Apr 2001 09:49:07 +1200
Received: from dot.at ([62.178.92.247]) by viemta04.chello.at
(InterMail vK.4.03.02.00 201-232-124 license 6aea1bd1f01aef5a9a73363c16ebee43)
with ESMTP id <[email-masked]>;
Thu, 12 Apr 2001 23:49:02 +0200
Message-ID: <[email-masked]>
Date: Thu, 12 Apr 2001 23:49:03 +0200
From: Christoph Plattner <[email-masked]>
Organization: private
X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.16-22 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Robert Rozman <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] ATMega 103 and avr-gcc
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello !

I did the switch some months ago from 8515 to ATmega103, as my self
written OS
grows and grows...

The only problem is the fact, that ATmega103 has its down/up-load pins
on the
same as the serial interface, I need for the console.

But in all other respects, there was no change.
Yes there was one. My OS did not work on the ATmega. The problem was,
that the
slower clock frequency (4MHz instead of 8, as ATmega supports 6MHz as
maximum),
did show up races in my OS....
Ok, this was only my software problem.

I wish you luck, and you can ask me...

Christoph P.

Robert Rozman wrote:
>
> Hello,
>
> I'm thinking of switching from 8535 to ATMega103. I've successfully used
> avr-gcc on AVR smaller platforms and I wonder if it goes as smoothly as on
> nonMega devices.
>
> Also, any positive or negative experience, opinion on ATMEga103 would
> be appreciated.
>
> Thanks in advance,
>
> Robert Rozman
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
-------------------------------------------------------------------------
private: [email-masked]
company: [email-masked]

From rako@eirik Sat Apr 14 02:28:25 2001
Received: from mailout00.sul.t-online.com ([194.25.134.16])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14o4Yi-0004oG-00
for <[email-masked]>; Sat, 14 Apr 2001 02:28:24 +1200
Received: from fwd01.aul.t-online.de
by mailout00.sul.t-online.com with smtp
id 14o4YU-00041p-0F; Fri, 13 Apr 2001 16:28:10 +0200
Received: from eirik (320052789252-0001@[62.158.169.195]) by fmrl01.sul.t-online.com
with smtp id 14o4YS-2CsVNYC; Fri, 13 Apr 2001 16:28:08 +0200
Content-Type: text/plain;
charset="iso-8859-1"
From: Ralph Koettlitz <[email-masked]>
Reply-To: [email-masked]
To: "Dan Larson" <[email-masked]>,
"Robert Rozman" <[email-masked]>
Subject: Re: [avr-gcc-list] ATMega 103 and avr-gcc?, YES!, but watch out for PonyProg ...
Date: Fri, 13 Apr 2001 16:35:58 +0200
X-Mailer: KMail [version 1.2]
Cc: "[email-masked]" <[email-masked]>
References: <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Message-Id: <01041316355801.03583@eirik>
Content-Transfer-Encoding: 8bit
X-Sender: [email-masked]
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

>
> A fellow STk-300 user tried my code (Thank You!) and it worked fine. When
> he told me what he used to program *his* '103, I suddenly realized what the
> big difference was between our setups and I gave AVR-ISP a try. Sure
> enough... it now works! How many times do I need to re-learn *that* lesson
> again ? ;-\
>

Why don't you you use uisp ? I used this program one year with the atMega
and had no problems. And finaly it's possible to integrate uisp into the make
file.

Regards

Ralph

From [email-masked] Sun Apr 15 23:08:17 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14okO8-0007zb-00
for <[email-masked]>; Sun, 15 Apr 2001 23:08:16 +1200
Received: from smtp.world-net.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.9.3/8.9.3) with SMTP id XAA14168
for <[email-masked]>; Sun, 15 Apr 2001 23:11:02 +1200
Date: Sun, 15 Apr 2001 23:07:23 -1200
From: Jason Kyle <[email-masked]>
To: [email-masked]
Message-ID: <20010415230723.A5579@jpk1>
Reply-To: Jason Kyle <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Mailer: Balsa 0.6.0
Subject: [avr-gcc-list] strtol.c undefined reference to _ldiv
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Just installed latest gcc (3.0 20010409) and avr-libc (20010331), came
across the following problem - looks like a name change somewhere but I
can't find it.

avr-libc-20010331/src/bsd/strtol.c:113: undefined reference to '_ldiv'

Similar to post regarding itoa() a few weeks back, are we likely to see
more name change problems like these? Marek, please assist :)

Also of note, but not critical
make gnu=1
fails at the moment too.

Cheers,

Jason Kyle

From [email-masked] Mon Apr 16 01:27:23 2001
Received: from vita.hk.net
([152.101.101.101] helo=hk.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14omYk-00086A-00
for <[email-masked]>; Mon, 16 Apr 2001 01:27:23 +1200
Received: from hk.net (p52.tnt.hk.net [202.66.202.52])
by hk.net (8.9.1/8.9.1) with ESMTP id VAA06477;
Sun, 15 Apr 2001 21:27:22 +0800 (HKT)
Message-ID: <[email-masked]>
Date: Sun, 15 Apr 2001 21:21:03 +0800
From: Kang Tin LAI <[email-masked]>
Organization: Solar System
X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 i86pc)
X-Accept-Language: en
MIME-Version: 1.0
To: Jason Kyle <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] strtol.c undefined reference to _ldiv
References: <20010415230723.A5579@jpk1>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Modify include/stdlib.h:

/* _div and _ldiv from libgcc.a */
/*
extern div_t div(int, int) __asm__("_div") __ATTR_CONST__;
extern ldiv_t ldiv(long, long) __asm__("_ldiv") __ATTR_CONST__;
*/
extern div_t div(int, int) __asm__("__udivmodsi4") __ATTR_CONST__;
extern ldiv_t ldiv(long, long) __asm__("__divmodsi4") __ATTR_CONST__;

then rebuild the libraries, then rebuild your codes.

Also a note, if you are Linuxer:
src/Makefile:

ifdef win32
RM = rm
MD = $(subst /,\,mkdir $@)
INSTALL = $(subst \,/,cp -v -f $^)
else
RM = rm
MD = mkdir -p $@ <--- $@ missing
INSTALL = install -m644 $^/
endif

Cheers!

KTL

Jason Kyle wrote:
>
> Just installed latest gcc (3.0 20010409) and avr-libc (20010331), came
> across the following problem - looks like a name change somewhere but I
> can't find it.
>
> avr-libc-20010331/src/bsd/strtol.c:113: undefined reference to '_ldiv'
>
> Similar to post regarding itoa() a few weeks back, are we likely to see
> more name change problems like these? Marek, please assist :)
>
> Also of note, but not critical
> make gnu=1
> fails at the moment too.
>
> Cheers,
>
> Jason Kyle
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Mon Apr 16 07:00:54 2001
Received: from sttlpop5.sttl.uswest.net ([206.81.192.5])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14orlU-0008MU-00
for <[email-masked]>; Mon, 16 Apr 2001 07:00:53 +1200
Received: (qmail 14243 invoked by alias); 15 Apr 2001 19:01:02 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 14222 invoked by uid 0); 15 Apr 2001 19:01:02 -0000
Received: from vdsl25.sttl.uswest.net (HELO larry) (216.160.108.25)
by sttlpop5.sttl.uswest.net with SMTP; 15 Apr 2001 19:01:02 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "Gunnar Henne" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
Date: Sun, 15 Apr 2001 11:57:53 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Re: New avrgcc binary
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Gunnar, I copied you new 3.0 binaries over my 3.1 distribution, that I got
from you earlier, and it seems to work fine. I didn't directly test the
multiply fix, but inspected the loaded code to see that the word test was
in place.

My application grew ~64 bytes to 0x1F00 going from 3.1 -> 3.0, but
everything seems to work fine, including floating point comparisons.

Cheers!
Larry Barello
http://www.barello.net

----- Original Message -----
From: "Gunnar Henne" <[email-masked]>
To: "Larry Barello" <[email-masked]>
Sent: Thursday, April 05, 2001 12:30 AM
Subject: New avrgcc binary

> Hello Larry,
>
> If the function is OK, you can download
> http://combio.de/avr/avrgcc-3.4.2001.mingw32.tar.gz
>
> In fact the whole config/avr directory is up to date. If it works please
> inform me on Friday, or post ist to the avr-gcc list, since I will be in
> holiday until 18. April.
>
> Greetings
>
> Gunnar
>

From [email-masked] Mon Apr 16 07:54:46 2001
Received: from tgserv.tele.gl ([194.177.224.7] helo=mail.greennet.gl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14osbb-0008Op-00
for <[email-masked]>; Mon, 16 Apr 2001 07:54:44 +1200
Received: from steen (host-229-244.greennet.gl [194.177.229.244] (may be forged))
by mail.greennet.gl (8.11.1/8.11.1) with SMTP id f3FJsaI16502
for <[email-masked]>; Sun, 15 Apr 2001 17:54:37 -0200 (WGTDST)
Message-ID: <001f01c0c5ee$55581c60$2201a8c0@steen>
From: "Steen Thunberg" <[email-masked]>
To: <[email-masked]>
Date: Sun, 15 Apr 2001 17:54:29 -0300
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Help a beginner in Gcc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi gcc-list

Is there anyone who will help a beginner to get a bit further ??

I'm trying to make my first program beyond lighting a LED.....

I've started with BASCOM - a compiler til Avr's in basic, but will try =
to learn in C also.

I'm trying to communicate with a ds1820, to messure a temperature.
Is there anyone who will share some code ?

I actually found some C-code for AvrStudio, but I can't get it to work =
with Avr-gcc....

Thanks in advance

Sincerly

Steen Thunberg
Greenland
=20

From rako@eirik Mon Apr 16 08:46:26 2001
Received: from mailout05.sul.t-online.com ([194.25.134.82])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14otPd-0008R4-00
for <[email-masked]>; Mon, 16 Apr 2001 08:46:25 +1200
Received: from fwdtmp0.sul.t-online.com
by mailout05.sul.t-online.com with smtp
id 14otPl-0006HO-02; Sun, 15 Apr 2001 22:46:33 +0200
Received: from eirik (320052789252-0001@[62.158.169.157]) by fmrl00.sul.t-online.com
with smtp id 14otPq-2Fhwa8C; Sun, 15 Apr 2001 22:46:38 +0200
Content-Type: text/plain;
charset="iso-8859-1"
From: Ralph Koettlitz <[email-masked]>
Reply-To: [email-masked]
To: [email-masked]
Date: Sun, 15 Apr 2001 22:54:35 +0200
X-Mailer: KMail [version 1.2]
X-PRIORITY: 2 (High)
Priority: urgent
MIME-Version: 1.0
Message-Id: <01041522543500.00700@eirik>
Content-Transfer-Encoding: 8bit
X-Sender: [email-masked]
Subject: [avr-gcc-list] Need help to get actual gcc und libs
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I worked for one year ago with the avr-gcc. Today I'm starting a new project
and I want to know how is the status of the librarys. Has someone worked with
the floatingpoint functions? And wich of the binutils are working? Last
question: Where can I get the actual library source?

Regards
Ralph

From [email-masked] Tue Apr 17 00:31:33 2001
Received: from mx02.nexgo.de ([151.189.8.97])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14p8AD-0000YU-00
for <[email-masked]>; Tue, 17 Apr 2001 00:31:33 +1200
Received: from kleinertiga.local (dusdi5-212-144-205-031.arcor-ip.net [212.144.205.31])
by mx02.nexgo.de (Postfix) with ESMTP id 98311858A4
for <[email-masked]>; Mon, 16 Apr 2001 14:31:42 +0200 (CEST)
Received: from gmx.de (localhost [127.0.0.1])
by kleinertiga.local (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id f3GCRJI01149
for <[email-masked]>; Mon, 16 Apr 2001 14:27:25 +0200
X-Authentication-Warning: kleinertiga.local: Host localhost [127.0.0.1] claimed to be gmx.de
Message-ID: <[email-masked]>
Date: Mon, 16 Apr 2001 14:27:18 +0200
From: rudolph <[email-masked]>
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] inline functions in output but never used
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

in my output from avr-gcc i found a lot of inline-functions. But all the
functions
where inlined by the compiler, so there is no need for put them to the
output. Is there a flag to elimenate these functions from the output?

Bye
Klaus

From [email-masked] Tue Apr 17 00:49:15 2001
Received: from mx03.nexgo.de ([151.189.8.98])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14p8RN-0000Za-00
for <[email-masked]>; Tue, 17 Apr 2001 00:49:14 +1200
Received: from kleinertiga.local (unknown [145.253.136.60])
by mx03.nexgo.de (Postfix) with ESMTP id 551FD180DA
for <[email-masked]>; Mon, 16 Apr 2001 14:49:25 +0200 (CEST)
Received: from gmx.de (localhost [127.0.0.1])
by kleinertiga.local (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id f3GCj1I01316
for <[email-masked]>; Mon, 16 Apr 2001 14:45:07 +0200
X-Authentication-Warning: kleinertiga.local: Host localhost [127.0.0.1] claimed to be gmx.de
Message-ID: <[email-masked]>
Date: Mon, 16 Apr 2001 14:45:01 +0200
From: rudolph <[email-masked]>
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] using c and asm files in one project
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

i have an old project with only asm files and want to go to c-source
now.
But there is a single file, call it data.s here, where are some bytes
defined for the flash space. I want to use the data from that file
in my project from c code again, but how i have to say my compiler that
there is
an extern defined label in an asm file for the flash space?

data.s

.text
label1:
.byte 0x01, 0x02 .... 0x00

label2:
.byte 0x88, 0x55 ..... 0x00

from my c-code i want to make a call on that labels like:

test.c

strcpy( data_ram, label1);
memcpy( data_ram, label2, 0x10);

etc...

I think the makefile is something like that:

proj.srec: test.c data.s
avr-gcc -xassembler-with-cpp data.s -c
avr-gcc -O test.c -c
avr-gcc test.o data.o -o proj.out
avr-objcopy -Osrec proj.out proj.srec

But the compiler tell me that there are no labels
label1 and label2.

Thanke for your help
Klaus

From [email-masked] Tue Apr 17 07:06:41 2001
Received: from mail.brainlink.com ([149.2.32.129] helo=brainlink.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14pEKa-0000rq-00
for <[email-masked]>; Tue, 17 Apr 2001 07:06:37 +1200
Received: from [64.152.24.11] (HELO brainlink.com)
by brainlink.com (CommuniGate Pro SMTP 3.3.2)
with ESMTP id 5860792 for [email-masked]; Mon, 16 Apr 2001 15:06:27 -0400
Message-ID: <[email-masked]>
Date: Mon, 16 Apr 2001 15:05:48 -0400
From: Ormund Williams <[email-masked]>
Reply-To: AVR-GCC <[email-masked]>
Organization: ORMLAB Inc
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.3 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: AVR-GCC <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] avr-gcc fails to build
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all

I am running SuSE 7.1, kernel: 2.4.3, native gcc: 2.95.2.

After unpacking binutils-010413.tar.bz2 in /usr/src/avr, I build
binutils using these cammands:

cd /usr/src/avr/binutils-010413
./configure --target=avr
make
make install

the build completes without errors. On attempting to do the same thing
for gcc using these commands:

cd /usr/src/avr/gcc-20010205
./configure --target=avr --enable-languages=c
make

Make fails reporting a segfault:

. . .
/usr/src/avr/gcc-20010205/gcc/xgcc -B/usr/src/avr/gcc-20010205/gcc/
-B/usr/local/avr/bin/ -B/usr/local/avr/lib/ -isystem
/usr/local/avr/include -O2 -DCROSS_COMPILE -DIN_GCC -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem
./include -DDF=SF -Dinhibit_libc -mcall-prologues -g1 -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I. -I./. -I./config
-I./../include -DL_udivmodqi4 -xassembler-with-cpp -c
./config/avr/libgcc.S -o libgcc/./_udivmodqi4.o
xgcc: Internal error: Segmentation fault (program as)
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make[2]: *** [libgcc/./_udivmodqi4.o] Error 1
make[2]: Leaving directory `/usr/src/avr/gcc-20010205/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/usr/src/avr/gcc-20010205/gcc'
make: *** [all-gcc] Error 2
make: Leaving directory `/usr/src/avr/gcc-20010205'

I have gotten avr-gcc to build before using bunutils-010221,
gcc-20010205 and avr-libc-20010211 but I wanted to use the more recent
avr-libc-20010331 and the instructions advise using the latest snapshots
or cvs, did I just pick a bad combo, if so what combination of bunutils
and gcc should I use? TIA

--
Ormund

From [email-masked] Tue Apr 17 12:23:12 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14pJGy-00014J-00
for <[email-masked]>; Tue, 17 Apr 2001 12:23:12 +1200
Received: from cel1 (adsl-179.world-net.co.nz [210.55.228.179])
by mail.world-net.co.nz (8.9.3/8.9.3) with SMTP id MAA24040
for <[email-masked]>; Tue, 17 Apr 2001 12:26:18 +1200
Date: Tue, 17 Apr 2001 12:26:18 +1200
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: Windows Eudora Light Version 1.5.2
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: AVR-GCC <[email-masked]>
From: Jason Kyle <[email-masked]>
Subject: [avr-gcc-list] avr-gcc fails to build
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Ormund,

Try a later snapshot or current CVS of gcc, I had success with gcc-20010409
and binutils-010409 (NB avr-libc-20010331 requires a quick touch-up, see
mailing list archive). Always, always, without fail, try a the latest
available version first :) Remember that the avr target for gcc is a work
in progress and needs feedback in order to progress, keeping up to date is
important for everyone using this target as there are bug fixes and
optimisations happening often.

Cheers,

Jason Kyle

At 15:05 16/04/01 -0400, you wrote:
>Hi all
>
>I am running SuSE 7.1, kernel: 2.4.3, native gcc: 2.95.2.
>
>After unpacking binutils-010413.tar.bz2 in /usr/src/avr, I build
>binutils using these cammands:
>
> cd /usr/src/avr/binutils-010413
> ./configure --target=avr
> make
> make install
>
>the build completes without errors. On attempting to do the same thing
>for gcc using these commands:
>
> cd /usr/src/avr/gcc-20010205
> ./configure --target=avr --enable-languages=c
> make
>
>Make fails reporting a segfault:
>
>. . .
>/usr/src/avr/gcc-20010205/gcc/xgcc -B/usr/src/avr/gcc-20010205/gcc/
>-B/usr/local/avr/bin/ -B/usr/local/avr/lib/ -isystem
>/usr/local/avr/include -O2 -DCROSS_COMPILE -DIN_GCC -W -Wall
>-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem
>./include -DDF=SF -Dinhibit_libc -mcall-prologues -g1 -DIN_LIBGCC2
>-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I. -I./. -I./config
>-I./../include -DL_udivmodqi4 -xassembler-with-cpp -c
>./config/avr/libgcc.S -o libgcc/./_udivmodqi4.o
>xgcc: Internal error: Segmentation fault (program as)
>Please submit a full bug report.
>See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
>make[2]: *** [libgcc/./_udivmodqi4.o] Error 1
>make[2]: Leaving directory `/usr/src/avr/gcc-20010205/gcc'
>make[1]: *** [stmp-multilib] Error 2
>make[1]: Leaving directory `/usr/src/avr/gcc-20010205/gcc'
>make: *** [all-gcc] Error 2
>make: Leaving directory `/usr/src/avr/gcc-20010205'
>
>I have gotten avr-gcc to build before using bunutils-010221,
>gcc-20010205 and avr-libc-20010211 but I wanted to use the more recent
>avr-libc-20010331 and the instructions advise using the latest snapshots
>or cvs, did I just pick a bad combo, if so what combination of bunutils
>and gcc should I use? TIA
>
>--
>Ormund
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
>

From [email-masked] Tue Apr 17 19:25:03 2001
Received: from mgate2.uni-hannover.de ([130.75.2.5] ident=zzismail)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14pPrD-0001Jx-00
for <[email-masked]>; Tue, 17 Apr 2001 19:25:03 +1200
Received: from hgmlsun1.geml.uni-hannover.de by mgate2.uni-hannover.de
with LocalSMTP (PP) with ESMTP; Tue, 17 Apr 2001 09:21:52 +0200
Received: from geml.uni-hannover.de (hgmlat31 [130.75.43.51])
by hgmlsun1.geml.uni-hannover.de (8.9.3/8.9.3) with ESMTP
id JAA02862 for <[email-masked]>;
Tue, 17 Apr 2001 09:32:52 +0200 (MET DST)
Message-ID: <[email-masked]>
Date: Tue, 17 Apr 2001 08:28:42 +0200
From: Richter_Matthias <[email-masked]>
Organization: Uni Hannover
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i586)
X-Accept-Language: de, en
MIME-Version: 1.0
To: [email-masked]
Subject: [avr-gcc-list] Bug in itoa()
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello list!

Some weeks ago, I wrote about an "undefined reference to '_udivhi3'" in
itoa().
This problem has gone with avr-libc 20010331.
Now, there is another (new?) bug in itoa(): It runs into infinite loops
for some input values.
To correct this, the radix value has to be copied to r23:r22 (divisor
registers for _udivmodhi4) before every iteration (not only before the
first iteration).

cut: ----------------------------------------------(in
src/misc/itoa.S)-----
mov rP3, rP5 ; radix
clr rP2
clr rSI1 ; count, clear for later
clr rSI0 ; minus flag

cpi rP3, 2 ; no radix < 2
brlt terminate
cpi rP3, 10 ; decimal number ?
brne divide_loop
and rP0, rP0 ; sign of value ?
brge divide_loop
com rP0 ; make positive
neg rP1
sbci rP0,0xff
ldi rSI0, '-' ; store sign
divide_loop:
; dividend in r25:r24, divisor in r23:r22
XCALL _U(__udivmodhi4) ; quotient in r23:r22, remainder in r25:r24
-----------------------------------------------------------------------------

insert:
---------------------------------------------------------------------
clr rSI1 ; count, clear for later
clr rSI0 ; minus flag

cpi rP5, 2 ; no radix < 2
brlt terminate
cpi rP5, 10 ; decimal number ?
brne divide_loop
and rP0, rP0 ; sign of value ?
brge divide_loop
com rP0 ; make positive
neg rP1
sbci rP0,0xff
ldi rSI0, '-' ; store sign
divide_loop:
mov rP3, rP5 ; radix
clr rP2
XCALL _U(__udivmodhi4) ; dividend in r25:r24, divisor in r23:r22
; quotient in r23:r22, remainder in
r25:r24
-----------------------------------------------------------------------------

With this fix, it seems to work correct.

Greetings,

Matthias

From [email-masked] Tue Apr 17 21:46:48 2001
Received: from mail.ams.de ([195.30.77.11] helo=mimesweeper.innobase.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14pS4O-0001PJ-00
for <[email-masked]>; Tue, 17 Apr 2001 21:46:48 +1200
Received: from exchange.ams.de (unverified) by mimesweeper.innobase.com
(Content Technologies SMTPRS 4.1.5) with ESMTP id <[email-masked]> for <[email-masked]>;
Tue, 17 Apr 2001 11:46:14 +0200
Received: by exchange.ams.de with Internet Mail Service (5.5.2653.19)
id <2P3HAVJZ>; Tue, 17 Apr 2001 11:46:20 +0200
Message-ID: <316F79677E35D411B196001083CFC2DA24E1C2@GANYMED>
From: Stefan Wimmer <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Date: Tue, 17 Apr 2001 11:45:56 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
charset="iso-8859-1"
Subject: [avr-gcc-list] Re: ATMega 103 and avr-gcc?, YES!, but watch out for PonyProg ...
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Dan Larson" <[email-masked]> wrote:

> Watch out for PonyProg with the atmega103 ! I spent^h^h^h^h^h
> wasted much time "debugging" some 4-bit LCD code on my STK-300.
> It turns out that PonyProg was not correctly writing data into
> the '103 and corrupted instructions caused the program counter
> to go wild and wrap around through the reset vector.

Hi Dan,

did you report the problem to Claudio Lanconelli [[email-masked]]?
I'm sure he would like to know...

Stefan

From [email-masked] Wed Apr 18 05:01:54 2001
Received: from mail.brainlink.com ([149.2.32.129] helo=brainlink.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14pYrR-0001f3-00
for <[email-masked]>; Wed, 18 Apr 2001 05:01:53 +1200
Received: from [64.152.24.11] (HELO brainlink.com)
by brainlink.com (CommuniGate Pro SMTP 3.3.2)
with ESMTP id 5877906 for [email-masked]; Tue, 17 Apr 2001 13:02:00 -0400
Message-ID: <[email-masked]>
Date: Tue, 17 Apr 2001 13:01:08 -0400
From: Ormund Williams <[email-masked]>
Reply-To: AVR-GCC <[email-masked]>
Organization: ORMLAB Inc
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.3 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: AVR-GCC <[email-masked]>
Subject: Re: [avr-gcc-list] avr-gcc fails to build
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Jason Kyle wrote:
>
> Hi Ormund,
>
> Try a later snapshot or current CVS of gcc, I had success with gcc-20010409
> and binutils-010409 (NB avr-libc-20010331 requires a quick touch-up, see
> mailing list archive). Always, always, without fail, try a the latest
> available version first :) Remember that the avr target for gcc is a work
> in progress and needs feedback in order to progress, keeping up to date is
> important for everyone using this target as there are bug fixes and
> optimisations happening often.
>
Actually I did try gcc-20010409 and many other combinations, I am pretty
sure now that the problem is my system. I tried building the same
combination of gcc and binutils that I have working on another machine
and building gcc fails with the error that it cant find avr-ar. avr-ar
is in /usr/local/bin and was in the PATH before I make gcc but gets
removed from the PATH during make, that seems very strange to me.

What platform do you use?, SuSE 7.1 dose not seem to work for me.

--
Ormund

From [email-masked] Wed Apr 18 10:07:54 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14pddY-0001u2-00
for <[email-masked]>; Wed, 18 Apr 2001 10:07:53 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.140])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id CAA30349;
Wed, 18 Apr 2001 02:08:06 +0400
To: rudolph <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] inline functions in output but never used
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 18 Apr 2001 02:01:31 +0400
In-Reply-To: rudolph's message of "Mon, 16 Apr 2001 14:27:18 +0200"
Message-ID: <[email-masked]>
Lines: 14
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

rudolph <[email-masked]> writes:

> Hi all,
>
> in my output from avr-gcc i found a lot of inline-functions. But all the
> functions
> where inlined by the compiler, so there is no need for put them to the
> output. Is there a flag to elimenate these functions from the
> output?

You must declare such functions as:

static inline foo (....)
^^^^^^

From [email-masked] Wed Apr 18 23:02:13 2001
Received: from ha1.rdc2.nsw.optushome.com.au ([203.164.2.50] helo=mss.rdc2.nsw.optushome.com.au)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ppip-0002Mh-00
for <[email-masked]>; Wed, 18 Apr 2001 23:02:12 +1200
Received: from scottsP3 ([203.164.125.96]) by mss.rdc2.nsw.optushome.com.au
(InterMail vM.4.01.03.20 201-229-121-120-20010223) with SMTP
id <20010418110201.ZKHJ28870.mss.rdc2.nsw.optushome.com.au@scottsP3>
for <[email-masked]>; Wed, 18 Apr 2001 21:02:01 +1000
From: Scott Pitcher <[email-masked]>
Reply-To: [email-masked]
Organization: LETECH
To: [email-masked]
Subject: Re: [avr-gcc-list] using c and asm files in one project
Date: Wed, 18 Apr 2001 21:09:32 +1000
X-Mailer: KMail [version 1.1.99]
Content-Type: text/plain;
charset="us-ascii"
References: <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Message-Id: <01041821093200.00212@scottsP3>
Content-Transfer-Encoding: quoted-printable
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Klaus,

Declare assembler globals with ...

=09.section .data
=09.global label1
label1:=09.....

and declare them as extern in your c code.

Cheers

Scott

On Monday 16 April 2001 22:45, you wrote:
> Hi all,
>
> i have an old project with only asm files and want to go to
> c-source now.
> data.s
>
> ..text
> label1:
> ..byte 0x01, 0x02 .... 0x00
>
> label2:
> But the compiler tell me that there are no labels
> label1 and label2.
>
> Thanke for your help
> Klaus
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--=20

-----------------------------------------------
Scott Pitcher=09=[email-masked]
Product Engineer=09+61-418-368-051
LETECH=09=09=09Melbourne, Australia
-----------------------------------------------

From [email-masked] Thu Apr 19 00:57:07 2001
Received: from vita.hk.net
([152.101.101.101] helo=hk.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14prW5-0002RL-00
for <[email-masked]>; Thu, 19 Apr 2001 00:57:06 +1200
Received: from hk.net (p43.tnt.hk.net [202.66.202.43])
by hk.net (8.9.1/8.9.1) with ESMTP id UAA29237
for <[email-masked]>; Wed, 18 Apr 2001 20:57:21 +0800 (HKT)
Message-ID: <[email-masked]>
Date: Wed, 18 Apr 2001 20:50:54 +0800
From: Kang Tin LAI <[email-masked]>
Organization: Solar System
X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 i86pc)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] How .weak?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I have some questions, the C startup code of AVR libc:

; These too can be set with the avr-ld --defsym name=value option
; (MCUCR must be set up correctly to enable external SRAM).
.weak __init_mcucr__
.weak __init_emcucr__
.weak __init_wdtcr__

... stuff skipped

#ifdef WDTCR
ldi r_tmp1, lo8(__init_wdtcr__)
wdr
out WDTCR, r_tmp1
#endif
#ifdef MCUCR
ldi r_tmp1, lo8(__init_mcucr__)
out MCUCR, r_tmp1
#endif
#ifdef EMCUCR
ldi r_tmp1, lo8(__init_emcucr__)
out EMCUCR, r_tmp1
#endif

1. .weak is AVR specific directive?
2. .weak __init_mcucr__ will allocate a storage? Or just define
a symbol?
3. What value will be assigned to WDTCR, MCUCR and EMCUCR
after instructions above? Zero sure? Assume no --defsym option.

Thank you very much!

KTL

From [email-masked] Wed Apr 18 22:09:37 2001
Received: from moutvdom01.kundenserver.de ([195.20.224.200])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14pou0-0002KU-00
for <[email-masked]>; Wed, 18 Apr 2001 22:09:37 +1200
Received: from [195.20.224.208] (helo=mrvdom01.schlund.de)
by moutvdom01.kundenserver.de with esmtp (Exim 2.12 #2)
id 14pouG-00010u-00
for [email-masked]; Wed, 18 Apr 2001 12:09:52 +0200
Received: from dialin44.pg5-nt.dusseldorf.nikoma.de ([213.54.100.44] helo=elmedgmbh.de)
by mrvdom01.schlund.de with esmtp (Exim 2.12 #2)
id 14potT-00038r-00
for [email-masked]; Wed, 18 Apr 2001 12:09:03 +0200
Received: from Spooler by elmedgmbh.de (Mercury/32 v3.21c) ID MO000009;
18 Apr 01 12:12:50 +0200
Received: from spooler by elmedgmbh.de (Mercury/32 v3.21c); 18 Apr 01 12:12:37 +0200
From: "Eckhard Tikwinski" <[email-masked]>
Organization: ELMED GmbH
To: AVR-GCC <[email-masked]>
Date: Wed, 18 Apr 2001 12:12:17 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Priority: normal
X-mailer: Pegasus Mail for Win32 (v3.12bDE)
Message-Id: <[email-masked]>
Subject: [avr-gcc-list] Looking for 16x16 multiply with 32 bit result
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi everyone,
maybe stupid question, but... is there a efficient way for 16x16
signed multiplication with 32-bit result in avr-gcc ?
Thanks,

Eckhard Tikwinski
[email-masked]

From [email-masked] Fri Apr 20 02:26:59 2001
Received: from vita.hk.net
([152.101.101.101] helo=hk.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14qFOY-0003QH-00
for <[email-masked]>; Fri, 20 Apr 2001 02:26:55 +1200
Received: from hk.net (p47.tnt.hk.net [202.66.202.47])
by hk.net (8.9.1/8.9.1) with ESMTP id WAA12505
for <[email-masked]>; Thu, 19 Apr 2001 22:27:10 +0800 (HKT)
Message-ID: <[email-masked]>
Date: Thu, 19 Apr 2001 22:20:42 +0800
From: Kang Tin LAI <[email-masked]>
Organization: Solar System
X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 i86pc)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Bug report
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

May be there was a report before.

Source:

char adc_flag = NOT_RDY; /* external, (i.e., in SRAM) */
...
...

while (adc_flag == NOT_RDY); /* wait for interrupt to set to RDY */

asm generated:

lds r24,adc_flag <- value is load to R24 only once
.L33:
tst r24 <- dead loop tests dead value
breq .L33 <- never quit the loop

Label location .L33: should be before lds instruction?

avr-gcc is lastest snapshot, AVR8515, -O2 (perhaps problem is from
here, the optimizer? Let test later)

KTL

From [email-masked] Fri Apr 20 04:59:36 2001
Received: from [205.230.159.32] (helo=sys32.hou.wt.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14qHmJ-0003Wd-00
for <[email-masked]>; Fri, 20 Apr 2001 04:59:36 +1200
Received: from wt.net (wm.hou.wt.net [216.119.141.200])
by sys32.hou.wt.net (8.9.1/8.9.1) with SMTP id LAA18838;
Thu, 19 Apr 2001 11:57:36 -0500 (CDT)
From: "Mike Jones" <[email-masked]>
Reply-to: [email-masked]
To: Kang Tin LAI <[email-masked]>, [email-masked]
Date: Thu, 19 Apr 2001 11:57:31 +0600
Subject: Re: [avr-gcc-list] Bug report
X-Mailer: DMailWeb Web to Mail Gateway 2.4e, http://netwinsite.com/top_mail.htm
Message-id: <[email-masked]>
X-User-Info: 149.58.101.253
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

shouldn't you define adc_flag as volatile so that it would know that this
variable will change due to events not inside this loop?

Mike

>May be there was a report before.
>
>
>Source:
>
>char adc_flag = NOT_RDY; /* external, (i.e., in SRAM) */
>...
>...
>
>while (adc_flag == NOT_RDY); /* wait for interrupt to set to RDY */
>
>
>asm generated:
>
> lds r24,adc_flag <- value is load to R24 only once
>.L33:
> tst r24 <- dead loop tests dead value
> breq .L33 <- never quit the loop
>
>Label location .L33: should be before lds instruction?
>
>avr-gcc is lastest snapshot, AVR8515, -O2 (perhaps problem is from
>here, the optimizer? Let test later)
>
>KTL
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
>

From "francois.declercq"@belgacom.net Fri Apr 20 06:47:24 2001
Received: from riker.skynet.be ([195.238.3.132])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14qJSd-0003gT-00
for <[email-masked]>; Fri, 20 Apr 2001 06:47:23 +1200
Received: from belgacom.net (free7527.powered-by.skynet.be [62.4.157.103])
by riker.skynet.be (8.11.2/8.11.2/Skynet-OUT-2.11) with ESMTP id f3JIlcJ01217
for <[email-masked]>; Thu, 19 Apr 2001 20:47:39 +0200 (MET DST)
(envelope-from <"francois.declercq"@belgacom.net>)
Message-Id: <[email-masked]>
Date: Thu, 19 Apr 2001 20:46:41 +0200
From: DECLERCQ =?iso-8859-1?Q?Fran=E7ois?= <[email-masked]>
X-Mailer: Mozilla 4.75 [fr] (X11; U; Linux 2.2.17-21mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: "[email-masked]" <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Using the 10bit ADC converter of an AT90S8535
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi!
I'm a novice in C.
Could Somebody tel me how have I to initialise the AD converter Data
register to
be able to copy it's value in an volatile uint16 temporary memory

Thanks an best reguards

DECLERCQ F.

From [email-masked] Fri Apr 20 07:17:57 2001
Received: from sttlpop2.sttl.uswest.net ([206.81.192.2])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14qJwD-0003hw-00
for <[email-masked]>; Fri, 20 Apr 2001 07:17:57 +1200
Received: (qmail 5270 invoked by alias); 19 Apr 2001 19:18:23 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 5212 invoked by uid 0); 19 Apr 2001 19:18:23 -0000
Received: from vdsl25.sttl.uswest.net (HELO larry) (216.160.108.25)
by sttlpop2.sttl.uswest.net with SMTP; 19 Apr 2001 19:18:23 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: =?iso-8859-1?Q?DECLERCQ_Fran=E7ois?= <[email-masked]>,
"AVR GCC List" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Using the 10bit ADC converter of an AT90S8535
Date: Thu, 19 Apr 2001 12:18:26 -0700
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0081_01C0C8CA.D6025540"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_0081_01C0C8CA.D6025540
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Note, I have never used the attached C code, but it is what I wrote before
converting it to assembly for my final project. It should work fine. At
least it compiles fine..

The second & third files is the assembly code that I do use. It does
continuous
conversion (very low overhead) and allows you to simply "read" the current
value. It converts all 8 channels although that would be easy to change.

Larry Barello
http://www.barello.net

----- Original Message -----
From: "DECLERCQ François" <[email-masked]>

>
> Hi!
> I'm a novice in C.
> Could Somebody tel me how have I to initialise the AD converter Data
> register to
> be able to copy it's value in an volatile uint16 temporary memory
>
> Thanks an best reguards
>
> DECLERCQ F.

------=_NextPart_000_0081_01C0C8CA.D6025540
Content-Type: application/octet-stream;
name="adcdriver.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="adcdriver.c"

#include <io.h>
#include "AvrX.h"

void ADC_Init(void)
{
outb(BV(ADEN) | BV(ADSC) | BV(ADPS1) | BV(ADPS2), ADCSR);
while (inp(ADCSR) & BV(ADSC));
}

uint16_t ADCReadChannel(uint8_t Channel)
{
outp(Channel, ADMUX);
outp(inp(ADCSR) | BV(ADSC), ADCSR);
while (inp(ADCSR) & BV(ADSC)); // Wait conversion done
return (__inw(ADCL));
}

------=_NextPart_000_0081_01C0C8CA.D6025540
Content-Type: application/octet-stream;
name="adc_driver.s"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="adc_driver.s"

#include <io-avr.h>
#include <signal.h>
#include "myctoasm.inc"
#define BV(A) (1<<A)
/*
interrupt driven ADC conversion drivers.

Does continuous conversions of all 8 channels, starting with #7, then
decrementing to 0 and rolling over to 7 again.

53 cycles/interrupt. At 8mhz it is roughly 432/900*8 or ~6% load.

Uses a 1/64 clock. On an 8mhz machine each conversion takes roughly
100us for a total conversion time of ~.9ms or roughly 8% load.

*/

.lcomm adc_channel, 1 ; Internal: current channel number
; .global adc
.lcomm adc, 16 ; Results

.section .text.adcdriver
.func SIG_ADC
.global SIG_ADC

SIG_ADC:
push R28
in R28, SREG
push R28
push R30
push R31

ldi R30, lo8(adc)
ldi R31, hi8(adc)
lds R28, adc_channel

add R28, R28
add R30, R28
sbci R31, lo8(-0) ; Add channel # to index
in R28, ADCL
st Z+, R28 ; store ADC results little endien for C
in R28, ADCH
st Z, R28

lds R28, adc_channel
subi R28, 1 ; If < 0, then wrap to 7
brcc continue
ldi R28, lo8(7)
continue:
out ADMUX, R28
sts adc_channel, R28
sbi ADCSR, ADSC ; Get next channel results
pop R31
pop R30
pop R28
out SREG, R28
pop R28
reti
.endfunc

;
; void ADC_StartConversion(void)
;
; Initializes Channel to 7, then starts a conversion
; Enable the interrupt flag (never disabled afterwards)
;
.func ADC_Init
.global ADC_Init

ADC_Init:
ldi R24, BV(ADEN) | BV(ADSC) | BV(ADPS1) | BV(ADPS2)
out ADCSR, R24
1:
sbic ADCSR, ADSC ; Wait until dummy conversion done.
rjmp 1b

ldi R24, lo8(7)
sts adc_channel, R24
out ADMUX, R24
sbi ADCSR, ADSC
sbi ADCSR, ADIE
ret
.endfunc

/*
unsigned short ADC_Channel(unsigned char)

Atomic read of a word from the ADC data array
*/
.func ADC_Channel
.global ADC_Channel
ADC_Channel:
ldi R30, lo8(adc)
ldi R31, hi8(adc)
add p1b, p1b
add R30, p1b
sbci R31, -(0)
in R0, SREG
cli
ld R24, Z+
ld R25, Z
out SREG, R0
ret
.endfunc

------=_NextPart_000_0081_01C0C8CA.D6025540
Content-Type: application/octet-stream;
name="adc_driver.h"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="adc_driver.h"

#ifndef CHEADER_ADC
# define CHEADER_ADC

#include <io.h>
/*
Simplified ADC.

ADC_Init, initialized ADC hardware and starts background
interrupt driver that does continuous conversions placing
the result into the adc array

*/
extern uint16_t adc[8];

extern void ADC_Init(void);
extern int16_t ADC_Channel(uint8_t);

#endif // CHEADER_ADC

------=_NextPart_000_0081_01C0C8CA.D6025540--

From [email-masked] Fri Apr 20 07:17:57 2001
Received: from sttlpop2.sttl.uswest.net ([206.81.192.2])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14qJwD-0003hx-00
for <[email-masked]>; Fri, 20 Apr 2001 07:17:57 +1200
Received: (qmail 5269 invoked by alias); 19 Apr 2001 19:18:23 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 5212 invoked by uid 0); 19 Apr 2001 19:18:23 -0000
Received: from vdsl25.sttl.uswest.net (HELO larry) (216.160.108.25)
by sttlpop2.sttl.uswest.net with SMTP; 19 Apr 2001 19:18:23 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: =?iso-8859-1?Q?DECLERCQ_Fran=E7ois?= <[email-masked]>,
"AVR GCC List" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Using the 10bit ADC converter of an AT90S8535
Date: Thu, 19 Apr 2001 12:18:26 -0700
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0081_01C0C8CA.D6025540"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_0081_01C0C8CA.D6025540
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Note, I have never used the attached C code, but it is what I wrote before
converting it to assembly for my final project. It should work fine. At
least it compiles fine..

The second & third files is the assembly code that I do use. It does
continuous
conversion (very low overhead) and allows you to simply "read" the current
value. It converts all 8 channels although that would be easy to change.

Larry Barello
http://www.barello.net

----- Original Message -----
From: "DECLERCQ François" <[email-masked]>

>
> Hi!
> I'm a novice in C.
> Could Somebody tel me how have I to initialise the AD converter Data
> register to
> be able to copy it's value in an volatile uint16 temporary memory
>
> Thanks an best reguards
>
> DECLERCQ F.

------=_NextPart_000_0081_01C0C8CA.D6025540
Content-Type: application/octet-stream;
name="adcdriver.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="adcdriver.c"

#include <io.h>
#include "AvrX.h"

void ADC_Init(void)
{
outb(BV(ADEN) | BV(ADSC) | BV(ADPS1) | BV(ADPS2), ADCSR);
while (inp(ADCSR) & BV(ADSC));
}

uint16_t ADCReadChannel(uint8_t Channel)
{
outp(Channel, ADMUX);
outp(inp(ADCSR) | BV(ADSC), ADCSR);
while (inp(ADCSR) & BV(ADSC)); // Wait conversion done
return (__inw(ADCL));
}

------=_NextPart_000_0081_01C0C8CA.D6025540
Content-Type: application/octet-stream;
name="adc_driver.s"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="adc_driver.s"

#include <io-avr.h>
#include <signal.h>
#include "myctoasm.inc"
#define BV(A) (1<<A)
/*
interrupt driven ADC conversion drivers.

Does continuous conversions of all 8 channels, starting with #7, then
decrementing to 0 and rolling over to 7 again.

53 cycles/interrupt. At 8mhz it is roughly 432/900*8 or ~6% load.

Uses a 1/64 clock. On an 8mhz machine each conversion takes roughly
100us for a total conversion time of ~.9ms or roughly 8% load.

*/

.lcomm adc_channel, 1 ; Internal: current channel number
; .global adc
.lcomm adc, 16 ; Results

.section .text.adcdriver
.func SIG_ADC
.global SIG_ADC

SIG_ADC:
push R28
in R28, SREG
push R28
push R30
push R31

ldi R30, lo8(adc)
ldi R31, hi8(adc)
lds R28, adc_channel

add R28, R28
add R30, R28
sbci R31, lo8(-0) ; Add channel # to index
in R28, ADCL
st Z+, R28 ; store ADC results little endien for C
in R28, ADCH
st Z, R28

lds R28, adc_channel
subi R28, 1 ; If < 0, then wrap to 7
brcc continue
ldi R28, lo8(7)
continue:
out ADMUX, R28
sts adc_channel, R28
sbi ADCSR, ADSC ; Get next channel results
pop R31
pop R30
pop R28
out SREG, R28
pop R28
reti
.endfunc

;
; void ADC_StartConversion(void)
;
; Initializes Channel to 7, then starts a conversion
; Enable the interrupt flag (never disabled afterwards)
;
.func ADC_Init
.global ADC_Init

ADC_Init:
ldi R24, BV(ADEN) | BV(ADSC) | BV(ADPS1) | BV(ADPS2)
out ADCSR, R24
1:
sbic ADCSR, ADSC ; Wait until dummy conversion done.
rjmp 1b

ldi R24, lo8(7)
sts adc_channel, R24
out ADMUX, R24
sbi ADCSR, ADSC
sbi ADCSR, ADIE
ret
.endfunc

/*
unsigned short ADC_Channel(unsigned char)

Atomic read of a word from the ADC data array
*/
.func ADC_Channel
.global ADC_Channel
ADC_Channel:
ldi R30, lo8(adc)
ldi R31, hi8(adc)
add p1b, p1b
add R30, p1b
sbci R31, -(0)
in R0, SREG
cli
ld R24, Z+
ld R25, Z
out SREG, R0
ret
.endfunc

------=_NextPart_000_0081_01C0C8CA.D6025540
Content-Type: application/octet-stream;
name="adc_driver.h"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="adc_driver.h"

#ifndef CHEADER_ADC
# define CHEADER_ADC

#include <io.h>
/*
Simplified ADC.

ADC_Init, initialized ADC hardware and starts background
interrupt driver that does continuous conversions placing
the result into the adc array

*/
extern uint16_t adc[8];

extern void ADC_Init(void);
extern int16_t ADC_Channel(uint8_t);

#endif // CHEADER_ADC

------=_NextPart_000_0081_01C0C8CA.D6025540--

From [email-masked] Fri Apr 20 05:10:04 2001
Received: from moutvdom01.kundenserver.de ([195.20.224.200])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14qHwR-0003XW-00
for <[email-masked]>; Fri, 20 Apr 2001 05:10:04 +1200
Received: from [195.20.224.209] (helo=mrvdom02.schlund.de)
by moutvdom01.kundenserver.de with esmtp (Exim 2.12 #2)
id 14qHwr-0005SX-00
for [email-masked]; Thu, 19 Apr 2001 19:10:29 +0200
Received: from dialin233.pg1-nt.dusseldorf.nikoma.de ([213.54.96.233] helo=elmedgmbh.de)
by mrvdom02.schlund.de with esmtp (Exim 2.12 #2)
id 14qHwf-00072r-00
for [email-masked]; Thu, 19 Apr 2001 19:10:17 +0200
Received: from Spooler by elmedgmbh.de (Mercury/32 v3.21c) ID MO00001A;
19 Apr 01 19:14:04 +0200
Received: from spooler by elmedgmbh.de (Mercury/32 v3.21c); 19 Apr 01 19:13:36 +0200
From: "Eckhard Tikwinski" <[email-masked]>
Organization: ELMED GmbH
To: [email-masked]
Date: Thu, 19 Apr 2001 19:13:21 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Reply-to: [email-masked]
Priority: normal
X-mailer: Pegasus Mail for Win32 (v3.12bDE)
Message-Id: <[email-masked]>
Subject: [avr-gcc-list] optimzed division ?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi everyone,

is it a bug or is it a feature ?
I tried with gcc 2.97 and -O2:

int x;
x=0x7FFF;
x=x div 2; // will be optimized to shift

The generated code will increment x first if
positive. Then it does an arithmetic shift. For
x=0x7FFF the result will be 0xC000. Maybe this
was inteded to do some kind of rounding.

Thanks,

Eckhard Tikwinski
[email-masked]

From [email-masked] Fri Apr 20 06:19:40 2001
Received: from sax.sax.de ([193.175.26.33])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14qJ1n-0003b5-00
for <[email-masked]>; Fri, 20 Apr 2001 06:19:39 +1200
Received: (from uucp@localhost)
by sax.sax.de (8.9.3/8.9.3) with UUCP id UAA23524
for [email-masked]; Thu, 19 Apr 2001 20:20:00 +0200 (CEST)
Received: (from j@localhost)
by uriah.heep.sax.de (8.11.3/8.11.3) id f3JI5QR58220;
Thu, 19 Apr 2001 20:05:26 +0200 (MET DST)
(envelope-from j)
Date: Thu, 19 Apr 2001 20:05:26 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 0.9.8
References: <[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] How .weak?
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Kang Tin LAI <[email-masked]> writes:

> 1. .weak is AVR specific directive?

No, it's used to be able to provide overrides for library stubs.
IMHO, its need originated from constructors in C++.

> 2. .weak __init_mcucr__ will allocate a storage? Or just define
> a symbol?

IMHO it doesn't.

--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL

http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

From [email-masked] Sat Apr 21 02:18:46 2001
Received: from ftpbox.mot.com ([129.188.136.101])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14qbkD-0004Pb-00
for <[email-masked]>; Sat, 21 Apr 2001 02:18:45 +1200
Received: [from pobox2.mot.com (pobox2.mot.com [136.182.15.8]) by ftpbox.mot.com (ftpbox 2.1) with ESMTP id GAA23104 for <[email-masked]>; Fri, 20 Apr 2001 06:58:13 -0700 (MST)]
Received: [from il27exm07.cig.mot.com (IL27EXM07.cig.mot.com [136.182.15.116]) by pobox2.mot.com (MOT-pobox2 2.0) with ESMTP id GAA04162 for <[email-masked]>; Fri, 20 Apr 2001 06:58:13 -0700 (MST)]
Received: by IL27EXM07.cig.mot.com with Internet Mail Service (5.5.2653.19)
id <28RVKP5R>; Fri, 20 Apr 2001 08:58:04 -0500
Message-ID: <[email-masked]>
From: Sattler Chris-QA1406 <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Date: Fri, 20 Apr 2001 08:58:01 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain
Subject: [avr-gcc-list] Anyone have avr-gdb working on an STK300
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I've been trying for the last couple of days to getting avr/gdb working with
my stk300 and I'm not having a lot of success. I have built uisp-20010211,
avrmon-stk200-0.5.0 and the avr patched version of gdb. Uisp is working fine
with the -dstk200 option. When I run "mon localhost" I get:

mon: restarted. port:host = localhost:11111

When I then run avr-gdb I get:

GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=avr".
(gdb)

I then do a:

target avr localhost:11111

and get:

Server: connect from host 127.0.0.1, port 1032.
Timeout reading from remote system.

I have tried redefining the MISO, MOSI, and SCK pins in monitor.c to match
the PORT B pins used by the ATmega103, but with no luck.

Has anyone out there gotten this configuration to work?

From [email-masked] Sun Apr 22 03:40:20 2001
Received: from host2.bem-vindo.net ([209.239.40.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14qzUi-0005Mz-00
for <[email-masked]>; Sun, 22 Apr 2001 03:40:20 +1200
Received: from 200.251.250.42 (localhost [127.0.0.1])
by host2.bem-vindo.net (8.10.2/8.10.2) with ESMTP id f3LFetK06960
for <[email-masked]>; Sat, 21 Apr 2001 11:40:55 -0400
To: [email-masked]
From: "Francisco T. A. Silva" <[email-masked]>
Reply-To: [email-masked]
Date: Sat, 21 Apr 2001 12:41:10 -0300
X-Sender: [email-masked]
X-Originating-Host: 200.251.250.42 [200.251.250.42]; Sat, 21 Apr 2001 15:40:55 GMT
X-Mailer: Mailreader.com v2.3.21 (2000-7-19)
X-Browser: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; sao), JavaScript: On
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by host2.bem-vindo.net id f3LFetK06960
Subject: [avr-gcc-list] avr-gcc bug
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

I=B4ve come upon the following bug.

The code:

int main(void)
{
unsigned int i;
for(i =3D 31533; i > 0; i--);
}

The compiled code:

.file "bug.c"
.arch avr2
__SREG__ =3D 0x3f
__SP_H__ =3D 0x3e
__SP_L__ =3D 0x3d
__tmp_reg__ =3D 0
__zero_reg__ =3D 1
_PC_ =3D 2
; GNU C version 3.1 20010228 (experimental) (avr)
; compiled by GNU C version egcs-2.91.66 19990314/Linux (egcs-1.
1.2 release).
; options passed: -lang-c -D__GNUC__=3D3 -D__GNUC_MINOR__=3D1
; -D__GNUC_PATCHLEVEL__=3D0 -DAVR -D__AVR__ -D__AVR -D__OPTIMIZE_SIZE__
; -D__OPTIMIZE__ -D__STDC_HOSTED__=3D1 -D__AVR_ARCH__=3D2
; -D__SIZE_TYPE__=3Dunsigned int -D__PTRDIFF_TYPE__=3Dint -D__INT_MAX__=3D=
32767
; -Os -fverbose-asm
; options enabled: -fdefer-pop -fomit-frame-pointer
; -foptimize-sibling-calls -fcse-follow-jumps -fcse-skip-blocks
; -fexpensive-optimizations -fthread-jumps -fstrength-reduce -fpeephole
; -fforce-mem -ffunction-cse -finline -fkeep-static-consts -fcaller-
saves
; -freg-struct-return -fgcse -frerun-cse-after-loop -frerun-loop-opt
; -fdelete-null-pointer-checks -fsched-interblock -fsched-spec
; -fbranch-count-reg -fnew-exceptions -fsjlj-exceptions -freorder-
blocks
; -fcommon -fverbose-asm -fgnu-linker -fregmove -foptimize-register-
move
; -fargument-alias -fstrict-aliasing -fident -fpeephole2
; -fguess-branch-probability -fmath-errno -minit-stack=3D__stack=20
-mmcu=3Davr2

gcc2_compiled.:
.text
.global main
.type main,@function
main:
/* prologue: frame size=3D0 */
ldi r28,lo8(__stack - 0)
ldi r29,hi8(__stack - 0)
out __SP_H__,r29
out __SP_L__,r28
/* prologue end (size=3D4) */
ldi r24,lo8(31524) <<<<<<<<<<<<<<<<< wrong value (should be 31533)
ldi r25,hi8(31524)
.L5:
sbiw r24,12 <<<<<<<<<<<<<<<<< wrong (should be sbiw r24,1)
brne .L5
/* epilogue: frame size=3D0 */
__stop_progIi__:
rjmp __stop_progIi__
/* epilogue end (size=3D1) */
/* function main size 10 (5) */
.Lfe1:
.size main,.Lfe1-main
/* File bug.c: code 10 =3D 0x000a ( 5), prologues 4, epilogues=20
1 */

This bug apears with -Os, -O2, -O3. It seems from now on I=B4m restricted
to -O :(.

Regards,
--
Francisco

From [email-masked] Sun Apr 22 04:50:53 2001
Received: from mailgate3.cinetic.de ([212.227.116.80])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14r0ay-0005QT-00
for <[email-masked]>; Sun, 22 Apr 2001 04:50:52 +1200
Received: from cinetic.de (popeye.cinetic.de [194.122.194.100])
by mailgate3.cinetic.de (8.11.2/8.11.2/SuSE Linux 8.11.0-0.4) with SMTP id f3LGpSZ23367
for <[email-masked]>; Sat, 21 Apr 2001 18:51:28 +0200
Date: Sat, 21 Apr 2001 18:51:28 +0200
Message-Id: <[email-masked]>
MIME-Version: 1.0
Organization: http://freemail.web.de/
From: "Michael Redecke" <[email-masked]>
To: [email-masked]
Precedence: fm-user
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] region text is full !?!
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

hello there ! what does this mean =3F=20
greetings from the small island Sylt in the north of Germany, Michael
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F
Alles unter einem Dach: Informationen, Fun, E-Mails. Bei WEB.DE: http://we=
b.de
Die gro=DFe Welt der Kommunikation: E-Mail, Fax, SMS, WAP: http://freemail.w=
eb.de

From [email-masked] Sun Apr 22 06:04:17 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14r1jz-0005TZ-00
for <[email-masked]>; Sun, 22 Apr 2001 06:04:16 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.129])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA14918;
Sat, 21 Apr 2001 22:04:46 +0400
To: [email-masked]
Cc: [email-masked]
Subject: Re: [avr-gcc-list] avr-gcc bug
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 21 Apr 2001 21:58:11 +0400
In-Reply-To: "Francisco T. A. Silva"'s message of "Sat, 21 Apr 2001 12:41:10 -0300"
Message-ID: <[email-masked]>
Lines: 35
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Francisco T. A. Silva" <[email-masked]> writes:

> Hi all,
>
> I=B4ve come upon the following bug.
>
> The code:
>
> int main(void)
> {
> unsigned int i;
> for(i = 31533; i > 0; i--);
> }

[...]

>
> This bug apears with -Os, -O2, -O3. It seems from now on I=B4m restricted
> to -O :(.

It's not a bug.
GCC optimize dead loops. Really GCC can even remove such loops.

Try following code:

int foo (int);

int main(void)
{
unsigned int i;
for(i = 31533; i > 0; i--)
foo(i);
}

From [email-masked] Sun Apr 22 10:42:00 2001
Received: from sax.sax.de ([193.175.26.33])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14r64l-0007DR-00
for <[email-masked]>; Sun, 22 Apr 2001 10:41:59 +1200
Received: (from uucp@localhost)
by sax.sax.de (8.9.3/8.9.3) with UUCP id AAA24719
for [email-masked]; Sun, 22 Apr 2001 00:42:33 +0200 (CEST)
Received: (from j@localhost)
by uriah.heep.sax.de (8.11.3/8.11.3) id f3LMfs502710;
Sun, 22 Apr 2001 00:41:54 +0200 (MET DST)
(envelope-from j)
Date: Sun, 22 Apr 2001 00:41:54 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 0.9.8
References: <[email-masked]>
<[email-masked]>
From: [email-masked] (J Wunsch)
Reply-To: [email-masked]
Subject: Re: [avr-gcc-list] avr-gcc bug
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Denis Chertykov <[email-masked]> writes:

> It's not a bug.
> GCC optimize dead loops.

It is. Counting a wrong value can hardly be described as
`optimizing'. Either the loop is optimized out completely (but we've
been there, this is at least contradictionary to traditional gcc
behaviour which was IMHO intentional -- but sorry, i can't find the
reference for this in the gcc info files right now), or it is left
intact. Decrementing the loop counter by an arbitrary value can only
be described by the word `bug'.

--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL

http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

From [email-masked] Sun Apr 22 17:07:40 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14rC5y-0007Rb-00
for <[email-masked]>; Sun, 22 Apr 2001 17:07:39 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.154])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id JAA21643;
Sun, 22 Apr 2001 09:08:07 +0400
To: [email-masked]
Cc: [email-masked]
Subject: Re: [avr-gcc-list] avr-gcc bug
References: <[email-masked]> <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 22 Apr 2001 09:01:31 +0400
In-Reply-To: [email-masked]'s message of "Sun, 22 Apr 2001 00:41:54 +0200 (MET DST)"
Message-ID: <[email-masked]>
Lines: 17
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

[email-masked] (J Wunsch) writes:

> Denis Chertykov <[email-masked]> writes:
>
> > It's not a bug.
> > GCC optimize dead loops.
>
> It is. Counting a wrong value can hardly be described as
> `optimizing'. Either the loop is optimized out completely (but we've
> been there, this is at least contradictionary to traditional gcc
> behaviour which was IMHO intentional -- but sorry, i can't find the
> reference for this in the gcc info files right now), or it is left
> intact. Decrementing the loop counter by an arbitrary value can only
> be described by the word `bug'.

Send your question to [email-masked].
If you want to know more about loops optimizing,

From [email-masked] Mon Apr 23 02:26:36 2001
Received: from mailgate3.cinetic.de ([212.227.116.80])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14rKos-0007mY-00
for <[email-masked]>; Mon, 23 Apr 2001 02:26:35 +1200
Received: from cinetic.de (popeye.cinetic.de [194.122.194.100])
by mailgate3.cinetic.de (8.11.2/8.11.2/SuSE Linux 8.11.0-0.4) with SMTP id f3MERCZ13093
for <[email-masked]>; Sun, 22 Apr 2001 16:27:12 +0200
Date: Sun, 22 Apr 2001 16:27:12 +0200
Message-Id: <[email-masked]>
MIME-Version: 1.0
Organization: http://freemail.web.de/
From: "Michael Redecke" <[email-masked]>
To: [email-masked]
Precedence: fm-user
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] ld: region text is full ? ?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

hello there !
i just saw that my first posting did not arrive correctly to this list.
So, again my question:

what does this error message mean: "region text full" =3F=3F=3F
it concerns the AT90S4433.
must i reduce the number of functions =3F or number of source code lines =3F
i think that i am not using to many variables or memory.

greetings from Michael (Sylt island) , DF1OX

=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F
Alles unter einem Dach: Informationen, Fun, E-Mails. Bei WEB.DE: http://we=
b.de
Die gro=DFe Welt der Kommunikation: E-Mail, Fax, SMS, WAP: http://freemail.w=
eb.de

From [email-masked] Mon Apr 23 03:11:11 2001
Received: from sttlpop4.sttl.uswest.net ([206.81.192.4])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14rLW2-0007oj-00
for <[email-masked]>; Mon, 23 Apr 2001 03:11:11 +1200
Received: (qmail 93606 invoked by alias); 22 Apr 2001 15:11:21 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 93595 invoked by uid 0); 22 Apr 2001 15:11:20 -0000
Received: from vdsl25.sttl.uswest.net (HELO larry) (216.160.108.25)
by sttlpop4.sttl.uswest.net with SMTP; 22 Apr 2001 15:11:20 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "Michael Redecke" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] ld: region text is full ? ?
Date: Sun, 22 Apr 2001 08:05:25 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

The message means that one or more of your memory segments (flash, eeprom,
sram) is full.

Look at your link output to determine what is going on. I would guess that
you simply have more than 4k of code...

Here are the flags I use in my makefile, to produce a map

LDFLAGS = -Wl,-lm,-Map=$(<:.o=.map),--cref,-v,--sort-common

foo.elf: $(OBJ) $(LIB)
$(CC) $(LDFLAGS) $(OBJ) $(LIB) -mcu=$(MCU) -o $@

----- Original Message -----
From: "Michael Redecke" <[email-masked]>

hello there !
i just saw that my first posting did not arrive correctly to this list.
So, again my question:

what does this error message mean: "region text full" ???
it concerns the AT90S4433.
must i reduce the number of functions ? or number of source code lines ?
i think that i am not using to many variables or memory.

greetings from Michael (Sylt island) , DF1OX

From [email-masked] Mon Apr 23 06:01:17 2001
Received: from sttlpop4.sttl.uswest.net ([206.81.192.4])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14rOAf-0007vi-00
for <[email-masked]>; Mon, 23 Apr 2001 06:01:17 +1200
Received: (qmail 77013 invoked by alias); 22 Apr 2001 18:01:28 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 77008 invoked by uid 0); 22 Apr 2001 18:01:28 -0000
Received: from vdsl25.sttl.uswest.net (HELO larry) (216.160.108.25)
by sttlpop4.sttl.uswest.net with SMTP; 22 Apr 2001 18:01:28 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
Date: Sun, 22 Apr 2001 10:55:00 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] GCC loop optimization and volatile data question
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

When using variable to communicate between interrupt handlers and C code,
one needs to use the 'volatile' keyword so GCC doesn't optimize reading the
variable outside of any loops.

If the variable is "extern", does one still need to declare it volatile?

If the usage is thus:

extern int some_external_variable;
...
while (...)
{
...
if (some_external_variable == 0)
break;
}

do I need to declare 'some_external_variable' as volatile?

Thanks!

From [email-masked] Sun Apr 22 22:51:38 2001
Received: from plato.exmail.de ([194.97.6.205] ident=wdd)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14rHSr-0007eM-00
for <[email-masked]>; Sun, 22 Apr 2001 22:51:37 +1200
Received: (qmail 9877 invoked from network); 22 Apr 2001 10:52:08 -0000
Received: from affcc.pppool.de (HELO touch.rotters.de) (213.6.255.204)
by plato.exmail.de with SMTP; 22 Apr 2001 10:52:08 -0000
Received: (from rotter@localhost)
by touch.rotters.de (8.10.2/8.10.2/SuSE Linux 8.10.0-0.3) id f3M9uX501565;
Sun, 22 Apr 2001 11:56:33 +0200
Date: Sun, 22 Apr 2001 11:56:33 +0200
From: Klaus Rotter <[email-masked]>
To: "Francisco T. A. Silva" <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] avr-gcc bug
Message-ID: <20010422115633.A1514@touch>
Reply-To: [email-masked]
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Sat, Apr 21, 2001 at 12:41:10PM -0300
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Sat, Apr 21, 2001 at 12:41:10PM -0300, Francisco T. A. Silva wrote:
> int main(void)
> {
> unsigned int i;
> for(i = 31533; i > 0; i--);
> }

I can verify this with an older version of avr-gcc
(gcc version 2.97 20010108 (experimental)). A much older version of avr-gcc
(2.95.2) behaves like you expected. If you want dead loops (e.g. for delay
lines), a possible solution may be to use volatile variables:

int main(void)
{
volatile unsigned int i;
for(i = 31533; i > 0; i--);
} > avr-gcc-list mailing list

Then you get what you expect (even with -O3):

avr-gcc -O3 -S t.c

[...]
ldi r24,lo8(31533)
ldi r25,hi8(31533)
std Y+1,r24
std Y+2,r25
.L5:
sbiw r24,3
brne .L5
[...]

--
Klaus Rotter * [email-masked]

From [email-masked] Mon Apr 23 09:16:41 2001
Received: from sax.sax.de ([193.175.26.33])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14rRDk-00087j-00
for <[email-masked]>; Mon, 23 Apr 2001 09:16:40 +1200
Received: (from uucp@localhost)
by sax.sax.de (8.9.3/8.9.3) with UUCP id XAA29230
for [email-masked]; Sun, 22 Apr 2001 23:17:20 +0200 (CEST)
Received: (from j@localhost)
by uriah.heep.sax.de (8.11.3/8.11.3) id f3ML5ck02208;
Sun, 22 Apr 2001 23:05:38 +0200 (MET DST)
(envelope-from j)
Date: Sun, 22 Apr 2001 23:05:38 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 0.9.8
References: <[email-masked]>
From: [email-masked] (J Wunsch)
Reply-To: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] GCC loop optimization and volatile data question
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Larry Barello" <[email-masked]> writes:

> extern int some_external_variable;
> ...
> while (...)
> {
> ...
> if (some_external_variable == 0)
> break;
> }
>
> do I need to declare 'some_external_variable' as volatile?

Sure. Linkage classes are totally irrelevant for optimization
considerations (which is why you need `volatile').

--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL

http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

From [email-masked] Mon Apr 23 10:56:02 2001
Received: from vita.hk.net
([152.101.101.101] helo=hk.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14rSlt-0008CE-00
for <[email-masked]>; Mon, 23 Apr 2001 10:56:02 +1200
Received: from hk.net (p58.tnt.hk.net [202.66.202.58])
by hk.net (8.9.1/8.9.1) with ESMTP id GAA11363
for <[email-masked]>; Mon, 23 Apr 2001 06:56:37 +0800 (HKT)
Message-ID: <[email-masked]>
Date: Mon, 23 Apr 2001 06:50:01 +0800
From: Kang Tin LAI <[email-masked]>
Organization: Solar System
X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 i86pc)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Subject: Re: [avr-gcc-list] GCC loop optimization and volatile data question
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

Code size is a concern for this type of uC, so it has to turn on the
optimizer. I have done a couple of tests, looked at the asm generated,
finally I found that I need to spend more time to undertstand the
characteristic of the optimizer. I can found any other doc or text
information about the optimizer, just only 3 pages in GCC doc.

KTL

J Wunsch wrote:
>
> "Larry Barello" <[email-masked]> writes:
>
> > extern int some_external_variable;
> > ...
> > while (...)
> > {
> > ...
> > if (some_external_variable == 0)
> > break;
> > }
> >
> > do I need to declare 'some_external_variable' as volatile?
>
> Sure. Linkage classes are totally irrelevant for optimization
> considerations (which is why you need `volatile').
>
> --
> cheers, J"org .-.-. --... ...-- -.. . DL8DTL
>
> http://www.sax.de/~joerg/ NIC: JW11-RIPE
> Never trust an operating system you don't have sources for. ;-)
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Tue Apr 24 05:37:58 2001
Received: from mx02.nexgo.de ([151.189.8.97])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14rkHe-0000Pw-00
for <[email-masked]>; Tue, 24 Apr 2001 05:37:58 +1200
Received: from kleinertiga.local (dusdi5-212-144-204-171.arcor-ip.net [212.144.204.171])
by mx02.nexgo.de (Postfix) with ESMTP
id 7FC4D85884; Mon, 23 Apr 2001 19:38:42 +0200 (CEST)
Received: from gmx.de (localhost [127.0.0.1])
by kleinertiga.local (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id f3NHYEM01549;
Mon, 23 Apr 2001 19:34:19 +0200
X-Authentication-Warning: kleinertiga.local: Host localhost [127.0.0.1] claimed to be gmx.de
Message-ID: <[email-masked]>
Date: Mon, 23 Apr 2001 19:34:14 +0200
From: rudolph <[email-masked]>
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked], [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] avr-gcc is not able to run assembler macros new syntax?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

I have some old macros defined in old assembler files which i compile
with
the avr-gcc -xassembler-with-cpp comand.

In the the new version i got that works no more!

The source:

...

WriteDataByte: NOP
RET

#define maintmp r18
.macro send befehl <<< macro.s xx: unexpected end of
file in macro definition
ldi maintmp, \befehl+0x80
rcall WriteDataByte
ldi maintmp, \befehl+0x80
rcall WriteDataByte
.endmacro

There are any syntax changes?

Thank
Klaus

From [email-masked] Tue Apr 24 06:07:16 2001
Received: from mx03.nexgo.de ([151.189.8.98])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14rkjz-0000RV-00
for <[email-masked]>; Tue, 24 Apr 2001 06:07:15 +1200
Received: from kleinertiga.local (unknown [145.253.137.118])
by mx03.nexgo.de (Postfix) with ESMTP
id 5079418142; Mon, 23 Apr 2001 20:07:59 +0200 (CEST)
Received: from gmx.de (localhost [127.0.0.1])
by kleinertiga.local (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id f3NI3RM01872;
Mon, 23 Apr 2001 20:03:32 +0200
X-Authentication-Warning: kleinertiga.local: Host localhost [127.0.0.1] claimed to be gmx.de
Message-ID: <[email-masked]>
Date: Mon, 23 Apr 2001 20:03:27 +0200
From: rudolph <[email-masked]>
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked], [email-masked]
Subject: Re: [avr-gcc-list] avr-gcc is not able to run assembler macros new
syntax?
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

rudolph wrote:
>
> Hi all,
>
> I have some old macros defined in old assembler files which i compile
> with
> the avr-gcc -xassembler-with-cpp comand.
>
> In the the new version i got that works no more!
>
> The source:
>
> ...
>
> WriteDataByte: NOP
> RET
>
> #define maintmp r18
> .macro send befehl <<< macro.s xx: unexpected end of
> file in macro definition
> ldi maintmp, \befehl+0x80
> rcall WriteDataByte
> ldi maintmp, \befehl+0x80
> rcall WriteDataByte
> .endmacro
>
> There are any syntax changes?
>
> Thank
> Klaus
>

Sorry, my verion-info is missing:

The old version of gcc was 2.95.2
the new one which make the problems is: 3.1 20010228

Thanks

Klaus
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Tue Apr 24 21:52:40 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14rzUs-00015q-00
for <[email-masked]>; Tue, 24 Apr 2001 21:52:39 +1200
Received: from oTRIs.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id LAA30357
for <[email-masked]>; Tue, 24 Apr 2001 11:53:19 +0200
Message-ID: <[email-masked]>
Date: Tue, 24 Apr 2001 11:57:57 +0200
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] New Binaries available
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I have done a complete build of the current CVS binutils and gcc. Also I
found a newer Version of the avr-libc, which includes my changes to the
makefile (thanks Marek).

The avrobj-support is compiled in.

I used the binaries to do the build of avr-libc, there was no further
testing.

The binaries are available as:
http://www.combio.de/avr/avrgcc-2001.04.23-mingw32.tar.gz
http://www.combio.de/avr/avrbinutils-2001.04.23-mingw32.tar.gz
http://www.combio.de/avr/avr-libc-20010331-wininstall.tar.gz

Please report to me, whether they are OK.
I will update my download page then.
Due to limited space on my webserver I have to remove the older
versions.

Greetings
Gunnar

From [email-masked] Wed Apr 25 00:35:23 2001
Received: from sitemail.everyone.net ([216.200.145.35] helo=omta04.mta.everyone.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14s22N-0001D8-00
for <[email-masked]>; Wed, 25 Apr 2001 00:35:23 +1200
Received: from sitemail.everyone.net (reports [216.200.145.62])
by omta04.mta.everyone.net (Postfix) with ESMTP id F3AFE4FDF6
for <[email-masked]>; Tue, 24 Apr 2001 05:36:12 -0700 (PDT)
Received: by sitemail.everyone.net (Postfix, from userid 99)
id 96F6F36F9; Tue, 24 Apr 2001 05:36:12 -0700 (PDT)
Content-Type: text/plain
Content-Disposition: inline
Mime-Version: 1.0
X-Mailer: MIME-tools 4.104 (Entity 4.117)
Date: Tue, 24 Apr 2001 05:36:12 -0700 (PDT)
From: Molnar Zoltan <[email-masked]>
To: [email-masked]
Reply-To: [email-masked]
X-Originating-Ip: [194.177.32.67]
Message-Id: <[email-masked]>
Subject: [avr-gcc-list] Please help with "section .bss is not within region data" error
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi!
I'm wondering if anybody has seen this problem:
I have the following type declaration:
#define FIFOlgth 2048
typedef struct {
u16 min,max,o,f;
bool isfull;
u08 data[FIFOlgth];
} t_fifo;
The problem is if I want to declare a global variable like this:
t_fifo fifo;
int main (void)
{
....
}

The make process returns with error (I enclose the compile/link flags too):

avr-gcc -c -g -O2 -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst -mmcu=at90s8515 -I. test.c -o test.o
avr-gcc test.o -Wl,-Map=test.map,--cref -mmcu=at90s8515 -o test.elf
D:\AVRGCC\BIN\..\lib\gcc-lib\avr\2.95.2\..\..\..\..\avr\bin\ld.exe: address 0x869 of test.elf section .bss is not within region data
make: *** [test.elf] Error 1
If I put the declaration in the main function like this:
int main (void)
{
t_fifo fifo;
....
}
it compiles OK.
I need the variable to be global, I have to access it from interrupts.
----------------
How can I initialize the stack pointer and MCUCR at compile time?
I have read something about --defsym but I don't know where to put and how. In the compiler flags or the linker flags?
What's the syntax using --defsym
Any help would be welcomed
Thanks
PS: I'm using avr-gcc 2.95, but I tryed with 2.97, 3.1 with the same result.

_____________________________________________________________
Are you a Techie? Get Your Free Tech Email Address Now! Visit http://www.TechEmail.com

From [email-masked] Wed Apr 25 01:16:53 2001
Received: from hertz.ikp.physik.tu-darmstadt.de ([130.83.24.91])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14s2gW-0001FD-00
for <[email-masked]>; Wed, 25 Apr 2001 01:16:53 +1200
Received: (from bon@localhost)
by hertz.ikp.physik.tu-darmstadt.de (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) id f3ODHbG01418;
Tue, 24 Apr 2001 15:17:37 +0200
X-Authentication-Warning: hertz.ikp.physik.tu-darmstadt.de: bon set sender to [email-masked] using -f
From: Uwe Bonnes <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <[email-masked]>
Date: Tue, 24 Apr 2001 15:17:37 +0200
To: [email-masked]
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Please help with "section .bss is not within region data" error
In-Reply-To: <[email-masked]>
References: <[email-masked]>
X-Mailer: VM 6.90 under Emacs 20.7.1
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>>>>> "Molnar" == Molnar Zoltan <[email-masked]> writes:

Molnar> Hi! I'm wondering if anybody has seen this problem: I have the
Molnar> following type declaration: #define FIFOlgth 2048 typedef struct
Molnar> { u16 min,max,o,f; bool isfull; u08 data[FIFOlgth]; } t_fifo;
Molnar> The problem is if I want to declare a global variable like this:
Molnar> t_fifo fifo; int main (void) { .... }

Do you have external ram? The chip itself has only limited ram and only
ATMEGA103 has more than 2048 bytes. So it si too small.

Molnar> The make process returns with error (I enclose the compile/link
Molnar> flags too):

...
Molnar> make: *** [test.elf] Error 1 If I put the declaration in the
Molnar> main function like this: int main (void) { t_fifo fifo; .... }
Molnar> it compiles OK.

Defining the variable inside a function makes a stack variable. Obviously
the stack isn't checked, and so corruption would be silent, as there isn't
enough room...

If you have external ram, place the varialle at the start of available
external ram (remember that the internal ram and the ports also use address
space in ram) like

t_fifo fifo = 0x1000;

Bye
--
Uwe Bonnes [email-masked]

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

From [email-masked] Wed Apr 25 02:37:06 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14s3w9-0001Ij-00
for <[email-masked]>; Wed, 25 Apr 2001 02:37:05 +1200
Received: from oTRIs.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id QAA15795
for <[email-masked]>; Tue, 24 Apr 2001 16:37:53 +0200
Message-ID: <[email-masked]>
Date: Tue, 24 Apr 2001 16:42:31 +0200
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Re: New Binaries available
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Larry,

Larry Barello schrieb:
>
> Gunnar: the loader seems to have a problem... The link script hasn't
> changed. The offending line is OUTPUT_ARCH(avr:2)

OK, please stop trying my binaries, I will build new ones from CVS in a
few days and hope the loader is then corrected.

Greetings

Gunnar

From [email-masked] Wed Apr 25 02:37:28 2001
Received: from vita.hk.net
([152.101.101.101] helo=hk.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14s3wV-0001Iq-00
for <[email-masked]>; Wed, 25 Apr 2001 02:37:27 +1200
Received: from hk.net (p40.tnt.hk.net [202.66.202.40])
by hk.net (8.9.1/8.9.1) with ESMTP id WAA03803
for <[email-masked]>; Tue, 24 Apr 2001 22:38:10 +0800 (HKT)
Message-ID: <[email-masked]>
Date: Tue, 24 Apr 2001 22:31:27 +0800
From: Kang Tin LAI <[email-masked]>
Organization: Solar System
X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 i86pc)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Subject: Re: [avr-gcc-list] Please help with "section .bss is not within region
data" error
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

Check the file gcrt1.S in libc sources, there is a description telling
you how to setup the MCUCR and WDTCR before jumping to main() - your
code.

For 8515, there are only 2 control registers - MCUCR and WDTCR
available for you to setup at link time, add linker flags as follows:

--defsym __init_mcucr__=0xc0
--defsym __init_wdtcr__=0x00 --defsym __stack=0x7fff

For my __init_mcucr__, 0xc0 = enable external SRAM and 1 wait state.
(1 wait state is for my slow response memory mapped LCD, if SRAM only,
0 wait state should not be a problem for "modern" SRAM, i.e 0x80)

Cheers!

KTL

Molnar Zoltan wrote:
>
> Hi!
> I'm wondering if anybody has seen this problem:
> I have the following type declaration:
> #define FIFOlgth 2048
> typedef struct {
> u16 min,max,o,f;
> bool isfull;
> u08 data[FIFOlgth];
> } t_fifo;
> The problem is if I want to declare a global variable like this:
> t_fifo fifo;
> int main (void)
> {
> ....
> }
>
> The make process returns with error (I enclose the compile/link flags too):
>
> avr-gcc -c -g -O2 -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst -mmcu=at90s8515 -I. test.c -o test.o
> avr-gcc test.o -Wl,-Map=test.map,--cref -mmcu=at90s8515 -o test.elf
> D:\AVRGCC\BIN\..\lib\gcc-lib\avr\2.95.2\..\..\..\..\avr\bin\ld.exe: address 0x869 of test.elf section .bss is not within region data
> make: *** [test.elf] Error 1
> If I put the declaration in the main function like this:
> int main (void)
> {
> t_fifo fifo;
> ....
> }
> it compiles OK.
> I need the variable to be global, I have to access it from interrupts.
> ----------------
> How can I initialize the stack pointer and MCUCR at compile time?
> I have read something about --defsym but I don't know where to put and how. In the compiler flags or the linker flags?
> What's the syntax using --defsym
> Any help would be welcomed
> Thanks
> PS: I'm using avr-gcc 2.95, but I tryed with 2.97, 3.1 with the same result.
>
> _____________________________________________________________
> Are you a Techie? Get Your Free Tech Email Address Now! Visit http://www.TechEmail.com
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Thu Apr 26 08:39:23 2001
Received: from [192.199.8.23] (helo=newsmtp2.atmel.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14sW4I-0002dK-00
for <[email-masked]>; Thu, 26 Apr 2001 08:39:22 +1200
Received: from hermes.sjo.atmel.com (newhermes [10.64.0.105])
by newsmtp2.atmel.com (8.9.3+Sun/8.9.1) with ESMTP id NAA17949
for <[email-masked]>; Wed, 25 Apr 2001 13:35:44 -0700 (PDT)
Received: from helium.sjo.atmel.com (helium [10.64.0.108])
by hermes.sjo.atmel.com (8.9.1b+Sun/8.9.1) with ESMTP id NAA00950
for <[email-masked]>; Wed, 25 Apr 2001 13:35:56 -0700 (PDT)
Received: from attglobal.net by helium.sjo.atmel.com (8.8.8+Sun/SMI-SVR4)
id NAA16832; Wed, 25 Apr 2001 13:39:36 -0700 (PDT)
Message-ID: <[email-masked]>
Date: Wed, 25 Apr 2001 13:41:51 -0700
From: Francois Lorrain <[email-masked]>
X-Mailer: Mozilla 4.77 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Problem with Library building with latest CVS GCC
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I am trying to build the latest AVR - GCC / Binutils / AVR lib from the
CVS repositories.

I know this is work in progress but I keep running into the same issue
...

Configure / make / make install for binutils : no problem
Configure / make : fails with the following error :

The error happens when GCC is trying to build the library for the AVR,
the as program just core dumps ...

a little gdb session (below) shows that the error happens in line 1813
in config.c (gas/symbols.c)

I am stuck here, anybody got an idea ?

Here is the gcc command (with -v -save-temp parameters added)

[gcc]$ /home/florrain/linux-avr/gcc/gcc/xgcc
-B/home/florrain/linux-avr/gcc/gcc/ -B/usr/local/avr/bin/
-B/usr/local/avr/lib/ -isystem /usr/local/avr/include -O2
-DCROSS_COMPILE -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -isystem ./include -DDF=SF -Dinhibit_libc
-mcall-prologues -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
-Dinhibit_libc -I. -I. -I. -I./. -I./config -I./../include -DL_divmodhi4
-xassembler-with-cpp -save-temps -v -c ./config/avr/libgcc.S -o
libgcc/./_divmodhi4.o
Reading specs from /home/florrain/linux-avr/gcc/gcc/specs
Configured with: ./configure --host=i686-pc-linux-gnu --disable-nls
--enable-languages=c --target=avr : (reconfigured) : (reconfigured) :
(reconfigured) : (reconfigured) : (reconfigured)
gcc version 3.1 20010425 (experimental)
/home/florrain/linux-avr/gcc/gcc/cpp0 -lang-asm -v -I. -I. -I. -I./.
-I./config -I./../include -iprefix
/home/florrain/linux-avr/gcc/gcc/../lib/gcc-lib/avr/3.1/ -isystem
/home/florrain/linux-avr/gcc/gcc/include -isystem
/usr/local/avr/bin/include -isystem /usr/local/avr/lib/include
-D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=0 -DAVR -D__AVR__
-D__AVR -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -D__AVR_ARCH__=2
-D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int -D__INT_MAX__=32767
-DCROSS_COMPILE -DIN_GCC -DDF=SF -Dinhibit_libc -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -DL_divmodhi4 -isystem
/usr/local/avr/include -isystem ./include ./config/avr/libgcc.S -o
libgcc.s
ignoring nonexistent directory "/usr/local/avr/bin/include"
ignoring nonexistent directory "/usr/local/avr/lib/include"
ignoring nonexistent directory "/usr/local/avr/include"
GNU CPP version 3.1 20010425 (experimental) (cpplib) (GNU assembler
syntax)
ignoring nonexistent directory
"/home/florrain/linux-avr/gcc/lib/gcc-lib/avr/3.1/include"
ignoring nonexistent directory
"/home/florrain/linux-avr/gcc/lib/gcc-lib/avr/3.1/../../../../avr/sys-include"

ignoring nonexistent directory
"/home/florrain/linux-avr/gcc/lib/gcc-lib/avr/3.1/../../../../avr/include"

ignoring nonexistent directory "/usr/local/lib/gcc-lib/avr/3.1/include"
ignoring nonexistent directory
"/usr/local/lib/gcc-lib/avr/3.1/../../../../avr/sys-include"
ignoring nonexistent directory
"/usr/local/lib/gcc-lib/avr/3.1/../../../../avr/include"
ignoring duplicate directory "."
ignoring duplicate directory "."
ignoring duplicate directory "."
ignoring duplicate directory "include"
#include "..." search starts here:
#include <...> search starts here:
.
config
../include
/home/florrain/linux-avr/gcc/gcc/include
End of search list.
/usr/local/avr/bin/as -o libgcc/./_divmodhi4.o libgcc.s
xgcc: Internal error: Segmentation fault (program as)
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Here is the GDB output :

[gcc]$ gdb /usr/local/avr/bin/as
GNU gdb 5.0rh-5 Red Hat Linux 7.1
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...
Breakpoint 1 at 0x8049324
.gdbinit:3: Error in sourced command file:
./gdbinit.in:92: Error in sourced command file:
Function "fancy_abort" not defined.
(gdb) set args -o libgcc/./_divmodhi4.o libgcc.s
(gdb) r
Starting program: /usr/local/avr/bin/as -o libgcc/./_divmodhi4.o
libgcc.s
Breakpoint 1 at 0x400521b8: file exit.c, line 40.

Program received signal SIGSEGV, Segmentation fault.
S_SET_SEGMENT (s=0x80ad6bc, seg=0x0) at symbols.c:1813
1813 s->bsym->section = seg;
(gdb) l 1800
1795
1796 if (LOCAL_SYMBOL_CHECK (s))
1797 {
1798 if (seg == reg_section)
1799 s = local_symbol_convert ((struct local_symbol *) s);
1800 else
1801 {
1802 ((struct local_symbol *) s)->lsy_section = seg;
1803 return;
1804 }
(gdb)
1805 }
1806
1807 if (s->bsym->flags & BSF_SECTION_SYM)
1808 {
1809 if (s->bsym->section != seg)
1810 abort ();
1811 }
1812 else
1813 s->bsym->section = seg;
1814 }
(gdb)

Regards

Francois Lorrain

From [email-masked] Thu Apr 26 10:08:46 2001
Received: from mtiwmhc26.worldnet.att.net ([204.127.131.51])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14sXSo-0002hr-00
for <[email-masked]>; Thu, 26 Apr 2001 10:08:46 +1200
Received: from jimanji ([12.93.208.131]) by mtiwmhc26.worldnet.att.net
(InterMail vM.4.01.03.16 201-229-121-116-20010115) with SMTP
id <20010425220910.ZAWF2578.mtiwmhc26.worldnet.att.net@jimanji>
for <[email-masked]>; Wed, 25 Apr 2001 22:09:10 +0000
Message-ID: <[email-masked]>
Reply-To: "Jim Pearce" <[email-masked]>
From: "Jim Pearce" <[email-masked]>
To: <[email-masked]>
Date: Wed, 25 Apr 2001 18:09:10 -0300
Organization: Pegasus Technologies
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] AVC-GCC Versions
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I am a bit confused about the status of the current avr-gcc versions (especially the mingw32 binaries). I have

avrgcc-3.4.2001.mingw32.tar.gz
avr-binutils-2001.02.28.mingw32.tar.gz

Is it necessary to do a make or run an install after I unzip the avrgcc file? (I am using the default directory structure)

I thought everything was OK until I included the dreaded itoa function in my code. I am getting the linker error (undefined
_udivhi3) that was supposedly fixed long ago so I am wondering if I really have the new stuff where it is supposed to be.

On a related note, is there documentation that concisely explains how the libraries are built, searched by the linker, installed,
etc?

Thanks all!

Jim

From [email-masked] Thu Apr 26 10:18:08 2001
Received: from [192.199.8.23] (helo=newsmtp2.atmel.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14sXbr-0002iX-00
for <[email-masked]>; Thu, 26 Apr 2001 10:18:07 +1200
Received: from hermes.sjo.atmel.com (newhermes [10.64.0.105])
by newsmtp2.atmel.com (8.9.3+Sun/8.9.1) with ESMTP id PAA20610
for <[email-masked]>; Wed, 25 Apr 2001 15:14:30 -0700 (PDT)
Received: from helium.sjo.atmel.com (helium [10.64.0.108])
by hermes.sjo.atmel.com (8.9.1b+Sun/8.9.1) with ESMTP id PAA09395
for <[email-masked]>; Wed, 25 Apr 2001 15:14:43 -0700 (PDT)
Received: from attglobal.net by helium.sjo.atmel.com (8.8.8+Sun/SMI-SVR4)
id PAA05682; Wed, 25 Apr 2001 15:18:21 -0700 (PDT)
Message-ID: <[email-masked]>
Date: Wed, 25 Apr 2001 15:20:36 -0700
From: Francois Lorrain <[email-masked]>
X-Mailer: Mozilla 4.77 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Follow up : Problem with Library building with latest CVS GCC
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

Following my last message, one more bit of information : the backtrace
from gdb when the execption occurs ...

(gdb) bt
#0 S_SET_SEGMENT (s=0x80ad6bc, seg=0x0) at symbols.c:1813
#1 0x0805b222 in resolve_symbol_value (symp=0x80ad6bc, finalize=2) at
symbols.c:1157
#2 0x0805ddbc in write_object_file () at write.c:1953
#3 0x0804b350 in main (argc=2, argv=0x809e390) at as.c:909
#4 0x4003e177 in __libc_start_main (main=0x804b1b0 <main>, argc=4,
ubp_av=0xbffffacc,
init=0x8048f7c <_init>, fini=0x8083b20 <_fini>, rtld_fini=0x4000e184
<_dl_fini>,
stack_end=0xbffffabc) at ../sysdeps/generic/libc-start.c:129

Regards
--
Francois Lorrain

From [email-masked] Thu Apr 26 18:17:12 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14sf5T-00030o-00
for <[email-masked]>; Thu, 26 Apr 2001 18:17:11 +1200
Received: from oTRIs.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id IAA15193
for <[email-masked]>; Thu, 26 Apr 2001 08:18:00 +0200
Message-ID: <[email-masked]>
Date: Thu, 26 Apr 2001 08:22:39 +0200
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Re: AVC-GCC Versions
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Jim,

Jim Pearce wrote:
>
> I am a bit confused about the status of the current avr-gcc versions (especially the mingw32 binaries). I have
>
> avrgcc-3.4.2001.mingw32.tar.gz
> avr-binutils-2001.02.28.mingw32.tar.gz
>
> Is it necessary to do a make or run an install after I unzip the avrgcc file? (I am using the default directory structure)

No, these versions worked fine, as Larry Barello tested. You just have
to unpack them in an arbitrary directory (both in the same). You need to
recompile the avr-libc for AvrStudio to work. This is achived by running
the install.exe program.

Greetings

Gunnar

From [email-masked] Fri Apr 27 03:15:54 2001
Received: from penguin.nebnet.net ([207.32.36.253] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14snUm-0003KX-00
for <[email-masked]>; Fri, 27 Apr 2001 03:15:53 +1200
Received: from musunco (pm1s112.nebnet.net [207.32.36.112])
by penguin.nebnet.net (8.11.0/8.11.0) with SMTP id f3QFGiM32582
for <[email-masked]>; Thu, 26 Apr 2001 09:16:45 -0600
From: "Marlin Unruh" <[email-masked]>
To: <[email-masked]>
Date: Thu, 26 Apr 2001 09:19:25 -0600
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Importance: Normal
Subject: [avr-gcc-list] PORT access
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I am using CAN-bus with two MCUs, one is an 8515 and the other is an 8535. I
would like be able to modify a port using the following example;

1: void Modify_Port(u08 address, u08 mask, u08 data)
2: {
3: u08 tmp;
4: tmp = inp(address); // place port reading in tmp
5: tmp &= ~mask;
6: tmp |= (data & mask);
7: outb(tmp, address);
8: }

I made up this example to demonstrate what I am wanting to do. Is there a
way? This does not work because the value of address is non-constant. I am
wanting to be able to modify a port in the other MCU via the CAN-bus. Thus,
controller 'B' could directly set a bit on a port in controller 'A' to sound
a buzzer. The 'address', 'mask', 'data' is transferred over the CAN-bus.

Any help would be much appreciated.

Marlin

From [email-masked] Sat Apr 28 00:18:55 2001
Received: from gateway.utbm.fr ([193.48.246.2] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14t7D4-0004AB-00
for <[email-masked]>; Sat, 28 Apr 2001 00:18:54 +1200
Received: from sunserv.utbm.fr (sunserv.utbm.fr [192.168.1.16])
by gateway.utbm.fr (8.9.3/jtpda-5.3.2) with ESMTP id NAA31354
for <[email-masked]>; Fri, 27 Apr 2001 13:06:51 +0200
Received: (from lcourtes@localhost)
by sunserv.utbm.fr (8.9.3+Sun/8.9.3) id NAA20590
for [email-masked]; Fri, 27 Apr 2001 13:06:47 +0200 (MEST)
Date: Fri, 27 Apr 2001 13:06:47 +0200
From: Ludovic COURTES <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 1.0pre2us
In-Reply-To: <[email-masked]>
Subject: [avr-gcc-list] Seeking avr-gcc documentation
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi !

Is there anywhere we can find avr-gcc specific documentation, i mean
containing some info for instance concerning arguments passing (in
which regs arguments are put before a call), specific asm constraints,
register usage policy, and all that kind of thing that are not in gcc's
info and manual ?

Thanks by advance,
Ludovic.

--
Ludovic Courtes
University of Technology of Belfort-Montbeliard
Unitec (UTBM's students Robotics Club)

From [email-masked] Sat Apr 28 02:02:45 2001
Received: from sttlpop3.sttl.uswest.net ([206.81.192.3])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14t8pY-0004EV-00
for <[email-masked]>; Sat, 28 Apr 2001 02:02:44 +1200
Received: (qmail 1218 invoked by alias); 27 Apr 2001 14:03:46 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 1213 invoked by uid 0); 27 Apr 2001 14:03:45 -0000
Received: from vdsl25.sttl.uswest.net (HELO larry) (216.160.108.25)
by sttlpop3.sttl.uswest.net with SMTP; 27 Apr 2001 14:03:45 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]> <[email-masked]>
Subject: Re: [avr-gcc-list] Seeking avr-gcc documentation
Date: Fri, 27 Apr 2001 06:54:11 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Somewhere in the libc source directory you will find ctoasm.inc that
describes the register usage.

----- Original Message -----
From: "Ludovic COURTES" <[email-masked]>

> Hi !
>
> Is there anywhere we can find avr-gcc specific documentation, i mean
> containing some info for instance concerning arguments passing (in
> which regs arguments are put before a call), specific asm constraints,
> register usage policy, and all that kind of thing that are not in gcc's
> info and manual ?
>

From [email-masked] Sat Apr 28 02:11:45 2001
Received: from melimelo.enst-bretagne.fr ([192.108.115.36])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14t8yG-0004FL-00
for <[email-masked]>; Sat, 28 Apr 2001 02:11:45 +1200
Received: from titan.enst-bretagne.fr (titan.enst-bretagne.fr [192.44.75.4])
by melimelo.enst-bretagne.fr (8.10.1/8.10.1) with ESMTP id f3REC4e37678
for <[email-masked]>; Fri, 27 Apr 2001 16:12:04 +0200
Received: from garo.enst-bretagne.fr (garo.enst-bretagne.fr [192.44.75.68])
by titan.enst-bretagne.fr (8.10.1/8.10.1) with ESMTP id f3REC4o24146
for <[email-masked]>; Fri, 27 Apr 2001 16:12:04 +0200 (MET DST)
Received: from localhost (torneri@localhost)
by garo.enst-bretagne.fr (8.10.1/8.10.1) with ESMTP id f3REC2W29081
for <[email-masked]>; Fri, 27 Apr 2001 16:12:02 +0200 (MET DST)
Date: Fri, 27 Apr 2001 16:12:02 +0200 (MET DST)
From: TORNERI Nicolas <[email-masked]>
To: <[email-masked]>
Subject: Re: [avr-gcc-list] Seeking avr-gcc documentation
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=X-UNKNOWN
Content-Transfer-Encoding: QUOTED-PRINTABLE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I am currently working on a robotics project with a team of students, with
the aim to take part into the French robotic cup dubbed "e=3DM6". We are
using Atmel's microcontrollers and avr-gcc for all our
software developpements. It's a great tool !

Maybe these documents would be of interest to you :

http://resel.enst-bretagne.fr/em6

Look into "Tutoriaux", sorry for non french-speaking people, but these are
in french :)

Nicolas

---
Nicolas TORNERI
El=E8ve de 2=E8me ann=E9e
ENST de Bretagne

On Fri, 27 Apr 2001, Ludovic COURTES wrote:

> Hi !
>
> Is there anywhere we can find avr-gcc specific documentation, i mean
> containing some info for instance concerning arguments passing (in
> which regs arguments are put before a call), specific asm constraints,
> register usage policy, and all that kind of thing that are not in gcc's
> info and manual ?
>
> Thanks by advance,
> Ludovic.
>
> --
> Ludovic Courtes
> University of Technology of Belfort-Montbeliard
> Unitec (UTBM's students Robotics Club)
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Sat Apr 28 10:20:46 2001
Received: from sand7.global.net.uk ([195.147.246.253])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14tGbV-0004c0-00
for <[email-masked]>; Sat, 28 Apr 2001 10:20:46 +1200
Received: from p14s06a10.client.global.net.uk ([195.147.118.21] helo=home)
by sand7.global.net.uk with smtp (Exim 3.22 #1)
id 14tGSD-0004sg-00
for [email-masked]; Fri, 27 Apr 2001 23:11:09 +0100
Reply-To: <[email-masked]>
From: "Tim Fenn" <[email-masked]>
To: <[email-masked]>
Date: Fri, 27 Apr 2001 23:16:23 +0100
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
In-Reply-To: <[email-masked]>
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Subject: [avr-gcc-list] Inline assembly in AVR-GCC
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Is there anyone out there who can tell the specifics of including
assembly in my c functions. I cant seem to find any examples that make
sense.
Thanks
Tim

From [email-masked] Sun Apr 29 07:49:10 2001
Received: from sax.sax.de ([193.175.26.33])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14taiL-0006y4-00
for <[email-masked]>; Sun, 29 Apr 2001 07:49:09 +1200
Received: (from uucp@localhost)
by sax.sax.de (8.9.3/8.9.3) with UUCP id VAA08685
for [email-masked]; Sat, 28 Apr 2001 21:50:14 +0200 (CEST)
Received: (from j@localhost)
by uriah.heep.sax.de (8.11.3/8.11.3) id f3SJLsE68464;
Sat, 28 Apr 2001 21:21:54 +0200 (MET DST)
(envelope-from j)
Date: Sat, 28 Apr 2001 21:21:54 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
References: <[email-masked]>
<[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] Inline assembly in AVR-GCC
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Tim Fenn" <[email-masked]> writes:

> Hi Is there anyone out there who can tell the specifics of including
> assembly in my c functions. I cant seem to find any examples that make
> sense.

Search the list archive for this list. A while ago, someone has
reposted an introduction to gcc's asm() statement. It is written from
a Linux/i386 perspective, but should give you enough information for
getting started.

--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL

http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

From [email-masked] Sun Apr 29 23:49:02 2001
Received: from sax.sax.de ([193.175.26.33])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14tphF-0007b1-00
for <[email-masked]>; Sun, 29 Apr 2001 23:49:01 +1200
Received: (from uucp@localhost)
by sax.sax.de (8.9.3/8.9.3) with UUCP id NAA21860
for [email-masked]; Sun, 29 Apr 2001 13:50:08 +0200 (CEST)
Received: (from j@localhost)
by uriah.heep.sax.de (8.11.3/8.11.3) id f3TBgV329873
for [email-masked]; Sun, 29 Apr 2001 13:42:31 +0200 (MET DST)
(envelope-from j)
Date: Sun, 29 Apr 2001 13:42:31 +0200
From: J Wunsch <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
Reply-To: Joerg Wunsch <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 1.0.1i
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
Subject: [avr-gcc-list] About loop (mis-)optimizations
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello world\n

since Denis has repeatedly claimed that the misoptimization of dead
loops were a feature of the recent gcc, i finally took the time to
test it. Given the simple C program:

int main(void)
{
unsigned i;

for (i = 50000; i; i--) ;

return 0;
}

...i compiled it as well for an i386 as an avr target. Compiler
sources are from the same snapshot:

% ggcc -v
Reading specs from /tmp/pkg/lib/gcc-lib/i386-portbld-freebsd5.0/3.0/specs
Configured with: ./../gcc-20010320/configure --disable-nls --with-gnu-as --with-gnu-ld --with-gxx-include-dir=/tmp/pkg/lib/gcc-lib/i386-portbld-freebsd5.0/3.0/include/g++ --disable-shared --prefix=/tmp/pkg i386-portbld-freebsd5.0
gcc version 3.0 20010320 (prerelease)

% avr-gcc -v
Reading specs from /usr/local/lib/gcc-lib/avr/3.0/specs
Configured with: ./configure --target=avr --prefix=/usr/local i386--freebsd5.0
gcc version 3.0 20010320 (prerelease)

The resulting .s file for -O2 optimization is (irrelevant parts
stripped for previty):

i386:

main:
movl $50000, %eax
pushl %ebp
testl %eax, %eax
movl %esp, %ebp
je .L8
.p2align 2
.L5:
decl %eax
jne .L5
.L8:

Looks OK. The loop counter is initialized with 50000, and decremented
(by one) for each iteration.

avr:

/* prologue end (size=4) */
ldi r24,lo8(50000)
ldi r25,hi8(50000)
.L5:
subi r24,lo8(-(-625))
sbci r25,hi8(-(-625))
brne .L5
/* epilogue: frame size=0 */

The loop counter is also initialized with 50000, but then decremented
by 625 per iteration. This looks broken to me, really.

--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL

http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

From [email-masked] Mon Apr 30 21:57:05 2001
Received: from mx2.nameplanet.com ([213.203.30.52] ident=mail)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14uAQR-00006o-00
for <[email-masked]>; Mon, 30 Apr 2001 21:57:03 +1200
Received: 30 Apr 2001 09:57:38 -0000
Received: from unknown (HELO www3.nameplanet.com) (192.168.2.43)
by mail with SMTP; 30 Apr 2001 09:57:38 -0000
Received: (qmail 24703 invoked by uid 400); 30 Apr 2001 09:57:37 -0000
Date: 30 Apr 2001 09:57:37 -0000
Message-ID: <[email-masked]>
From: [email-masked]
To: [email-masked]
MIME-Version: 1.0
Subject: RE: [avr-gcc-list] Inline assembly in AVR-GCC
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Tim,

Have you had a look at Harald Leitner's "Getting Started Guide"?
You can download it from www.avrfreaks.net :

http://www.avrfreaks.net/AVRGCC/Download/haraleit.pdf

- Larry

| -----Original Message-----
| From: [email-masked]
| [mailto:[email-masked]]On Behalf Of Tim Fenn
| Sent: Saturday, April 28, 2001 12:16 AM
| To: [email-masked]
| Subject: [avr-gcc-list] Inline assembly in AVR-GCC
|
|
| Hi Is there anyone out there who can tell the specifics of including
| assembly in my c functions. I cant seem to find any examples that make
| sense.
| Thanks
| Tim
|
|
|
| _______________________________________________
| avr-gcc-list mailing list
| [email-masked]
| http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

--
Get your firstname@lastname email for FREE at http://Nameplanet.com/?su

From [email-masked] Mon Apr 30 20:07:30 2001
Received: from mx11.nameplanet.com ([62.70.3.41] ident=mail)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14u8iO-0008T3-00
for <[email-masked]>; Mon, 30 Apr 2001 20:07:29 +1200
Received: 30 Apr 2001 08:08:32 -0000
Received: from unknown (HELO www2.nameplanet.com) (192.168.2.42)
by mail with SMTP; 30 Apr 2001 08:08:32 -0000
Received: (qmail 29434 invoked by uid 400); 30 Apr 2001 08:08:32 -0000
Date: 30 Apr 2001 08:08:32 -0000
Message-ID: <[email-masked]>
From: [email-masked]
To: [email-masked]
MIME-Version: 1.0
Subject: RE: [avr-gcc-list] Inline assembly in AVR-GCC
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Tim,

Have you had a look at Harald Leitner's "Getting Started Guide"?
You can download it from www.avrfreaks.net :

http://www.avrfreaks.net/AVRGCC/Download/haraleit.pdf

- Larry

| -----Original Message-----
| From: [email-masked]
| [mailto:[email-masked]]On Behalf Of Tim Fenn
| Sent: Saturday, April 28, 2001 12:16 AM
| To: [email-masked]
| Subject: [avr-gcc-list] Inline assembly in AVR-GCC
|
|
| Hi Is there anyone out there who can tell the specifics of including
| assembly in my c functions. I cant seem to find any examples that make
| sense.
| Thanks
| Tim
|
|
|
| _______________________________________________
| avr-gcc-list mailing list
| [email-masked]
| http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
|

--
Get your firstname@lastname email for FREE at http://Nameplanet.com/?su

From [email-masked] Tue May 01 14:15:29 2001
Received: from cascara.uvic.ca ([142.104.5.28] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14uPhI-0000qU-00
for <[email-masked]>; Tue, 01 May 2001 14:15:28 +1200
Received: from wolfke.home.com (wolfke.cfs.me.UVic.CA [142.104.121.117])
by cascara.UVic.CA (8.11.2/8.11.2) with ESMTP id f412GSM151070
for <[email-masked]>; Mon, 30 Apr 2001 19:16:28 -0700
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.0
Date: Mon, 30 Apr 2001 19:16:44 -0700
To: [email-masked]
From: Jamie Morken <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: [avr-gcc-list] timer interrupt service routine
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

What happens when you execute code in a timer ISR which is called every
1/3600th of a second and the code in the ISR
takes longer than 1/3600th of a second?

best regards,
Jamie Morken

From [email-masked] Wed May 02 19:21:53 2001
Received: from sitemail.everyone.net ([216.200.145.35] helo=omta02.mta.everyone.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14uqxM-00020F-00
for <[email-masked]>; Wed, 02 May 2001 19:21:53 +1200
Received: from sitemail.everyone.net (reports [216.200.145.62])
by omta02.mta.everyone.net (Postfix) with ESMTP id A58BA1C3C74
for <[email-masked]>; Wed, 2 May 2001 00:23:15 -0700 (PDT)
Received: by sitemail.everyone.net (Postfix, from userid 99)
id 4A75036F9; Wed, 2 May 2001 00:23:15 -0700 (PDT)
Content-Type: text/plain
Content-Disposition: inline
Mime-Version: 1.0
X-Mailer: MIME-tools 4.104 (Entity 4.117)
Date: Wed, 2 May 2001 00:23:15 -0700 (PDT)
From: Molnar Zoltan <[email-masked]>
To: [email-masked]
Reply-To: [email-masked]
X-Originating-Ip: [193.230.240.162]
Message-Id: <[email-masked]>
Subject: [avr-gcc-list] Allocation of large globals in external RAM
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

I'm still having problems in allocating large global variables in external RAM.

How can I tell the linker that I have 32K external RAM?
How can I tell the linker where to put the stack (--defsym __stack=0x08000 returns 'No such file or directory').

Does anybody have working makefiles for early MCUCR, stack initialization?

Here I enclose a test program and my makefile (I'm using gcc 2.97), please run the code and help if You can.

Thank You
Zoltan Molnar
---
test program:
#include <io.h>
#include <interrupt.h>

#define FIFOlgth 2000

typedef unsigned char u08;
typedef char s08;
typedef unsigned short u16;
typedef short s16;
typedef u08 bool;

typedef struct {
u16 min,max,o,f;
bool isfull;
u08 data[FIFOlgth];
} t_fifo;

t_fifo fifo;
//******************************************
//MAIN PROGRAM
int main (void)
{
/*set up port pin directions and levels*/
outp(0x56,DDRB);
outp(0xFF,PORTB);
outp(0xD6,DDRD);
outp(0xFF,PORTD);

outp(0x80,MCUCR); /*enable XSRAM, how to do it from linker???*/

sei();

fifo.min=0;
fifo.max=FIFOlgth-1;
fifo.o=0;
fifo.f=0;

for(;;)
{ }
return 0;
}

makefile:

###### define some variables based on the AVR base path in $(AVR) #######
CC=avr-gcc
AS=avr-gcc -x assembler-with-cpp
RM=rm -f
RN=mv
BIN=avr-objcopy
INCDIR=.
LIBDIR=$(AVR)/avr/lib
SHELL=$(AVR)/bin/sh.exe
###### output format can be srec, ihex (avrobj is always created) #######
FORMAT=ihex
########################## default mcu type #############################
#put the name of the target mcu here (at90s8515, at90s8535, attiny22, atmega603 etc.)
MCU=at90s8515
####################### default compiler flags ##########################
CPFLAGS=-g -O2 -Wall -Wstrict-prototypes -Wa,-ahlms=$(<:.c=.lst)
####################### default assembler flags #########################
ASFLAGS=-Wa,-gstabs
########################## default linker flags #########################
# LDFLAGS=-Wl,-Map=$(TRG).map,--cref
LDFLAGS=-Wl,-Map=$(TRG).map,--cref --defsym __init_mcucr__=0x80

#put the name of the target file here (without extension)
TRG=test

#put your C sourcefiles here
SRC= $(TRG).c

#put additional assembler source file here
ASRC=

#additional libraries and object files to link
LIB=

#additional includes to compile
INC=

#early MCU init. weaks
#--defsym __init_mcucr__=0xc0
#--defsym __init_wdtcr__=0x00
#--defsym __stack=0x7fff

########### you should not need to change the following line #############
#define all project specific object files
OBJ = $(ASRC:.s=.o) $(SRC:.c=.o)
CPFLAGS += -mmcu=$(MCU)
ASFLAGS += -mmcu=$(MCU)
LDFLAGS += -mmcu=$(MCU)

#this defines the aims of the make process
all: $(TRG).obj $(TRG).elf $(TRG).rom #$(TRG).eep

#compile: instructions to create assembler and/or object files from C source
%o : %c
$(CC) -c $(CPFLAGS) -I$(INCDIR) $< -o $@

%s : %c
$(CC) -S $(CPFLAGS) -I$(INCDIR) $< -o $@

#assemble: instructions to create object file from assembler files
%o : %s
$(AS) -c $(ASFLAGS) -I$(INCDIR) $< -o $@

#link: instructions to create elf output file from object files
%elf: $(OBJ)

$(CC) $(OBJ) $(LIB) $(LDFLAGS) -o $@

#create avrobj file from elf output file
%obj: %elf
$(BIN) -O avrobj -R .eeprom $< $@

#create bin (ihex, srec) file from elf output file
%rom: %elf
$(BIN) -O $(FORMAT) -R .eeprom $< $@

%eep: %elf
$(BIN) -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 -O $(FORMAT) $< $@

###### dependecies, add any dependencies you need here ###################
$(TRG).o: $(TRG).c

#make instruction to delete created files
clean:
$(RM) $(OBJ)
$(RM) $(SRC:.c=.s)
$(RM) $(SRC:.c=.lst)
$(RM) $(TRG).map
$(RM) $(TRG).elf
$(RM) $(TRG).obj
$(RM) $(TRG).eep
$(RM) $(TRG).rom
$(RM) *.bak
$(RM) *.log

_____________________________________________________________
Are you a Techie? Get Your Free Tech Email Address Now! Visit http://www.TechEmail.com

From [email-masked] Wed May 02 22:27:45 2001
Received: from odin.he.net ([216.218.181.2])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14utrE-0002A6-00
for <[email-masked]>; Wed, 02 May 2001 22:27:44 +1200
Received: from jpk1 (adsl-200.world-net.co.nz [210.55.228.200]) by odin.he.net (8.8.6/8.8.2) with SMTP id DAA25128 for <[email-masked]>; Wed, 2 May 2001 03:28:16 -0700
Date: Wed, 2 May 2001 03:28:16 -0700
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: Windows Eudora Light Version 1.5.2
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] Allocation of large globals in external RAM
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

You need to add a modified linker script to your project directory, see the
card test program in my eAVR project for an example. The linker scripts are
in /usr/local/avr/ unless you used the --prefix= option when installing etc.
http://avr.jpk.co.nz/eavr.eavr.html

The linker knows nothing of MCUCR, your code is correct to initialise it
before doing anything else.

Cheers,

Jason Kyle

At 00:23 2/05/01 -0700, you wrote:
>Hi all,
>
>I'm still having problems in allocating large global variables in external RAM.
>
>How can I tell the linker that I have 32K external RAM?
>How can I tell the linker where to put the stack (--defsym __stack=0x08000
returns 'No such file or directory').
>
>Does anybody have working makefiles for early MCUCR, stack initialization?
>
>Here I enclose a test program and my makefile (I'm using gcc 2.97), please
run the code and help if You can.
>
>Thank You
>Zoltan Molnar

<snip>

From [email-masked] Thu May 03 03:18:44 2001
Received: from sax.sax.de ([193.175.26.33])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14uyOp-0002Qj-00
for <[email-masked]>; Thu, 03 May 2001 03:18:44 +1200
Received: (from uucp@localhost)
by sax.sax.de (8.9.3/8.9.3) with UUCP id RAA19165
for [email-masked]; Wed, 2 May 2001 17:19:47 +0200 (CEST)
Received: (from j@localhost)
by uriah.heep.sax.de (8.11.3/8.11.3) id f42FHZi39236;
Wed, 2 May 2001 17:17:35 +0200 (MET DST)
(envelope-from j)
Date: Wed, 2 May 2001 17:17:35 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
References: <[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] timer interrupt service routine
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Jamie Morken <[email-masked]> writes:

> What happens when you execute code in a timer ISR which is called
> every 1/3600th of a second and the code in the ISR takes longer than
> 1/3600th of a second?

It depends on how your interrupt service is being organized.

Have a look at the description of interrupt services in the Atmel
docs. Normally, when entering an ISR, the hardware disables further
interrupts, and eventually re-enables them when executing the RETI
instruction. If you don't change this, you'll simply lose interrupts
(which is not all that good since your program's idea of time will be
wrong, but it's not fatal).

However, you can manually enable nested interrupts by setting the
I-bit in SREG. In that case, you IMHO need to make sure that your
ISRs do not nest, otherwise you'll eventually hit a stack rollover.

--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL

http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

From [email-masked] Thu May 03 09:44:53 2001
Received: from smtp2.ihug.co.nz ([203.109.252.8] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14v4QX-0002qP-00
for <[email-masked]>; Thu, 03 May 2001 09:44:53 +1200
Received: from guy (203-173-201-137.nzwide.ihug.co.nz [203.173.201.137])
by smtp2.ihug.co.nz (8.9.3/8.9.3/Debian 8.9.3-21) with SMTP id JAA16979
for <[email-masked]>; Thu, 3 May 2001 09:46:18 +1200
X-Authentication-Warning: smtp2.ihug.co.nz: Host 203-173-201-137.nzwide.ihug.co.nz [203.173.201.137] claimed to be guy
Message-ID: <[email-masked]>
From: "Guy Robinson" <[email-masked]>
To: <[email-masked]>
Date: Thu, 3 May 2001 09:43:24 +1200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Table of function pointers
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,
Can anyone explain what this error means? See source below. I can't see what
I'm doing wrong. Thanks in advance for your help.

Guy

hx_2313.c:37: declaration of `FunctionTable' as array of functions
hx_2313.c:37: Tree check: expected class 't', have 'x' (error_mark)
confused by earlier errors, bailing out
D:\AVRGCC\BIN\MAKE.EXE: *** [hx_2313.o] Error 1

#include <io.h>
#include <progmem.h>

#define pint int __attribute__ ((progmem))

void function0();
void function1();

pint *FunctionTable[2]() = {function0,function1};

char a,b,index;

void function0(){
a =b;
}
void function1(){
b =a;
}

void main(void){

PRG_RDB(FunctionTable[index]()); // call function from table at index
index++;
}

From [email-masked] Thu May 03 17:04:14 2001
Received: from smtp04.hk.linkage.net ([202.76.4.20])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14vBHg-0003Ue-00
for <[email-masked]>; Thu, 03 May 2001 17:04:13 +1200
Received: from vita.hk.net ([email-masked] [152.101.101.101])
by smtp04.hk.linkage.net (8.10.2/8.10.2) with SMTP id f4352qX06091;
Thu, 3 May 2001 13:02:53 +0800 (HKT)
Date: Thu, 3 May 2001 13:05:03 +0800 (HKT)
From: Lai Kang Tin <[email-masked]>
To: Guy Robinson <[email-masked]>
cc: [email-masked]
Subject: Re: [avr-gcc-list] Table of function pointers
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

My avr-gcc's output:

venus:/opt/avr/project$ make hx.s
/opt/avr/bin/avr-gcc -mmcu=at90s8515 -DAT90S8515 -fno-builtin -Os -Wstrict-prototypes -Wall -I./ -I/opt/avr/include -c -S -o hx.s hx.c
hx.c:6: warning: function declaration isn't a prototype
hx.c:7: warning: function declaration isn't a prototype
hx.c:9: warning: function declaration isn't a prototype
hx.c:9: declaration of `FunctionTable' as array of functions
hx.c:9: warning: Only initialized variables can be placed into program memory area.
hx.c:9: confused by earlier errors, bailing out
make: *** [hx.s] Error 1

KTL

On Thu, 3 May 2001, Guy Robinson wrote:

> Hi,
> Can anyone explain what this error means? See source below. I can't see what
> I'm doing wrong. Thanks in advance for your help.
>
> Guy
>
> hx_2313.c:37: declaration of `FunctionTable' as array of functions
> hx_2313.c:37: Tree check: expected class 't', have 'x' (error_mark)
> confused by earlier errors, bailing out
> D:\AVRGCC\BIN\MAKE.EXE: *** [hx_2313.o] Error 1
>
>
> #include <io.h>
> #include <progmem.h>
>
> #define pint int __attribute__ ((progmem))
>
> void function0();
> void function1();
>
> pint *FunctionTable[2]() = {function0,function1};
>
> char a,b,index;
>
> void function0(){
> a =b;
> }
> void function1(){
> b =a;
> }
>
> void main(void){
>
> PRG_RDB(FunctionTable[index]()); // call function from table at index
> index++;
> }
>
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

K.T.LAI
[email-masked]

From [email-masked] Thu May 03 20:46:11 2001
Received: from gateway.utbm.fr ([193.48.246.2] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14vEkS-0003pe-00
for <[email-masked]>; Thu, 03 May 2001 20:46:10 +1200
Received: from sunserv.utbm.fr (sunserv.utbm.fr [192.168.1.16])
by gateway.utbm.fr (8.9.3/jtpda-5.3.2) with ESMTP id KAA05418
for <[email-masked]>; Thu, 3 May 2001 10:47:11 +0200
Received: (from lcourtes@localhost)
by sunserv.utbm.fr (8.9.3+Sun/8.9.3) id KAA14585
for [email-masked]; Thu, 3 May 2001 10:47:06 +0200 (MEST)
Date: Thu, 3 May 2001 10:47:06 +0200
From: Ludovic COURTES <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 1.0pre2us
In-Reply-To: <[email-masked]>
Subject: [avr-gcc-list] Re: Allocation of large globals in external RAM
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi !

> How can I tell the linker that I have 32K external RAM?
> How can I tell the linker where to put the stack (--defsym __stack=0x08000 returns 'No such file or directory').
>
> Does anybody have working makefiles for early MCUCR, stack initialization?

'--defsym' is the option to tell avr-ld to redefine a symbol location. But when
compiling with avr-gcc, there is a special option to make it pass arguments to
avr-ld which is '-Xlinker'. Therefore, you could try :
avr-gcc $(CFLAGS) -Xlinker --defsym -Xlinker __stack=0x8000 -c foo.c -o foo.o .
Note that ld's option have to be cut into to parts ('-Xlinker "--defsym __stack=0x8000"'
won't work).

Ludovic.

--
Ludovic Courtes
University of Technology of Belfort-Montbeliard
Unitec (UTBM's students Robotics Club)

From [email-masked] Fri May 04 02:28:24 2001
Received: from [63.221.177.161] (helo=hipot.cirris.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14vK5f-0004Le-00
for <[email-masked]>; Fri, 04 May 2001 02:28:24 +1200
Received: from exchange.cirris.com (exchange.cirris.com [192.168.5.127])
by hipot.cirris.com (8.9.3/8.9.3) with ESMTP id IAA07657
for <[email-masked]>; Thu, 3 May 2001 08:29:20 -0600
content-class: urn:content-classes:message
MIME-Version: 1.0
Subject: RE: [avr-gcc-list] Table of function pointers
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Date: Thu, 3 May 2001 08:29:20 -0600
X-MimeOLE: Produced By Microsoft Exchange V6.0.4417.0
Message-ID: <[email-masked]>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: [avr-gcc-list] Table of function pointers
Thread-Index: AcDTU0TWwwGPbDkdRFuwDBDughUeFgAiMgNQ
From: "Jon Bertrand" <[email-masked]>
To: <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

You have some stuff I'm not familar with.

Here is how I do arrays of pointers to functions:

/* prototypes for the actual functions */
void Cmd1(TByte bCmd);
void Cmd2(TByte bCmd);
void Cmd3(TByte bCmd);

/* the actual functions all must match the type TFunctionPtr */
typedef void (*TFunctionPtr)(TByte bCmd);

/* the array */
const TFunctionPtr CommandArray[] =3D=20
{
Cmd1,=20
Cmd2,
Cmd3
};

/* how to call a function */
main()
{
CommandArray[bIndex](bParameter);
}

Jon B.

> -----Original Message-----
> From: Guy Robinson [mailto:[email-masked]]
> Sent: Wednesday, May 02, 2001 3:43 PM
> To: [email-masked]
> Subject: [avr-gcc-list] Table of function pointers
>=20
>=20
> Hi,
> Can anyone explain what this error means? See source below. I=20
> can't see what
> I'm doing wrong. Thanks in advance for your help.
>=20
> Guy
>=20
> hx_2313.c:37: declaration of `FunctionTable' as array of functions
> hx_2313.c:37: Tree check: expected class 't', have 'x' (error_mark)
> confused by earlier errors, bailing out
> D:\AVRGCC\BIN\MAKE.EXE: *** [hx_2313.o] Error 1
>=20
>=20
> #include <io.h>
> #include <progmem.h>
>=20
> #define pint int __attribute__ ((progmem))
>=20
> void function0();
> void function1();
>=20
> pint *FunctionTable[2]() =3D {function0,function1};
>=20
> char a,b,index;
>=20
> void function0(){
> a =3Db;
> }
> void function1(){
> b =3Da;
> }
>=20
> void main(void){
>=20
> PRG_RDB(FunctionTable[index]()); // call function from=20
> table at index
> index++;
> }
>=20
>=20
>=20
>=20
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>=20

From [email-masked] Fri May 04 12:14:53 2001
Received: from smtp2.ihug.co.nz ([203.109.252.8] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14vTFE-0005IA-00
for <[email-masked]>; Fri, 04 May 2001 12:14:52 +1200
Received: from guy (203-173-203-157.nzwide.ihug.co.nz [203.173.203.157])
by smtp2.ihug.co.nz (8.9.3/8.9.3/Debian 8.9.3-21) with SMTP id MAA12807
for <[email-masked]>; Fri, 4 May 2001 12:16:19 +1200
X-Authentication-Warning: smtp2.ihug.co.nz: Host 203-173-203-157.nzwide.ihug.co.nz [203.173.203.157] claimed to be guy
Message-ID: <[email-masked]>
From: "Guy Robinson" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Table of function pointers
Date: Fri, 4 May 2001 12:04:30 +1200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Jon,
When I tried this the array was in SRAM. I don't think Avr-gcc understands
the const type as standard. I'm new to C but I think you have to use the
progmem
macros(progmem.h). I want the array of pointers to functions in the program
memory it's just how to get it there.

Still trying,

Guy

----- Original Message -----
From: "Jon Bertrand" <[email-masked]>
To: <[email-masked]>
Sent: Friday, May 04, 2001 2:29 AM
Subject: RE: [avr-gcc-list] Table of function pointers

You have some stuff I'm not familar with.

Here is how I do arrays of pointers to functions:

/* prototypes for the actual functions */
void Cmd1(TByte bCmd);
void Cmd2(TByte bCmd);
void Cmd3(TByte bCmd);

/* the actual functions all must match the type TFunctionPtr */
typedef void (*TFunctionPtr)(TByte bCmd);

/* the array */
const TFunctionPtr CommandArray[] =
{
Cmd1,
Cmd2,
Cmd3
};

/* how to call a function */
main()
{
CommandArray[bIndex](bParameter);
}

Jon B.

From [email-masked] Fri May 04 13:51:10 2001
Received: from smtp4.ihug.co.nz ([203.109.252.5])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14vUkQ-0005Qy-00
for <[email-masked]>; Fri, 04 May 2001 13:51:10 +1200
Received: from guy (203-173-247-129.nzwide.ihug.co.nz [203.173.247.129])
by smtp4.ihug.co.nz (8.9.3/8.9.3/Debian 8.9.3-21) with SMTP id NAA22247
for <[email-masked]>; Fri, 4 May 2001 13:52:40 +1200
X-Authentication-Warning: smtp4.ihug.co.nz: Host 203-173-247-129.nzwide.ihug.co.nz [203.173.247.129] claimed to be guy
Message-ID: <[email-masked]>
From: "Guy Robinson" <[email-masked]>
To: <[email-masked]>
Date: Fri, 4 May 2001 13:48:21 +1200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Array of function pointers in program memory
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi

OK, the following program runs but the array is in SRAM not program memory
like I want. Can anyone point me to some documentation that might explain
what I'm doing wrong or even better tell me the answer:-)?

Regards,

Guy

#include <io.h>
#include <pgmspace.h>

typedef unsigned char u08;
typedef unsigned int u16;

void function0();
void function1();

static prog_void (*FunctionTable[2])() ={function0,function1};

u08 index;

void function0(){
}

void function1(){
}

void main(void){
index =0;
do
{
(*FunctionTable[index])();
index++;
}
while(index<2);
}

From [email-masked] Fri May 04 17:39:23 2001
Received: from mail.pepperl-fuchs.com ([194.120.135.222] helo=de.pepperl-fuchs.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14vYJG-0005ml-00
for <[email-masked]>; Fri, 04 May 2001 17:39:22 +1200
Received: from exmail.pepperl-fuchs.com (exmail.pepperl-fuchs.com [172.16.11.61])
by de.pepperl-fuchs.com (8.11.0/8.10.2) with ESMTP id f445eil24608
for <[email-masked]>; Fri, 4 May 2001 07:40:44 +0200
Received: by exmail.pepperl-fuchs.com with Internet Mail Service (5.5.2650.21)
id <JF2BWWFH>; Fri, 4 May 2001 07:38:37 +0200
Message-ID: <[email-masked]>
From: Stumpf Michael <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Subject: AW: [avr-gcc-list] Array of function pointers in program memory
Date: Fri, 4 May 2001 07:38:33 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C0D45C.7504EA30"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C0D45C.7504EA30
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,
=20
try typedefs like
=20
typedef void (*FuncPtr)(void);
typedef FuncPtr FuncPtrArray[2];
typedef FuncPtrArray prog_FuncPtrArray PROGMEM;
=20
void function0();
void function1();
=20
static FuncPtrArray FunctionTable =3D { function0, function1 };
=20
> > -----Urspr=FCngliche Nachricht-----
> > Von: Guy Robinson [mailto:[email-masked]]
> > Gesendet: Freitag, 4. Mai 2001 03:48
> > An: [email-masked]
> > Betreff: [avr-gcc-list] Array of function pointers in program =
memory
> >=20
> >=20
> > Hi
> >=20
> > OK, the following program runs but the array is in SRAM not=20
> > program memory
> > like I want. Can anyone point me to some documentation that=20
> > might explain
> > what I'm doing wrong or even better tell me the answer:-)?
> >=20
> > Regards,
> >=20
> > Guy
> >=20
> > #include <io.h>
> > #include <pgmspace.h>
> >=20
> > typedef unsigned char u08;
> > typedef unsigned int u16;
> >=20
> > void function0();
> > void function1();
> >=20
> > static prog_void (*FunctionTable[2])() =3D{function0,function1};
> >=20
> > u08 index;
> >=20
> > void function0(){
> > }
> >=20
> > void function1(){
> > }
> >=20
> > void main(void){
> > index =3D0;
> > do
> > {
> > (*FunctionTable[index])();
> > index++;
> > }
> > while(index<2);
> > }
> >=20
> >=20
> >=20
> > _______________________________________________
> > avr-gcc-list mailing list
> > [email-masked]
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
> >=20
>=20

------_=_NextPart_001_01C0D45C.7504EA30
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>AW: [avr-gcc-list] Array of function pointers in program =
memory</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>&nbsp;Hi,</FONT>
<BR><FONT SIZE=3D2>&nbsp;</FONT>
<BR><FONT SIZE=3D2>&nbsp;try typedefs like</FONT>
<BR><FONT SIZE=3D2>&nbsp;</FONT>
<BR><FONT SIZE=3D2>&nbsp;typedef void (*FuncPtr)(void);</FONT>
<BR><FONT SIZE=3D2>&nbsp;typedef FuncPtr FuncPtrArray[2];</FONT>
<BR><FONT SIZE=3D2>&nbsp;typedef FuncPtrArray prog_FuncPtrArray =
PROGMEM;</FONT>
<BR><FONT SIZE=3D2>&nbsp;</FONT>
<BR><FONT SIZE=3D2>&nbsp;void function0();</FONT>
<BR><FONT SIZE=3D2>&nbsp;void function1();</FONT>
<BR><FONT SIZE=3D2>&nbsp;</FONT>
<BR><FONT SIZE=3D2>&nbsp;static FuncPtrArray FunctionTable =3D { =
function0, function1 };</FONT>
<BR><FONT SIZE=3D2>&nbsp;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; -----Urspr=FCngliche Nachricht-----</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; Von: Guy Robinson [<A =
HREF=3D"mailto:[email-masked]">mailto:[email-masked]</A>]</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; Gesendet: Freitag, 4. Mai 2001 =
03:48</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; An: [email-masked]</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; Betreff: [avr-gcc-list] Array of function =
pointers in program memory</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; Hi</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; OK, the following program runs but the =
array is in SRAM not </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; program memory</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; like I want. Can anyone point me to some =
documentation that </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; might explain</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; what I'm doing wrong or even better tell =
me the answer:-)?</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; Regards,</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; Guy</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; #include &lt;io.h&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; #include &lt;pgmspace.h&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; typedef unsigned char u08;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; typedef unsigned int u16;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; void function0();</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; void function1();</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; static prog_void (*FunctionTable[2])() =
=3D{function0,function1};</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; u08 index;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; void function0(){</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; }</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; void function1(){</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; }</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; void main(void){</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;&nbsp; index =3D0;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;&nbsp; do</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;&nbsp; {</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;&nbsp; (*FunctionTable[index])();</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;&nbsp; index++;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;&nbsp; }</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;&nbsp; while(index&lt;2);</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; }</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; =
_______________________________________________</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; avr-gcc-list mailing list</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; [email-masked]</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; <A =
HREF=3D"http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list" =
TARGET=3D"_blank">http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list</A>=
</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C0D45C.7504EA30--

From [email-masked] Fri May 04 18:21:16 2001
Received: from smtp.routing.net ([213.160.64.56])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14vYxo-0005ql-00
for <[email-masked]>; Fri, 04 May 2001 18:21:16 +1200
Received: from mail.routing.net ([213.160.64.57]) by smtp.routing.net with Microsoft SMTPSVC(5.5.1877.447.44);
Fri, 4 May 2001 08:20:29 +0200
Received: from postbox.invers.com (62.155.235.119)
by mail.routing.net with MERCUR-SMTP/POP3/IMAP4-Server (v3.30.07 AS-0098316)
for <[email-masked]>; Fri, 4 May 2001 08:22:13 +0200
Received: from fuji (carsten.invers.com [192.168.2.17])
by postbox.invers.com (8.11.0/8.8.8) with ESMTP id f445GZ210992
for <[email-masked]>; Fri, 4 May 2001 07:16:35 +0200
X-Authentication-Warning: postbox.invers.com: Host carsten.invers.com [192.168.2.17] claimed to be fuji
Reply-To: <[email-masked]>
From: =?iso-8859-1?Q?Carsten_Ri=DFler?= <[email-masked]>
To: "AVR Liste normal" <[email-masked]>
Date: Fri, 4 May 2001 08:23:39 +0200
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Importance: Normal
Subject: [avr-gcc-list] Use of 8515 eeprom memory
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi
I'm thinking about using the 8515 eeprom memory for some configuration Data.
So some questions about that raised.
Is it generaly possible to write Data to the eeprom on runtime?
How can I define const or unsigned char in this Memory Area?
Are there any Latency time while writing to the eeprom memory?
What changes to the makefile are necessary?
Thanx
CU Carsten Rissler

From [email-masked] Fri May 04 19:40:17 2001
Received: from hertz.ikp.physik.tu-darmstadt.de ([130.83.24.91])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14vaCF-0005zA-00
for <[email-masked]>; Fri, 04 May 2001 19:40:16 +1200
Received: (from bon@localhost)
by hertz.ikp.physik.tu-darmstadt.de (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) id f447ffW09181;
Fri, 4 May 2001 09:41:41 +0200
X-Authentication-Warning: hertz.ikp.physik.tu-darmstadt.de: bon set sender to [email-masked] using -f
From: Uwe Bonnes <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <[email-masked]>
Date: Fri, 4 May 2001 09:41:41 +0200
To: <[email-masked]>
Cc: "AVR Liste normal" <[email-masked]>
Subject: Re: [avr-gcc-list] Use of 8515 eeprom memory
In-Reply-To: <[email-masked]>
References: <[email-masked]>
X-Mailer: VM 6.90 under Emacs 20.7.1
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>>>>> "Carsten" == =?iso-8859-1?Q?Carsten Ri=DFler?= <iso-8859-1> writes:

Carsten> Hi I'm thinking about using the 8515 eeprom memory for some
Carsten> configuration Data. So some questions about that raised. Is
Carsten> it generaly possible to write Data to the eeprom on runtime?
Carsten> How can I define const or unsigned char in this Memory Area?
Carsten> Are there any Latency time while writing to the eeprom memory?
Carsten> What changes to the makefile are necessary?

Look at the include file
/usr/local/avr/include/eeprom.h ( or wherever it is located on your system)

The available functions are defined there.
E.g earth/earth_inc.c uses these function. earth/earth_inc.c comes from
earth.tar.gz, a distributed example.

Bye
--
Uwe Bonnes [email-masked]

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

From [email-masked] Fri May 04 21:33:09 2001
Received: from sitemail.everyone.net ([216.200.145.35] helo=omta02.mta.everyone.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14vbxQ-00069t-00
for <[email-masked]>; Fri, 04 May 2001 21:33:04 +1200
Received: from sitemail.everyone.net (reports [216.200.145.62])
by omta02.mta.everyone.net (Postfix) with ESMTP id 8D71F1C4585
for <[email-masked]>; Fri, 4 May 2001 02:34:32 -0700 (PDT)
Received: by sitemail.everyone.net (Postfix, from userid 99)
id 31C8236F9; Fri, 4 May 2001 02:34:32 -0700 (PDT)
Content-Type: multipart/mixed; boundary="----------=_988968872-6075-0"
Mime-Version: 1.0
X-Mailer: MIME-tools 4.104 (Entity 4.117)
Date: Fri, 4 May 2001 02:34:32 -0700 (PDT)
From: Molnar Zoltan <[email-masked]>
To: [email-masked]
Reply-To: [email-masked]
X-Originating-Ip: [194.177.32.67]
Message-Id: <[email-masked]>
Subject: [avr-gcc-list] Link time stack, mcucr, watchdog init. with avr-gcc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format...

------------=_988968872-6075-0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: Quoted-Printable

Thanks to Jason Kyle and Ludovic COURTES I succeded to initialize RAM size,=
stack pointer, MCUCR and watchdog control register at link time, so You wo=
n't get strange link error messages if You use ext. memory and large variab=
les.=0D
=0D
Also You don't have to init. stack, MCUCR and watchdog from code.=0D
=0D
I attach to this mail the makefile and local linker script file that do all=
this.=0D
=0D
Thanks to everybody who responded to my question. =0D
=0D

_____________________________________________________________
Are you a Techie? Get Your Free Tech Email Address Now! Visit http://www.Te=
chEmail.com

------------=_988968872-6075-0
Content-Type: text/plain; name="avr85xx.x"
Content-Disposition: inline; filename="avr85xx.x"
Content-Transfer-Encoding: base64

T1VUUFVUX0ZPUk1BVCgiZWxmMzItYXZyIiwiZWxmMzItYXZyIiwiZWxmMzIt
YXZyIikKT1VUUFVUX0FSQ0goYXZyOjIpCk1FTU9SWQp7CiAgdGV4dCAgIChy
eCkgICA6IE9SSUdJTiA9IDAsICAgIExFTkdUSCA9IDhLCiAgZGF0YSAgIChy
dyF4KSA6IE9SSUdJTiA9IDB4ODAwMDYwLCBMRU5HVEggPSAzMjY3MgogIGVl
cHJvbSAocncheCkgOiBPUklHSU4gPSAweDgxMDAwMCwgTEVOR1RIID0gNTEy
Cn0KU0VDVElPTlMKewogIC8qIFJlYWQtb25seSBzZWN0aW9ucywgbWVyZ2Vk
IGludG8gdGV4dCBzZWdtZW50OiAqLwogIC5oYXNoICAgICAgICAgIDogeyAq
KC5oYXNoKQkJfQogIC5keW5zeW0gICAgICAgIDogeyAqKC5keW5zeW0pCQl9
CiAgLmR5bnN0ciAgICAgICAgOiB7ICooLmR5bnN0cikJCX0KICAuZ251LnZl
cnNpb24gICA6IHsgKiguZ251LnZlcnNpb24pCX0KICAuZ251LnZlcnNpb25f
ZCAgIDogeyAqKC5nbnUudmVyc2lvbl9kKQl9CiAgLmdudS52ZXJzaW9uX3Ig
ICA6IHsgKiguZ251LnZlcnNpb25fcikJfQogIC5yZWwuaW5pdCAgICAgIDog
eyAqKC5yZWwuaW5pdCkJfQogIC5yZWxhLmluaXQgICAgIDogeyAqKC5yZWxh
LmluaXQpCX0KICAucmVsLnRleHQgICAgICA6CiAgICB7CiAgICAgICooLnJl
bC50ZXh0KQogICAgICAqKC5yZWwudGV4dC4qKQogICAgICAqKC5yZWwuZ251
LmxpbmtvbmNlLnQqKQogICAgfQogIC5yZWxhLnRleHQgICAgIDoKICAgIHsK
ICAgICAgKigucmVsYS50ZXh0KQogICAgICAqKC5yZWxhLnRleHQuKikKICAg
ICAgKigucmVsYS5nbnUubGlua29uY2UudCopCiAgICB9CiAgLnJlbC5maW5p
ICAgICAgOiB7ICooLnJlbC5maW5pKQl9CiAgLnJlbGEuZmluaSAgICAgOiB7
ICooLnJlbGEuZmluaSkJfQogIC5yZWwucm9kYXRhICAgIDoKICAgIHsKICAg
ICAgKigucmVsLnJvZGF0YSkKICAgICAgKigucmVsLnJvZGF0YS4qKQogICAg
ICAqKC5yZWwuZ251LmxpbmtvbmNlLnIqKQogICAgfQogIC5yZWxhLnJvZGF0
YSAgIDoKICAgIHsKICAgICAgKigucmVsYS5yb2RhdGEpCiAgICAgICooLnJl
bGEucm9kYXRhLiopCiAgICAgICooLnJlbGEuZ251LmxpbmtvbmNlLnIqKQog
ICAgfQogIC5yZWwuZGF0YSAgICAgIDoKICAgIHsKICAgICAgKigucmVsLmRh
dGEpCiAgICAgICooLnJlbC5kYXRhLiopCiAgICAgICooLnJlbC5nbnUubGlu
a29uY2UuZCopCiAgICB9CiAgLnJlbGEuZGF0YSAgICAgOgogICAgewogICAg
ICAqKC5yZWxhLmRhdGEpCiAgICAgICooLnJlbGEuZGF0YS4qKQogICAgICAq
KC5yZWxhLmdudS5saW5rb25jZS5kKikKICAgIH0KICAucmVsLmN0b3JzICAg
ICA6IHsgKigucmVsLmN0b3JzKQl9CiAgLnJlbGEuY3RvcnMgICAgOiB7ICoo
LnJlbGEuY3RvcnMpCX0KICAucmVsLmR0b3JzICAgICA6IHsgKigucmVsLmR0
b3JzKQl9CiAgLnJlbGEuZHRvcnMgICAgOiB7ICooLnJlbGEuZHRvcnMpCX0K
ICAucmVsLmdvdCAgICAgICA6IHsgKigucmVsLmdvdCkJCX0KICAucmVsYS5n
b3QgICAgICA6IHsgKigucmVsYS5nb3QpCQl9CiAgLnJlbC5ic3MgICAgICAg
OiB7ICooLnJlbC5ic3MpCQl9CiAgLnJlbGEuYnNzICAgICAgOiB7ICooLnJl
bGEuYnNzKQkJfQogIC5yZWwucGx0ICAgICAgIDogeyAqKC5yZWwucGx0KQkJ
fQogIC5yZWxhLnBsdCAgICAgIDogeyAqKC5yZWxhLnBsdCkJCX0KICAvKiBJ
bnRlcm5hbCB0ZXh0IHNwYWNlIG9yIGV4dGVybmFsIG1lbW9yeSAqLwogIC50
ZXh0IDoKICB7CiAgICAqKC5pbml0KQogICAgKigucHJvZ21lbS5nY2MqKQog
ICAgKigucHJvZ21lbSopCiAgICAuID0gQUxJR04oMik7CiAgICAqKC50ZXh0
KQogICAgLiA9IEFMSUdOKDIpOwogICAgKigudGV4dC4qKQogICAgLiA9IEFM
SUdOKDIpOwogICAgKiguZmluaSkKICAgICBfZXRleHQgPSAuIDsgCiAgfSAg
PiB0ZXh0CiAgLmRhdGEJICA6IEFUIChBRERSICgudGV4dCkgKyBTSVpFT0Yg
KC50ZXh0KSkKICB7CiAgICAgUFJPVklERSAoX19kYXRhX3N0YXJ0ID0gLikg
OyAKICAgICooLmRhdGEpCiAgICAqKC5nbnUubGlua29uY2UuZCopCiAgICAu
ID0gQUxJR04oMik7CiAgICAgX2VkYXRhID0gLiA7IAogIH0gID4gZGF0YQog
IC5ic3MgIFNJWkVPRiguZGF0YSkgKyBBRERSKC5kYXRhKSA6CiAgewogICAg
IFBST1ZJREUgKF9fYnNzX3N0YXJ0ID0gLikgOyAKICAgICooLmJzcykKICAg
ICooQ09NTU9OKQogICAgIFBST1ZJREUgKF9fYnNzX2VuZCA9IC4pIDsgCiAg
ICAgX2VuZCA9IC4gOyAgCiAgfSAgPiBkYXRhCiAgLmVlcHJvbSAgOgoJQVQg
KEFERFIgKC50ZXh0KSArIFNJWkVPRiAoLnRleHQpICsgU0laRU9GICguZGF0
YSkpCiAgewogICAgKiguZWVwcm9tKikKICAgICBfX2VlcHJvbV9lbmQgPSAu
IDsgCiAgfSAgPiBlZXByb20KICAKICAvKiBTdGFicyBkZWJ1Z2dpbmcgc2Vj
dGlvbnMuICAqLwogIC5zdGFiIDAgOiB7ICooLnN0YWIpIH0KICAuc3RhYnN0
ciAwIDogeyAqKC5zdGFic3RyKSB9CiAgLnN0YWIuZXhjbCAwIDogeyAqKC5z
dGFiLmV4Y2wpIH0KICAuc3RhYi5leGNsc3RyIDAgOiB7ICooLnN0YWIuZXhj
bHN0cikgfQogIC5zdGFiLmluZGV4IDAgOiB7ICooLnN0YWIuaW5kZXgpIH0K
ICAuc3RhYi5pbmRleHN0ciAwIDogeyAqKC5zdGFiLmluZGV4c3RyKSB9CiAg
LmNvbW1lbnQgMCA6IHsgKiguY29tbWVudCkgfQogIC8qIERXQVJGIGRlYnVn
IHNlY3Rpb25zLgogICAgIFN5bWJvbHMgaW4gdGhlIERXQVJGIGRlYnVnZ2lu
ZyBzZWN0aW9ucyBhcmUgcmVsYXRpdmUgdG8gdGhlIGJlZ2lubmluZwogICAg
IG9mIHRoZSBzZWN0aW9uIHNvIHdlIGJlZ2luIHRoZW0gYXQgMC4gICovCiAg
LyogRFdBUkYgMSAqLwogIC5kZWJ1ZyAgICAgICAgICAwIDogeyAqKC5kZWJ1
ZykgfQogIC5saW5lICAgICAgICAgICAwIDogeyAqKC5saW5lKSB9CiAgLyog
R05VIERXQVJGIDEgZXh0ZW5zaW9ucyAqLwogIC5kZWJ1Z19zcmNpbmZvICAw
IDogeyAqKC5kZWJ1Z19zcmNpbmZvKSB9CiAgLmRlYnVnX3NmbmFtZXMgIDAg
OiB7ICooLmRlYnVnX3NmbmFtZXMpIH0KICAvKiBEV0FSRiAxLjEgYW5kIERX
QVJGIDIgKi8KICAuZGVidWdfYXJhbmdlcyAgMCA6IHsgKiguZGVidWdfYXJh
bmdlcykgfQogIC5kZWJ1Z19wdWJuYW1lcyAwIDogeyAqKC5kZWJ1Z19wdWJu
YW1lcykgfQogIC8qIERXQVJGIDIgKi8KICAuZGVidWdfaW5mbyAgICAgMCA6
IHsgKiguZGVidWdfaW5mbykgKiguZ251LmxpbmtvbmNlLndpLiopIH0KICAu
ZGVidWdfYWJicmV2ICAgMCA6IHsgKiguZGVidWdfYWJicmV2KSB9CiAgLmRl
YnVnX2xpbmUgICAgIDAgOiB7ICooLmRlYnVnX2xpbmUpIH0KICAuZGVidWdf
ZnJhbWUgICAgMCA6IHsgKiguZGVidWdfZnJhbWUpIH0KICAuZGVidWdfc3Ry
ICAgICAgMCA6IHsgKiguZGVidWdfc3RyKSB9CiAgLmRlYnVnX2xvYyAgICAg
IDAgOiB7ICooLmRlYnVnX2xvYykgfQogIC5kZWJ1Z19tYWNpbmZvICAwIDog
eyAqKC5kZWJ1Z19tYWNpbmZvKSB9CiAgCiAgUFJPVklERSAoX19zdGFjayA9
IDB4N2ZmZikgOwogIFBST1ZJREUgKF9faW5pdF9tY3Vjcl9fID0gMHg4MCkg
OwogIFBST1ZJREUgKF9faW5pdF93ZHRjcl9fID0gMHgwMCkgOwp9CgoKCg==

------------=_988968872-6075-0
Content-Type: text/plain; name="makefile"
Content-Disposition: inline; filename="makefile"
Content-Transfer-Encoding: base64

I01ha2UgZmlsZSB3aXRoIGxpbmsgdGltZSBpbml0aWFsaXphdGlvbiBvZiB0
aGUgc3RhY2sgcG9pbnRlciwgTUNVQ1IgYW5kIHdhdGNoZG9nIGNvbnRyb2wg
cmVnaXN0ZXIuDQojSW4gb3JkZXIgdG8gdGVsbCB0aGUgbGlua2VyIGhvdyBt
dWNoIFNSQU0gWW91IGhhdmUgdXNlIHRoZSBhdHRhY2hlZCBsb2NhbCBsaW5r
ZXIgc2NyaXB0IGZpbGUuDQojTW9kaWZ5IGxlbmd0aCBvZiBkYXRhIHNlZ21l
bnQ6ICdkYXRhIChydyF4KSA6IE9SSUdJTiA9IDB4ODAwMDYwLCBMRU5HVEgg
PSAuLi4nICA8LSA1MTI7IDMyNjcyDQojTW9kaWZpZWQgYnkgTW9sbmFyIFpv
bHRhbiwgb3JpZ2luYWwgYnkgVm9sa2VyIE90aC4NCiNTcGVjaWFsIHRoYW5r
cyBmb3IgdGhlaXIgaGVscCB0byBKYXNvbiBLeWxlIGF2ckBqcGsuY28ubnog
YW5kIEx1ZG92aWMgQ09VUlRFUyA8THVkb3ZpYy5Db3VydGVzQHV0Ym0uZnI+
DQojR29vZCBsdWNrIHVzaW5nIGl0Lg0KDQojIyMjIyMgZGVmaW5lIHNvbWUg
dmFyaWFibGVzIGJhc2VkIG9uIHRoZSBBVlIgYmFzZSBwYXRoIGluICQoQVZS
KSAjIyMjIyMjDQoJQ0M9YXZyLWdjYw0KCUFTPWF2ci1nY2MgLXggYXNzZW1i
bGVyLXdpdGgtY3BwCQ0KCVJNPXJtIC1mDQoJUk49bXYNCglCSU49YXZyLW9i
amNvcHkNCglJTkNESVI9Lg0KCUxJQkRJUj0kKEFWUikvYXZyL2xpYg0KICAg
ICAgICBTSEVMTD0kKEFWUikvYmluL3NoLmV4ZQ0KIyMjIyMjIG91dHB1dCBm
b3JtYXQgY2FuIGJlIHNyZWMsIGloZXggKGF2cm9iaiBpcyBhbHdheXMgY3Jl
YXRlZCkgIyMjIyMjIw0KCUZPUk1BVD1paGV4DQojIyMjIyMjIyMjIyMjIyMj
IyMjIyMjIyMjIyBkZWZhdWx0IG1jdSB0eXBlICMjIyMjIyMjIyMjIyMjIyMj
IyMjIyMjIyMjIyMjDQojcHV0IHRoZSBuYW1lIG9mIHRoZSB0YXJnZXQgbWN1
IGhlcmUgKGF0OTBzODUxNSwgYXQ5MHM4NTM1LCBhdHRpbnkyMiwgYXRtZWdh
NjAzIGV0Yy4pDQoJTUNVPWF0OTBzODUxNQ0KIyMjIyMjIyMjIyMjIyMjIyMj
IyMjIyMgZGVmYXVsdCBjb21waWxlciBmbGFncyAjIyMjIyMjIyMjIyMjIyMj
IyMjIyMjIyMjIw0KCUNQRkxBR1M9LWcgLU9zIC1XYWxsIC1Xc3RyaWN0LXBy
b3RvdHlwZXMgLVdhLC1haGxtcz0kKDw6LmM9LmxzdCkNCiMjIyMjIyMjIyMj
IyMjIyMjIyMjIyMjIGRlZmF1bHQgYXNzZW1ibGVyIGZsYWdzICMjIyMjIyMj
IyMjIyMjIyMjIyMjIyMjIyMNCglBU0ZMQUdTPS1XYSwtZ3N0YWJzDQojIyMj
IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyBkZWZhdWx0IGxpbmtlciBmbGFncyAj
IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjDQoJTERGTEFHUz0tV2wsLU1hcD0k
KFRSRykubWFwLC0tY3JlZiwtVGF2cjg1eHgueA0KDQojcHV0IHRoZSBuYW1l
IG9mIHRoZSB0YXJnZXQgZmlsZSBoZXJlICh3aXRob3V0IGV4dGVuc2lvbikN
CglUUkc9dGVzdDINCgkNCiNwdXQgeW91ciBDIHNvdXJjZWZpbGVzIGhlcmUg
DQoJU1JDPSAkKFRSRykuYyANCg0KI3B1dCBhZGRpdGlvbmFsIGFzc2VtYmxl
ciBzb3VyY2UgZmlsZSBoZXJlDQoJQVNSQz0gDQoNCiNhZGRpdGlvbmFsIGxp
YnJhcmllcyBhbmQgb2JqZWN0IGZpbGVzIHRvIGxpbmsNCglMSUI9DQoNCiNh
ZGRpdGlvbmFsIGluY2x1ZGVzIHRvIGNvbXBpbGUNCglJTkM9IA0KDQojIyMj
IyMjIyMjIyB5b3Ugc2hvdWxkIG5vdCBuZWVkIHRvIGNoYW5nZSB0aGUgZm9s
bG93aW5nIGxpbmUgIyMjIyMjIyMjIyMjIw0KI2RlZmluZSBhbGwgcHJvamVj
dCBzcGVjaWZpYyBvYmplY3QgZmlsZXMNCglPQkoJPSAkKEFTUkM6LnM9Lm8p
ICQoU1JDOi5jPS5vKSANCglDUEZMQUdTICs9IC1tbWN1PSQoTUNVKQ0KCUFT
RkxBR1MgKz0gLW1tY3U9JChNQ1UpDQoJTERGTEFHUyArPSAtbW1jdT0kKE1D
VSkgIA0KCUxERkxBR1MgKz0gLVhsaW5rZXIgLS1kZWZzeW0gLVhsaW5rZXIg
X19pbml0X3dkdGNyX189MHgwMAkNCglMREZMQUdTICs9IC1YbGlua2VyIC0t
ZGVmc3ltIC1YbGlua2VyIF9faW5pdF9tY3Vjcl9fPTB4ODAJDQoJTERGTEFH
UyArPSAtWGxpbmtlciAtLWRlZnN5bSAtWGxpbmtlciBfX3N0YWNrPTB4N0ZG
Rg0KCQ0KI3RoaXMgZGVmaW5lcyB0aGUgYWltcyBvZiB0aGUgbWFrZSBwcm9j
ZXNzDQphbGw6CSQoVFJHKS5vYmogJChUUkcpLmVsZiAkKFRSRykucm9tICMk
KFRSRykuZWVwDQoNCg0KI2NvbXBpbGU6IGluc3RydWN0aW9ucyB0byBjcmVh
dGUgYXNzZW1ibGVyIGFuZC9vciBvYmplY3QgZmlsZXMgZnJvbSBDIHNvdXJj
ZQ0KJW8gOiAlYyANCgkkKENDKSAtYyAkKENQRkxBR1MpIC1JJChJTkNESVIp
ICAkPCAtbyAkQA0KDQolcyA6ICVjDQoJJChDQykgLVMgJChDUEZMQUdTKSAt
SSQoSU5DRElSKSAkPCAtbyAkQA0KDQojYXNzZW1ibGU6IGluc3RydWN0aW9u
cyB0byBjcmVhdGUgb2JqZWN0IGZpbGUgZnJvbSBhc3NlbWJsZXIgZmlsZXMN
CiVvIDogJXMNCgkkKEFTKSAtYyAkKEFTRkxBR1MpIC1JJChJTkNESVIpICQ8
IC1vICRADQoNCiNsaW5rOiBpbnN0cnVjdGlvbnMgdG8gY3JlYXRlIGVsZiBv
dXRwdXQgZmlsZSBmcm9tIG9iamVjdCBmaWxlcw0KJWVsZjogJChPQkopDQoN
CgkkKENDKSAkKE9CSikgJChMSUIpICQoTERGTEFHUykgLW8gJEANCg0KI2Ny
ZWF0ZSBhdnJvYmogZmlsZSBmcm9tIGVsZiBvdXRwdXQgZmlsZQ0KJW9iajog
JWVsZg0KCSQoQklOKSAtTyBhdnJvYmogLVIgLmVlcHJvbSAkPCAkQA0KDQoj
Y3JlYXRlIGJpbiAoaWhleCwgc3JlYykgZmlsZSBmcm9tIGVsZiBvdXRwdXQg
ZmlsZQ0KJXJvbTogJWVsZg0KCSQoQklOKSAtTyAkKEZPUk1BVCkgLVIgLmVl
cHJvbSAkPCAkQA0KDQolZWVwOiAlZWxmDQoJJChCSU4pIC1qIC5lZXByb20g
LS1zZXQtc2VjdGlvbi1mbGFncz0uZWVwcm9tPSJhbGxvYyxsb2FkIiAtLWNo
YW5nZS1zZWN0aW9uLWxtYSAuZWVwcm9tPTAgLU8gJChGT1JNQVQpICQ8ICRA
DQoNCiMjIyMjIyBkZXBlbmRlY2llcywgYWRkIGFueSBkZXBlbmRlbmNpZXMg
eW91IG5lZWQgaGVyZSAjIyMjIyMjIyMjIyMjIyMjIyMjDQokKFRSRykubzog
JChUUkcpLmMgDQoNCiNtYWtlIGluc3RydWN0aW9uIHRvIGRlbGV0ZSBjcmVh
dGVkIGZpbGVzDQpjbGVhbjoNCgkkKFJNKSAkKE9CSikNCgkkKFJNKSAkKFNS
QzouYz0ucykNCgkkKFJNKSAkKFNSQzouYz0ubHN0KQ0KCSQoUk0pICQoVFJH
KS5tYXANCgkkKFJNKSAkKFRSRykuZWxmDQoJJChSTSkgJChUUkcpLm9iag0K
CSQoUk0pICQoVFJHKS5lZXANCgkkKFJNKSAkKFRSRykucm9tDQoJJChSTSkg
Ki5iYWsNCgkkKFJNKSAqLmxvZw==

------------=_988968872-6075-0--

From [email-masked] Sun May 06 22:09:19 2001
Received: from smtp4.ihug.co.nz ([203.109.252.5])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14wLTb-0003Zb-00
for <[email-masked]>; Sun, 06 May 2001 22:09:19 +1200
Received: from guy (203-173-247-173.nzwide.ihug.co.nz [203.173.247.173])
by smtp4.ihug.co.nz (8.9.3/8.9.3/Debian 8.9.3-21) with SMTP id WAA29943
for <[email-masked]>; Sun, 6 May 2001 22:10:58 +1200
X-Authentication-Warning: smtp4.ihug.co.nz: Host 203-173-247-173.nzwide.ihug.co.nz [203.173.247.173] claimed to be guy
Message-ID: <[email-masked]>
From: "Guy Robinson" <[email-masked]>
To: <[email-masked]>
Date: Sun, 6 May 2001 22:08:26 +1200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Solution to function pointers in program memory-FYI
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,
For those who have been following my attempt to get an array of function
pointers into program memory please have a look at the following solution.
Most of this is due to Larry Barello's code examples and help (thank you
Larry)and as written works correctly. The program reads a number from a SRAM
tasklist(FuncToRun) and runs the appropriate function from the function
array in program memory.

I don't know if the pgm_rw macro will work in every circumstance but it does
here. Any GCC assembler experts please feel free to poke holes in the macro
as a reliable read word from flash macro would to be very useful command to
have around.

Regards,

Guy

#include <io.h>
#include <pgmspace.h>

typedef unsigned char u08;
typedef unsigned int u16;

/* the actual functions all must match the type TFunctionPtr */
typedef void(*TFunctionPtr)();

#define pgm_rw(addr) ({ \
u16 __word; \
__asm__ ( \
"mov r30,%A1\n\t" \
"mov r31,%B1\n\t" \
"lpm\n\t" \
"mov %A1, R0\n\t" \
"adiw r30, 1\n\t" \
"lpm\n\t" \
"mov %A0,%A1\n\t" \
"mov %B0,R0\n\t" \
: "=z" (__word) \
: "r" ((u16)(addr)) \
: "r0" ); \
__word; \
})

void function0(); // function prototypes
void function1();
void RunFunc();

static u08 FuncToRun[] ={1,0,1,1,0,0,1,1,0,99};
static u08 *pFTR; // pointer to FunctionToRun array
// function pointer array in program memory
TFunctionPtr CommandArray[] __attribute__ ((progmem))={function0,function1};

void main(void)
{
pFTR = &FuncToRun[0]; // initialise pointer
do
{
RunFunc();
pFTR++;
}
while(*pFTR != 99);
}

// run required function
void RunFunc()
{
((TFunctionPtr)(pgm_rw(&CommandArray[*pFTR])))();

}
// functions
void function0(){
}
void function1(){
}

From [email-masked] Mon May 07 06:33:11 2001
Received: from ces1.ces.uoguelph.ca ([131.104.236.204] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14wTLC-0004Mc-00
for <[email-masked]>; Mon, 07 May 2001 06:33:10 +1200
Received: from localhost (jlawson@localhost)
by CES1.ces.uoguelph.ca (8.10.2/8.10.2) with ESMTP id f46ILO912940
for <[email-masked]>; Sun, 6 May 2001 14:21:24 -0400
Date: Sun, 6 May 2001 14:21:24 -0400 (EDT)
From: Jamie Lawson <[email-masked]>
To: <[email-masked]>
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] Invalid bfd target
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

/opt/avrgcc/bin/avr-objcopy: avrlcd.obj: Invalid bfd target

What exactly does this mean? I get this error whenever I attempt any of
the avrgcc versions for Linux. It seems to be the step which should
create the ihex or srec file.

Thanks.

Jamie Lawson

From [email-masked] Mon May 07 08:26:32 2001
Received: from [212.184.210.65] (helo=romulus.maridan.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14wV6t-0004Xu-00
for <[email-masked]>; Mon, 07 May 2001 08:26:31 +1200
Received: from egnite.net (pD900A934.dip.t-dialin.net [217.0.169.52])
by romulus.maridan.net (8.9.3/8.9.3) with SMTP id WAA15576
for <[email-masked]>; Sun, 6 May 2001 22:27:40 +0200
Message-Id: <[email-masked]>
From: "Harald Kipp" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Sun, 06 May 2001 22:31:43 +0100 (MEZ)
Reply-To: "Harald Kipp" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 2.00.1500 for OS/2 Warp 4.00
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: RE: [avr-gcc-list] Inline assembly in AVR-GCC
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I've tried to make up a little cookbook about this topic.

You can download the PDF file from

http://www.egnite.de/en/main1_1_3.htm

The name of the file is GCCAVRInlAsmCB.pdf.

I'd appreciate email response and redistribution of
this manual.

Harald Kipp

egnite Software GmbH TEL +49 (0)2323-925375
Westring 303 FAX +49 (0)2323-925374
44629 Herne
Germany

Embedded Ethernet - http://www.egnite.de/

From [email-masked] Mon May 07 02:44:13 2001
Received: from [200.214.174.70] (helo=webmail.vento.com.br)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14wPld-0003yS-00
for <[email-masked]>; Mon, 07 May 2001 02:44:13 +1200
Received: from lin1.localdomain (200.251.188.123) by webmail.vento.com.br (5.1.056)
id 3AED59F40006740B; Sun, 6 May 2001 11:45:53 -0300
From: Francisco T. A. Silva <[email-masked]>
Date: Sun, 6 May 2001 11:45:52 -0300
X-Mailer: KMail [version 1.1.99]
Content-Type: text/plain;
charset="iso-8859-1"
To: [email-masked],
[email-masked]
MIME-Version: 1.0
Message-Id: <[email-masked]>
Content-Transfer-Encoding: 8bit
Subject: [avr-gcc-list] avr-gcc linux tarball
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

For those that may be interested:

http://hp.vento.com.br/~frantas/avr-gcc_3.0_20010506_avr-binutils_2.11_avr-libc_20010331.linux.i586.tar.bz2
Size: 2.7M

Works fine for me, but not otherwise tested...

Regards,
--
Francisco

From [email-masked] Mon May 07 15:58:44 2001
Received: from [24.25.2.193] (helo=bsdhome.dyndns.org)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14wcAV-0005ER-00
for <[email-masked]>; Mon, 07 May 2001 15:58:44 +1200
Received: from vger.bsdhome.com (vger [192.168.220.2])
by bsdhome.dyndns.org (8.11.3/8.11.3) with ESMTP id f473xrj00563;
Sun, 6 May 2001 23:59:54 -0400 (EDT)
(envelope-from [email-masked])
Received: (from bsd@localhost)
by vger.bsdhome.com (8.11.3/8.11.1) id f473xrH46580;
Sun, 6 May 2001 23:59:53 -0400 (EDT)
(envelope-from bsd)
Date: Sun, 6 May 2001 23:59:53 -0400
From: Brian Dean <[email-masked]>
To: Kang Tin LAI <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Bug report
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Thu, Apr 19, 2001 at 10:20:42PM +0800
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Thu, Apr 19, 2001 at 10:20:42PM +0800, Kang Tin LAI wrote:

> Source:
>
> char adc_flag = NOT_RDY; /* external, (i.e., in SRAM) */
> ...
> ...
>
> while (adc_flag == NOT_RDY); /* wait for interrupt to set to RDY */
>
>
> asm generated:
>
> lds r24,adc_flag <- value is load to R24 only once
> .L33:
> tst r24 <- dead loop tests dead value
> breq .L33 <- never quit the loop
>
> Label location .L33: should be before lds instruction?

You need to qualify adc_flag as volatile, i.e.,

volatile char adc_flag = NOT_RDY;

That is a flag to the compiler telling it that the variable may be
modified without its knowledge (such as within an interrupt handler),
and thus not to optimize the access by caching its value in a
register.

-Brian

From [email-masked] Mon May 07 21:43:08 2001
Received: from [212.184.210.65] (helo=romulus.maridan.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14whXm-0005iz-00
for <[email-masked]>; Mon, 07 May 2001 21:43:07 +1200
Received: from egnite.net (pD900A87B.dip.t-dialin.net [217.0.168.123])
by romulus.maridan.net (8.9.3/8.9.3) with SMTP id LAA24630
for <[email-masked]>; Mon, 7 May 2001 11:44:07 +0200
Message-Id: <[email-masked]>
From: "Harald Kipp" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Mon, 07 May 2001 11:48:07 +0100 (MEZ)
Reply-To: "Harald Kipp" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 2.00.1500 for OS/2 Warp 4.00
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: [avr-gcc-list] Inline assembly in AVR-GCC
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>You say under bullit 2 that the first colon section is the inputs ("=r") -
>clearly the output section as described later on.

Thanks.

Updated version 1.1 is available at

http://www.egnite.de/en/main1_1_3.htm

It corrects this bug and a few typos. In addition, multibyte
operand handling and an index had been added.

Harald Kipp

egnite Software GmbH TEL +49 (0)2323-925375
Westring 303 FAX +49 (0)2323-925374
44629 Herne
Germany

Embedded Ethernet - http://www.egnite.de/

From [email-masked] Mon May 07 22:12:37 2001
Received: from [212.184.210.65] (helo=romulus.maridan.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14wi0J-0005lh-00
for <[email-masked]>; Mon, 07 May 2001 22:12:35 +1200
Received: from egnite.net (pD900A755.dip.t-dialin.net [217.0.167.85])
by romulus.maridan.net (8.9.3/8.9.3) with SMTP id MAA27661
for <[email-masked]>; Mon, 7 May 2001 12:13:45 +0200
Message-Id: <[email-masked]>
From: "Harald Kipp" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Mon, 07 May 2001 12:17:45 +0100 (MEZ)
Reply-To: "Harald Kipp" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 2.00.1500 for OS/2 Warp 4.00
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: [avr-gcc-list] Solution to function pointers in program memory-FYI
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

How about

#define pgm_rw(addr) ({ \
u16 __word; \
__asm__ ( \
"lpm\n\t" \
"mov %A0, r0\n\t" \
"adiw r30, 1\n\t" \
"lpm\n\t" \
"mov %B0, r0\n\t" \
: "=&r" (__word) \
: "z" ((u16)(addr)) \
: "r0" ); \
__word; \
})

The clobbered r0 need not to be specified. However,
I'd leave it, because otherwise the macro depends
on r0 defined as __tmp_reg__. As far as I know,
putting r0 in the clobber list won't hurt.

Harald Kipp

egnite Software GmbH TEL +49 (0)2323-925375
Westring 303 FAX +49 (0)2323-925374
44629 Herne
Germany

Embedded Ethernet - http://www.egnite.de/

From [email-masked] Mon May 07 23:28:00 2001
Received: from smtp1.ihug.co.nz ([203.109.252.7])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14wjBI-0005sm-00
for <[email-masked]>; Mon, 07 May 2001 23:28:00 +1200
Received: from guy (203-173-203-168.nzwide.ihug.co.nz [203.173.203.168])
by smtp1.ihug.co.nz (8.9.3/8.9.3/Debian 8.9.3-21) with SMTP id XAA28718
for <[email-masked]>; Mon, 7 May 2001 23:29:45 +1200
X-Authentication-Warning: smtp1.ihug.co.nz: Host 203-173-203-168.nzwide.ihug.co.nz [203.173.203.168] claimed to be guy
Message-ID: <[email-masked]>
From: "Guy Robinson" <[email-masked]>
To: <[email-masked]>
Date: Mon, 7 May 2001 23:26:52 +1200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Re: Solution to function pointers in program memory-FYI
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Harald,

This is what Larry had suggested first. Although this worked with a local
variable passing the address, when I tried to use a global pointer it was
picking up the wrong registers. Hence the A1 and B1 in my macro (R24,R25).
My program has changed already with more code in the RunFunc() and it still
compiles correctly, so my macro seems reasonably robust when the addr is
global.

I've just started to read your .pdf on assembly for more assem clues.

Guy

----- Original Message -----
From: "Harald Kipp" <[email-masked]>
To: <[email-masked]>
Sent: Monday, May 07, 2001 11:17 PM
Subject: Re: [avr-gcc-list] Solution to function pointers in program
memory-FYI

> How about
>
> #define pgm_rw(addr) ({ \
> u16 __word; \
> __asm__ ( \
> "lpm\n\t" \
> "mov %A0, r0\n\t" \
> "adiw r30, 1\n\t" \
> "lpm\n\t" \
> "mov %B0, r0\n\t" \
> : "=&r" (__word) \
> : "z" ((u16)(addr)) \
> : "r0" ); \
> __word; \
> })
>
> The clobbered r0 need not to be specified. However,
> I'd leave it, because otherwise the macro depends
> on r0 defined as __tmp_reg__. As far as I know,
> putting r0 in the clobber list won't hurt.
>
> Harald Kipp
>
> egnite Software GmbH TEL +49 (0)2323-925375
> Westring 303 FAX +49 (0)2323-925374
> 44629 Herne
> Germany
>
> Embedded Ethernet - http://www.egnite.de/
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Tue May 08 00:53:20 2001
Received: from [212.184.210.65] (helo=romulus.maridan.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14wkVq-00060y-00
for <[email-masked]>; Tue, 08 May 2001 00:53:19 +1200
Received: from egnite.net (pD9009F85.dip.t-dialin.net [217.0.159.133])
by romulus.maridan.net (8.9.3/8.9.3) with SMTP id OAA05476
for <[email-masked]>; Mon, 7 May 2001 14:54:32 +0200
Message-Id: <[email-masked]>
From: "Harald Kipp" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Mon, 07 May 2001 14:58:34 +0100 (MEZ)
Reply-To: "Harald Kipp" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 2.00.1500 for OS/2 Warp 4.00
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Inline functions vs. defined macros
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Is there any advantage of macros vs. static inline functions?

The only one I can imagine is compatibility.

Harald Kipp

egnite Software GmbH TEL +49 (0)2323-925375
Westring 303 FAX +49 (0)2323-925374
44629 Herne
Germany

Embedded Ethernet - http://www.egnite.de/

From [email-masked] Tue May 08 02:39:24 2001
Received: from mtiwmhc28.worldnet.att.net ([204.127.131.36])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14wmAV-0006Ax-00
for <[email-masked]>; Tue, 08 May 2001 02:39:24 +1200
Received: from jimanji ([12.93.211.68]) by mtiwmhc28.worldnet.att.net
(InterMail vM.4.01.03.16 201-229-121-116-20010115) with SMTP
id <20010507144038.KFTE6429.mtiwmhc28.worldnet.att.net@jimanji>
for <[email-masked]>; Mon, 7 May 2001 14:40:38 +0000
Message-ID: <[email-masked]>
Reply-To: "Jim Pearce" <[email-masked]>
From: "Jim Pearce" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Simulating with AVR-Studio
Date: Mon, 7 May 2001 10:40:49 -0300
Organization: Pegasus Technologies
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I guess I was a bit loose with my definitions!

Anyway, a bit of history on the post. I was using Larry Barello's excellent
AvrX kernel. It has the following in its AvrX.h file:

<snip>
extern inline void Epilog(void) { asm("\trjmp _Epilog\n"); }
<\snip>

This is placed at the end of ISRs to return control to the kernel. For example:

AVRX_SIGINT(SIG_OVERFLOW0)
{
IntProlog(); // Switch to kernel stack/context
outp(TCNT0_INIT, TCNT0); // Reset timer overflow count
AvrXTimerHandler(); // Call Time queue manager
Epilog(); // Return to tasks
}

As written it causes problems for Astudio, specifically the disassembly for the
module that contains the macro call will not be displayed.

If instead you do:

#define Epilog1() { asm("\trjmp _Epilog\n"); }

AVRX_SIGINT(SIG_OVERFLOW0)
{
IntProlog(); // Switch to kernel stack/context
outp(TCNT0_INIT, TCNT0); // Reset timer overflow count
AvrXTimerHandler(); // Call Time queue manager
Epilog1(); // Return to tasks
}

Astudio is happy and shows all of your source disassembly.

Jim

From [email-masked] Tue May 08 02:55:17 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14wmPr-0006CY-00
for <[email-masked]>; Tue, 08 May 2001 02:55:16 +1200
Received: (from j@localhost)
by ida.interface-business.de id f47Euv386016;
Mon, 7 May 2001 16:56:57 +0200 (MET DST)
Date: Mon, 7 May 2001 16:56:57 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] Inline functions vs. defined macros
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Harald Kipp" <[email-masked]> wrote:

> Is there any advantage of macros vs. static inline functions?

They are better debuggable. Of course, this is a moot point for AVR
unless you've got the gdb support up & running.

They perform argument type checking.

They never risk to evaluate their arguments more than once. Suppose a
poor implementation of tolower():

#define tolower(c) (((c) >= 'A' && (c) <= 'Z')? (c) ^ ('A'-'a'): (c))

....and now imagine that someone would call it like:

char *cp, x;

...
x = tolower(*cp++);

Now you might imagine why it could be important to evaluate arguments
only once. ;-)

> The only one I can imagine is compatibility.

For the AVR, there's IMHO only one other compiler to maintain
compatibility with (and we are IMHO already incmopatible enough, in
particular in library land), so who cares? Also, C++ has standardized
`inline', it's been a very common extension for C compilers for years
now, and if a target compiler doesn't support it, you'll quickly
notice it as a compile-time error.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Tue May 08 11:31:17 2001
Received: from texugo.ip.pt ([195.23.132.45] helo=relay.ip.pt)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14wuTE-00070L-00
for <[email-masked]>; Tue, 08 May 2001 11:31:16 +1200
Received: (qmail 15748 invoked from network); 7 May 2001 23:32:30 -0000
Received: from unknown (HELO mail.ip.pt) (195.23.132.41)
by texugo2.ip.pt with SMTP; 7 May 2001 23:32:30 -0000
Received: (qmail 30469 invoked from network); 7 May 2001 23:32:29 -0000
Received: from unknown (HELO pauloabr) ([195.23.165.8]) (envelope-sender <[email-masked]>)
by pargo.ip.pt (qmail-ldap-1.03) with SMTP
for <[email-masked]>; 7 May 2001 23:32:29 -0000
Message-ID: <000f01c0d74e$5e826a40$08a517c3@pauloabr>
From: "Paulo Abreu" <[email-masked]>
To: <[email-masked]>
Date: Tue, 8 May 2001 00:35:13 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Subject: [avr-gcc-list] Affecting variables
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I am doing something like this (unfortunately I forgot my .c file)

char bTest;

void init(void)
{
bTest=0;
}

/* receive uart handler */
SIGNAL(…….)
{
bTest=1;
}

int main(void)
{
if(bTest == 1)
{
/* do something*/
}
}

what is happening is that bTest is not being affected, that is, bTest!=1,
why?

I am using the last version of avr-gcc for windows.

Thanks in advance for your attention,

Paulo Abreu

From [email-masked] Tue May 08 11:49:56 2001
Received: from texugo.ip.pt ([195.23.132.45] helo=relay.ip.pt)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14wulH-00072h-00
for <[email-masked]>; Tue, 08 May 2001 11:49:55 +1200
Received: (qmail 18351 invoked from network); 7 May 2001 23:51:12 -0000
Received: from unknown (HELO mail.ip.pt) (195.23.132.41)
by texugo2.ip.pt with SMTP; 7 May 2001 23:51:12 -0000
Received: (qmail 32632 invoked from network); 7 May 2001 23:51:11 -0000
Received: from unknown (HELO pauloabr) ([195.23.165.8]) (envelope-sender <[email-masked]>)
by pargo.ip.pt (qmail-ldap-1.03) with SMTP
for <[email-masked]>; 7 May 2001 23:51:11 -0000
Message-ID: <005501c0d750$fb2782c0$08a517c3@pauloabr>
From: "Paulo Abreu" <[email-masked]>
To: <[email-masked]>
Date: Tue, 8 May 2001 00:53:55 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Subject: [avr-gcc-list] Affecting variables
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I am doing something like this (unfortunately I forgot my .c file)

char bTest;

void init(void)
{
bTest=0;
}

/* receive uart handler */
SIGNAL(…….)
{
bTest=1;
}

int main(void)
{

init();

while(1)
{
if(bTest == 1)
{
/* do something*/
}
}
}

what is happening is that bTest is not being affected, that is, bTest!=1,
why?

I am using the last version of avr-gcc for windows.

Thanks in advance for your attention,

Paulo Abreu

From [email-masked] Tue May 08 15:40:32 2001
Received: from mail.sttl.uswest.net ([206.81.192.5] helo=sttlpop5.sttl.uswest.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14wyMR-0007OS-00
for <[email-masked]>; Tue, 08 May 2001 15:40:31 +1200
Received: (qmail 19648 invoked by alias); 8 May 2001 03:42:07 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 19591 invoked by uid 0); 8 May 2001 03:42:06 -0000
Received: from vdsl25.sttl.uswest.net (HELO larry) (216.160.108.25)
by mail.sttl.uswest.net with SMTP; 8 May 2001 03:42:06 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <005501c0d750$fb2782c0$08a517c3@pauloabr>
Subject: Re: [avr-gcc-list] Affecting variables
Date: Mon, 7 May 2001 20:38:22 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

You need to declare bTest as a "volatile". The compiler has cached the
value of the variable in a register and referred to the register inside the
loop. Declaring it volatile will tell the compiler that the variable might
change between loops and to re-load it each time. Any shared static or
global variable that can be modified outside of the code flow (e.g.
multitasking or interrupts) needs to be declared volatile so the compiler
knows not to cache the value in a register.

Try using the -S compiler switch and generate the assembly code and look at
it. You can learn a lot that way.

Question: could someone illuminate the difference between:

volatile char bTest;
char volatile bTest;

or are they the same?

Cheers!

----- Original Message -----
From: "Paulo Abreu" <[email-masked]>
To: <[email-masked]>
Sent: Monday, May 07, 2001 4:53 PM
Subject: [avr-gcc-list] Affecting variables

> I am doing something like this (unfortunately I forgot my .c file)
>
> char bTest;
>
> void init(void)
> {
> bTest=0;
> }
>
> /* receive uart handler */
> SIGNAL(...)
> {
> bTest=1;
> }
>
> int main(void)
> {
>
> init();
>
> while(1)
> {
> if(bTest == 1)
> {
> /* do something*/
> }
> }
> }
>
>
> what is happening is that bTest is not being affected, that is, bTest!=1,
> why?
>
> I am using the last version of avr-gcc for windows.
>
> Thanks in advance for your attention,
>
> Paulo Abreu
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Tue May 08 17:56:57 2001
Received: from mail.pepperl-fuchs.com ([194.120.135.222] helo=de.pepperl-fuchs.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14x0US-0007b8-00
for <[email-masked]>; Tue, 08 May 2001 17:56:56 +1200
Received: from exmail.pepperl-fuchs.com (exmail.pepperl-fuchs.com [172.16.11.61])
by de.pepperl-fuchs.com (8.11.0/8.10.2) with ESMTP id f485wfl28955
for <[email-masked]>; Tue, 8 May 2001 07:58:41 +0200
Received: by exmail.pepperl-fuchs.com with Internet Mail Service (5.5.2650.21)
id <JF2BW87L>; Tue, 8 May 2001 07:56:32 +0200
Message-ID: <[email-masked]>
From: Stumpf Michael <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Subject: AW: [avr-gcc-list] Affecting variables
Date: Tue, 8 May 2001 07:56:31 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C0D783.A1A5D020"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C0D783.A1A5D020
Content-Type: text/plain;
charset="iso-8859-1"

As long as no pointers are involved the order of type specifiers
(char,int,..)
of type qualifiers (const,volatile) and storage class
(extern,static,auto,..)
doesn't matter.

If pointers are involved things change a bit:
type specifieres and storage classes are only allowed on left side of *
(though the storage class refers to the pointer rather than to the pointee)
any type qualifier on left side of * refers to the object pointed to,
any type qualifier on right side of * refers to the pointer itself, so
teh two declaratons below are the same, but

volatile char * pbTest // pointer to a volatile char
char * volatile pbTest // volatile pointer to a char
extern const char * volatile pbTest // extern volatile pointer pointing to a
const char

regards,
Michael

>
> Question: could someone illuminate the difference between:
>
> volatile char bTest;
> char volatile bTest;
>
> or are they the same?
>
> Cheers!
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

------_=_NextPart_001_01C0D783.A1A5D020
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>AW: [avr-gcc-list] Affecting variables</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>As long as no pointers are involved the order of type =
specifiers (char,int,..)</FONT>
<BR><FONT SIZE=3D2>of type qualifiers (const,volatile) and storage =
class (extern,static,auto,..)</FONT>
<BR><FONT SIZE=3D2>doesn't matter. </FONT>
</P>

<P><FONT SIZE=3D2>If pointers are involved things change a bit: </FONT>
<BR><FONT SIZE=3D2>type specifieres and storage classes are only =
allowed on left side of * </FONT>
<BR><FONT SIZE=3D2>(though the storage class refers to the pointer =
rather than to the pointee)</FONT>
<BR><FONT SIZE=3D2>any type qualifier on left side of * refers to the =
object pointed to, </FONT>
<BR><FONT SIZE=3D2>any type qualifier on right side of * refers to the =
pointer itself, so</FONT>
<BR><FONT SIZE=3D2>teh two declaratons below are the same, but</FONT>
</P>

<P><FONT SIZE=3D2>volatile char * pbTest // pointer to a volatile =
char</FONT>
<BR><FONT SIZE=3D2>char * volatile pbTest // volatile pointer to a =
char</FONT>
<BR><FONT SIZE=3D2>extern const char * volatile pbTest // extern =
volatile pointer pointing to a const char</FONT>
</P>

<P><FONT SIZE=3D2>regards,</FONT>
<BR><FONT SIZE=3D2>Michael</FONT>
</P>

<P><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Question: could someone illuminate the =
difference between:</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; volatile char bTest;</FONT>
<BR><FONT SIZE=3D2>&gt; char volatile bTest;</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; or are they the same?</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Cheers!</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; =
_______________________________________________</FONT>
<BR><FONT SIZE=3D2>&gt; avr-gcc-list mailing list</FONT>
<BR><FONT SIZE=3D2>&gt; [email-masked]</FONT>
<BR><FONT SIZE=3D2>&gt; <A =
HREF=3D"http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list" =
TARGET=3D"_blank">http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list</A>=
</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C0D783.A1A5D020--

From [email-masked] Tue May 08 19:13:48 2001
Received: from atusks01.alcatel.at ([212.183.9.130] helo=mail.alcatel.at)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14x1go-0007iT-00
for <[email-masked]>; Tue, 08 May 2001 19:13:47 +1200
Received: from alcatel.at (atusel33.aut.alcatel.at [146.112.129.215])
by mail.alcatel.at (8.9.3/8.9.3/1.21 01/27/01 21:43:09) with ESMTP id JAA20525;
Tue, 8 May 2001 09:15:20 +0200 (MET DST)
Message-ID: <[email-masked]>
Date: Tue, 08 May 2001 09:15:18 +0200
From: Christoph Plattner <[email-masked]>
Organization: AAA
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.5.1 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
To: Larry Barello <[email-masked]>
CC: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Affecting variables
References: <005501c0d750$fb2782c0$08a517c3@pauloabr> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Uuuuh !

If you need a "volatile" in this situation, then we speek about
and compiler bug !! There is no specification, that a variable
"shared" via parallel execution threads (the interrupt can be
seen as parallel (asynchron) thread to the routine in `main').

We know the method under unix ... :

signal handler says
runflag = 0;

And main loop:

while (runflag)
{
...
}

And this case, nobody uses `volatile' !!

Is Mr. Paulo Abreu sure, that the interrupt routine is really called ?
A good idea is to use a LED on an output pin to debug this.

With friendly regards
Christoph Plattner

Larry Barello wrote:
>
> You need to declare bTest as a "volatile". The compiler has cached the
> value of the variable in a register and referred to the register inside the
> loop. Declaring it volatile will tell the compiler that the variable might
> change between loops and to re-load it each time. Any shared static or
> global variable that can be modified outside of the code flow (e.g.
> multitasking or interrupts) needs to be declared volatile so the compiler
> knows not to cache the value in a register.
>
> Try using the -S compiler switch and generate the assembly code and look at
> it. You can learn a lot that way.
>
> Question: could someone illuminate the difference between:
>
> volatile char bTest;
> char volatile bTest;
>
> or are they the same?
>
> Cheers!
>
> ----- Original Message -----
> From: "Paulo Abreu" <[email-masked]>
> To: <[email-masked]>
> Sent: Monday, May 07, 2001 4:53 PM
> Subject: [avr-gcc-list] Affecting variables
>
> > I am doing something like this (unfortunately I forgot my .c file)
> >
> > char bTest;
> >
> > void init(void)
> > {
> > bTest=0;
> > }
> >
> > /* receive uart handler */
> > SIGNAL(...)
> > {
> > bTest=1;
> > }
> >
> > int main(void)
> > {
> >
> > init();
> >
> > while(1)
> > {
> > if(bTest == 1)
> > {
> > /* do something*/
> > }
> > }
> > }
> >
> >
> > what is happening is that bTest is not being affected, that is, bTest!=1,
> > why?
> >
> > I am using the last version of avr-gcc for windows.
> >
> > Thanks in advance for your attention,
> >
> > Paulo Abreu
> >
> >
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > [email-masked]
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
> >
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

------------------------------------------------------------------
private: [email-masked]
company: [email-masked]

From [email-masked] Tue May 08 20:45:30 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14x37W-0007s5-00
for <[email-masked]>; Tue, 08 May 2001 20:45:28 +1200
Received: (from j@localhost)
by ida.interface-business.de id f488kfC92400;
Tue, 8 May 2001 10:46:41 +0200 (MET DST)
Date: Tue, 8 May 2001 10:46:41 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <005501c0d750$fb2782c0$08a517c3@pauloabr>
<[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] Affecting variables
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Larry Barello" <[email-masked]> wrote:

> Question: could someone illuminate the difference between:
>
> volatile char bTest;
> char volatile bTest;
>
> or are they the same?

They are.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Wed May 09 06:00:24 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14xBmY-0008Lt-00
for <[email-masked]>; Wed, 09 May 2001 06:00:22 +1200
Received: (from rneswold@localhost)
by drmemory.fnal.gov (8.11.2/8.11.2) id f48I1vq00804;
Tue, 8 May 2001 13:01:57 -0500 (CDT)
(envelope-from rneswold)
Date: Tue, 8 May 2001 13:01:57 -0500
From: Rich Neswold <[email-masked]>
To: Guy Robinson <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Table of function pointers
Message-ID: <[email-masked]>
Reply-To: [email-masked]
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="sm4nu43k4a2Rpi4c"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Thu, May 03, 2001 at 09:43:24AM +1200
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.2-STABLE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Wasn't it 3-May-2001, at 09:43AM, when Guy Robinson said:
> Hi,
> Can anyone explain what this error means? See source below. I can't see w=
hat
> I'm doing wrong. Thanks in advance for your help.
>=20
> Guy
>=20
> hx_2313.c:37: declaration of `FunctionTable' as array of functions
> hx_2313.c:37: Tree check: expected class 't', have 'x' (error_mark)
> confused by earlier errors, bailing out
> D:\AVRGCC\BIN\MAKE.EXE: *** [hx_2313.o] Error 1
>=20
>=20
> #include <io.h>
> #include <progmem.h>
>=20
> #define pint int __attribute__ ((progmem))
>=20
> void function0();
> void function1();
>=20
> pint *FunctionTable[2]() =3D {function0,function1};
>=20
> char a,b,index;
>=20
> void function0(){
> a =3Db;
> }
> void function1(){
> b =3Da;
> }
>=20
> void main(void){
>=20
> PRG_RDB(FunctionTable[index]()); // call function from table at in=
dex
> index++;
> }

There's quite a few things that I'd question.

Your array contains pointers to functions that return a pointer to
progmem'ed data. Yet, neither 'function0' nor 'function1' return a value.

I'm also assuming that you're using the compiler option that makes "int"s 8
bits wide, because the two functions are being used in the context of an
int, but they manipulate chars.

Finally, your functions return pointers to progmem variables, yet you don't
define any variables in the progmem space.

If your question is only to find out how the array needs to be defined,
then this is how I'd try it [I chopped out the portions that don't apply to
the question]:

#define pchar char __attribute__ ((progmem))

typedef pchar* (*PF)(void);

pchar* function0(void);
pchar* function1(void);

PF FunctionTable[2] =3D { function0, function1 };

By defining a new type, PF, it makes the array definition simpler.

Hope this helps....

--=20
Rich Neswold

efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

--sm4nu43k4a2Rpi4c
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE6+DSVZmE+i9FKxdwRAnr1AKCq+0LWJWt9DwLdfCv3kUnpa7n99wCghxKG
ZlprO1qQW/jnGRcth+5uHiI=
=KW2s
-----END PGP SIGNATURE-----

--sm4nu43k4a2Rpi4c--

From [email-masked] Thu May 10 00:08:21 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14xSlP-0000es-00
for <[email-masked]>; Thu, 10 May 2001 00:08:20 +1200
Received: from oTRIs.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id OAA17594
for <[email-masked]>; Wed, 9 May 2001 14:10:03 +0200
Message-ID: <[email-masked]>
Date: Wed, 09 May 2001 14:14:51 +0200
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] State of binutils mingw32 binary
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I tried again to build binutils from a fresh CVS source. This time
without any modifications (avrobj patch). But this didn't solve the
problem, I still get following errors:

C:\avrgcc\bin\..\lib\gcc-lib\avr\3.0\..\..\..\..\avr\bin\ld.exe:built in
linker
script:2: ignoring invalid character `a' in expression
C:\avrgcc\bin\..\lib\gcc-lib\avr\3.0\..\..\..\..\avr\bin\ld.exe:built in
linker
script:2: ignoring invalid character `v' in expression
C:\avrgcc\bin\..\lib\gcc-lib\avr\3.0\..\..\..\..\avr\bin\ld.exe:built in
linker
script:2: ignoring invalid character `r' in expression
C:\avrgcc\bin\..\lib\gcc-lib\avr\3.0\..\..\..\..\avr\bin\ld.exe:built in
linker
script:2: parse error

Greetings

Gunnar

From [email-masked] Thu May 10 03:44:39 2001
Received: from mailout06.sul.t-online.com ([194.25.134.19])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14xW8l-0000nF-00
for <[email-masked]>; Thu, 10 May 2001 03:44:39 +1200
Received: from fwd02.sul.t-online.de
by mailout06.sul.t-online.com with smtp
id 14xWAb-0006Ab-08; Wed, 09 May 2001 17:46:33 +0200
Received: from t-online.de (04121482296-0001@[217.80.1.52]) by fwd02.sul.t-online.com
with esmtp id 14xWAh-2AjPhwC; Wed, 9 May 2001 17:46:39 +0200
Message-ID: <[email-masked]>
Date: Wed, 09 May 2001 17:46:24 +0200
From: [email-masked] (pohl)
Reply-To: [email-masked]
Organization: Hans-Lothar Pohl
X-Mailer: Mozilla 4.74 [en] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Sender: [email-masked]
Subject: [avr-gcc-list] Re: avr-gcc-list digest, Vol 1 #111 - 5 msgs
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,
I have got an AVR-board STK500, and i will use it under LINUX.
Is there anyone who knows the protokoll between LINUX-Pc and the
Stk500 ?
Lothar

From [email-masked] Thu May 10 05:21:33 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14xXeL-0000rB-00
for <[email-masked]>; Thu, 10 May 2001 05:21:32 +1200
Received: from mm.amelek.gda.pl ([192.168.1.1] ident=mail)
by alf.amelek.gda.pl with esmtp (Exim 3.22 #1 (Debian))
id 14xXYM-0001Gz-00; Wed, 09 May 2001 19:15:10 +0200
Received: from marekm by mm.amelek.gda.pl with local (Exim 3.22 #1 (Debian))
id 14xXYI-0000Ay-00; Wed, 09 May 2001 19:15:06 +0200
Subject: Re: [avr-gcc-list] Re: avr-gcc-list digest, Vol 1 #111 - 5 msgs
In-Reply-To: <[email-masked]> from pohl at "May 9, 2001 05:46:24
pm"
To: [email-masked]
Date: Wed, 9 May 2001 19:15:06 +0200 (CEST)
CC: [email-masked]
X-Mailer: ELM [version 2.4ME+ PL66 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Message-Id: <[email-masked]>
From: Marek Michalkiewicz <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> I have got an AVR-board STK500, and i will use it under LINUX.
> Is there anyone who knows the protokoll between LINUX-Pc and the
> Stk500 ?

Ask [email-masked] nicely - if more people ask, hopefully that will
help Atmel make the right decision (open the protocol documentation).

Alternatively, try to reverse-engineer it - it's not that hard
(you need a second box with 2 serial ports to look at the data going
in both directions between the STK500 and the windows software),
and has been done many times in the past, in order to make various
undocumented pieces of hardware work with Linux...

Marek

From [email-masked] Thu May 10 10:41:22 2001
Received: from email.netonecom.net ([209.172.26.13])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14xce2-00017B-00
for <[email-masked]>; Thu, 10 May 2001 10:41:22 +1200
Received: from netonecom.net (catudal.netonecom.net [216.65.187.222])
by email.netonecom.net (8.11.3/8.11.0) with ESMTP id f49MhF105177
for <[email-masked]>; Wed, 9 May 2001 18:43:16 -0400 (EDT)
Message-ID: <[email-masked]>
Date: Wed, 09 May 2001 18:41:23 -0400
From: Michel Catudal <[email-masked]>
Organization: Cybernetic Entomology Experts
X-Mailer: Mozilla 4.76 [Joual] (X11; U; Linux 2.4.2 i586)
X-Accept-Language: fr-CA, en-US
MIME-Version: 1.0
CC: [email-masked]
Subject: Re: [avr-gcc-list] Re: avr-gcc-list digest, Vol 1 #111 - 5 msgs
References: <[email-masked]>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by email.netonecom.net id f49MhF105177
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Marek Michalkiewicz a =E9crit :
>=20
> > I have got an AVR-board STK500, and i will use it under LINUX.
> > Is there anyone who knows the protokoll between LINUX-Pc and the
> > Stk500 ?
>=20
> Ask [email-masked] nicely - if more people ask, hopefully that will
> help Atmel make the right decision (open the protocol documentation).
>=20
> Alternatively, try to reverse-engineer it - it's not that hard
> (you need a second box with 2 serial ports to look at the data going
> in both directions between the STK500 and the windows software),
> and has been done many times in the past, in order to make various
> undocumented pieces of hardware work with Linux...
>=20
> Marek
>=20
I think that this is done by some other firm, the same that does
the board. If I am correct the only way is to reverse engineer the
communication.

--=20
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://www.netonecom.net/~bbcat
We are the Cybernetic Entomology Experts

From [email-masked] Thu May 10 21:17:55 2001
Received: from sand2.global.net.uk ([195.147.246.100])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14xma3-0001Uh-00
for <[email-masked]>; Thu, 10 May 2001 21:17:55 +1200
Received: from pc2s03a10.client.global.net.uk ([195.147.115.195] helo=home)
by sand2.global.net.uk with smtp (Exim 3.16 #1)
id 14xmbt-00036O-00
for [email-masked]; Thu, 10 May 2001 10:19:49 +0100
Reply-To: <[email-masked]>
From: "Tim Fenn" <[email-masked]>
To: <[email-masked]>
Date: Thu, 10 May 2001 10:14:21 +0100
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Subject: [avr-gcc-list] CALLING ASSEMBLER FUNCTIONS FROM C USING GCCAVR
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi
I wonder if anyone can tell me how i include and call assembler functions ic
GCCAVR. I havent got a clue where to start.
Thanks
Tim

From [email-masked] Sun May 13 02:13:50 2001
Received: from mail.tor.axxent.ca ([209.250.128.26])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14ya9V-0003Wy-00
for <[email-masked]>; Sun, 13 May 2001 02:13:50 +1200
Received: from digicom (dial-0205.tor.axxent.ca [216.249.0.205])
by mail.tor.axxent.ca (8.11.0/8.9.3) with ESMTP id f4CEFr217922;
Sat, 12 May 2001 10:15:53 -0400 (EDT)
Received: from cwall by digicom with local (Exim 3.12 #1 (Debian))
id 14yaBz-00004V-00; Sat, 12 May 2001 10:16:23 -0400
Date: Sat, 12 May 2001 10:16:23 -0400
From: Carl Wall <[email-masked]>
To: Tim Fenn <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] CALLING ASSEMBLER FUNCTIONS FROM C USING GCCAVR
Message-ID: <[email-masked]>
Mail-Followup-To: Tim Fenn <[email-masked]>, [email-masked]
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Thu, May 10, 2001 at 10:14:21AM +0100
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This URL might be of help
Cheers
Carl

>>I've tried to make up a little cookbook about this topic.

>>You can download the PDF file from

>> http://www.egnite.de/en/main1_1_3.htm

>> The name of the file is GCCAVRInlAsmCB.pdf.

>> I'd appreciate email response and redistribution of
>> this manual.

>> Harald Kipp

On Thu, May 10, 2001 at 10:14:21AM +0100, Tim Fenn wrote:
> Hi
> I wonder if anyone can tell me how i include and call assembler functions ic
> GCCAVR. I havent got a clue where to start.
> Thanks
> Tim
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
Carl A. Wall VE3APY Toronto, Ontario, Canada
"Created on DEBIAN 2.2, an alternative to Microsoft Systems
and a GNU/Linux distribution of Open Source programming"

From [email-masked] Sun May 13 22:25:18 2001
Received: from sttlpop4.sttl.uswest.net ([206.81.192.4])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14yt3t-0005z7-00
for <[email-masked]>; Sun, 13 May 2001 22:25:18 +1200
Received: (qmail 71902 invoked by alias); 12 May 2001 15:58:39 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 71824 invoked by uid 0); 12 May 2001 15:58:37 -0000
Received: from vdsl25.sttl.uswest.net (HELO larry) (216.160.108.25)
by sttlpop4.sttl.uswest.net with SMTP; 12 May 2001 15:58:37 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] CALLING ASSEMBLER FUNCTIONS FROM C USING GCCAVR
Date: Sat, 12 May 2001 08:58:24 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

The file "ctoasm.inc", found in the libc distribution, contains details of
the calling conventions (what registers are used, etc).

Looking at other examples is a good way to start. Again, the library
functions in the distribution (libc) is a good place to look at code and
makefiles.

----- Original Message -----
From: "Tim Fenn" <[email-masked]>
To: <[email-masked]>
Sent: Thursday, May 10, 2001 2:14 AM
Subject: [avr-gcc-list] CALLING ASSEMBLER FUNCTIONS FROM C USING GCCAVR

> Hi
> I wonder if anyone can tell me how i include and call assembler functions
ic
> GCCAVR. I havent got a clue where to start.
> Thanks
> Tim
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Mon May 14 20:06:18 2001
Received: from gateway.utbm.fr ([193.48.246.2] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14zDMt-00071Y-00
for <[email-masked]>; Mon, 14 May 2001 20:06:16 +1200
Received: from sunserv.utbm.fr (sunserv.utbm.fr [192.168.1.16])
by gateway.utbm.fr (8.9.3/jtpda-5.3.2) with ESMTP id KAA28625
for <[email-masked]>; Mon, 14 May 2001 10:07:43 +0200
Received: (from lcourtes@localhost)
by sunserv.utbm.fr (8.9.3+Sun/8.9.3) id KAA16660
for [email-masked]; Mon, 14 May 2001 10:07:43 +0200 (MEST)
Date: Mon, 14 May 2001 10:07:43 +0200
From: Ludovic COURTES <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 1.0pre2us
In-Reply-To: <[email-masked]>
Subject: [avr-gcc-list] avr-gcc adding 'cli's in function prologues...
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi !

I've noticed that gcc was sometimes adding some 'cli's in function
prologues (just before changing the stack pointer as far as I can
remember), but without re-enabling interrupts afterward.

As I'm using an home-made micro-kernel which uses timer interrupt,
I am having some troubles when calling this function. But gcc only
do that on some functions apparently.

Therefore, I'd like to know what's gcc doing, and whether there is
a way to bypass this.

Thanks.

--
Ludovic Courtes
University of Technology of Belfort-Montbeliard
Unitec (UTBM's students Robotics Club)

From [email-masked] Mon May 14 23:03:18 2001
Received: from n212045253006.unregistered.formus.pl ([212.45.253.6] helo=emaxr1.emax.com.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14zG8A-0007HW-00
for <[email-masked]>; Mon, 14 May 2001 23:03:15 +1200
Received: from intra.emax.com.pl (intra.emax.com.pl [62.32.176.86])
by emaxr1.emax.com.pl (8.9.3/8.9.3) with ESMTP id NAA01750
for <[email-masked]>; Mon, 14 May 2001 13:03:33 +0200
Received: from INTRA/SpoolDir by intra.emax.com.pl (Mercury 1.44);
14 May 01 13:05:47
Received: from SpoolDir by INTRA (Mercury 1.44); 14 May 01 13:05:29
Received: from uranos (212.234.1.88) by intra.emax.com.pl (Mercury 1.44);
14 May 01 13:05:21
Message-ID: <[email-masked]>
From: "Artur Ziolkowski" <[email-masked]>
To: <[email-masked]>
Date: Mon, 14 May 2001 13:04:42 +0200
Organization: Emax sp. z o.o.
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0022_01C0DC76.711DBD80"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] AvrStudio support
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_0022_01C0DC76.711DBD80
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

Hi everybody,
Sorry for a maybe silly question- I ' m a beginner.
I have a problem with avrgcc20000211.exe( =
http://combio.de/avr/avrgcc20010211.exe) and AvrStudio support . Can I =
using this version see C (:-)) variables ? I've tried to compile my =
programs with -gcoff option and I couldn't see not only variables, but =
source code also. Is it something wrong with instalation? -The installer =
seems not to be so nice (at least in my Win95 OSR2 )- install.exe wanted =
to work only in real DOS mode and I 've had to run some intructions of =
install.bat file "manually" in command window after installer hungup. =
But it seems that it compiles good ( some programs which doesn't work =
compiled with older version now works and the code is even smaller !) =20

Can anobody help me?
Cheers,
Artur

------=_NextPart_000_0022_01C0DC76.711DBD80
Content-Type: text/html;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-2">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3D"Arial CE">Hi everybody,</FONT></DIV>
<DIV><FONT face=3D"Arial CE">Sorry for a maybe silly question- I ' m a=20
beginner.</FONT></DIV>
<DIV>I have a problem with avrgcc20000211.exe( <A=20
href=3D"http://combio.de/avr/avrgcc20010211.exe">http://combio.de/avr/avr=
gcc20010211.exe</A>)=20
and AvrStudio support . Can I using this version see C (:-)) variables ? =
I've=20
tried to compile my programs with -gcoff option&nbsp;and I couldn't see =
not only=20
variables, but source code&nbsp;also. Is it something wrong with=20
instalation?&nbsp;-The installer seems not to be so nice (at least in my =
Win95=20
OSR2 )- install.exe wanted to work only in real DOS mode and I 've had =
to run=20
some intructions of install.bat file "manually" in&nbsp;command window =
after=20
installer hungup. But it seems that it compiles&nbsp;good ( some =
programs which=20
doesn't work compiled with older version now&nbsp;works and the code is =
even=20
smaller !)&nbsp;&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Arial CE">Can anobody help me?</FONT></DIV>
<DIV>Cheers,</DIV>
<DIV>Artur</DIV></BODY></HTML>

------=_NextPart_000_0022_01C0DC76.711DBD80--

From [email-masked] Tue May 15 17:07:07 2001
Received: from snipe.mail.pas.earthlink.net ([207.217.120.62])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 14zX34-0008Ai-00
for <[email-masked]>; Tue, 15 May 2001 17:07:06 +1200
Received: from earthlink.net (1Cust161.tnt1.brownwood.tx.da.uu.net [63.28.230.161])
by snipe.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id WAA21167
for <[email-masked]>; Mon, 14 May 2001 22:09:22 -0700 (PDT)
Message-ID: <[email-masked]>
Date: Tue, 15 May 2001 00:06:50 -0500
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: avg-gcc list <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] avr-objcopy and eeprom
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

In Rich Neswold's excellent paper "GNU Development Environment for the
AVR Microcontroller" dated January 23, 2001, he mentions that
avr-objcopy can be used to extract portions of an AVR executable file
and write the contents to other formats, specifically the flash (or
ROM).

He goes on to say that the same can be done for the EEPROM section, but
unfortunately, he doesn't give an example of how to do this. The
manpages for avr-objcopy leave a little to be desired (for me, anyway).
It may be in there, but without a concrete example, I'm lost.

Would someone please be so kind to post an example of how to uae
avr-objcopy to extract the eeprom section to a hex formatted file? I
would be most appreciative.

Thanks,

Dale Seaburg KG5LT

From [email-masked] Tue May 15 17:53:07 2001
Received: from sttlpop3.sttl.uswest.net ([206.81.192.3])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 14zXla-0008Dt-00
for <[email-masked]>; Tue, 15 May 2001 17:53:06 +1200
Received: (qmail 15963 invoked by alias); 15 May 2001 05:49:22 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 21004 invoked by uid 0); 15 May 2001 05:39:12 -0000
Received: from vdsl25.sttl.uswest.net (HELO larry) (216.160.108.25)
by sttlpop3.sttl.uswest.net with SMTP; 15 May 2001 05:39:12 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "Dale Seaburg" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] avr-objcopy and eeprom
Date: Mon, 14 May 2001 22:36:38 -0700
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0080_01C0DCC6.56ED4700"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_0080_01C0DCC6.56ED4700
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Attached is a makefile I use. It has the eeprom stuff in it.

----- Original Message -----
From: "Dale Seaburg" <[email-masked]>

> In Rich Neswold's excellent paper "GNU Development Environment for the
> AVR Microcontroller" dated January 23, 2001, he mentions that
> avr-objcopy can be used to extract portions of an AVR executable file
> and write the contents to other formats, specifically the flash (or
> ROM).
>
> He goes on to say that the same can be done for the EEPROM section, but
> unfortunately, he doesn't give an example of how to do this. The
> manpages for avr-objcopy leave a little to be desired (for me, anyway).
> It may be in there, but without a concrete example, I'm lost.
>
> Would someone please be so kind to post an example of how to uae
> avr-objcopy to extract the eeprom section to a hex formatted file? I
> would be most appreciative.

------=_NextPart_000_0080_01C0DCC6.56ED4700
Content-Type: application/octet-stream;
name="makefile"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="makefile"

# AvrX 2.5 GCC Examples makefile
# Larry Barello May, 2000
#
# Hard wire the AvrXStack location, which is at end of 8515 ram...
# How to set a stack elsewhere in RAM is TBD...
#
MCU =3D at90s8535
# MCU =3D at90s8515
COMPILER =3D AVRGCC
ODOMETRY =3D ODOMETRY
FORMAT =3D ihex
LIB =3D $(AVRX)/avrx/avrx.a
INCDIR =3D -I. -I$(AVRX)/avrx

LDFLAGS =3D -Wl,-lm,-Map=3D$(<:.o=3D.map),--cref,-v,--sort-common
AFLAGS =3D -c -mmcu=3D$(MCU) -Wa,-gstabs -mmcu=3D$(MCU) -I$(INCDIR) =
-D$(COMPILER)
# CFLAGS =3D -g -O2 -Wall -mmcu=3D$(MCU) -D$(COMPILER) -D$(ODOMETRY)
CFLAGS =3D -g -Os -Wall -fno-gcse -mmcu=3D$(MCU) -D$(COMPILER) =
-D$(ODOMETRY)

RM =3D rm -f
BIN =3D avr-objcopy
CC =3D avr-gcc
AS =3D avr-gcc -x assembler-with-cpp
AR =3D avr-ar
PROG =3D c:/progra~1/atmel/avrstu~1/stk500/stk500.exe

# include monitor.mak
include maze.mak
=09
OBJ =3D $(SRC:.c=3D.o) $(ASRC:.s=3D.o)

%a: %o
$(AR) -r $@ $<
=09
%o: %c
$(CC) -c $< $(INCDIR) $(CFLAGS) -D$(TARGET) -o $@

%s: %c
$(CC) -S $< $(INCDIR) $(CFLAGS) -D$(TARGET) -o $@

%o: %s
$(AS) $(AFLAGS) $< -o $@
=09
%elf: %o
$(CC) $< $(LIB) $(LDFLAGS) -mmcu=3D$(MCU) -o $@

%obj: %elf
$(BIN) -O avrobj -R .eeprom $< $@

%hex: %elf
$(BIN) -O $(FORMAT) -R .eeprom $< $@

%eep: %elf
$(BIN) -j .eeprom --set-section-flags=3D.eeprom=3D"alloc,load" =
--change-section-lma .eeprom=3D0 -O $(FORMAT) $< $@

all: NewBot.obj NewBot.hex NewBot.eep

burn.eep: NewBot.eep
$(PROG) -dat90s8535 -ieNewBot.eep -ve -pe -ccom1 -z

burn.hex: NewBot.hex
$(PROG) -dat90s8535 -ifNewBot.hex -vf -pf -e -ccom1 -z

burn: burn.hex burn.eep

NewBot.elf: $(OBJ) $(LIB)
$(CC) $(OBJ) $(LIB) $(LDFLAGS) -mmcu=3D$(MCU) -o $@

clean:
set
$(RM) *.o *.c_sym *.obj *.map *.eep *.hex *.elf
$(RM) $(SRC:.c=3D.s)

assembly: $(SRC:.c=3D.s)

NewBot.o: makefile NewBot.c hardware.h gp2d02.h
monitor.o: makefile monitor.c serialio.h adc_driver.h
serialio.o: makefile serialio.c serialio.h maze.h
MotorTask.o: makefile MotorTask.c hardware.h
LcdTask.o: makefile LcdTask.c lcdio.h lcdtask.h
adc_driver.o: makefile adc_driver.s
maze.o: makefile maze.c maze.h hardware.h adc_driver.h
mazesup.o: makefile mazesup.c maze.h hardware.h adc_driver.h
lcdio.s: makefile lcd.inc
lcd.s: makefile myctoasm.inc lcd.inc
followhall.o: makefile hardware.h MotorTask.h Maze.h
followline.o: makefile hardware.h MotorTask.h Maze.h

------=_NextPart_000_0080_01C0DCC6.56ED4700--

From [email-masked] Thu May 17 08:11:40 2001
Received: from mx1.port.ru ([194.67.23.32] helo=smtp1.port.ru)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1507dz-0001hL-00
for <[email-masked]>; Thu, 17 May 2001 08:11:39 +1200
Received: from ppp128-203.dialup.mtu-net.ru ([62.118.128.203])
by smtp1.port.ru with esmtp (Exim 3.14 #6)
id 1507gI-0006sE-00; Thu, 17 May 2001 00:14:02 +0400
Date: Thu, 17 May 2001 00:13:13 +0400
From: =?ISO-8859-1?B?wO3k8OXp?= <[email-masked]>
X-Mailer: The Bat! (v1.45)
Reply-To: Andrey <[email-masked]>
X-Priority: 3 (Normal)
Message-ID: <[email-masked]>
To: "Marlin Unruh" <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] PORT access
In-reply-To: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi.

It should work.

void modify_port(u08 adr, u08 mask, u08 data)
{
u08* pp;
u08 tmp;
pp = (u08*)adr;
pp += 0x20;
tmp = *pp;
tmp &= ~mask;
*pp |= (data & tmp);
}

Thursday, April 26, 2001, 7:19:25 PM, you wrote:

> I am using CAN-bus with two MCUs, one is an 8515 and the other is an 8535. I
> would like be able to modify a port using the following example;

> 1: void Modify_Port(u08 address, u08 mask, u08 data)
> 2: {
> 3: u08 tmp;
> 4: tmp = inp(address); // place port reading in tmp
> 5: tmp &= ~mask;
> 6: tmp |= (data & mask);
> 7: outb(tmp, address);
> 8: }

> I made up this example to demonstrate what I am wanting to do. Is there a
> way? This does not work because the value of address is non-constant. I am
> wanting to be able to modify a port in the other MCU via the CAN-bus. Thus,
> controller 'B' could directly set a bit on a port in controller 'A' to sound
> a buzzer. The 'address', 'mask', 'data' is transferred over the CAN-bus.

> Any help would be much appreciated.

> Marlin

> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Thu May 17 09:30:49 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 1508sZ-0001l1-00
for <[email-masked]>; Thu, 17 May 2001 09:30:48 +1200
Received: (qmail 12315 invoked from network); 16 May 2001 20:35:49 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 16 May 2001 20:35:49 -0000
Received: from robi ([193.2.76.192]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with SMTP id AAA19949
for <[email-masked]>; Wed, 16 May 2001 23:23:27 +0200
Message-ID: <001c01c0de4f$eaf0b4c0$0200a8c0@robi>
From: [email-masked] (Robert Rozman)
To: <[email-masked]>
Date: Wed, 16 May 2001 23:28:51 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Subject: [avr-gcc-list] Migrating avrgcc code from 8535 to atmega163 ?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I'm migrating from 8535 (ran out of prog space) to ATMega163. My 8535
project, compiled for mega163, crashes already at the start (scanning i2c
bus on regular I/O pin, realtime clock, ...).

If someone could briefly point to needed code modifications and CPUs
dissimilarities (registers, initialization, ...), it would save a lot of
time.

Thanks in advance,

Robert Rozman

From [email-masked] Thu May 17 19:08:45 2001
Received: from mail.pepperl-fuchs.com ([194.120.135.222] helo=de.pepperl-fuchs.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 150Htr-00029o-00
for <[email-masked]>; Thu, 17 May 2001 19:08:44 +1200
Received: from exmail.pepperl-fuchs.com (exmail.pepperl-fuchs.com [172.16.11.61])
by de.pepperl-fuchs.com (8.11.0/8.10.2) with ESMTP id f4H7B4E05833;
Thu, 17 May 2001 09:11:04 +0200
Received: by exmail.pepperl-fuchs.com with Internet Mail Service (5.5.2650.21)
id <K9FG2W34>; Thu, 17 May 2001 09:08:53 +0200
Message-ID: <[email-masked]>
From: Stumpf Michael <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Cc: "[email-masked]'" <[email-masked]>
Subject: AW: [avr-gcc-list] Migrating avrgcc code from 8535 to atmega163 ?
Date: Thu, 17 May 2001 09:08:50 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C0DEA0.398BA2C0"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C0DEA0.398BA2C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

The interrupt vectors have a different size :
the 8535 vectors are 1 word (RJMP isr) vs. the mega163 2 word vectors =
(JMP
isr)

There are some more (minor) differences in io registers (additional =
bits)
and fuses
but the main problen was the vector table=20

regards=20
Michael

> -----Urspr=FCngliche Nachricht-----
> Von: [email-masked] [mailto:[email-masked]]
> Gesendet: Mittwoch, 16. Mai 2001 23:29
> An: [email-masked]
> Betreff: [avr-gcc-list] Migrating avrgcc code from 8535 to atmega163 =
?
>=20
>=20
> Hello,
>=20
> I'm migrating from 8535 (ran out of prog space) to ATMega163. My 8535
> project, compiled for mega163, crashes already at the start=20
> (scanning i2c
> bus on regular I/O pin, realtime clock, ...).
>=20
> If someone could briefly point to needed code modifications and CPUs
> dissimilarities (registers, initialization, ...), it would=20
> save a lot of
> time.
>=20
> Thanks in advance,
>=20
> Robert Rozman
>=20
>=20
>=20
>=20
>=20
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>=20

------_=_NextPart_001_01C0DEA0.398BA2C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>AW: [avr-gcc-list] Migrating avrgcc code from 8535 to atmega163 =
?</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>The interrupt vectors have a different size :</FONT>
<BR><FONT SIZE=3D2>the 8535 vectors are 1 word (RJMP isr) vs. the =
mega163 2 word vectors (JMP isr)</FONT>
</P>

<P><FONT SIZE=3D2>There are some more (minor) differences in io =
registers (additional bits) and fuses</FONT>
<BR><FONT SIZE=3D2>but the main problen was the vector table </FONT>
</P>

<P><FONT SIZE=3D2>regards </FONT>
<BR><FONT SIZE=3D2>Michael</FONT>
</P>

<P><FONT SIZE=3D2>&gt; -----Urspr=FCngliche Nachricht-----</FONT>
<BR><FONT SIZE=3D2>&gt; Von: [email-masked] [<A =
HREF=3D"mailto:[email-masked]">mailto:[email-masked]=
-lj.si</A>]</FONT>
<BR><FONT SIZE=3D2>&gt; Gesendet: Mittwoch, 16. Mai 2001 23:29</FONT>
<BR><FONT SIZE=3D2>&gt; An: [email-masked]</FONT>
<BR><FONT SIZE=3D2>&gt; Betreff: [avr-gcc-list] Migrating avrgcc code =
from 8535 to atmega163 ?</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Hello,</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; I'm migrating from 8535 (ran out of prog space) =
to ATMega163. My 8535</FONT>
<BR><FONT SIZE=3D2>&gt; project, compiled for mega163, crashes already =
at the start </FONT>
<BR><FONT SIZE=3D2>&gt; (scanning i2c</FONT>
<BR><FONT SIZE=3D2>&gt; bus on regular I/O pin, realtime clock, =
...).</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; If someone could briefly point to needed code =
modifications and CPUs</FONT>
<BR><FONT SIZE=3D2>&gt; dissimilarities (registers, initialization, =
...), it would </FONT>
<BR><FONT SIZE=3D2>&gt; save a lot of</FONT>
<BR><FONT SIZE=3D2>&gt; time.</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Thanks in advance,</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Robert Rozman</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; =
_______________________________________________</FONT>
<BR><FONT SIZE=3D2>&gt; avr-gcc-list mailing list</FONT>
<BR><FONT SIZE=3D2>&gt; [email-masked]</FONT>
<BR><FONT SIZE=3D2>&gt; <A =
HREF=3D"http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list" =
TARGET=3D"_blank">http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list</A>=
</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C0DEA0.398BA2C0--

From [email-masked] Thu May 17 20:16:49 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 150Ixj-0002Cw-00
for <[email-masked]>; Thu, 17 May 2001 20:16:48 +1200
Received: (qmail 28937 invoked from network); 17 May 2001 07:21:49 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 17 May 2001 07:21:49 -0000
Received: from fri.uni-lj.si ([193.2.76.118]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with ESMTP id AAA1605;
Thu, 17 May 2001 10:09:25 +0200
Message-ID: <[email-masked]>
Date: Thu, 17 May 2001 10:19:07 +0200
From: [email-masked] (Robert Rozman)
X-Mailer: Mozilla 4.51 [sl] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: Stumpf Michael <[email-masked]>
CC: "[email-masked]'" <[email-masked]>
Subject: Re: AW: [avr-gcc-list] Migrating avrgcc code from 8535 to atmega163 ?
References: <[email-masked]>
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

Stumpf Michael je napisal:

>
>
> The interrupt vectors have a different size :
> the 8535 vectors are 1 word (RJMP isr) vs. the mega163 2 word vectors
> (JMP isr)
>

Do I need to fix this explicitly in source code and how ?

Regards,

Robert Rozman

From [email-masked] Thu May 17 21:11:50 2001
Received: from mail.pepperl-fuchs.com ([194.120.135.222] helo=de.pepperl-fuchs.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 150Joz-0002H5-00
for <[email-masked]>; Thu, 17 May 2001 21:11:50 +1200
Received: from exmail.pepperl-fuchs.com (exmail.pepperl-fuchs.com [172.16.11.61])
by de.pepperl-fuchs.com (8.11.0/8.10.2) with ESMTP id f4H9E8E07852;
Thu, 17 May 2001 11:14:08 +0200
Received: by exmail.pepperl-fuchs.com with Internet Mail Service (5.5.2650.21)
id <K9FG2W9K>; Thu, 17 May 2001 11:11:57 +0200
Message-ID: <[email-masked]>
From: Stumpf Michael <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Cc: "[email-masked]'" <[email-masked]>
Subject: AW: AW: [avr-gcc-list] Migrating avrgcc code from 8535 to atmega1
63 ?
Date: Thu, 17 May 2001 11:11:48 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C0DEB1.671A04F0"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C0DEB1.671A04F0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

- depends on what compiler you use.

I'm using IAR and I just had to recompile everything with the proper
settings and the correct linker file
Actually I have two versions of the same software with exactely the =
same
source code (size fits for both still)
one compiled and linked for 8535 the other compiled and linked for =
ATmega163
(I have the same hardware with both uC assembled)
Works fine.

Other compilers? Don't know, but should be similar, shouldn't it

regards
Michael

> -----Urspr=FCngliche Nachricht-----
> Von: [email-masked] [mailto:[email-masked]]
> Gesendet: Donnerstag, 17. Mai 2001 10:19
> An: Stumpf Michael
> Cc: [email-masked]'
> Betreff: Re: AW: [avr-gcc-list] Migrating avrgcc code from=20
> 8535 to atmega163 ?
>=20
>=20
> Hello,
>=20
>=20
> Stumpf Michael je napisal:
>=20
> >
> >
> > The interrupt vectors have a different size :
> > the 8535 vectors are 1 word (RJMP isr) vs. the mega163 2=20
> word vectors
> > (JMP isr)
> >
>=20
> Do I need to fix this explicitly in source code and how ?
>=20
>=20
> Regards,
>=20
> Robert Rozman
>=20

------_=_NextPart_001_01C0DEB1.671A04F0
Content-Type: text/html;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-2">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>AW: AW: [avr-gcc-list] Migrating avrgcc code from 8535 to =
atmega163 ?</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>- depends on what compiler you use.</FONT>
</P>

<P><FONT SIZE=3D2>I'm using IAR and I just had to recompile everything =
with the proper settings and the correct linker file</FONT>
<BR><FONT SIZE=3D2>Actually I have two versions of the same software =
with exactely the same source code (size fits for both still)</FONT>
<BR><FONT SIZE=3D2>one compiled and linked for 8535 the other compiled =
and linked for ATmega163 (I have the same hardware with both uC =
assembled)</FONT></P>

<P><FONT SIZE=3D2>Works fine.</FONT>
</P>

<P><FONT SIZE=3D2>Other compilers? Don't know, but should be similar, =
shouldn't it</FONT>
</P>

<P><FONT SIZE=3D2>regards</FONT>
<BR><FONT SIZE=3D2>Michael</FONT>
</P>

<P><FONT SIZE=3D2>&gt; -----Urspr=FCngliche Nachricht-----</FONT>
<BR><FONT SIZE=3D2>&gt; Von: [email-masked] [<A =
HREF=3D"mailto:[email-masked]">mailto:[email-masked]=
-lj.si</A>]</FONT>
<BR><FONT SIZE=3D2>&gt; Gesendet: Donnerstag, 17. Mai 2001 10:19</FONT>
<BR><FONT SIZE=3D2>&gt; An: Stumpf Michael</FONT>
<BR><FONT SIZE=3D2>&gt; Cc: [email-masked]'</FONT>
<BR><FONT SIZE=3D2>&gt; Betreff: Re: AW: [avr-gcc-list] Migrating =
avrgcc code from </FONT>
<BR><FONT SIZE=3D2>&gt; 8535 to atmega163 ?</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Hello,</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Stumpf Michael je napisal:</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; The interrupt vectors have a different =
size :</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; the 8535 vectors are 1 word (RJMP isr) vs. =
the mega163 2 </FONT>
<BR><FONT SIZE=3D2>&gt; word vectors</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; (JMP isr)</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Do I need to fix this explicitly in source code =
and how ?</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Regards,</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Robert Rozman</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C0DEB1.671A04F0--

From [email-masked] Fri May 18 06:25:51 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 150SSr-0002gV-00
for <[email-masked]>; Fri, 18 May 2001 06:25:50 +1200
Received: from mm.amelek.gda.pl ([192.168.1.1] ident=mail)
by alf.amelek.gda.pl with esmtp (Exim 3.22 #1 (Debian))
id 150STU-0005U9-00; Thu, 17 May 2001 20:26:12 +0200
Received: from marekm by mm.amelek.gda.pl with local (Exim 3.22 #1 (Debian))
id 150STU-00023j-00; Thu, 17 May 2001 20:26:12 +0200
Subject: Re: AW: AW: [avr-gcc-list] Migrating avrgcc code from 8535 to atmega1
63 ?
In-Reply-To: <[email-masked]>
"from Stumpf Michael at May 17, 2001 11:11:48 am"
To: Stumpf Michael <[email-masked]>
Date: Thu, 17 May 2001 20:26:11 +0200 (CEST)
CC: "[email-masked]'" <[email-masked]>,
"[email-masked]'" <[email-masked]>
X-Mailer: ELM [version 2.4ME+ PL89 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Message-Id: <[email-masked]>
From: Marek Michalkiewicz <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> I'm using IAR and I just had to recompile everything with the proper
> settings and the correct linker file
> Actually I have two versions of the same software with exactely the same
> source code (size fits for both still)

Easy with avr-gcc too, use -mmcu=atmega163 or -mmcu=at90s8535 and it
just works. You should specify this option in all avr-gcc commands,
both compile and link (always use the avr-gcc driver, don't run avr-ld
directly). I'm doing this all the time, no source code changes.

Different interrupt vectors are handled by avr-libc startup code
(all these crt*.o files, one for each MCU type), and the correct
version of libc.a (multilib support) is linked automagically too.

Hope this helps,
Marek

From [email-masked] Fri May 18 15:31:30 2001
Received: from mta7.pltn13.pbi.net ([64.164.98.8])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 150azC-00038F-00
for <[email-masked]>; Fri, 18 May 2001 15:31:30 +1200
Received: from bourbonsolo1 ([63.203.185.194])
by mta7.pltn13.pbi.net (Sun Internet Mail Server
sims.3.5.2000.03.23.18.03.p10) with SMTP id
<[email-masked]> for [email-masked]; Thu,
17 May 2001 20:31:27 -0700 (PDT)
Date: Thu, 17 May 2001 20:28:09 -0700
From: Dean Ferreyra <[email-masked]>
To: avr-gcc-list <[email-masked]>
Reply-to: [email-masked]
Message-id: <[email-masked]>
MIME-version: 1.0
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Content-type: text/plain; charset="iso-8859-1"
Content-transfer-encoding: 7bit
Importance: Normal
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-Priority: 3 (Normal)
Subject: [avr-gcc-list] -O3 problem
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I am running into this problem: I'm using a couple of layers of inline
functions. When I compile with -O3 the generated assembly code changes the
value of r29 which is busy in this function as the frame pointer. When the
function wants to return, this value gets copied back as the stack pointer
killing the stack. I've included a distilled sample below that trigger the
problem and I've included the assembly output. The problematic assignment
to r29 can be seen on the third line after the prolog.

I'm using CVS updates from May 16, 2001 for binutils and gcc. My host is
cygwin.

My current workaround is to compile with -O2 or where possible change the
function so that avr-gcc does not use an explicit stack frame pointer.

Dean Ferreyra
[email-masked]

--------------------
Makefile
--------------------
CC=avr-gcc
AR=avr-ar
CFLAGS=-Wall -O3 -mmcu=atmega103

%.s: %.c ; $(CC) $(CFLAGS) -S $*.c

bug01.s: bug01.c

--------------------
bug01.c
--------------------
void exec_cmd(unsigned cmd,
const unsigned* cmd_data, char cmd_data_size,
unsigned* reply_data, char reply_data_size);

inline static void set_a16(char cmd, char axis, unsigned value)
{
exec_cmd(1, 0, 1, 0, 1);
}

inline static void set_source(char axis, char source)
{
set_a16(1, axis, source);
}

void fn(void)
{
unsigned data[10];
data[0] = 0;

set_source(1, 0);
set_source(1, 0);
}

--------------------
bug01.s
--------------------
.file "bug01.c"
.arch atmega103
__SREG__ = 0x3f
__SP_H__ = 0x3e
__SP_L__ = 0x3d
__tmp_reg__ = 0
__zero_reg__ = 1
_PC_ = 2
.text
.global fn
.type fn,@function
fn:
/* prologue: frame size=20 */
push r14
push r15
push r16
push r17
push r28
push r29
in r28,__SP_L__
in r29,__SP_H__
sbiw r28,20
in __tmp_reg__,__SREG__
cli
out __SP_H__,r29
out __SREG__,__tmp_reg__
out __SP_L__,r28
/* prologue end (size=14) */
std Y+1,__zero_reg__
std Y+2,__zero_reg__
ldi r29,lo8(1)
clr r14
clr r15
mov r16,r29
mov r19,r15
mov r18,r14
mov r20,r29
mov r23,r15
mov r22,r14
ldi r24,lo8(1)
ldi r25,hi8(1)
call exec_cmd
mov r19,r15
mov r18,r14
mov r20,r29
mov r23,r15
mov r22,r14
ldi r24,lo8(1)
ldi r25,hi8(1)
call exec_cmd
/* epilogue: frame size=20 */
adiw r28,20
in __tmp_reg__,__SREG__
cli
out __SP_H__,r29
out __SREG__,__tmp_reg__
out __SP_L__,r28
pop r29
pop r28
pop r17
pop r16
pop r15
pop r14
ret
/* epilogue end (size=13) */
/* function fn size 51 (24) */
.Lfe1:
.size fn,.Lfe1-fn
/* File bug01.c: code 51 = 0x0033 ( 24), prologues 14, epilogues 13 */

From [email-masked] Fri May 18 22:24:54 2001
Received: from gateway.utbm.fr ([193.48.246.2] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 150hRF-0003RX-00
for <[email-masked]>; Fri, 18 May 2001 22:24:53 +1200
Received: from sunserv.utbm.fr (sunserv.utbm.fr [192.168.1.16])
by gateway.utbm.fr (8.9.3/jtpda-5.3.2) with ESMTP id MAA23921
; Fri, 18 May 2001 12:27:15 +0200
Received: (from lcourtes@localhost)
by sunserv.utbm.fr (8.9.3+Sun/8.9.3) id MAA03159;
Fri, 18 May 2001 12:27:14 +0200 (MEST)
Date: Fri, 18 May 2001 12:27:14 +0200
From: Ludovic COURTES <[email-masked]>
To: Larry Barello <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] avr-gcc adding 'cli's in function prologues...
Message-ID: <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 1.0pre2us
In-Reply-To: <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi !

I finally found what was going wrong with gcc's prologue and epilogue.
As i wrote before (see below), avr-gcc uses Y (r29:r28) to store stack
pointer and then decrement it in order to reserve some space for local
variables in SRAM (this is done in function prologue) and then increment
it with the same value to restore original SP (this is done in epilogue).

The problem is that gcc doesn't save Y at the end of prologue. Therefore,
if your code uses theses registers and modify them, then the ret instruction
won't do what you want it to (as the SP will be wrong) !
I fixed it just by adding a "push y" and a "pop y" at the beginning and
at the end of my code.

> Sorry, just hanging the CPU is not enough information. Usually my bizarre
> problems are solved by making the stacks bigger. Oh, to have a real ICE
> and to be able to set breakpoints on the end of my stacks... The other
> typical problem is not having the right set of interrupt vectors (why did
> Atmel choose to shuffle vectors with each chip!!!)
>
> Cheers!
>
> ----- Original Message -----
> From: "Ludovic COURTES" <[email-masked]>
> To: "Larry Barello" <[email-masked]>
> Sent: Tuesday, May 15, 2001 1:27 AM
> Subject: Re: [avr-gcc-list] avr-gcc adding 'cli's in function prologues...
>
>
> > Hi !
> >
> > > Which version? Could you give me an example of a function that has the
> > > errant CLI in it?
> >
> > In fact, gcc increases SP to create a stack frame to store local
> variables
> > in. The 'cli' appears just before it increases the 16-bit stack pointer,
> > so that it can't be a problem as no interrupt handler can be called in
> between
> > the increasing of the low and hi byte.
> >
> > The resulting code is something like that :
> > in __tmp_reg__,__SREG__
> > in r28, __SP_L__
> > in r29, __SP_H__
> > subi r28,lo8(8) /* 8 byte stack frame */
> > sbci r29,hi8(8)
> > cli
> > out __SP_L__,r28
> > out __SP_H__,r29
> > out __SREG__,__tmp_reg__ /* restores interrupts */
> >
> > In fact, interrupts are re-enabled by restoring the SREG.
> > Therefore, this shouldn't be a problem...
> > But anyway, I am still having problem with some functions hanging the MCU
> > without doing anything particular (if you have any idea of what could
> > make it, i'm interested in it !)...
> >
>
>

--
Ludovic Courtes
University of Technology of Belfort-Montbeliard
Unitec (UTBM's students Robotics Club)

From [email-masked] Fri May 18 22:30:19 2001
Received: from gateway.utbm.fr ([193.48.246.2] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 150hWT-0003S7-00
for <[email-masked]>; Fri, 18 May 2001 22:30:17 +1200
Received: from sunserv.utbm.fr (sunserv.utbm.fr [192.168.1.16])
by gateway.utbm.fr (8.9.3/jtpda-5.3.2) with ESMTP id MAA24073
for <[email-masked]>; Fri, 18 May 2001 12:32:48 +0200
Received: (from lcourtes@localhost)
by sunserv.utbm.fr (8.9.3+Sun/8.9.3) id MAA03273
for [email-masked]; Fri, 18 May 2001 12:32:48 +0200 (MEST)
Date: Fri, 18 May 2001 12:32:48 +0200
From: Ludovic COURTES <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 1.0pre2us
Subject: [avr-gcc-list] Tiny bug with inline funcs
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I noticed a kind of bug with gcc inline funcs. I have two functions f_sin()
and f_cos() (they compute cosinus and sinus and return a fixed point number)
which are static inline. When I do
f_cos(angle); f_sin(angle);
angle is not reloaded in between function calls. The matter is that my functions
(which contains inline asm) stores their argument in Z and then modify it
(thus, input operand constraint is "Z"(angle) ) ; so the second call doesn't
have the right value of the argument.

I fixed it by declaring the argument "static volatile" (so that it is stored in
SRAM and reloaded when necessary). But is it a normal gcc behaviour ?

--
Ludovic Courtes
University of Technology of Belfort-Montbeliard
Unitec (UTBM's students Robotics Club)

From [email-masked] Sat May 19 02:11:32 2001
Received: from sttlpop3.sttl.uswest.net ([206.81.192.3])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 150kyZ-0003d2-00
for <[email-masked]>; Sat, 19 May 2001 02:11:32 +1200
Received: (qmail 9877 invoked by alias); 18 May 2001 14:14:02 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 9823 invoked by uid 0); 18 May 2001 14:14:00 -0000
Received: from vdsl25.sttl.uswest.net (HELO larry) (216.160.108.25)
by sttlpop3.sttl.uswest.net with SMTP; 18 May 2001 14:14:00 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "Ludovic COURTES" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
Subject: Re: [avr-gcc-list] avr-gcc adding 'cli's in function prologues...
Date: Fri, 18 May 2001 07:10:20 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

The procedure code (your code) *must* save R2-R17, R28 & R29. R0, R18-R27,
R30 & R31 are fair game (parameters and temps) for your code. R1 always ==
0 upon exit or calling another C routine. GCC depends upon Y being left
alone - as you found out!

This information can be found in "ctoasm.inc" found in the libc source that
is distributed with the compiler.

Cheers.

----- Original Message -----
From: "Ludovic COURTES" <[email-masked]>

> Hi !
>
> I finally found what was going wrong with gcc's prologue and epilogue.
> As i wrote before (see below), avr-gcc uses Y (r29:r28) to store stack
> pointer and then decrement it in order to reserve some space for local
> variables in SRAM (this is done in function prologue) and then increment
> it with the same value to restore original SP (this is done in epilogue).
>
> The problem is that gcc doesn't save Y at the end of prologue. Therefore,
> if your code uses theses registers and modify them, then the ret
instruction
> won't do what you want it to (as the SP will be wrong) !
> I fixed it just by adding a "push y" and a "pop y" at the beginning and
> at the end of my code.
>

From [email-masked] Sat May 19 02:25:08 2001
Received: from sttlpop3.sttl.uswest.net ([206.81.192.3])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 150lBj-0003dx-00
for <[email-masked]>; Sat, 19 May 2001 02:25:08 +1200
Received: (qmail 10815 invoked by alias); 18 May 2001 14:27:41 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 10778 invoked by uid 0); 18 May 2001 14:27:41 -0000
Received: from vdsl25.sttl.uswest.net (HELO larry) (216.160.108.25)
by sttlpop3.sttl.uswest.net with SMTP; 18 May 2001 14:27:41 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "Ludovic COURTES" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Tiny bug with inline funcs
Date: Fri, 18 May 2001 07:28:12 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Did you tell the in-line asm that Z was clobbered during the call?

asm(...: "z" (angle) : "=r" (whatever) : "z");

There is a nice write up on writing in-line asm at
http://www.egnite.de/ethernut/GCCAVRInlAsmCB.pdf

Cheers!

----- Original Message -----
From: "Ludovic COURTES" <[email-masked]>

> Hello,
>
> I noticed a kind of bug with gcc inline funcs. I have two functions
f_sin()
> and f_cos() (they compute cosinus and sinus and return a fixed point
number)
> which are static inline. When I do
> f_cos(angle); f_sin(angle);
> angle is not reloaded in between function calls. The matter is that my
functions
> (which contains inline asm) stores their argument in Z and then modify it
> (thus, input operand constraint is "Z"(angle) ) ; so the second call
doesn't
> have the right value of the argument.

From [email-masked] Sat May 19 02:34:08 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 150lKQ-0003ee-00
for <[email-masked]>; Sat, 19 May 2001 02:34:07 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.154])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id SAA19123;
Fri, 18 May 2001 18:36:33 +0400
To: Ludovic COURTES <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Tiny bug with inline funcs
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 18 May 2001 18:29:39 +0400
In-Reply-To: Ludovic COURTES's message of "Fri, 18 May 2001 12:32:48 +0200"
Message-ID: <[email-masked]>
Lines: 22
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Ludovic COURTES <[email-masked]> writes:

> Hello,
>
> I noticed a kind of bug with gcc inline funcs. I have two functions f_sin()
> and f_cos() (they compute cosinus and sinus and return a fixed point number)
> which are static inline. When I do
> f_cos(angle); f_sin(angle);
> angle is not reloaded in between function calls. The matter is that my functions
> (which contains inline asm) stores their argument in Z and then modify it
> (thus, input operand constraint is "Z"(angle) ) ; so the second call doesn't
> have the right value of the argument.
>
> I fixed it by declaring the argument "static volatile" (so that it is stored in
> SRAM and reloaded when necessary). But is it a normal gcc behaviour ?

Please !
Send me an example too.

Denis.

From [email-masked] Sat May 19 02:34:13 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 150lKW-0003ej-00
for <[email-masked]>; Sat, 19 May 2001 02:34:12 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.154])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id SAA19129;
Fri, 18 May 2001 18:36:41 +0400
To: Ludovic COURTES <[email-masked]>
Cc: Larry Barello <[email-masked]>, [email-masked]
Subject: Re: [avr-gcc-list] avr-gcc adding 'cli's in function prologues...
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 18 May 2001 18:29:47 +0400
In-Reply-To: Ludovic COURTES's message of "Fri, 18 May 2001 12:27:14 +0200"
Message-ID: <[email-masked]>
Lines: 20
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Ludovic COURTES <[email-masked]> writes:

> Hi !
>
> I finally found what was going wrong with gcc's prologue and epilogue.
> As i wrote before (see below), avr-gcc uses Y (r29:r28) to store stack
> pointer and then decrement it in order to reserve some space for local
> variables in SRAM (this is done in function prologue) and then increment
> it with the same value to restore original SP (this is done in epilogue).
>
> The problem is that gcc doesn't save Y at the end of prologue. Therefore,
> if your code uses theses registers and modify them, then the ret instruction
> won't do what you want it to (as the SP will be wrong) !
> I fixed it just by adding a "push y" and a "pop y" at the beginning and
> at the end of my code.

Please !
Send me an example.

Denis.

From [email-masked] Sat May 19 06:07:33 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 150oex-0003pU-00
for <[email-masked]>; Sat, 19 May 2001 06:07:32 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [195.151.217.132])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id WAA15884;
Fri, 18 May 2001 22:10:00 +0400
To: [email-masked]
Cc: avr-gcc-list <[email-masked]>
Subject: Re: [avr-gcc-list] -O3 problem
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 18 May 2001 22:03:06 +0400
In-Reply-To: Dean Ferreyra's message of "Thu, 17 May 2001 20:28:09 -0700"
Message-ID: <[email-masked]>
Lines: 69
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Dean Ferreyra <[email-masked]> writes:

> Hi,
>
> I am running into this problem: I'm using a couple of layers of inline
> functions. When I compile with -O3 the generated assembly code changes the
> value of r29 which is busy in this function as the frame pointer. When the
> function wants to return, this value gets copied back as the stack pointer
> killing the stack. I've included a distilled sample below that trigger the
> problem and I've included the assembly output. The problematic assignment
> to r29 can be seen on the third line after the prolog.
>
> I'm using CVS updates from May 16, 2001 for binutils and gcc. My host is
> cygwin.
>
> My current workaround is to compile with -O2 or where possible change the
> function so that avr-gcc does not use an explicit stack frame pointer.

Thanks for bug report.
Thanks for good test case.
It was a generic GCC bug.

Patch:

Index: regrename.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/regrename.c,v
retrieving revision 1.21
diff -c -3 -p -r1.21 regrename.c
*** regrename.c 2001/05/14 07:56:57 1.21
--- regrename.c 2001/05/18 17:54:21
***************
*** 1,5 ****
/* Register renaming for the GNU compiler.
! Copyright (C) 2000 Free Software Foundation, Inc.

This file is part of GNU CC.

--- 1,5 ----
/* Register renaming for the GNU compiler.
! Copyright (C) 2000, 2001 Free Software Foundation, Inc.

This file is part of GNU CC.

*************** regrename_optimize ()
*** 219,227 ****
/* Don't clobber traceback for noreturn functions. */
if (frame_pointer_needed)
{
! SET_HARD_REG_BIT (unavailable, FRAME_POINTER_REGNUM);
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
! SET_HARD_REG_BIT (unavailable, HARD_FRAME_POINTER_REGNUM);
#endif
}

--- 219,232 ----
/* Don't clobber traceback for noreturn functions. */
if (frame_pointer_needed)
{
! int i;
!
! for (i = HARD_REGNO_NREGS (FRAME_POINTER_REGNUM, Pmode); i--;)
! SET_HARD_REG_BIT (unavailable, FRAME_POINTER_REGNUM + i);
!
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
! for (i = HARD_REGNO_NREGS (HARD_FRAME_POINTER_REGNUM, Pmode); i--;)
! SET_HARD_REG_BIT (unavailable, HARD_FRAME_POINTER_REGNUM + i);
#endif
}

From [email-masked] Sun May 20 17:40:23 2001
Received: from mail004.syd.optusnet.com.au ([203.2.75.228])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 151Lx0-000815-00
for <[email-masked]>; Sun, 20 May 2001 17:40:22 +1200
Received: from allenla (ocmax8-217.dialup.optusnet.com.au [198.142.41.217])
by mail004.syd.optusnet.com.au (8.11.1/8.11.1) with SMTP id f4K5gXU06705
for <[email-masked]>; Sun, 20 May 2001 15:42:33 +1000
Message-ID: <002901c0e0f0$092eaa80$d9298ec6@allenla>
From: "Allen" <[email-masked]>
To: "AVR GCC LIST" <[email-masked]>
Date: Sun, 20 May 2001 15:45:10 +1000
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2462.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000
Subject: [avr-gcc-list] New Subscriber
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Ladies & Gents,

Just announcing my arrival on the list.

Allen

From [email-masked] Mon May 21 10:54:33 2001
Received: from [195.235.113.151] (helo=tsmtp4.mail.isp)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 151c5o-0000bQ-00
for <[email-masked]>; Mon, 21 May 2001 10:54:32 +1200
Received: from gines ([213.96.107.254]) by tsmtp4.mail.isp
(Netscape Messaging Server 4.15) with SMTP id GDNP0805.VCG for
<[email-masked]>; Mon, 21 May 2001 00:55:20 +0200
Message-ID: <[email-masked]>
From: "Gines Martinez Sanchez" <[email-masked]>
To: <[email-masked]>
Date: Mon, 21 May 2001 00:53:27 +0200
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_000B_01C0E190.720FEB40"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Subject: [avr-gcc-list] avr-as directives
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_000B_01C0E190.720FEB40
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi!
Where I can find some documentation about of avr-as (directives,etc)?

------=_NextPart_000_000B_01C0E190.720FEB40
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2014.210" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Where I can find some documentation =
about of avr-as=20
(directives,etc)?</FONT></DIV></BODY></HTML>

------=_NextPart_000_000B_01C0E190.720FEB40--

From [email-masked] Mon May 21 20:47:34 2001
Received: from [193.101.57.9] (helo=ida.interface-business.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 151lLg-00011W-00
for <[email-masked]>; Mon, 21 May 2001 20:47:33 +1200
Received: (from j@localhost)
by ida.interface-business.de id f4L8oEI20380;
Mon, 21 May 2001 10:50:14 +0200 (MET DST)
Date: Mon, 21 May 2001 10:50:14 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] avr-as directives
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Gines Martinez Sanchez" <[email-masked]> wrote:

> This is a multi-part message in MIME format.

(Please don't send HTML mails.)

> Where I can find some documentation about of avr-as
> (directives,etc)?

There's normally an `info' file (compiled from the texinfo source)
accompanying all the tools, including the assembler. Under Unix, you
can type `info as' and it should tell you. Note that this is the
complete documentation, not just anything target (i. e. AVR-)
specific.

No idea how the WinXX distributions are handling this issue. They
could perhaps translate the texinfo docs into a PDF file.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Mon May 21 22:30:01 2001
Received: from mx1.nameplanet.com ([62.70.3.31] ident=mail)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 151mwq-000162-00
for <[email-masked]>; Mon, 21 May 2001 22:30:01 +1200
Received: 21 May 2001 10:32:40 -0000
Received: from unknown (HELO www1.nameplanet.com) (192.168.2.41)
by mail with SMTP; 21 May 2001 10:32:40 -0000
Received: (qmail 32758 invoked by uid 400); 21 May 2001 10:32:40 -0000
Date: 21 May 2001 10:32:40 -0000
Message-ID: <[email-masked]>
From: [email-masked]
To: [email-masked]
MIME-Version: 1.0
Subject: RE: [avr-gcc-list] avr-as directives
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

| No idea how the WinXX distributions are handling this issue. They
| could perhaps translate the texinfo docs into a PDF file.
|

They have collected some WinXX versions on:
http://www.avrfreaks.net/AVRGCC/coding.php

- Larry

| -----Original Message-----
| From: [email-masked]
| [mailto:[email-masked]]On Behalf Of J Wunsch
| Sent: Monday, May 21, 2001 10:50 AM
| To: [email-masked]
| Subject: Re: [avr-gcc-list] avr-as directives
|
|
| "Gines Martinez Sanchez" <[email-masked]> wrote:
|
| > This is a multi-part message in MIME format.
|
| (Please don't send HTML mails.)
|
| > Where I can find some documentation about of avr-as
| > (directives,etc)?
|
| There's normally an `info' file (compiled from the texinfo source)
| accompanying all the tools, including the assembler. Under Unix, you
| can type `info as' and it should tell you. Note that this is the
| complete documentation, not just anything target (i. e. AVR-)
| specific.
|
| No idea how the WinXX distributions are handling this issue. They
| could perhaps translate the texinfo docs into a PDF file.
|
| --
| J"org Wunsch Unix support engineer
| [email-masked]
http://www.interface-systems.de/~j

_______________________________________________
avr-gcc-list mailing list
[email-masked]
http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
Get your firstname@lastname email for FREE at http://Nameplanet.com/?su

From [email-masked] Tue May 22 01:49:45 2001
Received: from [193.101.57.9] (helo=ida.interface-business.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 151q46-0001F2-00
for <[email-masked]>; Tue, 22 May 2001 01:49:43 +1200
Received: (from j@localhost)
by ida.interface-business.de id f4LDqNc48806;
Mon, 21 May 2001 15:52:23 +0200 (MET DST)
Date: Mon, 21 May 2001 15:52:23 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
In-Reply-To: <[email-masked]>
From: [email-masked] (J Wunsch)
Subject: Re: [avr-gcc-list] avr-as directives
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

[email-masked] wrote:

> | No idea how the WinXX distributions are handling this issue. They
> | could perhaps translate the texinfo docs into a PDF file.

> They have collected some WinXX versions on:
> http://www.avrfreaks.net/AVRGCC/coding.php

I see the man pages are announced, but in particular for gas, the
texinfo doc is far more detailed. I tried converting texinfo to PDF,
but the result is a huge file that looks ugly, since texinfo uses
Donald Knuth's Computer Modern fonts which acroread doesn't display
very nicely.

Converting the as.texinfo into HTML worked, however. If someone wants
to put it up on that website, drop me a mail. (But it's ~ 1 MB of
HTML that zips into 120 KB, so please don't mail me for a copy unless
you're a webmaster who intents to publish it.)

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Tue May 22 08:22:06 2001
Received: from [195.235.113.141] (helo=tsmtppp2.teleline.es)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 151wBp-0001a1-00
for <[email-masked]>; Tue, 22 May 2001 08:22:05 +1200
Received: from gines ([213.96.107.254]) by tsmtppp2.teleline.es
(Netscape Messaging Server 4.1) with SMTP id GDPCD101.Q57 for
<[email-masked]>; Mon, 21 May 2001 22:17:25 +0200
Message-ID: <[email-masked]>
From: "Gines Martinez Sanchez" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]>
Subject: RE: [avr-gcc-list] avr-as directives
Date: Mon, 21 May 2001 22:15:30 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Well, in this url I have found the as textinfo:

http://www.gnu.org/manual/gas/

Gins

From [email-masked] Tue May 22 10:57:02 2001
Received: from hawk.mail.pas.earthlink.net ([207.217.120.22])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 151ybm-0001gH-00
for <[email-masked]>; Tue, 22 May 2001 10:57:02 +1200
Received: from earthlink.net (1Cust139.tnt1.brownwood.tx.da.uu.net [63.28.230.139])
by hawk.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id PAA27636;
Mon, 21 May 2001 15:59:57 -0700 (PDT)
Message-ID: <[email-masked]>
Date: Mon, 21 May 2001 17:57:09 -0500
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: avg-gcc list <[email-masked]>
Content-Type: multipart/mixed;
boundary="------------351D68D3CCFA72F3CDA29DEA"
Subject: [avr-gcc-list] Problems with if statement and negative numbers
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.
--------------351D68D3CCFA72F3CDA29DEA
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I am attaching a code snippet of a problem that I have incurred using
avr-gcc. It involves an 'if' statement that doesn't seem to handle
negative numbers.

The gcc is 2001.02.28, the same for the binutils and the avr-libc is
2001.02.11

This routine is called from a Timer 0 Interrupt Handler to poll two
lines which are hooked up to a grey-coded 2-bit shaft encoder. The
routine decodes the greycode into one of two values: a 1 and a -1.
These are then tested against an upper bound and a lower bound. If they
fall into the area between the bounds, then the 1 or -1 is added to a
menu select variable 'ui_select'.

The problem manifests itself when the encoder only seems to advance, not
backup. The ui_select variable only increases in value. It never
decreases in value.

I have run the routine without the limit checks and it functions
correctly, in that the variable ui_select increases/decreases with the
appropriate turn of the encoder. So, the culprit is in the limit
checking 'if' logic.

Further you'll see two 'if' statements at the bottom of the routine that
demonstrates the problem. The LEDs attached to the PORTB (STK300 -
atmega103) show only a 1, not a 2, which indicates that the handling of
negative numbers, specifically a -1 doesn't work correctly.

BTW, this very routine does compile and work correctly on a PIC using a
Hi-Tech compiler. Also, I did rearrange the limit checking logic to
avoid the check for a negative number. It works, but looks awkward.
And, I'm sure it costs some extra code.

Can anyone see my problem. Or, do we have a bug in the compiler?
Or... { you fill in the blank }

Thanks for your help.

Dale Seaburg
--------------351D68D3CCFA72F3CDA29DEA
Content-Type: text/plain; charset=us-ascii;
name="Problem with IF statement 010520.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Problem with IF statement 010520.txt"

01 const char greytbl[4][4] = {{0, -1, 1, 0},
02 {1, 0, 0, -1},
03 {-1, 0, 0, 1},
04 {0, 1, -1, 0} };
05
06 volatile uint8_t grey,oldgrey = 0x00;
07 volatile signed int ui_select = 0;
08 volatile char val;
09
10 // This routine is called from within the Timer 0 IH about every 13ms.
11 // Handle Encoder Decode
12 void EncoderDecode()
13 {
14 // Sample PORTE FIRST, bits 4 & 5
15 grey = (inp(PINE) & 0x30) >> 4;
16
17 wdt_reset();
18
19 if (grey != oldgrey)
20 {
21 val = greytbl[oldgrey][grey];
22
23 // The two valid values returned from the greytable are:
24 // 1 for advance, -1 for backup.
25 // The 3rd value, a 0 is not seen due to the above IF statement.
26 // Now, check limits so we don't overstep
27
28 if (((val > 0) && (ui_select < ui_max)) ||
29 ((val < 0) && (ui_select > 0)))
30 {
31 ui_select += val;
32 }
33
34 if (val > 0) {
35 outp(~1, PORTB); } // ***** DEBUG *****
36 if (val < 0) {
37 outp(~2, PORTB); } // ***** DEBUG *****
38
39 oldgrey = grey;
40 }
41 // outp((~val&0xBF)|(inp(PORTB)&0x60), PORTB); // ***** DEBUG *****
42 outp(~(ui_select&0x0F)|(inp(PORTB)&0xF0), PORTB); // ***** DEBUG *****
43 }

--------------351D68D3CCFA72F3CDA29DEA--

From [email-masked] Tue May 22 20:53:15 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 1527uk-000246-00
for <[email-masked]>; Tue, 22 May 2001 20:53:14 +1200
Received: (qmail 25654 invoked from network); 22 May 2001 07:58:35 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 22 May 2001 07:58:35 -0000
Received: from fri.uni-lj.si ([193.2.76.118]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with ESMTP id AAA338
for <[email-masked]>; Tue, 22 May 2001 10:46:09 +0200
Message-ID: <[email-masked]>
Date: Tue, 22 May 2001 10:55:53 +0200
From: [email-masked] (Robert Rozman)
X-Mailer: Mozilla 4.51 [sl] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Some working example code for ATMega163
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I'm migrating from 8535 to ATMega163 and code doesn't work. So any
working 'example like' source code for ATMega163 would be of great help,
just to verify that my programmer is doing the job OK also on Mega163 (I
have stk200 dongle and Ponyprog 2000).

Is there any other software solution for programming Mega163 with
stk200 dongle ?

Thanks in advance,

Robert Rozman

From [email-masked] Wed May 23 02:02:46 2001
Received: from sttlpop2.sttl.uswest.net ([206.81.192.2])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 152CkI-0002Gq-00
for <[email-masked]>; Wed, 23 May 2001 02:02:46 +1200
Received: (qmail 78811 invoked by alias); 22 May 2001 14:05:35 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 78802 invoked by uid 0); 22 May 2001 14:05:35 -0000
Received: from vdsl25.sttl.uswest.net (HELO larry) (216.160.108.25)
by sttlpop2.sttl.uswest.net with SMTP; 22 May 2001 14:05:35 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "Robert Rozman" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Some working example code for ATMega163
Date: Tue, 22 May 2001 06:55:00 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I recently rebuilt my robot code (www.barello.net/Robots/Dilbert2) as 163
vs 8535 and aside from two hitches worked perfectely out of the box:

1. The mega163 I got had the internal R/C oscillator set - until I figured
this out and reset the fuse bits the code ran real slow... By the way,
there are a *lot* of fuse bits for that chip.

2. I couldn't get the code to run reliably until I bumped the Vcc to 6.0
volts (STK500 - great development board) - then I finally figured out that
9.86mhz crystal was actually 16mhz - oops. Once I got a proper 9.6mhz
crystal (yeah, I know, I am overclocking the chip) things worked properly
down to 3.0 volts or so.

As far as I can tell, aside from the 4 byte entries in the interrupt vector
table and the usual shuffling of vectors, everything else is backward
compatible with the 8535, bit for bit.

Cheers!

----- Original Message -----
From: "Robert Rozman" <[email-masked]>
To: <[email-masked]>
Sent: Tuesday, May 22, 2001 1:55 AM
Subject: [avr-gcc-list] Some working example code for ATMega163

> Hello,
>
> I'm migrating from 8535 to ATMega163 and code doesn't work. So any
> working 'example like' source code for ATMega163 would be of great help,
> just to verify that my programmer is doing the job OK also on Mega163 (I
> have stk200 dongle and Ponyprog 2000).
>
> Is there any other software solution for programming Mega163 with
> stk200 dongle ?
>
> Thanks in advance,
>
> Robert Rozman
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Wed May 23 02:38:02 2001
Received: from adsserver.flatpanels.com ([207.196.69.66] helo=ads-server.FLATPANELS.COM)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 152DIO-0002J2-00
for <[email-masked]>; Wed, 23 May 2001 02:38:01 +1200
Received: by ADS_SERVER with Internet Mail Service (5.5.2650.21)
id <LBR0S3NR>; Tue, 22 May 2001 10:39:49 -0400
Message-ID: <91B07CA588CED3118CFE00105AC97594246325@ADS_SERVER>
From: "Miani, Cristiano" <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Date: Tue, 22 May 2001 10:39:48 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C0E2CD.0D9E2650"
Subject: [avr-gcc-list] AtTimy Support
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C0E2CD.0D9E2650
Content-Type: text/plain;
charset="iso-8859-1"

Hi all,
I need to program the ATTiny15L in my project and I would like to use C (I
already have a lot of functions I used for the 8535 and I would like to
reuse them). The GNUGCC compiler doesn't currently support that chip (I have
the Volker Oth's version). Can anyone tell me if there is a version that
supports it? Do you have any links to it?
Thank you in advance,
Cristiano

------_=_NextPart_001_01C0E2CD.0D9E2650
Content-Type: text/html;
charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

<META content="MSHTML 5.00.3103.1000" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=441444414-22052001>Hi
all,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=441444414-22052001>I need to program
the ATTiny15L in my project and I would like to&nbsp;use C (I already have a lot
of functions I used for the 8535 and I would like to reuse them). The GNUGCC
compiler doesn't currently support that chip (I have the Volker Oth's version).
Can anyone tell me if there is a version that supports it? Do you have any links
to it?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=441444414-22052001>Thank you in
advance,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=441444414-22052001>&nbsp;&nbsp;&nbsp;
Cristiano</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=441444414-22052001></SPAN></FONT>&nbsp;</DIV></BODY></HTML>

------_=_NextPart_001_01C0E2CD.0D9E2650--

From [email-masked] Wed May 23 04:08:52 2001
Received: from adsserver.flatpanels.com ([207.196.69.66] helo=ads-server.FLATPANELS.COM)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 152EiJ-0002Mz-00
for <[email-masked]>; Wed, 23 May 2001 04:08:52 +1200
Received: by ADS_SERVER with Internet Mail Service (5.5.2650.21)
id <LBR0S3PQ>; Tue, 22 May 2001 12:10:42 -0400
Message-ID: <91B07CA588CED3118CFE00105AC97594246327@ADS_SERVER>
From: "Miani, Cristiano" <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Date: Tue, 22 May 2001 12:10:40 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C0E2D9.BFF60D40"
Subject: [avr-gcc-list] Problems compiling code for attiny1x...
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C0E2D9.BFF60D40
Content-Type: text/plain;
charset="iso-8859-1"

Hi all,
I need to program the ATTiny15L in my project and I would like to use C (I
already have a lot of functions I used for the 8535 and I would like to
reuse them). The GNUGCC compiler doesn't currently support that chip (I have
the Volker Oth's version). Can anyone tell me if there is a version that
supports it? Do you have any links to it?
Thank you in advance,
Cristiano

------_=_NextPart_001_01C0E2D9.BFF60D40
Content-Type: text/html;
charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

<META content="MSHTML 5.00.3103.1000" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2><SPAN class=441444414-22052001>Hi
all,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=441444414-22052001>I need to program
the ATTiny15L in my project and I would like to&nbsp;use C (I already have a lot
of functions I used for the 8535 and I would like to reuse them). The GNUGCC
compiler doesn't currently support that chip (I have the Volker Oth's version).
Can anyone tell me if there is a version that supports it? Do you have any links
to it?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=441444414-22052001>Thank you in
advance,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=441444414-22052001>&nbsp;&nbsp;&nbsp;
Cristiano</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=441444414-22052001></SPAN></FONT>&nbsp;</DIV></FONT></DIV></BODY></HTML>

------_=_NextPart_001_01C0E2D9.BFF60D40--

From [email-masked] Sun May 27 07:38:23 2001
Received: from swan.mail.pas.earthlink.net ([207.217.120.123])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 153jtG-0008Tz-00
for <[email-masked]>; Sun, 27 May 2001 07:38:23 +1200
Received: from earthlink.net (1Cust241.tnt1.brownwood.tx.da.uu.net [63.28.230.241])
by swan.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id MAA28986
for <[email-masked]>; Sat, 26 May 2001 12:41:11 -0700 (PDT)
Message-ID: <[email-masked]>
Date: Sat, 26 May 2001 14:38:49 -0500
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: avg-gcc list <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] If statement with Negative number problems
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I never got any response from my last posting of this problem. I'll
repost with a smaller program that I'm running on an at90s8515 (STK200)
as my testbed. My original problem was on an atmega103L.

Basically, when I test a variable for a value less than zero, I get an
incorrect (it appears to *me* to be incorrect) result. The program is
below, and is a snippet of the much larger program that has the
problem. The LEDs on the STK200 show a 4 as the result, rather than a 1
as would be expected.

As I had stated in my previous post, the code that I'm porting to the
AVR family is from a PIC 16F876 and does compile correctly using the
Hi-Tech compiler. And, it does handle the negative number comparison
correctly.

What am I doing wrong to get this results? Is this a bug in the
compiler? I'm using the latest Linux stuff from Gunner Henne's website.

Anyone's help would be appreciated with an explanation of the results.

Thanks very much,

Dale Seaburg

--------------------------------------------
// Test negative number problem with *if* statement

#include <iom103.h>
#include <ctype.h>
#include <math.h>
#include <pgmspace.h>
#include <eeprom.h>
#include <string-avr.h>
#include <interrupt.h>
#include <sig-avr.h>
#include <wdt.h>

// *** GLOBAL VARIABLES **

volatile signed char val; // Used in interrupt service routine

// Main Function

main (void)
{
// disable interrupts for initialization
cli();

// Initialize PORTS

outp(0xFF, DDRB); // All outputs for debug
outp(0xFF, PORTB); // turn off DEBUG LEDs for now.

outp(0x00, DDRD); // Switch inputs
outp(0xFF, PORTD); // Enable Pullups

// ****** MAIN EVENT LOOP ******

{
val = -1;

if (val < 0)
{
outp(~1, PORTB);
}
else
{
if (val == 0)
{
outp(~2, PORTB);
}
else
{
if (val > 0)
{
outp(~3, PORTB);
}
else
{
outp(~4, PORTB);
}
}
}
}
}
--------------------------------------------

From [email-masked] Sun May 27 13:05:59 2001
Received: from mailout02.sul.t-online.com ([194.25.134.17] helo=mailout02.sul.t-online.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 153p0I-0000Fg-00
for <[email-masked]>; Sun, 27 May 2001 13:05:58 +1200
Received: from fwd00.sul.t-online.de
by mailout02.sul.t-online.de with smtp
id 153p3M-0004sQ-01; Sun, 27 May 2001 03:09:08 +0200
Received: from smtprelay.t-online.de (510083537852-0001@[217.3.125.93]) by fmrl00.sul.t-online.com
with smtp id 153p3Q-26NNgGC; Sun, 27 May 2001 03:09:12 +0200
To: [email-masked]
From: "Marcus Overhagen" <[email-masked]>
Date: Sun, 27 May 2001 03:17:30 -0700
MIME-Version: 1.0
X-Mailer: Scooby for BeOS
X-Priority: 3
Content-Type: text/plain; charset="ISO-8859-1"
Message-ID: <[email-masked]>
X-Sender: [email-masked]
Subject: [avr-gcc-list] eeprom problem
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I need to remember a few variables during power loss, but it doesn't work.
The calibration does work, but saving the variables to eeprom
and using them as initial values does not produce the correct result.

I'm using the Windows AVR-GCC compiler from avrfreaks.net

What is wrong here? The device is a AT90S2313 running at 10 MHz.

typedef unsigned short uint16;

uint16 eeprom_dummy1 __attribute__ ((section (".eeprom")));
uint16 eeprom_min __attribute__ ((section (".eeprom")));
uint16 eeprom_neutral_min __attribute__ ((section (".eeprom")));
uint16 eeprom_neutral_max __attribute__ ((section (".eeprom")));
uint16 eeprom_max __attribute__ ((section (".eeprom")));
uint16 eeprom_dummy2 __attribute__ ((section (".eeprom")));

volatile uint16 input_min;
volatile uint16 input_neutral_min;
volatile uint16 input_neutral_max;
volatile uint16 input_max;
volatile uint16 input_current;

void calibration(void)
{
//do calibration here

cli(); //disable interrupts

eeprom_min = input_min;
eeprom_neutral_min = input_neutral_min;
eeprom_neutral_max = input_neutral_max;
eeprom_max = input_max;

sei(); //enable interrupts
}

int main(void)
{
input_min = eeprom_min;
input_neutral_min = eeprom_neutral_min;
input_neutral_max = eeprom_neutral_max;
input_max = eeprom_max;

//program starts here

From [email-masked] Sun May 27 13:09:10 2001
Received: from mailout00.sul.t-online.com ([194.25.134.16] helo=mailout00.sul.t-online.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 153p3N-0000GK-00
for <[email-masked]>; Sun, 27 May 2001 13:09:09 +1200
Received: from fwd01.sul.t-online.de
by mailout00.sul.t-online.de with smtp
id 153p6Q-0005YB-00; Sun, 27 May 2001 03:12:18 +0200
Received: from smtprelay.t-online.de (510083537852-0001@[217.3.125.93]) by fmrl01.sul.t-online.com
with smtp id 153p6r-1RIUhUC; Sun, 27 May 2001 03:12:45 +0200
To: [email-masked]
From: "Marcus Overhagen" <[email-masked]>
Date: Sun, 27 May 2001 03:20:38 -0700
MIME-Version: 1.0
X-Mailer: Scooby for BeOS
X-Priority: 3
Content-Type: text/plain; charset="ISO-8859-1"
Message-ID: <[email-masked]>
X-Sender: [email-masked]
Subject: [avr-gcc-list] compile problem
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Why don't the bit_is_set() and loop_until_bit_is_set() compile? It was really hard to find
the source of these "Assembler messages" errors.

C:\avrgcc\fahrtregler>avr-gcc -c -g -O1 -Wall -Wstrict-prototypes -Wa,-ahlms=mai
n.lst -mmcu=at90s2313 -I. main.c -o main.o --save-temps
main.s: Assembler messages:
main.s:134: Error: number must be less than 32
main.s:589: Error: number must be less than 32

if (bit_is_set(TCCR1B,ICES1)) {

clr r24
=> sbic 46,6
inc r24

loop_until_bit_is_set(TIFR,TOV0);

=> L_269: sbis 56,1
rjmp L_269

I'm now using
if (inp(TCCR1B) & (1 << ICES1)) {

and

while (0 == (inp(TIFR) & (1 << TOV0)))
;

From [email-masked] Sun May 27 13:29:14 2001
Received: from avocet.mail.pas.earthlink.net ([207.217.121.50])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 153pMn-0000Ij-00
for <[email-masked]>; Sun, 27 May 2001 13:29:13 +1200
Received: from earthlink.net (1Cust80.tnt1.brownwood.tx.da.uu.net [63.28.230.80])
by avocet.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id SAA19974;
Sat, 26 May 2001 18:32:02 -0700 (PDT)
Message-ID: <[email-masked]>
Date: Sat, 26 May 2001 20:29:40 -0500
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Larry Barello <[email-masked]>,
avg-gcc list <[email-masked]>
Subject: Re: [avr-gcc-list] If statement with Negative number problems
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

My appologes to the list. I was using an older version of the avr
suite. I had downloaded the latest from Gunner's site sometime back,
but had failed to install them. DUH!

I just compiled my test program, and the negative compare in the 'if'
statement produces the correct branch instruction, now.

Thanks for your help Larry.

Dale.

Larry Barello wrote:
>
> Which version of the compiler?

BTW, how does one tell which version date one has loaded. Mine still
shows 2.97 but no date.

From [email-masked] Sun May 27 16:57:12 2001
Received: from pop.sttl.uswest.net ([206.81.192.3] helo=sttlpop3.sttl.uswest.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 153sc3-0000WU-00
for <[email-masked]>; Sun, 27 May 2001 16:57:12 +1200
Received: (qmail 20073 invoked by alias); 27 May 2001 05:00:16 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 20059 invoked by uid 0); 27 May 2001 05:00:16 -0000
Received: from vdsl210.sttl.uswest.net (HELO larry) (216.160.108.210)
by pop.sttl.uswest.net with SMTP; 27 May 2001 05:00:16 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "Marcus Overhagen" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] eeprom problem & compile problems.
Date: Sat, 26 May 2001 21:58:26 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Marcus: look at the file "eeprom.h" for hints on how to do what you want to
do.
By the time you do the assignment you are no longer dealing with variables
in the eeprom segment. You are simply assigning values to SRAM that
happens to have the same address of your eeprom variables.

GCC doesn't really handle various memory spaces like ICC or IAR or CV does.
You can tell it to put stuff into various segments, but accessing FLASH or
EEPROM takes special routines that are handled by macros and inline
assembly in the avr version of GCC. The header file I mentioned will give
you the details.

For your bit test problems: the AVR instruction set has all sorts of
limitations of which registers are usable with which instructions. For
example the immediate instructions only work on R16-R31. All the bit
manipulation instructions only operate on the lower 32 I/O addresses. Etc.

Know the hardware!

Cheers!
Larry Barello
http://www.barello.net

----- Original Message -----
From: "Marcus Overhagen" <[email-masked]>
To: <[email-masked]>
Sent: Sunday, May 27, 2001 3:17 AM
Subject: [avr-gcc-list] eeprom problem

> I need to remember a few variables during power loss, but it doesn't
work.
> The calibration does work, but saving the variables to eeprom
> and using them as initial values does not produce the correct result.
>
> I'm using the Windows AVR-GCC compiler from avrfreaks.net
>
> What is wrong here? The device is a AT90S2313 running at 10 MHz.
>
> typedef unsigned short uint16;
>
> uint16 eeprom_dummy1 __attribute__ ((section (".eeprom")));
> uint16 eeprom_min __attribute__ ((section (".eeprom")));
> uint16 eeprom_neutral_min __attribute__ ((section (".eeprom")));
> uint16 eeprom_neutral_max __attribute__ ((section (".eeprom")));
> uint16 eeprom_max __attribute__ ((section (".eeprom")));
> uint16 eeprom_dummy2 __attribute__ ((section (".eeprom")));
>
> volatile uint16 input_min;
> volatile uint16 input_neutral_min;
> volatile uint16 input_neutral_max;
> volatile uint16 input_max;
> volatile uint16 input_current;
>
>
> void calibration(void)
> {
> //do calibration here
>
> cli(); //disable interrupts
>
> eeprom_min = input_min;
> eeprom_neutral_min = input_neutral_min;
> eeprom_neutral_max = input_neutral_max;
> eeprom_max = input_max;
>
> sei(); //enable interrupts
> }
>
>
> int main(void)
> {
> input_min = eeprom_min;
> input_neutral_min = eeprom_neutral_min;
> input_neutral_max = eeprom_neutral_max;
> input_max = eeprom_max;
>
> //program starts here
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Sun May 27 17:27:11 2001
Received: from pop.sttl.uswest.net ([206.81.192.3] helo=sttlpop3.sttl.uswest.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 153t54-0000Y6-00
for <[email-masked]>; Sun, 27 May 2001 17:27:10 +1200
Received: (qmail 12697 invoked by alias); 27 May 2001 05:30:22 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 12691 invoked by uid 0); 27 May 2001 05:30:21 -0000
Received: from vdsl210.sttl.uswest.net (HELO larry) (216.160.108.210)
by pop.sttl.uswest.net with SMTP; 27 May 2001 05:30:21 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
Date: Sat, 26 May 2001 22:28:10 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Eeprom..
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Ok, here is a concrete example...

--- foo.c ---
#include <eeprom.h>

/* Declare a variable in eeprom and assign an initial value. */

int foo __attribute__ ((section(".eeprom"))) = 0x1234;

int main(void)
{
char myVar = eeprom_rb((unsigned)&foo);

eeprom_wb((unsigned)&foo, 0x0000);

return myVar;
}

-----------

To extract the eep file you need to do:

avr-objcopy -j
.eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma
.eeprom=0 -O ihex foo.elf foo.eep

The magic "--change-section..." is because someone changed the linker
scripts and moved the EEPROM section out in never-never land.

From [email-masked] Mon May 28 05:19:27 2001
Received: from mailgate3.cinetic.de ([212.227.116.80])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1544CM-0001Au-00
for <[email-masked]>; Mon, 28 May 2001 05:19:27 +1200
Received: from cinetic.de (popeye.cinetic.de [194.122.194.100])
by mailgate3.cinetic.de (8.11.2/8.11.2/SuSE Linux 8.11.0-0.4) with SMTP id f4RHMa808489;
Sun, 27 May 2001 19:22:36 +0200
Date: Sun, 27 May 2001 19:22:36 +0200
Message-Id: <[email-masked]>
MIME-Version: 1.0
Organization: http://freemail.web.de/
From: "Marcus Overhagen" <[email-masked]>
To: "Marcus Overhagen" <[email-masked]>, "Larry Barello" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
Subject: Re: Re: [avr-gcc-list] eeprom problem & compile problems.
Precedence: fm-user
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Larry Barello" <[email-masked]> schrieb am 27.05.01:

> GCC doesn't really handle various memory spaces like ICC or IAR or CV does.
> You can tell it to put stuff into various segments, but accessing FLASH or
> EEPROM takes special routines that are handled by macros and inline
> assembly in the avr version of GCC. The header file I mentioned will give
> you the details.

Thank you for the information.
When searching for information about AVR-GCC and eeprom I only found
the section atrributes, and assumed that GCC would be smart enough.

This works now.

regards

Marcus
_______________________________________________________________________
1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de
[email-masked], 8MB Speicher, Verschluesselung - http://freemail.web.de

From [email-masked] Mon May 28 18:20:23 2001
Received: from varis.cs.tut.fi
([130.230.4.42] helo=cs.tut.fi ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 154GO6-0001ma-00
for <[email-masked]>; Mon, 28 May 2001 18:20:22 +1200
Received: from orfeuskerttu.cs.tut.fi ([email-masked] [130.230.2.34])
by cs.tut.fi (8.8.8/8.8.8) with ESMTP id JAA04955;
Mon, 28 May 2001 09:23:29 +0300 (EET DST)
From: Kujala Matti <[email-masked]>
Received: (from ear@localhost)
by orfeuskerttu.cs.tut.fi (8.8.5/8.8.4)
id JAA13506; Mon, 28 May 2001 09:23:32 +0300 (EET DST)
Message-Id: <[email-masked]>
Subject: Re: [avr-gcc-list] compile problem
In-Reply-To: <[email-masked]> from Marcus Overhagen at "May 27, 2001 03:20:38 am"
To: [email-masked] (Marcus Overhagen)
Date: Mon, 28 May 2001 09:23:32 +0300 (EET DST)
Cc: [email-masked]
X-Mailer: ELM [version 2.4ME+ PL49 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> Why don't the bit_is_set() and loop_until_bit_is_set() compile? It was really hard to find
> the source of these "Assembler messages" errors.
>
> C:\avrgcc\fahrtregler>avr-gcc -c -g -O1 -Wall -Wstrict-prototypes -Wa,-ahlms=mai
> n.lst -mmcu=at90s2313 -I. main.c -o main.o --save-temps
> main.s: Assembler messages:
> main.s:134: Error: number must be less than 32
> main.s:589: Error: number must be less than 32
>
> if (bit_is_set(TCCR1B,ICES1)) {
>
> clr r24
> => sbic 46,6
> inc r24
>
>
> loop_until_bit_is_set(TIFR,TOV0);
>
> => L_269: sbis 56,1
> rjmp L_269

Unfortunately 'sbis' assembly command can access only the first 32
registers. Look at AVR datasheets for details.

--
What sorcery, what spells, have brought thee here?

From [email-masked] Mon May 28 21:10:53 2001
Received: from digital.ee.eng.chula.ac.th ([161.200.85.47] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 154J35-0001uQ-00
for <[email-masked]>; Mon, 28 May 2001 21:10:52 +1200
Received: from omega (dhcp-22.digital.ee.eng.chula.ac.th [192.168.1.85])
by digital.ee.eng.chula.ac.th (8.9.3/8.8.7) with SMTP id PAA12306
for <[email-masked]>; Mon, 28 May 2001 15:59:10 +0700
Message-ID: <001401c0e756$9518ad40$5501a8c0@omega>
From: "Yuwanon Tirapotjani" <[email-masked]>
To: <[email-masked]>
Date: Mon, 28 May 2001 16:14:21 +0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="windows-874"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] specify an address for progmem
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I would like to store some font into the program memory. I know about the
progmem attribute, but unfortunately, for some reasons about speed, I would
like to store it in a fixed address. May be at the far end side which it
will not interfere with the code. Is it possible ? If it is, please someone
enlighten me.

Thanks !

Yuwanon

From [email-masked] Mon May 28 07:46:05 2001
Received: from sneezy.ite.mh.se ([193.10.250.246])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1546UG-0001M2-00
for <[email-masked]>; Mon, 28 May 2001 07:46:04 +1200
Received: from STUBO0 (stubo-0-71.student.mh.se [10.252.0.71])
by sneezy.ite.mh.se (8.9.3+Sun/8.9.3) with SMTP id VAA05528
for <[email-masked]>; Sun, 27 May 2001 21:48:47 +0200 (MEST)
From: "Per-Erik Andersson" <[email-masked]>
To: <[email-masked]>
Date: Sun, 27 May 2001 21:40:36 +0200
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] compiling just one C-block.
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I want to compile just one c-code file without the start-up module. This is
because I already have written the asm part.
And I want to compile assemble and link this c-code into an obj and rom file
without the start-up module. How do I do that?

From [email-masked] Tue May 29 00:34:16 2001
Received: from mail.ams.de ([195.30.77.11] helo=[192.168.90.11])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 154MDw-00029Q-00
for <[email-masked]>; Tue, 29 May 2001 00:34:16 +1200
Received: from exchange.ams.de (unverified) by
(Content Technologies SMTPRS 4.2.1) with ESMTP id <T53cc34e12dc0a85a0b42c@> for <[email-masked]>;
Mon, 28 May 2001 14:31:43 +0200
Received: by exchange.ams.de with Internet Mail Service (5.5.2653.19)
id <LYFFCWDA>; Mon, 28 May 2001 14:37:00 +0200
Message-ID: <[email-masked]>
From: Stefan Wimmer <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Date: Mon, 28 May 2001 14:36:00 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
charset="iso-8859-1"
Subject: [avr-gcc-list] Re: If statement with Negative number problems
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Dale Seaburg <[email-masked]> wrote:

> Basically, when I test a variable for a value less than zero, I get an
> incorrect (it appears to *me* to be incorrect) result. The program is
> below, and is a snippet of the much larger program that has the
> problem. The LEDs on the STK200 show a 4 as the result,
> rather than a 1 as would be expected.

Hello Dale,

seems you have to look faster! :)

Your program is putting out a "1" in the first comparison (looking for <0)
which is shortly after overwritten with a "4" in the final "else" part (i.e.
not ==0 and not >0) of your second comparison.

HTH,
Stefan

From [email-masked] Tue May 29 03:16:28 2001
Received: from pop.sttl.uswest.net ([206.81.192.3] helo=sttlpop3.sttl.uswest.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 154Okt-0002Gb-00
for <[email-masked]>; Tue, 29 May 2001 03:16:28 +1200
Received: (qmail 13483 invoked by alias); 28 May 2001 15:19:44 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 13456 invoked by uid 0); 28 May 2001 15:19:43 -0000
Received: from vdsl210.sttl.uswest.net (HELO larry) (216.160.108.210)
by pop.sttl.uswest.net with SMTP; 28 May 2001 15:19:43 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "Per-Erik Andersson" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] compiling just one C-block.
Date: Mon, 28 May 2001 08:20:34 -0700
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0232_01C0E74F.11784060"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_0232_01C0E74F.11784060
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Here is the makefile & source I used to build a single file asm project for
the 1200. I think the key here is to define your own .init section, which
is required by the linker. If you define it yourself, you won't pull in
the gcrt1.S file (the gcc startup code). You don't have to use avr-ld, you
can use the gcc front end and it will link in the appropriate GCC libraries
and runtime support.

note: the -T linker option specifies which link script is loaded. Those
are found in .../avr/lib/ldscripts You won't need that if you use the GCC
front end.

Cheers!

----- Original Message -----
From: "Per-Erik Andersson" <[email-masked]>
To: <[email-masked]>
Sent: Sunday, May 27, 2001 12:40 PM
Subject: [avr-gcc-list] compiling just one C-block.

> I want to compile just one c-code file without the start-up module. This
is
> because I already have written the asm part.
> And I want to compile assemble and link this c-code into an obj and rom
file
> without the start-up module. How do I do that?
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

------=_NextPart_000_0232_01C0E74F.11784060
Content-Type: application/octet-stream;
name="makefile"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="makefile"

# GAS makefile
# Larry Barello May, 2000
#
# MCU = at90s1200
MCU = at90s2313
FORMAT = ihex
LIST = ,-ahlms=$(<:.s=.lst)

LDFLAGS = -Map=$(<:.o=.map) --cref -v -T$(MCU).x
AFLAGS = -c -DMCU=$(MCU) $(MIXED) -Wa,-gstabs,-v

RM = rm -f
BIN = avr-objcopy
AS = avr-gcc -x assembler-with-cpp
LD = avr-ld

ASRC = main.s
OBJ = $(SRC:.c=.o) $(ASRC:.s=.o)

%o: %s
$(AS) $(AFLAGS) $< -o $@

%elf: %o
$(LD) $< $(LDFLAGS) -o $@

%obj: %elf
$(BIN) -O avrobj $< $@

%hex: %elf
$(BIN) -O $(FORMAT) $< $@

all: main.hex

clean:
$(RM) *.o *.elf *.obj *.eep *.hex *.map
make main.hex

main.o: main.s makefile
$(AS) $(AFLAGS) $< -o $@

------=_NextPart_000_0232_01C0E74F.11784060
Content-Type: application/octet-stream;
name="Main.s"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="Main.s"

.arch at90s1200
;#define at90s1200
;
; Hardware
;
; Define the hardware interface and bits
;
; Revision History
; 3/2/2001 - Added bit to enable pull-up on PD6, Brake enable.
;
#include "at90s1200.inc"

#define BV(A) (1<<(A))

#define CPUCLK 16000000L
;
; Tickrate is to be 250k for a 4us resolution on
; the R/C Pulse input.
;
#define TCCR0_INIT CLK64 ; ck/64
#define TCNT0_INIT 0xFF ; Single tick/interrupt.
#define TIMSK_INIT (1<<TOIE0)
#define MCUCR_INIT (1<<SE) // Enable sleep mode
;
; PWM output is +/- 75 for a PWM rate of ~1.7khz and R/C pulse range of =
600us
; PWM output is +/- 125 for a PWM rate of 1.0khz and R/C pulse range of =
1000us
;
#define PWM_600US 75 // Sets range of PWM input (+/- 75 * 4us =
or .6ms)
#define PWM_1000US 125 // Sets range of PWM input (+/- 125 * =
4us or 1.0ms)
#define RC_CENTER (-375) // 1.5ms/4us
#define RC_PULSEFAIL 100 // ~60 ms for pulse failure detact
;
; Port pin definitions
;
#define BRAKE PIND, PD6 // 1 =3D coast, 0 =3D Brake
#define FWD_A PORTD, PD5 // Channel A motor driver signals
#define REV_A PORTD, PD4
#define ENA_A PORTD, PD3
#define FWD_B PORTD, PD2 // Channel B Motor Driver Signals
#define REV_B PORTD, PD1
#define ENA_B PORTD, PD0

#define DDRD_INIT 0x3F // PD6 in, PD5-0 out
#define PORTD_INIT 0x40 // Pullup on PD6

#define DB_1 PINB, PB7 // Deadband select: +/- 0, 4, 8 or 12us
#define MIXED PINB, PB6 // Mixed vs separate
#define NotUsed PINB, PB5
#define RANGE PINB, PB4 // 1 =3D .6 ms, 0 =3D 1.0 ms R/C pulse =
range
#define RC_A_INP PINB, PB3 // A channel R/C pulse input
#define SHDWN_A PINB, PB2 // 0 =3D Kill output channel A
#define RC_B_INP PINB, PB1 // B channel R/C pulse input
#define SHDWN_B PINB, PB0 // 0 =3D Kill output channel B

#define DDRB_INIT 0x00 // All Inputs with pullups
#define PORTB_INIT 0xFF
;
; Register Definitions
;
#define zero R1

#define a_pwm R3 // Working PWM values
#define b_pwm R4
#define centerl R5 // Center value for 1.5ms pulse
#define centerh R6
#define p1 R7 // Passed Parameter 1
#define rp1 R8 // Returned Parameter 1
#define p2 R8
#define b_hold R9 // Holding registers for last computed A =
& B Pulse width
#define a_hold R10
#define pwm_dir R11

#define sreg_save R16
#define range R17
#define deadband R18 // Deadband in 4us increments
#define count R19 // PWM Counter
#define flags R20
#define RC_A_ST 0 // Bit Values
#define RC_A_END 1
#define RC_B_ST 2
#define RC_B_END 3
#define PWM_DIR 4
#define swtmp R21 // High register for swread use...

#define rc_a_cntl R22 // R/C Pulse width counters
#define rc_a_cnth R23
#define rc_b_cntl R24
#define rc_b_cnth R25

#define a_pulsefail R28 // Pulse fail detect counters
#define b_pulsefail R29
;
; Init section of code with reset and interrupt vectors.
;
; Note: Compiling for the 2313 will work for the 1200 because =
unprogrammed
; locations are all NOPs. So, regardless which vector is jumped to, the =
processor
; will eventually find the overfloww vector.
;
.section .init
.func _init
_init:
rjmp reset
rjmp halt
#ifdef at90s1200
.org 0x4
#else
.org 0xC
#endif
rjmp _overflow0_
halt:
cli
rjmp .
=20
.endfunc
=20
.section .text
;
; main routine
;
.func reset
.global reset
reset:
; Initialize all CPU hardware peripherals
;
ldi R16, PORTD_INIT ; set output state before direction.
out PORTD, R16 ; at reset output is low, direction is in.
ldi R16, DDRD_INIT
out DDRD, R16
ldi R16, PORTB_INIT ; ditto
out PORTB, R16
ldi R16, DDRB_INIT
out DDRB, R16

ldi R16, TCNT0_INIT
out TCNT0, R16
ldi R16, TCCR0_INIT
out TCCR0, R16
ldi R16, TIMSK_INIT ; yeah, this is just a bit set...
out TIMSK, R16

ldi R16, MCUCR_INIT ; set up sleep mode & Extn interrupt
out MCUCR, R16
;
; Initialize all working registers
clr zero
clr flags
clr count
clr a_pwm
clr b_pwm
clr a_pulsefail
clr b_pulsefail
ldi R16, 1
mov pwm_dir, r16 // Initialize counting up
;
; Initalize counters so first pass doesnt spike the motors
;
ldi R16, lo8(RC_CENTER)
mov centerl, R16
mov rc_a_cntl, R16
mov rc_b_cntl, R16
ldi R16, hi8(RC_CENTER)
mov centerh, R16
mov rc_a_cnth, R16
mov rc_b_cnth, R16

#ifndef at90s1200
out 0x3C, zero ; Init stack for non-1200 chips
ldi R16, 0xDF
out 0x3D, R16
#endif
sei
=20
forever:
sleep ; Wait for an interrupt
tst count
brne forever
rcall sw_read ; Analyze data every PWM rollover cycle
rjmp forever
=20
.endfunc
;
; Timer Interrupt handler
;
; Reload timer, examine inputs, drive outputs, etc.
; 20-38 cycles/64 (less than 50% load)
;
.func _overflow0_
_overflow0_:
ldi sreg_save, TCNT0_INIT
out TCNT0, sreg_save
in sreg_save, SREG
;
; Logic to measure the pulse width of the RC input
; called every 4us.
;
; 10-22 cycles (mostly 10)
;
rc_read:
sbis RC_A_INP
rjmp 1f
subi rc_a_cntl, lo8(-1)
sbci rc_a_cnth, hi8(-1) ; add 1=20
sbr flags, BV(RC_A_ST)
rjmp 2f
1:
sbrc flags, RC_A_ST
sbr flags, BV(RC_A_END)
2:
sbis RC_B_INP
rjmp 1f
subi rc_b_cntl, lo8(-1)
sbci rc_b_cnth, hi8(-1)
sbr flags, BV(RC_B_ST)
rjmp 2f
1:
sbrc flags, RC_B_ST
sbr flags, BV(RC_B_END)
2:
;
; pwm_control
;
; Counts up/down between 0 and MAXCOUNT
; compares pwm values with count, setting/clearing
; the ENA bit as needed.
; 4/5 cycles
;
pw_control:
add count, pwm_dir
breq pw_flip
cp count, range ; 75 or 125 (so it *can* be =
signed)
brlt pw_done
pw_flip:
neg pwm_dir ; flip sense of count
pw_done:
;
; Set/clear output based upon PWM value and state of Shutdown =
pin
; 11 cycles
cp count, a_pwm
sbic SHDWN_A ; Skip to OFF if shutdown low
brlo pw_A_on
pw_A_off:
cbi ENA_A
rjmp 1f
pw_A_on:
sbi ENA_A
1:
cp count, b_pwm
sbic SHDWN_B
brlo pw_B_on
pw_B_off:
cbi ENA_B
rjmp 1f
pw_B_on:
sbi ENA_B
1:
out SREG, sreg_save
reti
.endfunc

.func sw_read
;
; sw_read
;
; Analyse the RC pulse input and set PWM output.
; Analyse the mode switch input and do calibration modes.
; do pulse failure detect, set output to zero if pulse not present.
;
sw_read:
;
; Deadband is set by an input pin
;
clr deadband
sbic DB_1
ldi deadband, 0x03 ; 12 uS (three ticks)
;
; Range is set by an input pin
;
sbic RANGE ; Test against range...
ldi range, lo8(PWM_600US)
sbis RANGE
ldi range, lo8(PWM_1000US)
;
; Analyze the A Channel
;
sbrc flags, RC_A_END
rjmp sw_A_pulse
;
; Check for missing pulse
;
inc a_pulsefail
cpi a_pulsefail, 100 ; 100 x .6 or 1.0 ms till =
failure
brlt sw_check_B
dec a_pulsefail
mov a_hold, zero
rjmp sw_check_B
;
; Gotta pulse!
;
sw_A_pulse:
clr a_pulsefail
cbr flags, BV(RC_A_ST) | BV(RC_A_END)
;
mov p1, rc_a_cntl
mov p2, rc_a_cnth
rcall CheckCount
mov a_hold, p1
mov rc_a_cntl, centerl
mov rc_a_cnth, centerh

sw_check_B:
sbrc flags, RC_B_END
rjmp sw_B_pulse

inc b_pulsefail
cpi b_pulsefail, 100
brge 1f
rjmp sw_done
1:
dec b_pulsefail
mov b_hold, zero
rjmp SetPwmValues
sw_B_pulse:
clr b_pulsefail
cbr flags, BV(RC_B_ST) | BV(RC_B_END)
;
mov p1, rc_b_cntl
mov p2, rc_b_cnth
rcall CheckCount
mov b_hold, p1
mov rc_b_cntl, centerl
mov rc_b_cnth, centerh

SetPwmValues:
sbic MIXED ; If jumpered, then mix
rjmp straight
=20
mov R30, b_hold ; Sign extend b_hold
clr R31
sbrc R30, 7
com R31

mov p1, a_hold ; Compute mixed signal
clr p2
sbrc p1, 7
com p2
add p1, R30
adc p2, R31
rcall CheckCount ; Limit to +/- 1/2 the range.
mov a_pwm, p1

mov p1, a_hold ; Compute mixed signal
clr p2
sbrc p1, 7
com p2
sub p1, R30
sbc p2, R31
rcall CheckCount
mov b_pwm, p1
rjmp endmix
straight:
mov a_pwm, a_hold ; Straight across
mov b_pwm, b_hold
endmix:
;
; Now, set drive bits, etc and wrap up
;
tst a_pwm
brlt sw_a_reverse
breq sw_a_halt
sw_a_forward:
sbi FWD_A
cbi REV_A
rjmp sw_a_reload
sw_a_reverse:
cbi FWD_A
sbi REV_A
neg a_pwm
rjmp sw_a_reload
sw_a_halt:
cbi FWD_A
cbi REV_A
sbic BRAKE
rjmp sw_a_reload
mov a_pwm, range
inc a_pwm
sw_a_reload:
;
; channel B bits
;
tst b_pwm
brlt sw_b_reverse
breq sw_b_halt
sw_b_forward:
sbi FWD_B
cbi REV_B
rjmp sw_b_reload
sw_b_reverse:
cbi FWD_B
sbi REV_B
neg b_pwm
rjmp sw_b_reload
sw_b_halt:
cbi FWD_B
cbi REV_B
sbic BRAKE
rjmp sw_b_reload
mov b_pwm, range ; force enable high always
inc b_pwm ; when braking.
sw_b_reload:

sw_done:
ret
.endfunc
=20
.func CheckCount
;
; CheckCount
;
; Passed:
; p1, p2 =3D low & high byte of count
; Return
; p1 =3D signed value of power
;=20
CheckCount:
cp p1, zero
cpc p2, zero
brlt reverse
forward:
cp deadband, p1
cpc zero, p2
brge 1f
cp p1, range
cpc p2, zero
brlt 2f
mov p1, range
2:
tst p1
ret
1:
clr p1
ret
reverse:
ldi swtmp, 1
com p1 ; negate count
com p2
add p1, swtmp
adc p2, zero
=20
cp deadband, p1
cpc zero, p2
brge 1b
cp p1, range
cpc p2, zero
brlt 2f
mov p1, range
2:
neg p1 ; return neg flags
ret
.endfunc

------=_NextPart_000_0232_01C0E74F.11784060--

From [email-masked] Tue May 29 04:52:14 2001
Received: from violetto.carpi.orion.it ([212.115.68.66] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 154QFZ-0002LY-00
for <[email-masked]>; Tue, 29 May 2001 04:52:13 +1200
Received: from zelotti (usr23.carpi.orion.it [212.115.68.152])
by violetto.carpi.orion.it (8.9.3/8.9.1) with SMTP id SAA10799
for <[email-masked]>; Mon, 28 May 2001 18:56:25 +0200
Message-ID: <[email-masked]>
From: "Ufficio Software" <[email-masked]>
To: <[email-masked]>
Date: Mon, 28 May 2001 18:52:27 +0200
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0007_01C0E7A7.57132100"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Subject: [avr-gcc-list] AVR-GCC sram variables
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_0007_01C0E7A7.57132100
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

HI,
I'm developing an application using AT90S2313 (128 bytes of RAM) using =
AVR-GCC version 2.95.2.
My application defines 70 bytes of SRAM (global variables), but having a =
look to map files, the variables are allocated starting from 0x70 and =
some bytes variables allovates 2 bytes instead of 1.
The final result is that the stack overwrite some variables.
How ram from 0x60 to 0x70 is used by AVR-GCC compiler? Can I use this =
area?
How global variables are allocated? How can I modify this behaviour (if =
possible).

Thanks for help.

Patrizio Zelotti
[email-masked]

------=_NextPart_000_0007_01C0E7A7.57132100
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>HI,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I'm developing an application using =
AT90S2313 (128=20
bytes of RAM) using AVR-GCC version 2.95.2.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>My application defines 70 bytes of SRAM =
(global=20
variables), but having a look to map files, the variables are allocated =
starting=20
from 0x70 and some bytes variables allovates&nbsp;2 bytes instead of=20
1.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>The final result is that the stack =
overwrite some=20
variables.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>How ram from 0x60 to 0x70 is used by =
AVR-GCC=20
compiler? Can&nbsp;I use this area?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>How global variables are allocated? How =
can I=20
modify this behaviour (if possible).</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for help.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Patrizio Zelotti</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"mailto:[email-masked]">[email-masked]</A></FONT></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0007_01C0E7A7.57132100--

From [email-masked] Tue May 29 08:59:12 2001
Received: from pop.sttl.uswest.net ([206.81.192.3] helo=sttlpop3.sttl.uswest.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 154U6Z-0002fL-00
for <[email-masked]>; Tue, 29 May 2001 08:59:11 +1200
Received: (qmail 23686 invoked by alias); 28 May 2001 20:39:25 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 5851 invoked by uid 0); 28 May 2001 20:20:09 -0000
Received: from vdsl210.sttl.uswest.net (HELO larry) (216.160.108.210)
by pop.sttl.uswest.net with SMTP; 28 May 2001 20:20:09 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] AVR-GCC sram variables
Date: Mon, 28 May 2001 13:14:36 -0700
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0253_01C0E778.249AF240"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_0253_01C0E778.249AF240
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

You should get a newer compiler. Look at www.combio.de/avr

If you don't want to get a new compiler, try putting all your global =
data into a struct - then they will be packed w/o any padding. If =
allocation starts at 0x70, then you must have some strings or some other =
initialized data occupying the first 16 bytes.

Best to get newer compiler. 2.95 has some serious data allocation =
problems.

Cheers!
----- Original Message -----=20
From: Ufficio Software=20
To: [email-masked]=20
Sent: Monday, May 28, 2001 9:52 AM
Subject: [avr-gcc-list] AVR-GCC sram variables

HI,
I'm developing an application using AT90S2313 (128 bytes of RAM) using =
AVR-GCC version 2.95.2.
My application defines 70 bytes of SRAM (global variables), but having =
a look to map files, the variables are allocated starting from 0x70 and =
some bytes variables allovates 2 bytes instead of 1.
The final result is that the stack overwrite some variables.
How ram from 0x60 to 0x70 is used by AVR-GCC compiler? Can I use this =
area?
How global variables are allocated? How can I modify this behaviour =
(if possible).

Thanks for help.

Patrizio Zelotti
[email-masked]

------=_NextPart_000_0253_01C0E778.249AF240
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4207.2601" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>You should get a newer compiler.&nbsp; Look at <A=20
href=3D"http://www.combio.de/avr">www.combio.de/avr</A></FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>If you don't want to get a new compiler, try putting =
all your=20
global data into a struct - then they will be packed w/o any =
padding.&nbsp; If=20
allocation starts at 0x70, then you must have some strings or some other =

initialized data occupying the first 16 bytes.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Best to get newer compiler.&nbsp; 2.95 has some =
serious data=20
allocation problems.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Cheers!</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
<A title=[email-masked]=20
href=3D"mailto:[email-masked]">Ufficio Software</A> =
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
title=[email-masked]=20
=
href=3D"mailto:[email-masked]">[email-masked]</A>=
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Monday, May 28, 2001 9:52 =
AM</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [avr-gcc-list] AVR-GCC =
sram=20
variables</DIV>
<DIV><BR></DIV>
<DIV><FONT face=3DArial size=3D2>HI,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I'm developing an application using =
AT90S2313=20
(128 bytes of RAM) using AVR-GCC version 2.95.2.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>My application defines 70 bytes of =
SRAM (global=20
variables), but having a look to map files, the variables are =
allocated=20
starting from 0x70 and some bytes variables allovates&nbsp;2 bytes =
instead of=20
1.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>The final result is that the stack =
overwrite some=20
variables.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>How ram from 0x60 to 0x70 is used by =
AVR-GCC=20
compiler? Can&nbsp;I use this area?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>How global variables are allocated? =
How can I=20
modify this behaviour (if possible).</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for help.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Patrizio Zelotti</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"mailto:[email-masked]">[email-masked]</A></FONT></DIV>
<DIV>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0253_01C0E778.249AF240--

From [email-masked] Wed May 30 09:40:42 2001
Received: from [195.235.113.141] (helo=tsmtppp2.teleline.es)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 154rEH-0003uV-00
for <[email-masked]>; Wed, 30 May 2001 09:40:41 +1200
Received: from gines ([213.96.107.254]) by tsmtppp2.teleline.es
(Netscape Messaging Server 4.1) with SMTP id GE494Z02.PL4 for
<[email-masked]>; Tue, 29 May 2001 23:31:47 +0200
Message-ID: <[email-masked]>
From: "Gines Martinez Sanchez" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]> <[email-masked]>
Date: Tue, 29 May 2001 23:28:35 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Subject: [avr-gcc-list] Declaring external memory
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello everybody.
One simple question, I think.
How do I declare data in external memory, in C and asm?
I have a 8515 with 32K of external RAM memory at 0x8000 address.

Thanks

From [email-masked] Wed May 30 19:10:39 2001
Received: from hgems.uia.ac.be ([143.169.254.10] helo=gems.uia.ac.be)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15507q-0004KB-00
for <[email-masked]>; Wed, 30 May 2001 19:10:38 +1200
Received: from hhipe.uia.ac.be (hhipe.uia.ac.be [143.169.5.1])
by gems.uia.ac.be (8.11.3/8.11.0) with ESMTP id f4U7E0I12695
for <[email-masked]>; Wed, 30 May 2001 09:14:00 +0200 (MET DST)
Received: from hhipe.uia.ac.be (hhipe.uia.ac.be [143.169.5.1])
by hhipe.uia.ac.be (8.10.2/Switch-2.0.0) with ESMTP id f4U7Dxr24505
for <[email-masked]>; Wed, 30 May 2001 09:13:59 +0200 (MET DST)
Date: Wed, 30 May 2001 09:13:59 +0200 (MET DST)
From: Paul Casteels <[email-masked]>
X-Sender: <[email-masked]>
To: avr-gcc-list <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Scanned-By: MIMEDefang 1.1 UIA version
Subject: [avr-gcc-list] -O3 problem
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I am using Win32 avrgcc20010211.exe from http://8bit.at/avr.

When I compile this with -O3 :
#include <string.h>

void tst(int dum) {
dum = dum + 1;
}

int main(void) {
char num_str[6];
int i;

num_str[0] = '0';
num_str[1] = 0;
i = 5 - strlen(num_str);
tst(i);
return 1;
}
I get :
avr-gcc -c -g -O3 -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst
-mmcu=at90s8515 -I. test.c -o test.o
test.c: In function `main':
test.c:16: Internal compiler error in print_rtl_and_abort, at flow.c:6514
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make: *** [test.o] Error 1

If I compile with -O2 it works fine. From string.h I see :
extern size_t strlen(const char *) __ATTR_PURE__;
Does __ATTR_PURE__ mean it's an inline function ? It does look like that
when I check the assembler output from -O2.

Best regards,

Paul Casteels ([email-masked])

From [email-masked] Thu May 31 01:42:27 2001
Received: from hgems.uia.ac.be ([143.169.254.10] helo=gems.uia.ac.be)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1556F0-0004gz-00
for <[email-masked]>; Thu, 31 May 2001 01:42:26 +1200
Received: from hhipe.uia.ac.be (hhipe.uia.ac.be [143.169.5.1])
by gems.uia.ac.be (8.11.3/8.11.0) with ESMTP id f4UDjnI10340
for <[email-masked]>; Wed, 30 May 2001 15:45:50 +0200 (MET DST)
Received: from hhipe.uia.ac.be (hhipe.uia.ac.be [143.169.5.1])
by hhipe.uia.ac.be (8.10.2/Switch-2.0.0) with ESMTP id f4UDjnr03054
for <[email-masked]>; Wed, 30 May 2001 15:45:49 +0200 (MET DST)
Date: Wed, 30 May 2001 15:45:49 +0200 (MET DST)
From: Paul Casteels <[email-masked]>
X-Sender: <[email-masked]>
To: avr-gcc-list <[email-masked]>
Subject: Re: [avr-gcc-list] -O3 problem
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Scanned-By: MIMEDefang 1.1 UIA version
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

In my previous mail I mentioned a compiler (avrgcc20010211.exe) crash
compiling a simple program with the strlen function with -O3 optimization.
-O2 optimization compiles but produces erroneous results.
Only -O1 seems reliable. I also had a code fragment with the abs()
function that produced wrong code with -O2. Is it unsafe to use greater
optimization then -O1 ? Do I need to get a newer version ?

Best regards and many thanks,

Paul Casteels ([email-masked])

On Wed, 30 May 2001, Paul Casteels wrote:

> Hi,
>
> I am using Win32 avrgcc20010211.exe from http://8bit.at/avr.
>
> When I compile this with -O3 :
> #include <string.h>
>
> void tst(int dum) {
> dum = dum + 1;
> }
>
> int main(void) {
> char num_str[6];
> int i;
>
> num_str[0] = '0';
> num_str[1] = 0;
> i = 5 - strlen(num_str);
> tst(i);
> return 1;
> }
> I get :
> avr-gcc -c -g -O3 -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst
> -mmcu=at90s8515 -I. test.c -o test.o
> test.c: In function `main':
> test.c:16: Internal compiler error in print_rtl_and_abort, at flow.c:6514
> Please submit a full bug report.
> See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
> make: *** [test.o] Error 1
>
> If I compile with -O2 it works fine. From string.h I see :
> extern size_t strlen(const char *) __ATTR_PURE__;
> Does __ATTR_PURE__ mean it's an inline function ? It does look like that
> when I check the assembler output from -O2.
>
> Best regards,
>
> Paul Casteels ([email-masked])
>
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Thu May 31 07:04:30 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 155BGe-00050C-00
for <[email-masked]>; Thu, 31 May 2001 07:04:29 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [217.23.68.70])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id XAA13594;
Wed, 30 May 2001 23:07:50 +0400
To: Paul Casteels <[email-masked]>
Cc: avr-gcc-list <[email-masked]>
Subject: Re: [avr-gcc-list] -O3 problem
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 30 May 2001 23:00:55 +0400
In-Reply-To: Paul Casteels's message of "Wed, 30 May 2001 15:45:49 +0200 (MET DST)"
Message-ID: <[email-masked]>
Lines: 12
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Paul Casteels <[email-masked]> writes:

> Hi,
>
> In my previous mail I mentioned a compiler (avrgcc20010211.exe) crash
> compiling a simple program with the strlen function with -O3 optimization.
> -O2 optimization compiles but produces erroneous results.
> Only -O1 seems reliable. I also had a code fragment with the abs()
> function that produced wrong code with -O2. Is it unsafe to use greater
> optimization then -O1 ? Do I need to get a newer version ?

Yes.

From [email-masked] Thu May 31 00:27:06 2001
Received: from mail.unibel.by ([195.50.0.161] helo=alice.unibel.by)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15553w-0004d7-00
for <[email-masked]>; Thu, 31 May 2001 00:27:06 +1200
Received: from mail.gsu.unibel.by ([195.50.8.21]) by alice.unibel.by with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13)
id L6TTACNK; Wed, 30 May 2001 15:24:34 +0300
Received: by PHIS_SERVER with Internet Mail Service (5.5.2650.21)
id <LFR3HYC0>; Wed, 30 May 2001 15:29:45 +0300
Message-ID: <FEA7F60C9210D5118FAB0080C863E55F66465A@PHIS_SERVER>
From: Alex Tolkachiov <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Date: Wed, 30 May 2001 15:29:44 +0300
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: text/plain
Subject: [avr-gcc-list] GCC AVR for Win32
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Can I somewhere get avr-gcc binaries for win32 ?

From [email-masked] Thu May 31 10:00:49 2001
Received: from mtiwmhc21.worldnet.att.net ([204.127.131.46])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 155E1J-0005BV-00
for <[email-masked]>; Thu, 31 May 2001 10:00:49 +1200
Received: from jimanji ([12.93.208.219]) by mtiwmhc21.worldnet.att.net
(InterMail vM.4.01.03.16 201-229-121-116-20010115) with SMTP
id <20010530220346.NZAU6716.mtiwmhc21.worldnet.att.net@jimanji>;
Wed, 30 May 2001 22:03:46 +0000
Message-ID: <002e01c0e94c$04408f20$0200a8c0@jimanji>
Reply-To: "Jim Pearce" <[email-masked]>
From: "Jim Pearce" <[email-masked]>
To: "Alex Tolkachiov" <[email-masked]>,
<[email-masked]>
References: <FEA7F60C9210D5118FAB0080C863E55F66465A@PHIS_SERVER>
Subject: Re: [avr-gcc-list] GCC AVR for Win32
Date: Wed, 30 May 2001 18:03:45 -0300
Organization: Pegasus Technologies
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is what I am using:

http://combio.de/avr/avrgcc-3.4.2001.mingw32.tar.gz

From [email-masked] Thu May 31 13:23:39 2001
Received: from mtiwmhc25.worldnet.att.net ([204.127.131.50])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 155HBb-0005Mr-00
for <[email-masked]>; Thu, 31 May 2001 13:23:39 +1200
Received: from jimanji ([12.93.209.6]) by mtiwmhc25.worldnet.att.net
(InterMail vM.4.01.03.16 201-229-121-116-20010115) with SMTP
id <20010531012636.VGSH2291.mtiwmhc25.worldnet.att.net@jimanji>;
Thu, 31 May 2001 01:26:36 +0000
Message-ID: <[email-masked]>
Reply-To: "Jim Pearce" <[email-masked]>
From: "Jim Pearce" <[email-masked]>
To: <[email-masked]>,
"Larry Barello" <[email-masked]>
References: <FEA7F60C9210D5118FAB0080C863E55F66465A@PHIS_SERVER> <002e01c0e94c$04408f20$0200a8c0@jimanji> <[email-masked]>
Subject: Re: [avr-gcc-list] GCC AVR for Win32
Date: Wed, 30 May 2001 21:26:35 -0300
Organization: Pegasus Technologies
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Reading specs from C:\AVRGCC\BIN\..\lib\gcc-lib\avr\3.0\specs
Configured with: ./configure --target=avr --exec-prefix=/avrgcc --prefix=/avrgc
--build=i386-pc-mingw32 --host=i386-pc-mingw32 : (reconfigured) ./configure --
arget=avr --exec-prefix=/avrgcc --prefix=/avrgcc --build=i386-pc-mingw32 --host
i386-pc-mingw32 : (reconfigured) ./configure --target=avr --exec-prefix=/avrgcc
--prefix=/avrgcc --build=i386-pc-mingw32 --host=i386-pc-mingw32 : (reconfigured
: (reconfigured) ./configure --target=avr --exec-prefix=/avrgcc --prefix=/avr
cc --build=i386-pc-mingw32 --host=i386-pc-mingw32 --enable-language=c
gcc version 3.0 20010402 (prerelease)

> Jim, could you send me the "avr-gcc -v" output from your version?
>
> >
> > http://combio.de/avr/avrgcc-3.4.2001.mingw32.tar.gz
> >

From [email-masked] Thu May 31 19:13:17 2001
Received: from hgems.uia.ac.be ([143.169.254.10] helo=gems.uia.ac.be)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 155Mdw-0005hw-00
for <[email-masked]>; Thu, 31 May 2001 19:13:16 +1200
Received: from hhipe.uia.ac.be (hhipe.uia.ac.be [143.169.5.1])
by gems.uia.ac.be (8.11.3/8.11.0) with ESMTP id f4V7GeI26691
for <[email-masked]>; Thu, 31 May 2001 09:16:40 +0200 (MET DST)
Received: from hhipe.uia.ac.be (hhipe.uia.ac.be [143.169.5.1])
by hhipe.uia.ac.be (8.10.2/Switch-2.0.0) with ESMTP id f4V7GeU10525
for <[email-masked]>; Thu, 31 May 2001 09:16:40 +0200 (MET DST)
Date: Thu, 31 May 2001 09:16:40 +0200 (MET DST)
From: Paul Casteels <[email-masked]>
X-Sender: <[email-masked]>
To: avr-gcc-list <[email-masked]>
Subject: Re: [avr-gcc-list] -O3 problem (fwd)
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Scanned-By: MIMEDefang 1.1 UIA version
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

After installing this newer version of the compiler :
http://www.avrfreaks.com/AVRGCC/Download/avrgcc20010228bz.exe
my problem with -O3 has dissapeared.
Many thanks to Denis Chertykov <[email-masked]>

Paul Casteels

From [email-masked] Thu May 31 19:40:15 2001
Received: from exchange.prism.co.za ([196.34.63.66])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 155N41-0005ks-00
for <[email-masked]>; Thu, 31 May 2001 19:40:14 +1200
Received: from prism.co.za (10.5.3.12 [10.5.3.12]) by exchange.prism.co.za with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13)
id LPSLGNS3; Thu, 31 May 2001 09:49:38 +0200
Message-ID: <[email-masked]>
Date: Thu, 31 May 2001 09:47:13 +0200
From: Pieter Potgieter <[email-masked]>
X-Mailer: Mozilla 4.73 [en] (X11; I; Linux 2.2.15-4mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Newest binary?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi fellow AVR-GCC users

Q1: I would just like to know whether the following binary is the latest and
greatest avr-gcc tool set.

http://combio.de/avr/binutils-2001.02.28.linuxbin.tar.gz

and if not what is it an d where can I get the latest one?

Q2: According to Atmel the new AVRStudio 3.5 can also support '3d party c
compilers' (read avr-gcc), has anyone tried this?
I would like some tips and tricks. Can I run Avrstudio in Wine and use the
output of the avr-gcc to debug a project ?
If I have to do this in Windoze I would rather not use it.

Thanks
Pieter Potgieter

ns. We would like to compliment and thanks all the avr-gcc developers,and
maintainers. Our project is using 115k of the 128k of the mega 103 without a
hitch. All compiled with avrr-gcc!!

From [email-masked] Thu May 31 23:41:07 2001
Received: from swan.mail.pas.earthlink.net ([207.217.120.123])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 155Qp8-00065I-00
for <[email-masked]>; Thu, 31 May 2001 23:41:06 +1200
Received: from earthlink.net (1Cust113.tnt1.brownwood.tx.da.uu.net [63.28.230.113])
by swan.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id EAA26352
for <[email-masked]>; Thu, 31 May 2001 04:44:09 -0700 (PDT)
Message-ID: <[email-masked]>
Date: Thu, 31 May 2001 06:41:51 -0500
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: avg-gcc list <[email-masked]>
Subject: Re: [avr-gcc-list] -O3 problem (fwd)
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Paul Casteels wrote:
>
> Hi,
>
> After installing this newer version of the compiler :
> http://www.avrfreaks.com/AVRGCC/Download/avrgcc20010228bz.exe
> my problem with -O3 has dissapeared.
> Many thanks to Denis Chertykov <[email-masked]>

I recall that there were several problems with using -O3 back in the
January, February time frame of this year.

Is it a safe assumption that the -O3 option is now safe to use?

Is it a safe assumption that all known bugs associated with -O3 have
been dealt with? Obviously, there maybe unknown ones, but, I'm
referring to any known ones.

Thanks,

Dale Seaburg

From [email-masked] Fri Jun 01 05:13:30 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 155W0n-0006L4-00
for <[email-masked]>; Fri, 01 Jun 2001 05:13:29 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [217.23.68.92])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id VAA25860
for <[email-masked]>; Thu, 31 May 2001 21:16:56 +0400
Date: Thu, 31 May 2001 21:16:55 +0400
Message-Id: <[email-masked]>
From: Denis Chertykov <[email-masked]>
To: [email-masked]
Subject: [avr-gcc-list] gcc-3.0 schedule
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

gcc-3.0 will be released 15-Jun-2001.
I'm interested in bug reports.

Denis.

From [email-masked] Fri Jun 01 05:13:53 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 155W1A-0006L9-00
for <[email-masked]>; Fri, 01 Jun 2001 05:13:52 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [217.23.68.92])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id VAA25886;
Thu, 31 May 2001 21:17:16 +0400
To: Pieter Potgieter <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Newest binary?
References: <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 31 May 2001 21:10:21 +0400
In-Reply-To: Pieter Potgieter's message of "Thu, 31 May 2001 09:47:13 +0200"
Message-ID: <[email-masked]>
Lines: 27
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Pieter Potgieter <[email-masked]> writes:

> Hi fellow AVR-GCC users
>
> Q1: I would just like to know whether the following binary is the latest and
> greatest avr-gcc tool set.
>
> http://combio.de/avr/binutils-2001.02.28.linuxbin.tar.gz
>
> and if not what is it an d where can I get the latest one?
>
> Q2: According to Atmel the new AVRStudio 3.5 can also support '3d party c
> compilers' (read avr-gcc), has anyone tried this?
> I would like some tips and tricks. Can I run Avrstudio in Wine and use the
> output of the avr-gcc to debug a project ?
> If I have to do this in Windoze I would rather not use it.
>
> Thanks
> Pieter Potgieter
>
> ns. We would like to compliment and thanks all the avr-gcc developers,and
> maintainers. Our project is using 115k of the 128k of the mega 103 without a
> hitch. All compiled with avrr-gcc!!

Thanks for complement.

Denis.

From [email-masked] Fri Jun 01 05:14:00 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 155W1H-0006LE-00
for <[email-masked]>; Fri, 01 Jun 2001 05:13:59 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [217.23.68.92])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id VAA25897;
Thu, 31 May 2001 21:17:28 +0400
To: Pieter Potgieter <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Newest binary?
References: <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 31 May 2001 21:10:33 +0400
In-Reply-To: Pieter Potgieter's message of "Thu, 31 May 2001 09:47:13 +0200"
Message-ID: <[email-masked]>
Lines: 29
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Pieter Potgieter <[email-masked]> writes:

> Hi fellow AVR-GCC users
>
> Q1: I would just like to know whether the following binary is the latest and
> greatest avr-gcc tool set.
>
> http://combio.de/avr/binutils-2001.02.28.linuxbin.tar.gz
>
> and if not what is it an d where can I get the latest one?
>
> Q2: According to Atmel the new AVRStudio 3.5 can also support '3d party c
> compilers' (read avr-gcc), has anyone tried this?
> I would like some tips and tricks. Can I run Avrstudio in Wine and use the
> output of the avr-gcc to debug a project ?
> If I have to do this in Windoze I would rather not use it.
>
> Thanks
> Pieter Potgieter
>
> ns. We would like to compliment and thanks all the avr-gcc developers,and
> maintainers. Our project is using 115k of the 128k of the mega 103 without a
> hitch. All compiled with avrr-gcc!!
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Fri Jun 01 05:14:09 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 155W1P-0006LL-00
for <[email-masked]>; Fri, 01 Jun 2001 05:14:07 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [217.23.68.92])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id VAA25908;
Thu, 31 May 2001 21:17:35 +0400
To: Dale Seaburg <[email-masked]>
Cc: avg-gcc list <[email-masked]>
Subject: Re: [avr-gcc-list] -O3 problem (fwd)
References: <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 31 May 2001 21:10:40 +0400
In-Reply-To: Dale Seaburg's message of "Thu, 31 May 2001 06:41:51 -0500"
Message-ID: <[email-masked]>
Lines: 18
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Dale Seaburg <[email-masked]> writes:

> Paul Casteels wrote:
> >
> > Hi,
> >
> > After installing this newer version of the compiler :
> > http://www.avrfreaks.com/AVRGCC/Download/avrgcc20010228bz.exe
> > my problem with -O3 has dissapeared.
> > Many thanks to Denis Chertykov <[email-masked]>
>
> I recall that there were several problems with using -O3 back in the
> January, February time frame of this year.
>
> Is it a safe assumption that the -O3 option is now safe to use?

I don't know any -O3 related bugs.
And any bugs at all.

From [email-masked] Fri Jun 01 23:02:28 2001
Received: from nuustak.csir.co.za ([146.64.10.11])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 155mh1-0007Ly-00
for <[email-masked]>; Fri, 01 Jun 2001 23:02:19 +1200
Received: from CS-IMO.CSIR.CO.ZA (cs-imo.csir.co.za [146.64.10.94])
by nuustak.csir.co.za (8.10.1/8.10.1) with SMTP id f51B4e114788
for <[email-masked]>; Fri, 1 Jun 2001 13:04:40 +0200 (SAT)
Disclaimer: The CSIR exercises no editorial control over E-mail
messages originating in the organisation and the views in this
message are therefore not necessarily those of the CSIR and/or
its employees.
Received: from GW-IMO-Message_Server by CS-IMO.CSIR.CO.ZA
with Novell_GroupWise; Fri, 01 Jun 2001 13:04:04 +0200
Message-Id: <[email-masked]>
X-Mailer: Novell GroupWise Internet Agent 5.5.4.1
Date: Fri, 01 Jun 2001 13:03:58 +0200
From: "Peter Bosscha" <[email-masked]>
To: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Subject: [avr-gcc-list] Working Win Release
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi All,

This is going to be a long one but please stick with it:
I've been using Volker's AVRGCC for about =BE of a year now and have been =
trying to go to a newer implementation off and on for about the last 4 =
months. I'm working under Windows for a MEGA103 target. The reasons for =
changing are that at some stage I would like to use AVRX, memory management=
is better and there is support for the newer cores. I'm probably going to =
switch over to the MEGA104 as soon as possible.

I'm confused, the release that can be downloaded from AVRFREAKS has known =
bugs (read their comments). The combio.de site lists only older releases, =
again with known bugs (?) And I have not been able to get anything =
compiled/linked from newer releases (I got up to 2001.04.23). These =
produce weird linker errors, include files are not in the normal directory =
etc.=20

Dennis keeps on saying there are no known bugs and everything is great and =
that is probably the case for the Linux version, but it's not my experience=
for the windows releases.=20

So, is there an AVRGCC for Windows release available that:

A: Compiles/Links for MEGA103
B: Has no (known) mul bugs
C: Has no (known) O3 bugs
D: Has no (major) known other bugs

Looking forward to your response,

Peter=20

p.s.:
I have a c-based sprintf that handles % [flags] [width] [.prec] [l] =
type_char for %d ,%i ,%u,%x ,%c,%s,%e,%f. Anyone interested ? (uses =
dtostre)

From [email-masked] Sat Jun 02 17:59:02 2001
Received: from tigris.overta.ru ([195.151.108.134])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1564RA-0000jV-00
for <[email-masked]>; Sat, 02 Jun 2001 17:59:01 +1200
Received: from localhost.localdomain (IDENT:[email-masked] [217.23.68.85])
by tigris.overta.ru (8.9.3/8.9.3) with ESMTP id KAA31077;
Sat, 2 Jun 2001 10:02:33 +0400
To: "Peter Bosscha" <[email-masked]>
Cc: <[email-masked]>
Subject: Re: [avr-gcc-list] Working Win Release
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
In-Reply-To: "Peter Bosscha"'s message of "Fri, 01 Jun 2001 13:03:58 +0200"
X-Mailer: Gnus v5.7/Emacs 20.4
Date: 01 Jun 2001 23:04:47 +0400
Message-ID: <[email-masked]>
Lines: 74
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Peter Bosscha" <[email-masked]> writes:

> Hi All,
>
> This is going to be a long one but please stick with it:
> I've been using Volker's AVRGCC for about =BE of a year now and have been =
> trying to go to a newer implementation off and on for about the last 4 =
> months. I'm working under Windows for a MEGA103 target. The reasons for =
> changing are that at some stage I would like to use AVRX, memory management=
> is better and there is support for the newer cores. I'm probably going to =
> switch over to the MEGA104 as soon as possible.
>
> I'm confused, the release that can be downloaded from AVRFREAKS has known =
> bugs (read their comments). The combio.de site lists only older releases, =
> again with known bugs (?) And I have not been able to get anything =
> compiled/linked from newer releases (I got up to 2001.04.23). These =
> produce weird linker errors, include files are not in the normal directory =
> etc.=20
>
> Dennis keeps on saying there are no known bugs and everything is great and =
> that is probably the case for the Linux version, but it's not my experience=
> for the windows releases.=20
>
> So, is there an AVRGCC for Windows release available that:
>
> A: Compiles/Links for MEGA103

Don't know.

> B: Has no (known) mul bugs

Was fixed by:
2001-03-28 Marek Michalkiewicz <[email-masked]>

* config/avr/libgcc.S (__mulhi3): Correct tests to exit the loop
when multiplier or multiplicand is zero.

> C: Has no (known) O3 bugs

It's really a conditional jump bug.
Was fixed by:
Sun Jan 21 09:44:17 2001 Denis Chertykov <[email-masked]>

* config/avr/avr.c (ret_cond_branch): New argument (reverse) added.
If REVERSE nonzero then condition code in X must be reversed.
(encode_section_info): Optimise if/else.
(avr_function_value): Fix formatting.

* config/avr/avr.md (branch): Call to ret_cond_branch changed.
(difficult_branch): Likewise.
(rvbranch): Likewise.
(difficult_rvbranch): Likewise.

* config/avr/avr-protos.h (ret_cond_branch): Prototype changed.

* config/avr/libgcc.S: Fix comment.

> D: Has no (major) known other bugs

I don't know.

From [email-masked] Sun Jun 03 07:12:55 2001
Received: from sttlpop3.sttl.uswest.net ([206.81.192.3])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 156GpS-00035f-00
for <[email-masked]>; Sun, 03 Jun 2001 07:12:54 +1200
Received: (qmail 20797 invoked by alias); 2 Jun 2001 19:16:27 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 20773 invoked by uid 0); 2 Jun 2001 19:16:26 -0000
Received: from vdsl210.sttl.uswest.net (HELO larry) (216.160.108.210)
by sttlpop3.sttl.uswest.net with SMTP; 2 Jun 2001 19:16:26 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
Date: Sat, 2 Jun 2001 12:11:33 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Technical question about header file organization and gcrt1.S
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

In gcrt1.S there are three sections for interrupt vectors. One for the
FPSLIC chips, one for the tiny and a third, more general one for everything
else. Why? Is it because the order of vectors changes between those three
major groups?

I am making my projects portable between IAR and GCC (!) and since IAR does
not have anything equivalent to the GCC avr-io.h nor the automatic vector
table stuff, I wrote my own. In IAR I have an absolute segment with all
possible vectors declared, wrapped in #ifdef..., just like GCC (amazing).
Each vector has an associated address, so I can simply do this:

#ifdef TIMER0_OVF0_vect
ORG TIMER0_OVF0_vect
XJMP SIG_OVERFLOW0
#endif

All is well and good. Getting back to the question: Is there any reason I
need to make separate tables for the FPSLIC and tiny parts? Because I can
do the ORG, in IAR, it doesn't matter the ORDER of the vectors as they will
shuffle as needed.

Thanks!

P.S. GCC 3.0 (20010423) compares *very* favorably to IAR. IAR makes better
code, but GCC runtime support is smaller. Overall, in my projects,
resulting code size is within 100 bytes out of 7kb. IAR is better only in
debug support with astudio.

From [email-masked] Sun Jun 03 21:50:59 2001
Received: from hammer.overta.ru ([195.151.108.138] helo=overta.ru)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 156UXC-00047B-00
for <[email-masked]>; Sun, 03 Jun 2001 21:50:59 +1200
Received: from [217.23.68.94] (HELO localhost.localdomain)
by overta.ru (CommuniGate Pro SMTP 3.4.7)
with ESMTP id 50009; Sun, 03 Jun 2001 13:53:33 +0400
To: "Larry Barello" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
Subject: Re: [avr-gcc-list] Technical question about header file organization and gcrt1.S
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 03 Jun 2001 13:47:10 +0400
In-Reply-To: "Larry Barello"'s message of "Sat, 2 Jun 2001 12:11:33 -0700"
Message-ID: <[email-masked]>
Lines: 21
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Larry Barello" <[email-masked]> writes:

[...]

>
> P.S. GCC 3.0 (20010423) compares *very* favorably to IAR. IAR makes better
> code, but GCC runtime support is smaller. Overall, in my projects,
> resulting code size is within 100 bytes out of 7kb. IAR is better only in
> debug support with astudio.

How about comparison of generated code speed.
I'm very interested. Can you send me examples.

PS: GCC 3.0 (20010423) known as buggy. Use newer snapshort.
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Mon Jun 04 23:59:19 2001
Received: from violetto.carpi.orion.it ([212.115.68.66] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 156t0w-0005Cd-00
for <[email-masked]>; Mon, 04 Jun 2001 23:59:18 +1200
Received: from zelotti (usr24.carpi.orion.it [212.115.68.153])
by violetto.carpi.orion.it (8.9.3/8.9.1) with SMTP id OAA12295
for <[email-masked]>; Mon, 4 Jun 2001 14:04:45 +0200
Message-ID: <[email-masked]>
From: "Ufficio Software" <[email-masked]>
To: <[email-masked]>
Date: Mon, 4 Jun 2001 14:00:31 +0200
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_007E_01C0ECFE.B83B0D60"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Subject: [avr-gcc-list] AVR-GCC Win32 version
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_007E_01C0ECFE.B83B0D60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi to all,

I'm new to AVR-GCC; I started with WIN32 version 2.95.2 and I had =
problems with variables allocation; then I had the suggestion to update =
to newer version: now I'm using version 3.1 20010228 (experimental) from =
http://www.combio.de/avr/ .
I had a look to the avr-gcc-list-request and I see that there are newer =
version, also C++ ports.
Also on Gunnar Henne site is possible to get =
avrgcc-3.4.2001.mingw32.tar.gz.
On http://www.avrfreaks.org/ there is avrgcc20010228bz.exe (should be =
the same of Gunnar Henne site).
=20
Some simple questions:
-where is and which is the lastest Win32 stable version of avr-gcc ?
-should I update my version to avrgcc-3.4.2001.mingw32.tar.gz ?
-C++ port is available for download ?

-Can someone tell me the format of the elf file of avr-gcc or where i =
can find documentation describing the format ?

Thanks

Patrizio Zelotti

------=_NextPart_000_007E_01C0ECFE.B83B0D60
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>Hi to all,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I'm new to AVR-GCC; I started =
with&nbsp;WIN32=20
version 2.95.2&nbsp;and I had problems with variables allocation; then I =
had the=20
suggestion to update to newer version: now I'm using version 3.1 =
20010228=20
(experimental) from <A=20
href=3D"http://www.combio.de/avr/">http://www.combio.de/avr/</A>&nbsp;.</=
FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I had a look to the =
avr-gcc-list-request and I see=20
that there are newer version, also C++ ports.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Also on Gunnar Henne site is possible =
to get=20
avrgcc-3.4.2001.mingw32.tar.gz.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>On&nbsp;<A=20
href=3D"http://www.avrfreaks.org/">http://www.avrfreaks.org/</A>&nbsp;the=
re is=20
avrgcc20010228bz.exe (should be the same of Gunnar Henne =
site).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Some simple questions:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-where is and which is the lastest =
Win32 stable=20
version of avr-gcc ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-should I update my version to=20
avrgcc-3.4.2001.mingw32.tar.gz ?</FONT></DIV>
<DIV>-C++ port is available for download ?</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>-Can someone tell me the format of the =
elf file of=20
avr-gcc or where i can find documentation describing the format =
?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Patrizio Zelotti</FONT></DIV>
<DIV>&nbsp;</DIV></FONT></DIV></BODY></HTML>

------=_NextPart_000_007E_01C0ECFE.B83B0D60--

From [email-masked] Wed Jun 06 15:45:03 2001
Received: from sttlpop3.sttl.uswest.net ([206.81.192.3])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 157UFi-0006vK-00
for <[email-masked]>; Wed, 06 Jun 2001 15:45:02 +1200
Received: (qmail 26525 invoked by alias); 6 Jun 2001 03:48:51 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 26477 invoked by uid 0); 6 Jun 2001 03:48:49 -0000
Received: from vdsl210.sttl.uswest.net (HELO larry) (216.160.108.210)
by sttlpop3.sttl.uswest.net with SMTP; 6 Jun 2001 03:48:49 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "avrx" <[email-masked]>
Cc: <[email-masked]>,
"AVR GCC List" <[email-masked]>,
"avrchat" <[email-masked]>
Date: Tue, 5 Jun 2001 20:50:15 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] AvrX 2.6, for GCC and IAR compilers available
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Today, I published version 2.6 of AvrX: a priority driven, multitasking
real time scheduler. This version is basically version 2.5b with some
minor changes and a lot of source text change to allow it to be built for
either the IAR ICCAVR compiler or GCC 2.97 or above (I used 3.0...)

The release notes are at:

http://www.barello.net/avrx/index.htm

you can shortcut to the particular release at

http://www.barello.net/avrx/AvrX-2.6/index.htm

The release ZIP file contains the kernel source, sample code, test cases
and makefiles that can build either the IAR or the GCC versions.

AvrX is a small Real Time Operating System (RTOS) that has about 35 API in
tasking, semaphores, timer management, message queues and single step
support. It comes with a modest debug monitor that allows single stepping
individual tasks, examining memory and task contexts (registers).

I did this port mainly to see how the IAR compiler was compared to the GCC
compiler. IAR has some advantages over GCC (much better debug support in
windows) but in my main robotic application the smaller IAR code size was
more than made up for with the larger runtime support libraries.
Essentially both were a push. YMMV.

Cheers
Larry Barello
http://www.barello.net

From [email-masked] Thu Jun 07 00:51:50 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 157cmr-0007IU-00
for <[email-masked]>; Thu, 07 Jun 2001 00:51:49 +1200
Received: from oTRIs.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id OAA24412
for <[email-masked]>; Wed, 6 Jun 2001 14:55:14 +0200
Message-ID: <[email-masked]>
Date: Wed, 06 Jun 2001 15:00:15 +0200
From: Gunnar Henne <[email-masked]>
Reply-To: [email-masked]
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] New Binaries available
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello

the error in cvs binutils seems to have vanished, so I have built a new
version for Windows. The source is from 2001.06.06.
The avrobj patch is included and is (quickly) tested with AvrStudio 3.5.
You have to set up a projct in AvrStudio, otherwise it will hang! See
the online help.

You can find the new version on:

http://www.combio.de/avr/

Last time some of you stripped the archives down to the really needed
parts. It would be a good idea to write a small shell/perl script to
automate this. Also it would be nice if someone makes a installer config
and tells me how to build a windows installation.

Regards

Gunnar Henne

From [email-masked] Thu Jun 07 02:35:14 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 157eOu-0007NF-00
for <[email-masked]>; Thu, 07 Jun 2001 02:35:13 +1200
Received: from oTRIs.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id QAA32039
for <[email-masked]>; Wed, 6 Jun 2001 16:39:08 +0200
Message-ID: <[email-masked]>
Date: Wed, 06 Jun 2001 16:44:09 +0200
From: Gunnar Henne <[email-masked]>
Reply-To: [email-masked]
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] New linux binaries available
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

now there are also new binaries for linux available.
See
http://www.combio.de/avr
Binutils and gcc are in binary form, avr-libc is there as source.

There is a complete RPM containing a ready-to-run package with gcc +
binutils + compiled avr-libc:
http://www.combio.de/avr/avr-devtools-0.2-1.i386.rpm

It is compiled under RedHat 6.2, but should also work with other
linuxes.
Try installing with
rpm -ivh --nodeps --force avr-devtools-0.2-1.i386.rpm

Is there any volunteer who is able to write a shell/perl script to
reduce the package size?

Regards

Gunnar Henne

From [email-masked] Thu Jun 07 02:41:55 2001
Received: from [206.197.156.12] (helo=millerwelds.com)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 157eVO-0007OF-00
for <[email-masked]>; Thu, 07 Jun 2001 02:41:55 +1200
Received: from MEMCO-Message_Server by millerwelds.com
with Novell_GroupWise; Wed, 06 Jun 2001 09:45:17 -0500
Message-Id: <[email-masked]>
X-Mailer: Novell GroupWise Internet Agent 5.5.4.1
Date: Wed, 06 Jun 2001 09:44:45 -0500
From: "TODD BATZLER" <[email-masked]>
To: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Subject: [avr-gcc-list] GAS listing of a string in program memory
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

First, thanks to all the "regulars" contributing to the list. I've =
learned a lot keeping my mouth shut and "ears" open.

Can anyone tell me why the following statement declared outside of "main" =
shows only the first 10 bytes in the .lst file even though it is correctly =
linked and located complete into the rom image? It seems only to be =
particular with strings, since a seemingly endless list of chars or ints =
is correctly listed and put into the rom image.

unsigned char __attribute__ ((progmem)) a[] =3D "060501 This is a date =
stamp";

While I'm at it, does anyone have an example of a linker script that =
would locate a 16 byte string in the .text section at a specific address =
(say ORIGIN 0x100 LENGTH =3D 16)? Thanks in advance.

Todd Batzler

>>> [email-masked] 06/04/01 07:01PM >>>
Send avr-gcc-list mailing list submissions to
[email-masked]=20

To subscribe or unsubscribe via the World Wide Web, visit
http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list=20
or, via email, send a message with subject or body 'help' to
[email-masked]=20

You can reach the person managing the list at
[email-masked]=20

When replying, please edit your Subject line so it is more specific
than "Re: Contents of avr-gcc-list digest..."

Today's Topics:

1. AVR-GCC Win32 version (Ufficio Software)

--__--__--

Message: 1
From: "Ufficio Software" <[email-masked]>
To: <[email-masked]>
Date: Mon, 4 Jun 2001 14:00:31 +0200
Subject: [avr-gcc-list] AVR-GCC Win32 version

This is a multi-part message in MIME format.

------=3D_NextPart_000_007E_01C0ECFE.B83B0D60
Content-Type: text/plain;
charset=3D"iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi to all,

I'm new to AVR-GCC; I started with WIN32 version 2.95.2 and I had =3D
problems with variables allocation; then I had the suggestion to update =
=3D
to newer version: now I'm using version 3.1 20010228 (experimental) from =
=3D
http://www.combio.de/avr/ .
I had a look to the avr-gcc-list-request and I see that there are newer =
=3D
version, also C++ ports.
Also on Gunnar Henne site is possible to get =3D
avrgcc-3.4.2001.mingw32.tar.gz.
On http://www.avrfreaks.org/ there is avrgcc20010228bz.exe (should be =3D
the same of Gunnar Henne site).
=3D20
Some simple questions:
-where is and which is the lastest Win32 stable version of avr-gcc ?
-should I update my version to avrgcc-3.4.2001.mingw32.tar.gz ?
-C++ port is available for download ?

-Can someone tell me the format of the elf file of avr-gcc or where i =3D
can find documentation describing the format ?

Thanks

Patrizio Zelotti

------=3D_NextPart_000_007E_01C0ECFE.B83B0D60
Content-Type: text/html;
charset=3D"iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D3D"text/html; charset=3D3Diso-8859-1" =3D
http-equiv=3D3DContent-Type>
<META content=3D3D"MSHTML 5.00.2614.3500" name=3D3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D3D#ffffff>
<DIV><FONT face=3D3DArial size=3D3D2>
<DIV><FONT face=3D3DArial size=3D3D2>Hi to all,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D3DArial size=3D3D2>I'm new to AVR-GCC; I started =3D
with&nbsp;WIN32=3D20
version 2.95.2&nbsp;and I had problems with variables allocation; then I =
=3D
had the=3D20
suggestion to update to newer version: now I'm using version 3.1 =3D
20010228=3D20
(experimental) from <A=3D20
href=3D3D"http://www.combio.de/avr/">http://www.combio.de/avr/</A>&nbsp;.</=
=3D
FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2>I had a look to the =3D
avr-gcc-list-request and I see=3D20
that there are newer version, also C++ ports.</FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2>Also on Gunnar Henne site is possible =
=3D
to get=3D20
avrgcc-3.4.2001.mingw32.tar.gz.</FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2>On&nbsp;<A=3D20
href=3D3D"http://www.avrfreaks.org/">http://www.avrfreaks.org/</A>&nbsp;the=
=3D
re is=3D20
avrgcc20010228bz.exe (should be the same of Gunnar Henne =3D
site).</FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D3DArial size=3D3D2>Some simple questions:</FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2>-where is and which is the lastest =
=3D
Win32 stable=3D20
version of avr-gcc ?</FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2>-should I update my version to=3D20
avrgcc-3.4.2001.mingw32.tar.gz ?</FONT></DIV>
<DIV>-C++ port is available for download ?</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D3DArial size=3D3D2>-Can someone tell me the format of =
the =3D
elf file of=3D20
avr-gcc or where i can find documentation describing the format =3D
?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D3DArial size=3D3D2>Thanks</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D3DArial size=3D3D2>Patrizio Zelotti</FONT></DIV>
<DIV>&nbsp;</DIV></FONT></DIV></BODY></HTML>

------=3D_NextPart_000_007E_01C0ECFE.B83B0D60--

--__--__--

_______________________________________________
avr-gcc-list mailing list
[email-masked]=20
http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list=20

End of avr-gcc-list Digest

From [email-masked] Thu Jun 07 03:29:49 2001
Received: from ces1.ces.uoguelph.ca ([131.104.236.204] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 157fFk-0007Qp-00
for <[email-masked]>; Thu, 07 Jun 2001 03:29:48 +1200
Received: from localhost (jlawson@localhost)
by CES1.ces.uoguelph.ca (8.10.2/8.10.2) with ESMTP id f56FUTZ31209
for <[email-masked]>; Wed, 6 Jun 2001 11:30:29 -0400
Date: Wed, 6 Jun 2001 11:30:29 -0400 (EDT)
From: Jamie Lawson <[email-masked]>
To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] Invalid bfd target
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

/opt/avrgcc/bin/avr-objcopy: avrlcd.obj: Invalid bfd target

What exactly does this mean? I get this error whenever I attempt any of
the avrgcc versions for Linux. It seems to be the step which should
create the ihex or srec file.

Thanks.

Jamie Lawson
jlawson at uoguelph.ca

From [email-masked] Thu Jun 07 04:06:21 2001
Received: from sttlpop4.sttl.uswest.net ([206.81.192.4])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 157fp6-0007Sv-00
for <[email-masked]>; Thu, 07 Jun 2001 04:06:21 +1200
Received: (qmail 72195 invoked by alias); 6 Jun 2001 16:09:47 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 72170 invoked by uid 0); 6 Jun 2001 16:09:47 -0000
Received: from vdsl210.sttl.uswest.net (HELO larry) (216.160.108.210)
by sttlpop4.sttl.uswest.net with SMTP; 6 Jun 2001 16:09:47 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "Jamie Lawson" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Invalid bfd target
Date: Wed, 6 Jun 2001 09:05:51 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I doubt the linux versions have the Atmel object module patches applied.
You want something more like

avr-objcopy -O ihex foo.elf foo.hex

----- Original Message -----
From: "Jamie Lawson" <[email-masked]>

>
> /opt/avrgcc/bin/avr-objcopy: avrlcd.obj: Invalid bfd target
>
> What exactly does this mean? I get this error whenever I attempt any of
> the avrgcc versions for Linux. It seems to be the step which should
> create the ihex or srec file.

From [email-masked] Thu Jun 07 04:28:02 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 157gA4-0007UK-00
for <[email-masked]>; Thu, 07 Jun 2001 04:28:01 +1200
Received: (from j@localhost)
by ida.interface-business.de id f56GVto12971;
Wed, 6 Jun 2001 18:31:55 +0200 (MET DST)
Date: Wed, 6 Jun 2001 18:31:55 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] Invalid bfd target
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Jamie Lawson <[email-masked]> wrote:

> /opt/avrgcc/bin/avr-objcopy: avrlcd.obj: Invalid bfd target

Can you please quote the entire command line that causes it?

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Thu Jun 07 21:34:08 2001
Received: from pd951a23c.dip.t-dialin.net ([217.81.162.60] helo=linux100.halm.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 157wB4-0008EW-00
for <[email-masked]>; Thu, 07 Jun 2001 21:34:07 +1200
Received: from linux23 (pc23.halm.loc [192.168.1.23])
by linux100.halm.de (8.8.8/8.8.8) with SMTP id LAA18686
for <[email-masked]>; Thu, 7 Jun 2001 11:41:49 +0200
Content-Type: text/plain;
charset="iso-8859-1"
From: Alfred Meixner <[email-masked]>
Reply-To: [email-masked]
To: [email-masked]
Date: Thu, 7 Jun 2001 11:35:04 +0200
X-Mailer: KMail [version 1.2]
MIME-Version: 1.0
Message-Id: <01060711350400.01451@linux23>
Content-Transfer-Encoding: 8bit
Subject: [avr-gcc-list] TCP/IP stack
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,
I need a TCP/IP stack for an embedded application (10Base and 100Base
Ethernet) .
I think what I need is a software TCP/IP Stack and the appropriate hardware
(which chip?) with a chip driver.
Does anyone knows a solution for an Atmel controller or knows somebody who
knows something about it?
Alfred
--
A. Meixner, h.a.l.m. elektronik GmbH
email: [email-masked]

From [email-masked] Thu Jun 07 22:21:31 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 157wuv-0008Gp-00
for <[email-masked]>; Thu, 07 Jun 2001 22:21:30 +1200
Received: from oTRIs.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id MAA26369
for <[email-masked]>; Thu, 7 Jun 2001 12:25:24 +0200
Message-ID: <[email-masked]>
Date: Thu, 07 Jun 2001 12:30:27 +0200
From: Gunnar Henne <[email-masked]>
Reply-To: [email-masked]
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Stripped linux RPM available (3.5 M)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello

"Francisco T. A. Silva" wrote:
> > Is there any volunteer who is able to write a shell/perl script to
> > reduce the package size?
> See the attached script. It works well for me, reducing the installed tree
> size to about 12M (from 30M).

Thanks for the script. I applied it to my avr-devtools, so the resulting
RPM is only 3.5 M in size. :-)

You can download it as:

http://www.combio.de/avr/avr-devtools-0.2-1.stripped.i386.rpm

Regards

Gunnar Henne

From [email-masked] Thu Jun 07 23:31:47 2001
Received: from [193.101.57.9] (helo=ida.interface-business.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 157y0w-0008KC-00
for <[email-masked]>; Thu, 07 Jun 2001 23:31:46 +1200
Received: (from j@localhost)
by ida.interface-business.de id f57BZe519002;
Thu, 7 Jun 2001 13:35:40 +0200 (MET DST)
Date: Thu, 7 Jun 2001 13:35:40 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <01060711350400.01451@linux23>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] TCP/IP stack
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Alfred Meixner <[email-masked]> wrote:

> I need a TCP/IP stack for an embedded application (10Base and
> 100Base Ethernet) .

Liquorice claims to have a fairly complete stack. Runs only on a
larger CPU, though. One of the supported solutions was to connect a
3C509 ISA card.

http://liquorice.sourceforge.net/

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Thu Jun 07 23:51:40 2001
Received: from mailgate3.cinetic.de ([212.227.116.80])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 157yKB-0008LP-00
for <[email-masked]>; Thu, 07 Jun 2001 23:51:39 +1200
Received: from smtp.web.de (smtp01.web.de [194.45.170.210])
by mailgate3.cinetic.de (8.11.2/8.11.2/SuSE Linux 8.11.0-0.4) with SMTP id f57Btc805450;
Thu, 7 Jun 2001 13:55:38 +0200
Received: from AMDK6400 by smtp.web.de with smtp
(freemail 4.2.1.8 #22) id m157yO0-007aBrC; Thu, 7 Jun 2001 13:55 +0200
Message-ID: <006001c0ef48$d0edc0e0$96047e35@AMDK6400>
From: "Ulrich Fischer" <[email-masked]>
To: <[email-masked]>, <[email-masked]>
References: <01060711350400.01451@linux23>
Subject: Re: [avr-gcc-list] TCP/IP stack
Date: Thu, 7 Jun 2001 13:55:46 +0200
Organization: FISCHER ELEKTRONIK
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,
take a look at http://www.egnite.de/main1_1_3.htm.
Maybe this is what your searching.

Regards,
Ulrich Fischer

----- Original Message -----
From: "Alfred Meixner" <[email-masked]>
To: <[email-masked]>
Sent: Thursday, June 07, 2001 11:35 AM
Subject: [avr-gcc-list] TCP/IP stack

> Hello,
> I need a TCP/IP stack for an embedded application (10Base and 100Base
> Ethernet) .
> I think what I need is a software TCP/IP Stack and the appropriate
hardware
> (which chip?) with a chip driver.
> Does anyone knows a solution for an Atmel controller or knows somebody who
> knows something about it?
> Alfred
> --
> A. Meixner, h.a.l.m. elektronik GmbH
> email: [email-masked]
>
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Fri Jun 08 04:35:06 2001
Received: from [212.184.210.65] (helo=romulus.maridan.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1582kT-00005z-00
for <[email-masked]>; Fri, 08 Jun 2001 04:35:05 +1200
Received: from egnite.net (pD900A8D0.dip.t-dialin.net [217.0.168.208])
by romulus.maridan.net (8.9.3/8.9.3) with SMTP id SAA25358
for <[email-masked]>; Thu, 7 Jun 2001 18:38:31 +0200
Message-Id: <[email-masked]>
From: "Harald Kipp" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Thu, 07 Jun 2001 18:25:53 +0100 (MEZ)
Reply-To: "Harald Kipp" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 2.00.1500 for OS/2 Warp 4.00
In-Reply-To: <01060711350400.01451@linux23>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: [avr-gcc-list] TCP/IP stack
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I'm near to finish version 2 of our Nut/OS, which
is still based a little bit on Liquorice. It's
Open Source with kind of BSD licence. The reference
hardware design is free as well. I'm using
avrgcc20010228bz.exe and the resulting 28k (!)
binary seems to work fine. (Btw. It's really a
pity that I wasn't able to see any clear answer
in this group with a link "Here's the most bug-
free binary of GCC :-().

If you need a professional (=expensive) version,
you may check www.cmx.com.

Liquorice could be found at sourceforge.

And not to forget eAvr, but I'm not sure how
far they've got.

Harald Kipp

egnite Software GmbH TEL +49 (0)2323-925375
Westring 303 FAX +49 (0)2323-925374
44629 Herne
Germany

Embedded Ethernet - http://www.egnite.de/

From [email-masked] Fri Jun 08 04:39:12 2001
Received: from overclockers.zip.com.au ([61.8.3.18] helo=odin.zip.com.au)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1582oS-00006i-00
for <[email-masked]>; Fri, 08 Jun 2001 04:39:12 +1200
Received: from mwp by odin.zip.com.au with local-esmtp (Exim 3.12 #1 (Debian))
id 1582cz-00055r-00; Fri, 08 Jun 2001 02:27:21 +1000
Date: Fri, 8 Jun 2001 02:27:21 +1000 (EST)
From: MWP <[email-masked]>
X-Sender: [email-masked]
To: [email-masked]
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] testing...
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

sorry... new to the list..

MWP

From rako@eirik Fri Jun 08 06:59:23 2001
Received: from mailout00.sul.t-online.com ([194.25.134.16] helo=mailout00.sul.t-online.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 158506-0000Gc-00
for <[email-masked]>; Fri, 08 Jun 2001 06:59:23 +1200
Received: from fwd06.sul.t-online.de
by mailout00.sul.t-online.de with smtp
id 15853z-0002et-07; Thu, 07 Jun 2001 21:03:23 +0200
Received: from eirik (320052789252-0001@[62.158.169.184]) by fmrl06.sul.t-online.com
with smtp id 15853r-0HnVGSC; Thu, 7 Jun 2001 21:03:15 +0200
Content-Type: text/plain;
charset="iso-8859-1"
From: Ralph Koettlitz <[email-masked]>
Reply-To: [email-masked]
To: [email-masked]
Date: Thu, 7 Jun 2001 21:14:37 +0200
X-Mailer: KMail [version 1.2]
MIME-Version: 1.0
Message-Id: <01060721143700.00687@eirik>
Content-Transfer-Encoding: 8bit
X-Sender: [email-masked]
Subject: [avr-gcc-list] Getting GCC and libc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Where can I get the sources for the AVRGCC and the libc? I am asking for a
version that is working.

Thanks
Ralph

From [email-masked] Fri Jun 08 10:33:37 2001
Received: from cicero2.cybercity.dk ([212.242.40.53])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1588LQ-0000Q7-00
for <[email-masked]>; Fri, 08 Jun 2001 10:33:36 +1200
Received: from usr04.cybercity.dk (usr04.cybercity.dk [212.242.40.36])
by cicero2.cybercity.dk (Postfix) with ESMTP id 8C549FFF44
for <[email-masked]>; Fri, 8 Jun 2001 00:37:35 +0200 (CEST)
Received: from noa3 (port0.cvx1-sl.ppp.cybercity.dk [217.157.103.129])
by usr04.cybercity.dk (8.11.2/8.11.0) with SMTP id f57Mbbq33353
for <[email-masked]>; Fri, 8 Jun 2001 00:37:37 +0200 (CEST)
(envelope-from [email-masked])
Message-ID: <00be01c0efa2$856e4270$e7052d0a@noa3>
From: "Kasper Pedersen" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: [avr-gcc-list] Yet another install build
Date: Fri, 8 Jun 2001 00:36:29 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Here's yet another repackaging of Gunnar's files.
This time in 8 small chunks just less than 1MB.

http://kkp.dhs.org/avrgcc20010606a.1of8.exe
http://kkp.dhs.org/avrgcc20010606a.2of8
http://kkp.dhs.org/avrgcc20010606a.3of8
http://kkp.dhs.org/avrgcc20010606a.4of8
http://kkp.dhs.org/avrgcc20010606a.5of8
http://kkp.dhs.org/avrgcc20010606a.6of8
http://kkp.dhs.org/avrgcc20010606a.7of8
http://kkp.dhs.org/avrgcc20010606a.8of8

when the exe is run, it will create avrgcc20010606a.exe, approx. 7.7MB.

Notes:
The library in it is 20010331, not avr-libc-2001.06.06 as gunnar
(incorrectly?) has named his link.
The installer has been modified for better compression and file splitting.
Report bugs, yell at me etc.

If you want to split it into equally sized chunks, use
avrgcc20010606a /split into 8
or
avrgcc20010606a /split size 1000000
just make sure that the first chunk is more than 200k.

I have not yet tested it myself. (I will have to modify a thousand lines of
asm for the 'new' calling convention before I can do that)

/Kasper

From [email-masked] Fri Jun 08 19:23:07 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 158Gbp-0000mA-00
for <[email-masked]>; Fri, 08 Jun 2001 19:23:06 +1200
Received: from oTRIs.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id JAA14897
for <[email-masked]>; Fri, 8 Jun 2001 09:27:08 +0200
Message-ID: <[email-masked]>
Date: Fri, 08 Jun 2001 09:32:12 +0200
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Here's the most bug-free binary of GCC, was TCP/IP stack
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Harald,

Harald Kipp wrote:
> Btw. It's really a
> pity that I wasn't able to see any clear answer
> in this group with a link "Here's the most bug-
> free binary of GCC :-().

Since my binaries are from the latest available CVS Sources all bugfixes
up to the compile time should be included. According to Denis we are
getting close to release of gcc 3.0. So you can expect a quite stable
version.

http://www.combio.de/avr

Regards

Gunnar Henne

From [email-masked] Sat Jun 09 02:35:55 2001
Received: from r220-1.rz.rwth-aachen.de ([134.130.3.31])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 158NMg-00012w-00
for <[email-masked]>; Sat, 09 Jun 2001 02:35:54 +1200
Received: from r220-1.rz.RWTH-Aachen.DE (relay2.RWTH-Aachen.DE [134.130.3.1])
by r220-1.rz.RWTH-Aachen.DE (8.10.1/8.11.3-2) with ESMTP id f58EdvU02589
for <[email-masked]>; Fri, 8 Jun 2001 16:39:57 +0200 (MEST)
Received: from Ostermann-net.de (pD952C8D9.dip.t-dialin.net [217.82.200.217])
by r220-1.rz.RWTH-Aachen.DE (8.10.1/8.11.3/3) with SMTP id f58Edud02575
for <[email-masked]>; Fri, 8 Jun 2001 16:39:56 +0200 (MEST)
Message-Id: <[email-masked]>
Date: Fri, 8 Jun 2001 16:30:58 +0200
From: Thorsten Ostermann <[email-masked]>
To: [email-masked]
X-Mailer: Thorsten Ostermann's registered AK-Mail 3.1 publicbeta2a [ger]
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] Re: TCP/IP stack
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> I need a TCP/IP stack for an embedded application (10Base and
> 100Base Ethernet).
> I think what I need is a software TCP/IP Stack and the appropriate
> hardware (which chip?) with a chip driver.
> Does anyone knows a solution for an Atmel controller or knows
> somebody who knows something about it?

Hi,
I just read this posting from Ulf S (Atmel) in news:comp.arch.embedded :

> On Tue, 5 Jun 2001 10:49:02 +0200, "Ulf Samuelsson"
> <[email-masked]> wrote:
>
> >It is indeed a product, Got my board last Friday :-)
> >The TCP/IP stack is available in source form.
> >There is an ISP connector for the onboard ATMEGA103 and an
> >unmounted JTAG connector for (To be filled in later :-)
> >Since the ATMEGA103 only has 4 kB of memory, the
> >board has an additional 32 kB of SRAM mounted.

Best regards
Thorsten
--
PGP welcome!
Thorsten online: http://www.ostermann-net.de/electronic/
Rund um Schrittmotor, Fr=E4s-Bohr-Plotter & Mikrocontroller

From [email-masked] Sat Jun 09 02:47:51 2001
Received: from nw176.netaddress.usa.net ([204.68.24.76])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 158NYE-00013t-00
for <[email-masked]>; Sat, 09 Jun 2001 02:47:50 +1200
Received: (qmail 16167 invoked by uid 60001); 8 Jun 2001 14:51:55 -0000
Message-ID: <[email-masked]>
Received: from 204.68.24.76 by nw176 for [213.177.64.3] via web-mailer(34FM.0700.17C.01) on Fri Jun 8 14:51:55 GMT 2001
Date: 8 Jun 2001 16:51:55 MET DST
From: Elmar Koch <[email-masked]>
To: [email-masked]
X-Mailer: USANET web-mailer (34FM.0700.17C.01)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] Include ASM in C
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

maybe a stupid question, but ...

I'm new to AVR GCC and I'm trying to include some assembler instructions =
in my
C-program. =

When I do the following:

asm volatile("sbi 0x15,0x07;");

everything is OK!

but when I do the same but replacing the address of the port by its label=

like:

asm volatile("sbi PORTB,0x07;");

I get a compilation error: "Error: constant value required"

This happens even if I define a constant like:
#define MYPORTB 0x15
asm volatile("sbi MYPORTB,0x07;");

This is the same also with register labels.

Any idea on what I'm doing wrong?

Also, how can a pass variables into an assembler instruction. It seems th=
at
only globally defined variables are recognized. Anybody can confirm this?=

Thanks to all!

Elmar

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=3D=
1

From [email-masked] Sat Jun 09 02:53:15 2001
Received: from sttlpop4.sttl.uswest.net ([206.81.192.4])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 158NdS-00014X-00
for <[email-masked]>; Sat, 09 Jun 2001 02:53:14 +1200
Received: (qmail 90637 invoked by alias); 8 Jun 2001 14:56:49 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 90629 invoked by uid 0); 8 Jun 2001 14:56:49 -0000
Received: from vdsl210.sttl.uswest.net (HELO larry) (216.160.108.210)
by sttlpop4.sttl.uswest.net with SMTP; 8 Jun 2001 14:56:49 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
Subject: Fw: [avr-gcc-list] Here's the most bug-free binary of GCC
Date: Fri, 8 Jun 2001 07:52:06 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I have an ~7k application of which ~6k is C code. The 20010606 release
compiles my application with identical results compared to the 20010423 and
an earlier release (all 3.0) using the -Os switch. An early release of 3.1
(in march) compiles slightly smaller code (~16 bytes/6k) The current
release (0606) compiles apparently error free code with -O3 (I don't use
the clib other than fp), but the executable size is larger. e.g.

20010606 -0s -> 0x7cf0
20010606 -O3 -> 0x7d32

I have been pretty happy with all releases using -Os since March. I look
forward to the 3.1 release with improved register allocation as that is one
of the weak points with GCC right now.

GCC is one great compiler. I just have to change one define in my
makefiles to rebuild for any suitable target! Hats off to Denis, Marek,
Michael, Gunnar and all the others who have made this possible.

Now, if Atmel can deliver .elf support in astudio...

Larry Barello
http://www.barello.net

----- Original Message -----
From: "Gunnar Henne" <[email-masked]>

> Hello Harald,
>
> Harald Kipp wrote:
> > Btw. It's really a
> > pity that I wasn't able to see any clear answer
> > in this group with a link "Here's the most bug-
> > free binary of GCC :-().
>
> Since my binaries are from the latest available CVS Sources all bugfixes
> up to the compile time should be included. According to Denis we are
> getting close to release of gcc 3.0. So you can expect a quite stable
> version.

From [email-masked] Sat Jun 09 04:08:46 2001
Received: from sys32.hou.wt.net ([205.230.159.32])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 158OoX-000188-00
for <[email-masked]>; Sat, 09 Jun 2001 04:08:46 +1200
Received: from wt.net (wm.hou.wt.net [216.119.141.200])
by sys32.hou.wt.net (8.9.1/8.9.1) with SMTP id LAA11927
for <[email-masked]>; Fri, 8 Jun 2001 11:12:55 -0500 (CDT)
From: "Mike Jones" <[email-masked]>
Reply-to: [email-masked]
To: "AVR GCC List" <[email-masked]>
Date: Fri, 8 Jun 2001 11:12:49 +0600
Subject: [avr-gcc-list] Here's the most bug-free binary of GCC
X-Mailer: DMailWeb Web to Mail Gateway 2.4e, http://netwinsite.com/top_mail.htm
Message-id: <[email-masked]>
X-User-Info: 149.58.101.253
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I just installed the latest Windows version from Gunnar's site and recompiled
the libs using the install.exe. I then recompiled the gcctest1 from the
original gcc, 2.95 I believe, using a slightly modified make file Volker
(sp?). Here is the meat of the makefile:

#compiler flags was -O3
CPFLAGS = -g -O1 -Wall -Wstrict-prototypes -Wa,-ahlms=$(<:.c=.lst)

#linker flags
LDFLAGS = -Wl,-Map=$(TRG).map,--cref

I thought I had read on this list that AVRStudio (3.5) would now let you
do a watch on variables with this version of gcc. I loaded the obj file
in AVRStudio and it let me establish a watch for each of the 4 variables
but it always shows them "out of scope." Is there some trick to this or
do I have to wait for the next major revision in the next few weeks?

I also offer kudos to those that are making this such a nice tool for the
rest of us.

Mike

>GCC is one great compiler. I just have to change one define in my
>makefiles to rebuild for any suitable target! Hats off to Denis, Marek,

>Michael, Gunnar and all the others who have made this possible.
>
>Now, if Atmel can deliver .elf support in astudio...
>
>Larry Barello
>http://www.barello.net

From [email-masked] Sat Jun 09 04:37:43 2001
Received: from overclockers.zip.com.au ([61.8.3.18] helo=odin.zip.com.au)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 158PGY-00019W-00
for <[email-masked]>; Sat, 09 Jun 2001 04:37:43 +1200
Received: from mwp by odin.zip.com.au with local-esmtp (Exim 3.12 #1 (Debian))
id 158P5A-0002b8-00; Sat, 09 Jun 2001 02:25:56 +1000
Date: Sat, 9 Jun 2001 02:25:56 +1000 (EST)
From: MWP <[email-masked]>
X-Sender: [email-masked]
To: [email-masked]
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] Obtaining AVR-GCC
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all...

Ive looked all over the web but cant seem to find the home of the AVR GCC
port releases.

Im using linux, so i would like to be able to get the up to date AVR GCC
patch files.

Also, i see the most recent AVR ports are against the GCC 3.x betas, where
can i also get hold of these version of GCC (be it web or cvs)?

Thanks,
MWP

From [email-masked] Sat Jun 09 06:32:24 2001
Received: from [212.184.210.65] (helo=romulus.maridan.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 158R3W-0001Ie-00
for <[email-masked]>; Sat, 09 Jun 2001 06:32:23 +1200
Received: from egnite.net (pD900A862.dip.t-dialin.net [217.0.168.98])
by romulus.maridan.net (8.9.3/8.9.3) with SMTP id UAA11844
for <[email-masked]>; Fri, 8 Jun 2001 20:35:55 +0200
Message-Id: <[email-masked]>
From: "Harald Kipp" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Fri, 08 Jun 2001 20:40:40 +0100 (MEZ)
Reply-To: "Harald Kipp" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 2.00.1500 for OS/2 Warp 4.00
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: [avr-gcc-list] Include ASM in C
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Elmar,

>but when I do the same but replacing the address of the port by its label
>like:
>
>asm volatile("sbi PORTB,0x07;");
>
>I get a compilation error: "Error: constant value required"
>
>This happens even if I define a constant like:
>#define MYPORTB 0x15
>asm volatile("sbi MYPORTB,0x07;");

You have to think in C, not ASM. The assembler
instructions are string constants and the C
preprocessor won't change them. So the string
"sbi MYPORTB,0x07;" is passed unmodified to
the assembler. But the assembler won't see
you C defines. Hope, that this wasn't explained
too complicated.

More hint could be found in my little Inline
Assembler Cookbook at

http://www.egnite.de/en/main1_1_3.htm

The name of the file is GCCAVRInlAsmCB.pdf.

From [email-masked] Sat Jun 09 15:12:52 2001
Received: from proxy.peter.com.au ([203.47.34.4] helo=peter.com.au)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 158ZBE-0001vc-00
for <[email-masked]>; Sat, 09 Jun 2001 15:12:52 +1200
Received: from [203.47.34.3] ([203.47.34.3] verified) by peter.com.au (Stalker SMTP Server 1.8b2) with ESMTP id S.0000401032 for <[email-masked]>; Sat, 09 Jun 2001 11:16:47 +0800
Mime-Version: 1.0
X-Sender: peter@pop
Message-Id: <p05100305b74741eae8f4@[203.47.34.3]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
Date: Sat, 9 Jun 2001 11:16:01 +0800
To: [email-masked]
From: Peter N Lewis <[email-masked]>
Subject: Re: [avr-gcc-list] Include ASM in C
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>I'm new to AVR GCC and I'm trying to include some assembler instructions in my
>C-program.

I'm new too, but so far it is working well.

>but when I do the same but replacing the address of the port by its label
>like:
>
>asm volatile("sbi PORTB,0x07;");

Well, sbi is already defined in iomacros.h, so in this case, all you
would do is:

#include <iomacros.h> (or just io.h since it includes it as well)

then

sbi( PORTB, 7 );

Generally you can do most things without using any direct assembly language.

If you want to know how this is done, just look at the iomacros.h
file to see how they did it:

#define __sbi(port, bit) \
__asm__ __volatile__ ( \
"sbi %0,%1" \
: /* no outputs */ \
: "I" ((uint8_t)(port)), \
"I" ((uint8_t)(bit)) \
)

Frankly, I have not yet come to terms with the meanings of the :
stuff and % stuff. It is all defined in Harald Kipp's document
GCC-AVR Inline Assember Cookbook at
http://www.egnite.de/en/main1_1_3.htm.

Enjoy,
Peter.

--
<http://www.interarchy.com/> <ftp://ftp.interarchy.com/interarchy.hqx>

From [email-masked] Sat Jun 09 15:12:53 2001
Received: from proxy.peter.com.au ([203.47.34.4] helo=peter.com.au)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 158ZBF-0001vc-00
for <[email-masked]>; Sat, 09 Jun 2001 15:12:53 +1200
Received: from [203.47.34.3] ([203.47.34.3] verified) by peter.com.au (Stalker SMTP Server 1.8b2) with ESMTP id S.0000401033 for <[email-masked]>; Sat, 09 Jun 2001 11:16:47 +0800
Mime-Version: 1.0
X-Sender: peter@pop
Message-Id: <p05100306b74744ec9e04@[203.47.34.3]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
Date: Sat, 9 Jun 2001 11:17:11 +0800
To: [email-masked]
From: Peter N Lewis <[email-masked]>
Subject: Re: [avr-gcc-list] Obtaining AVR-GCC
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>Ive looked all over the web but cant seem to find the home of the AVR GCC
>port releases.
>
>Im using linux, so i would like to be able to get the up to date AVR GCC
>patch files.
>
>Also, i see the most recent AVR ports are against the GCC 3.x betas, where
>can i also get hold of these version of GCC (be it web or cvs)?

The following is what I did to get a working gcc-avr which I've used
for a couple weeks now:

use binutils.tar.bz2
from ftp://sources.redhat.com/pub/binutils/snapshots/binutils.tar.bz2
bunzip2; tar xf
configure --target=avr --disable-nls --prefix=/home/peter/peter/avr
make
make install

use gcc-20010514.tar.gz
from
ftp://ftp.yggdrasil.com/mirrors/site/egcs.cygnus.com/pub/egcs/snapshots/2001-05-14/gcc-20010514.tar.gz
tar xfz
configure --target=avr --enable-languages=c --prefix=/home/peter/peter/avr
make

use avr-libc-20010331.tar.gz
from http://www.amelek.gda.pl/avr/libc/avr-libc-20010331.tar.gz
edit Makefile prefix = /home/peter/peter/avr
make
make install

I don't guarantee that they haven't released newer versions or
whatever, so you might like to check the relevant directories to see
what is the most current version. But the above is working fine for
me (and I'm also using a Mac and MacAVRpa to program it, which must
make me one of very few Mac users using gcc and AVR!).

Enjoy,
Peter.
PS: Thanks to everyone involve for their work!
--
<http://www.interarchy.com/> <ftp://ftp.interarchy.com/interarchy.hqx>

From [email-masked] Sat Jun 09 22:02:20 2001
Received: from rfhs0002.fh-regensburg.de ([194.95.104.2] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 158fZS-0002FV-00
for <[email-masked]>; Sat, 09 Jun 2001 22:02:19 +1200
Received: from rfhnw7014.fh-regensburg.de (rfhnw7014.fh-regensburg.de [194.95.106.14])
by rfhs0002.fh-regensburg.de (8.9.3/8.9.3-FH-Regensburg) with ESMTP id MAA10383
for <[email-masked]>; Sat, 9 Jun 2001 12:06:00 +0200 (MET DST)
Received: from FH-MARS1/SpoolDir by rfhnw7014.fh-regensburg.de (Mercury 1.48);
9 Jun 01 12:06:24 +0100
Received: from SpoolDir by FH-MARS1 (Mercury 1.48); 9 Jun 01 12:06:20 +0100
From: "Jochen Pernsteiner" <[email-masked]>
To: [email-masked]
Date: Sat, 9 Jun 2001 12:06:19 +0100
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Priority: normal
X-mailer: Pegasus Mail for Windows (v3.12b)
Message-ID: <[email-masked]>
Subject: [avr-gcc-list] implementation of strstr()
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I have written an implementation of strstr() in assembler,
maybe somebody else finds it usefull, too.
This function is missing in avr-libc.
In string.h some functions have an attribute "__ATTR_PURE__".
I don't know what this means and if strstr() needs it too.
Marek?

Here is the code:

#include "macros.inc"

#define s1_hi r25
#define s1_lo r24
#define s2_hi r23
#define s2_lo r22
;r21 used as second temporary register

;char *strstr(const char *s1, const char *s2)

.text
.global _U(strstr)
.type _U(strstr), @function
_U(strstr):
LOAD_X(s1_lo, s1_hi)
LOAD_Z(s2_lo, s2_hi)
ld r21, Z+
tst r21
breq .strstr_ret
clr r24
clr r25
.strstr_loop:
ld __tmp_reg__, X+
tst __tmp_reg__
breq .strstr_ret0
cp __tmp_reg__, r21
brne .strstr_loop
adiw r24, 1
ld r21, Z+
tst r21
brne .strstr_loop
sub XL, r24
sbc XH, r25
mov r24, XL
mov r25, XH
ret
.strstr_ret0:
clr r24
clr r25
.strstr_ret:
ret

.strstr_end:
.size _U(strstr), .strstr_end - _U(strstr)

From [email-masked] Mon Jun 11 00:27:58 2001
Received: from cicero1.cybercity.dk ([212.242.40.4])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1594Jy-0005RM-00
for <[email-masked]>; Mon, 11 Jun 2001 00:27:58 +1200
Received: from usr00.cybercity.dk (usr00.cybercity.dk [212.242.40.34])
by cicero1.cybercity.dk (Postfix) with ESMTP id EA7F015FC52
for <[email-masked]>; Sun, 10 Jun 2001 14:32:10 +0200 (CEST)
Received: from noa3 (port9.cvx1-sl.ppp.cybercity.dk [217.157.103.138])
by usr00.cybercity.dk (8.11.2/8.11.0) with SMTP id f5ACW9M83199
for <[email-masked]>; Sun, 10 Jun 2001 14:32:10 +0200 (CEST)
(envelope-from [email-masked])
Message-ID: <002701c0f1a9$713a0a10$e7052d0a@noa3>
From: "Kasper Pedersen" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]> <00be01c0efa2$856e4270$e7052d0a@noa3> <[email-masked]>
Subject: Re: [avr-gcc-list] Yet another install build - moved
Date: Sun, 10 Jun 2001 14:31:14 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

In order to be nice to my webspace provider, I removed the
AVRGCC20010606a.#of#-files.
Which means that quite a few people will get a 404 every hour.
Please go and abuse www.avrfreaks.net instead. They seem to have a larger
pipe than my site.

I had no idea of the amount of traffic it would generate (141 downloads
within the first 24 hours, and that is not counting the traffic on
avrfreaks.net)..

/Kasper

(I am nice to my provider because he gives me 10GB space, binary CGI, and
root access, for free. Visit www.stivan.dk, and you will guess what his
problem is.)

From [email-masked] Mon Jun 11 04:57:32 2001
Received: from overclockers.zip.com.au ([61.8.3.18] helo=odin.zip.com.au)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1598Wp-0005bc-00
for <[email-masked]>; Mon, 11 Jun 2001 04:57:31 +1200
Received: from mwp by odin.zip.com.au with local-esmtp (Exim 3.12 #1 (Debian))
id 1598Ld-0002QL-00; Mon, 11 Jun 2001 02:45:57 +1000
Date: Mon, 11 Jun 2001 02:45:57 +1000 (EST)
From: MWP <[email-masked]>
X-Sender: [email-masked]
To: [email-masked]
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] 10Mhz clock runs 8535 at 8Mhz??
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all...
Sorry, kinda off topic.

Since it was the only thing in my box of bits, im using a 10Mhz crystal
osc (4pin) with my 8535.
It runs fine, but the werid thing is, from the timing tests ive done on
the output of PWM code says the 8535 is actually running at 8Mhz.

Anyone have any ideas on this??

Thanks,
MWP

From [email-masked] Mon Jun 11 01:06:38 2001
Received: from razor.arnes.si ([193.2.1.80])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1594vO-0005T9-00
for <[email-masked]>; Mon, 11 Jun 2001 01:06:38 +1200
Received: from amonra.email.si (fe-fri004.fri.uni-lj.si [193.2.73.184])
by razor.arnes.si (Postfix) with ESMTP id 5B31AE645
for <[email-masked]>; Sun, 10 Jun 2001 15:10:11 +0200 (MET DST)
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.0.2
Date: Sun, 10 Jun 2001 14:46:38 +0200
To: [email-masked]
From: =?iso-8859-1?Q?Ale=9A?= Rosman <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: [avr-gcc-list] atmega163
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi!!

I upgraded from 8535 to atmega163. When I tried to buld my code with -mmcu
atmega163 i get an error that this mcu is not allowed. Does GCC supports
atmega163 or should I use -mmcu at90s8535??

Alex

From [email-masked] Mon Jun 11 08:55:36 2001
Received: from mtiwmhc24.worldnet.att.net ([204.127.131.49])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 159CFD-0005p4-00
for <[email-masked]>; Mon, 11 Jun 2001 08:55:35 +1200
Received: from jimanji ([12.93.209.196]) by mtiwmhc24.worldnet.att.net
(InterMail vM.4.01.03.16 201-229-121-116-20010115) with SMTP
id <20010610205919.HWOO12661.mtiwmhc24.worldnet.att.net@jimanji>;
Sun, 10 Jun 2001 20:59:19 +0000
Message-ID: <[email-masked]>
Reply-To: "Jim Pearce" <[email-masked]>
From: "Jim Pearce" <[email-masked]>
To: <[email-masked]>,
=?iso-8859-1?Q?Ales_Rosman?= <[email-masked]>
References: <[email-masked]>
Date: Sun, 10 Jun 2001 16:58:29 -0300
Organization: Pegasus Technologies
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] Re: atmega163
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

For me, it works fine for mega163 using

MCU = atmega163
-mmcu=$(MCU)

What version of avr-gcc are you using?

>. Does GCC supports
> atmega163 or should I use -mmcu at90s8535??
>
> Alex
>
>

From [email-masked] Mon Jun 11 13:28:31 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 159GVL-0005zc-00
for <[email-masked]>; Mon, 11 Jun 2001 13:28:31 +1200
Received: from cel1.jpk.co.nz (adsl-179.world-net.co.nz [210.55.228.179])
by mail.world-net.co.nz (8.9.3/8.9.3) with ESMTP id NAA02000
for <[email-masked]>; Mon, 11 Jun 2001 13:28:02 +1200
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Mon, 11 Jun 2001 13:33:04 +1200
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] atmega163
In-Reply-To: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"; format=flowed
Content-Transfer-Encoding: quoted-printable
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Alex,

What gcc build are you using? It must be very old for m163 support to be=20
missing, download a more upto date version.

avr-gcc -v

Jason Kyle

At 00:46 11/06/2001, Ale=9A Rosman wrote:
>Hi!!
>
>I upgraded from 8535 to atmega163. When I tried to buld my code with -mmcu=
=20
>atmega163 i get an error that this mcu is not allowed. Does GCC supports=20
>atmega163 or should I use -mmcu at90s8535??
>
>Alex
>
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Wed Jun 13 06:01:54 2001
Received: from sttlpop4.sttl.uswest.net ([206.81.192.4])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 159sUD-0007gp-00
for <[email-masked]>; Wed, 13 Jun 2001 06:01:53 +1200
Received: (qmail 31319 invoked by alias); 12 Jun 2001 18:05:47 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 31295 invoked by uid 0); 12 Jun 2001 18:05:47 -0000
Received: from vdsl210.sttl.uswest.net (HELO larry) (216.160.108.210)
by sttlpop4.sttl.uswest.net with SMTP; 12 Jun 2001 18:05:47 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "avrx" <[email-masked]>,
"AVR GCC List" <[email-masked]>,
"avrchat" <[email-masked]>,
<[email-masked]>
Date: Tue, 12 Jun 2001 11:05:29 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] IAR vs GCC
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I have ported my rtos (AvrX) from GCC to IAR (ICCAVR). Well, I ported it
such that it can be built for either. Anyway, I thought I would share my
results with code size and my experiences with the porting process.

IAR has some heavy duty code crunching optimizations that look for common
groups of code and sets up lots of little subroutines. The mileage varies.
For a bunch of, admittedly, trivial applications I got the following:

<view with fixed pitch font like Courier>
File GCC -Os IAR -z4 IAR -z9
----------------- ----- ----- -----
TestCases/BasicTest1 158 185 161
TestCases/BasicTest2 492 631 421
TestCases/BasicTest3 766 779 533
TestCases/BasicTest4 322 379 321
Examples/Timers 164 163 157
Examples/Messages 182 209 195
Examples/MessagesAndData 178 171 167
Examples/MessageTimers 244 261 233
Examples/MessageTimersAlt 248 273 257

I have ported my application code for my robot Dilbert II, about 1/4 is
assembly code (8535):

Dilbert II (no float) 7414 ---- 7325

Floating point support: My robot uses Michael Stumpf's floating point
library (gcc -lm), when I enable the floating point support in Dilbert II
here are the resulting sizes (mega163)

Dilbert II (with float) 9582 ---- 10385

Interestingly enough, the overhead is totally from the library, the IAR
code for the module that uses float is smaller than the GCC (991 vs 1204
bytes) I don't know how good Michael's library is, but in terms of size
and
speed it is very good.

It appears that IAR has some fixed overhead and that the code savings grows
with size. The -z9 does a good job of finding common blocks, but sometimes
the resulting code has lots and lots of rcall/ret to small three and four
line common blocks. That could really slow down an application and/or blow
out the stack. I think a good C programmer might naturally pull out common
segments into subroutines and the savings won't be as dramatic. Overall,
however, it appears that GCC does an equivalent job as IAR for a completed
application.

IAR has very lame in-line assembly vs. GCC. That is a two edge sword! It
is easy to get in trouble with GCC and never figure it out. On the other
hand you can do much more powerful and slick tricks with GCC if you know
how. Many AVR specific features of GCC are nothing more than clever macros
with smart inline assembly fragments. To be fair, most things I have done
with in-line assembly could also be done as callable asm routines with
little additional overhead. It is harder to get into trouble that way.

GCC has a nice way of managing the chip variants. For the most part one
just specifies the chip and away you go. With IAR, currently (they are
moving to a GCC style of header files), you have to specify different
headers and linker files to build for a different target. I don't know
Embedded workbench, maybe they have this solved, but it is a pain with
makefiles. For both compilers one gets into magic very quickly when
enabling external RAM.

IAR uses a separate data stack for passing parameters, saving registers,
etc. This means that for each C task one needs to specify TWO stacks. The
resulting fragmentation of SRAM is less efficient than GCC. I suppose the
IAR way conserves a few cycles. I prefer the GCC technique because it is
simple and I only have to look at one stack to see if I need more room or
not. With IAR one needs to fiddle with the linker files to set the stack
space. With GCC one needs to pass symbols to the linker. Both techniques
are reasonable, just different. Since GCC defaults the stack to the end of
SRAM typically nothing needs to be done. The only time it gets sticky with
GCC is if you have external SRAM and want your stack in on-chip ram (faster
access).

GCC compilations seems much faster, although, realistically, 9 seconds for
IAR vs. 7 for GCC to compile a complete application for an 8535 on a
relatively old PC doesn't amount to much. Unless one was filling a mega103
one just can't have enough code to make a big difference!

I have not played with C++ at all so I cannot comment on that part of GCC
vs. IAR. IAR has a subset of c++ tuned for the AVR processor, I guess.

Of course, debugging with IAR and astudio (atmels simulator/debugger) is
much, much better than GCC. I have never used GDB, but I assume it has
similar data representation abilities. With IAR it is so nice to be able
to follow a pointer to a structure with pointers to more structures (e.g.
linked list) and see the data change between breakpoints. I hear that
astudio 4.x will include .elf support and so viewing GCC C data structures
should be fully supported at that time.

Larry Barello
http://www.barello.net
http://www.barello.net/avrx
http://www.groups.yahoo.com/group/avrx

From [email-masked] Thu Jun 14 00:23:16 2001
Received: from [206.197.156.12] (helo=millerwelds.com)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15A9g3-0008WF-00
for <[email-masked]>; Thu, 14 Jun 2001 00:23:15 +1200
Received: from MEMCO-Message_Server by millerwelds.com
with Novell_GroupWise; Wed, 13 Jun 2001 07:27:10 -0500
Message-Id: <[email-masked]>
X-Mailer: Novell GroupWise Internet Agent 5.5.4.1
Date: Wed, 13 Jun 2001 07:26:19 -0500
From: "TODD BATZLER" <[email-masked]>
To: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Subject: [avr-gcc-list] IAR vs GCC (Larry Barello)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

My company is currently using the IAR Embedded WorkBench as the "official" =
compiler for product development. I've been using GCC for everything of a =
personal nature. I've been struggling with GCC over a feature that IAR =
makes very pain free, which is placing a string of bytes at an absolute =
location in the code segment, then having the linker to be smart enough to =
"wrap" the other code segments around this absolute segment so as to not =
waste large chunks of the CODE section. I've managed to dig up enough =
information on linker scripts to modify one to create the required =
absolute field in the rom image and place my required data there. =
However, if my relocatable code gets larger than my absolute address minus =
the start of the .text section, I get a warning that the linker location =
counter can not be "backed up". Which makes sense. Any ideas on how to =
instruct the linker to check the available space between defined section =
starts and any absolute sections and then have it figure out when it can =
place code in that section (if it will fit) or place it after the absolute =
section (if it will not)?

Also, do you know how to find out what was specifically done to the "avr-" =
variants of the GCC binaries to make them different from the "standard" =
GCC release files. I'm assuming that support for some of the architectures=
was removed, plus a bunch of other things. There's no specific documentat=
ion for the avr-ld, avr-objcopy, etc files.

Thanks for the attention.

Todd Batzler
[email-masked]=20

>>> [email-masked] 06/12/01 07:01PM >>>
Send avr-gcc-list mailing list submissions to
[email-masked]=20

To subscribe or unsubscribe via the World Wide Web, visit
http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list=20
or, via email, send a message with subject or body 'help' to
[email-masked]=20

You can reach the person managing the list at
[email-masked]=20

When replying, please edit your Subject line so it is more specific
than "Re: Contents of avr-gcc-list digest..."

Today's Topics:

1. IAR vs GCC (Larry Barello)

--__--__--

Message: 1
From: "Larry Barello" <[email-masked]>
To: "avrx" <[email-masked]>,
"AVR GCC List" <[email-masked]>,
"avrchat" <[email-masked]>,
<[email-masked]>
Date: Tue, 12 Jun 2001 11:05:29 -0700
Subject: [avr-gcc-list] IAR vs GCC

I have ported my rtos (AvrX) from GCC to IAR (ICCAVR). Well, I ported it
such that it can be built for either. Anyway, I thought I would share my
results with code size and my experiences with the porting process.

IAR has some heavy duty code crunching optimizations that look for common
groups of code and sets up lots of little subroutines. The mileage =
varies.
For a bunch of, admittedly, trivial applications I got the following:

<view with fixed pitch font like Courier>
File GCC -Os IAR -z4 IAR -z9
----------------- ----- ----- -----
TestCases/BasicTest1 158 185 161
TestCases/BasicTest2 492 631 421
TestCases/BasicTest3 766 779 533
TestCases/BasicTest4 322 379 321
Examples/Timers 164 163 157
Examples/Messages 182 209 195
Examples/MessagesAndData 178 171 167
Examples/MessageTimers 244 261 233
Examples/MessageTimersAlt 248 273 257

I have ported my application code for my robot Dilbert II, about 1/4 is
assembly code (8535):

Dilbert II (no float) 7414 ---- 7325

Floating point support: My robot uses Michael Stumpf's floating point
library (gcc -lm), when I enable the floating point support in Dilbert II
here are the resulting sizes (mega163)

Dilbert II (with float) 9582 ---- 10385

Interestingly enough, the overhead is totally from the library, the IAR
code for the module that uses float is smaller than the GCC (991 vs 1204
bytes) I don't know how good Michael's library is, but in terms of size
and
speed it is very good.

It appears that IAR has some fixed overhead and that the code savings =
grows
with size. The -z9 does a good job of finding common blocks, but =
sometimes
the resulting code has lots and lots of rcall/ret to small three and four
line common blocks. That could really slow down an application and/or =
blow
out the stack. I think a good C programmer might naturally pull out =
common
segments into subroutines and the savings won't be as dramatic. Overall,
however, it appears that GCC does an equivalent job as IAR for a completed
application.

IAR has very lame in-line assembly vs. GCC. That is a two edge sword! It
is easy to get in trouble with GCC and never figure it out. On the other
hand you can do much more powerful and slick tricks with GCC if you know
how. Many AVR specific features of GCC are nothing more than clever =
macros
with smart inline assembly fragments. To be fair, most things I have done
with in-line assembly could also be done as callable asm routines with
little additional overhead. It is harder to get into trouble that way.

GCC has a nice way of managing the chip variants. For the most part one
just specifies the chip and away you go. With IAR, currently (they are
moving to a GCC style of header files), you have to specify different
headers and linker files to build for a different target. I don't know
Embedded workbench, maybe they have this solved, but it is a pain with
makefiles. For both compilers one gets into magic very quickly when
enabling external RAM.

IAR uses a separate data stack for passing parameters, saving registers,
etc. This means that for each C task one needs to specify TWO stacks. =
The
resulting fragmentation of SRAM is less efficient than GCC. I suppose the
IAR way conserves a few cycles. I prefer the GCC technique because it is
simple and I only have to look at one stack to see if I need more room or
not. With IAR one needs to fiddle with the linker files to set the stack
space. With GCC one needs to pass symbols to the linker. Both techniques
are reasonable, just different. Since GCC defaults the stack to the end =
of
SRAM typically nothing needs to be done. The only time it gets sticky =
with
GCC is if you have external SRAM and want your stack in on-chip ram =
(faster
access).

GCC compilations seems much faster, although, realistically, 9 seconds for
IAR vs. 7 for GCC to compile a complete application for an 8535 on a
relatively old PC doesn't amount to much. Unless one was filling a =
mega103
one just can't have enough code to make a big difference!

I have not played with C++ at all so I cannot comment on that part of GCC
vs. IAR. IAR has a subset of c++ tuned for the AVR processor, I guess.

Of course, debugging with IAR and astudio (atmels simulator/debugger) is
much, much better than GCC. I have never used GDB, but I assume it has
similar data representation abilities. With IAR it is so nice to be able
to follow a pointer to a structure with pointers to more structures (e.g.
linked list) and see the data change between breakpoints. I hear that
astudio 4.x will include .elf support and so viewing GCC C data structures
should be fully supported at that time.

Larry Barello
http://www.barello.net=20
http://www.barello.net/avrx=20
http://www.groups.yahoo.com/group/avrx=20

--__--__--

_______________________________________________
avr-gcc-list mailing list
[email-masked]=20
http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list=20

End of avr-gcc-list Digest

From [email-masked] Thu Jun 14 02:58:56 2001
Received: from gold.uni-miskolc.hu ([193.6.10.1])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15AC6h-0000B7-00
for <[email-masked]>; Thu, 14 Jun 2001 02:58:55 +1200
Received: from gold.uni-miskolc.hu (muszer.alt.uni-miskolc.hu [193.6.3.15])
by gold.uni-miskolc.hu (8.10.0/8.10.0) with ESMTP id f5DH3qL14044
for <[email-masked]>; Wed, 13 Jun 2001 17:03:53 GMT
Message-ID: <[email-masked]>
Date: Wed, 13 Jun 2001 16:57:18 +0200
From: Peter Bozzay <[email-masked]>
Organization: University of Miskolc, Educ. Dept. of Material Handling and Logistics
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: hu
MIME-Version: 1.0
CC: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] IAR vs GCC
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Larry Barello wrote:
>
[...]
> Dilbert II (no float) 7414 ---- 7325
>
> Floating point support: My robot uses Michael Stumpf's floating point
> library (gcc -lm), when I enable the floating point support in Dilbert II
> here are the resulting sizes (mega163)
>
> Dilbert II (with float) 9582 ---- 10385

Is it possible to make a binary size less than 3928 bytes from code
below with gcc?
If it is, how, which flags to use?
I tried with the new version of gcc from www.combio.de/avr.

volatile unsigned int D1;
volatile float D2;
volatile char T2;
volatile unsigned int I2;

void main (void)
{
T2 = 22;
I2 = 1234;
D2 = (343.8 + (T2 - 20) * 0.5875) * I2 / 20000;
D1 = (int)D2;
}

The binary size, what CodeVisionAVR makes from this, is only 922
bytes.

Regards,
Peter

From [email-masked] Thu Jun 14 03:27:07 2001
Received: from sttlpop4.sttl.uswest.net ([206.81.192.4])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15ACXz-0000Cf-00
for <[email-masked]>; Thu, 14 Jun 2001 03:27:07 +1200
Received: (qmail 92102 invoked by alias); 13 Jun 2001 15:31:04 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 92081 invoked by uid 0); 13 Jun 2001 15:31:04 -0000
Received: from vdsl210.sttl.uswest.net (HELO larry) (216.160.108.210)
by sttlpop4.sttl.uswest.net with SMTP; 13 Jun 2001 15:31:04 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "TODD BATZLER" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] IAR vs GCC (Larry Barello)
Date: Wed, 13 Jun 2001 08:27:22 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Sorry, I can't help you with either of your questions. IAR is certainly a
professional development environment. But, as I use GCC I find that most
everything I need to do has been covered. The extra's in IAR seem to be
archaic or there to support other architectures. I am sure, if you knew
how to run the gnu linker, you could do what you want. But I am the wrong
person to ask.

I question the need to place strings at an absolute location. But, what do
I know...

----- Original Message -----
From: "TODD BATZLER" <[email-masked]>
To: <[email-masked]>
Sent: Wednesday, June 13, 2001 5:26 AM
Subject: [avr-gcc-list] IAR vs GCC (Larry Barello)

My company is currently using the IAR Embedded WorkBench as the "official"
compiler for product development. I've been using GCC for everything of a
personal nature. I've been struggling with GCC over a feature that IAR
makes very pain free, which is placing a string of bytes at an absolute
location in the code segment, then having the linker to be smart enough to
"wrap" the other code segments around this absolute segment so as to not
waste large chunks of the CODE section. I've managed to dig up enough
information on linker scripts to modify one to create the required absolute
field in the rom image and place my required data there. However, if my
relocatable code gets larger than my absolute address minus the start of
the .text section, I get a warning that the linker location counter can not
be "backed up". Which makes sense. Any ideas on how to instruct the
linker to check the available space between defined section starts and any
absolute sections and then have it figure out when it can place code in
that section (if it will fit) or place it after the absolute section (if it
will not)?

Also, do you know how to find out what was specifically done to the "avr-"
variants of the GCC binaries to make them different from the "standard" GCC
release files. I'm assuming that support for some of the architectures was
removed, plus a bunch of other things. There's no specific documentation
for the avr-ld, avr-objcopy, etc files.

Thanks for the attention.

Todd Batzler
[email-masked]

From [email-masked] Thu Jun 14 03:37:17 2001
Received: from sttlpop4.sttl.uswest.net ([206.81.192.4])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15AChp-0000DW-00
for <[email-masked]>; Thu, 14 Jun 2001 03:37:17 +1200
Received: (qmail 17527 invoked by alias); 13 Jun 2001 15:41:16 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 17517 invoked by uid 0); 13 Jun 2001 15:41:15 -0000
Received: from vdsl210.sttl.uswest.net (HELO larry) (216.160.108.210)
by sttlpop4.sttl.uswest.net with SMTP; 13 Jun 2001 15:41:15 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "Peter Bozzay" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]> <[email-masked]>
Subject: Re: [avr-gcc-list] IAR vs GCC
Date: Wed, 13 Jun 2001 08:38:22 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Try linking with -lm to get the Michael Stumpf libraries. The gnu float
libraries are written in C and quite fat. The alternate libraries are in
assembler and amazingly tight.

When I compile and link, I get 1022 bytes including startup code.

I don't know what CV is doing, code wise, but by declaring all those
globals as volatile you force the gcc compiler to be pretty dumb.

If I take out the volatile, GCC produces 748 bytes of code.

If I make them automatics (except for D1), GCC produces 664 bytes of code.

----- Original Message -----
From: "Peter Bozzay" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
Sent: Wednesday, June 13, 2001 7:57 AM
Subject: Re: [avr-gcc-list] IAR vs GCC

>
> Larry Barello wrote:
> >
> [...]
> > Dilbert II (no float) 7414 ---- 7325
> >
> > Floating point support: My robot uses Michael Stumpf's floating point
> > library (gcc -lm), when I enable the floating point support in Dilbert
II
> > here are the resulting sizes (mega163)
> >
> > Dilbert II (with float) 9582 ---- 10385
>
> Is it possible to make a binary size less than 3928 bytes from code
> below with gcc?
> If it is, how, which flags to use?
> I tried with the new version of gcc from www.combio.de/avr.
>
> volatile unsigned int D1;
> volatile float D2;
> volatile char T2;
> volatile unsigned int I2;
>
> void main (void)
> {
> T2 = 22;
> I2 = 1234;
> D2 = (343.8 + (T2 - 20) * 0.5875) * I2 / 20000;
> D1 = (int)D2;
> }
>
> The binary size, what CodeVisionAVR makes from this, is only 922
> bytes.
>
> Regards,
> Peter
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Thu Jun 14 04:34:34 2001
Received: from [206.197.156.12] (helo=millerwelds.com)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15ADbF-0000GG-00
for <[email-masked]>; Thu, 14 Jun 2001 04:34:33 +1200
Received: from MEMCO-Message_Server by millerwelds.com
with Novell_GroupWise; Wed, 13 Jun 2001 11:38:32 -0500
Message-Id: <[email-masked]>
X-Mailer: Novell GroupWise Internet Agent 5.5.4.1
Date: Wed, 13 Jun 2001 11:38:02 -0500
From: "TODD BATZLER" <[email-masked]>
To: <[email-masked]>
Cc: <[email-masked]>
Subject: Re: [avr-gcc-list] IAR vs GCC (Larry Barello)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Thanks for the reply. The reason I'm looking into a string in an absolute =
location is so I can go to the field and query my deeply embedded micro to =
determine what software revision it contains. We're using AVR's in a wide =
variety of applications and a "standard ID string" at a fixed location in =
the program space seemed to be the simplest solution for a limited field =
programmer device to ID the software revision level if it always knew =
where to look, regardless of the actual micro application. I'm certainly =
open to any other suggestions it anyone has a better system for field =
level revision identification where the service personnel are far from =
technically competent and the embedded application has no interface but =
the spi programming port.

Todd Batzler
Senior Staff Engineer
Miller Electric Mfg. Co.
P.O. Box 1079
Appleton, WI 54912-1079
Phone: (920) 735-4230
Fax: (920) 735-4488
Email: [email-masked]

>>> "Larry Barello" <[email-masked]> 06/13/01 10:27AM >>>
Sorry, I can't help you with either of your questions. IAR is certainly a
professional development environment. But, as I use GCC I find that most
everything I need to do has been covered. The extra's in IAR seem to be
archaic or there to support other architectures. I am sure, if you knew
how to run the gnu linker, you could do what you want. But I am the wrong
person to ask.

I question the need to place strings at an absolute location. But, what =
do
I know...

----- Original Message -----
From: "TODD BATZLER" <[email-masked]>
To: <[email-masked]>
Sent: Wednesday, June 13, 2001 5:26 AM
Subject: [avr-gcc-list] IAR vs GCC (Larry Barello)

My company is currently using the IAR Embedded WorkBench as the "official"
compiler for product development. I've been using GCC for everything of a
personal nature. I've been struggling with GCC over a feature that IAR
makes very pain free, which is placing a string of bytes at an absolute
location in the code segment, then having the linker to be smart enough to
"wrap" the other code segments around this absolute segment so as to not
waste large chunks of the CODE section. I've managed to dig up enough
information on linker scripts to modify one to create the required =
absolute
field in the rom image and place my required data there. However, if my
relocatable code gets larger than my absolute address minus the start of
the .text section, I get a warning that the linker location counter can =
not
be "backed up". Which makes sense. Any ideas on how to instruct the
linker to check the available space between defined section starts and any
absolute sections and then have it figure out when it can place code in
that section (if it will fit) or place it after the absolute section (if =
it
will not)?

Also, do you know how to find out what was specifically done to the "avr-"
variants of the GCC binaries to make them different from the "standard" =
GCC
release files. I'm assuming that support for some of the architectures =
was
removed, plus a bunch of other things. There's no specific documentation
for the avr-ld, avr-objcopy, etc files.

Thanks for the attention.

Todd Batzler
[email-masked]=20

From [email-masked] Thu Jun 14 05:21:52 2001
Received: from penguin.nebnet.net ([207.32.36.253] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15AEL1-0000IT-00
for <[email-masked]>; Thu, 14 Jun 2001 05:21:51 +1200
Received: from musunco (pm3bs36.nebnet.net [207.32.36.36])
by penguin.nebnet.net (8.11.0/8.11.0) with SMTP id f5DHQHa14514
for <[email-masked]>; Wed, 13 Jun 2001 11:26:18 -0600
From: "Marlin Unruh" <[email-masked]>
To: <[email-masked]>
Date: Wed, 13 Jun 2001 11:30:50 -0600
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Subject: [avr-gcc-list] -O1 vs. -O3
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Excuse me, but my amateurishness is showing! :)

What is the difference between -O1, -O2, -O3 ???

Optimization of course, but why not always as optimized as possible? Why not
always use -O1?

I had never change the setting till today, and my code size drop 112 bytes
using -O1 instead of -O3.

Everything has an equal and opposite reaction so, what's the trade-off?
Speed? Reliability?

Regards,

- Marlin

From [email-masked] Thu Jun 14 10:07:18 2001
Received: from mailg.telia.com ([194.22.194.26])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15AInF-0000XC-00
for <[email-masked]>; Thu, 14 Jun 2001 10:07:18 +1200
Received: from d1o70.telia.com (d1o70.telia.com [62.20.148.241])
by mailg.telia.com (8.11.2/8.11.0) with ESMTP id f5DMBiW26743
for <[email-masked]>; Thu, 14 Jun 2001 00:11:44 +0200 (CEST)
Received: from jesper (t6o70p99.telia.com [195.67.239.219])
by d1o70.telia.com (8.10.2/8.10.1) with SMTP id f5DMBiR10515
for <[email-masked]>; Thu, 14 Jun 2001 00:11:44 +0200 (CEST)
Message-ID: <004001c0f455$e5514540$65656565@jesper>
From: "Jesper Hansen" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] IAR vs GCC (Larry Barello)
Date: Thu, 14 Jun 2001 00:11:57 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This may not be feasible for your specific application(s), but
why not just communicate the data over the SPI link to the
field programmer device ? No need for absolute addresses, as
the CPU always "knows" where to look.

In my AVR programmer I've built a complete debugging terminal
using the SPI. Makes it easy to debug, as you already have the cable
connected.

/Jesper
http://www.yampp.com
http://www.myplace.nu/avr

----- Original Message -----
From: "TODD BATZLER" <[email-masked]>
To: <[email-masked]>
Cc: <[email-masked]>
Sent: Wednesday, June 13, 2001 6:38 PM
Subject: Re: [avr-gcc-list] IAR vs GCC (Larry Barello)

> Thanks for the reply. The reason I'm looking into a string in an absolute
location is so I can go to the field and query my deeply embedded micro to
determine what software revision it contains. We're using AVR's in a wide
variety of applications and a "standard ID string" at a fixed location in
the program space seemed to be the simplest solution for a limited field
programmer device to ID the software revision level if it always knew where
to look, regardless of the actual micro application. I'm certainly open to
any other suggestions it anyone has a better system for field level revision
identification where the service personnel are far from technically
competent and the embedded application has no interface but the spi
programming port.
>
> Todd Batzler
> Senior Staff Engineer
> Miller Electric Mfg. Co.
> P.O. Box 1079
> Appleton, WI 54912-1079
> Phone: (920) 735-4230
> Fax: (920) 735-4488
> Email: [email-masked]
>
>
> >>> "Larry Barello" <[email-masked]> 06/13/01 10:27AM >>>
> Sorry, I can't help you with either of your questions. IAR is certainly a
> professional development environment. But, as I use GCC I find that most
> everything I need to do has been covered. The extra's in IAR seem to be
> archaic or there to support other architectures. I am sure, if you knew
> how to run the gnu linker, you could do what you want. But I am the wrong
> person to ask.
>
> I question the need to place strings at an absolute location. But, what
do
> I know...
>
> ----- Original Message -----
> From: "TODD BATZLER" <[email-masked]>
> To: <[email-masked]>
> Sent: Wednesday, June 13, 2001 5:26 AM
> Subject: [avr-gcc-list] IAR vs GCC (Larry Barello)
>
>
> My company is currently using the IAR Embedded WorkBench as the "official"
> compiler for product development. I've been using GCC for everything of a
> personal nature. I've been struggling with GCC over a feature that IAR
> makes very pain free, which is placing a string of bytes at an absolute
> location in the code segment, then having the linker to be smart enough to
> "wrap" the other code segments around this absolute segment so as to not
> waste large chunks of the CODE section. I've managed to dig up enough
> information on linker scripts to modify one to create the required
absolute
> field in the rom image and place my required data there. However, if my
> relocatable code gets larger than my absolute address minus the start of
> the .text section, I get a warning that the linker location counter can
not
> be "backed up". Which makes sense. Any ideas on how to instruct the
> linker to check the available space between defined section starts and any
> absolute sections and then have it figure out when it can place code in
> that section (if it will fit) or place it after the absolute section (if
it
> will not)?
>
> Also, do you know how to find out what was specifically done to the "avr-"
> variants of the GCC binaries to make them different from the "standard"
GCC
> release files. I'm assuming that support for some of the architectures
was
> removed, plus a bunch of other things. There's no specific documentation
> for the avr-ld, avr-objcopy, etc files.
>
> Thanks for the attention.
>
> Todd Batzler
> [email-masked]
>
>
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Thu Jun 14 14:40:08 2001
Received: from proxy.peter.com.au ([203.47.34.4] helo=peter.com.au)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15AN3I-0000io-00
for <[email-masked]>; Thu, 14 Jun 2001 14:40:08 +1200
Received: from [203.47.34.3] ([203.47.34.3] verified) by peter.com.au (Stalker SMTP Server 1.8b2) with ESMTP id S.0000406123 for <[email-masked]>; Thu, 14 Jun 2001 10:44:24 +0800
Mime-Version: 1.0
X-Sender: peter@pop
Message-Id: <p0510031cb74dc91ee83a@[203.47.34.3]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
Date: Thu, 14 Jun 2001 10:05:05 +0800
To: <[email-masked]>
From: Peter N Lewis <[email-masked]>
Subject: Re: [avr-gcc-list] -O1 vs. -O3
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

At 11:30 -0600 13/6/01, Marlin Unruh wrote:
>Excuse me, but my amateurishness is showing! :)
>
>What is the difference between -O1, -O2, -O3 ???
>
>Optimization of course, but why not always as optimized as possible? Why not
>always use -O1?
>
>I had never change the setting till today, and my code size drop 112 bytes
>using -O1 instead of -O3.
>
>Everything has an equal and opposite reaction so, what's the trade-off?
>Speed? Reliability?

Speed vs Size.

I normally use -Os which is optimize for size.

-O1 is optimize for speed, 2 and 3 are the same, but more
optimizations (ie, -O3 should produce faster code than -O2 or -O1).

According to man_avr-gcc.pdf

<http://www.avrfreaks.net/AVRGCC/Download/man_avr-gcc.pdf>

-O or -O1
Optimize. Optimizing compilation takes somewhat more time, and a lot
more memory for a large
function.

Without -O, the compiler's goal is to reduce the cost of compilation
and to make debugging produce
the expected results. Statements are independent: if you stop the
program with a breakpoint between
statements, you can then assign a new value to any variable or change
the program counter to any
other statement in the function and get exactly the results you would
expect from the source code.

Without -O, the compiler only allocates variables declared register
in registers. The resulting
compiled code is a little worse than produced by PCC without -O.

With -O, the compiler tries to reduce code size and execution time.

When you specify -O, the compiler turns on -fthread-jumps and
-fdefer-pop p on all machines. The
compiler turns on -fdelayed-branch on machines that have delay slots,
and -fomit-frame-pointer on
machines that can support debugging even without a frame pointer. On
some machines the compiler
also turns on other flags.

-O2
Optimize even more. GCC performs nearly all supported optimizations
that do not involve a space-speed
tradeoff. The compiler does not perform loop unrolling or function
inlining when you specify
-O2. As compared to -O, this option increases both compilation time
and the performance of the
generated code.

-O2 turns on all optional optimizations except for loop unrolling,
function inlining, and register
renaming. It also turns on the -fforce-mem option on all machines and
frame pointer elimination on
machines where doing so does not interfere with debugging.

-O3
Optimize yet more. -O3 turns on all optimizations specified by -O2
and also turns on the -finline-
functions and -frename-registers options.

-O0
Do not optimize.

-Os
Optimize for size. -Os enables all -O2 optimizations that do not
typically increase code size. It also
performs further optimizations designed to reduce code size.

If you use multiple -O options, with or without level numbers, the
last such option is the one that is
effective.

Options of the form -fflag specify machine-independent flags. Most
flags have both positive and negative
forms; the negative form of -ffoo would be -fno-foo. In the table
below, only one of the forms is
listed - the one which is not the default. You can figure out the
other form by either removing no- or
adding it.

It then goes on to list all the different individual options.

Enjoy,
Peter.

--
<http://www.interarchy.com/> <ftp://ftp.interarchy.com/interarchy.hqx>

From [email-masked] Thu Jun 14 21:07:38 2001
Received: from mailout00.sul.t-online.com ([194.25.134.16] helo=mailout00.sul.t-online.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15AT6G-0000wz-00
for <[email-masked]>; Thu, 14 Jun 2001 21:07:36 +1200
Received: from fwd00.sul.t-online.de
by mailout00.sul.t-online.de with smtp
id 15ATAQ-0007Sf-0A; Thu, 14 Jun 2001 11:11:54 +0200
Received: from d700 (520072611635-0001@[217.2.219.90]) by fmrl00.sul.t-online.com
with smtp id 15ATAL-2CmBFoC; Thu, 14 Jun 2001 11:11:49 +0200
From: "Andreas Schwarz" <[email-masked]>
To: <[email-masked]>
Date: Thu, 14 Jun 2001 11:12:49 +0200
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0006_01C0F4C2.F283F1A0"
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
X-Sender: [email-masked]
Subject: [avr-gcc-list] Bug in gcc version 3.0 20010605
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_0006_01C0F4C2.F283F1A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hello,

I think have found a Bug in the gcc-version from www.combio.de/avr/.
When I try to compile the attached program, I get the following error
message:

avr-gcc -c -g -O3 -Wall -Wstrict-prototypes -Wa,-ahlms=gcctest7.lst -mmcu=at
90s2313 -I. gcctest7.c -o gcctest7.o
gcctest7.c: In function `main':
gcctest7.c:120: Unrecognizable insn:
(insn 320 317 321 (parallel[
(set (reg:HI 66)
(unspec:HI[
(mem:BLK (reg/f:HI 64) 0)
(const_int 0 [0x0])
(const_int 1 [0x1])
] 0))
] ) -1 (nil)
(nil))
gcctest7.c:120: Internal compiler error in extract_insn, at recog.c:2210
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make: *** [gcctest7.o] Error 1

It works only when I turn off optimization completely (-O0).

Andreas

------=_NextPart_000_0006_01C0F4C2.F283F1A0
Content-Type: application/octet-stream;
name="gcctest7.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="gcctest7.c"

#include "uart.h"
#include <progmem.h>
#include <string.h>

char password[] = "pass";

void printstring(char *string)
{
u08 counter=0;
while (string[counter]!=0)
{
UART_SendByte(string[counter]);
counter++;
}
}

void readline(char *buffer, u08 length)
{
u08 data;
u08 col=0;

for (;;) { /* loop forever */

data = UART_ReceiveByte();

switch(data) {
case 8:
if(col>0) {
UART_SendByte(8);
UART_SendByte(32);
UART_SendByte(8);
col--;
}
break;
case 13:
EOL();
buffer[col++]=0;
return;
default:
buffer[col] = data;
col++;
if(col>length) {
col--;
} else {
UART_SendByte(data);
}

break;
}
}
}

int main(void)
{
char buffer[20];
char tempstring[20];
u08 temp;

UART_Init();
outp(0xff,DDRB);
outp(0xff,PORTB);

for(;;) {
EOL();
PRINT("Password: ");
readline(buffer, 20);
if(strcmp(buffer, password)==0) {
PRINT("You are now logged in");
EOL();
PRINT("enter ? for help");
EOL();
for(;;) {
PRINT("$ ");
readline(buffer, 20);
if (strcmp(buffer, "on")==0){
outp(0x00,PORTB);
PRINT("LEDs on");
EOL();
} else if (strcmp(buffer, "off")==0) {
outp(0xff,PORTB);
PRINT("LEDs off");
EOL();
} else if (strcmp(buffer, "?")==0) {
PRINT("Command Description");
EOL();
PRINT("============================================");
EOL();
PRINT("on activate LEDs");
EOL();
PRINT("off deactivate LEDs");
EOL();
PRINT("logout logout");
EOL();
} else if (strcmp(buffer, "logout")==0) {
break;
} else if (strlen(buffer)<1) {

} else {
temp=0;
while((buffer[temp]!=0) && (buffer[temp]!=32)) {
tempstring[temp]=buffer[temp];
temp++;
}
tempstring[temp]=0;
if(strcmp(tempstring, "switch") == 0) {
temp++;
outp(buffer[temp]-48,PORTB);
}
}

}

} else {
PRINT("Wrong password!");
EOL();
}
}

}

------=_NextPart_000_0006_01C0F4C2.F283F1A0
Content-Type: application/octet-stream;
name="makefile"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="makefile"

# Simple Makefile
# Volker Oth (c) 1999

# GCC-AVR standard Makefile part 1
# Volker Oth 1/2000

###### define some variables based on the AVR base path in $(AVR) =
#######
CC =3D avr-gcc
AS =3D avr-gcc -x assembler-with-cpp=09
RM =3D rm -f
RN =3D mv
BIN =3D avr-objcopy
INCDIR =3D .
LIBDIR =3D $(AVR)/avr/lib
SHELL =3D $(AVR)/bin/sh.exe
###### output format can be srec, ihex (avrobj is always created) =
#######
FORMAT =3D srec
########################## default mcu type =
#############################
MCU =3D at90s8515
####################### default compiler flags =
##########################
CPFLAGS =3D -g -O3 -Wall -Wstrict-prototypes =
-Wa,-ahlms=3D$(<:.c=3D.lst)
####################### default assembler flags =
#########################
ASFLAGS =3D -Wa,-gstabs
########################## default linker flags =
#########################
LDFLAGS =3D -Wl,-Map=3D$(TRG).map,--cref

########### change this lines according to your project =
##################

#put the name of the target mcu here (at90s8515, at90s8535, attiny22, =
atmega603 etc.)
MCU =3D at90s2313

#put the name of the target file here (without extension)
TRG =3D gcctest7

#put your C sourcefiles here=20
SRC =3D uart.c $(TRG).c

#put additional assembler source file here
ASRC =3D

#additional libraries and object files to link
LIB =3D=20

#additional includes to compile
INC =3D=20

#compiler flags
CPFLAGS =3D -g -O3 -Wall -Wstrict-prototypes =
-Wa,-ahlms=3D$(<:.c=3D.lst)

#linker flags
LDFLAGS =3D -Wl,-Map=3D$(TRG).map,--cref

########### you should not need to change the following line =
#############
# GCC-AVR standard Makefile part 2
# Volker Oth 1/2000

#define all project specific object files
OBJ =3D $(ASRC:.s=3D.o) $(SRC:.c=3D.o)=20
CPFLAGS +=3D -mmcu=3D$(MCU)
ASFLAGS +=3D -mmcu=3D$(MCU)
LDFLAGS +=3D -mmcu=3D$(MCU)

=20
#this defines the aims of the make process
all: $(TRG).obj $(TRG).elf $(TRG).rom $(TRG).eep

#compile: instructions to create assembler and/or object files from C =
source
%o : %c=20
$(CC) -c $(CPFLAGS) -I$(INCDIR) $< -o $@

%s : %c
$(CC) -S $(CPFLAGS) -I$(INCDIR) $< -o $@

#assemble: instructions to create object file from assembler files
%o : %s
$(AS) -c $(ASFLAGS) -I$(INCDIR) $< -o $@

#link: instructions to create elf output file from object files
%elf: $(OBJ)
$(CC) $(OBJ) $(LIB) $(LDFLAGS) -o $@

#create avrobj file from elf output file
%obj: %elf
$(BIN) -O avrobj $< $@

#create bin (ihex, srec) file from elf output file
%rom: %elf
$(BIN) -O $(FORMAT) $< $@

%eep: %elf
$(BIN) -j .eeprom --set-section-flags=3D.eeprom=3D"alloc,load" -O =
$(FORMAT) $< $@

avr-size $(TRG).rom

#make instruction to delete created files
clean:
$(RM) $(OBJ)
$(RM) $(SRC:.c=3D.s)
$(RM) $(SRC:.c=3D.lst)
$(RM) $(TRG).map
$(RM) $(TRG).elf
$(RM) $(TRG).obj
$(RM) $(TRG).eep
$(RM) $(TRG).rom
$(RM) *.bak
$(RM) *.log
=20
###### dependecies, add any dependencies you need here =
###################

uart.o : uart.c uart.h
$(TRG).o : $(TRG).c

------=_NextPart_000_0006_01C0F4C2.F283F1A0
Content-Type: application/octet-stream;
name="uart.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="uart.c"

#include <io.h>
#include <interrupt.h>
#include <signal.h>
#include <progmem.h>
#include "uart.h"

/* UART global variables */
volatile u08 UART_Ready;
volatile u08 UART_ReceivedChar;
u08 UART_RxChar;
u08* pUART_Buffer;

/* end-of-line string = 'Line End' + 'Line Feed' character */
prog_char UART_pszEndOfLine[3] = {0x0d,0x0a,0};

/* UART Transmit Complete Interrupt Function */
SIGNAL(SIG_UART_TRANS)
{
/* Test if a string is being sent */
if (pUART_Buffer!=0)
{
/* Go to next character in string */
pUART_Buffer++;
/* Test if the end of string has been reached */
if (PRG_RDB(pUART_Buffer)==0)
{
/* String has been sent */
pUART_Buffer = 0;
/* Indicate that the UART is now ready to send */
UART_Ready = 1;
return;
}
/* Send next character in string */
outp( PRG_RDB(pUART_Buffer), UDR );
return;
}
/* Indicate that the UART is now ready to send */
UART_Ready = 1;
}

/* UART Receive Complete Interrupt Function */
SIGNAL(SIG_UART_RECV)
{
/* Indicate that the UART has received a character */
UART_ReceivedChar = 1;
/* Store received character */
UART_RxChar = inp(UDR);
}

void UART_SendByte(u08 Data)
{
/* wait for UART to become available */
while(!UART_Ready);
UART_Ready = 0;
/* Send character */
outp( Data, UDR );
}

u08 UART_ReceiveByte(void)
{
/* wait for UART to indicate that a character has been received */
while(!UART_ReceivedChar);
UART_ReceivedChar = 0;
/* read byte from UART data buffer */
return UART_RxChar;
}

void UART_PrintfProgStr(u08* pBuf)
{
/* wait for UART to become available */
while(!UART_Ready);
UART_Ready = 0;
/* Indicate to ISR the string to be sent */
pUART_Buffer = pBuf;
/* Send first character */
outp( PRG_RDB(pUART_Buffer), UDR );
}

void UART_PrintfEndOfLine(void)
{
/* wait for UART to become available */
while(!UART_Ready);
UART_Ready = 0;
/* Indicate to ISR the string to be sent */
pUART_Buffer = UART_pszEndOfLine;
/* Send first character */
outp( PRG_RDB(pUART_Buffer), UDR );
}

void UART_PrintfU4(u08 Data)
{
/* Send 4-bit hex value */
u08 Character = Data&0x0f;
if (Character>9)
{
Character+='A'-10;
}
else
{
Character+='0';
}
UART_SendByte(Character);
}

void UART_Printfu08(u08 Data)
{
/* Send 8-bit hex value */
UART_PrintfU4(Data>>4);
UART_PrintfU4(Data );
}

void UART_Printfu16(u16 Data)
{
/* Send 16-bit hex value */
UART_PrintfU4(Data>>12);
UART_PrintfU4(Data>> 8);
UART_PrintfU4(Data>> 4);
UART_PrintfU4(Data );
}

void UART_Init(void)
{
UART_Ready = 1;
UART_ReceivedChar = 0;
pUART_Buffer = 0;
/* enable RxD/TxD and interrupts */
outp(BV(RXCIE)|BV(TXCIE)|BV(RXEN)|BV(TXEN),UCR);
/* set baud rate */
outp( (u08)UART_BAUD_SELECT, UBRR);
/* enable interrupts */
sei();
}

------=_NextPart_000_0006_01C0F4C2.F283F1A0
Content-Type: application/octet-stream;
name="uart.h"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="uart.h"

#ifndef __UART_H__
#define __UART_H__

/* Global definitions */
typedef unsigned char u08;
typedef char s08;
typedef unsigned short u16;
typedef short s16;

/* UART Baud rate calculation */
#define UART_CPU 4000000 /* 4Mhz */
#define UART_BAUD_RATE 9600 /* baud rate*/
#define UART_BAUD_SELECT (UART_CPU/(UART_BAUD_RATE*16l)-1)

/* Global functions */
extern void UART_SendByte (u08 Data);
extern u08 UART_ReceiveByte (void);
extern void UART_PrintfProgStr (u08* pBuf);
extern void UART_PrintfEndOfLine(void);
extern void UART_Printfu08 (u08 Data);
extern void UART_Printfu16 (u16 Data);
extern void UART_Init (void);

/* Macros */
#define PRINT(string) (UART_PrintfProgStr(PSTR(string)))
#define EOL UART_PrintfEndOfLine
#endif

------=_NextPart_000_0006_01C0F4C2.F283F1A0--

From [email-masked] Fri Jun 15 18:19:16 2001
Received: from r220-1.rz.rwth-aachen.de ([134.130.3.31])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Amwt-0001o2-00
for <[email-masked]>; Fri, 15 Jun 2001 18:19:15 +1200
Received: from r220-1.rz.RWTH-Aachen.DE (relay2.RWTH-Aachen.DE [134.130.3.1])
by r220-1.rz.RWTH-Aachen.DE (8.10.1/8.11.3-2) with ESMTP id f5F6NmU29670
for <[email-masked]>; Fri, 15 Jun 2001 08:23:48 +0200 (MEST)
Received: from Ostermann-net.de ([217.224.156.122])
by r220-1.rz.RWTH-Aachen.DE (8.10.1/8.11.3/3) with SMTP id f5F6Nld29665
for <[email-masked]>; Fri, 15 Jun 2001 08:23:47 +0200 (MEST)
Message-Id: <[email-masked]>
Date: Fri, 15 Jun 2001 08:22:18 +0200
From: Thorsten Ostermann <[email-masked]>
To: [email-masked]
X-Mailer: Thorsten Ostermann's registered AK-Mail 3.1 publicbeta2a [ger]
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] SPI debugging code, was: IAR vs GCC
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> From: "Jesper Hansen" <[email-masked]>
>
> In my AVR programmer I've built a complete debugging terminal
> using the SPI. Makes it easy to debug, as you already have the cable
> connected.

Hi Jesper,

sounds good to me. Did you published this code anywhere? Is it included
in the yampp sources? And is there some documentation about it?

Best regards
Thorsten

A general request to all subscribers: Please quote only as much text as
needed, to increase the usabillity of this list - Thanks in advance.
--
PGP welcome!
Thorsten online: http://www.ostermann-net.de/electronic/
Rund um Schrittmotor, Fr=E4s-Bohr-Plotter & Mikrocontroller

From [email-masked] Fri Jun 15 18:44:22 2001
Received: from maila.telia.com ([194.22.194.231])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15AnLB-0001pO-00
for <[email-masked]>; Fri, 15 Jun 2001 18:44:21 +1200
Received: from d1o70.telia.com (d1o70.telia.com [62.20.148.241])
by maila.telia.com (8.11.2/8.11.0) with ESMTP id f5F6mrO23347
for <[email-masked]>; Fri, 15 Jun 2001 08:48:54 +0200 (CEST)
Received: from jesper (t4o70p91.telia.com [62.20.149.211])
by d1o70.telia.com (8.10.2/8.10.1) with SMTP id f5F6mrR13131
for <[email-masked]>; Fri, 15 Jun 2001 08:48:53 +0200 (CEST)
Message-ID: <003501c0f567$4ea92b40$65656565@jesper>
From: "Jesper Hansen" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] SPI debugging code, was: IAR vs GCC
Date: Fri, 15 Jun 2001 08:49:14 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Dale, Thorsten et al.

I should have seen it coming ;-)
While I'm using the programmer daily for my 8515, 2313 and mega103
needs, it's not complete. There's currently no fuse support at all, as I'm
not using this.
The plan was ofcourse to put all the bells and whitsles in it, but I never
felt the need.

Let me shine it up a bit and document a few things, and I'll then put it on
my web-site. You can then use it "as is".

/Jesper

> > In my AVR programmer I've built a complete debugging terminal
> > using the SPI. Makes it easy to debug, as you already have the cable
> > connected.
>
> sounds good to me. Did you published this code anywhere? Is it included
> in the yampp sources? And is there some documentation about it?
>

From [email-masked] Fri Jun 15 22:04:46 2001
Received: from pop.gmx.net ([194.221.183.20] helo=mail.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15AqT7-0001xG-00
for <[email-masked]>; Fri, 15 Jun 2001 22:04:45 +1200
Received: (qmail 13255 invoked by uid 0); 15 Jun 2001 10:08:43 -0000
Received: from 99dial215.xnet.ro (HELO suiram) (213.233.99.215)
by mail.gmx.net (mail04) with SMTP; 15 Jun 2001 10:08:43 -0000
From: "suiram" <[email-masked]>
To: <[email-masked]>
Date: Fri, 15 Jun 2001 13:10:24 +0300
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] Good news
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Good news.

I've asked on www.avrfreaks.com forum about AVR Studio support for avrgcc.

"
Hello,

I would like to know if you plan to include support for avr-gcc(elf format)
in the next version of Avrstudio.

Thanks,
Marius Harjoi

Reply To This Message
Re: AVR STUDIO REPLACEMENT
Author: morten (AVR tech. support) ( )
Date: 06-15-01 08:44

Hi Marius,

Yes, we do. It might not be available in the first release, though, but it's
a project with high priority.

Best regards,

Morten, AVR tech. support, Atmel FAE
"

Bye,
Marius Harjoi

From [email-masked] Sat Jun 16 00:51:15 2001
Received: from www.mbd-edv.de ([213.135.2.57] helo=Linux01.mbd-edv.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15At4D-000251-00
for <[email-masked]>; Sat, 16 Jun 2001 00:51:14 +1200
Received: from magix (markus@ntw-magi [192.168.0.50])
by Linux01.mbd-edv.de (8.10.2/8.9.3) with SMTP id f5FD3WD03695
for <[email-masked]>; Fri, 15 Jun 2001 15:03:33 +0200
X-Authentication-Warning: Linux01.mbd-edv.de: Host markus@ntw-magi [192.168.0.50] claimed to be magix
From: Markus Gietzen <[email-masked]>
To: <[email-masked]>
Subject: Re: [avr-gcc-list] Bug in gcc version 3.0 20010605
Date: Fri, 15 Jun 2001 14:51:44 +0200
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
References: <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Message-Id: <01061514561901.00638@magix>
Content-Transfer-Encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> gcctest7.c:120: Unrecognizable insn:
> (insn 320 317 321 (parallel[

I get the same error (also v3.0)
when I use something like this:

#define len(v) strlen(v)

I did the above to replace the custom function len() with the
standard strlen().

Well, as len() does it's job, I just dropped the above line and everything
works fine again :)
Therefore I didn't test (not yet) if the problem is inside the "#define" or
inside the usage of strlen().

Andres mentioned it doesn't happen with turned off optimization. Therefore
I guess it's within strlen().

Bye,

Markus
--
Dipl.-Inf.(FH) Markus Gietzen
Development Director
MbD Biometric Systems GmbH
Tel. +49 681 96861-0
Fax. +49 681 96861-61

From [email-masked] Sun Jun 17 01:49:45 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15BGSO-0003Fx-00
for <[email-masked]>; Sun, 17 Jun 2001 01:49:45 +1200
Received: from mm ([192.168.1.1] ident=mail)
by alf.amelek.gda.pl with esmtp (Exim 3.22 #1 (Debian))
id 15BGVx-0004X3-00; Sat, 16 Jun 2001 15:53:25 +0200
Received: from marekm by mm with local (Exim 3.22 #1 (Debian))
id 15BGVw-0004rd-00; Sat, 16 Jun 2001 15:53:24 +0200
To: [email-masked]
Date: Sat, 16 Jun 2001 15:53:24 +0200 (CEST)
CC: [email-masked]
X-Mailer: ELM [version 2.4ME+ PL89 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Message-Id: <E15BGVw-0004rd-00@mm>
From: Marek Michalkiewicz <[email-masked]>
Subject: [avr-gcc-list] avr-libc-20010616, uisp-20010616
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I've just made new releases of avr-libc and uisp, available from

http://www.amelek.gda.pl/avr/libc/avr-libc-20010616.tar.gz
http://www.amelek.gda.pl/avr/uisp/uisp-20010616.tar.gz

Changes in avr-libc:

Tested with gcc 3.0 20010526 and binutils 010609 snapshots.
Add strstr() (in assembler), thanks to Jochen Pernsteiner.
Fix fplib/asin.S (P3 value), thanks to Dean Ferreyra.
Fix itoa() again... even tested it this time ;).
Fix div() and ldiv() to call the new libgcc functions, too.
Fix gnu/qsort.c to compile without <ansidecl.h>.
Separate Makefile-win32 for now (patches welcome and probably
needed, it's just that I don't want them to break the Linux/*BSD
Makefile in subtle unexpected ways that only show up on the first
"make install" so I didn't catch them), help needed from someone
who is good at writing portable Makefiles as I'm not :(.
Move README to doc/CHANGES as that's what it really is.

Changes in uisp:

- hopefully fix serial support (can't test), broken by my 20010211 -dpart
changes, in code common to both serial and parallel modes that use
different AVR device names :(
- CHANGES -> CHANGES.old, README -> CHANGES, TODO
- document FBPRG interface (not yet supported), and possible new design
using tables to make adding these new cables easier, in DAPA.C comments

Not that many changes, as I'm very busy... but please test and
report bugs (better yet, send patches), as usual.

Thanks,
Marek

From [email-masked] Mon Jun 18 04:50:57 2001
Received: from mail.dir.bg ([194.145.63.28] helo=dir.bg)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15BflE-0006Sx-00
for <[email-masked]>; Mon, 18 Jun 2001 04:50:53 +1200
Received: from [212.116.141.12] (account atanasuzunov HELO atanas)
by dir.bg (CommuniGate Pro SMTP 3.4.7)
with ESMTP id 27384643 for [email-masked]; Sun, 17 Jun 2001 19:53:28 +0300
Message-ID: <000501c0f74e$46cb1d00$0c8d74d4@atanas>
From: "Atanas Uzunov" <[email-masked]>
To: <[email-masked]>
Date: Sun, 17 Jun 2001 19:54:59 +0300
MIME-Version: 1.0
Content-Type: text/plain;
charset="koi8-r"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Subject: [avr-gcc-list] Code Size produced by newer AVRGCC
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi to all,
I have a question about output code size of AVRGCC. When I compile it with
an older version of AVRGCC (1999-mm-dd) the size of the .HEX file is about 6
Kb, but when I compile it with a new version (2000/2001-mm-dd) the size is
very large about 15 Kb! I use various options -O2 -O3 -Os but output code
size doesn't differ very much. Then I disassemble the object files and saw
the strange thing - for example functions __addsf3 and __subsf3 used in
floating point calculations:

Older compiler:

000005ca <__subsf3>:
5ca: 50 58 subi r21, 0x80 ; 128

000005cc <__addsf3>:
5cc: 19 2e mov r1, r25
5ce: 09 d0 rcall .+18 ; 0x5e2
5d0: 38 d0 rcall .+112 ; 0x642
5d2: 1f c0 rjmp .+62 ; 0x612

.
.
.

------------------------------------

Newer compiler:

000008a4 <__addsf3>:
8a4: a0 e2 ldi r26, 0x20 ; 32
8a6: b0 e0 ldi r27, 0x00 ; 0
8a8: e7 e5 ldi r30, 0x57 ; 87
8aa: f4 e0 ldi r31, 0x04 ; 4
8ac: b2 c5 rjmp .+2916 ; 0x1412
8ae: b9 2f mov r27, r25
8b0: a8 2f mov r26, r24
8b2: 97 2f mov r25, r23
8b4: 86 2f mov r24, r22
8b6: 89 8f std Y+25, r24 ; 0x19
8b8: 9a 8f std Y+26, r25 ; 0x1a
.
.
.

00000916 <__subsf3>:
916: a0 e2 ldi r26, 0x20 ; 32
918: b0 e0 ldi r27, 0x00 ; 0
91a: e0 e9 ldi r30, 0x90 ; 144
91c: f4 e0 ldi r31, 0x04 ; 4
91e: 79 c5 rjmp .+2802 ; 0x1412
920: b9 2f mov r27, r25
922: a8 2f mov r26, r24
924: 97 2f mov r25, r23
926: 86 2f mov r24, r22
928: 89 8f std Y+25, r24 ; 0x19
92a: 9a 8f std Y+26, r25 ; 0x1a
.
.
.

It looks like that the newer compiler produce individual code for most of
the functions, and this code is same in each one. I use makefiles used in
GCCTEST with a little modifications. I compiled other little programs with
demo versions with other commersial compilers and their code sizes are like
these ones compiled with the older AVRGCC.

Why the code size produced by the new AVRGCC is so large?

Regards,
Atanas Uzunov

http://www.mcs.dir.bg/index_en.htm
MICROCONTROLLER-BG

From [email-masked] Mon Jun 18 09:28:10 2001
Received: from citycenter.citilink.com ([209.98.8.5])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Bk5Z-0006iA-00
for <[email-masked]>; Mon, 18 Jun 2001 09:28:10 +1200
Received: (from dlarson@localhost) by citycenter.citilink.com (8.8.8/8.7.5) id QAA12874; Sun, 17 Jun 2001 16:22:25 -0500 (CDT)
Posted-Date: Sun, 17 Jun 2001 16:22:25 -0500 (CDT)
Message-Id: <[email-masked]>
From: "Dan Larson" <[email-masked]>
To: "[email-masked]" <[email-masked]>,
"Atanas Uzunov" <[email-masked]>
Date: Sun, 17 Jun 2001 16:38:01 -0600
Reply-To: "Dan Larson" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 98 Standard (2.00.1500) For Windows NT (4.0.1381;3)
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: Re: [avr-gcc-list] Code Size produced by newer AVRGCC
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Sun, 17 Jun 2001 19:54:59 +0300, Atanas Uzunov wrote:

>
>Why the code size produced by the new AVRGCC is so large?
>

One optimization that you want to be sure *NOT* to use when you want small
code space is "inlining". Some small library functions are added directly into
your code and may be duplicated in the compiler output as many times as they
are called. This can make code get huge, but it also makes it faster.

Generally optimizations for speed are incompatible with optimizations for
code size, and function "inlining" is a speed optimization..

Though I am not an AVR-GCC expert, I do have experience with other compilers
and my statement is just to be considered general advice.

As for an explanation as to why the newer version is worse, it may be that more of the
library functions have been declared "inline" and are now being inlined by the
compiler where they were not before. Try finding a way to turn off the inlining optimization
and see what your results are.

Dan

From [email-masked] Thu Jun 21 22:48:59 2001
Received: from hermes.rz.hs-bremen.de ([194.94.24.33])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15D21C-00027y-00
for <[email-masked]>; Thu, 21 Jun 2001 22:48:58 +1200
Received: from elnu100 (dhcp-fbe-1.etech.hs-bremen.de [194.94.26.130])
by hermes.rz.hs-bremen.de (8.9.3/8.9.3/Debian 8.9.3-21) with SMTP id MAA05057
for <[email-masked]>; Thu, 21 Jun 2001 12:54:00 +0200
Content-Type: text/plain;
charset="iso-8859-1"
From: Heiko <[email-masked]>
Reply-To: [email-masked]
Organization: HFT
To: [email-masked]
Date: Thu, 21 Jun 2001 12:53:42 +0000
X-Mailer: KMail [version 1.2]
MIME-Version: 1.0
Message-Id: <01062112472700.00654@elnu100>
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] avr-gcc problems with ver 3.0 prerelease for attiny11,12,15
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi avr-gcc-list,

we encounter problems with the prerelease version 3.0 20010605 in avr-gcc=
=2E
Compiler does not recognize attiny11,12,15. Attiny22,90s2323 are recogniz=
ed=20
e.g.

OS:
Suse Linux 7.0

Program test2.c is as following:
int main(void)
{
for(;;);
}

Invoke:
avr-gcc -c -g -O2 -Wall -Wstrict-prototypes -Wa,-ahlms=3Dtest2.lst=20
-mmcu=3Dattiny15 -I. test2.c -o test2.o

Response:
cc1: MCU `attiny15' not supported

Are there any known problems to it ?

Regards
Heiko Schroeter
Hochschule Bremen
[email-masked]

From [email-masked] Fri Jun 22 05:20:39 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15D885-0002My-00
for <[email-masked]>; Fri, 22 Jun 2001 05:20:39 +1200
Received: from mm ([192.168.1.1] ident=mail)
by alf.amelek.gda.pl with esmtp (Exim 3.22 #1 (Debian))
id 15D8C3-0007t5-00; Thu, 21 Jun 2001 19:24:35 +0200
Received: from marekm by mm with local (Exim 3.22 #1 (Debian))
id 15D8C1-0004ki-00; Thu, 21 Jun 2001 19:24:33 +0200
Subject: Re: [avr-gcc-list] avr-gcc problems with ver 3.0 prerelease for attiny11,12,15
In-Reply-To: <01062112472700.00654@elnu100> "from Heiko at Jun 21, 2001 12:53:42
pm"
To: [email-masked]
Date: Thu, 21 Jun 2001 19:24:33 +0200 (CEST)
CC: [email-masked]
X-Mailer: ELM [version 2.4ME+ PL89 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Message-Id: <E15D8C1-0004ki-00@mm>
From: Marek Michalkiewicz <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> cc1: MCU `attiny15' not supported
>
> Are there any known problems to it ?

Yes. Tell Atmel to make a new ATtiny15 for you with the complete AVR
instruction set and some RAM ;). Ideally, ask them for some more flash
too while you are at it ;).

In the meantime, you can at least still use the C preprocessor for
your assembler source:

avr-gcc -c -mmcu=attiny15 -x assembler-with-cpp test.S -o test.o

You can #include <iotn15.h> to use I/O register defines from avr-libc,
etc. Sorry, no C - AT90S1200, ATtiny1x and ATtiny28 are designed for
very simple applications, written completely in assembler.

Marek

From [email-masked] Mon Jun 25 19:18:44 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15EQdv-0008Ll-00
for <[email-masked]>; Mon, 25 Jun 2001 19:18:43 +1200
Received: from oTRIs.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id JAA07581
for <[email-masked]>; Mon, 25 Jun 2001 09:23:54 +0200
Message-ID: <[email-masked]>
Date: Mon, 25 Jun 2001 09:29:08 +0200
From: Gunnar Henne <[email-masked]>
Reply-To: [email-masked]
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] New win32 binaries available (gcc 3.0 binutils 2.11 avr-libc 2001.06.16
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

there are new binaries available.
Compiling and linking work fine, but avr-studio hangs if you want to
start debugging.
Perhaps I have done something wrong, AStudio is in some ways very
fragile.

I used the release versions of gcc and binutils. Please report me, if
they work for you, then I will remove the old stuff.

http://combio.de/avr/avr-binutils-2.11-avrobj.mingw32.tar.gz
http://combio.de/avr/avr-gcc-3.0.mingw32.tar.gz
http://combio.de/avr/avr-libc-20010616.wininstall.tar.gz
http://combio.de/avr/unix-tools.tar.gz

the links are already at my download page on
http://www.combio.de/avr

Greetings
Gunnar

From [email-masked] Mon Jun 25 22:44:32 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ETr4-00007C-00
for <[email-masked]>; Mon, 25 Jun 2001 22:44:31 +1200
Received: from oTRIs.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id MAA19677
for <[email-masked]>; Mon, 25 Jun 2001 12:49:49 +0200
Message-ID: <[email-masked]>
Date: Mon, 25 Jun 2001 12:55:04 +0200
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] AStudio + gcc 3.0
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I finally got to work AStudio 3.5 with the new avr-gcc 3.0.
Its very strange, but reproducible:
1) I start AStudio and open an object file (without projekt) -> AStudio
hangs so extremely that it cant be killed using the Win2k TaskManager.
2) I start AStudio and open an object file (without projekt) -> The same
result as 1)
3) I start AStudio and open an object file (without projekt) -> AStudio
works!

In the task bar there are now three entries for AVR Studio, the first
two of them are the hanging instances from step 1) and 2). As long as
the two are hanging around you can work normally with the third one,
even quit and restart it.

Very strange I think.
Ok, I know im working under windows. ;-)

Greetings

Gunnar

From [email-masked] Tue Jun 26 10:38:06 2001
Received: from fe040.worldonline.dk ([212.54.64.205])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15Eeze-0000dC-00
for <[email-masked]>; Tue, 26 Jun 2001 10:38:06 +1200
Received: (qmail 9596 invoked by uid 0); 25 Jun 2001 22:42:46 -0000
Received: from 89.ppp1-8.hob.worldonline.dk (HELO noa3) (213.237.85.89)
by fe040.worldonline.dk with SMTP; 25 Jun 2001 22:42:46 -0000
Message-ID: <02af01c0fdc8$3987c6e0$8b679dd9@noa3>
From: "Kasper Pedersen" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]> <01061514561901.00638@magix>
Subject: Re: [avr-gcc-list] Bug in gcc version 3.0 20010605 (and yesterday's)
Date: Tue, 26 Jun 2001 00:42:31 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

From: "Markus Gietzen" <[email-masked]>
> > gcctest7.c:120: Unrecognizable insn:
> > (insn 320 317 321 (parallel[
>
> I get the same error (also v3.0)
> when I use something like this:
>
> #define len(v) strlen(v)
>
> I did the above to replace the custom function len() with the
> standard strlen().

A short version that produces it:

int funcc(void) { return 0; }
#define strlexx strlen
extern int strlen(const char *a);
extern int strlem(const char *a);
extern int strleo(const char *a);
char buffer[20];
int main(void)
{
for(;;) if (funcc()) if (strlexx(buffer)) if (funcc()) ;
}

Interrestingly enough it manages to distinguish between strlen and
strlem/strleo with the name strlen changed in all libraries. Even without
libraries (a binary search of the tree says that strlen doesn't occur
anywhere except the help documentation and the exe files - windows version)
it manages to behave differently.

In short, it seems that if I name strlen something other than strlen, and
then rebuild the libraries, it works?

/Kasper

From [email-masked] Tue Jun 26 19:26:47 2001
Received: from www.mbd-edv.de ([213.135.2.57] helo=Linux01.mbd-edv.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15EnFE-0000y3-00
for <[email-masked]>; Tue, 26 Jun 2001 19:26:45 +1200
Received: from magix (markus@ntw-magi [192.168.0.50])
by Linux01.mbd-edv.de (8.10.2/8.9.3) with SMTP id f5Q7kbD10283
for <[email-masked]>; Tue, 26 Jun 2001 09:46:37 +0200
X-Authentication-Warning: Linux01.mbd-edv.de: Host markus@ntw-magi [192.168.0.50] claimed to be magix
Content-Type: text/plain;
charset="iso-8859-1"
From: Markus Gietzen <[email-masked]>
Organization: MbD EDV Management GmbH
To: <[email-masked]>
Subject: Re: [avr-gcc-list] Bug in gcc version 3.0 20010605 (and yesterday's)
Date: Tue, 26 Jun 2001 09:32:35 +0200
X-Mailer: KMail [version 1.2]
References: <[email-masked]> <01061514561901.00638@magix> <02af01c0fdc8$3987c6e0$8b679dd9@noa3>
In-Reply-To: <02af01c0fdc8$3987c6e0$8b679dd9@noa3>
MIME-Version: 1.0
Message-Id: <01062609323500.00707@magix>
Content-Transfer-Encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> In short, it seems that if I name strlen something other than strlen, and
> then rebuild the libraries, it works?

For me this looks like a bug within the "intrinsic optimizations". I guess
that strlen is recognized by the compiler and then directly optimized.
This would also explain why you don't see this error when you turn off
the optimizations.

Markus

From [email-masked] Wed Jun 27 00:17:17 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15ErmN-0001GU-00
for <[email-masked]>; Wed, 27 Jun 2001 00:17:16 +1200
Received: (qmail 21037 invoked from network); 26 Jun 2001 11:25:39 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 26 Jun 2001 11:25:39 -0000
Received: from fri.uni-lj.si ([193.2.76.118]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with ESMTP id AAA22412
for <[email-masked]>; Tue, 26 Jun 2001 14:12:04 +0200
Message-ID: <[email-masked]>
Date: Tue, 26 Jun 2001 14:21:50 +0200
From: [email-masked] (Robert Rozman)
X-Mailer: Mozilla 4.51 [sl] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
CC: [email-masked]
References: <[email-masked]> <01061514561901.00638@magix> <02af01c0fdc8$3987c6e0$8b679dd9@noa3> <01062609323500.00707@magix>
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Support for FPSLIC
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I wonder if avr-gcc supports AVR core of FPSLIC device (FPGA field with AVR uP
core) or if anybody is programming it with help of avr-gcc.

Thanks,

Robert Rozman

From [email-masked] Wed Jun 27 02:50:53 2001
Received: from mail2.canvas.dk ([194.192.221.82])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15EuB2-0001Qc-00
for <[email-masked]>; Wed, 27 Jun 2001 02:50:52 +1200
Received: from webserver_01 ([194.192.221.72]) by mail2.canvas.dk
(Post.Office MTA v3.5.3 release 223 ID# 0-58146U3000L300S0V35)
with SMTP id dk for <[email-masked]>;
Tue, 26 Jun 2001 16:55:04 +0200
From: "[email-masked]" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Tue, 26 Jun 2001 14:54:56 "GMT"
X-MSMail-Priority: Normal
X-mailer: AspMail 3.03 (SMTP1030D4)
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Message-Id: <[email-masked]>
Subject: [avr-gcc-list] Install build
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Yet another install set of Gunnnar's binaries is available, this=
time
on www.avrfreaks.net

This version of the installation program doesn't call the old
install.exe - although I've kept it in case the new system fails=
- but
builds the batch file&libraries directly.
This avoids the annoying 'Outreset - access denied' dialog on=
NT4/W2k.

If it fails, please flame me (or something).

/Kasper

---------------------------------------------------------
This mail was sent through Eoffice: http://www.eoffice.dk

From [email-masked] Wed Jun 27 03:44:19 2001
Received: from overclockers.zip.com.au ([61.8.3.18] helo=odin.zip.com.au)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Ev0l-0001Sz-00
for <[email-masked]>; Wed, 27 Jun 2001 03:44:19 +1200
Received: from mwp by odin.zip.com.au with local-esmtp (Exim 3.12 #1 (Debian))
id 15Ev64-0005nH-00; Wed, 27 Jun 2001 01:49:48 +1000
Date: Wed, 27 Jun 2001 01:49:48 +1000 (EST)
From: MWP <[email-masked]>
X-Sender: [email-masked]
To: [email-masked]
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] Problems compiling GCC under RH7.1
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi ppl...

Ive just moved up to RH7.1 (from 6.0) and am now trying to recompile GCC
for the AVR.

Ive tried absolutly everything i can think of and i still get this error
during compiling of GCC:

/home/backup/linux/gcc-stuff/gcc-20010604/gcc/xgcc
-B/home/backup/linux/gcc-stuff/gcc-20010604/gcc/ -B/usr/local/avr/avr/bin/
-B/usr/local/avr/avr/lib/ -isystem /usr/local/avr/avr/include -O2
-DCROSS_COMPILE -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -isystem ./include -DDF=SF -Dinhibit_libc
-mcall-prologues -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc
-I. -I. -I. -I./. -I./config -I./../include -DL_muldi3 -c ./libgcc2.c -o
libgcc/./_muldi3.o
/tmp/ccUenhnh.s: Assembler messages:
/tmp/ccUenhnh.s:157: Error: register required
/tmp/ccUenhnh.s:158: Error: register required
make[2]: *** [libgcc/./_muldi3.o] Error 1
make[2]: Leaving directory `/home/backup/linux/gcc-stuff/gcc-20010604/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/home/backup/linux/gcc-stuff/gcc-20010604/gcc'
make: *** [all-gcc] Error 2

As you can see thats with a snapshot of GCC from 20010604.
But strangly this same version compiled perfectly on my RH6.0 install.

I have also tried compiling the release version of GCC3.0 which gives
EXACTLY the same error messages during compiling.

BTW... im using binutils-2.10.1 compiled for the host and for AVR.

Any ideas?

Thanks,
MWP

From [email-masked] Wed Jun 27 19:46:25 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15FA1n-00027t-00
for <[email-masked]>; Wed, 27 Jun 2001 19:46:23 +1200
Received: from oTRIs.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id JAA05638
for <[email-masked]>; Wed, 27 Jun 2001 09:51:25 +0200
Message-ID: <[email-masked]>
Date: Wed, 27 Jun 2001 09:56:40 +0200
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] New win32 binaries available (gcc 3.0 binutils 2.11 avr-libc 2001.06.16)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

Larry Barello wrote:
>
> Gunnar: I installed your binaries and re-built my application and it loaded
> up in Astudio 3.5 just fine.

Nice to hear.

> No hangs, no weird run three times stuff.
> Don't you just hate these weird problems?

As a windows developer I got used to such things. ;-]

> Will you be making periodic 3.1 binaries available?

When Denis announces bugfixes I will make new binaries available.
The same for avr-libc.

Greetings from sunny hot germany.

Gunnar

From [email-masked] Thu Jun 28 05:31:41 2001
Received: from overclockers.zip.com.au ([61.8.3.18] helo=odin.zip.com.au)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15FJAD-0002bY-00
for <[email-masked]>; Thu, 28 Jun 2001 05:31:41 +1200
Received: from mwp by odin.zip.com.au with local-esmtp (Exim 3.12 #1 (Debian))
id 15FJFd-0002EF-00; Thu, 28 Jun 2001 03:37:17 +1000
Date: Thu, 28 Jun 2001 03:37:17 +1000 (EST)
From: MWP <[email-masked]>
X-Sender: [email-masked]
To: [email-masked]
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] Strange libraries problem...
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all...

Ive just started using gcc-core-20010618 and binutils-2.11.2 on my RH7.1
box (both compiled and installed fine).

Now the strage bit happens when i try and compile my prog.. i get this:

avr-gcc -Wl,-Map=car.map,--cref -mmcu=at90s8535 -Wl,--rpath
-Wl,/usr/local/avr/lib -Wl,-L/usr/local/avr/lib -o car.out car.o uart.o
/usr/local/avr/lib/gcc-lib/avr/3.0.1/../../../../avr/bin/ld: cannot open
crts8535.o: No such file or directory

All the libraries are installed properly and crts8535.o is in
/usr/local/avr/lib where it should be. As you can see ive tried to force
LD to look there by the "-Wl,--rpath -Wl,/usr/local/avr/lib" and
"-L/usr/local/avr/lib" on the command line, but it hasnt helped.

Any ideas?

Thanks,
MWP

From [email-masked] Thu Jun 28 08:58:34 2001
Received: from hammer.overta.ru ([195.151.108.138] helo=overta.ru)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15FMOO-0002oN-00
for <[email-masked]>; Thu, 28 Jun 2001 08:58:33 +1200
Received: from [195.151.217.145] (HELO localhost.localdomain)
by overta.ru (CommuniGate Pro SMTP 3.4.7)
with ESMTP id 199902; Thu, 28 Jun 2001 01:03:01 +0400
To: "Andreas Schwarz" <[email-masked]>
Cc: <[email-masked]>
Subject: Re: [avr-gcc-list] Bug in gcc version 3.0 20010605
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 28 Jun 2001 00:56:34 +0400
In-Reply-To: "Andreas Schwarz"'s message of "Thu, 14 Jun 2001 11:12:49 +0200"
Message-ID: <[email-masked]>
Lines: 45
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Andreas Schwarz" <[email-masked]> writes:

> Hello,
>
> I think have found a Bug in the gcc-version from www.combio.de/avr/.
> When I try to compile the attached program, I get the following error
> message:
>
> avr-gcc -c -g -O3 -Wall -Wstrict-prototypes -Wa,-ahlms=gcctest7.lst -mmcu=at
> 90s2313 -I. gcctest7.c -o gcctest7.o
> gcctest7.c: In function `main':
> gcctest7.c:120: Unrecognizable insn:

Index: config/avr/avr.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/avr/avr.md,v
retrieving revision 1.26
diff -c -3 -p -r1.26 avr.md
*** avr.md 2001/01/21 07:08:46 1.26
--- avr.md 2001/06/27 20:34:28
***************
*** 475,485 ****
(set_attr "cc" "clobber,clobber")])

(define_expand "strlenhi"
! [(parallel
! [(set (match_dup 4)
! (unspec:HI [(match_operand:BLK 1 "memory_operand" "")
! (match_operand:QI 2 "const_int_operand" "")
! (match_operand:HI 3 "immediate_operand" "")] 0))])
(set (match_dup 4) (plus:HI (match_dup 4)
(const_int -1)))
(set (match_operand:HI 0 "register_operand" "")
--- 475,484 ----
(set_attr "cc" "clobber,clobber")])

(define_expand "strlenhi"
! [(set (match_dup 4)
! (unspec:HI [(match_operand:BLK 1 "memory_operand" "")
! (match_operand:QI 2 "const_int_operand" "")
! (match_operand:HI 3 "immediate_operand" "")] 0))
(set (match_dup 4) (plus:HI (match_dup 4)
(const_int -1)))
(set (match_operand:HI 0 "register_operand" "")

From [email-masked] Thu Jun 28 08:58:38 2001
Received: from hammer.overta.ru ([195.151.108.138] helo=overta.ru)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15FMOS-0002oN-00
for <[email-masked]>; Thu, 28 Jun 2001 08:58:37 +1200
Received: from [195.151.217.145] (HELO localhost.localdomain)
by overta.ru (CommuniGate Pro SMTP 3.4.7)
with ESMTP id 199898; Thu, 28 Jun 2001 01:03:15 +0400
From: Denis Chertykov <[email-masked]>
To: [email-masked]
Cc: [email-masked], [email-masked], [email-masked]
[email-masked], [email-masked]
Date: Thu, 28 Jun 2001 01:03:16 +0400
Message-ID: <[email-masked]>
Subject: [avr-gcc-list] avr port gcc-3.0: bugfix for strlen() bug
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Thu Jun 28 00:31:24 2001 Denis Chertykov <[email-masked]>

* config/avr/avr.md (strlenhi): PARALLEL keyword removed.
* config/avr/avr.c (legitimate_address_p): Return value changed
from letter to register classes. For better debugging.

Index: config/avr/avr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/avr/avr.c,v
retrieving revision 1.38.2.1
diff -c -3 -p -r1.38.2.1 avr.c
*** avr.c 2001/05/12 20:32:41 1.38.2.1
--- avr.c 2001/06/27 20:34:21
*************** legitimate_address_p (mode, x, strict)
*** 802,808 ****
rtx x;
int strict;
{
! int r = 0;
if (TARGET_ALL_DEBUG)
{
fprintf (stderr, "mode: (%s) %s %s %s %s:",
--- 802,809 ----
rtx x;
int strict;
{
! enum reg_class r = NO_REGS;
!
if (TARGET_ALL_DEBUG)
{
fprintf (stderr, "mode: (%s) %s %s %s %s:",
*************** legitimate_address_p (mode, x, strict)
*** 824,832 ****
}
if (REG_P (x) && (strict ? REG_OK_FOR_BASE_STRICT_P (x)
: REG_OK_FOR_BASE_NOSTRICT_P (x)))
! r = 'R';
else if (CONSTANT_ADDRESS_P (x))
! r = 'S';
else if (GET_CODE (x) == PLUS
&& REG_P (XEXP (x, 0))
&& GET_CODE (XEXP (x, 1)) == CONST_INT
--- 825,833 ----
}
if (REG_P (x) && (strict ? REG_OK_FOR_BASE_STRICT_P (x)
: REG_OK_FOR_BASE_NOSTRICT_P (x)))
! r = POINTER_REGS;
else if (CONSTANT_ADDRESS_P (x))
! r = ALL_REGS;
else if (GET_CODE (x) == PLUS
&& REG_P (XEXP (x, 0))
&& GET_CODE (XEXP (x, 1)) == CONST_INT
*************** legitimate_address_p (mode, x, strict)
*** 838,863 ****
if (! strict
|| REGNO (XEXP (x,0)) == REG_Y
|| REGNO (XEXP (x,0)) == REG_Z)
! r = 'Q';
if (XEXP (x,0) == frame_pointer_rtx
|| XEXP (x,0) == arg_pointer_rtx)
! r = 'Q';
}
else if (frame_pointer_needed && XEXP (x,0) == frame_pointer_rtx)
! r = 'U';
}
else if ((GET_CODE (x) == PRE_DEC || GET_CODE (x) == POST_INC)
&& REG_P (XEXP (x, 0))
&& (strict ? REG_OK_FOR_BASE_STRICT_P (XEXP (x, 0))
: REG_OK_FOR_BASE_NOSTRICT_P (XEXP (x, 0))))
{
! r = 'T';
}
if (TARGET_ALL_DEBUG)
{
fprintf (stderr, " ret = %c\n", r);
}
! return r;
}

/* Attempts to replace X with a valid
--- 839,864 ----
if (! strict
|| REGNO (XEXP (x,0)) == REG_Y
|| REGNO (XEXP (x,0)) == REG_Z)
! r = BASE_POINTER_REGS;
if (XEXP (x,0) == frame_pointer_rtx
|| XEXP (x,0) == arg_pointer_rtx)
! r = BASE_POINTER_REGS;
}
else if (frame_pointer_needed && XEXP (x,0) == frame_pointer_rtx)
! r = POINTER_Y_REGS;
}
else if ((GET_CODE (x) == PRE_DEC || GET_CODE (x) == POST_INC)
&& REG_P (XEXP (x, 0))
&& (strict ? REG_OK_FOR_BASE_STRICT_P (XEXP (x, 0))
: REG_OK_FOR_BASE_NOSTRICT_P (XEXP (x, 0))))
{
! r = POINTER_REGS;
}
if (TARGET_ALL_DEBUG)
{
fprintf (stderr, " ret = %c\n", r);
}
! return r == NO_REGS ? 0 : (int)r;
}

/* Attempts to replace X with a valid
Index: config/avr/avr.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/avr/avr.md,v
retrieving revision 1.26
diff -c -3 -p -r1.26 avr.md
*** avr.md 2001/01/21 07:08:46 1.26
--- avr.md 2001/06/27 20:34:28
***************
*** 475,485 ****
(set_attr "cc" "clobber,clobber")])

(define_expand "strlenhi"
! [(parallel
! [(set (match_dup 4)
! (unspec:HI [(match_operand:BLK 1 "memory_operand" "")
! (match_operand:QI 2 "const_int_operand" "")
! (match_operand:HI 3 "immediate_operand" "")] 0))])
(set (match_dup 4) (plus:HI (match_dup 4)
(const_int -1)))
(set (match_operand:HI 0 "register_operand" "")
--- 475,484 ----
(set_attr "cc" "clobber,clobber")])

(define_expand "strlenhi"
! [(set (match_dup 4)
! (unspec:HI [(match_operand:BLK 1 "memory_operand" "")
! (match_operand:QI 2 "const_int_operand" "")
! (match_operand:HI 3 "immediate_operand" "")] 0))
(set (match_dup 4) (plus:HI (match_dup 4)
(const_int -1)))
(set (match_operand:HI 0 "register_operand" "")

From [email-masked] Sun Jul 01 05:31:28 2001
Received: from rly-ip01.mx.aol.com ([205.188.156.49])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15GOad-0005zW-00
for <[email-masked]>; Sun, 01 Jul 2001 05:31:28 +1200
Received: from tot-tj.proxy.aol.com (tot-tj.proxy.aol.com [152.163.213.131])
by rly-ip01.mx.aol.com (8.8.8/8.8.8/AOL-5.0.0)
with ESMTP id NAA00996 for <[email-masked]>;
Sat, 30 Jun 2001 13:36:38 -0400 (EDT)
Received: from verwiebe.de (AC92D0AC.ipt.aol.com [172.146.208.172])
by tot-tj.proxy.aol.com (8.10.0/8.10.0) with ESMTP id f5UHabh31169
for <[email-masked]>; Sat, 30 Jun 2001 13:36:37 -0400 (EDT)
Message-ID: <[email-masked]>
Date: Sat, 30 Jun 2001 19:53:24 +0200
From: Dirk Verwiebe <[email-masked]>
X-Mailer: Mozilla 4.75 [de]C-CCK-MCD DT (Win98; U)
X-Accept-Language: de
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Apparently-From: [email-masked]
Subject: [avr-gcc-list] Coverting float to ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello ,

how can i convert float to ascii with avrgcc ?
ftoa and sprintf seems not be available.

regards

Dirk Verwiebe

From [email-masked] Sun Jul 01 10:00:37 2001
Received: from mail.ripnet.com ([206.47.98.3])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15GSn6-0007kL-00
for <[email-masked]>; Sun, 01 Jul 2001 10:00:36 +1200
Received: from linux ([email-masked] [207.236.51.249])
by mail.ripnet.com (8.11.1/8.11.1) with SMTP id f5UM6Jo23358
for <[email-masked]>; Sat, 30 Jun 2001 18:06:20 -0400
Content-Type: text/plain;
charset="iso-8859-1"
From: RogerB <[email-masked]>
Reply-To: [email-masked]
Organization: none
To: [email-masked]
Date: Sat, 30 Jun 2001 18:10:44 -0400
X-Mailer: KMail [version 1.2]
MIME-Version: 1.0
Message-Id: <01063018104400.00394@linux>
Content-Transfer-Encoding: 8bit
Subject: [avr-gcc-list] Compiling avr-libc problems
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I compiled avr-gcc using gcc-2.95.2 and gcc-core-2.95.2-avr-patch-1.1.gz
binutils-2.9.5.0.13.tar.bz2 and binutils-2.9.5.0.13-avr-patch-1.1.gz.
Everything seems to be ok but when when I try to compile the libc files I get
the same errors. I tried a number of different version and got the same
errors.
avr-gcc -x assembler-with-cpp -mmcu=at90s1200 -I./../include -I.
-Wa,-gstabs -c gcrt1.S -o crts1200.o
In file included from macros.inc:18,
from gcrt1.S:27:
../include/io-avr.h:71: warning: #warning "device type not defined"
gcrt1.S: Assembler messages:
gcrt1.S:211: Error: non-constant expression in ".if" statement
gcrt1.S:229: Error: Constant value required
gcrt1.S:245: Error: register required
gcrt1.S:246: Error: register required
gcrt1.S:250: Error: register required
gcrt1.S:251: Error: register required
macros.inc:176: Error: register required
gcrt1.S:261: Error: register required
gcrt1.S:272: Error: register required
gcrt1.S:273: Error: register required
gcrt1.S:282: Error: register required
make: *** [crts1200.o] Error 1
That error was from avr-libc-20010616. any suggestions will help.
Thanks RogerB.

From [email-masked] Sun Jul 01 10:03:41 2001
Received: from maila.telia.com ([194.22.194.231])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15GSq4-0007ku-00
for <[email-masked]>; Sun, 01 Jul 2001 10:03:41 +1200
Received: from d1o926.telia.com (d1o926.telia.com [213.66.172.241])
by maila.telia.com (8.11.2/8.11.0) with ESMTP id f5UM9MX12723
for <[email-masked]>; Sun, 1 Jul 2001 00:09:23 +0200 (CEST)
Received: from jesper (h122n2fls34o926.telia.com [217.208.35.122])
by d1o926.telia.com (8.10.2/8.10.1) with SMTP id f5UM9MA22120
for <[email-masked]>; Sun, 1 Jul 2001 00:09:22 +0200 (CEST)
Message-ID: <007c01c101b1$62cf5a80$65656565@jesper>
From: "Jesper Hansen" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]>
Subject: [avr-gcc-list] Initializers and prog_mem
Date: Sun, 1 Jul 2001 00:09:46 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi !

Have anybody succeded in allocation an array of strings in prog_mem ???

Here's what I want to do :

/////////////////////
struct test_t {
uint8 (*fn)(void);
char *str;
} tests[] = {
{func1,"text1"},
{func_2,"text2"},
{0,0}
};
//////////////
I want the two texts to be allocated directly in the program memory.
Not matter how I turn it around and try to use the prog_char type, I can't
get it to work. GCC always complain about the initializers.

Even this simple stuff won't work :

prog_char *ss[] = {"aaa","bbb"};

Which is actually obvious as the progmem attribute belongs to "*ss" and not
to "*ss[]".
But how the *&/"#%! does I describe that ?

/Jesper

From [email-masked] Mon Jul 02 04:54:42 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15GkUY-0000aE-00
for <[email-masked]>; Mon, 02 Jul 2001 04:54:42 +1200
Received: from mm ([192.168.1.1] ident=mail)
by alf.amelek.gda.pl with esmtp (Exim 3.22 #1 (Debian))
id 15GkS2-00036E-00
for <[email-masked]>; Sun, 01 Jul 2001 18:52:03 +0200
Received: from marekm by mm with local (Exim 3.22 #1 (Debian))
id 15GkS2-0003WE-00
for <[email-masked]>; Sun, 01 Jul 2001 18:52:02 +0200
To: [email-masked]
Date: Sun, 1 Jul 2001 18:52:02 +0200 (CEST)
X-Mailer: ELM [version 2.4ME+ PL89 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Message-Id: <E15GkS2-0003WE-00@mm>
From: Marek Michalkiewicz <[email-masked]>
Subject: [avr-gcc-list] avr-libc-20010701, uisp-20010701
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I've just made new releases, available from the usual place:

http://www.amelek.gda.pl/avr/libc/avr-libc-20010701.tar.gz
http://www.amelek.gda.pl/avr/uisp/uisp-20010701.tar.gz

Please test - thanks.

It might be a good idea to mirror that in some better connected
place as I can see many restarted downloads in my server logs,
probably because of high packet loss (TPSA...) from abroad.

BTW, the box is now running (for over a month...) Linux 2.4.x
with ECN enabled, so in case of problems connecting to it,
please check if you are not behind a broken firewall
(see http://gtf.org/garzik/ecn/ for more information).

Marek

From [email-masked] Mon Jul 02 05:04:37 2001
Received: from sttlpop4.sttl.uswest.net ([206.81.192.4])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15GkeC-0000b5-00
for <[email-masked]>; Mon, 02 Jul 2001 05:04:37 +1200
Received: (qmail 55991 invoked by alias); 1 Jul 2001 17:02:11 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 55979 invoked by uid 0); 1 Jul 2001 17:02:10 -0000
Received: from sdslppp125.sttl.uswest.net (HELO delllaptop) (63.224.46.125)
by sttlpop4.sttl.uswest.net with SMTP; 1 Jul 2001 17:02:10 -0000
Message-ID: <002d01c1024f$38a51760$0600000a@delllaptop>
From: "larry barello" <[email-masked]>
To: "Jesper Hansen" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]> <007c01c101b1$62cf5a80$65656565@jesper>
Subject: Re: [avr-gcc-list] Initializers and prog_mem
Date: Sun, 1 Jul 2001 09:58:12 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

You can't declare both a pointer and a string at the same time. It doesn't
make sense since the pointer is just a constant pointing to the string which
is also a constant. That is what you are trying to do with:

char *foo = "bar";

foo is a pointer to the string bar.

You can, however, put anything you want into FLASH as individual items.
Note: things put into the FLASH memory need to be declared "const"
elsewhere. I modified you example to put both the test structure and the
strings into FLASH memory. Naturally, you will not be able to directly
access *anything*. You will need to calculate offsets and read the flash
with one of the program memory access routines. That isn't as terrible as
it sounds.

Cheers!

unsigned char func1(void);
unsigned char func2(void);

#define FLASH __attribute__ ((progmem))

char FLASH text1[] = "text1"; // Place string into FLASH
char FLASH text2[] = "text2";

struct test_t {
unsigned char (*fn)(void);
const char *str; // NB Str is a const pointer to flash
} FLASH tests[] = { // Stuck data struct into flash as well
{func1,text1},
{func2,text2},
{0,0}
};

int main(void)
{
return(1);
}
----- Original Message -----
From: "Jesper Hansen" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
Sent: Saturday, June 30, 2001 3:09 PM
Subject: [avr-gcc-list] Initializers and prog_mem

> Hi !
>
> Have anybody succeded in allocation an array of strings in prog_mem ???
>
> Here's what I want to do :
>
> /////////////////////
> struct test_t {
> uint8 (*fn)(void);
> char *str;
> } tests[] = {
> {func1,"text1"},
> {func_2,"text2"},
> {0,0}
> };
> //////////////
> I want the two texts to be allocated directly in the program memory.
> Not matter how I turn it around and try to use the prog_char type, I can't
> get it to work. GCC always complain about the initializers.
>
> Even this simple stuff won't work :
>
> prog_char *ss[] = {"aaa","bbb"};
>
> Which is actually obvious as the progmem attribute belongs to "*ss" and
not
> to "*ss[]".
> But how the *&/"#%! does I describe that ?
>
>
> /Jesper
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Mon Jul 02 23:43:45 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15H27F-0001PV-00
for <[email-masked]>; Mon, 02 Jul 2001 23:43:45 +1200
Received: from jpk1.jpk.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.9.3/8.9.3) with ESMTP id XAA24404
for <[email-masked]>; Mon, 2 Jul 2001 23:31:40 +1200
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Mon, 02 Jul 2001 23:41:15 +1200
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] avr-libc-20010701, uisp-20010701
In-Reply-To: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Marek,

Tried uisp-20010701 with -datmel option, works fine. Working on how to
communicate with an STK500 so we can add it to uisp one day, should have an
STK500 compatible programmer up and running shortly.

Didn't experience any problems with avr-libc-20010701 when I compiled and
ran a few programs. Thanks for your efforts.

Packet loss from NZ to your server is around 45%.

Cheers,

Jason Kyle

At 04:02 2/07/2001 -0700, you wrote:
>I've just made new releases, available from the usual place:
>
>http://www.amelek.gda.pl/avr/libc/avr-libc-20010701.tar.gz
>http://www.amelek.gda.pl/avr/uisp/uisp-20010701.tar.gz
>
>Please test - thanks.
>
>It might be a good idea to mirror that in some better connected
>place as I can see many restarted downloads in my server logs,
>probably because of high packet loss (TPSA...) from abroad.
>
>BTW, the box is now running (for over a month...) Linux 2.4.x
>with ECN enabled, so in case of problems connecting to it,
>please check if you are not behind a broken firewall
>(see http://gtf.org/garzik/ecn/ for more information).
>
>Marek
>
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Tue Jul 03 05:11:46 2001
Received: from overclockers.zip.com.au ([61.8.3.18] helo=odin.zip.com.au)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15H7Eg-0001dD-00
for <[email-masked]>; Tue, 03 Jul 2001 05:11:46 +1200
Received: from mwp by odin.zip.com.au with local-esmtp (Exim 3.12 #1 (Debian))
id 15H7Cs-0006pY-00; Tue, 03 Jul 2001 03:09:54 +1000
Date: Tue, 3 Jul 2001 03:09:54 +1000 (EST)
From: MWP <[email-masked]>
X-Sender: [email-masked]
To: [email-masked]
Subject: Re: [avr-gcc-list] avr-libc-20010701, uisp-20010701 (also..)
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Just to let you guys know...
Im now using compiled versions of gcc-20010618 and binutils-010608 for
linux with avr-libc-20010701 and everything is working great.

The new GCC has the compiler option -fssa, and while the man page says its
still in devel, it seems to work fine and doesnt create any compiling
errors.
Using -fssa has cut about 80bytes off my 3000byte 8535 prog.

MWP

On Mon, 2 Jul 2001, Jason Kyle wrote:

> Hi Marek,
>
> Tried uisp-20010701 with -datmel option, works fine. Working on how to
> communicate with an STK500 so we can add it to uisp one day, should have an
> STK500 compatible programmer up and running shortly.
>
> Didn't experience any problems with avr-libc-20010701 when I compiled and
> ran a few programs. Thanks for your efforts.
>
> Packet loss from NZ to your server is around 45%.
>
> Cheers,
>
> Jason Kyle
>
> At 04:02 2/07/2001 -0700, you wrote:
> >I've just made new releases, available from the usual place:
> >
> >http://www.amelek.gda.pl/avr/libc/avr-libc-20010701.tar.gz
> >http://www.amelek.gda.pl/avr/uisp/uisp-20010701.tar.gz
> >
> >Please test - thanks.
> >
> >It might be a good idea to mirror that in some better connected
> >place as I can see many restarted downloads in my server logs,
> >probably because of high packet loss (TPSA...) from abroad.
> >
> >BTW, the box is now running (for over a month...) Linux 2.4.x
> >with ECN enabled, so in case of problems connecting to it,
> >please check if you are not behind a broken firewall
> >(see http://gtf.org/garzik/ecn/ for more information).
> >
> >Marek
> >
> >
> >_______________________________________________
> >avr-gcc-list mailing list
> >[email-masked]
> >http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Mon Jul 02 23:58:43 2001
Received: from moutvdom01.kundenserver.de ([195.20.224.200])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15H2Li-0001QM-00
for <[email-masked]>; Mon, 02 Jul 2001 23:58:43 +1200
Received: from [195.20.224.208] (helo=mrvdom01.schlund.de)
by moutvdom01.kundenserver.de with esmtp (Exim 2.12 #2)
id 15H2Jt-0000F8-00
for [email-masked]; Mon, 2 Jul 2001 13:56:49 +0200
Received: from pd954fea6.dip.t-dialin.net ([217.84.254.166] helo=adams.pdp7.org)
by mrvdom01.schlund.de with esmtp (Exim 2.12 #2)
id 15H2IE-0008Jd-00
for [email-masked]; Mon, 2 Jul 2001 13:55:06 +0200
Received: from thomas by adams.pdp7.org with local (Exim 3.22 #1 (Debian))
id 15H2I9-0000fX-00
for <[email-masked]>; Mon, 02 Jul 2001 13:55:01 +0200
Date: Mon, 2 Jul 2001 13:55:01 +0200
From: Thomas Strathmann <[email-masked]>
To: AVR-gcc Liste <[email-masked]>
Subject: Re: [avr-gcc-list] avr-libc-20010701, uisp-20010701
Message-ID: <20010702135501.A2556@adams>
References: <E15GkS2-0003WE-00@mm>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <E15GkS2-0003WE-00@mm>
User-Agent: Mutt/1.3.18i
X-Operating-System: Debian GNU/Linux
X-Homepage: http://www.tstrathmann.de
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Howdy,

Just wanted to announce that I've mirrored these two
versions at

http://www.tstrathmann.de/mirrors

Bye,
Thomas

--
Thomas S. Strathmann
http://www.tstrathmann.de

From [email-masked] Tue Jul 03 09:54:14 2001
Received: from maile.telia.com ([194.22.190.16])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15HBe1-0001t7-00
for <[email-masked]>; Tue, 03 Jul 2001 09:54:13 +1200
Received: from d1o926.telia.com (d1o926.telia.com [213.66.172.241])
by maile.telia.com (8.11.2/8.11.0) with ESMTP id f62LqKN04809
for <[email-masked]>; Mon, 2 Jul 2001 23:52:21 +0200 (CEST)
Received: from jesper (h152n2fls34o926.telia.com [217.208.35.152])
by d1o926.telia.com (8.10.2/8.10.1) with SMTP id f62LqKA23905
for <[email-masked]>; Mon, 2 Jul 2001 23:52:20 +0200 (CEST)
Message-ID: <00bb01c10341$56c9ae20$65656565@jesper>
From: "Jesper Hansen" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]> <003501c0f567$4ea92b40$65656565@jesper>
Subject: Re: [avr-gcc-list] AVR programmer, was: SPI debugging code
Date: Mon, 2 Jul 2001 23:52:28 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all.

Sometime ago I promised to release my AVR programmer for Windows.
It took a little longer that expected, but now it's done.
It's still lacking features like fuses (simply because I don't use them),
but it has
a few other nice features like a built in serial terminal. It also has a
special SPI
terminal mode, where you can communicate with your AVR target using the
SPI channel.

Again, it's nothing fancy, but it works great for me.

You'll find it at :
http://www.myplace.nu/avr/yaap/index.htm

/jesper
http://www.yampp.com

From [email-masked] Tue Jul 03 19:57:16 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15HL3b-0002GJ-00
for <[email-masked]>; Tue, 03 Jul 2001 19:57:15 +1200
Received: from oTRIs.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id JAA11301
for <[email-masked]>; Tue, 3 Jul 2001 09:55:25 +0200
Message-ID: <[email-masked]>
Date: Tue, 03 Jul 2001 10:00:44 +0200
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
References: <E15GkS2-0003WE-00@mm>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] New Wininstall for avr-libc 20010701 was Re: avr-libc-20010701,
uisp-20010701
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello

Marek Michalkiewicz wrote:
>
> I've just made new releases, available from the usual place:
> http://www.amelek.gda.pl/avr/libc/avr-libc-20010701.tar.gz

I made a wininstall from this. You can get it from:

http://combio.de/avr/avr-libc-20010701-wininstall.tar.gz

Regards

Gunnar Henne

From [email-masked] Tue Jul 03 21:18:21 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15HMK5-0002K5-00
for <[email-masked]>; Tue, 03 Jul 2001 21:18:21 +1200
Received: (qmail 23818 invoked from network); 3 Jul 2001 08:19:31 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 3 Jul 2001 08:19:31 -0000
Received: from fri.uni-lj.si ([193.2.76.118]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with ESMTP id AAA13258;
Tue, 3 Jul 2001 11:05:44 +0200
Message-ID: <[email-masked]>
Date: Tue, 03 Jul 2001 11:15:08 +0200
From: [email-masked] (Robert Rozman)
X-Mailer: Mozilla 4.51 [sl] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: Jesper Hansen <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] AVR programmer, was: SPI debugging code
References: <[email-masked]> <003501c0f567$4ea92b40$65656565@jesper> <00bb01c10341$56c9ae20$65656565@jesper>
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

is there any possibility to use it on ATMega163?

And also is debugging code (on the Atmel side) included in yampp sources or
somewhere else ?

Thanks in advance,

Robert Rozman

Jesper Hansen je napisal:

> Hi all.
>
> Sometime ago I promised to release my AVR programmer for Windows.
> It took a little longer that expected, but now it's done.
> It's still lacking features like fuses (simply because I don't use them),
> but it has
> a few other nice features like a built in serial terminal. It also has a
> special SPI
> terminal mode, where you can communicate with your AVR target using the
> SPI channel.
>
> Again, it's nothing fancy, but it works great for me.
>
> You'll find it at :
> http://www.myplace.nu/avr/yaap/index.htm
>
> /jesper
> http://www.yampp.com
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Tue Jul 03 21:26:22 2001
Received: from mailg.telia.com ([194.22.194.26])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15HMRp-0002Kp-00
for <[email-masked]>; Tue, 03 Jul 2001 21:26:21 +1200
Received: from d1o926.telia.com (d1o926.telia.com [213.66.172.241])
by mailg.telia.com (8.11.2/8.11.0) with ESMTP id f639OOv24602;
Tue, 3 Jul 2001 11:24:24 +0200 (CEST)
Received: from jesper (h152n2fls34o926.telia.com [217.208.35.152])
by d1o926.telia.com (8.10.2/8.10.1) with SMTP id f639ONA01917;
Tue, 3 Jul 2001 11:24:23 +0200 (CEST)
Message-ID: <009101c103a2$04a5e210$65656565@jesper>
From: "Jesper Hansen" <[email-masked]>
To: "Robert Rozman" <[email-masked]>
Cc: <[email-masked]>
References: <[email-masked]> <003501c0f567$4ea92b40$65656565@jesper> <00bb01c10341$56c9ae20$65656565@jesper> <[email-masked]>
Subject: Re: [avr-gcc-list] AVR programmer, was: SPI debugging code
Date: Tue, 3 Jul 2001 11:24:39 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Robert,

So far, I haven't got any mega161's or 163's to test it on.
As soon as I get some, I'll update the program.

There's no debugging code in the yampp code.
The example I included just show how it may be used to test
a system, by using a small command interpreter.
As it is now, the PC has to initiate communications, so the
target can't just start talking, but this could be solved by using
a kind of polling with null-messages.
This would also work better on a target that can use interrupt
driven SPI.

/Jesper

----- Original Message -----
From: "Robert Rozman" <[email-masked]>
To: "Jesper Hansen" <[email-masked]>
Cc: <[email-masked]>
Sent: Tuesday, July 03, 2001 11:15 AM
Subject: Re: [avr-gcc-list] AVR programmer, was: SPI debugging code

> Hello,
>
> is there any possibility to use it on ATMega163?
>
> And also is debugging code (on the Atmel side) included in yampp sources
or
> somewhere else ?
>
> Thanks in advance,
>
> Robert Rozman
>
> Jesper Hansen je napisal:
>
> > Hi all.
> >
> > Sometime ago I promised to release my AVR programmer for Windows.
> > It took a little longer that expected, but now it's done.
> > It's still lacking features like fuses (simply because I don't use
them),
> > but it has
> > a few other nice features like a built in serial terminal. It also has a
> > special SPI
> > terminal mode, where you can communicate with your AVR target using the
> > SPI channel.
> >
> > Again, it's nothing fancy, but it works great for me.
> >
> > You'll find it at :
> > http://www.myplace.nu/avr/yaap/index.htm
> >
> > /jesper
> > http://www.yampp.com
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > [email-masked]
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Thu Jul 05 02:56:51 2001
Received: from stud4.tuwien.ac.at ([193.170.75.21] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Ho5B-0003Xk-00
for <[email-masked]>; Thu, 05 Jul 2001 02:56:50 +1200
Received: from stud4.tuwien.ac.at ([email-masked] [193.170.75.21])
by stud4.tuwien.ac.at (8.9.3 (PHNE_22672)/8.9.3) with ESMTP id QAA21739
for <[email-masked]>; Wed, 4 Jul 2001 16:55:06 +0200 (METDST)
Date: Wed, 4 Jul 2001 16:55:06 +0200 (METDST)
From: Christian Troedhandl <[email-masked]>
To: AVR GCC List <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] undefined reference to 'r15' with inline assembler
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I am trying to use lds and sts instructions with inline assembler.
The following code results in an error in the linking stage:
(gcc version 3.0 20010605 (prerelease) (linux RPM on combio.de))
------------------
#include <io.h>

uint8_t foo;

int main(void)
{
uint8_t i;

asm("lds %0, %1": "=d" (i): "label"(foo));
}
------------------

This generates the following assembler code:
------------------
main:
/* prologue: frame size=1 */
ldi r28,lo8(__stack - 1)
ldi r29,hi8(__stack - 1)
out __SP_H__,r29
out __SP_L__,r28
/* prologue end (size=4) */
lds r15,foo
/* #APP */
lds r24, r15
/* #NOAPP */
std Y+1,r24
/* epilogue: frame size=1 */
__stop_progIi__:
rjmp __stop_progIi__
-------------------

My question: Why does the compiler include the line "lds r24, r15" before
the inline function and why is r15 passed as second parameter to the
lds instruction and not "foo" ?
What would be the correct way to supply lds with a label?

Christian

From [email-masked] Thu Jul 05 02:36:20 2001
Received: from stud4.tuwien.ac.at ([193.170.75.21] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15HnlL-0003WB-00
for <[email-masked]>; Thu, 05 Jul 2001 02:36:19 +1200
Received: from stud4.tuwien.ac.at ([email-masked] [193.170.75.21])
by stud4.tuwien.ac.at (8.9.3 (PHNE_22672)/8.9.3) with ESMTP id QAA16737
for <[email-masked]>; Wed, 4 Jul 2001 16:34:15 +0200 (METDST)
Date: Wed, 4 Jul 2001 16:34:15 +0200 (METDST)
From: Christian Troedhandl <[email-masked]>
To: AVR GCC List <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] undefined reference to 'r15' with inline assembler
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I am trying to use lds and sts instructions with inline assembler.
The following code results in an error in the linking stage:
(gcc version 3.0 20010605 (prerelease) (linux RPM on combio.de))
------------------
#include <io.h>

uint8_t foo;

int main(void)
{
uint8_t i;

asm("lds %0, %1": "=d" (i): "label"(foo));
}
------------------

This generates the following assembler code:
------------------
main:
/* prologue: frame size=1 */
ldi r28,lo8(__stack - 1)
ldi r29,hi8(__stack - 1)
out __SP_H__,r29
out __SP_L__,r28
/* prologue end (size=4) */
lds r15,foo
/* #APP */
lds r24, r15
/* #NOAPP */
std Y+1,r24
/* epilogue: frame size=1 */
__stop_progIi__:
rjmp __stop_progIi__
-------------------

My question: Why does the compiler include the line "lds r24, r15" before
the inline function and why is r15 passed as second parameter to the
lds instruction and not "foo" ?
What would be the correct way to supply lds with a label?

Christian

From [email-masked] Thu Jul 05 20:29:39 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15I4W2-0004Gl-00
for <[email-masked]>; Thu, 05 Jul 2001 20:29:38 +1200
Received: (qmail 2938 invoked from network); 5 Jul 2001 07:31:03 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 5 Jul 2001 07:31:03 -0000
Received: from robi ([193.2.76.192]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with SMTP id AAA9785;
Thu, 5 Jul 2001 10:17:12 +0200
Message-ID: <002f01c1052d$3aec5ac0$0200a8c0@robi>
From: [email-masked] (Robert Rozman)
To: "Jesper Hansen" <[email-masked]>
Cc: <[email-masked]>
References: <[email-masked]> <003501c0f567$4ea92b40$65656565@jesper> <00bb01c10341$56c9ae20$65656565@jesper> <[email-masked]> <009101c103a2$04a5e210$65656565@jesper>
Subject: Re: [avr-gcc-list] AVR programmer, was: SPI debugging code
Date: Thu, 5 Jul 2001 10:33:55 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I've tried SPI terminal and it's surely nice thing. ATMega163 programming
doesn't work (it's detected as 'ATMega103_old') but despite that SPI
terminal is really useful. I've tried to make target code with use of
hardware SPI and interrupt but didn't succeed.

If there anyone makes this, I'd surely like to have that solution. And also
a possibility to switch terminal to continous byte polling, so target can
output messages continously - it's like possibility of logging more info
about what target is doing.

Regards,

Robert Rozman
[email-masked]
----- Original Message -----
From: "Jesper Hansen" <[email-masked]>
To: "Robert Rozman" <[email-masked]>
Cc: <[email-masked]>
Sent: 3. julij 2001 11:24
Subject: Re: [avr-gcc-list] AVR programmer, was: SPI debugging code

> Hi Robert,
>
> So far, I haven't got any mega161's or 163's to test it on.
> As soon as I get some, I'll update the program.
>
> There's no debugging code in the yampp code.
> The example I included just show how it may be used to test
> a system, by using a small command interpreter.
> As it is now, the PC has to initiate communications, so the
> target can't just start talking, but this could be solved by using
> a kind of polling with null-messages.
> This would also work better on a target that can use interrupt
> driven SPI.
>
> /Jesper
>
> ----- Original Message -----
> From: "Robert Rozman" <[email-masked]>
> To: "Jesper Hansen" <[email-masked]>
> Cc: <[email-masked]>
> Sent: Tuesday, July 03, 2001 11:15 AM
> Subject: Re: [avr-gcc-list] AVR programmer, was: SPI debugging code
>
>
> > Hello,
> >
> > is there any possibility to use it on ATMega163?
> >
> > And also is debugging code (on the Atmel side) included in yampp sources
> or
> > somewhere else ?
> >
> > Thanks in advance,
> >
> > Robert Rozman
> >
> > Jesper Hansen je napisal:
> >
> > > Hi all.
> > >
> > > Sometime ago I promised to release my AVR programmer for Windows.
> > > It took a little longer that expected, but now it's done.
> > > It's still lacking features like fuses (simply because I don't use
> them),
> > > but it has
> > > a few other nice features like a built in serial terminal. It also has
a
> > > special SPI
> > > terminal mode, where you can communicate with your AVR target using
the
> > > SPI channel.
> > >
> > > Again, it's nothing fancy, but it works great for me.
> > >
> > > You'll find it at :
> > > http://www.myplace.nu/avr/yaap/index.htm
> > >
> > > /jesper
> > > http://www.yampp.com
> > >
> > > _______________________________________________
> > > avr-gcc-list mailing list
> > > [email-masked]
> > > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
> >
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Fri Jul 06 07:54:38 2001
Received: from mailf.telia.com ([194.22.194.25])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15IFCv-0004kT-00
for <[email-masked]>; Fri, 06 Jul 2001 07:54:37 +1200
Received: from d1o926.telia.com (d1o926.telia.com [213.66.172.241])
by mailf.telia.com (8.11.2/8.11.0) with ESMTP id f65Jqw306045;
Thu, 5 Jul 2001 21:52:58 +0200 (CEST)
Received: from jesper (h152n2fls34o926.telia.com [217.208.35.152])
by d1o926.telia.com (8.10.2/8.10.1) with SMTP id f65JqvA26921;
Thu, 5 Jul 2001 21:52:57 +0200 (CEST)
Message-ID: <000301c1058c$28f0e200$65656565@jesper>
From: "Jesper Hansen" <[email-masked]>
To: "Robert Rozman" <[email-masked]>
Cc: <[email-masked]>
References: <[email-masked]> <003501c0f567$4ea92b40$65656565@jesper> <00bb01c10341$56c9ae20$65656565@jesper> <[email-masked]> <009101c103a2$04a5e210$65656565@jesper> <002f01c1052d$3aec5ac0$0200a8c0@robi>
Subject: Re: [avr-gcc-list] AVR programmer, was: SPI debugging code
Date: Thu, 5 Jul 2001 17:35:10 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I've added a quick fix update on the site :
http://www.myplace.nu/avr/yaap/index.htm

There's some experimental code added for handling mega161 and mega163.
Give it a try and let me know if it works.

I'll add an adjustable poll frequency feature to handle target messages.

If anyone makes a HW SPI handler, please send it to me, and I'll include
it in the distribution.

/Jesper

----- Original Message -----
From: "Robert Rozman" <[email-masked]>
To: "Jesper Hansen" <[email-masked]>
Cc: <[email-masked]>
Sent: Thursday, July 05, 2001 10:33 AM
Subject: Re: [avr-gcc-list] AVR programmer, was: SPI debugging code

> Hello,
>
> I've tried SPI terminal and it's surely nice thing. ATMega163 programming
> doesn't work (it's detected as 'ATMega103_old') but despite that SPI
> terminal is really useful. I've tried to make target code with use of
> hardware SPI and interrupt but didn't succeed.
>
> If there anyone makes this, I'd surely like to have that solution. And
also
> a possibility to switch terminal to continous byte polling, so target can
> output messages continously - it's like possibility of logging more info
> about what target is doing.
>
>
>
> Regards,
>
> Robert Rozman
> [email-masked]
> ----- Original Message -----
> From: "Jesper Hansen" <[email-masked]>
> To: "Robert Rozman" <[email-masked]>
> Cc: <[email-masked]>
> Sent: 3. julij 2001 11:24
> Subject: Re: [avr-gcc-list] AVR programmer, was: SPI debugging code
>
>
> > Hi Robert,
> >
> > So far, I haven't got any mega161's or 163's to test it on.
> > As soon as I get some, I'll update the program.
> >
> > There's no debugging code in the yampp code.
> > The example I included just show how it may be used to test
> > a system, by using a small command interpreter.
> > As it is now, the PC has to initiate communications, so the
> > target can't just start talking, but this could be solved by using
> > a kind of polling with null-messages.
> > This would also work better on a target that can use interrupt
> > driven SPI.
> >
> > /Jesper
> >
> > ----- Original Message -----
> > From: "Robert Rozman" <[email-masked]>
> > To: "Jesper Hansen" <[email-masked]>
> > Cc: <[email-masked]>
> > Sent: Tuesday, July 03, 2001 11:15 AM
> > Subject: Re: [avr-gcc-list] AVR programmer, was: SPI debugging code
> >
> >
> > > Hello,
> > >
> > > is there any possibility to use it on ATMega163?
> > >
> > > And also is debugging code (on the Atmel side) included in yampp
sources
> > or
> > > somewhere else ?
> > >
> > > Thanks in advance,
> > >
> > > Robert Rozman
> > >
> > > Jesper Hansen je napisal:
> > >
> > > > Hi all.
> > > >
> > > > Sometime ago I promised to release my AVR programmer for Windows.
> > > > It took a little longer that expected, but now it's done.
> > > > It's still lacking features like fuses (simply because I don't use
> > them),
> > > > but it has
> > > > a few other nice features like a built in serial terminal. It also
has
> a
> > > > special SPI
> > > > terminal mode, where you can communicate with your AVR target using
> the
> > > > SPI channel.
> > > >
> > > > Again, it's nothing fancy, but it works great for me.
> > > >
> > > > You'll find it at :
> > > > http://www.myplace.nu/avr/yaap/index.htm
> > > >
> > > > /jesper
> > > > http://www.yampp.com
> > > >
> > > > _______________________________________________
> > > > avr-gcc-list mailing list
> > > > [email-masked]
> > > > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
> > >
> >
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > [email-masked]
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Fri Jul 06 19:56:39 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15IQTe-0005Ch-00
for <[email-masked]>; Fri, 06 Jul 2001 19:56:38 +1200
Received: (qmail 28485 invoked from network); 6 Jul 2001 06:58:08 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 6 Jul 2001 06:58:08 -0000
Received: from robi ([193.2.76.192]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with SMTP id AAA20639;
Fri, 6 Jul 2001 09:44:14 +0200
Message-ID: <001b01c105f1$cebc7900$e9cefea9@robi>
From: [email-masked] (Robert Rozman)
To: "Jesper Hansen" <[email-masked]>,
"Robert Rozman" <[email-masked]>
Cc: <[email-masked]>
References: <[email-masked]> <003501c0f567$4ea92b40$65656565@jesper> <00bb01c10341$56c9ae20$65656565@jesper> <[email-masked]> <009101c103a2$04a5e210$65656565@jesper> <002f01c1052d$3aec5ac0$0200a8c0@robi> <000301c1058c$28f0e200$65656565@jesper>
Subject: Re: [avr-gcc-list] AVR programmer, was: SPI debugging code
Date: Fri, 6 Jul 2001 10:01:04 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I've tried fix, but it doesn't work. It suggests that device is either
disconnected or unpowered. Ponyprog in same conditions works.

I'm really happy to be able to use SPI terminal and I'll be happy to help
with ATMEga163 tests. So fell free to give me another test.

Regards,

Robert Rozman
[email-masked]
----- Original Message -----
From: "Jesper Hansen" <[email-masked]>
To: "Robert Rozman" <[email-masked]>
Cc: <[email-masked]>
Sent: 5. julij 2001 17:35
Subject: Re: [avr-gcc-list] AVR programmer, was: SPI debugging code

> I've added a quick fix update on the site :
> http://www.myplace.nu/avr/yaap/index.htm
>
> There's some experimental code added for handling mega161 and mega163.
> Give it a try and let me know if it works.
>
> I'll add an adjustable poll frequency feature to handle target messages.
>
> If anyone makes a HW SPI handler, please send it to me, and I'll include
> it in the distribution.
>
> /Jesper
>
>
> ----- Original Message -----
> From: "Robert Rozman" <[email-masked]>
> To: "Jesper Hansen" <[email-masked]>
> Cc: <[email-masked]>
> Sent: Thursday, July 05, 2001 10:33 AM
> Subject: Re: [avr-gcc-list] AVR programmer, was: SPI debugging code
>
>
> > Hello,
> >
> > I've tried SPI terminal and it's surely nice thing. ATMega163
programming
> > doesn't work (it's detected as 'ATMega103_old') but despite that SPI
> > terminal is really useful. I've tried to make target code with use of
> > hardware SPI and interrupt but didn't succeed.
> >
> > If there anyone makes this, I'd surely like to have that solution. And
> also
> > a possibility to switch terminal to continous byte polling, so target
can
> > output messages continously - it's like possibility of logging more info
> > about what target is doing.
> >
> >
> >
> > Regards,
> >
> > Robert Rozman
> > [email-masked]
> > ----- Original Message -----
> > From: "Jesper Hansen" <[email-masked]>
> > To: "Robert Rozman" <[email-masked]>
> > Cc: <[email-masked]>
> > Sent: 3. julij 2001 11:24
> > Subject: Re: [avr-gcc-list] AVR programmer, was: SPI debugging code
> >
> >
> > > Hi Robert,
> > >
> > > So far, I haven't got any mega161's or 163's to test it on.
> > > As soon as I get some, I'll update the program.
> > >
> > > There's no debugging code in the yampp code.
> > > The example I included just show how it may be used to test
> > > a system, by using a small command interpreter.
> > > As it is now, the PC has to initiate communications, so the
> > > target can't just start talking, but this could be solved by using
> > > a kind of polling with null-messages.
> > > This would also work better on a target that can use interrupt
> > > driven SPI.
> > >
> > > /Jesper
> > >
> > > ----- Original Message -----
> > > From: "Robert Rozman" <[email-masked]>
> > > To: "Jesper Hansen" <[email-masked]>
> > > Cc: <[email-masked]>
> > > Sent: Tuesday, July 03, 2001 11:15 AM
> > > Subject: Re: [avr-gcc-list] AVR programmer, was: SPI debugging code
> > >
> > >
> > > > Hello,
> > > >
> > > > is there any possibility to use it on ATMega163?
> > > >
> > > > And also is debugging code (on the Atmel side) included in yampp
> sources
> > > or
> > > > somewhere else ?
> > > >
> > > > Thanks in advance,
> > > >
> > > > Robert Rozman
> > > >
> > > > Jesper Hansen je napisal:
> > > >
> > > > > Hi all.
> > > > >
> > > > > Sometime ago I promised to release my AVR programmer for Windows.
> > > > > It took a little longer that expected, but now it's done.
> > > > > It's still lacking features like fuses (simply because I don't use
> > > them),
> > > > > but it has
> > > > > a few other nice features like a built in serial terminal. It also
> has
> > a
> > > > > special SPI
> > > > > terminal mode, where you can communicate with your AVR target
using
> > the
> > > > > SPI channel.
> > > > >
> > > > > Again, it's nothing fancy, but it works great for me.
> > > > >
> > > > > You'll find it at :
> > > > > http://www.myplace.nu/avr/yaap/index.htm
> > > > >
> > > > > /jesper
> > > > > http://www.yampp.com
> > > > >
> > > > > _______________________________________________
> > > > > avr-gcc-list mailing list
> > > > > [email-masked]
> > > > > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
> > > >
> > >
> > >
> > > _______________________________________________
> > > avr-gcc-list mailing list
> > > [email-masked]
> > > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
> >
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > [email-masked]
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Sat Jul 07 14:33:03 2001
Received: from avocet.mail.pas.earthlink.net ([207.217.121.50])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Ihu2-0005w6-00
for <[email-masked]>; Sat, 07 Jul 2001 14:33:02 +1200
Received: from earthlink.net (1Cust218.tnt1.brownwood.tx.da.uu.net [63.28.230.218])
by avocet.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id TAA16400
for <[email-masked]>; Fri, 6 Jul 2001 19:31:30 -0700 (PDT)
Message-ID: <[email-masked]>
Date: Fri, 06 Jul 2001 21:28:22 -0500
From: Dale Seaburg <[email-masked]>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: avg-gcc list <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Loader problems
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I'm using a recent download from Gunnar's site. Can't remember the
exact date, but the avr-gcc --version returns 3.1 and the avr-ld
--version returns 2.11.90.

Here's the problem. When I feed the ld with:

/opt/avrgcc/avr/bin/ld sqrtMike.o sqrtJack.o gcctest9.o \
uart.o timer.o -Wl \
-mmcu=atmega103 -o gcctest9.elf

I get the following error message:

unrecognised emulation mode: mcu=atmega103
Supported emulations: avr85xx avr1200 avr23xx avr44x4 avr4433
avrmega603 avrmega103 avrmega161

The compile didn't complain about the -mmcu=atmega103, why does the
loader? What am I doing wrong?

Thanks,

Dale Seaburg

From [email-masked] Sun Jul 08 23:45:49 2001
Received: from note.orchestra.cse.unsw.edu.au ([129.94.242.29])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15JD0W-0000I0-00
for <[email-masked]>; Sun, 08 Jul 2001 23:45:49 +1200
Received: From rothaus (for [email-masked]) With LocalMail ;
Sun, 8 Jul 2001 21:44:24 +1000
From: Harvey Tuch <[email-masked]>
To: [email-masked]
Date: Sun, 8 Jul 2001 21:44:24 +1000
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Subject: [avr-gcc-list] GCC error
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I get the following when I try to use avr-gcc to assemble some code:

avr-gcc -Wall -nostartfiles -nostdinc -c boot.S
avr-gcc -Wall -nostartfiles -nostdinc -c i2c-slave.S
i2c-slave.S: Assembler messages:
i2c-slave.S:534: Internal error, aborting at symbols.c line 1811 in S_SET_SEGMENT
Please report this bug.
make: *** [i2c_slave.o] Error 1

Any idea why (line 534 is the last line of the file i2c-slave.S preceded
by a line containing a RET instruction)?

I am using GCC 2.95.2 and binutils-2.9.5.0.13 with patches
binutils-2.9.5.0.13-avr-patch-1.1, gcc-core-2.95.2-avr-patch-1.1,
and gcc-core-2.95.2-avr-patch-1.2.

Thanks,
Harvey
--
-----------------------------------------------------------------------
Harvey Tuch [email-masked]
-----------------------------------------------------------------------

From [email-masked] Mon Jul 09 03:23:32 2001
Received: from mail.tor.axxent.ca ([209.250.128.26])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15JGPD-0000Qw-00
for <[email-masked]>; Mon, 09 Jul 2001 03:23:32 +1200
Received: from digicom (dial-0150.tor.axxent.ca [216.249.0.150])
by mail.tor.axxent.ca (8.11.0/8.9.3) with ESMTP id f68FM5u10771
for <[email-masked]>; Sun, 8 Jul 2001 11:22:06 -0400 (EDT)
Received: from cwall by digicom with local (Exim 3.12 #1 (Debian))
id 15JGOK-0000Bv-00
for <[email-masked]>; Sun, 08 Jul 2001 11:22:36 -0400
Date: Sun, 8 Jul 2001 11:22:35 -0400
From: Carl Wall <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] GCC error
Message-ID: <[email-masked]>
Mail-Followup-To: [email-masked]
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Sun, Jul 08, 2001 at 09:44:24PM +1000
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

try the newer version at http://combio.de/avr/index what you have is old
Cheers
Carl
On Sun, Jul 08, 2001 at 09:44:24PM +1000, Harvey Tuch wrote:
> Hi,
>
> I get the following when I try to use avr-gcc to assemble some code:
>
> avr-gcc -Wall -nostartfiles -nostdinc -c boot.S
> avr-gcc -Wall -nostartfiles -nostdinc -c i2c-slave.S
> i2c-slave.S: Assembler messages:
> i2c-slave.S:534: Internal error, aborting at symbols.c line 1811 in S_SET_SEGMENT
> Please report this bug.
> make: *** [i2c_slave.o] Error 1
>
> Any idea why (line 534 is the last line of the file i2c-slave.S preceded
> by a line containing a RET instruction)?
>
> I am using GCC 2.95.2 and binutils-2.9.5.0.13 with patches
> binutils-2.9.5.0.13-avr-patch-1.1, gcc-core-2.95.2-avr-patch-1.1,
> and gcc-core-2.95.2-avr-patch-1.2.
>
> Thanks,
> Harvey
> --
> -----------------------------------------------------------------------
> Harvey Tuch [email-masked]
> -----------------------------------------------------------------------
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
Carl A. Wall VE3APY Toronto, Ontario, Canada
"Created on DEBIAN 2.2, an alternative to Microsoft Systems
and a GNU/Linux distribution of Open Source programming"

From [email-masked] Mon Jul 09 05:42:04 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15JIZH-0000WT-00
for <[email-masked]>; Mon, 09 Jul 2001 05:42:04 +1200
Received: from mm ([192.168.1.1] ident=mail)
by alf.amelek.gda.pl with esmtp (Exim 3.22 #1 (Debian))
id 15JIXO-0007pR-00
for <[email-masked]>; Sun, 08 Jul 2001 19:40:06 +0200
Received: from marekm by mm with local (Exim 3.22 #1 (Debian))
id 15JIXN-0003Ig-00
for <[email-masked]>; Sun, 08 Jul 2001 19:40:05 +0200
To: [email-masked]
Date: Sun, 8 Jul 2001 19:40:05 +0200 (CEST)
X-Mailer: ELM [version 2.4ME+ PL89 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Message-Id: <E15JIXN-0003Ig-00@mm>
From: Marek Michalkiewicz <[email-masked]>
Subject: [avr-gcc-list] avr-libc-20010708
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Changes:

Add atan(), contributed by Reiner Patommel.
Fix atoi() whitespace handling, reported by Jochen Pernsteiner.
Alternative version of bit_is_set/bit_is_clear macros that can
make better optimized code, suggested by Thomas Husterer.
Fix bug in __fixsfsi for numbers <1.0, thanks to Michael Stumpf.
Fix fplib/strtod.S and stdlib/atoi.S to not call __mulhi3, call a new
optimized function __mulhi_const_10 instead. Use XCALL to call any
external functions (might not be reachable for RCALL on >8K devices).

Download:

http://www.amelek.gda.pl/avr/libc/avr-libc-20010708.tar.gz

Note: ECN disabled for a few days, as www.avrfreaks.net appears to be
behind a broken firewall and otherwise I wouldn't be able to e-mail
them about this (MX on the same machine) and receive a reply...

Marek

From [email-masked] Sat Jul 07 11:02:16 2001
Received: from adsl-nrp8-c8b73a51.sao.terra.com.br ([200.183.58.81])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Iec0-0005nK-00
for <[email-masked]>; Sat, 07 Jul 2001 11:02:14 +1200
Received: from milla.autsens.localnet ([192.168.131.3] ident=mail)
by adsl-nrp8-C8B73A51.sao.terra.com.br with esmtp (Exim 3.12 #1 (Debian))
id 15IeZg-0001XA-00
for <[email-masked]>; Fri, 06 Jul 2001 22:59:48 +0000
Received: from betoes by milla.autsens.localnet with local (Exim 3.12 #1 (Debian))
id 15IeZg-0005KZ-00
for <[email-masked]>; Fri, 06 Jul 2001 19:59:48 -0300
Date: Fri, 6 Jul 2001 19:59:48 -0300
From: =?iso-8859-1?Q?Jos=E9_Roberto_B=2E_de_A=2E_Monteiro?= <[email-masked]>
Cc: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Initializers and prog_mem
Message-ID: <[email-masked]>
Reply-To: [email-masked]
References: <[email-masked]> <[email-masked]> <[email-masked]> <007c01c101b1$62cf5a80$65656565@jesper>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <007c01c101b1$62cf5a80$65656565@jesper>; from [email-masked] on Sun, Jul 01, 2001 at 12:09:46AM +0200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello list!

I am using AVR microcontrolers in my school projects, using gcc, binutils, etc... it is very nice. I have a question related to embedded systems (or more specifically, microcontrolers) and I appreciate if someone could help me...

Does anybody know if there is a porting of gcc and binutils to MSP430 series of microcontrollers ? It is from Texas Instruments. This micro-c has a RISC architecture and it seems to be a good alternative to AVR...

Thanks...

From [email-masked] Mon Jul 09 22:02:20 2001
Received: from [62.153.241.228] (helo=moses.peppercon.de ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15JXrv-0001DO-00
for <[email-masked]>; Mon, 09 Jul 2001 22:02:20 +1200
Received: from rahel (rahel.peppercon.de [192.168.1.26])
by moses.peppercon.de (8.9.3/8.9.3) with ESMTP id MAA12490
for <[email-masked]>; Mon, 9 Jul 2001 12:00:59 +0200
From: "Swen Anderson" <[email-masked]>
To: [email-masked]
Date: Mon, 9 Jul 2001 12:00:46 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Reply-to: [email-masked]
Message-ID: <3B499CEE.24470.976A7A@localhost>
Priority: normal
X-mailer: Pegasus Mail for Win32 (v3.12cDE)
Subject: [avr-gcc-list] support for atmega161??
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I want use the avr-gcc for a project with
the atmega161.
Does the avr-gcc support this MCU type?

Regards
Swen Anderson

From [email-masked] Tue Jul 10 11:12:36 2001
Received: from mailb.telia.com ([194.22.194.6] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15JkCh-0001kf-00
for <[email-masked]>; Tue, 10 Jul 2001 11:12:35 +1200
Received: from d1o70.telia.com (d1o70.telia.com [62.20.148.241])
by mailb.telia.com (8.9.3/8.9.3) with ESMTP id BAA27060;
Tue, 10 Jul 2001 01:11:13 +0200 (CEST)
Received: from jesper (t4o70p53.telia.com [62.20.149.173])
by d1o70.telia.com (8.10.2/8.10.1) with SMTP id f69NBCR02533;
Tue, 10 Jul 2001 01:11:12 +0200 (CEST)
Message-ID: <002501c108cc$83bdd010$65656565@jesper>
From: "Jesper Hansen" <[email-masked]>
To: "Robert Rozman" <[email-masked]>
Cc: <[email-masked]>
References: <[email-masked]> <003501c0f567$4ea92b40$65656565@jesper> <00bb01c10341$56c9ae20$65656565@jesper> <[email-masked]> <009101c103a2$04a5e210$65656565@jesper> <002f01c1052d$3aec5ac0$0200a8c0@robi> <000301c1058c$28f0e200$65656565@jesper> <001b01c105f1$cebc7900$e9cefea9@robi>
Subject: Re: [avr-gcc-list] AVR programmer, was: SPI debugging code
Date: Tue, 10 Jul 2001 01:11:27 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Oopps,

I had forgotten to include the new INI file in the ZIP archive for version
0.1b.
Not only would 161's and 163's not work, but it even broke the working
mega103's.
The new INI file is included below. Replace the old INI file with this one,
and
mega103's will work again.
And - hopefully, it will work with the 161/163.

/Jesper

YAAP.INI file :

; supported devices

[Devices]
Dev1=AT90S1200
Dev2=ATtiny12
Dev3=ATtiny15
;Dev4=ATtiny22
Dev5=AT90S2313
Dev6=AT90S2323
Dev7=AT90S2333
Dev8=AT90S2343
Dev9=AT90S4414
Dev10=AT90S4433
Dev11=AT90S4434
Dev12=AT90S8515
Dev13=AT90S8535
Dev14=ATmega103
Dev15=ATmega103_Old
; these two are experimental
Dev16=ATmega161
Dev17=ATmega161

;****

[AT90S1200]
ProgramSize=1024
DataSize=64
Signature=0x9001
Algorithm=0
Fuses=0

[ATtiny12]
ProgramSize=1024
DataSize=64
Signature=0x9005
Algorithm=0
Fuses=0

[ATtiny15]
ProgramSize=1024
DataSize=64
Signature=0x9006
Algorithm=0
Fuses=0

;****

[AT90S2313]
ProgramSize=2048
DataSize=128
Signature=0x9101
Algorithm=0
Fuses=0

[AT90S2323]
ProgramSize=2048
DataSize=128
Signature=0x9102
Algorithm=0
Fuses=0

[AT90S2333]
ProgramSize=2048
DataSize=128
Signature=0x9105
Algorithm=0
Fuses=0

[AT90S2343]
ProgramSize=2048
DataSize=128
Signature=0x9103
Algorithm=0
Fuses=0

;****

[AT90S4414]
ProgramSize=4096
DataSize=256
Signature=0x9201
Algorithm=0
Fuses=0

[AT90S4433]
ProgramSize=4096
DataSize=256
Signature=0x9203
Algorithm=0
Fuses=0

[AT90S4434]
ProgramSize=4096
DataSize=256
Signature=0x9202
Algorithm=0
Fuses=0

;****

[AT90S8515]
ProgramSize=8192
DataSize=512
Signature=0x9301
Algorithm=0
Fuses=0

[AT90S8535]
ProgramSize=8192
DataSize=512
Signature=0x9303
Algorithm=0
Fuses=0

;****

[ATmega103]
ProgramSize=131072
DataSize=4096
Signature=0x9701
Algorithm=1
Fuses=0

[ATmega103_Old]
ProgramSize=131072
DataSize=4096
Signature=0x0101
Algorithm=1
Fuses=0

;****
; experimental
;****

[ATmega161]
ProgramSize=16384
DataSize=512
Signature=0x9401
Algorithm=1
Fuses=0

[ATmega163]
ProgramSize=16384
DataSize=512
Signature=0x9402
Algorithm=1
Fuses=0

From [email-masked] Thu Jul 12 17:43:25 2001
Received: from mail1.stofanet.dk ([212.10.10.6])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15KZG0-0003mJ-00
for <[email-masked]>; Thu, 12 Jul 2001 17:43:24 +1200
Received: (qmail 4900 invoked from network); 12 Jul 2001 05:44:45 -0000
Received: from unknown (HELO mail1.stofanet.dk) ([email-masked])
by mail1.stofanet.dk with SMTP; 12 Jul 2001 05:44:45 -0000
Message-ID: <[email-masked]>
Date: Thu, 12 Jul 2001 07:42:50 +0200
From: Arne Lynge Madsen <[email-masked]>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.18-4 i586)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] ELF in outputfile
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I have just started using avr-gcc, so my problem migth be simple... My
problem is to get the AVR tools to work on Linux.

Problem:
When I compile code, all I get in the output file is ELF.
What is wrong?

Details:
I have stopped the avr-gcc after preprocessor and after compile-proper,
and these output files seems to be ok. But the when I am using:
avr-gcc -O2 -Wall -mmcu=at90s2313 test.c -o test.o

All I get in test.o is ELF! No errors, no warnings.

I am using Redhat 7.0.

I have installed the following packages:

binutils-2.11.2.tar.gz
gcc-3.0.tar.gz
avr-libc-20010701.tar.gz

This way:
a) tar xzf binutils-2.11.2.tar.gz
b) cd binutils-2.11.2
c) ./configure --target=avr \
--prefix=/home/armadsen/avr
d) make
e) make install

Update PATH to include: /home/armadsen/avr/bin

f) tar xzf gcc-3.0.tar.gz
g) cd gcc-3.0
h) ./configure --target=avr \
--prefix=/home/armadsen/avr \
--enable-languages=c
i) make
j) make install

k) tar xzf avr-libc-20010701.tar.gz
l) cd avr-libc-20010701
m) cd src
n) make prefix=/home/armadsen/avr
o) make prefix=/home/armadsen/avr install

I hope you have time to help

Arne Madsen

From [email-masked] Thu Jul 12 19:15:28 2001
Received: from moutvdom00.kundenserver.de ([195.20.224.149])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Kah4-0003qE-00
for <[email-masked]>; Thu, 12 Jul 2001 19:15:27 +1200
Received: from [195.20.224.219] (helo=mrvdom03.kundenserver.de)
by moutvdom00.kundenserver.de with esmtp (Exim 2.12 #2)
id 15Kafw-0000tc-00
for [email-masked]; Thu, 12 Jul 2001 09:14:16 +0200
Received: from pd9e43705.dip.t-dialin.net ([217.228.55.5] helo=adams.pdp7.org)
by mrvdom03.kundenserver.de with esmtp (Exim 2.12 #2)
id 15Kafv-0006o7-00
for [email-masked]; Thu, 12 Jul 2001 09:14:16 +0200
Received: from thomas by adams.pdp7.org with local (Exim 3.22 #1 (Debian))
id 15Kafh-0002GZ-00
for <[email-masked]>; Thu, 12 Jul 2001 09:14:01 +0200
Date: Thu, 12 Jul 2001 09:14:01 +0200
From: Thomas Strathmann <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] ELF in outputfile
Message-ID: <20010712091401.A8679@adams>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[email-masked]>
User-Agent: Mutt/1.3.18i
X-Operating-System: Debian GNU/Linux
X-Homepage: http://www.tstrathmann.de
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> Problem:
> When I compile code, all I get in the output file is ELF.
> What is wrong?

Nothing, if you have ever touched the gcc before, you might have
noticed that it always outputs ELF format binaries once it has
run the linker pass.
If you want another format, you have to do something like

avr-objcopy -O ihex test.elf test.hex

to get a hex file for example. I use this line in my Makefiles
beacause the ISP I use works with these files.

Greetings,
Thomas

PS: As you mentioned, you have binutils installed. There's
absolutely nothing wrong with exploring and perhaps trying
out one or two programs. You're using Linux, even studying
the code would have been allowed. ;-)

--
Thomas S. Strathmann
http://www.tstrathmann.de

From [email-masked] Fri Jul 13 18:32:26 2001
Received: from femail16.sdc1.sfba.home.com ([24.0.95.143])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15KwUz-0004ku-00
for <[email-masked]>; Fri, 13 Jul 2001 18:32:26 +1200
Received: from hal2001 ([24.77.53.16]) by femail16.sdc1.sfba.home.com
(InterMail vM.4.01.03.20 201-229-121-120-20010223) with SMTP
id <20010713063123.KHNH15434.femail16.sdc1.sfba.home.com@hal2001>
for <[email-masked]>; Thu, 12 Jul 2001 23:31:23 -0700
Message-ID: <002701c10b64$5859cd80$0400a8c0@hatjs>
From: "Jamie Morken" <[email-masked]>
To: <[email-masked]>
Date: Thu, 12 Jul 2001 23:23:34 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Subject: [avr-gcc-list] timer routine
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

I'm using a timer routine to send a byte over and over to a pin on the 8535
chip I am using for amateur rocket telemetry.
The test byte is 81 (01010001) and it is sent lsb to msb (10001010) so here
is what I should get on the pin:

...100010101000101010001010...

Instead of the above bit stream of 81's repeating, the pin is outputting an
extra zero after each 81!

...100010100100010100100010100...

The byte (81) is traversed lsb to msb and the current bit value is placed on
an output pin, at the msb the index shifts back to the lsb and keeps sending
it over and over that way. Somehow there must be a 1 pulse delay that is
putting one extra msb on the output pin.. but I can't figure out how to get
rid of it.. any help!? :)

best regards,
Jamie Morken
www.rocketresearch.org

From [email-masked] Fri Jul 13 18:58:48 2001
Received: from www01.pod02.corp.iprimus.net.au ([203.134.64.107] helo=smtp01.iprimus.net.au)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15KwuW-0004mU-00
for <[email-masked]>; Fri, 13 Jul 2001 18:58:48 +1200
Received: from iprimus.com.au ([210.50.108.77]) by smtp01.iprimus.net.au with Microsoft SMTPSVC(5.0.2195.3571);
Fri, 13 Jul 2001 16:57:42 +1000
Message-ID: <[email-masked]>
Date: Fri, 13 Jul 2001 14:57:25 +0800
From: Stewart Greenhill <[email-masked]>
X-Mailer: Mozilla 4.72 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: "[email-masked]" <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 13 Jul 2001 06:57:43.0095 (UTC) FILETIME=[1D1C4C70:01C10B69]
Subject: [avr-gcc-list] Wierdness building avr-gcc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Folks,

I just tried rebuilding avr-gcc from the latest source under RedHat Linux
6.2.
binutils-2.11.2.tar.gz
gcc-core-20010709.tar.gz

All builds smoothly, but then avr-gcc tries to use "as" and "ld" rather
than "avr-as" and "avr-ld". I managed to get it to work by editting the
specs file, and have had no other problems since.

Odd.

Cheers,
Stewart

From [email-masked] Fri Jul 13 19:46:45 2001
Received: from www01.pod02.corp.iprimus.net.au ([203.134.64.107] helo=smtp01.iprimus.net.au)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Kxes-0004oh-00
for <[email-masked]>; Fri, 13 Jul 2001 19:46:45 +1200
Received: from iprimus.com.au ([210.50.108.77]) by smtp01.iprimus.net.au with Microsoft SMTPSVC(5.0.2195.3571);
Fri, 13 Jul 2001 17:45:33 +1000
Message-ID: <[email-masked]>
Date: Fri, 13 Jul 2001 15:45:12 +0800
From: Stewart Greenhill <[email-masked]>
X-Mailer: Mozilla 4.72 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: "[email-masked]" <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 13 Jul 2001 07:45:35.0494 (UTC) FILETIME=[CD319A60:01C10B6F]
Subject: [avr-gcc-list] Compiling Oberon-2 for AVR
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Folks,

I'm looking at the feasibility of porting an Oberon-2 compiler to target
the AVR. Oberon-2 is an object-oriented descendant of Pascal, developed by
Wirth et al. as a sucessor to Modula-2. OOC (ooc.sourceforge.net) is an
optimising Oberon-2 compiler with a back-end that emits ANSI C.

After a little initial work, I managed to get OOC to generate some code
that behaves sensibly on the AVR. Importantly, there don't seem to be any
problems with method calls so I have both object-oriented and procedural
programming models working. Now I have a couple of questions.

First problem is that the run-time type descriptors eat too much RAM on my
target (AT90s8535). These obviously need to be stripped down and placed
into ROM. It looks like progmem/PRG_RDB is the only way to do this.

Are there any limitations on initialisation of static structures in ROM?
Providing the progmem attributes are correct, can I treat it like a regular
initialisation (ie. initialise a pointer in progmem with the address of a
structure in progmem)?

Is there any support on the horizon for multiple address spaces in gcc?

How do I keep up to date with changes in the implementation of avr-gcc?

Thanks to everyone involved for your great work.

Cheers,
Stewart

From [email-masked] Fri Jul 13 21:08:23 2001
Received: from [193.101.57.9] (helo=ida.interface-business.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Kyvr-0004sZ-00
for <[email-masked]>; Fri, 13 Jul 2001 21:08:20 +1200
Received: (from j@localhost)
by ida.interface-business.de id f6D974818685;
Fri, 13 Jul 2001 11:07:04 +0200 (MET DST)
Date: Fri, 13 Jul 2001 11:07:04 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] Compiling Oberon-2 for AVR
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Stewart Greenhill <[email-masked]> wrote:

> Are there any limitations on initialisation of static structures in
> ROM? Providing the progmem attributes are correct, can I treat it
> like a regular initialisation (ie. initialise a pointer in progmem
> with the address of a structure in progmem)?

Unfortunably not. The progmem handling is (currently) very low-level,
you have to copy from program memory address space manually. The only
help for it is a bit of macro support (that basically translates
directly into the respective lpm assembler statements).

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j

From [email-masked] Sat Jul 14 02:49:55 2001
Received: from overclockers.zip.com.au ([61.8.3.18] helo=odin.zip.com.au)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15L4GQ-00056V-00
for <[email-masked]>; Sat, 14 Jul 2001 02:49:55 +1200
Received: from mwp by odin.zip.com.au with local-esmtp (Exim 3.12 #1 (Debian))
id 15L4FQ-0001Rg-00; Sat, 14 Jul 2001 00:48:52 +1000
Date: Sat, 14 Jul 2001 00:48:52 +1000 (EST)
From: MWP <[email-masked]>
X-Sender: [email-masked]
To: Stewart Greenhill <[email-masked]>
cc: "[email-masked]" <[email-masked]>
Subject: Re: [avr-gcc-list] Wierdness building avr-gcc
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

use:
./configure --target=avr --program-prefix=avr- --prefix=/usr/local/avr

that will work for GCC and binutils.

hmmm... you know when youve compiled GCC too many times when you can
remeber that line :(

MWP

On Fri, 13 Jul 2001, Stewart Greenhill wrote:

> Hi Folks,
>
> I just tried rebuilding avr-gcc from the latest source under RedHat Linux
> 6.2.
> binutils-2.11.2.tar.gz
> gcc-core-20010709.tar.gz
>
> All builds smoothly, but then avr-gcc tries to use "as" and "ld" rather
> than "avr-as" and "avr-ld". I managed to get it to work by editting the
> specs file, and have had no other problems since.
>
> Odd.
>
> Cheers,
> Stewart
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Sat Jul 14 05:45:15 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15L705-0005Ee-00
for <[email-masked]>; Sat, 14 Jul 2001 05:45:14 +1200
Received: (from rneswold@localhost)
by drmemory.fnal.gov (8.11.3/8.11.3) id f6DHmYe85413;
Fri, 13 Jul 2001 12:48:34 -0500 (CDT)
(envelope-from rneswold)
Date: Fri, 13 Jul 2001 12:48:34 -0500
From: Rich Neswold <[email-masked]>
To: Jamie Morken <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] timer routine
Message-ID: <[email-masked]>
Reply-To: [email-masked]
References: <002701c10b64$5859cd80$0400a8c0@hatjs>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="+QahgC5+KEYLbs62"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <002701c10b64$5859cd80$0400a8c0@hatjs>; from [email-masked] on Thu, Jul 12, 2001 at 11:23:34PM -0700
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.3-RELEASE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--+QahgC5+KEYLbs62
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Wasn't it 12-Jul-2001, at 11:23PM, when Jamie Morken said:
> The byte (81) is traversed lsb to msb and the current bit value is placed=
on
> an output pin, at the msb the index shifts back to the lsb and keeps send=
ing
> it over and over that way. Somehow there must be a 1 pulse delay that is
> putting one extra msb on the output pin.. but I can't figure out how to g=
et
> rid of it.. any help!? :)

The UART doesn't send data back-to-back; there's always a stop bit so that
it can sync up with the next character. If you generate the bit stream
through a timer interrupt, you can control how many bits go out (but you
probably knew that and were trying to avoid it by using the UART.)

--=20
Rich Neswold

efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

--+QahgC5+KEYLbs62
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE7TzRyZmE+i9FKxdwRAtBvAJ4now63niUSl1/NDbLWnW0BDgoi2wCg3Bro
ksapg+qmeXWTnboAmYBLmp4=
=dUK3
-----END PGP SIGNATURE-----

--+QahgC5+KEYLbs62--

From [email-masked] Sat Jul 14 06:19:57 2001
Received: from femail3.sdc1.sfba.home.com ([24.0.95.83])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15L7Xg-0005Gc-00
for <[email-masked]>; Sat, 14 Jul 2001 06:19:56 +1200
Received: from hal2001 ([24.77.53.16]) by femail3.sdc1.sfba.home.com
(InterMail vM.4.01.03.20 201-229-121-120-20010223) with SMTP
id <20010713181850.YBPD11925.femail3.sdc1.sfba.home.com@hal2001>
for <[email-masked]>; Fri, 13 Jul 2001 11:18:50 -0700
Message-ID: <009501c10bc7$24886300$0400a8c0@hatjs>
From: "Jamie Morken" <[email-masked]>
To: <[email-masked]>
Subject: Re: [avr-gcc-list] timer routine
Date: Fri, 13 Jul 2001 11:10:47 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

Thanks for the kind offers to help! In making the code readable for posting
to the group I actually was able to read it myself and spent 10 hours (trial
and error method instead of datasheets to find out how timers work etc) with
the oscilloscope and fixed the telemetry error that eluded me for a long
time! :) Getting an AX.25 frame matched at the start of a transmission is
not easy with trial and error method but I finally did it goddammit! :)
Anyone have any GPS NMEA AVR interface code that I could borrow for my
rocketry project? I have a GPS board outputting NMEA that really wants to
hook up to my 8535's com port but I don't have AVR compatible code that will
parse the strings etc.. We want to hook the 8535 up to the GPS and to a
motor controlled parasail for opensource rocket recovery to a precise
landing location. Its time for amateurs to go to space!! :)

best regards,
Jamie Morken
www.rocketresearch.org

From [email-masked] Sat Jul 14 10:23:26 2001
Received: from www01.pod02.corp.iprimus.net.au ([203.134.64.107] helo=smtp01.iprimus.net.au)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15LBLK-0005Uo-00
for <[email-masked]>; Sat, 14 Jul 2001 10:23:26 +1200
Received: from iprimus.com.au ([210.50.25.86]) by smtp01.iprimus.net.au with Microsoft SMTPSVC(5.0.2195.3571);
Sat, 14 Jul 2001 08:22:21 +1000
Message-ID: <[email-masked]>
Date: Sat, 14 Jul 2001 06:22:06 +0800
From: Stewart Greenhill <[email-masked]>
X-Mailer: Mozilla 4.72 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: MWP <[email-masked]>
CC: "[email-masked]" <[email-masked]>
Subject: Re: [avr-gcc-list] Wierdness building avr-gcc
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 13 Jul 2001 22:22:21.0911 (UTC) FILETIME=[490FCE70:01C10BEA]
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

MWP wrote:
>
> use:
> ./configure --target=avr --program-prefix=avr- --prefix=/usr/local/avr
>
> that will work for GCC and binutils.
>
> hmmm... you know when youve compiled GCC too many times when you can
> remeber that line :(

Thanks. I'll try that next time.

I used
./configure --target=avr

which I recall was correct for gcc 2.95. This also agrees with the
instructions in avr-libc which don't mention the --program-prefix flag.

Are there any more current instructions for building avr-gcc?

Cheers,
Stewart

From [email-masked] Sun Jul 15 20:53:27 2001
Received: from note.orchestra.cse.unsw.edu.au ([129.94.242.29])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15LheZ-0008HY-00
for <[email-masked]>; Sun, 15 Jul 2001 20:53:27 +1200
Received: From rothaus (for [email-masked]) With LocalMail ;
Sun, 15 Jul 2001 18:52:31 +1000
From: Harvey Tuch <[email-masked]>
To: [email-masked]
Date: Sun, 15 Jul 2001 18:52:30 +1000
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Subject: [avr-gcc-list] More gcc internal errors
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I get this:

start.c:97: Internal compiler error in instantiate_virtual_regs_1, at function.c:3908
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make: *** [start.o] Error 1

when compiling some C source code - its shortly after a few sbi/cbi
macros which generate "asm operand 0 probably doesn't match
constraints" warnings.

Has anyone received a similiar error? What information is useful to
supply in a bug report?

Ta,
Harvey
--
-----------------------------------------------------------------------
Harvey Tuch [email-masked]
-----------------------------------------------------------------------

From [email-masked] Sun Jul 15 21:31:40 2001
Received: from note.orchestra.cse.unsw.edu.au ([129.94.242.29])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15LiFX-0008JT-00
for <[email-masked]>; Sun, 15 Jul 2001 21:31:40 +1200
Received: From rothaus (for [email-masked]) With LocalMail ;
Sun, 15 Jul 2001 19:30:38 +1000
From: Harvey Tuch <[email-masked]>
To: [email-masked]
Date: Sun, 15 Jul 2001 19:30:37 +1000
Subject: Re: [avr-gcc-list] More gcc internal errors
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Sun, Jul 15, 2001 at 06:52:30PM +1000
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Sorry - I didn't include gcc version.

I'm using binaries:

avr-binutils-2001.06.06.linuxbin.tar.gz
avr-gcc-2001.06.06.linuxbin.tar.gz
avr-libc-20010701.tar.gz

Harvey

On Sun, Jul 15, 2001 at 06:52:30PM +1000, Harvey Tuch wrote:
> Hi,
>
> I get this:
>
> start.c:97: Internal compiler error in instantiate_virtual_regs_1, at function.c:3908
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
> make: *** [start.o] Error 1
>
> when compiling some C source code - its shortly after a few sbi/cbi
> macros which generate "asm operand 0 probably doesn't match
> constraints" warnings.
>
> Has anyone received a similiar error? What information is useful to
> supply in a bug report?
>
> Ta,
> Harvey
> --
> -----------------------------------------------------------------------
> Harvey Tuch [email-masked]
> -----------------------------------------------------------------------
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
-----------------------------------------------------------------------
Harvey Tuch [email-masked]
-----------------------------------------------------------------------

From [email-masked] Mon Jul 16 04:42:10 2001
Received: from mailout01.sul.t-online.com ([194.25.134.80] helo=mailout01.sul.t-online.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15LoyA-000086-00
for <[email-masked]>; Mon, 16 Jul 2001 04:42:10 +1200
Received: from fwd03.sul.t-online.de
by mailout01.sul.t-online.de with smtp
id 15LoxI-0002BH-0B; Sun, 15 Jul 2001 18:41:16 +0200
Received: from vivaldi (520013112276-0001@[217.228.140.108]) by fwd03.sul.t-online.com
with smtp id 15LoxD-0MPU80C; Sun, 15 Jul 2001 18:41:11 +0200
From: [email-masked] (Nicolas nickisch)
To: <[email-masked]>
Date: Sun, 15 Jul 2001 18:41:09 +0200
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
X-Sender: [email-masked]
Subject: [avr-gcc-list] strange behaviour of my interrupt routine, please help
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I am quite new with the AVR-GCC, so some of my softwrae projects were
primarily developed
with the demo version of the CODEVISION C- Compiler.

So I developed a program which uses the external interrupt 0 with an falling
edge on the pin.

The program works now with the AVR-GCC as well as with CODEVISION.

The problem is, the interrupt program works only AFTER the first
CODEVSION-program was loaded on the 8515.

So this works:

- POWER ON
- Flash Codevision program
- Flash GCC-version of the program

Then it deosn't work any more:
- POWEROFF
- Wait as long as you want
- POWER ON (AVR-GCC version stays flashed)

I think it is a question of correct initialitzation of the AVR8515

Do you find an error in the following code sequence ?

....
SIGNAL(SIG_INTERRUPT0)
{
unsigned char pcf8574[3];
u16 test;
char int_zaehler_str[8];
char i=0;

lcd_gotoxy(9,1);
lcd_puts("##\n");

//Baustein mit Adresse 70 lesen ...
for(i=0;i<2;i++) { // später sind die ADRESSEN ZU KORRIGIEREN
//i2c_start(71);

//die nachfolgende I2C-Adresse muss in der endgültigen Version
//auf 65 geändert werden !!!
i2c_start(71+i*2); // set device address and read mode
(Adresse 70 + 1)
pcf8574[i] = i2c_read(0); // read one byte
i2c_stop(); // sende STOP-Kondition

// set stop conditon = release bus

}
....

main()
{
outp(0x00,PORTD);
outp(0x00,DDRD);

outp(0x40| inp(GIMSK),GIMSK);
outp(0x02|inp(MCUCR),MCUCR);
outp(0x40|inp(GIFR),GIFR);

sei();
}

Thank you for your help

Nicolas Nickisch

From [email-masked] Mon Jul 16 05:12:08 2001
Received: from mx04.nexgo.de ([151.189.8.80])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15LpRA-00009i-00
for <[email-masked]>; Mon, 16 Jul 2001 05:12:08 +1200
Received: from kleinertiga.local (unknown [145.253.136.202])
by mx04.nexgo.de (Postfix) with ESMTP
id 792EE2F6B3; Sun, 15 Jul 2001 19:11:02 +0200 (CEST)
Received: from gmx.de (localhost [127.0.0.1])
by kleinertiga.local (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id f6FH4qJ01262;
Sun, 15 Jul 2001 19:04:58 +0200
X-Authentication-Warning: kleinertiga.local: Host localhost [127.0.0.1] claimed to be gmx.de
Message-ID: <[email-masked]>
Date: Sun, 15 Jul 2001 19:04:52 +0200
From: rudolph <[email-masked]>
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked], [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] malloc problems
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

I have problems with malloc debugging.
I use the malloc and free from the libc.
After a few calls I got a zero pointer. OK, seems to be not enough
memory.
But all the allocated memory is freed before the new call. The same
source is
compiled for a linux box and seems there be ok?!?

Any idea for debugging on the 8515?

How to get more memory? If using external ram for the 8515 on a STK200
there was an
option to use it. Which option?? I forgot! Please help me to remember.
Is the malloc then
also use the bigger external ram?

Thanks
Klaus

From [email-masked] Mon Jul 16 05:38:43 2001
Received: from mx04.nexgo.de ([151.189.8.80])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Lpqt-0000B9-00
for <[email-masked]>; Mon, 16 Jul 2001 05:38:43 +1200
Received: from kleinertiga.local (dusdi5-212-144-206-210.arcor-ip.net [212.144.206.210])
by mx04.nexgo.de (Postfix) with ESMTP id 64DA02F6C5
for <[email-masked]>; Sun, 15 Jul 2001 19:37:47 +0200 (CEST)
Received: from gmx.de (localhost [127.0.0.1])
by kleinertiga.local (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id f6FHVbJ01679
for <[email-masked]>; Sun, 15 Jul 2001 19:31:42 +0200
X-Authentication-Warning: kleinertiga.local: Host localhost [127.0.0.1] claimed to be gmx.de
Message-ID: <[email-masked]>
Date: Sun, 15 Jul 2001 19:31:37 +0200
From: rudolph <[email-masked]>
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] avr gcc options
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

where can i find a complete list of all avr-gcc specific options?

I have only the tutorial from Rich Neswold, but this is from Januar 23.
Is there any newer
infosheet ore site where i can find newer information, not only newer
sources?

Thanks
Klaus

From [email-masked] Mon Jul 16 06:33:06 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15LqhJ-0000Hy-00; Mon, 16 Jul 2001 06:32:54 +1200
Received: from mm.amelek.gda.pl ([192.168.1.1] ident=mail)
by alf.amelek.gda.pl with esmtp (Exim 3.22 #1 (Debian))
id 15Lqfg-00083f-00; Sun, 15 Jul 2001 20:31:13 +0200
Received: from marekm by mm.amelek.gda.pl with local (Exim 3.22 #1 (Debian))
id 15Lqfd-0002s9-00; Sun, 15 Jul 2001 20:31:09 +0200
To: [email-masked], [email-masked]
Date: Sun, 15 Jul 2001 20:31:09 +0200 (CEST)
X-Mailer: ELM [version 2.4ME+ PL89 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Message-Id: <[email-masked]>
From: Marek Michalkiewicz <[email-masked]>
Subject: [avr-gcc-list] uisp-20010715
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Changes:

- rename AVR3 to FBPRG (-dprog=fbprg), as it seems that smartcard
development boards might have illegal uses in some countries ;)
- fix avr910 page write for ATmega163 (please test ATmega103 too!)
- save/restore termios modes on serial ports, please test
- change -datmel to -dprog=avr910
- uisp --help now prints to stdout, not stderr
- change #include <string> to #include <string.h>
- #include <string.h> in Terminal.C
- fix -dspeed handling in Serial.C

Download:

http://www.amelek.gda.pl/avr/uisp/uisp-20010715.tar.gz

Warning: serial (dasa, dasa2, avr910) changes are completely untested,
please tell me if anything breaks...

Marek

From [email-masked] Mon Jul 16 06:50:16 2001
Received: from hammer.overta.ru ([195.151.108.138] helo=overta.ru)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Lqy7-0000JJ-00
for <[email-masked]>; Mon, 16 Jul 2001 06:50:15 +1200
Received: from [195.151.217.156] (HELO localhost.localdomain)
by overta.ru (CommuniGate Pro SMTP 3.4.7)
with ESMTP id 300640; Sun, 15 Jul 2001 22:48:16 +0400
To: Harvey Tuch <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] More gcc internal errors
References: <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 15 Jul 2001 22:41:53 +0400
In-Reply-To: Harvey Tuch's message of "Sun, 15 Jul 2001 19:30:37 +1000"
Message-ID: <[email-masked]>
Lines: 37
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Harvey Tuch <[email-masked]> writes:

> Sorry - I didn't include gcc version.
>
> I'm using binaries:
>
> avr-binutils-2001.06.06.linuxbin.tar.gz
> avr-gcc-2001.06.06.linuxbin.tar.gz
> avr-libc-20010701.tar.gz
>
> Harvey
>
>
> On Sun, Jul 15, 2001 at 06:52:30PM +1000, Harvey Tuch wrote:
> > Hi,
> >
> > I get this:
> >
> > start.c:97: Internal compiler error in instantiate_virtual_regs_1, at function.c:3908
> > Please submit a full bug report,
> > with preprocessed source if appropriate.
> > See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
> > make: *** [start.o] Error 1
> >
> > when compiling some C source code - its shortly after a few sbi/cbi
> > macros which generate "asm operand 0 probably doesn't match
> > constraints" warnings.
> >
> > Has anyone received a similiar error? What information is useful to
> > supply in a bug report?

See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Send me a preprocessed source of your C code.

Denis.

From [email-masked] Mon Jul 16 06:50:18 2001
Received: from hammer.overta.ru ([195.151.108.138] helo=overta.ru)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Lqy9-0000JJ-00
for <[email-masked]>; Mon, 16 Jul 2001 06:50:18 +1200
Received: from [195.151.217.156] (HELO localhost.localdomain)
by overta.ru (CommuniGate Pro SMTP 3.4.7)
with ESMTP id 300641; Sun, 15 Jul 2001 22:48:24 +0400
To: Stewart Greenhill <[email-masked]>
Cc: MWP <[email-masked]>,
"[email-masked]" <[email-masked]>
Subject: Re: [avr-gcc-list] Wierdness building avr-gcc
References: <[email-masked]> <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 15 Jul 2001 22:42:01 +0400
In-Reply-To: Stewart Greenhill's message of "Sat, 14 Jul 2001 06:22:06 +0800"
Message-ID: <[email-masked]>
Lines: 20
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Stewart Greenhill <[email-masked]> writes:

> MWP wrote:
> >
> > use:
> > ./configure --target=avr --program-prefix=avr- --prefix=/usr/local/avr
> >
> > that will work for GCC and binutils.
> >
> > hmmm... you know when youve compiled GCC too many times when you can
> > remeber that line :(
>
> Thanks. I'll try that next time.
>
> I used
> ./configure --target=avr

It's my configuration command too.

Denis.

From [email-masked] Wed Jul 18 04:19:00 2001
Received: from mx04.nexgo.de ([151.189.8.80])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15MXYp-00022B-00
for <[email-masked]>; Wed, 18 Jul 2001 04:19:00 +1200
Received: from kleinertiga.local (dusdi5-212-144-204-051.arcor-ip.net [212.144.204.51])
by mx04.nexgo.de (Postfix) with ESMTP id 684592F3A1
for <[email-masked]>; Tue, 17 Jul 2001 18:18:14 +0200 (CEST)
Received: from gmx.de (localhost [127.0.0.1])
by kleinertiga.local (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id f6HGC0v01272
for <[email-masked]>; Tue, 17 Jul 2001 18:12:07 +0200
X-Authentication-Warning: kleinertiga.local: Host localhost [127.0.0.1] claimed to be gmx.de
Message-ID: <[email-masked]>
Date: Tue, 17 Jul 2001 18:12:00 +0200
From: rudolph <[email-masked]>
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] using external ram with gcc on stk200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I=B4m must ask again:

How can I use the external SRAM with gcc.

I found an old FAQ, there I have to change the ldscript, but this change
nothing on my output
files.

->
data (rw!x) : ORIGIN =3D 0x60, LENGTH 512 changed to 4K for example but
no result! =

Any idea?

Thanks
Klaus

From [email-masked] Wed Jul 18 05:29:46 2001
Received: from deimos.frii.com ([216.17.128.2] helo=deimos.frii.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15MYfJ-00025V-00
for <[email-masked]>; Wed, 18 Jul 2001 05:29:45 +1200
Received: from spinach4.verinet.com (spinach4.verinet.com [207.174.160.99])
by deimos.frii.net (8.11.4/8.11.4) with ESMTP id f6HHT0C21546
for <[email-masked]>; Tue, 17 Jul 2001 11:29:00 -0600 (MDT)
Date: Tue, 17 Jul 2001 11:44:58 -0600 (MDT)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>
Subject: Re: [avr-gcc-list] using external ram with gcc on stk200
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by deimos.frii.net id f6HHT0C21546
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Klaus,

These may be obvious, but this is what I'd check first:

I assume you have the 74HC573 installed?

Did you set up the MCUCR (MCU control register) as detailed in the
"Interface to External SRAM" section of the atmel 4414/8515 data sheet?

Also, the STK200 Starter Kit manual says you need 70ns SRAM or else you
will need to deal with wait states. Did you check this?

Those are just guesses of things to check. I haven't attempted this yet
with gcc, so I don't know what you'd do there, although I'm interested.

Ted

On Tue, 17 Jul 2001, rudolph mumbled something to the effect of:

:)Hi,
:)
:)I=B4m must ask again:
:)
:)How can I use the external SRAM with gcc.
:)
:)I found an old FAQ, there I have to change the ldscript, but this chang=
e
:)nothing on my output
:)files.
:)
:)->
:)data (rw!x) : ORIGIN =3D 0x60, LENGTH 512 changed to 4K for example bu=
t
:)no result!
:)
:)Any idea?
:)
:)Thanks
:)Klaus
:)
:)_______________________________________________
:)avr-gcc-list mailing list
:)[email-masked]
:)http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
:)

From [email-masked] Wed Jul 18 05:32:17 2001
Received: from exchange.prism.co.za ([196.34.63.66])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15MYhk-00025x-00
for <[email-masked]>; Wed, 18 Jul 2001 05:32:17 +1200
Received: by EXCHANGE with Internet Mail Service (5.5.2653.19)
id <NHP1M16C>; Tue, 17 Jul 2001 19:38:49 +0200
Message-ID: <C84D1E1984CBD411BCEF00D0B7A7D5C9013E688E@EXCHANGE>
From: Heinrich Vermeulen <[email-masked]>
To: "[email-masked]'" <[email-masked]>,
"[email-masked]'" <[email-masked]>
Date: Tue, 17 Jul 2001 19:38:47 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
charset="iso-8859-1"
Subject: [avr-gcc-list] ATMega103 and external RAM access in AVR GCC
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi

How can I tell the compiler that all the variables that are declared must be
stored in external RAM of the ATMega103?

Thanks

Heinrich Vermeulen
[email-masked]

From [email-masked] Wed Jul 18 06:53:45 2001
Received: from sttlpop4.sttl.uswest.net ([206.81.192.4])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15MZya-0002Do-00
for <[email-masked]>; Wed, 18 Jul 2001 06:53:44 +1200
Received: (qmail 63319 invoked by alias); 17 Jul 2001 18:52:32 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 63303 invoked by uid 0); 17 Jul 2001 18:52:31 -0000
Received: from sdslppp125.sttl.uswest.net (HELO dell) (63.224.46.125)
by sttlpop4.sttl.uswest.net with SMTP; 17 Jul 2001 18:52:31 -0000
Message-ID: <01ac01c10ef1$26368920$0700000a@dell>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
Subject: Re: [avr-gcc-list] ATMega103 and external RAM access in AVR GCC
Date: Tue, 17 Jul 2001 11:46:41 -0700
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0193_01C10EB6.25513400"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_0193_01C10EB6.25513400
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit

This is how you do it. Just make the appropriate adjustments for the
mega part.

Also, look at the C startup module (gcrt1.S) found in the library
source for more information on how things work.

----- Original Message -----
From: "Molnar Zoltan" <[email-masked]>
To: <[email-masked]>
Sent: Friday, May 04, 2001 2:34 AM
Subject: [avr-gcc-list] Link time stack, mcucr, watchdog init. with
avr-gcc

Thanks to Jason Kyle and Ludovic COURTES I succeded to initialize RAM
size, stack pointer, MCUCR and watchdog control register at link time,
so You won't get strange link error messages if You use ext. memory
and large variables.

Also You don't have to init. stack, MCUCR and watchdog from code.

I attach to this mail the makefile and local linker script file that
do all this.

Thanks to everybody who responded to my question.

------=_NextPart_000_0193_01C10EB6.25513400
Content-Type: application/octet-stream;
name="avr85xx.x"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="avr85xx.x"

OUTPUT_FORMAT("elf32-avr","elf32-avr","elf32-avr")=0A=
OUTPUT_ARCH(avr:2)=0A=
MEMORY=0A=
{=0A=
text (rx) : ORIGIN =3D 0, LENGTH =3D 8K=0A=
data (rw!x) : ORIGIN =3D 0x800060, LENGTH =3D 32672=0A=
eeprom (rw!x) : ORIGIN =3D 0x810000, LENGTH =3D 512=0A=
}=0A=
SECTIONS=0A=
{=0A=
/* Read-only sections, merged into text segment: */=0A=
.hash : { *(.hash) }=0A=
.dynsym : { *(.dynsym) }=0A=
.dynstr : { *(.dynstr) }=0A=
.gnu.version : { *(.gnu.version) }=0A=
.gnu.version_d : { *(.gnu.version_d) }=0A=
.gnu.version_r : { *(.gnu.version_r) }=0A=
.rel.init : { *(.rel.init) }=0A=
.rela.init : { *(.rela.init) }=0A=
.rel.text :=0A=
{=0A=
*(.rel.text)=0A=
*(.rel.text.*)=0A=
*(.rel.gnu.linkonce.t*)=0A=
}=0A=
.rela.text :=0A=
{=0A=
*(.rela.text)=0A=
*(.rela.text.*)=0A=
*(.rela.gnu.linkonce.t*)=0A=
}=0A=
.rel.fini : { *(.rel.fini) }=0A=
.rela.fini : { *(.rela.fini) }=0A=
.rel.rodata :=0A=
{=0A=
*(.rel.rodata)=0A=
*(.rel.rodata.*)=0A=
*(.rel.gnu.linkonce.r*)=0A=
}=0A=
.rela.rodata :=0A=
{=0A=
*(.rela.rodata)=0A=
*(.rela.rodata.*)=0A=
*(.rela.gnu.linkonce.r*)=0A=
}=0A=
.rel.data :=0A=
{=0A=
*(.rel.data)=0A=
*(.rel.data.*)=0A=
*(.rel.gnu.linkonce.d*)=0A=
}=0A=
.rela.data :=0A=
{=0A=
*(.rela.data)=0A=
*(.rela.data.*)=0A=
*(.rela.gnu.linkonce.d*)=0A=
}=0A=
.rel.ctors : { *(.rel.ctors) }=0A=
.rela.ctors : { *(.rela.ctors) }=0A=
.rel.dtors : { *(.rel.dtors) }=0A=
.rela.dtors : { *(.rela.dtors) }=0A=
.rel.got : { *(.rel.got) }=0A=
.rela.got : { *(.rela.got) }=0A=
.rel.bss : { *(.rel.bss) }=0A=
.rela.bss : { *(.rela.bss) }=0A=
.rel.plt : { *(.rel.plt) }=0A=
.rela.plt : { *(.rela.plt) }=0A=
/* Internal text space or external memory */=0A=
.text :=0A=
{=0A=
*(.init)=0A=
*(.progmem.gcc*)=0A=
*(.progmem*)=0A=
. =3D ALIGN(2);=0A=
*(.text)=0A=
. =3D ALIGN(2);=0A=
*(.text.*)=0A=
. =3D ALIGN(2);=0A=
*(.fini)=0A=
_etext =3D . ; =0A=
} > text=0A=
.data : AT (ADDR (.text) + SIZEOF (.text))=0A=
{=0A=
PROVIDE (__data_start =3D .) ; =0A=
*(.data)=0A=
*(.gnu.linkonce.d*)=0A=
. =3D ALIGN(2);=0A=
_edata =3D . ; =0A=
} > data=0A=
.bss SIZEOF(.data) + ADDR(.data) :=0A=
{=0A=
PROVIDE (__bss_start =3D .) ; =0A=
*(.bss)=0A=
*(COMMON)=0A=
PROVIDE (__bss_end =3D .) ; =0A=
_end =3D . ; =0A=
} > data=0A=
.eeprom :=0A=
AT (ADDR (.text) + SIZEOF (.text) + SIZEOF (.data))=0A=
{=0A=
*(.eeprom*)=0A=
__eeprom_end =3D . ; =0A=
} > eeprom=0A=
=0A=
/* Stabs debugging sections. */=0A=
.stab 0 : { *(.stab) }=0A=
.stabstr 0 : { *(.stabstr) }=0A=
.stab.excl 0 : { *(.stab.excl) }=0A=
.stab.exclstr 0 : { *(.stab.exclstr) }=0A=
.stab.index 0 : { *(.stab.index) }=0A=
.stab.indexstr 0 : { *(.stab.indexstr) }=0A=
.comment 0 : { *(.comment) }=0A=
/* DWARF debug sections.=0A=
Symbols in the DWARF debugging sections are relative to the =
beginning=0A=
of the section so we begin them at 0. */=0A=
/* DWARF 1 */=0A=
.debug 0 : { *(.debug) }=0A=
.line 0 : { *(.line) }=0A=
/* GNU DWARF 1 extensions */=0A=
.debug_srcinfo 0 : { *(.debug_srcinfo) }=0A=
.debug_sfnames 0 : { *(.debug_sfnames) }=0A=
/* DWARF 1.1 and DWARF 2 */=0A=
.debug_aranges 0 : { *(.debug_aranges) }=0A=
.debug_pubnames 0 : { *(.debug_pubnames) }=0A=
/* DWARF 2 */=0A=
.debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }=0A=
.debug_abbrev 0 : { *(.debug_abbrev) }=0A=
.debug_line 0 : { *(.debug_line) }=0A=
.debug_frame 0 : { *(.debug_frame) }=0A=
.debug_str 0 : { *(.debug_str) }=0A=
.debug_loc 0 : { *(.debug_loc) }=0A=
.debug_macinfo 0 : { *(.debug_macinfo) }=0A=
=0A=
PROVIDE (__stack =3D 0x7fff) ;=0A=
PROVIDE (__init_mcucr__ =3D 0x80) ;=0A=
PROVIDE (__init_wdtcr__ =3D 0x00) ;=0A=
}=0A=
=0A=
=0A=
=0A=

------=_NextPart_000_0193_01C10EB6.25513400
Content-Type: text/plain;
name="makefile.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="makefile.txt"

#Make file with link time initialization of the stack pointer, MCUCR and =
watchdog control register.
#In order to tell the linker how much SRAM You have use the attached =
local linker script file.
#Modify length of data segment: 'data (rw!x) : ORIGIN =3D 0x800060, =
LENGTH =3D ...' <- 512; 32672
#Modified by Molnar Zoltan, original by Volker Oth.
#Special thanks for their help to Jason Kyle [email-masked] and Ludovic =
COURTES <[email-masked]>
#Good luck using it.

###### define some variables based on the AVR base path in $(AVR) =
#######
CC=3Davr-gcc
AS=3Davr-gcc -x assembler-with-cpp=09
RM=3Drm -f
RN=3Dmv
BIN=3Davr-objcopy
INCDIR=3D.
LIBDIR=3D$(AVR)/avr/lib
SHELL=3D$(AVR)/bin/sh.exe
###### output format can be srec, ihex (avrobj is always created) =
#######
FORMAT=3Dihex
########################## default mcu type =
#############################
#put the name of the target mcu here (at90s8515, at90s8535, attiny22, =
atmega603 etc.)
MCU=3Dat90s8515
####################### default compiler flags =
##########################
CPFLAGS=3D-g -Os -Wall -Wstrict-prototypes -Wa,-ahlms=3D$(<:.c=3D.lst)
####################### default assembler flags =
#########################
ASFLAGS=3D-Wa,-gstabs
########################## default linker flags =
#########################
LDFLAGS=3D-Wl,-Map=3D$(TRG).map,--cref,-Tavr85xx.x

#put the name of the target file here (without extension)
TRG=3Dtest2
=09
#put your C sourcefiles here=20
SRC=3D $(TRG).c=20

#put additional assembler source file here
ASRC=3D=20

#additional libraries and object files to link
LIB=3D

#additional includes to compile
INC=3D=20

########### you should not need to change the following line =
#############
#define all project specific object files
OBJ =3D $(ASRC:.s=3D.o) $(SRC:.c=3D.o)=20
CPFLAGS +=3D -mmcu=3D$(MCU)
ASFLAGS +=3D -mmcu=3D$(MCU)
LDFLAGS +=3D -mmcu=3D$(MCU) =20
LDFLAGS +=3D -Xlinker --defsym -Xlinker __init_wdtcr__=3D0x00=09
LDFLAGS +=3D -Xlinker --defsym -Xlinker __init_mcucr__=3D0x80=09
LDFLAGS +=3D -Xlinker --defsym -Xlinker __stack=3D0x7FFF
=09
#this defines the aims of the make process
all: $(TRG).obj $(TRG).elf $(TRG).rom #$(TRG).eep

#compile: instructions to create assembler and/or object files from C =
source
%o : %c=20
$(CC) -c $(CPFLAGS) -I$(INCDIR) $< -o $@

%s : %c
$(CC) -S $(CPFLAGS) -I$(INCDIR) $< -o $@

#assemble: instructions to create object file from assembler files
%o : %s
$(AS) -c $(ASFLAGS) -I$(INCDIR) $< -o $@

#link: instructions to create elf output file from object files
%elf: $(OBJ)

$(CC) $(OBJ) $(LIB) $(LDFLAGS) -o $@

#create avrobj file from elf output file
%obj: %elf
$(BIN) -O avrobj -R .eeprom $< $@

#create bin (ihex, srec) file from elf output file
%rom: %elf
$(BIN) -O $(FORMAT) -R .eeprom $< $@

%eep: %elf
$(BIN) -j .eeprom --set-section-flags=3D.eeprom=3D"alloc,load" =
--change-section-lma .eeprom=3D0 -O $(FORMAT) $< $@

###### dependecies, add any dependencies you need here =
###################
$(TRG).o: $(TRG).c=20

#make instruction to delete created files
clean:
$(RM) $(OBJ)
$(RM) $(SRC:.c=3D.s)
$(RM) $(SRC:.c=3D.lst)
$(RM) $(TRG).map
$(RM) $(TRG).elf
$(RM) $(TRG).obj
$(RM) $(TRG).eep
$(RM) $(TRG).rom
$(RM) *.bak
$(RM) *.log
------=_NextPart_000_0193_01C10EB6.25513400--

From [email-masked] Wed Jul 18 21:49:57 2001
Received: from exchange.prism.co.za ([196.34.63.66])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Mnxj-0002lM-00
for <[email-masked]>; Wed, 18 Jul 2001 21:49:57 +1200
Received: from prism.co.za (10.5.3.12 [10.5.3.12]) by exchange.prism.co.za with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13)
id NHP1MHVS; Wed, 18 Jul 2001 11:56:43 +0200
Message-ID: <[email-masked]>
Date: Wed, 18 Jul 2001 11:48:53 -0400
From: Pieter Potgieter <[email-masked]>
Organization: Prism
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.3-20mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: AvrChat <[email-masked]>,
AvrGcc <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Help on Large Structures
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi folks
I want to declare a structure which looks like this

struct DataFlash
{
BYTE firmware[0x8000];
};

When the size of the array is bigger than 32k the compiler give me the
following
message:

'inc/ExtMemAlloc.h:138: size of array `firmware' is too large'

The reason I want to have a structure this big ( its actually 256k ) is
to be able
to declare a pointer of this type, and then use this pointer to do the
resolving of the addresses of the members when I want to write to the
DataFlash.
Any suggestions on how to get past this, maybe a compiler setting? Or is
it a new undocumented feature?
Another question is whether the sizeof operator will return the correct
value?

My Compiler flags is set to the following:
CPFLAGS = -Os -mcall-prologues -Wall -Wstrict-prototypes
-Wa,-ahlms=$(<:.c=.lst)
and I am using a Mega103

Thanx
Pieter Potgieter

From [email-masked] Wed Jul 18 22:00:15 2001
Received: from maile.telia.com ([194.22.190.16])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Mo7q-0002m8-00
for <[email-masked]>; Wed, 18 Jul 2001 22:00:14 +1200
Received: from d1o926.telia.com (d1o926.telia.com [213.66.172.241])
by maile.telia.com (8.11.2/8.11.0) with ESMTP id f6I9xUZ21108;
Wed, 18 Jul 2001 11:59:30 +0200 (CEST)
Received: from jesper (h152n2fls34o926.telia.com [217.208.35.152])
by d1o926.telia.com (8.10.2/8.10.1) with SMTP id f6I9xTA21944;
Wed, 18 Jul 2001 11:59:30 +0200 (CEST)
Message-ID: <010601c10f70$68354580$65656565@jesper>
From: "Jesper Hansen" <[email-masked]>
To: "Pieter Potgieter" <[email-masked]>, "AvrChat" <[email-masked]>,
"AvrGcc" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Help on Large Structures
Date: Wed, 18 Jul 2001 11:59:58 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Pieter,

You don't need to allocate memory statically.
If you need a pointer, just make a pointer :

// first make a typedef

typedef struct {
BYTE firmware[0x8000];
} DataFlash_Type;

// then create as many pointers as you like

DataFlash_Type *pDataFlash;

/Jesper
http://www.yampp.com

----- Original Message -----
From: "Pieter Potgieter" <[email-masked]>
To: "AvrChat" <[email-masked]>; "AvrGcc" <[email-masked]>
Sent: Wednesday, July 18, 2001 5:48 PM
Subject: [avr-gcc-list] Help on Large Structures

> Hi folks
> I want to declare a structure which looks like this
>
> struct DataFlash
> {
> BYTE firmware[0x8000];
> };
>
> When the size of the array is bigger than 32k the compiler give me the
> following
> message:
>
> 'inc/ExtMemAlloc.h:138: size of array `firmware' is too large'
>
> The reason I want to have a structure this big ( its actually 256k ) is
> to be able
> to declare a pointer of this type, and then use this pointer to do the
> resolving of the addresses of the members when I want to write to the
> DataFlash.
> Any suggestions on how to get past this, maybe a compiler setting? Or is
> it a new undocumented feature?
> Another question is whether the sizeof operator will return the correct
> value?
>
> My Compiler flags is set to the following:
> CPFLAGS = -Os -mcall-prologues -Wall -Wstrict-prototypes
> -Wa,-ahlms=$(<:.c=.lst)
> and I am using a Mega103
>
> Thanx
> Pieter Potgieter
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Wed Jul 18 23:44:13 2001
Received: from mail.tps.de ([195.126.171.2] ident=daemon)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15MpkR-0002r9-00
for <[email-masked]>; Wed, 18 Jul 2001 23:44:11 +1200
Received: (from daemon@localhost)
by mail.tps.de (8.8.7/8.8.7) id NAA01689
for <[email-masked]>; Wed, 18 Jul 2001 13:43:25 +0200
Received: from UNKNOWN(193.96.199.65), claiming to be "goepplinux"
via SMTP by mail.tps.de, id smtpda01682; Wed Jul 18 13:42:34 2001
From: Matthias =?iso-8859-1?q?G=F6ppner?= <[email-masked]>
Organization: TSP
To: [email-masked]
Date: Wed, 18 Jul 2001 12:24:18 +0200
X-Mailer: KMail [version 1.1.99]
Content-Type: text/plain;
charset="iso-8859-1"
MIME-Version: 1.0
Message-Id: <01071812241800.00861@goepplinux>
Content-Transfer-Encoding: 8bit
Subject: [avr-gcc-list] atmega161 compilation support
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

I want to use the microcontroller ATMega161(now available after all!)
instead of AT8515.
When compiling C source code with avr-gcc and option
-mmcu=atmega161
as described in avr-lib.pdf from Rich Neswold, date January 23, 2001,
I get this:

Wrong mcu `atmega161' specified
Allowed mcu's:
at90s2313
at90s2323
at90s2333
attiny22
at90s2343
at90s4433
at90s4414
at90s4434
at90s8515
at90s8535
atmega603
atmega103

When programming ATMega161 with the object code from AT8515, only
parts of the program work (I think because of different interrupt
vector tables).

Does anybody know how to support ATMega161?

best regards
Matthias Goeppner
[email-masked]

From [email-masked] Thu Jul 19 00:32:43 2001
Received: from mail.tps.de ([195.126.171.2] ident=daemon)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15MqVG-0002tJ-00
for <[email-masked]>; Thu, 19 Jul 2001 00:32:38 +1200
Received: (from daemon@localhost)
by mail.tps.de (8.8.7/8.8.7) id OAA01833
for <[email-masked]>; Wed, 18 Jul 2001 14:31:25 +0200
Received: from UNKNOWN(193.96.199.65), claiming to be "goepplinux"
via SMTP by mail.tps.de, id smtpda01830; Wed Jul 18 14:30:43 2001
From: Matthias =?iso-8859-1?q?G=F6ppner?= <[email-masked]>
Organization: TSP
Subject: [avr-gcc-list] atmega161 compilation support
Date: Wed, 18 Jul 2001 13:44:25 +0200
X-Mailer: KMail [version 1.1.99]
Content-Type: text/plain;
charset="iso-8859-1"
MIME-Version: 1.0
Message-Id: <01071813440101.00861@goepplinux>
Content-Transfer-Encoding: 8bit
To: "[email-masked]" <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

I want to use the microcontroller ATMega161(now available after all!)
instead of AT8515.
When compiling C source code with avr-gcc and option
-mmcu=atmega161
as described in avr-lib.pdf from Rich Neswold, date January 23, 2001,
I get this:

Wrong mcu `atmega161' specified
Allowed mcu's:
at90s2313
at90s2323
at90s2333
attiny22
at90s2343
at90s4433
at90s4414
at90s4434
at90s8515
at90s8535
atmega603
atmega103

When programming ATMega161 with the object code from AT8515, only
parts of the program work (I think because of different interrupt
vector tables).

Does anybody know how to support ATMega161?

best regards
Matthias Goeppner
[email-masked]

-------------------------------------------------------

--
Mit freundlichen Grüßen
Matthias Göppner

--
TSP - Teleprocessing Systems & Products mbH
Matthias Goeppner [email-masked]
Altenreuth 5 95326 Kulmbach - Germany
phone: +49 9221 804253 fax : +49 9221 8219015

From [email-masked] Thu Jul 19 03:55:03 2001
Received: from exchange.prism.co.za ([196.34.63.66])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15MtfC-00031e-00
for <[email-masked]>; Thu, 19 Jul 2001 03:55:02 +1200
Received: by EXCHANGE with Internet Mail Service (5.5.2653.19)
id <NHP1MKB9>; Wed, 18 Jul 2001 18:02:04 +0200
Message-ID: <C84D1E1984CBD411BCEF00D0B7A7D5C9013E6895@EXCHANGE>
From: Heinrich Vermeulen <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Date: Wed, 18 Jul 2001 18:02:03 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
charset="iso-8859-1"
Subject: [avr-gcc-list] strtol linker error
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi

I got the following message when linking:
"avr-gcc ***sourceobjectfiles*** /opt/avrgcc/avr/lib/avr3/libc.a
/opt/avrgcc/avr/lib/avr3/libc.m -Wl,-Map=itim.map,--cref,-Tatmega103.x
-mmcu=atmega103 -o itim.elf
/opt/avrgcc/avr/lib/avr3/libc.a (strtol.o): In function 'strtol':
/opt/avrgcc/avr-libc-20010331/src/bsd/strtol.c:113: undefined refernce to
'_ldiv'
"

What could be the problem or is it a bug?

Thanks
Heinrich Vermeulen
[email-masked]

From [email-masked] Thu Jul 19 05:18:29 2001
Received: from dt083nf7.san.rr.com ([204.210.26.247] helo=mail.lightner.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Muxx-000365-00
for <[email-masked]>; Thu, 19 Jul 2001 05:18:29 +1200
Received: from lightner.net (snert [209.75.29.100])
by mail.lightner.net (8.8.7/8.8.6) with ESMTP id KAA26467;
Wed, 18 Jul 2001 10:17:49 -0700
Message-ID: <[email-masked]>
Date: Wed, 18 Jul 2001 10:15:20 -0700
From: "Bruce D. Lightner" <[email-masked]>
X-Mailer: Mozilla 4.74 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Problems with AVR-GCC Assembler v2.11 (Duplicate Posting)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

TWIMC:

I seem to have detected a problem with the the AVR-GCC assembler (v2.11),
taken from the Web page "AVR development tools (binaries+source)" at
http://www.combio.de/avr/, mainttained by Gunnar Henne <[email-masked]>.
He suggested that I post this problem here in hopes of finding someone who
knows what the problem is.

In particular, I downloaded and installed the Win32 binaries...

avr-binutils release 2.11 6.8M
avr-gcc release 3.0 3.06M
avr-libc-2001.07.01 sources + install programm for every location 124k
Useful Unix Tools (make.exe, rm.exe ...) 444k

and discovered that the version of "avr-as" included with that release does
not seem to be right.

Note that "avr-gcc" seems to work just fine, and it does create correct
object files when run in the "normal" way. However, if you run "avr-gcc -S"
to instead produce an AVR assembly source file, and then try to run the
assembly source code through "avr-as", you get syntax errors. This has not
been may experience in the past.

After a bit of investigation, it seems that "equates" (e.g., .equ, .equiv,
.set) are somehow "broken" when it comes to AVR instructions which reference
the "equates". Note that when using older releases of the Win32 (and Linux)
AVR GCC tools, there is no problem. Is there some new "secret switch" that
I need to add to the "avr-as" command line?

Here is a simple AVR assembly test program named "x.s" which demonstrates
the problem...

.arch at90s8515
yl = r28
__zero_reg__ = r0

.section .text
adc r14,__zero_reg__
clr r28
clr yl
adc r14,yl
nop

Running the new version of "avr-as" on this file shows the following odd
output:

% \avrgcc\bin\avr-as --verbose -al x.s
GAS LISTING x.s page 1

1 .arch at90s8515
2 yl = r28
3 __zero_reg__ = r0
4
5 .section .text
6 ???? E01C adc r14,__zero_reg__
**** Error:constant value required
7 ???? CC27 clr r28
8 ???? 0024 clr yl
**** Error:constant value required
9 ???? E01C adc r14,yl
**** Error:constant value required
10 ???? 0000 nop
GNU assembler version 2.11 (avr) using BFD version 2.11
x.s: Assembler messages:
x.s:6: Error: constant value required
x.s:8: Error: constant value required
x.s:9: Error: constant value required
GAS LISTING x.s page 1

1 .arch at90s8515
2 yl = r28
3 __zero_reg__ = r0
4
5 .section .text
6 ???? E01C adc r14,__zero_reg__
**** Error:constant value required
7 ???? CC27 clr r28
8 ???? 0024 clr yl
**** Error:constant value required
9 ???? E01C adc r14,yl
**** Error:constant value required
10 ???? 0000 nop
GNU assembler version 2.11 (avr) using BFD version 2.11
x.s: Assembler messages:
x.s:6: Error: constant value required
x.s:8: Error: constant value required
x.s:9: Error: constant value required

Note that it looks like the AVR code is actually being assembled TWICE each
time "avr-as" is run! Of course, the error messages should not be
occurring! You get the same errors if your use ".equ" in place of "=".

Here is output using an older "avr-gcc" release, which shows NO errors:

% \avrgcc\bin\avr-as --verbose -al x.s
GAS LISTING x.s page 1

1 .arch at90s8515
2 yl = r28
3 __zero_reg__ = r0
4
5 .section .text
6 0000 E01C adc r14,__zero_reg__
7 0002 CC27 clr r28
8 0004 CC27 clr yl
9 0006 EC1E adc r14,yl
10 0008 0000 nop
GNU assembler version 2.9.5 (avr) using BFD version 2.9.5.0.13

Anyway, I am confused. I would appreciate your thoughts on this! We are
anxious to switch to the new tools because the newer version of "avr-gcc"
generates much better code. I've found up to a 15% reduction in program
memory space consumed when compiling C-code for larger projects! And, of
course, it would be nice to use the AVR assembler from that newer AVR-GCC
release!

Best regards,

Bruce

P.S.- I have not checked for this problem under Linux (yet).

--
Bruce D. Lightner
Lightner Engineering (http://www.picoweb.net/)
La Jolla, California
Email: [email-masked]
URL: http://www.lightner.net/lightner/bruce/

From [email-masked] Thu Jul 19 06:33:30 2001
Received: from hammer.overta.ru ([195.151.108.138] helo=overta.ru)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Mw8W-0003DP-00
for <[email-masked]>; Thu, 19 Jul 2001 06:33:29 +1200
Received: from [195.151.217.139] (HELO localhost.localdomain)
by overta.ru (CommuniGate Pro SMTP 3.4.7)
with ESMTP id 319554; Wed, 18 Jul 2001 22:31:36 +0400
To: "Bruce D. Lightner" <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Problems with AVR-GCC Assembler v2.11 (Duplicate Posting)
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 18 Jul 2001 22:25:19 +0400
In-Reply-To: "Bruce D. Lightner"'s message of "Wed, 18 Jul 2001 10:15:20 -0700"
Message-ID: <[email-masked]>
Lines: 46
X-Mailer: Gnus v5.7/Emacs 20.4
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Bruce D. Lightner" <[email-masked]> writes:

> TWIMC:
>
> I seem to have detected a problem with the the AVR-GCC assembler (v2.11),
> taken from the Web page "AVR development tools (binaries+source)" at
> http://www.combio.de/avr/, mainttained by Gunnar Henne <[email-masked]>.
> He suggested that I post this problem here in hopes of finding someone who
> knows what the problem is.
>
> In particular, I downloaded and installed the Win32 binaries...
>
> avr-binutils release 2.11 6.8M
> avr-gcc release 3.0 3.06M
> avr-libc-2001.07.01 sources + install programm for every location 124k
> Useful Unix Tools (make.exe, rm.exe ...) 444k
>
> and discovered that the version of "avr-as" included with that release does
> not seem to be right.
>
> Note that "avr-gcc" seems to work just fine, and it does create correct
> object files when run in the "normal" way. However, if you run "avr-gcc -S"
> to instead produce an AVR assembly source file, and then try to run the
> assembly source code through "avr-as", you get syntax errors. This has not
> been may experience in the past.

If you have a look at avr-gcc-3.0 output then you can see

.file "file.c"
.arch avr2
__SREG__ = 0x3f
__SP_H__ = 0x3e
__SP_L__ = 0x3d
__tmp_reg__ = 0
__zero_reg__ = 1
_PC_ = 2
.text

The __zero_reg__ and the __tmp_reg__ eueal to 0 and 1 (not r0 and r1)
It's because new avr-as can understands numbers as a register names.

So, rename your `yl=r28' to `yl=28'.

Denis.

From [email-masked] Wed Jul 18 18:17:06 2001
Received: from mout1.freenet.de ([194.97.50.132] ident=exim)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Mkdt-0002db-00
for <[email-masked]>; Wed, 18 Jul 2001 18:17:06 +1200
Received: from [194.97.50.136] (helo=mx3.freenet.de)
by mout1.freenet.de with esmtp (Exim 3.30 #3)
id 15MkdD-0007qb-00
for [email-masked]; Wed, 18 Jul 2001 08:16:23 +0200
Received: from b19ac.pppool.de ([213.7.25.172] helo=panda.freenet.de)
by mx3.freenet.de with esmtp (Exim 3.30 #3)
id 15MkdC-0001D1-00
for [email-masked]; Wed, 18 Jul 2001 08:16:23 +0200
Received: from cristian by panda.freenet.de with local (Exim 3.22 #6)
id 15MkbT-0000A6-00
for [email-masked]; Wed, 18 Jul 2001 08:14:35 +0200
Content-Type: text/plain;
charset="iso-8859-1"
From: Christian =?iso-8859-1?q?M=F6nch?= <[email-masked]>
To: <[email-masked]>
Subject: Re: [avr-gcc-list] using external ram with gcc on stk200
Date: Wed, 18 Jul 2001 08:14:35 +0200
X-Mailer: KMail [version 1.2]
References: <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <01071808143500.00451@panda>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi

> How can I use the external SRAM with gcc.
>
> I found an old FAQ, there I have to change the ldscript, but this chang=
e
> nothing on my output
> files.
>
> ->
> data (rw!x) : ORIGIN =3D 0x60, LENGTH 512 changed to 4K for example bu=
t
> no result!

Maybe you have to tell the compiler, where to put the stack. The compiler=
=20
option `-minit-stack=3D0x7fff' worked for me (with 32k).

Greetings,
Christian

From [email-masked] Thu Jul 19 08:53:15 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15MyJn-0003JW-00
for <[email-masked]>; Thu, 19 Jul 2001 08:53:15 +1200
Received: from cel1.jpk.co.nz (adsl-179.world-net.co.nz [210.55.228.179])
by mail.world-net.co.nz (8.9.3/8.9.3) with ESMTP id IAA15781
for <[email-masked]>; Thu, 19 Jul 2001 08:53:15 +1200
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Thu, 19 Jul 2001 08:55:00 +1200
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] strtol linker error
In-Reply-To: <C84D1E1984CBD411BCEF00D0B7A7D5C9013E6895@EXCHANGE>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

At 04:02 19/07/2001, Heinrich Vermeulen wrote:
>Hi
>
>I got the following message when linking:
>"avr-gcc ***sourceobjectfiles*** /opt/avrgcc/avr/lib/avr3/libc.a
>/opt/avrgcc/avr/lib/avr3/libc.m -Wl,-Map=itim.map,--cref,-Tatmega103.x
>-mmcu=atmega103 -o itim.elf
>/opt/avrgcc/avr/lib/avr3/libc.a (strtol.o): In function 'strtol':
>/opt/avrgcc/avr-libc-20010331/src/bsd/strtol.c:113: undefined refernce to
>'_ldiv'
>"
>
>What could be the problem or is it a bug?

Incompatible versions of gcc and avr-libc, there were some name changes a
while ago when more optimised mul and div routines were put in the gcc avr
port source. Get a more upto date avr-libc from
http://www.amelek.gda.pl/avr/libc/ and your problems should vanish.

Cheers,

Jason Kyle

>Thanks
>Heinrich Vermeulen
>[email-masked]
>
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Thu Jul 19 11:16:17 2001
Received: from [63.239.228.194] (helo=cliff.logicpd.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15N0YD-0003PG-00
for <[email-masked]>; Thu, 19 Jul 2001 11:16:17 +1200
Received: by cliff.logicpd.com with Internet Mail Service (5.5.2650.21)
id <3M4PHA97>; Wed, 18 Jul 2001 18:15:19 -0500
Message-ID: <[email-masked]>
From: Randy Kleinman <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Date: Wed, 18 Jul 2001 18:15:19 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: text/plain;
charset="iso-8859-1"
Subject: [avr-gcc-list] Hex File Generation in AVR-GCC
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello all-
I am using a ATmega163 and have just recently install gcc 3.0 and binutils
2.11.2. I want to generate a hex file rather than the stardard elf "a.out"
file. Can anyone help me with this dilemma?

Thanks
Randy Kleinman

From [email-masked] Thu Jul 19 12:41:22 2001
Received: from mailout03.sul.t-online.com ([194.25.134.81] helo=mailout03.sul.t-online.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15N1sY-0003TI-00
for <[email-masked]>; Thu, 19 Jul 2001 12:41:22 +1200
Received: from fwd01.sul.t-online.de
by mailout03.sul.t-online.de with smtp
id 15N1ru-0005S0-01; Thu, 19 Jul 2001 02:40:42 +0200
Received: from d700 (520072611635-0001@[217.81.198.88]) by fmrl01.sul.t-online.com
with smtp id 15N1rh-1jaFLUC; Thu, 19 Jul 2001 02:40:29 +0200
From: "Andreas Schwarz" <[email-masked]>
To: "Randy Kleinman" <[email-masked]>
Cc: <[email-masked]>
Subject: AW: [avr-gcc-list] Hex File Generation in AVR-GCC
Date: Thu, 19 Jul 2001 02:42:38 +0200
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
In-Reply-To: <[email-masked]>
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
X-Sender: [email-masked]
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

> I am using a ATmega163 and have just recently install gcc 3.0 and binutils
> 2.11.2. I want to generate a hex file rather than the stardard elf "a.out"
> file. Can anyone help me with this dilemma?

try this:
avr-objcopy -O ihex a.out hexfile.hex

Andreas

From [email-masked] Fri Jul 20 18:36:51 2001
Received: from nuustak.csir.co.za ([146.64.10.11])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15NTu5-0004c7-00
for <[email-masked]>; Fri, 20 Jul 2001 18:36:50 +1200
Received: from CS-IMO.CSIR.CO.ZA (cs-imo.csir.co.za [146.64.10.94])
by nuustak.csir.co.za (8.10.1/8.10.1) with SMTP id f6K6Zu525018
for <[email-masked]>; Fri, 20 Jul 2001 08:35:56 +0200 (SAT)
Disclaimer: The CSIR exercises no editorial control over E-mail
messages originating in the organisation and the views in this
message are therefore not necessarily those of the CSIR and/or
its employees.
Received: from GW-IMO-Message_Server by CS-IMO.CSIR.CO.ZA
with Novell_GroupWise; Fri, 20 Jul 2001 08:35:52 +0200
Message-Id: <[email-masked]>
X-Mailer: Novell GroupWise Internet Agent 5.5.4.1
Date: Fri, 20 Jul 2001 08:35:38 +0200
From: "Peter Bosscha" <[email-masked]>
To: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Subject: [avr-gcc-list] AVRGCC initialisation of variables
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,=20

Does anyone have a gracefull method of avoiding AVRGCC cleaning out =
variables @ reset ?
I want to retain the value of my Realtime Clock variables when the part =
resets.

Secondly,
Would it not be a good idea to have a FAQ somewhere ? I see the same =
issues coming up on the list time and again:
- volatile variables (I got caught also)
- Progmem issues
- external memory use
etc.

It's great that the same people keep on answering and helping but I =
suppose they'll get tired of that at some stage.

Regards,

Peter

From [email-masked] Fri Jul 20 20:13:28 2001
Received: from netti.nic.fi ([212.38.224.82])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15NVPb-0004gW-00
for <[email-masked]>; Fri, 20 Jul 2001 20:13:27 +1200
Received: (qmail 28974 invoked by uid 101); 20 Jul 2001 11:12:31 +0300
Message-ID: <[email-masked]>
To: <[email-masked]>
Subject: Re: [avr-gcc-list] AVRGCC initialisation of variables
Date: Fri, 20 Jul 2001 08:12:31 -0000
From: <[email-masked]>
X-Mailer: TWIG 2.6.0.cvs
In-Reply-To: <[email-masked]>
X-Client-IP: 194.19.8.2
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Peter Bosscha <[email-masked]> sanoi:

> Hi,
>
> Does anyone have a gracefull method of avoiding AVRGCC cleaning out
variables @ reset ?

reset ???
Do You mean HW reset .... or ....

> I want to retain the value of my Realtime Clock variables when the part
resets.

I'd suggest using the internal EEPROM.

Or a separate RTC with it's own backup battery.
ex. philips PCF8593/PCF8583 i2c RTC.

Or an external non-volatile memory, flash, eeprom .......

>
> Secondly,
> Would it not be a good idea to have a FAQ somewhere ? I see the
same issues coming up on the list time and again:
> - volatile variables (I got caught also)
> - Progmem issues
> - external memory use
> etc.

Yes, and in addition to a FAQ, I've missed some
AVR-specific GCC-docs ....

Try www.avrfreaks.net ....

>
> It's great that the same people keep on answering and helping but I
suppose they'll get tired of that at some stage.

Let's hope that the ones who have the knowledge don't
get tired of helping us (atleast me :-) for whom everything
ain't clear as water ....

>
> Regards,
>
> Peter

BR: Jussi
>
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

________________________________________________________________
Ilmainen Internet @ http://www.nic.fi/

From [email-masked] Sat Jul 21 04:18:31 2001
Received: from dt083nf7.san.rr.com ([204.210.26.247] helo=mail.lightner.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Ncz1-0004zv-00
for <[email-masked]>; Sat, 21 Jul 2001 04:18:31 +1200
Received: from lightner.net (snert [209.75.29.100])
by mail.lightner.net (8.8.7/8.8.6) with ESMTP id JAA00583;
Fri, 20 Jul 2001 09:18:00 -0700
Message-ID: <[email-masked]>
Date: Fri, 20 Jul 2001 09:15:27 -0700
From: "Bruce D. Lightner" <[email-masked]>
X-Mailer: Mozilla 4.74 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
CC: "Stephen D. Freyder" <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] More Problems with AVR-AS v2.11
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Denis or ????,

Thank you for your hints on adapting to the "new and improved" assembler
"avr-as" v2.11, although I don't understand why the changes were made. Does
anyone know the answer?

Anyway, in switching over to the lastest AVR-GCC release, we of couse would
like to include the AVR assembly code that we are using today without a
bunch of re-writes. We have a number of macros that allow us to manipulate
16-bit quantities, for example "movw r24,r16", which moves a 16-bit quantity
from r16/r17 to r24/r25.

In trying to switch from the older AVR register notation (e.g., r24) to the
new "number" based scheme, as Denis Chertykov suggested, we added a number
of "equates" of the form "r24=24", etc. However, it seems that AVR-GCC is
giving us problems. Here is a simple test file that exposes the problem:

;
; AVR assembly code shows unexpected
; syntax error with GNU assembler
; version 2.11 (avr) using BFD
; version 2.11
;
r30 = 30
r31 = 31

r30l = 30
r30h = 31

x30 = 30
x31 = 31

x30l = 30
x30h = 31

zl = 30
zh = 31

z = 30

.macro movw p0 ,p1, l=l, h=h
mov \p0\l,\p1\l
mov \p0\h,\p1\h
.endm

movw z,z ; works
movw x30,x30 ; works
movw r30,r30 ; assembly error!!

When this is assembled with AVR-AS 2.11, syntax errors result for the last
line. Based on my understanding of the "new scheme", this does not make
sense to me. Here is the output from running "avr-as" (under Win32)...

% /avrgcc/bin/avr-as --verbose -aml=test.lst -o test.o test.s
GNU assembler version 2.11 (avr) using BFD version 2.11
test.s: Assembler messages:
test.s:32: Error: register name or number from 0 to 31 required
test.s:32: Error: register name or number from 0 to 31 required
test.s:32: Error: register name or number from 0 to 31 required
test.s:32: Error: register name or number from 0 to 31 required

and here is the assembly listing...

GAS LISTING test.s page 1

1 .arch avr2
2 ;
3 ; AVR assembly code shows unexpected
4 ; syntax error with GNU assembler
5 ; version 2.11 (avr) using BFD
6 ; version 2.11
7 ;
8 r30 = 30
9 r31 = 31
10
11 r30l = 30
12 r30h = 31
13
14 x30 = 30
15 x31 = 31
16
17 x30l = 30
18 x30h = 31
19
20 zl = 30
21 zh = 31
22
23 z = 30
24
25 .macro movw p0 ,p1, l=l, h=h
26 mov \p0\l,\p1\l
27 mov \p0\h,\p1\h
28 .endm
29
30 movw z,z ; works
30 ???? EE2F > mov zl,zl
30 ???? FF2F > mov zh,zh
31 movw x30,x30 ; works
31 ???? EE2F > mov x30l,x30l
31 ???? FF2F > mov x30h,x30h
32 movw r30,r30 ; assembly error!!
32 ???? FF2F > mov r30l,r30l
**** Error:register name or number from 0 to 31 required
32 ???? FF2F > mov r30h,r30h
**** Error:register name or number from 0 to 31 required

I am puzzled! Note that changing the definition of"r30l" and "r30h" to...

r30l = r30
r30h = r31

...does not make any difference. Clearly "r30l" is treated very differently
than "x30l"!

Any help in making sense of this would be most appreciated.

Best regards,

Bruce

--
Bruce D. Lightner
La Jolla, California
Email: [email-masked]
URL: http://www.lightner.net/lightner/bruce/

From [email-masked] Sun Jul 22 09:37:20 2001
Received: from [202.159.65.171] (helo=ns2.wasantara.net.id)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15O4R4-0007mQ-00
for <[email-masked]>; Sun, 22 Jul 2001 09:37:20 +1200
Received: (qmail 25955 invoked by uid 1002); 21 Jul 2001 22:53:51 -0000
Received: from unknown (HELO salatiga.wasantara.net.id) (172.16.5.163)
by ns2.wasantara.net.id with SMTP; 21 Jul 2001 22:53:51 -0000
Received: from SALATIGA/SpoolDir by salatiga.wasantara.net.id (Mercury 1.44);
22 Jul 01 05:01:46 +0700
Received: from SpoolDir by SALATIGA (Mercury 1.44); 22 Jul 01 05:01:34 +0700
Received: from serverii (172.16.5.190) by salatiga.wasantara.net.id (Mercury 1.44);
22 Jul 01 05:01:29 +0700
Message-ID: <[email-masked]>
From: "Akram Batara" <[email-masked]>
To: <[email-masked]>
Date: Sun, 22 Jul 2001 04:42:18 +0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Subject: [avr-gcc-list] AVRGCC C Compiler Reference ?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Is there any documentation about AVRGCC C Compiler Reference like the other
C compiler for AVR?

Maybe the documentation consist of what are C standard functions (example :
random number function) work in AVR processor.

Akram

From [email-masked] Sun Jul 22 15:57:59 2001
Received: from cpe-144-132-229-161.nsw.bigpond.net.au ([144.132.229.161] helo=ringtail.wildpossum.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15OANS-00082a-00
for <[email-masked]>; Sun, 22 Jul 2001 15:57:58 +1200
Received: from localhost (localhost [[UNIX: localhost]])
by ringtail.wildpossum.com (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) id f6M3xxi04144
for [email-masked]; Sun, 22 Jul 2001 13:59:59 +1000
Content-Type: text/plain;
charset="iso-8859-1"
From: Gahame Kelly <[email-masked]>
Reply-To: [email-masked]
Organization: Wild Possum
To: "AVR-GCC" <[email-masked]>
Date: Sun, 22 Jul 2001 13:59:58 +1000
X-Mailer: KMail [version 1.2]
MIME-Version: 1.0
Message-Id: <01072213595804.02703@ringtail>
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] ../../../avr/bin/ld: cannot open crts2313.o: HELP
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi All.

I am using binutils-2.11.2, gcc-3.0, avr-libc-20010701. All compiled, ins=
tall
and running correctly. My exported path has /opt/avr/bin first in the pat=
h=20
environment.

My problem is with the following error.
/opt/avr/lib/gcc-lib/avr/3.0/../../../../avr/bin/ld: cannot open crts2313=
=2Eo:=20
No such file or directory
make: *** [keymain.elf] Error 1

I have checked and rechecked - crts2313.o does exist, has permissions
for all to read, but I am a little perplexed as to why it faults. I note =
from=20
the above error line it go'es back to ../../../avr/bin/ld (which is reall=
y=20
avr-ld, but making a symbolic link /opt/avr/bin/avr-ld <-> /opt/avr/bin/l=
d
made no difference - make produces the same error message.

So I need help please to sort out what I hope is the final hurdle before =
I
can get stuff into AVR C programming.

Any assistance apprecriated. Cheers, Grahame.
-------------------------------------------------------------------------=
--------

gmkelly@ringtail:~/AVR/AVR-TEST/hg-sware-0.91/board > make

avr-gcc -c -O3 -Wall -fomit-frame-pointer -Wstrict-prototypes=20
-Wa,-ahlms=3Dkeymain.lst -mmcu=3Dat90s2313 -I/opt/avr/include keymain.c -=
o=20
keymain.o

keymain.c:71: warning: return type of `main' is not `int'

avr-gcc -c -O3 -Wall -fomit-frame-pointer -Wstrict-prototypes=20
-Wa,-ahlms=3Dkeysta.lst -mmcu=3Dat90s2313 -I/opt/avr/include keysta.c -o =
keysta.o

avr-gcc -c -O3 -Wall -fomit-frame-pointer -Wstrict-prototypes=20
-Wa,-ahlms=3Dlcd.lst -mmcu=3Dat90s2313 -I/opt/avr/include lcd.c -o lcd.o
avr-gcc keymain.o keysta.o lcd.o -Wl,-Map=3Dkeymain.map,--cref=20
-mmcu=3Dat90s2313 -o keymain.elf

/opt/avr/lib/gcc-lib/avr/3.0/../../../../avr/bin/ld: cannot open crts2313=
=2Eo:=20
No such file or directory
make: *** [keymain.elf] Error 1

From [email-masked] Mon Jul 23 01:11:27 2001
Received: from overclockers.zip.com.au ([61.8.3.18] helo=odin.zip.com.au)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15OJ15-0008PH-00
for <[email-masked]>; Mon, 23 Jul 2001 01:11:27 +1200
Received: from mwp by odin.zip.com.au with local-esmtp (Exim 3.12 #1 (Debian))
id 15OJ0j-0002v3-00; Sun, 22 Jul 2001 23:11:05 +1000
Date: Sun, 22 Jul 2001 23:11:05 +1000 (EST)
From: MWP <[email-masked]>
X-Sender: [email-masked]
To: Gahame Kelly <[email-masked]>
cc: AVR-GCC <[email-masked]>
Subject: Re: [avr-gcc-list] ../../../avr/bin/ld: cannot open crts2313.o: HELP
In-Reply-To: <01072213595804.02703@ringtail>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi...

Rather funny, this sounds EXACTLY the same as an email i posted to this
list about a month ago.

I got the problem fixed, but not really solved (if you get my drift).
In the end i re-downloaded the latest snapshots of gcc, binutils and
avr-libc which i then recompiled. This solved the problem.
So i cant tell you what caused the problem, or how to fix it without
taking the annoying steps i did.

MWP

On Sun, 22 Jul 2001, Gahame Kelly wrote:

> Hi All.
>
> I am using binutils-2.11.2, gcc-3.0, avr-libc-20010701. All compiled, install
> and running correctly. My exported path has /opt/avr/bin first in the path
> environment.
>
> My problem is with the following error.
> /opt/avr/lib/gcc-lib/avr/3.0/../../../../avr/bin/ld: cannot open crts2313.o:
> No such file or directory
> make: *** [keymain.elf] Error 1
>
> I have checked and rechecked - crts2313.o does exist, has permissions
> for all to read, but I am a little perplexed as to why it faults. I note from
> the above error line it go'es back to ../../../avr/bin/ld (which is really
> avr-ld, but making a symbolic link /opt/avr/bin/avr-ld <-> /opt/avr/bin/ld
> made no difference - make produces the same error message.
>
> So I need help please to sort out what I hope is the final hurdle before I
> can get stuff into AVR C programming.
>
> Any assistance apprecriated. Cheers, Grahame.
> ---------------------------------------------------------------------------------
>
> gmkelly@ringtail:~/AVR/AVR-TEST/hg-sware-0.91/board > make
>
> avr-gcc -c -O3 -Wall -fomit-frame-pointer -Wstrict-prototypes
> -Wa,-ahlms=keymain.lst -mmcu=at90s2313 -I/opt/avr/include keymain.c -o
> keymain.o
>
> keymain.c:71: warning: return type of `main' is not `int'
>
> avr-gcc -c -O3 -Wall -fomit-frame-pointer -Wstrict-prototypes
> -Wa,-ahlms=keysta.lst -mmcu=at90s2313 -I/opt/avr/include keysta.c -o keysta.o
>
> avr-gcc -c -O3 -Wall -fomit-frame-pointer -Wstrict-prototypes
> -Wa,-ahlms=lcd.lst -mmcu=at90s2313 -I/opt/avr/include lcd.c -o lcd.o
> avr-gcc keymain.o keysta.o lcd.o -Wl,-Map=keymain.map,--cref
> -mmcu=at90s2313 -o keymain.elf
>
> /opt/avr/lib/gcc-lib/avr/3.0/../../../../avr/bin/ld: cannot open crts2313.o:
> No such file or directory
> make: *** [keymain.elf] Error 1
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Mon Jul 23 06:07:59 2001
Received: from [195.235.113.141] (helo=tsmtp8.mail.isp)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ONe2-00009v-00
for <[email-masked]>; Mon, 23 Jul 2001 06:07:58 +1200
Received: from gines ([213.96.107.254]) by tsmtp8.mail.isp
(Netscape Messaging Server 4.15 tsmtp8 Jun 8 2001 14:53:09)
with SMTP id GGVZKR00.OQN for <[email-masked]>; Sun,
22 Jul 2001 20:05:15 +0200
Message-ID: <[email-masked]>
From: "Gines Martinez Sanchez" <[email-masked]>
To: <[email-masked]>
Date: Sun, 22 Jul 2001 20:02:34 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Subject: [avr-gcc-list] SPI interface and AT25XXX eeprom
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Has anybody a sample of writing to at25xxx eeprom using the SPI interface of
a 8515 or AT163?
Thanks, Gins

From [email-masked] Mon Jul 23 15:12:00 2001
Received: from cpe-144-132-229-161.nsw.bigpond.net.au ([144.132.229.161] helo=ringtail.wildpossum.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15OW8V-0000bN-00
for <[email-masked]>; Mon, 23 Jul 2001 15:12:00 +1200
Received: from localhost (localhost [[UNIX: localhost]])
by ringtail.wildpossum.com (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) id f6N3B8L08253
for [email-masked]; Mon, 23 Jul 2001 13:11:09 +1000
Content-Type: text/plain;
charset="iso-8859-1"
From: Gahame Kelly <[email-masked]>
Reply-To: [email-masked]
Organization: Wild Possum
To: [email-masked]
Date: Mon, 23 Jul 2001 13:11:08 +1000
X-Mailer: KMail [version 1.2]
References: <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Message-Id: <0107231311080G.02703@ringtail>
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] Incorrect path to avr lib objects
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi All.
Thanks Arne & MWP for responding.

I have also carried out the install as below which closely follows
what you have done.

Installation af binutils:

a) tar xzf binutils-2.11.2.tar.gz
b) cd binutils-2.11.2
c) ./configure --target=3Davr \
--prefix=3D/opt/avr
d) make
e) make install

Update PATH to include: /opt/avr/bin

Installation af GCC:

f) tar xzf gcc-3.0.tar.gz
g) cd gcc-3.0
h) ./configure --target=3Davr \
--prefix=3D/opt/avr \
--enable-languages=3Dc
i) make
j) make install

I still get a problem in that avr-gcc/avr-ld cannot find the crts2313.o o=
n the
following Make.

gmkelly@ringtail:~/AVR/AVR-TEST/hg-sware-0.91/board > make
avr-gcc -c -O3 -Wall -fomit-frame-pointer -Wstrict-prototypes=20
-Wa,-ahlms=3Dkeymain.lst -mmcu=3Dat90s2313 -I/opt/avr/include keymain.c -=
o=20
keymain.o
keymain.c:71: warning: return type of `main' is not `int'

avr-gcc -c -O3 -Wall -fomit-frame-pointer -Wstrict-prototypes=20
-Wa,-ahlms=3Dkeysta.lst -mmcu=3Dat90s2313 -I/opt/avr/include keysta.c -o =
keysta.o

avr-gcc -c -O3 -Wall -fomit-frame-pointer -Wstrict-prototypes=20
-Wa,-ahlms=3Dlcd.lst -mmcu=3Dat90s2313 -I/opt/avr/include lcd.c -o lcd.o

avr-gcc keymain.o keysta.o lcd.o -L /opt/avr/lib=20
-Wl,-Map=3Dkeymain.map,--cref -mmcu=3Dat90s2313 -o keymain.elf

/opt/avr/lib/gcc-lib/avr/3.0/../../../../avr/bin/ld: cannot open crts2313=
=2Eo:=20
No such file or directory
make: *** [keymain.elf] Error 1

*********
Now if I put the crts2313.o file in the pwd it works, as shown below.

*********

gmkelly@ringtail:~/AVR/AVR-TEST/hg-sware-0.91/board > mv crts2313.o.gmk=20
crts2313.o

gmkelly@ringtail:~/AVR/AVR-TEST/hg-sware-0.91/board > make
avr-gcc keymain.o keysta.o lcd.o -L /opt/avr/lib=20
-Wl,-Map=3Dkeymain.map,--cref -mmcu=3Dat90s2313 -o keymain.elf
avr-objcopy -O srec keymain.elf keymain.rom
avr-objcopy -j .eeprom --set-section-flags=3D.eeprom=3D"alloc,load" -O sr=
ec=20
keymain.elf keymain.eep

********

And everything is correct. So, it seems that the avr-gcc/avr-ld cannot fi=
nd
the corresponding file: crts2313.o in the /opt/avr/lib

*******

gmkelly@ringtail:/opt/avr > ls
avr bin include info lib man share

gmkelly@ringtail:/opt/avr > cd lib

gmkelly@ringtail:/opt/avr/lib > ls -l
total 3418
drwxr-xr-x 2 root root 129 Jul 22 19:31 avr3
drwxr-xr-x 2 root root 103 Jul 22 19:31 avr4
drwxr-xr-x 2 root root 179 Jul 22 19:31 avr5
-rw-r--r-- 1 root root 2728 Jul 22 19:31 crtc8534.o
-rw-r--r-- 1 root root 1280 Jul 22 19:31 crts1200.o
-rw-r--r-- 1 root root 2984 Jul 22 19:31 crts2313.o
-rw-r--r-- 1 root root 2440 Jul 22 19:31 crts2323.o
-rw-r--r-- 1 root root 3168 Jul 22 19:31 crts2333.o
-rw-r--r-- 1 root root 2440 Jul 22 19:31 crts2343.o
-rw-r--r-- 1 root root 3196 Jul 22 19:31 crts4414.o
-rw-r--r-- 1 root root 3168 Jul 22 19:31 crts4433.o
-rw-r--r-- 1 root root 3464 Jul 22 19:31 crts4434.o
-rw-r--r-- 1 root root 3196 Jul 22 19:31 crts8515.o
-rw-r--r-- 1 root root 3464 Jul 22 19:31 crts8535.o
-rw-r--r-- 1 root root 1352 Jul 22 19:31 crttn11.o
-rw-r--r-- 1 root root 1416 Jul 22 19:31 crttn12.o
-rw-r--r-- 1 root root 1620 Jul 22 19:31 crttn15.o
-rw-r--r-- 1 root root 2440 Jul 22 19:31 crttn22.o
-rw-r--r-- 1 root root 1416 Jul 22 19:31 crttn28.o
drwxr-xr-x 3 root root 54 Jul 22 19:30 gcc-lib
-rw-r--r-- 1 root root 2429930 Jul 22 19:28 libbfd.a
-rwxr-xr-x 1 root root 648 Jul 22 19:28 libbfd.la
-rw-r--r-- 1 root root 114228 Jul 22 19:31 libc.a
-rw-r--r-- 1 root root 635576 Jul 23 12:48 libiberty.a
-rw-r--r-- 1 root root 79764 Jul 22 19:31 libm.a
-rw-r--r-- 1 root root 154668 Jul 22 19:28 libopcodes.a
-rwxr-xr-x 1 root root 660 Jul 22 19:28 libopcodes.la

***************

This is very strange as it all exists as shown below. However, running
avr-gcc -print-search-dirs it doesn't correctly point to /opt/avr/lib so =
there
must be a configuration directive to make avr-gcc/avr-ld see it.

**************

install: /opt/avr/lib/gcc-lib/avr/3.0/
programs:=20
=3D/opt/avr/lib/gcc-lib/avr/3.0/:/opt/avr/lib/gcc-lib/avr/3.0/:/opt/avr/l=
ib/gcc-lib/avr/:/usr/lib/gcc/avr/3.0/:/usr/lib/gcc/avr/:/opt/avr/lib/gcc-=
lib/avr/3.0/../../../../avr/bin/avr/3.0/:/opt/avr/lib/gcc-lib/avr/3.0/../=
=2E./../../avr/bin/
libraries:=20
=3D/opt/avr/lib/gcc-lib/avr/3.0/:/usr/lib/gcc/avr/3.0/:/opt/avr/lib/gcc-l=
ib/avr/3.0/../../../../avr/lib/avr/3.0/:/opt/avr/lib/gcc-lib/avr/3.0/../.=
=2E/../../avr/lib/

I have looked through the GNU/gcc FAQ and other bits and pieces on
configuration setup, but can't solve this last issue.

Any assistance much appreciated.
Thanks Grahame.

From [email-masked] Mon Jul 23 20:52:30 2001
Received: from varis.cs.tut.fi
([130.230.4.42] helo=cs.tut.fi ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ObS0-0000ph-00
for <[email-masked]>; Mon, 23 Jul 2001 20:52:29 +1200
Received: from orfeuskerttu.cs.tut.fi ([email-masked] [130.230.2.34])
by cs.tut.fi (8.8.8/8.8.8) with ESMTP id LAA25526;
Mon, 23 Jul 2001 11:52:04 +0300 (EET DST)
From: Kujala Matti <[email-masked]>
Received: (from ear@localhost)
by orfeuskerttu.cs.tut.fi (8.8.5/8.8.4)
id LAA21628; Mon, 23 Jul 2001 11:52:05 +0300 (EET DST)
Message-Id: <[email-masked]>
Subject: Re: [avr-gcc-list] AVRGCC initialisation of variables
In-Reply-To: <[email-masked]> from Peter Bosscha at "Jul 20, 2001 08:35:38 am"
To: [email-masked] (Peter Bosscha)
Date: Mon, 23 Jul 2001 11:52:05 +0300 (EET DST)
Cc: [email-masked]
X-Mailer: ELM [version 2.4ME+ PL49 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> Hi,
>
> Does anyone have a gracefull method of avoiding AVRGCC cleaning out
> variables @ reset ?

You'll probably have to modify the crt1.s startup-file. Also note that
Atmel does guarantee the preservation of SRAM at reset only on some models
of AVR.

--
What sorcery, what spells, have brought thee here?

From [email-masked] Tue Jul 24 04:58:51 2001
Received: from dt083nf7.san.rr.com ([204.210.26.247] helo=mail.lightner.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Oj2g-00019y-00
for <[email-masked]>; Tue, 24 Jul 2001 04:58:50 +1200
Received: from lightner.net (snert [209.75.29.106])
by mail.lightner.net (8.8.7/8.8.6) with ESMTP id JAA09438;
Mon, 23 Jul 2001 09:58:31 -0700
Message-ID: <[email-masked]>
Date: Mon, 23 Jul 2001 09:55:57 -0700
From: "Bruce D. Lightner" <[email-masked]>
X-Mailer: Mozilla 4.74 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: AVR-GCC Mail <[email-masked]>
CC: Peter Bosscha <[email-masked]>
Subject: Re: [avr-gcc-list] AVRGCC initialisation of variables
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Peter,

> Does anyone have a gracefull method of avoiding AVRGCC cleaning out variables @ reset ?
> I want to retain the value of my Realtime Clock variables when the part resets.

We do this by using our own "linker script file". We start with the
"default one", which you can easily get from running the linker with
"--verbose". Then we add a single line for a new section called, for
example, "uninitialized_data" to the logic that outputs the ".bss" data.
For example:

.bss SIZEOF(.data) + ADDR(.data) :
AT (ADDR (.text) + SIZEOF (.text) + SIZEOF (.data))
{
PROVIDE (__bss_start = .) ;
*(.bss)
*(COMMON)
PROVIDE (__bss_end = .) ;
*(uninitialized_data) <--- ADD THIS LINE
_end = . ;
} > data

When linking, you will need to add the -T option to specify your modified
linker script in place of the "default" one.

To make use of your new section called "uninitialized_data" in C-code, use
something like...

unsigned char RTCvars[8] __attribute__((section ("uninitialized_data")));

In AVR assemply, use something like;

.pushsection uninitialized_data
.gloal RTCvars
RTCvars: .skip 8
.popsection

Create and check the "link map" file to verify that things when as planned.
You should find your global label listed in the correct place *after* the
.bss data. Of course, the .bss section is automatically zeroed after the
AVR part is reset by the crt1.s startup-file, but your new section should be
left untouched!

Obviously, you should not expect these locations to contain any particular
data values after the AVR part is power-cycled.

Best regards,

Bruce

--
Bruce D. Lightner
Lightner Engineering (http://www.picoweb.net/)
La Jolla, California
Email: [email-masked]
URL: http://www.lightner.net/lightner/bruce/

From [email-masked] Tue Jul 24 05:34:44 2001
Received: from dt083nf7.san.rr.com ([204.210.26.247] helo=mail.lightner.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15OjbP-0001Bo-00
for <[email-masked]>; Tue, 24 Jul 2001 05:34:43 +1200
Received: from lightner.net (snert [209.75.29.106])
by mail.lightner.net (8.8.7/8.8.6) with ESMTP id KAA09600;
Mon, 23 Jul 2001 10:34:18 -0700
Message-ID: <[email-masked]>
Date: Mon, 23 Jul 2001 10:31:44 -0700
From: "Bruce D. Lightner" <[email-masked]>
X-Mailer: Mozilla 4.74 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Peter Bosscha <[email-masked]>,
AVR-GCC Mail <[email-masked]>
Subject: Re: [avr-gcc-list] AVRGCC initialisation of variables
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Peter,

> Does anyone have a gracefull method of avoiding AVRGCC cleaning out variables @ reset ?
> I want to retain the value of my Realtime Clock variables when the part resets.

I'm not sure this is "graceful", but it has a lot fewer steps than my last
suggestion. You only have to add a couple of lines to your C-code. For
example...

#define RTCvars _end /* give "_end" an alternate name */
extern unsigned char *_end; /* point to SRAM *after* the .bss */
unsigned char i;

i = RTCvars[3]; // access uninitialized SRAM
.
.
.

This makes use of the fact that, by convention, the GNU AVR linker adds a
label called "_end" to mark the very end of the SRAM used by the linker.
You can use this space as "uninitialized data" (i.e., from the label "_end"
to the end of your SRAM, minus what you use for stack space). (It is a bit
of a "kludge", but will work! :-)

Best regards,

Bruce

--
Bruce D. Lightner
Lightner Engineering (http://www.picoweb.net/)
La Jolla, California
Email: [email-masked]
URL: http://www.lightner.net/lightner/bruce/

From [email-masked] Tue Jul 24 07:08:21 2001
Received: from [212.184.210.65] (helo=romulus.maridan.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Ol3z-0001Kf-00
for <[email-masked]>; Tue, 24 Jul 2001 07:08:20 +1200
Received: from egnite.net (pD900A947.dip.t-dialin.net [217.0.169.71])
by romulus.maridan.net (8.9.3/8.9.3) with SMTP id VAA21075
for <[email-masked]>; Mon, 23 Jul 2001 21:07:32 +0200
Message-Id: <[email-masked]>
From: "Harald Kipp" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Mon, 23 Jul 2001 21:10:25 +0100 (MEZ)
Reply-To: "Harald Kipp" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 2.00.1500 for OS/2 Warp 4.00
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] ATmega RTOS And TCP Stack
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

The complete source code compiles with AVRGCC
version 3 and is freely available for download
(and hopefully redistribution) at

http://www.ethernut.de

Have fun.

Harald Kipp

egnite Software GmbH TEL +49 (0)2323-925375
Westring 303 FAX +49 (0)2323-925374
44629 Herne
Germany

Embedded Ethernet - http://www.egnite.de/

From [email-masked] Thu Jul 26 15:13:20 2001
Received: from deborah.paradise.net.nz ([203.96.152.32])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15PbaR-0003az-00
for <[email-masked]>; Thu, 26 Jul 2001 15:13:19 +1200
Received: from mailserver.pertronic.co.nz (203-79-84-113.adsl.paradise.net.nz [203.79.84.113])
by deborah.paradise.net.nz (Postfix) with ESMTP id CFD7E1F9CE1
for <[email-masked]>; Thu, 26 Jul 2001 15:13:14 +1200 (NZST)
Received: by mailserver.pertronic.co.nz with XtraMail-SMTP/POP3-Server (v1.2 78220005830) for <[email-masked]> at Thu, 26 Jul 2001 15:13:01 +1200
Content-Type: text/plain;
charset="iso-8859-1"
From: Simon Eatough <[email-masked]>
Reply-To: [email-masked]
Organization: Pertronic Industries
To: [email-masked]
Date: Thu, 26 Jul 2001 15:14:31 +1200
X-Mailer: KMail [version 1.2]
MIME-Version: 1.0
Message-Id: <01072615143100.01570@simon>
Content-Transfer-Encoding: 8bit
Subject: [avr-gcc-list] atmega128
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi
Was wondering if anybody has information on the atmega 128 yet.
Cheers

Simon Eatough

From [email-masked] Fri Jul 27 08:42:12 2001
Received: from mailout01.sul.t-online.com ([194.25.134.80] helo=mailout01.sul.t-online.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15PrxT-0004HQ-00
for <[email-masked]>; Fri, 27 Jul 2001 08:42:12 +1200
Received: from fwd06.sul.t-online.de
by mailout01.sul.t-online.de with smtp
id 15PrxQ-0004b0-04; Thu, 26 Jul 2001 22:42:08 +0200
Received: from uc-elektronik.de (320055250281-0001@[217.0.154.58]) by fmrl06.sul.t-online.com
with esmtp id 15PrxD-2KFniCC; Thu, 26 Jul 2001 22:41:55 +0200
Message-ID: <[email-masked]>
Date: Thu, 26 Jul 2001 22:46:42 +0200
From: marc <[email-masked]>
X-Mailer: Mozilla 4.77 [de] (X11; U; Linux 2.4.4-4GB i686)
X-Accept-Language: en
MIME-Version: 1.0
CC: [email-masked]
Subject: Re: [avr-gcc-list] atmega128
References: <01072615143100.01570@simon>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Sender: [email-masked]
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Simon Eatough wrote:
>
> Hi
> Was wondering if anybody has information on the atmega 128 yet.
> Cheers

Yes.

The 103 is shrinked and renamed to 128.
Then, there are a few new feature build in (i think, self programmable
and more)

> Simon Eatough

cu
Marc Dressler

From [email-masked] Fri Jul 27 10:21:48 2001
Received: from deborah.paradise.net.nz ([203.96.152.32])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15PtVs-0004Lj-00
for <[email-masked]>; Fri, 27 Jul 2001 10:21:48 +1200
Received: from mailserver.pertronic.co.nz (203-79-84-113.adsl.paradise.net.nz [203.79.84.113])
by deborah.paradise.net.nz (Postfix) with ESMTP id B56411FA209
for <[email-masked]>; Fri, 27 Jul 2001 10:21:46 +1200 (NZST)
Received: by mailserver.pertronic.co.nz with XtraMail-SMTP/POP3-Server (v1.2 78220005830) for <[email-masked]> at Fri, 27 Jul 2001 10:21:27 +1200
Content-Type: text/plain;
charset="iso-8859-1"
From: Simon Eatough <[email-masked]>
Reply-To: [email-masked]
Organization: Pertronic Industries
To: [email-masked]
Subject: Re: [avr-gcc-list] atmega128
Date: Fri, 27 Jul 2001 10:23:04 +1200
X-Mailer: KMail [version 1.2]
References: <01072615143100.01570@simon> <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Message-Id: <01072710230400.01748@simon>
Content-Transfer-Encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Friday 27 July 2001 10:00, you wrote:
Thanks Marc
I've just got some info from our atmel distributer on the 128. the jtag
interface looks interesting as well.

Cheers
Simon.

> Simon Eatough wrote:
> > Hi
> > Was wondering if anybody has information on the atmega 128 yet.
> > Cheers
>
> Yes.
>
> The 103 is shrinked and renamed to 128.
> Then, there are a few new feature build in (i think, self programmable
> and more)
>
> > Simon Eatough
>
> cu
> Marc Dressler
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Fri Jul 27 10:45:06 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15PtsQ-0004NB-00
for <[email-masked]>; Fri, 27 Jul 2001 10:45:06 +1200
Received: from cel1.jpk.co.nz (adsl-179.world-net.co.nz [210.55.228.179])
by mail.world-net.co.nz (8.9.3/8.9.3) with ESMTP id KAA31446
for <[email-masked]>; Fri, 27 Jul 2001 10:46:32 +1200
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Fri, 27 Jul 2001 10:48:03 +1200
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] atmega128
In-Reply-To: <01072710230400.01748@simon>
References: <[email-masked]>
<01072615143100.01570@simon>
<[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Yeah, until I read the following in the ATmega323 datasheet - recent post
on atmels web site (and I assume it will also apply to the mega128):

"The on-chip debug support is considered being private JTAG instructions,
and distributed within ATMEL and to selected 3rd party vendors only."

Looks like another STK500 protocol episode, i've almost finished reverse
engineering that one - guess the JTAG debug instructions will be next if we
want to use open tools. gdb would be very nice with a real debug interface
to the micro, no more costly emulators. Wouldn't it be nice if these
people wouldn't force us to turn their product upside down and shake it
until the secrets fall out, what do they gain?

Cheers,

Jason Kyle

At 10:23 27/07/2001, Simon Eatough wrote:
>On Friday 27 July 2001 10:00, you wrote:
>Thanks Marc
>I've just got some info from our atmel distributer on the 128. the jtag
>interface looks interesting as well.
>
>Cheers
> Simon.

From [email-masked] Mon Jul 30 20:59:10 2001
Received: from hertz.ikp.physik.tu-darmstadt.de ([130.83.24.91])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15R8tH-0000Tx-00
for <[email-masked]>; Mon, 30 Jul 2001 20:59:08 +1200
Received: (from bon@localhost)
by hertz.ikp.physik.tu-darmstadt.de (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) id f6U8xHY18904;
Mon, 30 Jul 2001 10:59:17 +0200
X-Authentication-Warning: hertz.ikp.physik.tu-darmstadt.de: bon set sender to [email-masked] using -f
From: Uwe Bonnes <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <[email-masked]>
Date: Mon, 30 Jul 2001 10:59:17 +0200
To: [email-masked]
X-Mailer: VM 6.90 under Emacs 20.7.1
Subject: [avr-gcc-list] Atmega 323 on atmel site
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

hall,

the atmega323 seems official. A datasheet may be downloaded at
http://www.atmel.com/atmel/acrobat/doc1457.pdf
--
Uwe Bonnes [email-masked]

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

From [email-masked] Tue Jul 31 14:27:41 2001
Received: from femail11.sdc1.sfba.home.com ([24.0.95.107])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15RPG1-00019Q-00
for <[email-masked]>; Tue, 31 Jul 2001 14:27:41 +1200
Received: from hal2001 ([24.77.53.16]) by femail11.sdc1.sfba.home.com
(InterMail vM.4.01.03.20 201-229-121-120-20010223) with SMTP
id <20010731022750.KTHP20215.femail11.sdc1.sfba.home.com@hal2001>
for <[email-masked]>; Mon, 30 Jul 2001 19:27:50 -0700
Message-ID: <000901c11967$48ecf820$0400a8c0@hatjs>
From: "Jamie Morken" <[email-masked]>
To: <[email-masked]>
Date: Mon, 30 Jul 2001 19:19:53 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Subject: [avr-gcc-list] flash erase/write cycles
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

I am wondering if anyone has had problems with the 1000 limit on the
write/erase cycles.

I think I am probably over this limit (or near it) due to my horribly
inefficient methods of programming and software design. Has anyone had any
problems with this limit? I am using a surface mount 8535 chip.

Also I think the new atmel chips that have an fpga and a processor on one
chip are pretty cool. Anyone have experience with these and know if there
will ever be free tools to program the fpga?

best regards,
Jamie Morken

From [email-masked] Tue Jul 31 15:05:53 2001
Received: from sttlpop5.sttl.uswest.net ([206.81.192.5])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15RPqx-0001BO-00
for <[email-masked]>; Tue, 31 Jul 2001 15:05:52 +1200
Received: (qmail 8237 invoked by alias); 31 Jul 2001 03:05:19 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 5386 invoked by uid 0); 31 Jul 2001 03:04:00 -0000
Received: from sdslppp125.sttl.uswest.net (HELO dell) (63.224.46.125)
by sttlpop5.sttl.uswest.net with SMTP; 31 Jul 2001 03:04:00 -0000
Message-ID: <002201c1196c$e6b887e0$0700000a@dell>
From: "Larry Barello" <[email-masked]>
To: "Jamie Morken" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <000901c11967$48ecf820$0400a8c0@hatjs>
Subject: Re: [avr-gcc-list] flash erase/write cycles
Date: Mon, 30 Jul 2001 19:57:12 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Someone, recently, listed their endurance testing results and at 12k
cycles the 8515 was still going strong.

----- Original Message -----
From: "Jamie Morken" <[email-masked]>

> Hi all,
>
> I am wondering if anyone has had problems with the 1000 limit on the
> write/erase cycles.
>
> I think I am probably over this limit (or near it) due to my
horribly
> inefficient methods of programming and software design. Has anyone
had any
> problems with this limit? I am using a surface mount 8535 chip.
>

From [email-masked] Wed Aug 01 20:26:27 2001
Received: from femail13.sdc1.sfba.home.com ([24.0.95.140])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15RrKl-0002JC-00
for <[email-masked]>; Wed, 01 Aug 2001 20:26:27 +1200
Received: from hal2001 ([24.77.53.16]) by femail13.sdc1.sfba.home.com
(InterMail vM.4.01.03.20 201-229-121-120-20010223) with SMTP
id <20010801082639.BUAY18422.femail13.sdc1.sfba.home.com@hal2001>
for <[email-masked]>; Wed, 1 Aug 2001 01:26:39 -0700
Message-ID: <000901c11a62$91bec3c0$0400a8c0@hatjs>
From: "Jamie Morken" <[email-masked]>
To: <[email-masked]>
Date: Wed, 1 Aug 2001 01:18:38 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Subject: [avr-gcc-list] AVR eeprom
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

Is it possible to write to the eeprom with the avr-gcc tools? Is this done
automatically for static variables in the code? Any on chip eeprom
write/read routines floating around in hyperspace are welcome in this
quadrant! :)

best regards,
Jamie Morken

From [email-masked] Wed Aug 01 21:36:47 2001
Received: from maile.telia.com ([194.22.190.16])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15RsQo-0002MU-00
for <[email-masked]>; Wed, 01 Aug 2001 21:36:47 +1200
Received: from d1o926.telia.com (d1o926.telia.com [213.66.172.241])
by maile.telia.com (8.11.2/8.11.0) with ESMTP id f719b1e00905;
Wed, 1 Aug 2001 11:37:01 +0200 (CEST)
Received: from jesper (h152n2fls34o926.telia.com [217.208.35.152])
by d1o926.telia.com (8.10.2/8.10.1) with SMTP id f719b0A23376;
Wed, 1 Aug 2001 11:37:00 +0200 (CEST)
Message-ID: <005201c11a6d$94072c20$65656565@jesper>
From: "Jesper Hansen" <[email-masked]>
To: "Jamie Morken" <[email-masked]>, <[email-masked]>
References: <000901c11a62$91bec3c0$0400a8c0@hatjs>
Subject: Re: [avr-gcc-list] AVR eeprom
Date: Wed, 1 Aug 2001 11:37:21 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Jamie,

EEPROM read/write routines are included with avr-gcc in libc.
See the eeprom.h header file in avr/include.

/Jesper

----- Original Message -----
From: "Jamie Morken" <[email-masked]>
To: <[email-masked]>
Sent: Wednesday, August 01, 2001 10:18 AM
Subject: [avr-gcc-list] AVR eeprom

> Hi all,
>
> Is it possible to write to the eeprom with the avr-gcc tools? Is this
done
> automatically for static variables in the code? Any on chip eeprom
> write/read routines floating around in hyperspace are welcome in this
> quadrant! :)
>
> best regards,
> Jamie Morken
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Wed Aug 01 23:12:44 2001
Received: from mail.alphalink.com.au ([202.161.124.12])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Rtvf-0002RG-00
for <[email-masked]>; Wed, 01 Aug 2001 23:12:44 +1200
Received: from research (d39-ps2-mel.alphalink.com.au [202.161.107.39])
by mail.alphalink.com.au (8.11.4/8.9.3) with SMTP id f71BCsN18227
for <[email-masked]>; Wed, 1 Aug 2001 21:13:00 +1000
From: "Ron Kreymborg" <[email-masked]>
To: <[email-masked]>
Subject: RE: [avr-gcc-list] AVR eeprom
Date: Wed, 1 Aug 2001 21:18:25 +1000
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
In-Reply-To: <000901c11a62$91bec3c0$0400a8c0@hatjs>
Importance: Normal
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> Hi all,
>
> Is it possible to write to the eeprom with the avr-gcc tools? Is
> this done
> automatically for static variables in the code? Any on chip eeprom
> write/read routines floating around in hyperspace are welcome in this
> quadrant! :)
>
> best regards,
> Jamie Morken

Here are some functions I use. You can see what the additional functions
would be for ints, chars, etc.

Regards, Ron

============================================================================
========
#include <eeprom.h>

// An example eeprom variable definition. Use type specifiers to define
// various other types (int, char, etc).
//
float eSomeVariableName __attribute__((section(".eeprom"))) = 10.0; //
initial value

//--------------------------------------------------------------------------
---
// Write a 4-byte float to the specified eeprom address.
//
void eWriteFloat(float *numPtr, void *addr)
{
BYTE *ptr, *num;

ptr = (BYTE*)addr;
num = (BYTE*)numPtr;
eeprom_wb((int)ptr++, *num++); // use gcc AVR extension
eeprom_wb((int)ptr++, *num++);
eeprom_wb((int)ptr++, *num++);
eeprom_wb((int)ptr++, *num++);
}

//--------------------------------------------------------------------------
---
// Read a 4-byte float from the specified address.
//
float eFloat(float *ptr)
{
float a;

eeprom_read_block(&a, (int)ptr, 4); // use gcc AVR extension
return a;
}

// An example of accessing an eeprom variable:
float localFloat;

localFloat = 23.4 + eFloat(&eSomeVariableName);

============================================================================
========

From [email-masked] Thu Aug 02 09:58:26 2001
Received: from pop.gmx.net ([194.221.183.20] helo=mail.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15S40W-0002uS-00
for <[email-masked]>; Thu, 02 Aug 2001 09:58:25 +1200
Received: (qmail 30698 invoked by uid 0); 1 Aug 2001 21:58:16 -0000
Received: from p3e9bacb5.dip.t-dialin.net (HELO gmx.de) (62.155.172.181)
by mail.gmx.net (mp003-rz3) with SMTP; 1 Aug 2001 21:58:16 -0000
Message-ID: <[email-masked]>
Date: Thu, 02 Aug 2001 00:03:38 +0200
From: Karsten Schmidt <[email-masked]>
Reply-To: [email-masked]
Organization: at home
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
References: <[email-masked]>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Subject: [avr-gcc-list] GDB5.0 for avr under linux
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

I successful compiled an tested binutils 2.11 and gcc3.0 for avr under Linux.
Now I’m trying to get gdb running. Has somebody experience to compile
gdb5.0 for target=avr or get gdb4.18 running with gcc3.0 and binutils 2.11
under Linux.
Any hint are welcome.

Kind regards.

Karsten Schmidt

From [email-masked] Thu Aug 02 12:39:59 2001
Received: from cascara.uvic.ca ([142.104.5.28] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15S6Ws-00032D-00
for <[email-masked]>; Thu, 02 Aug 2001 12:39:58 +1200
Received: from wolfke.home.com (wolfke.cfs.me.UVic.CA [142.104.121.117])
by cascara.uvic.ca (8.11.3/8.11.3) with ESMTP id f720eL122000
for <[email-masked]>; Wed, 1 Aug 2001 17:40:21 -0700
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.0
Date: Wed, 01 Aug 2001 17:40:21 -0700
To: [email-masked]
From: Jamie Morken <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: [avr-gcc-list] atiny 15L
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

I'm designing a board using the atiny 15L and I am wondering about the two
programming modes - high voltage (12 volts on reset' pin) or low voltage (5
volts on reset pin)

the question I have is for low voltage programming and since the reset' pin
is also an ADC input, what will happen if the transducer hooked to the
reset' pin is outputting 5V and then the MISO and MOSI and CLK pins also
happen to be set so that the chip enters programming mode during
operation? Is there a method to avoid this?

best regards,
Jamie Morken

From [email-masked] Thu Aug 02 15:49:42 2001
Received: from smtp04.hk.linkage.net ([202.76.4.20])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15S9US-0003Av-00
for <[email-masked]>; Thu, 02 Aug 2001 15:49:41 +1200
Received: from vita.hk.net ([email-masked] [152.101.101.101])
by smtp04.hk.linkage.net (8.10.2/8.10.2) with SMTP id f723kMp19089
for <[email-masked]>; Thu, 2 Aug 2001 11:46:23 +0800 (HKT)
Date: Thu, 2 Aug 2001 11:49:49 +0800 (HKT)
From: Lai Kang Tin <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] Continue to volatile
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

unsigned long idle_counter = 0L;

while (1)
++idle_counter;

The new version gcc 3.0.1 of AVR still not working for this codes.

From [email-masked] Fri Aug 03 22:49:11 2001
Received: from invalid.ed.ntnu.no ([129.241.179.15])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ScVx-0004N7-00
for <[email-masked]>; Fri, 03 Aug 2001 22:49:10 +1200
Received: from localhost (hembre@localhost)
by invalid.ed.ntnu.no (8.11.3/8.11.3) with ESMTP id f73CliO74914;
Fri, 3 Aug 2001 12:47:45 GMT
(envelope-from [email-masked])
Date: Fri, 3 Aug 2001 12:47:44 +0000 (GMT)
From: Bernt Hustad Hembre <[email-masked]>
X-X-Sender: <[email-masked]>
To: Jamie Morken <[email-masked]>
cc: AVR Mailing List <[email-masked]>
Subject: Re: [avr-gcc-list] atiny 15L
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Wed, 1 Aug 2001, Jamie Morken wrote:

> I'm designing a board using the atiny 15L and I am wondering about the two
> programming modes - high voltage (12 volts on reset' pin) or low voltage (5
> volts on reset pin)

> the question I have is for low voltage programming and since the reset' pin
> is also an ADC input, what will happen if the transducer hooked to the
> reset' pin is outputting 5V and then the MISO and MOSI and CLK pins also
> happen to be set so that the chip enters programming mode during
> operation? Is there a method to avoid this?

Low Voltage programming is disabled if you program the RSTDISBL fuse. And
you have to program this fuse in order to use the pin as input.

Ref. Page 47 of the datasheet (available at http://www.avrfreaks.net)

Bernie
Tlf.: 92648923
[email-masked]

From [email-masked] Fri Aug 03 23:20:49 2001
Received: from [217.125.136.231] (helo=apollo.itoosoft.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15Sd0b-0004Oi-00
for <[email-masked]>; Fri, 03 Aug 2001 23:20:49 +1200
Received: (qmail 1309 invoked from network); 3 Aug 2001 11:19:47 -0000
Received: from itoo100.itoosoft.net (HELO itoo2) (192.168.1.100)
by apollo.itoosoft.net with SMTP; 3 Aug 2001 11:19:47 -0000
Message-ID: <[email-masked]>
From: "Daniel Quintero" <[email-masked]>
To: <[email-masked]>,
<[email-masked]>
References: <[email-masked]> <[email-masked]>
Subject: Re: [avr-gcc-list] GDB5.0 for avr under linux
Date: Fri, 3 Aug 2001 13:23:35 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Karsten

> I successful compiled an tested binutils 2.11 and gcc3.0 for avr under
Linux.
> Now I'm trying to get gdb running. Has somebody experience to compile
> gdb5.0 for target=avr or get gdb4.18 running with gcc3.0 and binutils 2.11
> under Linux.
> Any hint are welcome.

I've moving my avr develop enviroment to linux these days, at this moment is
working gcc3.0, binutils 2.1 and avr-libc-20010701.

I also try to compile gdb5.0 for avr, but seems that isn't supported. There
are some files about avr, but in makefiles i can't found any form to set avr
as target, and in the release changes doesn't appear avr as new platform. I
think that must left some work to use avr in the native distribution.

In other hand, i don't try yet the gdb4.18 with avr patches, is possible
that i try it this weekend. I've also search for a avr simulator under
linux. Have you seen someone ?

Grettings

Daniel Quintero
[email-masked]
www.itoosoft.com
3DStudio Plugins

From [email-masked] Sat Aug 04 12:37:04 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15SpRA-0004xN-00
for <[email-masked]>; Sat, 04 Aug 2001 12:37:04 +1200
Received: from jpk1.jpk.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.9.3/8.9.3) with ESMTP id MAA15302;
Sat, 4 Aug 2001 12:39:55 +1200
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Sat, 04 Aug 2001 12:37:04 +1200
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] GDB5.0 for avr under linux
Cc: [email-masked]
In-Reply-To: <[email-masked]>
References: <[email-masked]>
<[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

At 13:23 3/08/2001 +0200, Daniel Quintero wrote:
>Hi Karsten
>
> > I successful compiled an tested binutils 2.11 and gcc3.0 for avr under
>Linux.
> > Now I'm trying to get gdb running. Has somebody experience to compile
> > gdb5.0 for target=avr or get gdb4.18 running with gcc3.0 and binutils 2.11
> > under Linux.
> > Any hint are welcome.
>
>I've moving my avr develop enviroment to linux these days, at this moment is
>working gcc3.0, binutils 2.1 and avr-libc-20010701.
>
>I also try to compile gdb5.0 for avr, but seems that isn't supported. There
>are some files about avr, but in makefiles i can't found any form to set avr
>as target, and in the release changes doesn't appear avr as new platform. I
>think that must left some work to use avr in the native distribution.
>
>In other hand, i don't try yet the gdb4.18 with avr patches, is possible
>that i try it this weekend. I've also search for a avr simulator under
>linux. Have you seen someone ?

To the best of my knowledge the avr patch for gdb4.18 is all there is at
the moment. Seem to recall Denis saying he was looking into writing a
simulator but as yet I guess there hasn't been sufficient time available,
after all he's maintaining the binutils and gcc avr ports already!

Without a simulator gdb can only be used with some debugging code in the
AVR program, it uses the SPI port to communicate with a GNU/Linux
machine. I believe that AVR studio 4 will have elf support, but that
doesn't help those of us who want gdb. The latest AVR devices have JTAG
debug/programming interfaces and should mean we can achieve real-time
debugging in hardware without an emulator, a worthy goal would be to make
this work with gdb. Still would be nice if someone with some spare time
would comit to writing an open simulator :) hint hint

gdb4.18 avr patch available from
http://home.overta.ru/~denisc/
Note there is a description on how to use it at
http://home.overta.ru/~denisc/gdb/about.txt

Denis, please correct me if i'm wrong.

Cheers,

Jason Kyle

From [email-masked] Sat Aug 04 22:57:25 2001
Received: from pop.gmx.net ([194.221.183.20] helo=mail.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15Sz7U-0005Ko-00
for <[email-masked]>; Sat, 04 Aug 2001 22:57:24 +1200
Received: (qmail 8614 invoked by uid 0); 4 Aug 2001 10:57:19 -0000
Received: from pd9055cd7.dip.t-dialin.net (HELO gmx.de) (217.5.92.215)
by mail.gmx.net (mp007-rz3) with SMTP; 4 Aug 2001 10:57:19 -0000
Message-ID: <[email-masked]>
Date: Sat, 04 Aug 2001 13:02:50 +0200
From: Karsten Schmidt <[email-masked]>
Reply-To: [email-masked]
Organization: at home
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Jason Kyle <[email-masked]>
CC: [email-masked], [email-masked]
Subject: Re: [avr-gcc-list] GDB5.0 for avr under linux
References: <[email-masked]>
<[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

For simulator (avr-sim) check
http://wwwivs.cs.uni-magdeburg.de/~gal/avr-manual.html
and (in german, but the simulator is newer and hopefully better)
http://www-ivs.cs.uni-magdeburg.de/bs/lehre/wise0001/es/seminare.shtml.

Jason Kyle wrote:

> At 13:23 3/08/2001 +0200, Daniel Quintero wrote:
> >Hi Karsten
> >
> > > I successful compiled an tested binutils 2.11 and gcc3.0 for avr under
> >Linux.
> > > Now I'm trying to get gdb running. Has somebody experience to compile
> > > gdb5.0 for target=avr or get gdb4.18 running with gcc3.0 and binutils 2.11
> > > under Linux.
> > > Any hint are welcome.
> >
> >I've moving my avr develop enviroment to linux these days, at this moment is
> >working gcc3.0, binutils 2.1 and avr-libc-20010701.
> >
> >I also try to compile gdb5.0 for avr, but seems that isn't supported. There
> >are some files about avr, but in makefiles i can't found any form to set avr
> >as target, and in the release changes doesn't appear avr as new platform. I
> >think that must left some work to use avr in the native distribution.
> >
> >In other hand, i don't try yet the gdb4.18 with avr patches, is possible
> >that i try it this weekend. I've also search for a avr simulator under
> >linux. Have you seen someone ?
>
> To the best of my knowledge the avr patch for gdb4.18 is all there is at
> the moment. Seem to recall Denis saying he was looking into writing a
> simulator but as yet I guess there hasn't been sufficient time available,
> after all he's maintaining the binutils and gcc avr ports already!
>
> Without a simulator gdb can only be used with some debugging code in the
> AVR program, it uses the SPI port to communicate with a GNU/Linux
> machine. I believe that AVR studio 4 will have elf support, but that
> doesn't help those of us who want gdb. The latest AVR devices have JTAG
> debug/programming interfaces and should mean we can achieve real-time
> debugging in hardware without an emulator, a worthy goal would be to make
> this work with gdb. Still would be nice if someone with some spare time
> would comit to writing an open simulator :) hint hint
>
> gdb4.18 avr patch available from
> http://home.overta.ru/~denisc/
> Note there is a description on how to use it at
> http://home.overta.ru/~denisc/gdb/about.txt
>
> Denis, please correct me if i'm wrong.
>
> Cheers,
>
> Jason Kyle
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
Karsten Schmidt

Und fuer die Herren aus Pullach AK47, Plutonium, Attentat

From [email-masked] Sun Aug 05 01:06:30 2001
Received: from hammer.overta.ru ([195.151.108.138] helo=overta.ru)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15T18O-00004I-00
for <[email-masked]>; Sun, 05 Aug 2001 01:06:29 +1200
Received: from [195.151.217.155] (HELO localhost.localdomain)
by overta.ru (CommuniGate Pro SMTP 3.4.7)
with ESMTP id 404404; Sat, 04 Aug 2001 17:02:10 +0400
To: Jason Kyle <[email-masked]>
Cc: [email-masked], [email-masked]
Subject: Re: [avr-gcc-list] GDB5.0 for avr under linux
References: <[email-masked]>
<[email-masked]>
<[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 04 Aug 2001 16:56:42 +0400
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
Lines: 51
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Jason Kyle <[email-masked]> writes:

> At 13:23 3/08/2001 +0200, Daniel Quintero wrote:
> >Hi Karsten
> >
> > > I successful compiled an tested binutils 2.11 and gcc3.0 for avr under
> >Linux.
> > > Now I'm trying to get gdb running. Has somebody experience to compile
> > > gdb5.0 for target=avr or get gdb4.18 running with gcc3.0 and binutils 2.11
> > > under Linux.
> > > Any hint are welcome.
> >
> >I've moving my avr develop enviroment to linux these days, at this moment is
> >working gcc3.0, binutils 2.1 and avr-libc-20010701.
> >
> >I also try to compile gdb5.0 for avr, but seems that isn't supported. There
> >are some files about avr, but in makefiles i can't found any form to set avr
> >as target, and in the release changes doesn't appear avr as new platform. I
> >think that must left some work to use avr in the native distribution.
> >
> >In other hand, i don't try yet the gdb4.18 with avr patches, is possible
> >that i try it this weekend. I've also search for a avr simulator under
> >linux. Have you seen someone ?
>
> To the best of my knowledge the avr patch for gdb4.18 is all there is
> at the moment. Seem to recall Denis saying he was looking into
> writing a simulator but as yet I guess there hasn't been sufficient
> time available, after all he's maintaining the binutils and gcc avr
> ports already!
>
> Without a simulator gdb can only be used with some debugging code in
> the AVR program, it uses the SPI port to communicate with a GNU/Linux
> machine. I believe that AVR studio 4 will have elf support, but that
> doesn't help those of us who want gdb. The latest AVR devices have
> JTAG debug/programming interfaces and should mean we can achieve
> real-time debugging in hardware without an emulator, a worthy goal
> would be to make this work with gdb. Still would be nice if someone
> with some spare time would comit to writing an open simulator :) hint
> hint
>
> gdb4.18 avr patch available from
> http://home.overta.ru/~denisc/
> Note there is a description on how to use it at
> http://home.overta.ru/~denisc/gdb/about.txt
>
>
> Denis, please correct me if i'm wrong.

You right.

Denis.

From [email-masked] Sun Aug 05 12:37:12 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15TBup-00025o-00
for <[email-masked]>; Sun, 05 Aug 2001 12:37:11 +1200
Received: from jpk1.jpk.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.9.3/8.9.3) with ESMTP id MAA28549;
Sun, 5 Aug 2001 12:37:08 +1200
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Sun, 05 Aug 2001 12:34:11 +1200
To: "Daniel Quintero" <[email-masked]>, <[email-masked]>,
<[email-masked]>
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] GDB5.0 for avr under linux
In-Reply-To: <[email-masked]>
References: <[email-masked]>
<[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>In other hand, i don't try yet the gdb4.18 with avr patches, is possible
>that i try it this weekend. I've also search for a avr simulator under
>linux. Have you seen someone ?

Quote from Marek Michalkiewicz (avr-libc maintainer)

"As for avr-gdb, it needs to be updated to work with current avr-gcc first,
the gdb 4.18 avr patch doesn't because of various changes (function
prologues etc.) in code generated by avr-gcc."

Jason Kyle

From [email-masked] Sun Aug 05 23:06:23 2001
Received: from viemta05.chello.at ([195.34.133.55])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15TLji-0002V1-00
for <[email-masked]>; Sun, 05 Aug 2001 23:06:23 +1200
Received: from gmx.at ([62.178.92.247]) by viemta05.chello.at
(InterMail vK.4.03.02.00 201-232-124 license dd105b629cb94503e20ad828d0e9d2ee)
with ESMTP id <[email-masked]>;
Sun, 5 Aug 2001 13:03:59 +0200
Message-ID: <[email-masked]>
Date: Sun, 05 Aug 2001 13:03:58 +0200
From: Christoph Plattner <[email-masked]>
Organization: private
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.6 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked], [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Padding problem with "progmem"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello AVR-GCC hackers !

I recognized the problem, that if a string, defined with
__attribite__ ((progmem)) or PSTR from the lib, has an odd length
(including \0 termination character), the linker has problems
to locate the code. Result are error messages like:

../os/OBJS.arch-avrmegaX03/rtx-os.R: In function `avr_serial_ioctl':
../os/OBJS.arch-avrmegaX03/rtx-os.R(.text+0x239c): internal error: out
of range error
../os/OBJS.arch-avrmegaX03/rtx-os.R: In function `avr_serial_init':
../os/OBJS.arch-avrmegaX03/rtx-os.R(.text+0x23f2): internal error: out
of range error
../os/OBJS.arch-avrmegaX03/rtx-os.R(.text+0x23fa): internal error: out
of range error
../os/OBJS.arch-avrmegaX03/rtx-os.R(.text+0x243e): internal error: out
of range error
../os/OBJS.arch-avrmegaX03/rtx-os.R(.text+0x244e): internal error: out
of range error
../os/OBJS.arch-avrmegaX03/rtx-os.R: In function `process_icmp':
../os/OBJS.arch-avrmegaX03/rtx-os.R(.text+0x2568): internal error: out
of range error
../os/OBJS.arch-avrmegaX03/rtx-os.R: In function `icmp_reply':
../os/OBJS.arch-avrmegaX03/rtx-os.R(.text+0x265e): internal error: out
of range error

Error in near all functions.

If the string has an even length, everything works ok.
I now the reason (16bit code access, single characters of 8
bit). But is it not possible to include a padding here, to
start and stop every string on an even address, although we
loose perhaps some bytes, if often single charaters are used.

Is there a workaround for that problen, like a
__asm__ __volatile__ (".align 2");
???

Please help here

Christoph P.

--
-------------------------------------------------------
private: [email-masked]
company: [email-masked]

From [email-masked] Mon Aug 06 02:59:43 2001
Received: from sttlpop5.sttl.uswest.net ([206.81.192.5])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15TPNW-0002eg-00
for <[email-masked]>; Mon, 06 Aug 2001 02:59:43 +1200
Received: (qmail 16409 invoked by alias); 5 Aug 2001 14:57:23 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 16386 invoked by uid 0); 5 Aug 2001 14:57:22 -0000
Received: from odslppp230.sttl.uswest.net (HELO dell) (63.224.32.230)
by sttlpop5.sttl.uswest.net with SMTP; 5 Aug 2001 14:57:22 -0000
Message-ID: <00bf01c11dbe$5372aaa0$0700000a@dell>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Padding problem with "progmem"
Date: Sun, 5 Aug 2001 07:48:15 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

In assembly you need to tell the assembler:

.balign 2

If you are declaring the string in C, the resulting code should
already be aligned. Here is a fragment from my code (20010606 v3.0
compiler):

#define FLASH __attribute__ ((progmem))
static char FLASH stX[] = "X:";

and the resulting asm (avr-gcc -S)

.stabs "stX:S(0,24)=ar(0,23);0;2;(0,2)",38,0,18,stX
.type stX,@object
.size stX,3
stX:
.string "X:"

---- Original Message -----
From: "Christoph Plattner" <[email-masked]>
To: <[email-masked]>; <[email-masked]>
Sent: Sunday, August 05, 2001 4:03 AM
Subject: [avr-gcc-list] Padding problem with "progmem"

>
> If the string has an even length, everything works ok.
> I now the reason (16bit code access, single characters of 8
> bit). But is it not possible to include a padding here, to
> start and stop every string on an even address, although we
> loose perhaps some bytes, if often single charaters are used.
>
> Is there a workaround for that problen, like a
> __asm__ __volatile__ (".align 2");

From [email-masked] Mon Aug 06 23:55:47 2001
Received: from netbgp-130-132.inrete.it ([213.212.130.132] helo=srmail.inrete.it)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Tiz4-0003Xt-00
for <[email-masked]>; Mon, 06 Aug 2001 23:55:46 +1200
Received: from DELLINSP.inrete.it (mjollnir.softingroup.it [213.82.51.194])
by srmail.inrete.it (8.10.2/8.10.2) with ESMTP id f76BrJ529237
for <[email-masked]>; Mon, 6 Aug 2001 13:53:19 +0200
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.0.2
Date: Mon, 06 Aug 2001 13:45:51 +0200
To: <[email-masked]>
From: Maurizio Ferraris <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: [avr-gcc-list] Problems with avr-gcc vers 3.0
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,
I just switched to avr-gcc version 3.0 and successfully recompiled all my
old code.
I even had a small reduction in code size.
The problem is that the code is not working anymore.
Looking around and trying to figure what happened, I came across this piece
of code.
The delay routine is simply an empty loop from 0 to 4999. The
implementation is something that I don't understand and I feel that it is
wrong.
The counter seems to be initialized at 4999 and not at zero (ok, since it
is not used inside the loop, it doesn't really matters), and it is
decremented toward zero, but not by one, but by 625.
I used the packed installation found on avrfreaks for win32, and using the
makefiles found in the gcctest.zip (I didn't dare change any switches ... I
only added my files and include directories).
Is there something I must know?

102:../Common/Util.c **** void delay(void)
103:../Common/Util.c **** {
104:../Common/Util.c **** int counter;
105:../Common/Util.c ****
106:../Common/Util.c **** for(counter = 0; counter < 5000; counter++)
347 0104 87E8 ldi r24,lo8(4999)
348 0106 93E1 ldi r25,hi8(4999)
349 .L35:
350 0108 8157 subi r24,lo8(-(-625))
351 010a 9240 sbci r25,hi8(-(-625))
352 010c EAF7 brpl .L35
355 010e 0895 ret
107:../Common/Util.c **** ;
108:../Common/Util.c **** }

Thanks in advance.
Mau.

_____________________________________________________________
Maurizio Ferraris mailto:[email-masked]
Via Borgonuovo 27 mailto:[email-masked]
10040 GIVOLETTO TO ITALY http://www.studioferraris.it

From [email-masked] Tue Aug 07 01:57:31 2001
Received: from netti.nic.fi ([212.38.224.82])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15Tkss-0003d4-00
for <[email-masked]>; Tue, 07 Aug 2001 01:57:31 +1200
Received: (qmail 12246 invoked by uid 101); 6 Aug 2001 16:55:07 +0300
Message-ID: <[email-masked]>
To: <[email-masked]>
Subject: Re: [avr-gcc-list] Problems with avr-gcc vers 3.0
Date: Mon, 6 Aug 2001 13:55:07 -0000
From: <[email-masked]>
X-Mailer: TWIG 2.6.0.cvs
In-Reply-To: <[email-masked]>
X-Client-IP: 194.19.8.2
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,
I got the same result when compiling with
-O3 opt. level. (which I think is used in the gcctest makefiles)

But, when I inserted some dummy code into the loop
it seems to work as exptected ....
OR,
If I declared the counter variable as 'volatile' it also
seemed OK ....

Empty loops seem to be quite a popular target
for the optimizer .......

BR : Jussi

Maurizio Ferraris <[email-masked]> wrote:

> Hi,
> I just switched to avr-gcc version 3.0 and successfully recompiled all my
> old code.
> I even had a small reduction in code size.
> The problem is that the code is not working anymore.
> Looking around and trying to figure what happened, I came across this
piece
> of code.
> The delay routine is simply an empty loop from 0 to 4999. The
> implementation is something that I don't understand and I feel that it
is
> wrong.
> The counter seems to be initialized at 4999 and not at zero (ok, since it
> is not used inside the loop, it doesn't really matters), and it is
> decremented toward zero, but not by one, but by 625.
> I used the packed installation found on avrfreaks for win32, and using
the
> makefiles found in the gcctest.zip (I didn't dare change any switches ...
I
> only added my files and include directories).
> Is there something I must know?
>
> 102:../Common/Util.c **** void delay(void)
> 103:../Common/Util.c **** {
> 104:../Common/Util.c **** int counter;
> 105:../Common/Util.c ****
> 106:../Common/Util.c **** for(counter = 0; counter < 5000;
counter++)
> 347 0104 87E8 ldi r24,lo8(4999)
> 348 0106 93E1 ldi r25,hi8(4999)
> 349 .L35:
> 350 0108 8157 subi r24,lo8(-(-625))
> 351 010a 9240 sbci r25,hi8(-(-625))
> 352 010c EAF7 brpl .L35
> 355 010e 0895 ret
> 107:../Common/Util.c **** ;
> 108:../Common/Util.c **** }
>
> Thanks in advance.
> Mau.
>
>
_____________________________________________________________
> Maurizio Ferraris mailto:[email-masked]
> Via Borgonuovo 27 mailto:[email-masked]
> 10040 GIVOLETTO TO ITALY http://www.studioferraris.it
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

--

________________________________________________________________
Ilmainen Internet @ http://www.nic.fi/

From [email-masked] Tue Aug 07 13:46:02 2001
Received: from tekele1.lnk.telstra.net ([139.130.148.107] helo=mailman)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15TvwV-00049e-00
for <[email-masked]>; Tue, 07 Aug 2001 13:46:00 +1200
Received: from [127.0.0.1] by mailman
(ArGoSoft Mail Server Plus for WinNT/2000, Version 1.61 (1.6.1.9)); Tue, 7 Aug 2001 11:13:42 +0930
To: [email-masked]
X-Mailer: Lotus Notes Release 5.0.5 September 22, 2000
Message-ID: <OFB910CC1F.DAF0DABA-ON69256AA1.0007377F@LocalDomain>
From: [email-masked]
Date: Tue, 7 Aug 2001 11:13:41 +0930
X-MIMETrack: Serialize by Router on Zeus/Tekelek(Release 5.07a |May 14, 2001) at 08/07/2001
11:13:42 AM
MIME-Version: 1.0
Content-type: text/plain; charset=us-ascii
Subject: [avr-gcc-list] String Arrays in FLASH & gccavr 3.0
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Greetings,

I am wondering if anyone has a better method of defining arrays of null
terminated strings in FLASH. With the additional overhead of reading
constant byte data from FLASH, reading pointers to strings in FLASH does
present some difficulty. It is easy to write a macro to do the two byte
to pointer conversion, what I am having trouble with is *forcing* gcc 3.0
to put the pointer (address) in FLASH and not define it as constant data in
RAM. Defining my constant strings such;

static __attribute__ ((progmem)) char* F_strings[] =
{
"Menu1",
"Menu2",
"Menu3"
};

Results in the whole lot being placed in RAM, seems to ignore the attribute
directive. Change it thus;

static __attribute__ ((progmem)) char c_string1[] = "Menu1";
static __attribute__ ((progmem)) char c_string2[] = "Menu2";
static __attribute__ ((progmem)) char c_string3[] = "Menu3";

static __attribute__ ((progmem)) char* F_strings[] =
{
c_string1,
c_string2,
c_string3
};

Results in c_string1,2 &3 being placed in FLASH, but F_strings is still
retained in RAM (still ignores attribute), albeit this much smaller than
the first case. Now how can I force the compiler to put F_strings[] in
FLASH aswell so I can point my macros at them ? I am sure this is a
problem with my limited understanding of gccavr, I have done this
previously with Hitachi and a PC, but on those projects I didn't care if my
pointers and string data were in RAM or ROM. Any clues ?

Matthew

From [email-masked] Tue Aug 07 14:06:31 2001
Received: from proxy.peter.com.au ([203.47.34.4] helo=peter.com.au)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15TwGM-0004Ak-00
for <[email-masked]>; Tue, 07 Aug 2001 14:06:30 +1200
Received: from [203.47.34.3] ([203.47.34.3] verified) by peter.com.au (Stalker SMTP Server 1.8b2) with ESMTP id S.0000435005 for <[email-masked]>; Tue, 07 Aug 2001 10:04:03 +0800
Mime-Version: 1.0
X-Sender: peter@pop
Message-Id: <p05100316b794f89b56c2@[203.47.34.3]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
Date: Tue, 7 Aug 2001 09:53:08 +0800
To: <[email-masked]>
From: Peter N Lewis <[email-masked]>
Subject: Re: [avr-gcc-list] Problems with avr-gcc vers 3.0
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>Is there something I must know?

This delay routine does *nothing* as far as the rest of the program
is concerned, so it would be a perfectly legitimate compilation of it
to translate it in to:

void delay(void)
{
}

counter is not externally visible, so its value on completion is irrelevant.

If you want to do a delay routine, you should do it in assembler
code, since otherwise there is no reasonable guarantee of what result
you'll get on any given compiler. Even if you label the counter
variable "volatile" and the compiler actually has to count through
them all in order, the amount of time it will take is pretty much
random depending on the compiler version, optimizing flags, etc.

Better yet would be to use a timer of course, although that is not
always possible.

I have to admit, it is an odd optimization!
Peter.

> 102:../Common/Util.c **** void delay(void)
> 103:../Common/Util.c **** {
> 104:../Common/Util.c **** int counter;
> 105:../Common/Util.c ****
> 106:../Common/Util.c **** for(counter = 0; counter < 5000; counter++)
> 347 0104 87E8 ldi r24,lo8(4999)
> 348 0106 93E1 ldi r25,hi8(4999)
> 349 .L35:
> 350 0108 8157 subi r24,lo8(-(-625))
> 351 010a 9240 sbci r25,hi8(-(-625))
> 352 010c EAF7 brpl .L35
> 355 010e 0895 ret
> 107:../Common/Util.c **** ;
> 108:../Common/Util.c **** }
>
>Thanks in advance.
>Mau.
>
>_____________________________________________________________
>Maurizio Ferraris mailto:[email-masked]
>Via Borgonuovo 27 mailto:[email-masked]
>10040 GIVOLETTO TO ITALY http://www.studioferraris.it
>
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
<http://www.interarchy.com/> <ftp://ftp.interarchy.com/interarchy.hqx>

From [email-masked] Tue Aug 07 20:04:57 2001
Received: from atusks01.alcatel.at ([212.183.9.130] helo=mail.alcatel.at)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15U1rD-0004OS-00
for <[email-masked]>; Tue, 07 Aug 2001 20:04:56 +1200
Received: from alcatel.at (atusel33.aut.alcatel.at [146.112.129.215])
by mail.alcatel.at (8.9.3/8.9.3/1.21 01/27/01 21:43:09) with ESMTP id KAA08790;
Tue, 7 Aug 2001 10:02:16 +0200 (MET DST)
Message-ID: <[email-masked]>
Date: Tue, 07 Aug 2001 10:02:06 +0200
From: Christoph Plattner <[email-masked]>
Organization: AAA
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.5.1 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
CC: [email-masked]
Subject: Re: [avr-gcc-list] String Arrays in FLASH & gccavr 3.0
References: <OFB910CC1F.DAF0DABA-ON69256AA1.0007377F@LocalDomain>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I always use this order ....

<type> <variable> __attribute__((progmem)) =
{
xxxxx
};

But this seems to be detail. Your problem is another:

(1) Here the compiler seems to ignore the __attribute__, and there is
another error, see below.

(2) The strings are correctly embedded in progmem, for the char
pinters it ignores the __attribute__ again ...

The point is: Youwant to do another thing as far I can see.
You want to have the whole character array in the FLASH !!

char char F_strings [][] __attribute__((progmem)) =
{
"Menu1",
"Menu2",
"Menu3"
};

Important is the "char X [][]" instead of "char * X []".
In one case you have an array:

F_strings: Byte 0.. 5 "Menu1\0"
Byte 6..11 "Menu2\0"
Byte 12..17 "Menu3\0"

In the other case you have an array of POINTERS to the string

F_strings: Byte 0.. 1 pointer to string 1
Byte 2.. 3 pointer to string 2
Byte 4.. 5 pointer to string 3

The pointers in this way is not abkle to be handled in the FLASH
very well, as the pointers in FLASH must have an another data type,
as for example the ATmega103 need 3 byte pointers here (128KB Flash).

In both methods you access the stings as
F_strings [i] !

To use the string in the system you can do

strcpy_P (buf, F_strings [i]);

With friendly regards
Christoph

[email-masked] wrote:
>
> Greetings,
>
> I am wondering if anyone has a better method of defining arrays of null
> terminated strings in FLASH. With the additional overhead of reading
> constant byte data from FLASH, reading pointers to strings in FLASH does
> present some difficulty. It is easy to write a macro to do the two byte
> to pointer conversion, what I am having trouble with is *forcing* gcc 3.0
> to put the pointer (address) in FLASH and not define it as constant data in
> RAM. Defining my constant strings such;
>
> static __attribute__ ((progmem)) char* F_strings[] =
> {
> "Menu1",
> "Menu2",
> "Menu3"
> };
>
> Results in the whole lot being placed in RAM, seems to ignore the attribute
> directive. Change it thus;
>
> static __attribute__ ((progmem)) char c_string1[] = "Menu1";
> static __attribute__ ((progmem)) char c_string2[] = "Menu2";
> static __attribute__ ((progmem)) char c_string3[] = "Menu3";
>
> static __attribute__ ((progmem)) char* F_strings[] =
> {
> c_string1,
> c_string2,
> c_string3
> };
>
> Results in c_string1,2 &3 being placed in FLASH, but F_strings is still
> retained in RAM (still ignores attribute), albeit this much smaller than
> the first case. Now how can I force the compiler to put F_strings[] in
> FLASH aswell so I can point my macros at them ? I am sure this is a
> problem with my limited understanding of gccavr, I have done this
> previously with Hitachi and a PC, but on those projects I didn't care if my
> pointers and string data were in RAM or ROM. Any clues ?
>
> Matthew
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
+--------V--------+ [email-masked]
| A L C A T E L | -----------------------------
+-----------------+ Phone: +43 1 27722 3706
T A S Fax: +43 1 27722 3955

From [email-masked] Wed Aug 08 00:37:00 2001
Received: from mx.alphalink.com.au ([202.161.124.54])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15U66V-0004aL-00
for <[email-masked]>; Wed, 08 Aug 2001 00:36:59 +1200
Received: from research (d297-ps0-mel.alphalink.com.au [202.161.105.43])
by mx.alphalink.com.au (8.11.4/8.9.3) with SMTP id f77CYxD30222
for <[email-masked]>; Tue, 7 Aug 2001 22:35:00 +1000
From: "Ron Kreymborg" <[email-masked]>
To: <[email-masked]>
Date: Tue, 7 Aug 2001 22:40:25 +1000
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Importance: Normal
In-Reply-To: <[email-masked]>
Subject: [avr-gcc-list] Library files and Studio
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

In the Win32 version, if you make a change to one of the library C files
that changes the original line structure (for example just introduce a few
returns), then recompile/link the libraries, then recompile/link your app,
Studio (3.50) still seems to retain the old line position structure and
consequently the cursor no longer follows the code path as you trace thru.

What must be done to re-synch Studio to the new source?

Ron

-------------------------------------------
Ron Kreymborg
Jennaron Research
Melbourne, Australia

From [email-masked] Wed Aug 08 10:58:03 2001
Received: from [195.235.113.141] (helo=tsmtp2.mail.isp)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15UFnW-00052X-00
for <[email-masked]>; Wed, 08 Aug 2001 10:58:03 +1200
Received: from GINES ([213.96.107.254]) by tsmtp2.mail.isp
(Netscape Messaging Server 4.15 tsmtp2 Jun 21 2001 23:53:48)
with SMTP id GHPZHW00.Z5T; Wed, 8 Aug 2001 00:51:32 +0200
Message-ID: <00a301c11f93$6fdfb530$0400a8c0@GINES>
From: "Gins" <[email-masked]>
To: "Petr Krc" <[email-masked]>
Cc: "AVR-GCC Mail" <[email-masked]>
References: <[email-masked]> <[email-masked]>
Subject: Re: [avr-gcc-list] SPI interface and AT25XXX eeprom
Date: Wed, 8 Aug 2001 00:51:03 +0200
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_00A0_01C11FA4.32EE4C20"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_00A0_01C11FA4.32EE4C20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hi!
I've adapted your sample to avr-gcc compiler. I send you and everybody the
code. I've tested with ATmega163 and AT25640 EEPROM that it has 32 byte page
mode.

The only problem that I've found is the next: when I write a buffer
beginning at address no multiply of 32, the write fails. Is it normal?

Regards, Gins

----- Original Message -----
From: "Petr Krc" <[email-masked]>
To: "Gines Martinez Sanchez" <[email-masked]>
Sent: Monday, July 23, 2001 6:58 PM
Subject: Re: [avr-gcc-list] SPI interface and AT25XXX eeprom

> Gines Martinez Sanchez wrote:
> >
> > Has anybody a sample of writing to at25xxx eeprom using the SPI
interface of
> > a 8515 or AT163?
>
> Yes, I wrote some code a long time ago. But no warranty.
>
> --
> Regards
> Petr Krc

------=_NextPart_000_00A0_01C11FA4.32EE4C20
Content-Type: application/x-zip-compressed;
name="spi.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="spi.zip"

UEsDBBQAAAAIAHADCCtZW7fdfgEAAK4CAAAGAAAAbWFpbi5jjVLbSsNAEH3eQv9hrCCbVE3sDcEL
tBqhD2ppKsWqlNRs7GCzCZutRYv/7uwGsX1QDLlMzjlzcia7ngdhlOYLAeGgD0EwGN5eQ7XieTAS
hRYxrFDPoTtKxUt01GnCHtWNdqflW81Flua4INWyQPkC/e4QLixxk8EqUiqS+r1aqVZ2UT4vlrGA
00IrUh7OzzdBlFootcz1Nl6LdKNd5Hg4r1mTWCQoBfTurqbhBHjbd37AMvk07E8C4Mfukd9obbC9
bhgAgG9sxrfDS5glD6XN04nBKACkEUr+lmFMfetqhVkdWpoFwRQlat5sOASwQiC3BZ2ee/DX4ZIE
XDZWqAXMFtnzK0Tl0xJ/93qkSTLF8cw/ATwtE1NVrzu0RozRFPgEZxspV+Y73Iy7D7x3PwrAdWbJ
PhT4IbKEzxLHKbWpSAuhueH8bZp9eykRxf+x+i3hmjHaCXZyExZNj8m7Q4GJNZgR5LQhdMJrgVKZ
epQ1+2PZJ93MpYReKgk+gfT6BVBLAwQUAAAACAC1AwgrWrOymkcBAACBBAAACQAAAGF0MjVzcGku
aK1TwWrCQBA9J5B/GPRigzRtoSdPmqZUEBSNlp7Cmp3YBbuRzaStlP57dxOtSWvrwQwEknkvOzvv
zXhuM+HY4EIt+uHN7WwyvHwwUDPhObZjt0UiOSYQ7QpEukBbJ4TEWq5gFsQo3qzzzDyOje+ESkLL
b31oAkouEkP1Thf/L0yLlmX5qcyIScrObll3StsNmuvnMhMriRziZ6a0roOnMOgdgYUkI/vjeHrX
My0dI1iD8XhUoHvFJtPhoh8GoO9NIq7k54PR0K8yw+k8sK4P3/f90SywrhpQ78fwzEjlMeUKz5ex
nJgGzD3cbqJSSo22jZhs/IAgiIQU1DHOwoatMHpJOV5on4qMhhUyHi23hB1jLzCuDPqaCr5Hv4Fu
MSDgLpNuMQuwRlklvylBWD9r9wtnxH4xT57716J9VterfAPPrWwolOZ8AVBLAwQUAAAACAD8Awgr
1gHhevwAAACfAwAABwAAAGlvcmVnLmitkl9rwjAUxZ8t5Dtc9K0Pi9urT2s7dE9KatljifZWL4Y4
klQ2xr770spGRbYG5oFA/vxucm44PL6NWAQxXOh5KZ7md4vrg/URGovg9ggGd2QdGguKDggnaUhu
FNrrohdDzqGGzTvMSVt4mE7vW+o24ixi0YRqXWENZee89M4nfkkaezsd1UHl9lU1th0swjffg4Zx
Ov7wAOqK6hZlER9++i9dfkMmnfx3y/zH7emopCOF0GhLO40VbPfSgMlXuZgFUFkQlQZQWSaSYWq1
FOsWGwSLEGeFb3I04jEUaS4eIeBfirRXkQRVJELMfsvMZz8p5xn4y7+jBudMfgFQSwMEFAAAAAgA
6wMIK1dZaLS9AAAA4QEAAAcAAABpb3JlZy5zrY1PC4JAEMXPCX6HOUuo2aFCOuSfrJOyunRWWGxJ
FHYt6tvnzupB8Og7zPBj3rznO9Y6Mg0fLJjpnpI4sW8Ll6KDt2TQPxkIVnPZMyGh4S8Gn1LwsmqY
XPh6CN73rIXqBwlvJXiuu0PbOnJMwzTsuumqsgGRpaQItiCiiKiVZxHBlesVEuXWrs0Z3O/+OKAy
azrgWX0he1ekfKQYKRwpmhVTLKLYQ0OcAdFtdEoLFUxhgYIp66Jg8Gs6mcYfUEsDBBQAAAAIAKAD
CCt8SassaQYAAA0cAAAJAAAAYXQyNXNwaS5j3VjrU9tGEP8sZvgflnQmlQjGmABN60DqV1JNDPZY
JKT94pHlk30TveZ0gjiF/u3du5Ns2cg8EptJe5MJ0nl3b1+/3dWVt1ezNjdgW9O02vn+odU1dxvp
e5sOmM0m4IYMfOKH+NhqdXudUxCUnz59SunMgBPm2g4B5E73zsc0hoiFI2b7gI8uIwTi0OVXNiNV
SKk6jI5oYHvghEMCgwl0CWfwnjkQ8c/s95h8DWx/1/maCSUxJ0O4onyMKvy6Z706rByCHQzx7bT1
rlY5egnPpXJHB3spTyP0I+ohVxLTYAT2JSuNHCf98SwE1IfZAZ+IHbnbEKpQP/KITwJxHA9Ts2N1
cn3CCVwwiv93IsJsTsPgt1RgKTtd01+9NzT95X5pIMi79ojAKUo25giRVNAIyqODpZSES31Xs8qb
Gz/RwPEStPI1FZFjScR3xye5/Wc23z+MI7o7fpbfpSEjI7m3uVG+/6Q71zQ6QczR/fH3G4iGlcvQ
JC4NSJanTuj7mB4o/aeh+gF/6fdatSbMrZfzBBc987w1R7C/SNA6m5dwtEjQNOcJDrQFJZpWb57i
UFuUsUhRkZ5fNBIdyJOciZYlDTDP3qGD977sVTRkUfnqTBwPkztQyCTxba5Wv3VWq7dbknN/xkkC
e4AoKlQgokHew/jaR/UbVqq1Xnn9+sC4TWB2cgSHBQSNdo7gF2OFaWdxljg8QQ+sJO9WplfT5vZK
NKr/iQncrb1r9S3zr1Z1hSp2WchDPol+GNflllTRDCintke/Elhd1dyWynY/1NtmA+qdTlsAlOJJ
uvR0hEW776ui/ffmhsasbqMHx1D/qFvdlgHX4unUOu+lj1a3t2dUBbqwY6bY2gHfxvaGrRbl7ECj
/b5cORKyms1eHa6Pc7i6ziHkegYnKZB1O73zOmI8Sng5TDj+EULUbl5KFYOZYwhCiBLPKyVRvAPq
mDEdjZEX/00zCW2a2iqzSmMEcRTAee+DSLObdUT0wqZcDiEEO33oSp9xbNqxS9jKQ9wzP9Ywos7Y
ZjgbUN7Hg/t4on4Z0qGhqfhejXGkAH1Lx0BjkX6uYmq+NQyjCujTLvHoiIWwtbX15s0bsOGSOCQW
Po5tj6CAdAnaIYmjBH/EDpsEomNhwwrFW9aIZk7G05q9dXnZEt5NG6aYecgXTEYxm6kqvy5HC7cK
U9OTdel4xx9mSFqeuCpJj0VXhBRx8PwY/tExGM1Or2kYGBj51uj+Ucu/ddqGQt+pVQeXspjvQDS2
YyJnySj0bOx5k9npQurS4/cU3puiVx8LzasqtkjSUDatKWA9Yg/T5g9ydHRZ6D9V2JIgpqMAp2MZ
L/QFQ236ShsFFRW/XGTToceoznsnG4YErPJ4M6pzjt374rozzzYT359Iq4vZHpA1oKflRJYSn8Y4
xhtPhDUZusoTRi1tXKJXZbESh+sXiBOwh8zQtMJ44aRcGC/cvydeOkqFkxN4NeWvDcXEKbvKHZGb
CkD+WbxTXi+8ejTr/yFVbBgkLna7p0yWrDCLZJnmyY7Koe2BuwNyzyNBMdL/S5mTtnO0pVQyQBiT
ScsJW0ylAjka+uXFC2RSGZGxiRBipUz5br4v6dYzYclvPFsVpPX3/iy1rsSx84UoTbAhfgiJvNKy
Nf0QrSxXciEFxUd6UQqK/e8oBYEY5eLsXkweIgfhxcNxcis+XY10C8eL+vvD1E/h/VwBxbe11E9p
scSeXslgR0ZUfgTJLIjVJ4YWo5CFEUPhjbqgxzjXza48RFnWNCcMOA0SIokGyPe5qpC3RvRg9ZBe
ip9ieJ4v0RJHD6nR8+4VXhJ+kSOcSwPlbXxAd7+tta3WtDbqW7ibhqi8Xbp7bQsqeZG6CDncvY+3
LMiW4XhJ1S1MwYeB9hutURD+VnNkZVhmS2EBKEb/3fwp/gvBf5vzcb6wPSfx7Fm6ywR8hEeoK5ot
nMyuqNLkkshF5fNXV7griEu3doWDXizu3gDx8ENuThqyKw6V2+ldhabdPNJuBfShvKR7sK0KQEIT
OVzIJM6FCWGa1ct8ocWyhaOE0rogzDdL8/6BlfcxVovrl1TMYwM9q+5CLXEXYgauuDfDehmG0Q6Y
MAyDnzl49DPZhdMk5jAgMLYvxTjCqS9ueLSivqD8uLQzLG0N871h1hykS1VCPMgziyWhacrN+ziF
VxbrQdNEiG9+c3NNu9q/UEsDBBQAAAAIAOMCCCt0iof29wMAAJYLAAAIAAAAbWFrZWZpbGWtVm1v
4kYQ/uxI+Q+jC5Fwi0nuqlYVClIJubtyCskJ0vbzsl7Aie21vAtN+uv7zK4NhpC2p+JIsef9fYaz
6FjP2enJWRCMxZOaJ6kC8O8i//GBZv77/wqdi+whrUWZiFmqzJHUBsNhEPRJrMtoISXgwbQBU/RM
whiVwWIZ/ZnYZSSLgsB2e1OzpTHAyZjBMqNoztAdQ9kan9eju5pRzx6lLl6AHN0Nb0YToj612oPf
J+EFyBdJLtNVrFj36Po1OU1mIE1//Xh7Sw3SLMkvzLKrnr3g9AHGOpFYppnpt9pXva7pd1NjQ1A/
3U/GA6YnS/XMkX/9dDv4PAUiWlB0/4GiP0Sa4r+xZSJtVJTaavtSKMOUHaVyo3Qw3ShhnoWxYsa1
QYIcgZiQdqKxKCD6MPkcdjNRdKJIlmqOl1HSJjqPIFfaDuKwsbCi//Pl5aXL8lb7W0poz5pngpO6
z1wh7YlRJRatKXpotcfD38LuM7dpnRD6HlqyTK76nrqN8gClNvyKcsTG/1rqF6SJTKFkMk/kzhAE
MIew70SmSM/JLhUhlQtlCd4wHXEfpvO0U5ubWq8sIfMqNyhFyELTyRBCQzJ6VUrlWJ2xgScM6pl4
xYDeRbUGcZxwWUVK6NsS7qKJRB4TZoAjcexkNaj5E4thImhHrJoGxyR1VhxpM/HEI2FuJG2mFuL9
Tz8AhRwxyipjTZHwnE3cWshEknclWD/8CHzX7weQMEO6VIuu8cNM5Eayu1/zG2zUXBFPFYbpcaeG
zUzse3h//cUNOEy5AdYhIAdIBxy2Y1xxRZKZutAZb0xYlsrs2KjswK9eUA0G3KHqU6Xz+rPU2Qar
iqqpq3L0UCNsipWbX1+nUgmrtguTK36hy92iz1ln3VinJ+eaenQueaW22sMhplXCYjWJgEattt+W
m2/k4ooiTa1f2Jtz4+S34tNvEkc4tbtvxtNw33u/DbBqex+EcU4MplUM1c7YdWLPNrf/m3a5DpjM
YtW03cwlDIOnB1tomHCTAg/ihVl0r5vakdryWV2pdcl132rfM8mRzR4RGvBOPa4Z1NzXgtGEuC9c
l1zt6cZhojZfmg6ZUsnwH60Ae8BKq+1PVnjQ0DkQr4QeN3x8WuzmvMxTscAgeVr/HTpfy06qRfyO
z8FS5Au14U0zUWvpX+76sTGOON1wNUrHlYtVqhC7T0FcV0mmSuQ95+VkHDbL5cF6ss0hZHVnPfo7
PmANqA7eQyhJk6aanAimAc3EUwNK9aIJGQvojQCLMsmrdjTJXxwcvzg2/oXD33X77aLqxeI17++i
b37cWbxRhcpjrNOj/Rh0614HQdCrNj92ZLX6NSMbd8Dvf8+7uQWnJ38DUEsBAhQAFAAAAAgAcAMI
K1lbt91+AQAArgIAAAYAAAAAAAAAAQAgALaBAAAAAG1haW4uY1BLAQIUABQAAAAIALUDCCtas7Ka
RwEAAIEEAAAJAAAAAAAAAAEAIAC2gaIBAABhdDI1c3BpLmhQSwECFAAUAAAACAD8Awgr1gHhevwA
AACfAwAABwAAAAAAAAABACAAtoEQAwAAaW9yZWcuaFBLAQIUABQAAAAIAOsDCCtXWWi0vQAAAOEB
AAAHAAAAAAAAAAEAIAC2gTEEAABpb3JlZy5zUEsBAhQAFAAAAAgAoAMIK3xJqyxpBgAADRwAAAkA
AAAAAAAAAQAgALaBEwUAAGF0MjVzcGkuY1BLAQIUABQAAAAIAOMCCCt0iof29wMAAJYLAAAIAAAA
AAAAAAEAIAC2gaMLAABtYWtlZmlsZVBLBQYAAAAABgAGAEIBAADADwAAAAA=

------=_NextPart_000_00A0_01C11FA4.32EE4C20--

From [email-masked] Wed Aug 08 14:01:48 2001
Received: from smtp04.hk.linkage.net ([202.76.4.20])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15UIfL-0005A6-00
for <[email-masked]>; Wed, 08 Aug 2001 14:01:47 +1200
Received: from vita.hk.net ([email-masked] [152.101.101.101])
by smtp04.hk.linkage.net (8.10.2/8.10.2) with SMTP id f781u1d14939
for <[email-masked]>; Wed, 8 Aug 2001 09:56:02 +0800 (HKT)
Date: Wed, 8 Aug 2001 09:59:32 +0800 (HKT)
From: Lai Kang Tin <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] Problems with avr-gcc vers 3.0
In-Reply-To: <p05100316b794f89b56c2@[203.47.34.3]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

If you compile the code using gcc i386,
you will get a correct codes generated.

.globl delay
.type delay,@function
delay:
pushl %ebp
movl %esp,%ebp
movl $4999,%ecx
.p2align 4,,7
.L5:
decl %ecx
jns .L5
leave
ret
.Lfe1:
.size delay,.Lfe1-delay

On Tue, 7 Aug 2001, Peter N Lewis wrote:

> >Is there something I must know?
>
> This delay routine does *nothing* as far as the rest of the program
> is concerned, so it would be a perfectly legitimate compilation of it
> to translate it in to:
>
> void delay(void)
> {
> }
>
> counter is not externally visible, so its value on completion is irrelevant.
>
> If you want to do a delay routine, you should do it in assembler
> code, since otherwise there is no reasonable guarantee of what result
> you'll get on any given compiler. Even if you label the counter
> variable "volatile" and the compiler actually has to count through
> them all in order, the amount of time it will take is pretty much
> random depending on the compiler version, optimizing flags, etc.
>
> Better yet would be to use a timer of course, although that is not
> always possible.
>
> I have to admit, it is an odd optimization!
> Peter.
>
> > 102:../Common/Util.c **** void delay(void)
> > 103:../Common/Util.c **** {
> > 104:../Common/Util.c **** int counter;
> > 105:../Common/Util.c ****
> > 106:../Common/Util.c **** for(counter = 0; counter < 5000; counter++)
> > 347 0104 87E8 ldi r24,lo8(4999)
> > 348 0106 93E1 ldi r25,hi8(4999)
> > 349 .L35:
> > 350 0108 8157 subi r24,lo8(-(-625))
> > 351 010a 9240 sbci r25,hi8(-(-625))
> > 352 010c EAF7 brpl .L35
> > 355 010e 0895 ret
> > 107:../Common/Util.c **** ;
> > 108:../Common/Util.c **** }
> >
> >Thanks in advance.
> >Mau.
> >
> >_____________________________________________________________
> >Maurizio Ferraris mailto:[email-masked]
> >Via Borgonuovo 27 mailto:[email-masked]
> >10040 GIVOLETTO TO ITALY http://www.studioferraris.it
> >
> >
> >_______________________________________________
> >avr-gcc-list mailing list
> >[email-masked]
> >http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
>
> --
> <http://www.interarchy.com/> <ftp://ftp.interarchy.com/interarchy.hqx>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

K.T.LAI
[email-masked]

From [email-masked] Thu Aug 09 03:57:30 2001
Received: from [195.235.113.141] (helo=tsmtp1.mail.isp)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15UVi5-0005gp-00
for <[email-masked]>; Thu, 09 Aug 2001 03:57:29 +1200
Received: from GINES ([213.96.107.254]) by tsmtp1.mail.isp
(Netscape Messaging Server 4.15 tsmtp1 Jun 21 2001 23:53:48)
with SMTP id GHRAP500.S7J; Wed, 8 Aug 2001 17:51:05 +0200
Message-ID: <004301c12021$de6dec40$0400a8c0@GINES>
From: "Gins" <[email-masked]>
To: "Petr Krc" <[email-masked]>
Cc: "AVR-GCC Mail" <[email-masked]>
Subject: Re: [avr-gcc-list] SPI interface and AT25XXX eeprom
Date: Wed, 8 Aug 2001 17:50:37 +0200
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0040_01C12032.A1811710"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_0040_01C12032.A1811710
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

I see.
I've corrected the code to write the buffer at beginning of pages.

Regards Gins

------=_NextPart_000_0040_01C12032.A1811710
Content-Type: application/octet-stream;
name="at25spi.c"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="at25spi.c"

/***********************************************************************
* AT25SPI.C
* Library for memory EEPROM AT25XXX
* Interface SPI
* This program is free software;=20
* Original code by Petr Krc [email-masked]
* Tested with AT90S8515 and ATMEGA163 & AT25640
* Compiled using avr-gcc
* No warranty
*
* Code implemented to EEPROMs with Byte Write Operation:
* - AT25640 (8K) (32-byte Page Mode)
* - AT25256 (32K) (64-byte Page Mode)
* - etc
=
***********************************************************************/
#include <at25spi.h>
#include <ioreg.h>

/***************************************************************
* Constants
***************************************************************/
// Define EEPROM commands
#define EE_READ 3
#define EE_WRITE 2
#define EE_WREN 6
#define EE_WRDI 4=09
#define EE_RDSR 5=09
#define EE_WRSR 1

// Define EEPROM status
#define SS_WRITING 0x01 // Write cycle in progress
#define SS_WRITE_ENABLE 0x02 // Write enabled

// Define EEPROM pins
#define pin_EE_CS (1<<4)
#define pin_EE_IO (1<<5)
#define pin_EE_CL (1<<7)

/***************************************************************
* Structures
***************************************************************/

/***************************************************************
* Data
***************************************************************/
BYTE PAGE_SIZE;

/***************************************************************
* Prototypes
***************************************************************/

/************************************************************************=
**
* Initialize=20
=
*************************************************************************=
*/
PUBLIC BOOL EE_init(BYTE page_mode)
{
rSPCR =3D BV(SPE) | BV(MSTR) | BV(SPR0); // SPI enable, master mode, =
CLK/16
rDDRB |=3D pin_EE_CS | pin_EE_CL | pin_EE_IO; // rPORTB input/output
rPORTB |=3D pin_EE_CS; // rPORTB no pull-ups, EE_CS high
=09
PAGE_SIZE =3D page_mode;

return TRUE;
}

/************************************************************************=
**
* Wait for end of SPI transfer
=
*************************************************************************=
*/
PRIVATE char wait_for_SPI(void)=09
{
while (!(rSPSR & BV(SPIF))); // Peligro !!!??? a veces no sale
// despues de un comando de EE_WRITE
return rSPDR;
}

/************************************************************************=
**
* Send command to external EEPROM
=
*************************************************************************=
*/
PRIVATE void EE_command(char cmd)
{
rPORTB |=3D pin_EE_CS; // EE_CS =3D 1
rSPCR &=3D ~(BV(DORD)) & ~(BV(CPHA)) & ~(BV(CPOL)); // MSB first, =
phase and polarity
rPORTB &=3D ~pin_EE_CS; // EE_CS =3D 0
rSPDR =3D cmd; // Command
}

/************************************************************************=
**
* Read status byte from external EEPROM
=
*************************************************************************=
*/
PRIVATE unsigned char EE_read_status(void)
{
EE_command(EE_RDSR); // Command EE_RDSR
wait_for_SPI();
rSPDR =3D 0xff; // Dummy byte
wait_for_SPI();
rPORTB |=3D pin_EE_CS; // EE_CS =3D 1 (end of transmision)
return rSPDR;
}

/************************************************************************=
**
* Read 1 byte from external EEPROM
=
*************************************************************************=
*/
PUBLIC BYTE EE_read_byte(WORD adr) =09
{
EE_command(EE_READ); // Command EE_READ
wait_for_SPI();
rSPDR =3D (adr >> 8); // Adress high byte
wait_for_SPI();
rSPDR =3D adr; // Adress low byte
wait_for_SPI();
rSPDR =3D adr; // Dummy byte
wait_for_SPI();
rPORTB |=3D pin_EE_CS; // EE_CS =3D 1 (end of transmision)
return rSPDR;
}

/************************************************************************=
**
* Read a buffer from external EEPROM
=
*************************************************************************=
*/
PUBLIC void EE_read(WORD adr, BYTE *bf, WORD len)
{
EE_command(EE_READ); // Command EE_READ
wait_for_SPI();
rSPDR =3D (adr >> 8); // Adress high byte
wait_for_SPI();
rSPDR =3D adr; // Adress low byte
wait_for_SPI();
while (len--) {
rSPDR =3D adr; // Dummy byte
wait_for_SPI();
*bf++ =3D rSPDR; // Readed byte
}
rPORTB |=3D pin_EE_CS; // EE_CS =3D 1 (end of transmision)
}

/************************************************************************=
**
* Write a byte to external EEPROM
=
*************************************************************************=
*/
void EE_write_byte(WORD adr, BYTE data)
{ // Write 1 byte to external EEPROM
EE_command(EE_WREN); // Command EE_WREN
wait_for_SPI();
rPORTB |=3D pin_EE_CS; // EE_CS =3D 1 (necessary for WREN)

EE_command(EE_WRITE); // Command EE_WRITE
wait_for_SPI(); =09

rSPDR =3D (adr >> 8); // Adress high byte
wait_for_SPI();
rSPDR =3D adr; // Adress low byte
wait_for_SPI();
rSPDR =3D data; // Data byte
wait_for_SPI();
rPORTB |=3D pin_EE_CS; // EE_CS =3D 1 (end of transmision)

while(1) {
register BYTE s;

s =3D EE_read_status();
if (s & SS_WRITING)
continue;
break;
}
}

/************************************************************************=
**
* Write len bytes to external EEPROM
=
*************************************************************************=
*/
PUBLIC void EE_write(WORD adr, BYTE *bf, WORD len)
{
register BYTE cont;
char fin;
char first_time;

first_time =3D TRUE;
fin =3D FALSE;
while(!fin) {
/*-------------------------------*
* Command EE_WREN
*-------------------------------*/
EE_command(EE_WREN); =09
wait_for_SPI();
rPORTB |=3D pin_EE_CS; // EE_CS =3D 1 (necessary for WREN)

/*-------------------------------*
* Command EE_WRITE
*-------------------------------*/
EE_command(EE_WRITE);
wait_for_SPI();
rSPDR =3D (adr >> 8); // Adress high byte
wait_for_SPI();
rSPDR =3D adr; // Adress low byte
wait_for_SPI();

/*-------------------------------*
* Calcula bytes to write
*-------------------------------*/
if(len > PAGE_SIZE) {
cont =3D PAGE_SIZE;
if(first_time) {
cont =3D adr & (PAGE_SIZE-1);
cont =3D PAGE_SIZE - cont;
}
len -=3D cont;
adr +=3D cont;

} else {
cont =3D len;
fin =3D 1;
}
first_time =3D 0;

/*-------------------------------*
* Write data
*-------------------------------*/
while(cont--) {=09
rSPDR =3D *bf; // Data byte
bf++;
wait_for_SPI();
}
rPORTB |=3D pin_EE_CS; // EE_CS =3D 1 (end of transmision)

/*-------------------------------*
* Wait end of write
*-------------------------------*/
while(1) { // ??? Infinite loop, I don't like. Must be have a timer
register BYTE s;
=09
s =3D EE_read_status();
if (s & SS_WRITING)
continue;
break;
}
}

/*-------------------------------*
* Command EE_WRDI
*-------------------------------*/
EE_command(EE_WRDI);=09
wait_for_SPI();
rPORTB |=3D pin_EE_CS; // EE_CS =3D 1=20
}

------=_NextPart_000_0040_01C12032.A1811710--

From [email-masked] Thu Aug 09 16:03:59 2001
Received: from [209.239.42.69] (helo=server1200.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Uh39-0006E9-00
for <[email-masked]>; Thu, 09 Aug 2001 16:03:59 +1200
Received: (from patama2u@localhost)
by server1200.net (8.10.2/8.10.2) id f7941to11849;
Thu, 9 Aug 2001 00:01:55 -0400
Date: Thu, 9 Aug 2001 00:01:55 -0400
Message-Id: <[email-masked]>
X-Authentication-Warning: server1200.net: patama2u set sender to [email-masked] using -f
From: "Pasi Patama" <[email-masked]>
To: [email-masked]
X-Mailer: NeoMail 0.82
X-IPAddress: 194.89.205.28
Subject: [avr-gcc-list] int to EEPROM
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Saw nice example of storing float to eeprom, could some one please post
the same kind of example of storing & retreiving and int type variable
from/to eeprom ?

With regards,

Pasi

From [email-masked] Fri Aug 10 00:20:35 2001
Received: from mx.alphalink.com.au ([202.161.124.54])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Uonj-0006W9-00
for <[email-masked]>; Fri, 10 Aug 2001 00:20:35 +1200
Received: from research (d166-ps1-mel.alphalink.com.au [202.161.106.40])
by mx.alphalink.com.au (8.11.4/8.9.3) with SMTP id f79CIkr07353
for <[email-masked]>; Thu, 9 Aug 2001 22:18:47 +1000
From: "Ron Kreymborg" <[email-masked]>
To: <[email-masked]>
Subject: RE: [avr-gcc-list] int to EEPROM
Date: Thu, 9 Aug 2001 22:24:12 +1000
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
In-reply-to: <[email-masked]>
Importance: Normal
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>
> Saw nice example of storing float to eeprom, could some one please post
> the same kind of example of storing & retreiving and int type variable
> from/to eeprom ?
>
> With regards,
>
> Pasi
>

Well here is one possible organisation. For the int case where (for example)
the variable in eeprom you are concerned with is called "TheVariable ". It
is declared in the usual way:

#define EEPROM __attribute__((section(".eeprom")))

int TheVariable EEPROM = 0;

You extract it with:

int x = eInt(&TheVariable);

and you can write it back with:

eWriteInt(&x, &TheVariable);

Don't forget the ampersand! Here is a complete set...

//--------------------------------------------------------------------------
---
float eFloat(float *ptr)
{
float a;

eeprom_read_block(&a, (int)ptr, 4);
return a;
}

//--------------------------------------------------------------------------
---
long eLong(long *ptr)
{
long a;

eeprom_read_block(&a, (int)ptr, 4);
return a;
}

//--------------------------------------------------------------------------
---
int eInt(int *ptr)
{
int a;

eeprom_read_block(&a, (int)ptr, 2);
return a;
}

//--------------------------------------------------------------------------
---
BYTE eByte(BYTE *ptr)
{
BYTE a;

eeprom_read_block(&a, (int)ptr, 1);
return a;
}

//--------------------------------------------------------------------------
---
void eWriteFloat(float *numPtr, void *addr)
{
BYTE *ptr, *num;

ptr = (BYTE*)addr;
num = (BYTE*)numPtr;
eeprom_wb((int)ptr++, *num++);
eeprom_wb((int)ptr++, *num++);
eeprom_wb((int)ptr++, *num++);
eeprom_wb((int)ptr++, *num++);
}

//--------------------------------------------------------------------------
---
void eWriteLong(long *numPtr, void *addr)
{
BYTE *ptr, *num;

ptr = (BYTE*)addr;
num = (BYTE*)numPtr;
eeprom_wb((int)ptr++, *num++);
eeprom_wb((int)ptr++, *num++);
eeprom_wb((int)ptr++, *num++);
eeprom_wb((int)ptr++, *num++);
}

//--------------------------------------------------------------------------
---
void eWriteInt(int *numPtr, void *addr)
{
BYTE *ptr, *num;

ptr = (BYTE*)addr;
num = (BYTE*)numPtr;
eeprom_wb((int)ptr++, *num++);
eeprom_wb((int)ptr++, *num++);
}

//--------------------------------------------------------------------------
---
void eWriteByte(BYTE *numPtr, void *addr)
{
BYTE *ptr, *num;

ptr = (BYTE*)addr;
num = (BYTE*)numPtr;
eeprom_wb((int)ptr++, *num++);
}

-------------------------------------------
Ron Kreymborg
Jennaron Research
Melbourne, Australia

From [email-masked] Fri Aug 10 09:53:00 2001
Received: from femail15.sdc1.sfba.home.com ([24.0.95.142])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Uxjf-0006xT-00
for <[email-masked]>; Fri, 10 Aug 2001 09:53:00 +1200
Received: from mike.hammycorp.com ([24.2.77.128])
by femail15.sdc1.sfba.home.com
(InterMail vM.4.01.03.20 201-229-121-120-20010223) with SMTP
id <[email-masked]>
for <[email-masked]>; Thu, 9 Aug 2001 14:50:53 -0700
To: [email-masked]
Date: Thu, 09 Aug 2001 17:53:31 EDT
From: "Mike Dombrowski" <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Reply-To: [email-masked]
X-Mailer: BeOS Mail
Message-Id: <[email-masked]>
Subject: [avr-gcc-list] Problems with GCC3.0 + Binutils 2.11.2 + avr-libc-20010717 + BeOS 5.0
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello all. I have tried to get GCC 3.0 setup as a cross-compiler for
AVR on my BeOS 5 machine and even though everything compiles and
installs fine I still run into issues along the lines of "it doesn't
work" When I try to compile a file containing just "int main( void )
{}" with "avr-gcc -mmcu=at90s8515 main.c" I get the error "avr-gcc:
installation problem, cannot exec `/boot/develop/tools/gnupro/lib/gcc-
lib/avr/3.0/../../../../avr/bin/ld': Missing library" I'm a gcc/avr/
porting newbie and I have no idea what could be causing this error. Any
other files I try give the same error. Build info at the end.

Thanks
Mike

I followed: http://www.objsw.com/CrossGCC/FAQ-4.html for the general
form of how to build the cross-compiler. My actually build/configure
commands were as follows:

For all:
$ target=avr
$ prefix=/boot/develop/tools/gnupro

Binutils:
$ ../binutils-2.11.2/configure --target=$target --prefix=$prefix -v
$ make all
$ make install

GCC:
$ ../gcc-3.0/configure --target=$target --prefix=$prefix -v --enable-
languages="c"
$ make all
$ make install

AVR-LIBC:
$ make prefix=/boot/develop/tools/gnupro
$ make prefix=/boot/develop/tools/gnupro install

From [email-masked] Fri Aug 10 22:17:55 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15V9MZ-0007Pc-00
for <[email-masked]>; Fri, 10 Aug 2001 22:17:55 +1200
Received: from jpk1.jpk.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id f7AAJ5M31165
for <[email-masked]>; Fri, 10 Aug 2001 22:19:05 +1200
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Fri, 10 Aug 2001 22:15:26 +1200
To: <[email-masked]>
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] Problems with avr-gcc vers 3.0
In-Reply-To: <p05100316b794f89b56c2@[203.47.34.3]>
References: <[email-masked]>
<[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

See the earlier posts regarding redundant loop optimisations, as I
understand it this is gcc related and not specific to the avr port. Some
think it is a bug but others describe it as normal.

http://avr.jpk.co.nz/pipermail/avr-gcc-list/2001-April/000478.html

Jason Kyle

At 09:53 7/08/2001 +0800, Peter N Lewis wrote:
>>Is there something I must know?
>
>This delay routine does *nothing* as far as the rest of the program is
>concerned, so it would be a perfectly legitimate compilation of it to
>translate it in to:
>
>void delay(void)
>{
>}
>
>counter is not externally visible, so its value on completion is irrelevant.
>
>If you want to do a delay routine, you should do it in assembler code,
>since otherwise there is no reasonable guarantee of what result you'll get
>on any given compiler. Even if you label the counter variable "volatile"
>and the compiler actually has to count through them all in order, the
>amount of time it will take is pretty much random depending on the
>compiler version, optimizing flags, etc.
>
>Better yet would be to use a timer of course, although that is not always
>possible.
>
>I have to admit, it is an odd optimization!
> Peter.

From [email-masked] Fri Aug 10 22:30:05 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15V9YL-0007QX-00
for <[email-masked]>; Fri, 10 Aug 2001 22:30:05 +1200
Received: from jpk1.jpk.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id f7AAV5M32438;
Fri, 10 Aug 2001 22:31:05 +1200
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Fri, 10 Aug 2001 22:27:26 +1200
To: [email-masked], [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] String Arrays in FLASH & gccavr 3.0
In-Reply-To: <OFB910CC1F.DAF0DABA-ON69256AA1.0007377F@LocalDomain>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Have a look at the eAVR project test programs for some examples

http://avr.jpk.co.nz/eavr/test_programs.html

Cheers,

Jason Kyle

At 11:13 7/08/2001 +0930, [email-masked] wrote:
>Greetings,
>
>I am wondering if anyone has a better method of defining arrays of null
>terminated strings in FLASH. With the additional overhead of reading
>constant byte data from FLASH, reading pointers to strings in FLASH does
>present some difficulty. It is easy to write a macro to do the two byte
>to pointer conversion, what I am having trouble with is *forcing* gcc 3.0
>to put the pointer (address) in FLASH and not define it as constant data in
>RAM. Defining my constant strings such;
>
>static __attribute__ ((progmem)) char* F_strings[] =
>{
> "Menu1",
> "Menu2",
> "Menu3"
>};
>
>Results in the whole lot being placed in RAM, seems to ignore the attribute
>directive. Change it thus;
>
>static __attribute__ ((progmem)) char c_string1[] = "Menu1";
>static __attribute__ ((progmem)) char c_string2[] = "Menu2";
>static __attribute__ ((progmem)) char c_string3[] = "Menu3";
>
>static __attribute__ ((progmem)) char* F_strings[] =
>{
> c_string1,
> c_string2,
> c_string3
>};
>
>Results in c_string1,2 &3 being placed in FLASH, but F_strings is still
>retained in RAM (still ignores attribute), albeit this much smaller than
>the first case. Now how can I force the compiler to put F_strings[] in
>FLASH aswell so I can point my macros at them ? I am sure this is a
>problem with my limited understanding of gccavr, I have done this
>previously with Hitachi and a PC, but on those projects I didn't care if my
>pointers and string data were in RAM or ROM. Any clues ?
>
>Matthew

From [email-masked] Sat Aug 11 12:33:45 2001
Received: from femail14.sdc1.sfba.home.com ([24.0.95.141])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15VMim-00084G-00
for <[email-masked]>; Sat, 11 Aug 2001 12:33:45 +1200
Received: from hal2001 ([24.77.53.16]) by femail14.sdc1.sfba.home.com
(InterMail vM.4.01.03.20 201-229-121-120-20010223) with SMTP
id <20010811003148.LQLM23412.femail14.sdc1.sfba.home.com@hal2001>
for <[email-masked]>; Fri, 10 Aug 2001 17:31:48 -0700
Message-ID: <003b01c121fb$e2e5bf60$0400a8c0@hatjs>
From: "Jamie Morken" <[email-masked]>
To: <[email-masked]>
Date: Fri, 10 Aug 2001 17:23:46 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2615.200
X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Subject: [avr-gcc-list] sscanf in stdlib?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

I have an older version of avr-gcc installed in linux and it doesn't have
support for the sscanf function. I'm wondering if the newer versions of
avr-gcc include this function and if not how I can implement this function
myself perhaps?

best regards,
Jamie Morken

From [email-masked] Mon Aug 13 02:24:07 2001
Received: from vita.hk.net
([152.101.101.101] helo=hk.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Vw9u-0002d7-00
for <[email-masked]>; Mon, 13 Aug 2001 02:24:06 +1200
Received: from hk.net (p37.tnt.hk.net [202.66.202.37])
by hk.net (8.9.1/8.9.1) with ESMTP id WAA25357
for <[email-masked]>; Sun, 12 Aug 2001 22:22:12 +0800 (HKT)
Message-ID: <[email-masked]>
Date: Sun, 12 Aug 2001 22:11:59 +0800
From: Kang Tin LAI <[email-masked]>
Organization: Solar System
X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 i86pc)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=big5
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] bug !
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

void fxn(void *m1, void *m2)
{
m1 = m2;
}

-O1 -O2 -O3 or -Os except -O0

The only generated code is: ret

Any idea?

From [email-masked] Mon Aug 13 05:25:19 2001
Received: from blount.mail.mindspring.net ([207.69.200.226])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15VyzG-0002kB-00
for <[email-masked]>; Mon, 13 Aug 2001 05:25:18 +1200
Received: from mindspring.com (user-38ld7bf.dialup.mindspring.com [209.86.157.111])
by blount.mail.mindspring.net (8.9.3/8.8.5) with ESMTP id NAA17259;
Sun, 12 Aug 2001 13:23:25 -0400 (EDT)
Message-ID: <[email-masked]>
Date: Sun, 12 Aug 2001 13:23:28 -0400
From: "Allan G. Schrum/Theresa C. Schrum" <[email-masked]>
Reply-To: [email-masked]
X-Mailer: Mozilla 4.77 [en] (Win95; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Kang Tin LAI <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] bug !
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Kang,

The m1 and m2 variables are local to the procedure. They
each point to a "void" object. So your statement does
absolutely nothing other than assign the location of one
void object (in local variable m2) to the local variable m1.
Since it is never used, the optimizer says this is not too
interesting and all you get is a "ret". Nothing outside of
the procedure is affected by the statement.

If you had done:

*m1 = *m2 ;

then something different would occur.

Regards,

-Allan

Kang Tin LAI wrote:

> void fxn(void *m1, void *m2)
> {
> m1 = m2;
> }
>
> -O1 -O2 -O3 or -Os except -O0
>
> The only generated code is: ret
>
> Any idea?
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Mon Aug 13 09:36:34 2001
Received: from gaia.di.uoa.gr ([195.134.65.3])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15W2uO-0002y3-00
for <[email-masked]>; Mon, 13 Aug 2001 09:36:33 +1200
Received: from localhost (grad0330@localhost)
by gaia.di.uoa.gr (8.11.1/8.11.1) with ESMTP id f7CLbWC19951
for <[email-masked]>; Mon, 13 Aug 2001 00:37:32 +0300 (EET DST)
Date: Mon, 13 Aug 2001 00:37:31 +0300 (EET DST)
From: Stergiou Stergios <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] Possible bug
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

signed char var;

var=0;
if(var<0)
...;

the condition is true when -Os and behaves normally when -O.
I am not using the latest version so maybe this is fixed.

This aside, has anyone made a point-to-point full-duplex
connection between 2 avrs, using their spi? My attempt so
far has been unsuccessfull regarding the reception from the
master. I have N byte packets and transmit N 0x00 before
the actual packet. The packet header is !=0x00. Upon receiving,
I begin to accept data when N 0x00 have come and the next
byte is the msb of the packet header. Apart from this packet-level
synchronization, I sync in a byte-level by raising and droping
-ss before every byte transmittion. I think that this last
action may interfere with the slave (it resets its spi).
Any ideas maybe?

From [email-masked] Mon Aug 13 21:37:20 2001
Received: from rathole-ext.interface-business.de ([193.101.57.204] helo=rathole)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15WE9v-0003RV-00
for <[email-masked]>; Mon, 13 Aug 2001 21:37:20 +1200
Received: from ida.interface-business.de ([193.101.57.9]) by rathole; Mon, 13 Aug 2001 11:35:50 +0200 (MEST)
Received: (from j@localhost) by ida.interface-business.de id f7D9ZO961377; Mon, 13 Aug 2001 11:35:24 +0200 (MET DST)
Date: Mon, 13 Aug 2001 11:35:24 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <p05100316b794f89b56c2@[203.47.34.3]> <[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] Problems with avr-gcc vers 3.0
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Jason Kyle <[email-masked]> wrote:

> See the earlier posts regarding redundant loop optimisations, as I
> understand it this is gcc related and not specific to the avr port.

It is specific to the AVR target. If you generate code with the same
gcc (same source tree) for another target (like the i386), the same C
program doesn't compile into this gratituous ``subtract 625 per each
loop iteration'' assembler code, but just subtracts one per loop
iteration as one would expect from it (and as previous gcc versions
did).

Technically, the compiler is free to substract 625 or anything else,
or to not execute the loop at all, or to execute it completely (since
optimization is beyond the scope of the C standard). However, i think
it completely violates POLA to subtract /arbitrary/ values like 625.
POLA would be to either execute the loop step by step (as gcc used to
do all the time), or to at least optimize the loop completely away.

I have yet to find /where/ in the compiler source code this funny 625
originates from...

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Tue Aug 14 03:45:57 2001
Received: from vita.hk.net
([152.101.101.101] helo=hk.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15WJud-0003gP-00
for <[email-masked]>; Tue, 14 Aug 2001 03:45:56 +1200
Received: from hk.net (p44.tnt.hk.net [202.66.202.44])
by hk.net (8.9.1/8.9.1) with ESMTP id XAA03926
for <[email-masked]>; Mon, 13 Aug 2001 23:44:06 +0800 (HKT)
Message-ID: <[email-masked]>
Date: Mon, 13 Aug 2001 23:33:51 +0800
From: Kang Tin LAI <[email-masked]>
Organization: Solar System
X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 i86pc)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Subject: Re: [avr-gcc-list] bug !
References: <[email-masked]>
Content-Type: text/plain; charset=big5
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Very sorry" (The US Government said that to The China Government :) to
disturb the list, it was a logic failure of my brain. I forgot that
pointer is also passed by value in this case, not reference. I want to
copy something pointed by m2 to a location pointed by m1, so m1 should
be a pointer to pointer, it is OK now.

I surprise for all people here their responses, the list is quite silent
these days.

Kang Tin LAI wrote:
>
> void fxn(void *m1, void *m2)
> {
> m1 = m2;
> }
>
> -O1 -O2 -O3 or -Os except -O0
>
> The only generated code is: ret
>
> Any idea?
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Tue Aug 14 21:52:26 2001
Received: from mail.ams.de ([195.30.77.11] helo=[192.168.90.11])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Was6-0004QI-00
for <[email-masked]>; Tue, 14 Aug 2001 21:52:26 +1200
Received: from excadva.advaoptical.de (unverified) by
(Content Technologies SMTPRS 4.2.1) with ESMTP id <T555d4fd665c0a85a0b118@> for <[email-masked]>;
Tue, 14 Aug 2001 11:48:53 +0200
Received: by excadva.advaoptical.de with Internet Mail Service (5.5.2653.19)
id <P722Z41B>; Tue, 14 Aug 2001 11:48:58 +0200
Message-ID: <[email-masked]>
From: Stefan Wimmer <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Date: Tue, 14 Aug 2001 11:49:48 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
charset="iso-8859-1"
Subject: [avr-gcc-list] Re: bug !
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Kang Tin LAI <[email-masked]> wrote:
>
> I surprise for all people here their responses, the list is
> quite silent these days.

Maybe it is just summer holiday time ?

Greetings from Germany,
Stefan

From [email-masked] Wed Aug 15 04:17:07 2001
Received: from 237.dsl9221.surewest.net ([63.92.21.237] helo=macross)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15WgsM-0004eo-00
for <[email-masked]>; Wed, 15 Aug 2001 04:17:07 +1200
Received: from [192.168.0.203] (dyn203.ibexa.com [192.168.0.203])
by macross (8.9.3/8.9.3) with ESMTP id JAA17549
for <[email-masked]>; Tue, 14 Aug 2001 09:15:28 -0700
User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.02.2022
Date: Tue, 14 Aug 2001 09:15:34 -0700
From: Barry Brown <[email-masked]>
To: <[email-masked]>
Message-ID: <[email-masked]>
In-Reply-To: <[email-masked]>
Mime-version: 1.0
Content-type: text/plain; charset="US-ASCII"
Content-transfer-encoding: 7bit
Subject: [avr-gcc-list] New to the list
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I thought I'd break the silence by introducing myself. I'm new to the list
(as of Monday) and new to AVR programming.

I'm a software programmer working in Sacramento, California. My company
makes an embedded security device based on Linux. I'm also a professor at a
local community college teaching, what else?, computer science.

My interest in electronics goes way back to my childhood. Only in the past
few years have I started showing an interest in tinkering with
microcontrollers. It's just a hobby and so far unrelated to my work,
although I've surprised some of my coworkers by showing that I not only do
software, but hardware as well. :)

The first experience I had with microcontrollers was the PIC, but I quickly
grew weary of its shortcomings: un-orthogonal instruction set, quirky
syntax, and very limited RAM. Frustrated, I set this hobby aside for about
two years. Upon switching jobs and working in a place where hardware and
software people interact (in fact, my manager is formerly a hardware guy), I
was pointed in the direction of the AVR. So far, I like what I see. I
purchased my first AVRs and assorted support components less than a week
ago.

At this time, my toolset is the avr-gcc compiler and PonyProg programmer. I
built the latter from schematics posted on the net. My first Hello World
program (ie, blinking an LED) took a couple days to get working.

There you have it in a nutshell. One observation: the AVR seems to have a
large European following whereas the PIC appears to be largely an American
thing. Why is that? It's certainly hard to find sources for AVRs here.
I've found only eBay, DigiKey, and a handful of other distributors, whereas
almost everyone (even my local mom-and-pop electronics store) carries the
PIC.

Barry

From [email-masked] Wed Aug 15 09:04:26 2001
Received: from [195.235.113.141] (helo=tsmtp1.mail.isp)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15WlML-0004uJ-00
for <[email-masked]>; Wed, 15 Aug 2001 09:04:22 +1200
Received: from GINES ([213.96.107.254]) by tsmtp1.mail.isp
(Netscape Messaging Server 4.15 tsmtp1 Jun 21 2001 23:53:48)
with SMTP id GI2T3L01.WB8; Tue, 14 Aug 2001 23:02:09 +0200
Message-ID: <000a01c12503$c7838760$0400a8c0@GINES>
From: "Gines Martinez" <[email-masked]>
To: "Barry Brown" <[email-masked]>,
<[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] New to the list
Date: Tue, 14 Aug 2001 22:57:49 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

From Spain hello and welcome, Barry.
I'm working with Atmel microcontrollers only few months ago.
I'm starting developing a system based in Atmega163 to send alarms through
GSM modem.
I'd say much more but my English is very bad, so I say:
"El ambiente es bueno, y hay gente que ademas de generosa sabe un huevo".
Regards Gins

From [email-masked] Fri Aug 17 09:52:30 2001
Received: from popix.tele.net ([194.183.128.154])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15XV40-0006pN-00
for <[email-masked]>; Fri, 17 Aug 2001 09:52:29 +1200
Received: from sendnix.tele.net (sendnix [194.183.128.150])
by popix.TELE.NET (8.9.3/8.9.3) with ESMTP id XAA18881
for <[email-masked]>; Thu, 16 Aug 2001 23:49:26 +0200 (MET DST)
Received: from jo (194-208-136-074.TELE.NET [194.208.136.74])
by sendnix.tele.net (8.11.0/8.11.0) with ESMTP id f7GLouv28098
for <[email-masked]>; Thu, 16 Aug 2001 23:50:56 +0200
From: Michael Jochum <[email-masked]>
To: [email-masked]
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Evolution/0.12 (Preview Release)
Date: 16 Aug 2001 23:48:39 +0200
Message-Id: <997998519.2684.30.camel@mjo>
Mime-Version: 1.0
Subject: [avr-gcc-list] inline assembler problem
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

hi all!

i am writing a crc function and cant get the inline asm code to work.
the pure c-code is working.
as you can see in crc.s the cpc instruction gets the wrong parameter.
what is the problem with this code?

i use:
gcc version 3.0.1 20010806 (prerelease)
binutils version version 2.11.90 20010814
avr-libc-20010717

and cmd is:
avr-gcc -O3 -mmcu=at90s4433 -c crc.c -S -o crc.s

tia,
michael.

--- crc.asm ---
#include <io.h>

static unsigned char crchi;
static unsigned char crclo;

void crcbit(unsigned char bit){
#if 1
asm volatile(
"clc" "\n\t"
"ror %0" "\n\t"
"ror %1" "\n\t"
"cpc %2,__zero_reg__" "\n\t"
"breq crc_skip_op" "\n\t"
"push r24" "\n\t"
"ldi r24,0x84" "\n\t"
"eor %0,r24" "\n\t"
"ldi r24,0x08" "\n\t"
"eor %1,r24" "\n\t"
"pop r24" "\n\t"
"crc_skip_op:" "\n\t"
: "=r" (crchi), "=r" (crclo), "=&r" (bit)
: "0" (crchi), "1" (crclo)
: "0", "1"
);
#else
unsigned char tmp = crclo & 1; //rotate the 16 bits to the right
crclo = crclo >> 1;
crclo |= (crchi & 1) << 7;
crchi = crchi >> 1;

if (((tmp & 0x01)^bit) ==0x01){
crchi = crchi^0x84;
crclo = crclo^0x08;
}
#endif
}

main() {
crclo=crchi=0xff;
for(;;) {
crcbit(1);
crcbit(0);
}
}

--- crc.s ---
.file "crc.c"
.arch at90s4433
__SREG__ = 0x3f
__SP_H__ = 0x3e
__SP_L__ = 0x3d
__tmp_reg__ = 0
__zero_reg__ = 1
_PC_ = 2
.text
.global crcbit
.type crcbit,@function
crcbit:
/* prologue: frame size=0 */
/* prologue end (size=0) */
lds r19,crchi
lds r18,crclo
mov r20,r19
mov r22,r18
/* #APP */
clc
ror r20
ror r22
cpc r18,__zero_reg__ <<<< problem
breq crc_skip_op
push r24
ldi r24,0x84
eor r20,r24
ldi r24,0x08
eor r22,r24
pop r24
crc_skip_op:

/* #NOAPP */
mov r21,r20
mov r18,r22
sts crchi,r21
sts crclo,r18
/* epilogue: frame size=0 */
ret
/* epilogue end (size=1) */
/* function crcbit size 39 (38) */
.Lfe1:
.size crcbit,.Lfe1-crcbit
.global main
.type main,@function
main:
/* prologue: frame size=0 */
ldi r28,lo8(__stack - 0)
ldi r29,hi8(__stack - 0)
out __SP_H__,r29
out __SP_L__,r28
/* prologue end (size=4) */
ldi r18,lo8(-1)
sts crchi,r18
sts crclo,r18
.L3:
ldi r24,lo8(1)
rcall crcbit
ldi r24,lo8(0)
rcall crcbit
rjmp .L3
/* epilogue: frame size=0 */
__stop_progIi__:
rjmp __stop_progIi__
/* epilogue end (size=1) */
/* function main size 15 (10) */
.Lfe2:
.size main,.Lfe2-main
.lcomm crchi,1
.lcomm crclo,1
/* File crc.c: code 54 = 0x0036 ( 48), prologues 4, epilogues 2
*/

From [email-masked] Fri Aug 17 12:39:47 2001
Received: from proxy.peter.com.au ([203.47.34.4] helo=peter.com.au)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15XXfu-0006xF-00
for <[email-masked]>; Fri, 17 Aug 2001 12:39:47 +1200
Received: from [203.47.34.3] ([203.47.34.3] verified) by peter.com.au (Stalker SMTP Server 1.8b2) with ESMTP id S.0000439333 for <[email-masked]>; Fri, 17 Aug 2001 08:38:05 +0800
Mime-Version: 1.0
X-Sender: peter@pop
Message-Id: <p0510030fb7a215dcd742@[203.47.34.3]>
Date: Fri, 17 Aug 2001 08:29:20 +0800
To: [email-masked]
From: Peter N Lewis <[email-masked]>
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
Subject: [avr-gcc-list] Efficient htons/swap16 or htonl/swap32 in place?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I'd like to do a whole bunch of int16 and int32 swaps on a struct to
get the numbers in network byte order. I read through he assembly
cookbook (thanks Harald!) and wrote thie macro:

#define htonuint16( n ) ({ \
uint16_t __t = n; \
__asm__ ( \
"mov __tmp_reg__, %A0" "\n\t" \
"mov %A0, %B0" "\n\t" \
"mov %B0, __tmp_reg__" "\n\t" \
: "=r" (__t) \
: "0" (__t) \
); \
__t; \
})

and C code:

data.field = htonuint16( data.field )

but it generates this code:

ldd r20,Y+1
ldd r21,Y+2
/* #APP */
mov __tmp_reg__, r20
mov r20, r21
mov r21, __tmp_reg__

/* #NOAPP */
std Y+1,r20
std Y+2,r21

with -Os or -O3.

Is there any way to convince the compiler to generate:

ldd r20,Y+1
ldd r21,Y+2
std Y+1,r21
std Y+2,r22

I would have thought a peephole optimizer would have little trouble
generating this good code from the initial code?

Thanks for any ideas,
Peter.

--
<http://www.interarchy.com/> <ftp://ftp.interarchy.com/interarchy.hqx>

From [email-masked] Fri Aug 17 18:24:12 2001
Received: from atusks01.alcatel.at ([212.183.9.130] helo=mail.alcatel.at)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Xd3D-0007BH-00
for <[email-masked]>; Fri, 17 Aug 2001 18:24:11 +1200
Received: from alcatel.at (atusel33.aut.alcatel.at [146.112.129.215])
by mail.alcatel.at (8.9.3/8.9.3/1.21 01/27/01 21:43:09) with ESMTP id IAA04824;
Fri, 17 Aug 2001 08:22:40 +0200 (MET DST)
Message-ID: <[email-masked]>
Date: Fri, 17 Aug 2001 08:22:39 +0200
From: Christoph Plattner <[email-masked]>
Organization: AAA
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.5.1 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
To: Michael Jochum <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] inline assembler problem
References: <997998519.2684.30.camel@mjo>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello !

I HAVE GOT IT !

The varible "bit" is an input not an output parameter !!
So it is in the wrong line of the __asm__ __volatile__ statement !
I think you have to write:

__asm__ __volatile__ (
"code...." "\n\t"
.
.
"code...." "\n\t"
: "=r" (crchi), "=r" (crclo)
: "0" (crchi), "1" (crclo), "=r" (bit)
: "r24", .... << registers that may be modified and
the compiler has to concern about !
);

Further: what is "=&r" ? I only know "=r", and if I want to reference
a memory (pointer), then "=m" is used.

With friendly regards
Christoph P.

------------------------------------------------------------------
private: [email-masked]
company: [email-masked]

Michael Jochum wrote:
>
> hi all!
>
> i am writing a crc function and cant get the inline asm code to work.
> the pure c-code is working.
> as you can see in crc.s the cpc instruction gets the wrong parameter.
> what is the problem with this code?
>
> i use:
> gcc version 3.0.1 20010806 (prerelease)
> binutils version version 2.11.90 20010814
> avr-libc-20010717
>
> and cmd is:
> avr-gcc -O3 -mmcu=at90s4433 -c crc.c -S -o crc.s
>
> tia,
> michael.
>
> --- crc.asm ---
> #include <io.h>
>
> static unsigned char crchi;
> static unsigned char crclo;
>
> void crcbit(unsigned char bit){
> #if 1
> asm volatile(
> "clc" "\n\t"
> "ror %0" "\n\t"
> "ror %1" "\n\t"
> "cpc %2,__zero_reg__" "\n\t"
> "breq crc_skip_op" "\n\t"
> "push r24" "\n\t"
> "ldi r24,0x84" "\n\t"
> "eor %0,r24" "\n\t"
> "ldi r24,0x08" "\n\t"
> "eor %1,r24" "\n\t"
> "pop r24" "\n\t"
> "crc_skip_op:" "\n\t"
> : "=r" (crchi), "=r" (crclo), "=&r" (bit)
> : "0" (crchi), "1" (crclo)
> : "0", "1"
> );
> #else
> unsigned char tmp = crclo & 1; //rotate the 16 bits to the right
> crclo = crclo >> 1;
> crclo |= (crchi & 1) << 7;
> crchi = crchi >> 1;
>
> if (((tmp & 0x01)^bit) ==0x01){
> crchi = crchi^0x84;
> crclo = crclo^0x08;
> }
> #endif
> }
>
> main() {
> crclo=crchi=0xff;
> for(;;) {
> crcbit(1);
> crcbit(0);
> }
> }
>
> --- crc.s ---
> .file "crc.c"
> .arch at90s4433
> __SREG__ = 0x3f
> __SP_H__ = 0x3e
> __SP_L__ = 0x3d
> __tmp_reg__ = 0
> __zero_reg__ = 1
> _PC_ = 2
> .text
> .global crcbit
> .type crcbit,@function
> crcbit:
> /* prologue: frame size=0 */
> /* prologue end (size=0) */
> lds r19,crchi
> lds r18,crclo
> mov r20,r19
> mov r22,r18
> /* #APP */
> clc
> ror r20
> ror r22
> cpc r18,__zero_reg__ <<<< problem
> breq crc_skip_op
> push r24
> ldi r24,0x84
> eor r20,r24
> ldi r24,0x08
> eor r22,r24
> pop r24
> crc_skip_op:
>
> /* #NOAPP */
> mov r21,r20
> mov r18,r22
> sts crchi,r21
> sts crclo,r18
> /* epilogue: frame size=0 */
> ret
> /* epilogue end (size=1) */
> /* function crcbit size 39 (38) */
> .Lfe1:
> .size crcbit,.Lfe1-crcbit
> .global main
> .type main,@function
> main:
> /* prologue: frame size=0 */
> ldi r28,lo8(__stack - 0)
> ldi r29,hi8(__stack - 0)
> out __SP_H__,r29
> out __SP_L__,r28
> /* prologue end (size=4) */
> ldi r18,lo8(-1)
> sts crchi,r18
> sts crclo,r18
> .L3:
> ldi r24,lo8(1)
> rcall crcbit
> ldi r24,lo8(0)
> rcall crcbit
> rjmp .L3
> /* epilogue: frame size=0 */
> __stop_progIi__:
> rjmp __stop_progIi__
> /* epilogue end (size=1) */
> /* function main size 15 (10) */
> .Lfe2:
> .size main,.Lfe2-main
> .lcomm crchi,1
> .lcomm crclo,1
> /* File crc.c: code 54 = 0x0036 ( 48), prologues 4, epilogues 2
> */
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

------------------------------------------------------------------
private: [email-masked]
company: [email-masked]

From [email-masked] Fri Aug 17 20:30:30 2001
Received: from proxy.peter.com.au ([203.47.34.4] helo=peter.com.au)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15Xf1R-0007GT-00
for <[email-masked]>; Fri, 17 Aug 2001 20:30:29 +1200
Received: from [203.47.34.3] ([203.47.34.3] verified) by peter.com.au (Stalker SMTP Server 1.8b2) with ESMTP id S.0000439491 for <[email-masked]>; Fri, 17 Aug 2001 16:28:47 +0800
Mime-Version: 1.0
X-Sender: peter@pop
Message-Id: <p05100329b7a285cf248f@[203.47.34.3]>
In-Reply-To: <[email-masked]>
References: <997998519.2684.30.camel@mjo> <[email-masked]>
Date: Fri, 17 Aug 2001 16:29:52 +0800
To: [email-masked]
From: Peter N Lewis <[email-masked]>
Subject: Re: [avr-gcc-list] inline assembler problem
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>The varible "bit" is an input not an output parameter !!
>So it is in the wrong line of the __asm__ __volatile__ statement !
>I think you have to write:
>
> __asm__ __volatile__ (
> "code...." "\n\t"
> .
> .
> "code...." "\n\t"
> : "=r" (crchi), "=r" (crclo)
> : "0" (crchi), "1" (crclo), "=r" (bit)
> : "r24", .... << registers that may be modified and
> the compiler has to concern about !
> );
>
>Further: what is "=&r" ? I only know "=r", and if I want to reference
>a memory (pointer), then "=m" is used.

Read the GCC-AVR Inline Assembler Cookbook by Harald Kipp

http://www.egnite.de/ethernut/GCCAVRInlAsmCB.pdf

=&r means that the register parameter cannot be the same as any input
register - you want this if you are going to write to it before you
have finished with any input parameters. The list (from the above
document) is:

Constraint Used for Range
a Simple upper registers r16 to r23
b Base pointer registers pairs y,z
d Upper register r16 to r31
e Pointer register pairs x,y,z
G Floating point constant 0.0
I 6-bit positive integer constant 0 to 63
J 6-bit negative integer constant -63 to 0
K Integer constant 2 (Program counter?)
L Integer constant 0
l Lower registers r0 to r15
M 8-bit integer constant 0 to 255
N Integer constant -1
O Integer constant 8, 16, 24
P Integer constant 1
r Any register r0 to r31
t Temporary register r0
w Special upper register pairs r24, r26, r28, r30
x Pointer register pair X x (r27:r26)
y Pointer register pair Y y (r29:r28)
z Pointer register pair Z z (r31:r30)

Enjoy,
Peter.

--
<http://www.interarchy.com/> <ftp://ftp.interarchy.com/interarchy.hqx>

From [email-masked] Sat Aug 18 04:14:53 2001
Received: from popix.tele.net ([194.183.128.154])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15XmGo-0007Zc-00
for <[email-masked]>; Sat, 18 Aug 2001 04:14:52 +1200
Received: from sendnix.tele.net (sendnix [194.183.128.150])
by popix.TELE.NET (8.9.3/8.9.3) with ESMTP id SAA03897
for <[email-masked]>; Fri, 17 Aug 2001 18:11:47 +0200 (MET DST)
Received: from jo (194-208-136-074.TELE.NET [194.208.136.74])
by sendnix.tele.net (8.11.0/8.11.0) with ESMTP id f7HGDKS15946
for <[email-masked]>; Fri, 17 Aug 2001 18:13:20 +0200
Subject: Re: [avr-gcc-list] inline assembler problem
From: Michael Jochum <[email-masked]>
To: [email-masked]
In-Reply-To: <[email-masked]>
References: <997998519.2684.30.camel@mjo> <[email-masked]>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Evolution/0.12 (Preview Release)
Date: 17 Aug 2001 18:11:02 +0200
Message-Id: <998064662.1428.7.camel@mjo>
Mime-Version: 1.0
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

hi!

thanks - that was the problem
how stupid :)

best regards,
michael.

On 17 Aug 2001 08:22:39 +0200, Christoph Plattner wrote:
> The varible "bit" is an input not an output parameter !!
> So it is in the wrong line of the __asm__ __volatile__ statement !
> I think you have to write:
>
> __asm__ __volatile__ (
> "code...." "\n\t"
> .
> .
> "code...." "\n\t"
> : "=r" (crchi), "=r" (crclo)
> : "0" (crchi), "1" (crclo), "=r" (bit)
> : "r24", .... << registers that may be modified and
> the compiler has to concern about !
> );

From [email-masked] Sat Aug 18 05:37:22 2001
Received: from express.baneng.com ([199.86.92.2])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15XnYg-0007da-00
for <[email-masked]>; Sat, 18 Aug 2001 05:37:22 +1200
Received: from [192.9.200.68] by express.baneng.com (NTMail 6.04.0010/NY1628.00.9978dd2f) with ESMTP id zjykhaaa for [email-masked]; Fri, 17 Aug 2001 12:35:27 -0500
Reply-To: <[email-masked]>
From: "Mike Bechtold" <[email-masked]>
To: "Avr-Gcc-List (E-mail)" <[email-masked]>
Date: Fri, 17 Aug 2001 12:38:12 -0500
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Subject: [avr-gcc-list] Windows version of UISP
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I've just released a new beta version of Micro ISP (UISP) for windows.

you can find it at:
http://www.geocities.com/msbechtold/uisp/uisp.html

Thanks
Mike
=========================================
Mike Bechtold
Software Technician with Banner Engineering
[email-masked]

From [email-masked] Sat Aug 18 12:32:31 2001
Received: from proxy.peter.com.au ([203.47.34.4] helo=peter.com.au)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15Xu2Q-0007xu-00
for <[email-masked]>; Sat, 18 Aug 2001 12:32:31 +1200
Received: from [203.47.34.3] ([203.47.34.3] verified) by peter.com.au (Stalker SMTP Server 1.8b2) with ESMTP id S.0000439650 for <[email-masked]>; Sat, 18 Aug 2001 08:30:52 +0800
Mime-Version: 1.0
X-Sender: peter@pop
Message-Id: <p05100300b7a3663099df@[203.47.34.3]>
In-Reply-To: <p0510030fb7a215dcd742@[203.47.34.3]>
References: <p0510030fb7a215dcd742@[203.47.34.3]>
Date: Sat, 18 Aug 2001 08:25:47 +0800
To: [email-masked]
From: Peter N Lewis <[email-masked]>
Subject: Re: [avr-gcc-list] Efficient htons/swap16 or htonl/swap32 in
place?
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

At 8:29 +0800 17/8/01, Peter N Lewis wrote:

>Is there any way to convince the compiler to generate:
>
> ldd r20,Y+1
> ldd r21,Y+2
> std Y+1,r21
> std Y+2,r22

No takers for how to do this? I expected there would be lots of
efficiency nuts on this list! ;-)

Thanks for any ideas.
Peter.
PS: Important safety tip - don't allocate 4 32-byte structs,
including one on the stack when running on a 4433 with 128 bytes of
RAM!
--
<http://www.interarchy.com/> <ftp://ftp.interarchy.com/interarchy.hqx>

From [email-masked] Sat Aug 18 19:51:54 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Y0ta-0008E3-00
for <[email-masked]>; Sat, 18 Aug 2001 19:51:54 +1200
Received: from mm.amelek.gda.pl ([192.168.1.1] ident=mail)
by alf.amelek.gda.pl with esmtp (Exim 3.33 #1 (Debian))
id 15Y0r4-0001Qf-00; Sat, 18 Aug 2001 09:49:14 +0200
Received: from marekm by mm.amelek.gda.pl with local (Exim 3.33 #1 (Debian))
id 15Y0r0-0000Ur-00; Sat, 18 Aug 2001 09:49:10 +0200
Subject: Re: [avr-gcc-list] Windows version of UISP
In-Reply-To: <[email-masked]> "from Mike Bechtold
at Aug 17, 2001 12:38:12 pm"
To: [email-masked]
Date: Sat, 18 Aug 2001 09:49:00 +0200 (CEST)
CC: "Avr-Gcc-List (E-mail)" <[email-masked]>
X-Mailer: ELM [version 2.4ME+ PL89 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Message-Id: <[email-masked]>
From: Marek Michalkiewicz <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

> I've just released a new beta version of Micro ISP (UISP) for windows.
>
> you can find it at:
> http://www.geocities.com/msbechtold/uisp/uisp.html

Please also check out the latest version maintained by me:

http://www.amelek.gda.pl/avr/uisp/uisp-20010813.tar.gz

which now includes a Cygwin port, and some STK500 support.

Marek

From [email-masked] Sat Aug 18 22:11:55 2001
Received: from mailg.telia.com ([194.22.194.26])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Y357-0008KA-00
for <[email-masked]>; Sat, 18 Aug 2001 22:11:54 +1200
Received: from d1o926.telia.com (d1o926.telia.com [213.66.172.241])
by mailg.telia.com (8.11.2/8.11.0) with ESMTP id f7IAAM406823;
Sat, 18 Aug 2001 12:10:22 +0200 (CEST)
Received: from jesper (h169n2fls34o926.telia.com [217.208.35.169])
by d1o926.telia.com (8.10.2/8.10.1) with SMTP id f7IAALA24676;
Sat, 18 Aug 2001 12:10:21 +0200 (CEST)
Message-ID: <001901c127ce$137d9cb0$65656565@jesper>
From: "Jesper Hansen" <[email-masked]>
To: <[email-masked]>
Cc: "Peter N Lewis" <[email-masked]>
References: <p0510030fb7a215dcd742@[203.47.34.3]> <p05100300b7a3663099df@[203.47.34.3]>
Subject: Re: [avr-gcc-list] Efficient htons/swap16 or htonl/swap32 inplace?
Date: Sat, 18 Aug 2001 12:09:58 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> At 8:29 +0800 17/8/01, Peter N Lewis wrote:
>
> >Is there any way to convince the compiler to generate:
> >
> > ldd r20,Y+1
> > ldd r21,Y+2
> > std Y+1,r21
> > std Y+2,r22
>
> No takers for how to do this? I expected there would be lots of
> efficiency nuts on this list! ;-)

Perhaps the effieciency nuts are writing their code in assembler ;-)

/Jesper
http:/www.yampp.com

> Thanks for any ideas.
> Peter.
> PS: Important safety tip - don't allocate 4 32-byte structs,
> including one on the stack when running on a 4433 with 128 bytes of
> RAM!
> --
> <http://www.interarchy.com/> <ftp://ftp.interarchy.com/interarchy.hqx>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Sat Aug 18 22:29:52 2001
Received: from [212.184.210.65] (helo=romulus.maridan.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Y3MV-0008LA-00
for <[email-masked]>; Sat, 18 Aug 2001 22:29:51 +1200
Received: from egnite.net (pD900A9D2.dip.t-dialin.net [217.0.169.210])
by romulus.maridan.net (8.9.3/8.9.3) with SMTP id MAA32215
for <[email-masked]>; Sat, 18 Aug 2001 12:27:57 +0200
Message-Id: <[email-masked]>
From: "Harald Kipp" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Sat, 18 Aug 2001 12:34:28 +0100 (MEZ)
Reply-To: "Harald Kipp" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 2.00.1500 for OS/2 Warp 4.00
In-Reply-To: <p05100300b7a3663099df@[203.47.34.3]>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: [avr-gcc-list] Efficient htons/swap16 or htonl/swap32 in place?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>>Is there any way to convince the compiler to generate:
>>
>> ldd r20,Y+1
>> ldd r21,Y+2
>> std Y+1,r21
>> std Y+2,r22

Peter,

sure there is a way, simply code these in an inline asm.
[Joke alert] :-)

Seriously, the problem at this point is, that register
usage isn't predictable. Only the compiler knows, which
values are hold by which registers. There's no way I
kow of, to pass this information to the inline asm
statements.

Harald

From [email-masked] Sat Aug 18 23:57:31 2001
Received: from [212.184.210.65] (helo=romulus.maridan.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15Y4jK-0008Pd-00
for <[email-masked]>; Sat, 18 Aug 2001 23:57:31 +1200
Received: from egnite.net (pD900A7FB.dip.t-dialin.net [217.0.167.251])
by romulus.maridan.net (8.9.3/8.9.3) with SMTP id NAA04255
for <[email-masked]>; Sat, 18 Aug 2001 13:55:38 +0200
Message-Id: <[email-masked]>
From: "Harald Kipp" <[email-masked]>
To: "Avr-Gcc-List (E-mail)" <[email-masked]>
Date: Sat, 18 Aug 2001 14:02:19 +0100 (MEZ)
Reply-To: "Harald Kipp" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 2.00.1500 for OS/2 Warp 4.00
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: [avr-gcc-list] Windows version of UISP
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>> I've just released a new beta version of Micro ISP (UISP) for windows.
>> http://www.geocities.com/msbechtold/uisp/uisp.html

>Please also check out the latest version maintained by me:
>http://www.amelek.gda.pl/avr/uisp/uisp-20010813.tar.gz

Thanks to both of you. Windows users have even more choices.
Which one too choose for NT/2000?

I've tried to setup a list of freely(!) available ISP programs
with pro and cons. Please note, that this list is incomplete
and parts may be wrong. And _PLEAZZE_ do not start an ISP war.
Honor the time and effort people put into this software.

Send flames to my email address, not to the list. Also
email me directly, if you think this is completely OT.

------------------------------------------------------------
Marek's uisp:
+ Source code available (GCC)
+ STK500 support (not yet completed)
+ Marek uses the giveio.sys driver for NT/2000 support.
Binaries and sources for this driver are available.
+ Command line support for make
- No GUI version
- No Win32 binaries. You need Cygwin to compile it.
- No Windows installer

------------------------------------------------------------
Mike's uisp:
+ Source code available (C++ Builder 5.0)
+ Win32 binaries available.
+ Command line support for make
+ Windows installer
- No GUI version
- Mike uses TVicHW32 driver from EnTech. This driver
requires registration (USD 99, no source code).

------------------------------------------------------------
Kanda's AVRISP 2.7 Beta 1:
(Note that previous version don't support NT/2000)
+ GUI version
+ Windows installer
- No command line support for make
- Nasty "list out of bounds" bug disables automatic
refresh.
- Outdated and incomplete online help, tips partially
hidden, launch from GUI fails.
- No source code
- Some GUI functions (init, scrolling) are buggy.
? I haven't figured out how Kanda does NT port access.

------------------------------------------------------------
Claudio's PonyProg:
+ GUI version with many functions.
+ Not just an AVR programmer. Supports many devices,
even PICs.
+ HTML based online help
+ Windows installer
- No command line support for make
- No source code
- GUI is kind of "overloaded".
? When I tried this on NT for the first time, it worked.
After playing around, installing and de-installing
other software, it stopped working. I haven't figured
out how Claudio does NT port access.

Harald Kipp

egnite Software GmbH TEL +49 (0)2323-925375
Westring 303 FAX +49 (0)2323-925374
44629 Herne
Germany

Embedded Ethernet - http://www.egnite.de/

From [email-masked] Wed Aug 22 00:51:07 2001
Received: from [200.248.200.133] (helo=pkmail.parks.local)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ZAzq-0004MK-00
for <[email-masked]>; Wed, 22 Aug 2001 00:51:07 +1200
Received: by pkmail.parks.local with Internet Mail Service (5.5.2650.21)
id <R20NRS1V>; Tue, 21 Aug 2001 09:50:12 -0300
Message-ID: <[email-masked]>
From: Andre Mastella <[email-masked]>
To: [email-masked]
Date: Tue, 21 Aug 2001 09:50:11 -0300
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: text/plain;
charset="iso-8859-1"
Subject: [avr-gcc-list] Assembly + C in AVRGCC 3
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> Hi.
> I have an old program which has an assembly rotine that was ported to GCC.
> Inside it, were decalrations of variables in SRAM. The form was...
>
> seg eram.gcc_bss_section
>
> u_buffer: ds.b 1 ;Serial buffer
> u_bit_cnt: ds.b 1 ;Bit counter
> u_status: ds.b 1 ;Status buffer
> u_reload: ds.b 1 ;Reload-register (internal - do not
> use)
>
> /*
> * Indexes
> */
> #define base_mem u_buffer
> #define u_buffer_IX 0
> #define u_bit_cnt_IX 1
> #define u_status_IX 2
> #define u_reload_IX 3
>
> seg flash.code
> ....
>
> This does not compile anymore using GCC 3 (20010701).
> How can I do the same thing for this new version?
>
> Thanks in advance.
> Andre
> mailto:[email-masked]

From [email-masked] Wed Aug 22 04:29:17 2001
Received: from sttlpop5.sttl.uswest.net ([206.81.192.5])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15ZEOz-0004Ua-00
for <[email-masked]>; Wed, 22 Aug 2001 04:29:17 +1200
Received: (qmail 13477 invoked by alias); 21 Aug 2001 16:15:26 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 28680 invoked by uid 0); 21 Aug 2001 16:09:22 -0000
Received: from odslppp164.sttl.uswest.net (HELO c1137399a) (63.224.32.164)
by sttlpop5.sttl.uswest.net with SMTP; 21 Aug 2001 16:09:22 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Assembly + C in AVRGCC 3
Date: Tue, 21 Aug 2001 09:03:39 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Your assembly is in an old dialect (so old I can't recall the name).
The current compiler only recognizes the Binutils (GAS) dialect.

Note: register passing has changed as well as the syntax. Look at
www.avrfreaks.org in the GCC section for hints and documents on
writing assembly code.

----- Original Message -----
From: "Andre Mastella" <[email-masked]>
To: <[email-masked]>
Sent: Tuesday, August 21, 2001 5:50 AM
Subject: [avr-gcc-list] Assembly + C in AVRGCC 3

> > Hi.
> > I have an old program which has an assembly rotine that was ported
to GCC.
> > Inside it, were decalrations of variables in SRAM. The form was...
> >
> > seg eram.gcc_bss_section
> >
> > u_buffer: ds.b 1 ;Serial buffer
> > u_bit_cnt: ds.b 1 ;Bit counter
> > u_status: ds.b 1 ;Status buffer
> > u_reload: ds.b 1 ;Reload-register (internal -
do not
> > use)
> >
> > /*
> > * Indexes
> > */
> > #define base_mem u_buffer
> > #define u_buffer_IX 0
> > #define u_bit_cnt_IX 1
> > #define u_status_IX 2
> > #define u_reload_IX 3
> >
> > seg flash.code
> > ....
> >
> > This does not compile anymore using GCC 3 (20010701).
> > How can I do the same thing for this new version?
> >
> > Thanks in advance.
> > Andre
> > mailto:[email-masked]
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Wed Aug 22 09:34:21 2001
Received: from praz.orbitel.bg ([195.24.32.22] helo=mail.orbitel.bg)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15ZJAC-0004k8-00
for <[email-masked]>; Wed, 22 Aug 2001 09:34:20 +1200
Received: (qmail 21708 invoked from network); 21 Aug 2001 21:33:10 -0000
Received: from unknown (HELO home) (212.95.171.225)
by praz.orbitel.bg with SMTP; 21 Aug 2001 21:33:10 -0000
From: "Alexander Popov" <[email-masked]>
To: [email-masked]
Date: Wed, 22 Aug 2001 00:31:57 +0300
MIME-Version: 1.0
Content-type: Multipart/Mixed; boundary=Message-Boundary-30314
Reply-to: [email-masked]
Message-ID: <3B82FD7D.8697.3AAB2E7@localhost>
Priority: normal
X-mailer: Pegasus Mail for Win32 (v3.12c)
Subject: [avr-gcc-list] An old but unfixed bug
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--Message-Boundary-30314
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body

Hello,
Here I send a warning for an old bug which is still not fixed. It is a general
GCC bug, not AVR specific.
When we have :

unsigned char *p;
p=(unsigned char*)SOME_ADDR;
do {
// do something
} while(p++<(unsigned char *)0xffff);

The while loop is totaly skipped and the body is executed only once!

This is even more annoying than optimizing an idle loop by decrementing
by 625 instead of 1.

Best regards,
Alexander Popov

--Message-Boundary-30314
Content-type: Application/Octet-stream; name="bug.c"; type=Program-source
Content-disposition: attachment; filename="bug.c"
Content-transfer-encoding: BASE64

I2luY2x1ZGUgPGlvLmg+ICAgICAgICAgICAKCmludCBtYWluKHZvaWQpIHsKICAgdm9sYXRp
bGUgdW5zaWduZWQgY2hhciAqcDsKICAgdm9sYXRpbGUgdW5zaWduZWQgY2hhciBpOwoKCWk9
MDsKICAgcD0odW5zaWduZWQgY2hhciAqKShSQU1FTkQrMSk7IAogICBkbyB7CiAgIAlpKys7
Cgl9IHdoaWxlKHArKzwodW5zaWduZWQgY2hhciAqKTB4ZmZmZik7CiAgIAogICB3aGlsZSg0
Mik7CiAgIAogICByZXR1cm4gMDsKfQoK

--Message-Boundary-30314
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Text from file 'bug-withO0.lst'

**** int main(void) {
.stabn 68,0,8,.LM1-main
.LM1:
/* prologue: frame size=3 */
ldi r28,lo8(__stack - 3)
ldi r29,hi8(__stack - 3)
out __SP_H__,r29
out __SP_L__,r28
/* prologue end (size=4) */
.LBB2:
**** volatile unsigned char *p;
**** volatile unsigned char i;
****
**** i=0;
.stabn 68,0,13,.LM2-main
.LM2:
std Y+3,__zero_reg__
**** p=(unsigned char *)(RAMEND+1);
.stabn 68,0,14,.LM3-main
.LM3:
ldi r24,lo8(608)
ldi r25,hi8(608)
std Y+1,r24
std Y+2,r25
.L15:
**** do {
**** i++;
.stabn 68,0,16,.LM4-main
.LM4:
ldd r24,Y+3
subi r24,lo8(-(1))
std Y+3,r24
**** } while(p++<(unsigned char *)0xffff);
.stabn 68,0,18,.LM5-main
.LM5:
ldd r24,Y+1
ldd r25,Y+2
adiw r24,1
std Y+1,r24
std Y+2,r25
sbiw r24,0
brlo .L15
nop
****
**** while(42) {
.stabn 68,0,20,.LM6-main
.LM6:
.L19:
rjmp .L19
**** }

--Message-Boundary-30314
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Text from file 'bug-withO3.lst'

**** int main(void) {
.stabn 68,0,8,.LM1-main
.LM1:
/* prologue: frame size=1 */
ldi r28,lo8(__stack - 1)
ldi r29,hi8(__stack - 1)
out __SP_H__,r29
out __SP_L__,r28
/* prologue end (size=4) */
**** volatile unsigned char *p;
**** volatile unsigned char i;
****
**** i=0;
.stabn 68,0,13,.LM2-main
.LM2:
.LBB2:
std Y+1,__zero_reg__
**** p=(unsigned char *)(RAMEND+1);
**** do {
**** i++;
.stabn 68,0,16,.LM3-main
.LM3:
ldd r18,Y+1
subi r18,lo8(-(1))
std Y+1,r18
**** } while(p++<(unsigned char *)0xffff);
****
**** while(42) {
.stabn 68,0,20,.LM4-main
.LM4:
.L21:
rjmp .L21

--Message-Boundary-30314--

From [email-masked] Wed Aug 22 09:38:37 2001
Received: from praz.orbitel.bg ([195.24.32.22] helo=mail.orbitel.bg)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15ZJEJ-0004lL-00
for <[email-masked]>; Wed, 22 Aug 2001 09:38:36 +1200
Received: (qmail 22290 invoked from network); 21 Aug 2001 21:37:28 -0000
Received: from unknown (HELO home) (212.95.171.225)
by praz.orbitel.bg with SMTP; 21 Aug 2001 21:37:28 -0000
From: "Alexander Popov" <[email-masked]>
To: [email-masked]
Date: Wed, 22 Aug 2001 00:36:15 +0300
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Reply-to: [email-masked]
Message-ID: <3B82FE7F.17973.3AEA2A1@localhost>
Priority: normal
X-mailer: Pegasus Mail for Win32 (v3.12c)
Subject: [avr-gcc-list] Writing EEPROM to FLASH (unintentially)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello, again!
I wrote a routine for 8-bit crc checking using a table and I
tried to move the 256-byte table in e2prom. Everything went
ok, but I noticed the flash code size grew up with ~256
bytes! Then I thought this was the e2prom content and I was
right. I had been using the pattern rule from Volker Oth's
makefile. So I changed the way to make .rom from .elf in
my makefile:

%rom: %elf
< $(BIN) -O $(FORMAT) $< $@
> $(BIN) -R .eeprom -O $(FORMAT) $< $@

The '-R' switch removes the section .eeprom from output
file. After this the size of flash decreased by exactly 256
bytes!
So I wonder, has anyone else noticed this or am I alone
experiencing it?

Best regards,
Alexander Popov

From [email-masked] Wed Aug 22 09:40:37 2001
Received: from praz.orbitel.bg ([195.24.32.22] helo=mail.orbitel.bg)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15ZJGG-0004ln-00
for <[email-masked]>; Wed, 22 Aug 2001 09:40:36 +1200
Received: (qmail 22519 invoked from network); 21 Aug 2001 21:39:28 -0000
Received: from unknown (HELO home) (212.95.171.225)
by praz.orbitel.bg with SMTP; 21 Aug 2001 21:39:28 -0000
From: "Alexander Popov" <[email-masked]>
To: [email-masked]
Date: Wed, 22 Aug 2001 00:38:04 +0300
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Reply-to: [email-masked]
Message-ID: <3B82FEEC.845.3B04F19@localhost>
Priority: normal
X-mailer: Pegasus Mail for Win32 (v3.12c)
Subject: [avr-gcc-list] Memories Benchmark
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello again and again!
I hope I don't bother you!

I made some benchmarking of AVR memory. I tried to measure only times
for actual reading/writing, excluding loops and random number generation.
The results may not be absolutely correct but can be used for comparing the
memories:

RAM Read incremental : 12 clks/byte
SRAM Read incremental : 13 clks/byte (0 wait states)
EEPROM Read incremental : 23 clks/byte
EEPROM Read random : 27 clks/byte
FLASH Read incremental : 8 clks/byte
SRAM Write incremental : 11 clks/byte (0 wait states)
EEPROM Write incremental : 16451 clks/byte

Comments are welcome!

All the best,
Alexander Popov

From [email-masked] Wed Aug 22 10:39:09 2001
Received: from express.baneng.com ([199.86.92.2])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ZKAv-0004oZ-00
for <[email-masked]>; Wed, 22 Aug 2001 10:39:09 +1200
Received: from [192.9.207.29] by express.baneng.com (NTMail 6.04.0010/NY1628.00.9978dd2f) with ESMTP id dsimhaaa for [email-masked]; Tue, 21 Aug 2001 17:37:30 -0500
From: "Jeremy Moc" <[email-masked]>
To: <[email-masked]>
Subject: RE: [avr-gcc-list] An old but unfixed bug
Date: Tue, 21 Aug 2001 17:38:02 -0500
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Alexander, I don't think this is a gcc bug per se. Your while condition
is comparing an int (0xffff == -1) cast to a pointer. If your pointer p is
initialised to any value <= 0x7fff your while condition fails on the first
pass. The source file you sent showed p = RAMEND + 1. Usually a small
positive number (eg. 4433 --> 0x15F + 1) so you have:
while ( 352 < -1 ); // fail
Hope this helps,

Jeremy Moc

> Hello,
> Here I send a warning for an old bug which is still not
> fixed. It is a general
> GCC bug, not AVR specific.
> When we have :
>
> unsigned char *p;
> p=(unsigned char*)SOME_ADDR;
> do {
> // do something
> } while(p++<(unsigned char *)0xffff);
>
> The while loop is totaly skipped and the body is executed only once!
>
> Best regards,
> Alexander Popov
>

From [email-masked] Wed Aug 22 14:05:07 2001
Received: from proxy.peter.com.au ([203.47.34.4] helo=peter.com.au)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15ZNOF-0004xk-00
for <[email-masked]>; Wed, 22 Aug 2001 14:05:07 +1200
Received: from [203.47.34.3] ([203.47.34.3] verified) by peter.com.au (Stalker SMTP Server 1.8b2) with ESMTP id S.0000441501 for <[email-masked]>; Wed, 22 Aug 2001 10:03:49 +0800
Mime-Version: 1.0
X-Sender: peter@pop
Message-Id: <p0510032eb7a8b67c3396@[203.47.34.3]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
Date: Wed, 22 Aug 2001 09:13:37 +0800
To: [email-masked]
From: Peter N Lewis <[email-masked]>
Subject: RE: [avr-gcc-list] An old but unfixed bug
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>Hi Alexander, I don't think this is a gcc bug per se. Your while condition
>is comparing an int (0xffff == -1) cast to a pointer. If your pointer p is
>initialised to any value <= 0x7fff your while condition fails on the first
>pass. The source file you sent showed p = RAMEND + 1. Usually a small
>positive number (eg. 4433 --> 0x15F + 1) so you have:
> while ( 352 < -1 ); // fail

Yes, that would be true, except that it fails even if p is
initialized large enough to be "negative".

unsigned char *p;
p=(unsigned char*)0x9000;
do {
*p = 1;
} while(p++<(unsigned char *)0x0ffff);

That does the same thing (compiles to just *0x9000 = 1;)

I agree it is probably a signed issue, and it can be fixed by
changing the file line to:

} while((unsigned int)(p++)<(unsigned int)0x0ffff);

it still rates as a bug to me. Treating pointers as unsigned seems a
bit dubious at the best of times, but the optimization is definitely
bogus given they are both support to be (unsigned char *) and are
both the same sign (or unsigned).

If I remember correctly though, C does not specify that pointer
inequality comparison will work for any pointers not in the same
array. However, it still needs to correctly handle pointers into an
array that spans $8000...

Enjoy,
Peter.

--
<http://www.interarchy.com/> <ftp://ftp.interarchy.com/interarchy.hqx>

From [email-masked] Wed Aug 22 19:08:28 2001
Received: from chicken100.orbitel.bg ([195.24.32.21] helo=chicken.orbitel.bg)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15ZS7n-0005B4-00
for <[email-masked]>; Wed, 22 Aug 2001 19:08:27 +1200
Received: (qmail 28938 invoked from network); 22 Aug 2001 07:07:19 -0000
Received: from unknown (HELO home) (212.95.171.27)
by chicken.orbitel.bg with SMTP; 22 Aug 2001 07:07:19 -0000
From: "Alexander Popov" <[email-masked]>
To: [email-masked]
Date: Wed, 22 Aug 2001 10:03:37 +0300
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: RE: [avr-gcc-list] An old but unfixed bug
Reply-to: [email-masked]
Message-ID: <3B838379.3643.5B62797@localhost>
Priority: normal
In-reply-to: <[email-masked]>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello, Jeremy!
Thank you for your reply!

> Your while condition is comparing an int (0xffff == -1) cast to a pointer.

I don't know how pointers are compared, but i think it is as unsigned
values

> If your pointer p is initialised to any value <= 0x7fff your while
> condition fails on the first pass. The source file you sent showed p =
> RAMEND + 1. Usually a small positive number (eg. 4433 --> 0x15F + 1) so you
> have: while ( 352 < -1 ); // fail

I tried with 0x8001 and the result was absolutely the same as with 0x15f

I made another try - changed the value 0xffff to 0xfffe and everithing was
ok - the code generated included the loop. If you were right about signed
compare, then this change would not have made any diference since 352 < -
1 fails 352 < -2 fails

Then I see the code generated for the decrement and compare part of the
loop (with compare value 0xfffe) :

subi r18,lo8(-(1))
sbci r19,hi8(-(1))
ldi r24,hi8(65535)
cpi r18,lo8(65535)
cpc r19,r24
brlo .L18

Noticed 65535? If we increment compare value with 1, this will become
65536 which overflows and acts like 0. So we check if some unsigned value
(the pointer) is less than 0. This is always false, so the loop is skipped.

This is my theory...

Regards,
Alexander Popov

From [email-masked] Wed Aug 22 19:30:10 2001
Received: from smtp02.hk.linkage.net ([202.76.4.21])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ZSSn-0005CP-00
for <[email-masked]>; Wed, 22 Aug 2001 19:30:09 +1200
Received: from vita.hk.net ([email-masked] [152.101.101.101])
by smtp02.hk.linkage.net (8.10.2/8.10.2) with SMTP id f7M7W7p00406
for <[email-masked]>; Wed, 22 Aug 2001 15:32:07 +0800 (HKT)
Date: Wed, 22 Aug 2001 15:28:54 +0800 (HKT)
From: Lai Kang Tin <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] (no subject)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I want all the unused SRAM under controlled by a memory allocator, my question is that
the __bss_end is the start of unused SRAM? If yes, how can I access the __bss_end?

This code is working?

extern unsigned __bss_end;
void *start_of_memory_spool = (void *)__bss_end;

Thanks in advance!

From [email-masked] Wed Aug 22 21:45:50 2001
Received: from netbgp-130-132.inrete.it ([213.212.130.132] helo=srmail.inrete.it)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ZUa4-0005Iy-00
for <[email-masked]>; Wed, 22 Aug 2001 21:45:49 +1200
Received: from DELLINSP.inrete.it (mjollnir.softingroup.it [213.82.51.194])
by srmail.inrete.it (8.10.2/8.10.2) with ESMTP id f7M9idb27992
for <[email-masked]>; Wed, 22 Aug 2001 11:44:39 +0200
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.0.2
Date: Wed, 22 Aug 2001 11:36:15 +0200
To: [email-masked]
From: Maurizio Ferraris <[email-masked]>
Subject: RE: [avr-gcc-list] An old but unfixed bug
In-Reply-To: <3B838379.3643.5B62797@localhost>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

It seems it is not even working with integers ...
Look at this code, which i guess loops forever:
----------source-----------
volatile unsigned char x;
unsigned int i;

void main(void)
{
for(i = 1000; i <= 0xFFFF; i++)
x = 0;
}
----------source-----------
------generated code (somewhat cleaned) -------
...
6:Prove.c **** for(i = 1000; i <= 0xFFFF; i++)
47 .LM2:
48 0008 88EE ldi r24,lo8(1000)
49 000a 93E0 ldi r25,hi8(1000)
50 000c 9093 0000 sts (i)+1,r25
51 0010 8093 0000 sts i,r24
52 .L5:
7:Prove.c **** x = 0;
55 0014 1092 0000 sts x,__zero_reg__
58 0018 FDCF rjmp .L5
...
------generated code-------
Using a starting point >0x8000 does the same.
Best Regards.
Mau.

_____________________________________________________________
Maurizio Ferraris mailto:[email-masked]
Via Borgonuovo 27 mailto:[email-masked]
10040 GIVOLETTO TO ITALY http://www.studioferraris.it
Public key: http://www.studioferraris.it/Files/Maurizio.asc

From [email-masked] Wed Aug 22 22:04:10 2001
Received: from netbgp-130-132.inrete.it ([213.212.130.132] helo=srmail.inrete.it)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ZUrp-0005K4-00
for <[email-masked]>; Wed, 22 Aug 2001 22:04:09 +1200
Received: from DELLINSP.inrete.it (mjollnir.softingroup.it [213.82.51.194])
by srmail.inrete.it (8.10.2/8.10.2) with ESMTP id f7MA34b03209
for <[email-masked]>; Wed, 22 Aug 2001 12:03:04 +0200
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.0.2
Date: Wed, 22 Aug 2001 11:55:20 +0200
To: [email-masked]
From: Maurizio Ferraris <[email-masked]>
Subject: RE: [avr-gcc-list] An old but unfixed bug
In-Reply-To: <[email-masked]>
References: <3B838379.3643.5B62797@localhost>
<[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Sorry guys,
the code is correct ...
Shame on me.
Mau
At 11:36 22/08/2001 +0200, you wrote:
>It seems it is not even working with integers ...
>Look at this code, which i guess loops forever:

_____________________________________________________________
Maurizio Ferraris mailto:[email-masked]
Via Borgonuovo 27 mailto:[email-masked]
10040 GIVOLETTO TO ITALY http://www.studioferraris.it
Public key: http://www.studioferraris.it/Files/Maurizio.asc

From [email-masked] Wed Aug 22 22:05:13 2001
Received: from mail.pepperl-fuchs.com ([194.120.135.222] helo=de.pepperl-fuchs.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ZUsq-0005KB-00
for <[email-masked]>; Wed, 22 Aug 2001 22:05:13 +1200
Received: from exmail.pepperl-fuchs.com (exmail.pepperl-fuchs.com [172.16.11.61])
by de.pepperl-fuchs.com (8.11.0/8.10.2) with ESMTP id f7MA44n22142
for <[email-masked]>; Wed, 22 Aug 2001 12:04:04 +0200
Received: by exmail.pepperl-fuchs.com with Internet Mail Service (5.5.2650.21)
id <PZJK0LGX>; Wed, 22 Aug 2001 12:01:26 +0200
Message-ID: <[email-masked]>
From: Stumpf Michael <[email-masked]>
To: [email-masked]
Subject: AW: [avr-gcc-list] An old but unfixed bug
Date: Wed, 22 Aug 2001 12:01:26 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C12AF1.67DA4FD0"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C12AF1.67DA4FD0
Content-Type: text/plain;
charset="iso-8859-1"

>
> It seems it is not even working with integers ...
> Look at this code, which i guess loops forever:
> ----------source-----------
> volatile unsigned char x;
> unsigned int i;
>
> void main(void)
> {
> for(i = 1000; i <= 0xFFFF; i++)
> x = 0;
> }

well, i as an unsigned integer will be smaller or equal as 0xFFFF for every
possible value.
Loops forever and no need to change i at any time.

regards

Michael

------_=_NextPart_001_01C12AF1.67DA4FD0
Content-Type: text/html;
charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>AW: [avr-gcc-list] An old but unfixed bug</TITLE>
</HEAD>
<BODY>
<BR>
<BR>

<P><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; It seems it is not even working with integers ...</FONT>
<BR><FONT SIZE=2>&gt; Look at this code, which i guess loops forever:</FONT>
<BR><FONT SIZE=2>&gt; ----------source-----------</FONT>
<BR><FONT SIZE=2>&gt; volatile unsigned char x;</FONT>
<BR><FONT SIZE=2>&gt; unsigned int i;</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; void main(void)</FONT>
<BR><FONT SIZE=2>&gt; {</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp; for(i = 1000; i &lt;= 0xFFFF; i++)</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x = 0;</FONT>
<BR><FONT SIZE=2>&gt; }</FONT>
</P>

<P><FONT SIZE=2>well, i as an unsigned integer will be smaller or equal as 0xFFFF for every possible value.</FONT>
<BR><FONT SIZE=2>Loops forever and no need to change i at any time. </FONT>
</P>

<P><FONT SIZE=2>regards</FONT>
</P>

<P><FONT SIZE=2>Michael</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C12AF1.67DA4FD0--

From [email-masked] Wed Aug 22 22:51:37 2001
Received: from atusks01.alcatel.at ([212.183.9.130] helo=mail.alcatel.at)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ZVbj-0005N2-00
for <[email-masked]>; Wed, 22 Aug 2001 22:51:36 +1200
Received: from alcatel.at (atusel33.aut.alcatel.at [146.112.129.215])
by mail.alcatel.at (8.9.3/8.9.3/1.21 01/27/01 21:43:09) with ESMTP id MAA09740;
Wed, 22 Aug 2001 12:50:06 +0200 (MET DST)
Message-ID: <[email-masked]>
Date: Wed, 22 Aug 2001 12:50:06 +0200
From: Christoph Plattner <[email-masked]>
Organization: AAA
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.5.1 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
To: Stumpf Michael <[email-masked]>
CC: [email-masked]
Subject: Re: AW: [avr-gcc-list] An old but unfixed bug
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a normal optimize operation.

To avoid the compiler to optimize such stuff, use "volatile",
here for the varible:

volatile unsigned char x;
volatile unsigned int i;

void main(void)
{
for(i = 1000; i <= 0xFFFF; i++)
x = 0;
}

Here the counter must be volatile !!
Setting x to zero will surely be done, but only one time !

A word to 0xFFFF ! If you would use strict warnings, the compiler
would perhaps output a warning, that you compare an UNSIGNED with
a SIGNED, as 0xFFFF is -1 and signed, 0xFFFFu is 65535 and unsigned !

So 1000 is never < -1 !!!

With friendly regards
Christoph P

> Stumpf Michael wrote:
>
> >
> > It seems it is not even working with integers ...
> > Look at this code, which i guess loops forever:
> > ----------source-----------
> > volatile unsigned char x;
> > unsigned int i;
> >
> > void main(void)
> > {
> > for(i = 1000; i <= 0xFFFF; i++)
> > x = 0;
> > }
>
> well, i as an unsigned integer will be smaller or equal as 0xFFFF for
> every possible value.
> Loops forever and no need to change i at any time.
>
> regards
>
> Michael

--
+--------V--------+ [email-masked]
| A L C A T E L | -----------------------------
+-----------------+ Phone: +43 1 27722 3706
T A S Fax: +43 1 27722 3955

From [email-masked] Tue Aug 28 10:52:43 2001
Received: from vtti.net ([128.121.215.234] helo=tphillip1.2kweb.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15bVFL-0003VT-00
for <[email-masked]>; Tue, 28 Aug 2001 10:52:43 +1200
Received: from vtti.org ([207.171.197.9]) by tphillip1.2kweb.net (8.11.2) id f7RMpvU51240 for <[email-masked]>; Mon, 27 Aug 2001 16:52:02 -0600 (MDT)
Message-ID: <[email-masked]>
Date: Mon, 27 Aug 2001 15:52:02 -0700
From: Tim Clark <[email-masked]>
Reply-To: [email-masked]
Organization: VTTi
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010803
X-Accept-Language: en-us
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] 8051 to AVR-gcc Translation?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

I've got an (8051) 1000 line Assembly program written for the
Atmel 89C2051 that I'd like to port to the AVR - preferably into
avr-gcc, but I could also live with avr assembly.

Are there any tools/utilities that would give me a "first-cut"?

OR

anybody interested in a consulting job?

Thanks,
-Tim Clark
VTTi.org

From [email-masked] Thu Sep 06 13:39:11 2001
Received: from pop.sttl.uswest.net ([206.81.192.5] helo=sttlpop5.sttl.uswest.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15eo8M-0004lE-00
for <[email-masked]>; Thu, 06 Sep 2001 13:39:10 +1200
Received: (qmail 17003 invoked by alias); 6 Sep 2001 01:39:10 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 16980 invoked by uid 0); 6 Sep 2001 01:39:09 -0000
Received: from odslppp124.sttl.uswest.net (HELO c1137399a) (63.224.32.124)
by sttlpop5.sttl.uswest.net with SMTP; 6 Sep 2001 01:39:09 -0000
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
Date: Wed, 5 Sep 2001 18:32:38 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Reserving Global registers
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Is there a way to tell GCC not to use certain registers in a global
way, like on the command line? The alternative is to declare, in each
file, the variables and which register they are assigned to.

Cheers!

From [email-masked] Thu Sep 06 15:57:54 2001
Received: from smtp02.hk.linkage.net ([202.76.4.21])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15eqIb-0004qe-00
for <[email-masked]>; Thu, 06 Sep 2001 15:57:53 +1200
Received: from vita.hk.net ([email-masked] [152.101.101.101])
by smtp02.hk.linkage.net (8.10.2/8.10.2) with SMTP id f86417p25231;
Thu, 6 Sep 2001 12:01:07 +0800 (HKT)
Date: Thu, 6 Sep 2001 11:57:45 +0800 (HKT)
From: Lai Kang Tin <[email-masked]>
To: Larry Barello <[email-masked]>
cc: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Reserving Global registers
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I think you may try to change config/avr/avr.h in gcc source directory,
there are some defines for the usage of register allocation, change
what register(s) you wanted to FIXed purpose, but it seemded that you
must not change some of them such as R24 R25, X,Y,Z,...
Then recompile the GCC.

On Wed, 5 Sep 2001, Larry Barello wrote:

> Is there a way to tell GCC not to use certain registers in a global
> way, like on the command line? The alternative is to declare, in each
> file, the variables and which register they are assigned to.
>
> Cheers!
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Sat Sep 08 18:42:54 2001
Received: from mailgate5.cinetic.de ([217.72.192.165])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15fbpM-0006k2-00
for <[email-masked]>; Sat, 08 Sep 2001 18:42:53 +1200
Received: from smtp.web.de (smtp01.dlan.cinetic.de [172.20.0.189])
by mailgate5.cinetic.de (8.11.2/8.11.2/SuSE Linux 8.11.0-0.4) with SMTP id f886gUx14081
for <[email-masked]>; Sat, 8 Sep 2001 08:42:30 +0200
Received: from karsten by smtp.web.de with smtp
(freemail 4.2.2.3 #16) id m15fboz-007ovpC; Sat, 8 Sep 2001 08:42 +0200
Message-ID: <000001c13831$6cc75400$0200a8c0@karsten>
From: "Karsten Gleu" <[email-masked]>
To: <[email-masked]>
Date: Sat, 8 Sep 2001 08:42:05 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mailgate5.cinetic.de id f886gUx14081
Subject: [avr-gcc-list] ATMEGA 128
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Is there a way to tell the GCC that I am using the AT Mega 128?
there are only minor changes to the AT Mega 103 which is supported.

I=B4m using gcc on Windows Platform.

Thanks a lot
Karsten

From [email-masked] Sun Sep 09 01:30:31 2001
Received: from [195.235.113.141] (helo=tsmtp3.ldap.isp)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15fiBq-0006z7-00
for <[email-masked]>; Sun, 09 Sep 2001 01:30:30 +1200
Received: from GINES ([213.96.107.254]) by tsmtp3.ldap.isp
(Netscape Messaging Server 4.15 tsmtp3 Jul 26 2001 13:10:38)
with SMTP id GJCITX01.EA2; Sat, 8 Sep 2001 15:29:57 +0200
Message-ID: <001c01c13869$b6fd2710$0400a8c0@GINES>
From: "Gines Martinez" <[email-masked]>
To: "Ron Kreymborg" <[email-masked]>,
<[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] int to EEPROM
Date: Sat, 8 Sep 2001 15:25:22 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

One question:
Don't you have to call after each eeprom_wb() to the function
eeprom_is_ready() ?
ie:

void eWriteFloat(float *numPtr, void *addr)
{
BYTE *ptr, *num;

ptr = (BYTE*)addr;
num = (BYTE*)numPtr;
eeprom_wb((int)ptr++, *num++);
while(!eeprom_is_ready());
eeprom_wb((int)ptr++, *num++);
while(!eeprom_is_ready());
eeprom_wb((int)ptr++, *num++);
while(!eeprom_is_ready());
eeprom_wb((int)ptr++, *num++);
while(!eeprom_is_ready());
}

----- Original Message -----
From: "Ron Kreymborg" <[email-masked]>
To: <[email-masked]>
Sent: Thursday, August 09, 2001 2:24 PM
Subject: RE: [avr-gcc-list] int to EEPROM

> >
> > Saw nice example of storing float to eeprom, could some one please post
> > the same kind of example of storing & retreiving and int type variable
> > from/to eeprom ?
> >
> > With regards,
> >
> > Pasi
> >
>
> Well here is one possible organisation. For the int case where (for
example)
> the variable in eeprom you are concerned with is called "TheVariable ". It
> is declared in the usual way:
>
> #define EEPROM __attribute__((section(".eeprom")))
>
> int TheVariable EEPROM = 0;
>
> You extract it with:
>
> int x = eInt(&TheVariable);
>
> and you can write it back with:
>
> eWriteInt(&x, &TheVariable);
>
> Don't forget the ampersand! Here is a complete set...
>
>
//--------------------------------------------------------------------------
> ---
> float eFloat(float *ptr)
> {
> float a;
>
> eeprom_read_block(&a, (int)ptr, 4);
> return a;
> }
>
>
//--------------------------------------------------------------------------
> ---
> long eLong(long *ptr)
> {
> long a;
>
> eeprom_read_block(&a, (int)ptr, 4);
> return a;
> }
>
>
//--------------------------------------------------------------------------
> ---
> int eInt(int *ptr)
> {
> int a;
>
> eeprom_read_block(&a, (int)ptr, 2);
> return a;
> }
>
>
//--------------------------------------------------------------------------
> ---
> BYTE eByte(BYTE *ptr)
> {
> BYTE a;
>
> eeprom_read_block(&a, (int)ptr, 1);
> return a;
> }
>
>
//--------------------------------------------------------------------------
> ---
> void eWriteFloat(float *numPtr, void *addr)
> {
> BYTE *ptr, *num;
>
> ptr = (BYTE*)addr;
> num = (BYTE*)numPtr;
> eeprom_wb((int)ptr++, *num++);
> eeprom_wb((int)ptr++, *num++);
> eeprom_wb((int)ptr++, *num++);
> eeprom_wb((int)ptr++, *num++);
> }
>
>
//--------------------------------------------------------------------------
> ---
> void eWriteLong(long *numPtr, void *addr)
> {
> BYTE *ptr, *num;
>
> ptr = (BYTE*)addr;
> num = (BYTE*)numPtr;
> eeprom_wb((int)ptr++, *num++);
> eeprom_wb((int)ptr++, *num++);
> eeprom_wb((int)ptr++, *num++);
> eeprom_wb((int)ptr++, *num++);
> }
>
>
//--------------------------------------------------------------------------
> ---
> void eWriteInt(int *numPtr, void *addr)
> {
> BYTE *ptr, *num;
>
> ptr = (BYTE*)addr;
> num = (BYTE*)numPtr;
> eeprom_wb((int)ptr++, *num++);
> eeprom_wb((int)ptr++, *num++);
> }
>
>
//--------------------------------------------------------------------------
> ---
> void eWriteByte(BYTE *numPtr, void *addr)
> {
> BYTE *ptr, *num;
>
> ptr = (BYTE*)addr;
> num = (BYTE*)numPtr;
> eeprom_wb((int)ptr++, *num++);
> }
>
>
> -------------------------------------------
> Ron Kreymborg
> Jennaron Research
> Melbourne, Australia
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Sun Sep 09 02:51:45 2001
Received: from mx4.alphalink.com.au ([202.161.124.57])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15fjSS-00072c-00
for <[email-masked]>; Sun, 09 Sep 2001 02:51:45 +1200
Received: from research (d21-ps2-mel.alphalink.com.au [202.161.107.21])
by mx4.alphalink.com.au (8.11.4/8.9.3) with SMTP id f88Epqh06923;
Sun, 9 Sep 2001 00:51:52 +1000
From: "Ron Kreymborg" <[email-masked]>
To: "Gines Martinez" <[email-masked]>, <[email-masked]>
Subject: RE: [avr-gcc-list] int to EEPROM
Date: Sun, 9 Sep 2001 00:57:46 +1000
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
In-Reply-To: <001c01c13869$b6fd2710$0400a8c0@GINES>
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Importance: Normal
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

You could but you don't have to. If you have a look at eeprom.s you will see
that the code checks the EEWE bit and loops there until it is zero.

Ron

-------------------------------------------
Ron Kreymborg
Jennaron Research
Melbourne, Australia

> -----Original Message-----
> From: Gines Martinez [mailto:[email-masked]]
> Sent: Saturday, 8 September 2001 11:25 PM
> To: Ron Kreymborg; [email-masked]
> Subject: Re: [avr-gcc-list] int to EEPROM
>
>
> One question:
> Don't you have to call after each eeprom_wb() to the function
> eeprom_is_ready() ?
> ie:
>
> void eWriteFloat(float *numPtr, void *addr)
> {
> BYTE *ptr, *num;
>
> ptr = (BYTE*)addr;
> num = (BYTE*)numPtr;
> eeprom_wb((int)ptr++, *num++);
> while(!eeprom_is_ready());
> eeprom_wb((int)ptr++, *num++);
> while(!eeprom_is_ready());
> eeprom_wb((int)ptr++, *num++);
> while(!eeprom_is_ready());
> eeprom_wb((int)ptr++, *num++);
> while(!eeprom_is_ready());
> }
>
> ----- Original Message -----
> From: "Ron Kreymborg" <[email-masked]>
> To: <[email-masked]>
> Sent: Thursday, August 09, 2001 2:24 PM
> Subject: RE: [avr-gcc-list] int to EEPROM
>
>
> > >
> > > Saw nice example of storing float to eeprom, could some one
> please post
> > > the same kind of example of storing & retreiving and int type variable
> > > from/to eeprom ?
> > >
> > > With regards,
> > >
> > > Pasi
> > >
> >
> > Well here is one possible organisation. For the int case where (for
> example)
> > the variable in eeprom you are concerned with is called
> "TheVariable ". It
> > is declared in the usual way:
> >
> > #define EEPROM __attribute__((section(".eeprom")))
> >
> > int TheVariable EEPROM = 0;
> >
> > You extract it with:
> >
> > int x = eInt(&TheVariable);
> >
> > and you can write it back with:
> >
> > eWriteInt(&x, &TheVariable);
> >
> > Don't forget the ampersand! Here is a complete set...
> >
> >
> //----------------------------------------------------------------
> ----------
> > ---
> > float eFloat(float *ptr)
> > {
> > float a;
> >
> > eeprom_read_block(&a, (int)ptr, 4);
> > return a;
> > }
> >
> >
> //----------------------------------------------------------------
> ----------
> > ---
> > long eLong(long *ptr)
> > {
> > long a;
> >
> > eeprom_read_block(&a, (int)ptr, 4);
> > return a;
> > }
> >
> >
> //----------------------------------------------------------------
> ----------
> > ---
> > int eInt(int *ptr)
> > {
> > int a;
> >
> > eeprom_read_block(&a, (int)ptr, 2);
> > return a;
> > }
> >
> >
> //----------------------------------------------------------------
> ----------
> > ---
> > BYTE eByte(BYTE *ptr)
> > {
> > BYTE a;
> >
> > eeprom_read_block(&a, (int)ptr, 1);
> > return a;
> > }
> >
> >
> //----------------------------------------------------------------
> ----------
> > ---
> > void eWriteFloat(float *numPtr, void *addr)
> > {
> > BYTE *ptr, *num;
> >
> > ptr = (BYTE*)addr;
> > num = (BYTE*)numPtr;
> > eeprom_wb((int)ptr++, *num++);
> > eeprom_wb((int)ptr++, *num++);
> > eeprom_wb((int)ptr++, *num++);
> > eeprom_wb((int)ptr++, *num++);
> > }
> >
> >
> //----------------------------------------------------------------
> ----------
> > ---
> > void eWriteLong(long *numPtr, void *addr)
> > {
> > BYTE *ptr, *num;
> >
> > ptr = (BYTE*)addr;
> > num = (BYTE*)numPtr;
> > eeprom_wb((int)ptr++, *num++);
> > eeprom_wb((int)ptr++, *num++);
> > eeprom_wb((int)ptr++, *num++);
> > eeprom_wb((int)ptr++, *num++);
> > }
> >
> >
> //----------------------------------------------------------------
> ----------
> > ---
> > void eWriteInt(int *numPtr, void *addr)
> > {
> > BYTE *ptr, *num;
> >
> > ptr = (BYTE*)addr;
> > num = (BYTE*)numPtr;
> > eeprom_wb((int)ptr++, *num++);
> > eeprom_wb((int)ptr++, *num++);
> > }
> >
> >
> //----------------------------------------------------------------
> ----------
> > ---
> > void eWriteByte(BYTE *numPtr, void *addr)
> > {
> > BYTE *ptr, *num;
> >
> > ptr = (BYTE*)addr;
> > num = (BYTE*)numPtr;
> > eeprom_wb((int)ptr++, *num++);
> > }
> >
> >
> > -------------------------------------------
> > Ron Kreymborg
> > Jennaron Research
> > Melbourne, Australia
> >
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > [email-masked]
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
>

From [email-masked] Thu Sep 13 09:28:57 2001
Received: from mail.gmx.de ([213.165.64.20] helo=mail.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15hHZ3-00044g-00
for <[email-masked]>; Thu, 13 Sep 2001 09:28:57 +1200
Received: (qmail 9056 invoked by uid 0); 12 Sep 2001 21:28:56 -0000
Received: from p3ee27f19.dip.t-dialin.net (HELO linux) (62.226.127.25)
by mail.gmx.net (mp006-rz3) with SMTP; 12 Sep 2001 21:28:56 -0000
Content-Type: text/plain;
charset="iso-8859-15"
From: Karsten Schmidt <[email-masked]>
Reply-To: [email-masked]
Organization: Privat
To: [email-masked]
Date: Wed, 1 Aug 2001 22:30:28 +0200
X-Mailer: KMail [version 1.2]
MIME-Version: 1.0
Message-Id: <01080122302800.06346@linux>
Content-Transfer-Encoding: 8bit
Subject: [avr-gcc-list] gdb 5.0 linux
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

i successfull installed binutils 2.11.2 and gcc3.0 for avr under linux. Now
I'm trying to compile gdb 5.0 for avr.
Has somebody successfull build gdb5.0 (or 4.18) with this versions, and can
give me link ?

Best regards

Karsten Schmidt

From [email-masked] Sat Sep 15 08:05:49 2001
Received: from express.baneng.com ([199.86.92.2])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15hzDg-0005qo-00
for <[email-masked]>; Sat, 15 Sep 2001 08:05:49 +1200
Received: from [192.9.200.68] by express.baneng.com (NTMail 6.04.0010/NY1628.00.9978dd2f) with ESMTP id hxuvhaaa for [email-masked]; Fri, 14 Sep 2001 15:05:49 -0500
Reply-To: <[email-masked]>
From: "Mike Bechtold" <[email-masked]>
To: "Avr-Gcc-List (E-mail)" <[email-masked]>
Date: Fri, 14 Sep 2001 15:09:05 -0500
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Subject: [avr-gcc-list] new AVR/ATMEL part
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I have received preliminary AVR part like the ATMega161/163, and a few other
newer parts. Where to I go to find out what Part are supported by AVR-GCC
and what I need to do to work with Changed the AVR-GCC header/whatever

=========================================
Mike Bechtold
Software Technician with Banner Engineering
[email-masked]

From [email-masked] Sat Sep 15 08:37:05 2001
Received: from mail.sttl.uswest.net ([206.81.192.10] helo=sttlpop9.sttl.uswest.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15hzhw-0005sX-00
for <[email-masked]>; Sat, 15 Sep 2001 08:37:04 +1200
Received: (qmail 87095 invoked by uid 0); 14 Sep 2001 20:37:42 -0000
Received: from pdslppp13.sttl.uswest.net (HELO c1137399a) (63.224.33.13)
by sttlpop9.sttl.uswest.net with SMTP; 14 Sep 2001 20:37:42 -0000
Date: Fri, 14 Sep 2001 13:27:38 -0700
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] new AVR/ATMEL part
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Avr-gcc 3.0 (www.combio.de) already handles these parts. Look in the
../avr/include directory at the io-avr.h file. All supported parts
are listed there.

----- Original Message -----
From: "Mike Bechtold" <[email-masked]>

> I have received preliminary AVR part like the ATMega161/163, and a
few other
> newer parts. Where to I go to find out what Part are supported by
AVR-GCC
> and what I need to do to work with Changed the AVR-GCC
header/whatever
>

From [email-masked] Sun Sep 16 00:37:20 2001
Received: from mailgate5.cinetic.de ([217.72.192.165])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15iEhD-0006Rx-00
for <[email-masked]>; Sun, 16 Sep 2001 00:37:19 +1200
Received: from smtp.web.de (smtp01.dlan.cinetic.de [172.20.0.189])
by mailgate5.cinetic.de (8.11.2/8.11.2/SuSE Linux 8.11.0-0.4) with SMTP id f8FCbSx19204
for <[email-masked]>; Sat, 15 Sep 2001 14:37:28 +0200
Received: from argon by smtp.web.de with smtp
(freemail 4.2.2.3 #18) id m15iEhM-007ofaC; Sat, 15 Sep 2001 14:37 +0200
Date: Sat, 15 Sep 2001 14:37:55 +0200
From: Enno Luebbers <[email-masked]>
To: [email-masked]
Message-ID: <20010915143755.A10025@argon>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Mailer: Balsa 1.2.pre3
Lines: 13
Subject: [avr-gcc-list] AVR libc function overview
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi there!

I have assembled a small wannabe-documentation for the avr-libc by Marek
Michalkiewicz. I believe someone (months ago) asked for something like
that.

I hope it's useful at least for somebody.

Have a look at http://www.bang-gang.org/elektronik/avr/avr-libc-reference.html

Regards

Enno

From [email-masked] Sun Sep 16 02:41:19 2001
Received: from mx3.alphalink.com.au ([202.161.124.56])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15iGdD-0006Wz-00
for <[email-masked]>; Sun, 16 Sep 2001 02:41:19 +1200
Received: from research (d43-ps8-mel.alphalink.com.au [202.161.97.171])
by mx3.alphalink.com.au (8.11.4/8.9.3) with SMTP id f8FEg1i31324
for <[email-masked]>; Sun, 16 Sep 2001 00:42:01 +1000
From: "Ron Kreymborg" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
Date: Sun, 16 Sep 2001 00:48:01 +1000
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
In-Reply-To: <[email-masked]>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Subject: [avr-gcc-list] dtostre
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I notice dtostre still inserts the occasional colon ":" in place of a digit
in the fractional part, ie

+3.4567:E-02

Just before I tackle this myself, does anyone have an existing patch?

Has anybody done any assembler work for a (possibly restricted) sprintf
version? In the old days the multiple conversions associated with sprintf et
al were just too expensive to consider, but with 64/128K flash and 16 MHz
clocks available, perhaps it is now worth adding it to avrgcc.

Ron

-------------------------------------------
Ron Kreymborg
Jennaron Research
Melbourne, Australia

From [email-masked] Sun Sep 16 12:56:04 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15iQE7-0008UU-00
for <[email-masked]>; Sun, 16 Sep 2001 12:56:03 +1200
Received: from jpk1.jpk.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id f8G13iL31170
for <[email-masked]>; Sun, 16 Sep 2001 13:03:44 +1200
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Sun, 16 Sep 2001 12:56:25 +1200
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] gdb 5.0 linux
In-Reply-To: <01080122302800.06346@linux>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Karsten,

Contact Roland Zitzke <[email-masked]> as he has made the necessary changes
to gdb5.0 for the AVR. He's not too sure on how to make a patch file,
perhaps someone on the list may be able to assist him with this task. I
had intended to help but have had little time available recently.

gdb will become very very useful when an AVR simultator magically appears
(awaiting the right person to find some spare time :) but can also be used
with debug monitor code in the target micro. Denis wrote some code to do
this over the SPI port to a GNU/Linux machine with a parallel port
programming adaptor, another way would be to use the UART since there is a
generic serial port debug interface option in gdb.

Cheers,

Jason Kyle

At 22:30 1/08/2001 +0200, Karsten Schmidt wrote:
>Hi all,
>
>i successfull installed binutils 2.11.2 and gcc3.0 for avr under linux. Now
>I'm trying to compile gdb 5.0 for avr.
>Has somebody successfull build gdb5.0 (or 4.18) with this versions, and can
>give me link ?
>
>Best regards
>
>Karsten Schmidt

From [email-masked] Mon Sep 17 19:43:56 2001
Received: from ms.prism.co.za ([196.34.63.68] helo=prism.co.za)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15it4M-0001Dz-00
for <[email-masked]>; Mon, 17 Sep 2001 19:43:56 +1200
Received: from exchange.prism.co.za (unverified) by prism.co.za
(Content Technologies SMTPRS 4.2.1) with ESMTP id <[email-masked]> for <[email-masked]>;
Mon, 17 Sep 2001 09:40:08 +0200
Received: by EXCHANGE with Internet Mail Service (5.5.2653.19)
id <SY6F163F>; Mon, 17 Sep 2001 09:48:53 +0200
Message-ID: <C84D1E1984CBD411BCEF00D0B7A7D5C9013E6925@EXCHANGE>
From: Heinrich Vermeulen <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Date: Mon, 17 Sep 2001 09:48:53 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
charset="iso-8859-1"
Subject: [avr-gcc-list] RE: new AVR/ATMEL part
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all

Is the Mega128 going to be supported soon?

Regards
Heinrich Vermeulen

From [email-masked] Wed Sep 19 06:44:16 2001
Received: from mailgate5.cinetic.de ([217.72.192.165])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15jPqx-0002hQ-00
for <[email-masked]>; Wed, 19 Sep 2001 06:44:16 +1200
Received: from smtp.web.de (smtp01.dlan.cinetic.de [172.20.0.189])
by mailgate5.cinetic.de (8.11.2/8.11.2/SuSE Linux 8.11.0-0.4) with SMTP id f8IIibh27839
for <[email-masked]>; Tue, 18 Sep 2001 20:44:37 +0200
Received: from argon by smtp.web.de with smtp
(freemail 4.2.2.3 #18) id m15jPrJ-007pFfC; Tue, 18 Sep 2001 20:44 +0200
Date: Tue, 18 Sep 2001 20:45:35 +0200
From: Enno Luebbers <[email-masked]>
To: [email-masked]
Message-ID: <20010918204535.A29124@argon>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Mailer: Balsa 1.2.pre3
Lines: 40
Subject: [avr-gcc-list] Using a register throughout a program
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi!

I'm currently happily hacking away at the AVR's UART. I have so far managed
to write a signal handler for the UART Data Register Empty interrupt to put
the next character into the UDR.

unsigned const char msg[] = "Patience is a virtue!\r\n";

SIGNAL( SIG_UART_DATA ) {
static unsigned char outcount = 0;
unsigned char dummy = msg[outcount++];
if( dummy == 0 )
outcount = 0;
outp( dummy, UDR );
}

Everything's working alright, but looking at the generated assembler
source, I noticed that my variable 'outcount' is stored in the AVR's SRAM
and loaded each time the signal handler gets called. I would have preferred
to store it in a register, because it's used fairly often. But trying a

register unsigned char outcount asm("r10");

or similar outside the signal handler was a little worrisome. Each time the
interrupt handler got called, it pushed r10 into exile onto the stack, then
used r10 (correctly), increased it by one (BTW, when does the gcc use INC
r10 and when SUBI r10, 0xff? Funny thing, that), but then annihilated all
the good work by popping the "old" (unadded) value into poor r10.

Is that a bug, or a feature? And if it is, how do I tell gcc that I do want
to use r10 for that purpose only? register static unsigned char outcount
asm("r10"), aside from being totally incomprehensible and hard on my
fingers, doesn't work - and doesn't make all that much sense, anyway.

Thanks in advance for your assistance to an AVR-GCC beginner!

Regards

Enno

From [email-masked] Wed Sep 19 13:02:39 2001
Received: from proxy.peter.com.au ([203.47.34.4] helo=peter.com.au)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15jVl8-00030R-00
for <[email-masked]>; Wed, 19 Sep 2001 13:02:39 +1200
Received: from [203.47.34.3] ([203.47.34.3] verified) by peter.com.au (Stalker SMTP Server 1.8b2) with ESMTP id S.0000458159 for <[email-masked]>; Wed, 19 Sep 2001 09:03:23 +0800
Mime-Version: 1.0
X-Sender: peter@pop
Message-Id: <p05100318b7cd9beeafba@[203.47.34.3]>
In-Reply-To: <20010918204535.A29124@argon>
References: <20010918204535.A29124@argon>
Date: Wed, 19 Sep 2001 08:54:17 +0800
To: [email-masked]
From: Peter N Lewis <[email-masked]>
Subject: Re: [avr-gcc-list] Using a register throughout a program
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>Everything's working alright, but looking at the generated assembler
>source, I noticed that my variable 'outcount' is stored in the AVR's SRAM
>and loaded each time the signal handler gets called. I would have preferred
>to store it in a register, because it's used fairly often.

This should be a FAQ.

the short answer seems to be "there is no easy way".. A more
complicated answer appeared recently:

At 11:57 +0800 6/9/01, Lai Kang Tin wrote:
>I think you may try to change config/avr/avr.h in gcc source directory,
>there are some defines for the usage of register allocation, change
>what register(s) you wanted to FIXed purpose, but it seemded that you
>must not change some of them such as R24 R25, X,Y,Z,...
>Then recompile the GCC.

But in this case, I question the wisdom. What speed is your
processor running at and what speed is your serial running at?

Assuming 4MHz processor and 115,200 baud (pretty close to the worst
case I can imagine), your interrupt will get executed at roughly
11kHz, or once ever 350 cycles. Is the extra couple cycles to load
and store the variable (and extra couple cycles of interrupt latency)
really worth worrying about?

Enjoy,
Peter.

--
Sungroper Solar Car Association <http://www.sungroper.asn.au/>

From [email-masked] Thu Sep 20 21:26:35 2001
Received: from for.spb.ru ([195.201.69.16] helo=cyclone.eis.ru)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15k06L-0004XB-00
for <[email-masked]>; Thu, 20 Sep 2001 21:26:34 +1200
Received: (qmail 46621 invoked from network); 20 Sep 2001 09:56:33 -0000
Received: from good.for.spb.ru (HELO eis.ru) (195.201.69.80)
by for.spb.ru with SMTP; 20 Sep 2001 09:56:33 -0000
Date: Thu, 20 Sep 2001 13:26:55 +0400
From: Dmitry <[email-masked]>
To: [email-masked]
Message-Id: <[email-masked]>
Organization: eis.ru
X-Mailer: Sylpheed version 0.5.3 (GTK+ 1.2.8; i386-unknown-freebsd5.0)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] libc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Fellows,

I am trying to compile libc-20010821 and got the following problems:

1. Compiler does not define __ATxx__ at all. Instead it defines ATxx sometimes.
this is not a big problebm
2 Another one is a bit strange -

avr-gcc -x assembler-with-cpp -mmcu=atmega103 -D__AVR_ATmega103__ -I./../include -I. -Wa,-gstabs -c gcrt1.S -o crtm103.o
gcrt1.S: Assembler messages:
gcrt1.S:76: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:127: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:130: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:133: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:136: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:139: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:142: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:145: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:148: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:154: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:157: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:160: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:163: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:166: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:169: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:172: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:175: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:178: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:181: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:187: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:193: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:199: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:202: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:205: Error: Illegal opcode jmp for mcu avr2
macros.inc:177: Error: Illegal opcode elpm for mcu avr2
gcrt1.S:289: Error: Illegal opcode jmp for mcu avr2
gcrt1.S:292: Error: Illegal opcode jmp for mcu avr2
gmake: *** [crtm103.o] Error 1

The compiler complains about XJMP macro... I cannot figure out why.
Could anyone gimme an idea how to workit around?

I am using FreeBSD, gcc-2.95.2 binutils-2.9.5.0.13

Please reply on my email addres, cause I am not subscribed to the list.

Thank you,
Dmitry.

*********************************************************************
("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ
`6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys
(_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44
_..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia
(il),-'' (li),' ((!.-' +7 (812) 3148860, 5585314
*********************************************************************

From [email-masked] Fri Sep 21 01:10:02 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15k3aT-0004hG-00
for <[email-masked]>; Fri, 21 Sep 2001 01:09:56 +1200
Received: (from j@localhost)
by ida.interface-business.de id f8KD9w926154;
Thu, 20 Sep 2001 15:09:58 +0200 (MET DST)
Date: Thu, 20 Sep 2001 15:09:58 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] libc
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Cc: Dmitry <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Dmitry <[email-masked]> wrote:

> I am using FreeBSD, gcc-2.95.2 binutils-2.9.5.0.13

IMHO you need binutils 2.10 and gcc 3.0.

Please use the FreeBSD ports, that's why i'm provinding them. ;-)

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Fri Sep 21 02:11:34 2001
Received: from rfhs0002.fh-regensburg.de ([194.95.104.2] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15k4Y8-0004kU-00
for <[email-masked]>; Fri, 21 Sep 2001 02:11:33 +1200
Received: from rfhnw7014.fh-regensburg.de (rfhnw7014.fh-regensburg.de [194.95.106.14])
by rfhs0002.fh-regensburg.de (8.9.3/8.9.3-FH-Regensburg) with ESMTP id QAA13037
for <[email-masked]>; Thu, 20 Sep 2001 16:12:33 +0200 (MET DST)
Received: from FH-MARS1/SpoolDir by rfhnw7014.fh-regensburg.de (Mercury 1.48);
20 Sep 01 16:12:31 +0100
Received: from SpoolDir by FH-MARS1 (Mercury 1.48); 20 Sep 01 16:12:30 +0100
From: "Jochen Pernsteiner" <[email-masked]>
To: [email-masked]
Date: Thu, 20 Sep 2001 16:12:23 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Message-ID: <3BAA1566.28025.B9BCD@localhost>
Priority: normal
In-reply-to: <[email-masked]>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Subject: [avr-gcc-list] Re: Using a register throughout a program (Peter N Lewis)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

you can tell gcc not to use a register by using
the '-ffixed-REG' option.

Disabling r10 would work like: avr-gcc -ffixed-r10

Jochen

From [email-masked] Mon Sep 24 17:28:37 2001
Received: from f26.pav1.hotmail.com ([64.4.31.26] helo=hotmail.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15lOIH-0001KQ-00
for <[email-masked]>; Mon, 24 Sep 2001 17:28:37 +1200
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
Sun, 23 Sep 2001 22:29:26 -0700
Received: from 63.38.153.50 by pv1fd.pav1.hotmail.msn.com with HTTP;
Mon, 24 Sep 2001 05:29:26 GMT
X-Originating-IP: [63.38.153.50]
From: "Louis Jewett" <[email-masked]>
To: [email-masked]
Bcc:
Date: Mon, 24 Sep 2001 01:29:26 -0400
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
Message-ID: <[email-masked]>
X-OriginalArrivalTime: 24 Sep 2001 05:29:26.0325 (UTC) FILETIME=[E0251650:01C144B9]
Subject: [avr-gcc-list] Extended SRAM help
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I'm new to programming on the AVR and need a hand. I have a 8515 and am
programming it via avrgcc on the stk200. After reading through the archives
and several web sites I have the compiler setup and am able to flash
programs to the chip. Now I have a need to use the 32k SRAM I have added to
the stk200, but am having trouble. In a previous post I found that I needed
to update the avr85xx.x file to reflect the new ammount of memory, and link
it with my program. It also metioned setting the SRE bit in the MCU to
enable the extra ram? This I have no clue on how to do. I'm useing the
avrgcc7 example from avr for dummies ( Uart access to a computer terminal )
so if anyone has some example code that will print to terminal the response
of a value stored in memory higher than 512 PLEASE tell me how!! Thanks
very much..

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

From [email-masked] Tue Sep 25 02:08:21 2001
Received: from vita.hk.net
([152.101.101.101] helo=hk.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15lWPE-0001ds-00
for <[email-masked]>; Tue, 25 Sep 2001 02:08:21 +1200
Received: from hk.net (p38.tnt.hk.net [202.66.202.38])
by hk.net (8.9.1/8.9.1) with ESMTP id WAA26257
for <[email-masked]>; Mon, 24 Sep 2001 22:09:35 +0800 (HKT)
Message-ID: <[email-masked]>
Date: Mon, 24 Sep 2001 21:57:48 +0800
From: Kang Tin LAI <[email-masked]>
Organization: Solar System
X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 i86pc)
X-Accept-Language: zh-TW, en, zh-CN
MIME-Version: 1.0
To: [email-masked]
Subject: Re: [avr-gcc-list] Extended SRAM help
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

Change line in avr85xx.x:
data (rw!x) : ORIGIN = 0x800060, LENGTH = 512
to:
data (rw!x) : ORIGIN = 0x800060, LENGTH = 8K

My linker flags:
LDFLAGS = -Map $@.map -Tavr85xx.x \
--defsym __init_mcucr__=0xc0 \
--defsym __init_wdtcr__=0x00 --defsym __stack=0x7fff

I put modified avr85xx.x in my project directory, set linker option -T
to tell the
linker uses this script. __init_mcucr__ I set to 0xc0 which enables sram
and 1
wait state. __init_wdtcr__ this setting disables the watchdog. I put the
stack
to top of the sram.

Hope help.

Kang

Louis Jewett wrote:
>
> I'm new to programming on the AVR and need a hand. I have a 8515 and am
> programming it via avrgcc on the stk200. After reading through the archives
> and several web sites I have the compiler setup and am able to flash
> programs to the chip. Now I have a need to use the 32k SRAM I have added to
> the stk200, but am having trouble. In a previous post I found that I needed
> to update the avr85xx.x file to reflect the new ammount of memory, and link
> it with my program. It also metioned setting the SRE bit in the MCU to
> enable the extra ram? This I have no clue on how to do. I'm useing the
> avrgcc7 example from avr for dummies ( Uart access to a computer terminal )
> so if anyone has some example code that will print to terminal the response
> of a value stored in memory higher than 512 PLEASE tell me how!! Thanks
> very much..
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Tue Sep 25 02:32:54 2001
Received: from vita.hk.net
([152.101.101.101] helo=hk.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15lWmz-0001f9-00
for <[email-masked]>; Tue, 25 Sep 2001 02:32:54 +1200
Received: from hk.net (p38.tnt.hk.net [202.66.202.38])
by hk.net (8.9.1/8.9.1) with ESMTP id WAA27292
for <[email-masked]>; Mon, 24 Sep 2001 22:34:11 +0800 (HKT)
Message-ID: <[email-masked]>
Date: Mon, 24 Sep 2001 22:22:23 +0800
From: Kang Tin LAI <[email-masked]>
Organization: Solar System
X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 i86pc)
X-Accept-Language: zh-TW, en, zh-CN
MIME-Version: 1.0
To: [email-masked]
Subject: Re: [avr-gcc-list] Using a register throughout a program
References: <20010918204535.A29124@argon> <p05100318b7cd9beeafba@[203.47.34.3]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

Yesterday I studied in detail of the avr.h file in avr source directory,
I found a description regarding the register allocation:

The table initialized from this macro, and the table initialized by
the following one, may be overridden at run time either
automatically, by the actions of the macro
`CONDITIONAL_REGISTER_USAGE', or by the user with the command
options `-ffixed-REG', `-fcall-used-REG' and `-fcall-saved-REG'. */

That means gcc has already considered such case, need not to modify the
gcc,
good!

So if you want a register dedicated from your own purposed, for your
case,
the r10, you may use

-ffixed-r10 and -fcall-used-r10 in the command line.

Example:
fxn0(){
init r10,
asm (ld r10,#1234); or something like this, I don't the exact.
setup serial port,
initiate serial transmission
}

serial_isr(){
access r10
do serial transmission
}

The -ffixed-r10 tells the compiler the fixed purpose of r10 and may not
be allocated, -fcall-used-r10 tells the code generator no need to
preserve
r10 in serial_isr(). But I don't know the outcome if r24,r25? Didn't
test,
but shouldn't try, :)

Hope help.

Cheers!
Kang.

Peter N Lewis wrote:
>
> >Everything's working alright, but looking at the generated assembler
> >source, I noticed that my variable 'outcount' is stored in the AVR's SRAM
> >and loaded each time the signal handler gets called. I would have preferred
> >to store it in a register, because it's used fairly often.
>
> This should be a FAQ.
>
> the short answer seems to be "there is no easy way".. A more
> complicated answer appeared recently:
>
> At 11:57 +0800 6/9/01, Lai Kang Tin wrote:
> >I think you may try to change config/avr/avr.h in gcc source directory,
> >there are some defines for the usage of register allocation, change
> >what register(s) you wanted to FIXed purpose, but it seemded that you
> >must not change some of them such as R24 R25, X,Y,Z,...
> >Then recompile the GCC.
>
> But in this case, I question the wisdom. What speed is your
> processor running at and what speed is your serial running at?
>
> Assuming 4MHz processor and 115,200 baud (pretty close to the worst
> case I can imagine), your interrupt will get executed at roughly
> 11kHz, or once ever 350 cycles. Is the extra couple cycles to load
> and store the variable (and extra couple cycles of interrupt latency)
> really worth worrying about?
>
> Enjoy,
> Peter.
>
> --
> Sungroper Solar Car Association <http://www.sungroper.asn.au/>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Fri Sep 28 00:46:46 2001
Received: from sitemail.everyone.net ([216.200.145.35] helo=omta01.mta.everyone.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15maYw-0004NE-00
for <[email-masked]>; Fri, 28 Sep 2001 00:46:46 +1200
Received: from sitemail.everyone.net (reports [216.200.145.62])
by omta01.mta.everyone.net (Postfix) with ESMTP id B2A251C4729
for <[email-masked]>; Thu, 27 Sep 2001 05:48:21 -0700 (PDT)
Received: by sitemail.everyone.net (Postfix, from userid 99)
id 839FD36FA; Thu, 27 Sep 2001 05:48:21 -0700 (PDT)
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0
X-Mailer: MIME-tools 5.41 (Entity 5.404)
Date: Thu, 27 Sep 2001 05:48:21 -0700 (PDT)
From: Molnar Zoltan <[email-masked]>
To: [email-masked]
Reply-To: [email-masked]
X-Originating-Ip: [193.230.240.162]
Message-Id: <[email-masked]>
Subject: [avr-gcc-list] External memory mapping problem
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi All!

I have the following memory configuration for an ATMega103:

intenal RAM: $0060- $0FFF (4K)
free space for memory mapped devices: $1000- $7FFF
32K external RAM: $8000- $FFFF (32K)

- Does anybody knows how the linker script file should be modified (the 'data' section I suppose) in order to tell the linker about the 36K of SRAM?

- Is the linker capable to manage this type of configuration? I mean that can I tell the linker to use for variables, etc. the SRAM from $0060-$0FFF and $8000-$FFFF ?

I have seen somewhere on the net something like this in a source with a memory mapped ethernet card, unfortunatly I can't find the code anymore.

Any help would be appreciated :)

Regards
Zoltan Molnar

_____________________________________________________________
Are you a Techie? Get Your Free Tech Email Address Now! Visit http://www.TechEmail.com

From [email-masked] Fri Sep 28 01:52:20 2001
Received: from [206.197.156.12] (helo=millerwelds.com)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15mbaN-0004QA-00
for <[email-masked]>; Fri, 28 Sep 2001 01:52:20 +1200
Received: from MEMCO-Message_Server by millerwelds.com
with Novell_GroupWise; Thu, 27 Sep 2001 08:52:31 -0500
Message-Id: <[email-masked]>
X-Mailer: Novell GroupWise Internet Agent 5.5.4.1
Date: Thu, 27 Sep 2001 08:52:13 -0500
From: "TODD BATZLER" <[email-masked]>
To: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Subject: [avr-gcc-list] A "final" list file
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Can anyone tell whether the avr-gcc tool set can generate a "final" list =
file, after the linking stage, with all symbol and relocatable addresses =
resolved in this list file?? I find the list files created from the =
relocatable object files helpful, but limited for debugging purposes. I'd =
be more than happy with an assembly language file, with mnemonics.=20

From [email-masked] Fri Sep 28 03:06:42 2001
Received: from pop.sttl.uswest.net ([206.81.192.8] helo=sttlpop7.sttl.uswest.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15mckM-0004UC-00
for <[email-masked]>; Fri, 28 Sep 2001 03:06:42 +1200
Received: (qmail 23638 invoked by uid 0); 27 Sep 2001 15:08:16 -0000
Received: from pdslppp13.sttl.uswest.net (HELO c1137399a) (63.224.33.13)
by sttlpop7.sttl.uswest.net with SMTP; 27 Sep 2001 15:08:16 -0000
Date: Thu, 27 Sep 2001 07:58:38 -0700
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Minor bug in GAS
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

When assembling a program for the 1200, the "adiw" and "sbiw"
instructions are not flagged as unsupported. This is the 6/6 tool set
from combio.de/avr

From [email-masked] Fri Sep 28 05:55:43 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15mfNu-0004bG-00
for <[email-masked]>; Fri, 28 Sep 2001 05:55:43 +1200
Received: (from rneswold@localhost)
by DrMemory.fnal.GOV (8.11.3/8.11.3) id f8RHv5U08204;
Thu, 27 Sep 2001 12:57:05 -0500 (CDT)
(envelope-from rneswold)
Date: Thu, 27 Sep 2001 12:57:05 -0500
From: Rich Neswold <[email-masked]>
To: TODD BATZLER <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] A "final" list file
Message-ID: <[email-masked]>
Reply-To: [email-masked]
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="rz+pwK2yUstbofK6"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Thu, Sep 27, 2001 at 08:52:13AM -0500
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.3-RELEASE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--rz+pwK2yUstbofK6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Wasn't it 27-Sep-2001, at 08:52AM, when TODD BATZLER said:
> Can anyone tell whether the avr-gcc tool set can generate a "final" list
> file, after the linking stage, with all symbol and relocatable addresses
> resolved in this list file?? I find the list files created from the
> relocatable object files helpful, but limited for debugging purposes.
> I'd be more than happy with an assembly language file, with mnemonics.=20

I use

avr-objdump --disassemble-all -source FILE | less

where FILE is the name of your file (could be a .o file or the final, fully
linked binary.) You may have to compile your files with -g to get the
debugging info in there.

--=20
Rich Neswold

efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

--rz+pwK2yUstbofK6
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE7s2hxZmE+i9FKxdwRAq19AJ98n2ZbLB0SbeNRPme95aP8GyyhOACgw2IM
6fASrSyiMSB0lCe8Wuvutig=
=unqW
-----END PGP SIGNATURE-----

--rz+pwK2yUstbofK6--

From [email-masked] Fri Sep 28 02:11:55 2001
Received: from mailout05.sul.t-online.com ([194.25.134.82] helo=mailout05.sul.t-online.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15mbtK-0004Rm-00
for <[email-masked]>; Fri, 28 Sep 2001 02:11:55 +1200
Received: from fwd07.sul.t-online.de
by mailout05.sul.t-online.de with smtp
id 15mbua-0007pb-0L; Thu, 27 Sep 2001 16:13:12 +0200
Received: from krajenski.de (520059590703-0001@[217.230.10.74]) by fmrl07.sul.t-online.com
with smtp id 15mbuR-0baTUOC; Thu, 27 Sep 2001 16:13:03 +0200
Received: (qmail 961 invoked by uid 1000); 27 Sep 2001 14:13:00 -0000
Date: Thu, 27 Sep 2001 16:13:00 +0200
From: Clemens Gerlach <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] A "final" list file
Message-ID: <[email-masked]>
Mail-Followup-To: [email-masked]
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Thu, Sep 27, 2001 at 08:52:13AM -0500
X-Sender: [email-masked]
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Thu, Sep 27, 2001 at 08:52:13AM -0500, TODD BATZLER wrote:
> Can anyone tell whether the avr-gcc tool set can generate a "final" list file, after the linking stage, with all symbol and relocatable addresses resolved in this list file?? I find the list files created from the relocatable object files helpful, but limited for debugging purposes. I'd be more than happy with an assembly language file, with mnemonics.

try:

avr-objdump -D <elf-file>

clemens

From [email-masked] Fri Sep 28 15:55:35 2001
Received: from [209.235.58.166] (helo=artemisgroup.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15mokP-00054x-00
for <[email-masked]>; Fri, 28 Sep 2001 15:55:35 +1200
Received: from c11030-a.scllg1.pa.home.com (c11030-a.scllg1.pa.home.com [24.15.29.78])
by artemisgroup.com (Postfix) with ESMTP id 5930B7B87
for <[email-masked]>; Thu, 27 Sep 2001 23:57:11 -0400 (EDT)
Date: Thu, 27 Sep 2001 23:56:54 -0400 (EDT)
From: Patrick Lanphier <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] AVR Development Board
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I'm looking for a good/great development board that will work with GCC,
Linux and the AT90S2313-4PI chip from Atmel for less than $60. What would
you recommend?

Patrick Lanphier
The Artemis Group
http://www.artemisgroup.com
phone: 814-235-0444
fax: 800-582-9710

From [email-masked] Sat Sep 29 17:21:11 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15nCYp-00064t-00
for <[email-masked]>; Sat, 29 Sep 2001 17:21:11 +1200
Received: from jpk1.jpk.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id f8T5MwR22972
for <[email-masked]>; Sat, 29 Sep 2001 17:22:59 +1200
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Sat, 29 Sep 2001 17:22:33 +1200
To: [email-masked]
From: Jason Kyle <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: [avr-gcc-list] Fwd: AVRCHAT IMPORTANT MESSAGE !!!
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Those of you who are subscribed to [email-masked] will need to
re-subscribe next week sometime when the server has been re-built, see
forwarded email below.

>Subject: AVRCHAT IMPORTANT MESSAGE !!!
>Date: Fri, 28 Sep 2001 22:15:37 +0800
>X-Mailer: Microsoft Outlook Express 5.50.4807.1700
>
>Hello fellow list members,
>
>Are you wondering why we have not received any mail since the 22nd of
>September 2001 ?
>
>Well I was and I emailed David Vanhorn (the list owner) and he informed me
>he was hit by the lion worm. He asked me if I could let all the people I
>have contacts for on the list know of the problem.
>
>David is hoping to have the list server up and running by Monday the 30th of
>September 2001, and he will require us to all re-subscribe to the list after
>it is all up and running. I have included Dave in this email, so he can
>hopefully send a message out once his server is back up and running. (if he
>is not able to I will re send a message to this list)

From [email-masked] Sun Sep 30 18:53:37 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15naTo-00008q-00
for <[email-masked]>; Sun, 30 Sep 2001 18:53:36 +1200
Received: from jpk1.jpk.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id f8U6tTR01890
for <[email-masked]>; Sun, 30 Sep 2001 18:55:29 +1200
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Sun, 30 Sep 2001 18:54:53 +1200
To: [email-masked]
From: Jason Kyle <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: [avr-gcc-list] gdb-5.0 patch
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I finally got patch together based on Roland Zitzke's modifications to
Denis's original gdb-4.18 work. Builds okay on cygwin and should be
alright under gnu/linux too. Next step is simulator. Use Denis's
monitor-0.2.src.tar.gz from http://home.overta.ru/users/denisc/

http://avr.jpk.co.nz/gdb-5.0-avr-patch-0.0.gz (17684 bytes)

Obtain gdb-5.0.tar.gz from a mirror of the gnu site
http://www.gnu.org/order/ftp.html

tar -xzf gdb-5.0.tar.gz
mv gdb-5.0-avr-patch-0.0.gz gdb-5.0
cd gdb-5.0
gzip -dc gdb-5.0-avr-patch-0.0.gz | patch -p1
./configure --target=avr
make
make install (as root of course)

Report success/failure.

Jason Kyle

From [email-masked] Sun Sep 30 19:45:13 2001
Received: from lotus2.lotus.com ([129.42.241.42])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15nbHg-0000B8-00
for <[email-masked]>; Sun, 30 Sep 2001 19:45:08 +1200
Received: from internet2.lotus.com (internet2 [172.16.131.236])
by lotus2.lotus.com (8.11.4/8.11.4) with ESMTP id f8U7lUe16242
for <[email-masked]>; Sun, 30 Sep 2001 03:47:30 -0400 (EDT)
Received: from a3mail.lotus.com (a3mail.lotus.com [9.95.5.66])
by internet2.lotus.com (8.11.4/8.11.2) with ESMTP id f8U7kNw08362
for <[email-masked]>; Sun, 30 Sep 2001 03:46:23 -0400 (EDT)
To: [email-masked]
Subject: Re: [avr-gcc-list] AVR Development Board
MIME-Version: 1.0
X-Mailer: Lotus Notes Build M10_08082001 Beta 3 August 08, 2001
From: "Chris Edwards/SYD/Lotus" <[email-masked]>
Message-ID: <[email-masked]>
Date: Sun, 30 Sep 2001 18:46:14 +1100
X-MIMETrack: Serialize by Router on A3MAIL/CAM/H/Lotus(Build V509_09202001 |September 20, 2001) at
09/30/2001 03:44:14 AM,
Serialize complete at 09/30/2001 03:44:14 AM
Content-Type: multipart/alternative; boundary="=_alternative 002AA6EECA256AD7_="
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multipart message in MIME format.
--=_alternative 002AA6EECA256AD7_=
Content-Type: text/plain; charset="US-ASCII"

Patrick,

Have a look at http://www.dontronics.com/dt006.html it's a good Aussie
product and given the US$ it's a pretty good price DT006-K Total $65AUD
($71.5AUD Inc GST) (~$31.96USD).

Patrick Lanphier <[email-masked]>
Sent by: [email-masked]
28/09/2001 13:56

To: <[email-masked]>
cc: (bcc: Chris Edwards/SYD/Lotus)
Subject: [avr-gcc-list] AVR Development Board

I'm looking for a good/great development board that will work with GCC,
Linux and the AT90S2313-4PI chip from Atmel for less than $60. What would
you recommend?

Patrick Lanphier
The Artemis Group
http://www.artemisgroup.com
phone: 814-235-0444
fax: 800-582-9710

_______________________________________________
avr-gcc-list mailing list
[email-masked]
http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--=_alternative 002AA6EECA256AD7_=
Content-Type: text/html; charset="US-ASCII"

<br><font size=2 face="sans-serif">Patrick,</font>
<br>
<br><font size=2 face="sans-serif">Have a look at http://www.dontronics.com/dt006.html it's a good Aussie product and given the US$ it's a pretty good price DT006-K Total&nbsp;$65AUD ($71.5AUD Inc GST) (~$31.96USD).<br>
</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td bgcolor=#b0c8e0>
<td bgcolor=#b0c8e0><font size=1 face="sans-serif"><b>Patrick Lanphier &lt;[email-masked]&gt;</b></font>
<br><font size=1 face="sans-serif">Sent by: [email-masked]</font>
<p><font size=1 face="sans-serif">28/09/2001 13:56</font>
<br>
<td bgcolor=#b0c8e0><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To: &nbsp; &nbsp; &nbsp; &nbsp;&lt;[email-masked]&gt;</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc: &nbsp; &nbsp; &nbsp; &nbsp;(bcc: Chris Edwards/SYD/Lotus)</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject: &nbsp; &nbsp; &nbsp; &nbsp;[avr-gcc-list] AVR Development Board</font>
<td bgcolor=#b0c8e0></table>
<br>
<br>
<br><font size=2 face="Courier New">I'm looking for a good/great development board that will work with GCC,<br>
Linux and the AT90S2313-4PI chip from Atmel for less than $60. &nbsp;What would<br>
you recommend?<br>
<br>
Patrick Lanphier<br>
The Artemis Group<br>
http://www.artemisgroup.com<br>
phone: 814-235-0444<br>
&nbsp;fax: 800-582-9710<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
avr-gcc-list mailing list<br>
[email-masked]<br>
http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list<br>
</font>
<br>
<br>
--=_alternative 002AA6EECA256AD7_=--

From [email-masked] Sun Sep 30 22:39:36 2001
Received: from imo-d10.mx.aol.com ([205.188.157.42])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ne0V-0006Mp-00
for <[email-masked]>; Sun, 30 Sep 2001 22:39:35 +1200
Received: from [email-masked]
by imo-d10.mx.aol.com (mail_out_v31_r1.7.) id v.1b.218765a (16234)
for <[email-masked]>; Sun, 30 Sep 2001 06:40:47 -0400 (EDT)
Received: from netscape.com (mow-m06.webmail.aol.com [64.12.184.134]) by air-in02.mx.aol.com (v80.17) with ESMTP id MAILININ210-0930064047; Sun, 30 Sep 2001 06:40:47 -0400
Date: Sun, 30 Sep 2001 06:40:47 -0400
From: [email-masked] (Robin Iddon)
To: [email-masked]
Subject: Re: [avr-gcc-list] AVR Development Board DonTronics DT006-K
Message-ID: <[email-masked]>
X-Mailer: Atlas Mailer 1.0
Content-Type: text/plain; charset=iso-8859-1
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I just ordered one before reading this message - what a coincidence ...

I will post the results here, if you want to wait for it. Don seems like a good bloke - sent me personal email confirming my order - should be here this week.

BTW, AUS$65 is for the kit - you need a soldering iron and some skill to assemble it. Don sells an assembled kit for a few bucks more, but I am happy to assemble it myself.

I'll probably bring it up with the free basic compiler he references from his site, just to be sure it works as expected, then shift over to the avr-gcc, which I have not yet tried to use.

Regards,
Robin Iddon

__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

From [email-masked] Mon Oct 01 03:25:04 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15niSl-0007ep-00
for <[email-masked]>; Mon, 01 Oct 2001 03:25:04 +1200
Received: from 199.182.92.58.ras04.den.iras.frii.net (199.182.92.58.ras04.den.iras.frii.net [199.182.92.58])
by deimos.frii.net (8.11.6/8.11.6) with ESMTP id f8UFQmx11204
for <[email-masked]>; Sun, 30 Sep 2001 09:26:48 -0600 (MDT)
Date: Sun, 30 Sep 2001 09:27:35 -0600 (MDT)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] simulator
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I've been working on a simluator written in pyhton for the last couple of
weeks. It's not near done yet, but I can already run programs that don't
use the IO registers. Right now I'm working on hooks for the virtual
connections to the IO pins of devices.

I'm not sure if it could be accessed from gdb, but it has been in the back
of my mind. Right now I'm only using assembly code to test it so as to
keep the programs simple and be able to understand what's going on.

So far, I've got the basics for the at90s1200, 4414 and 8515 going, but
I've only been testing with the 8515. It should be easy to add new devices
in the feature, since I've been designing it with that in mind.

If anyone's interested, I'd be more than happy to make the code available.

Ted Roth
[email-masked]

From [email-masked] Mon Oct 01 03:45:02 2001
Received: from hammer.overta.ru ([195.151.108.138] helo=overta.ru)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15nim6-0007g4-00
for <[email-masked]>; Mon, 01 Oct 2001 03:45:02 +1200
Received: from [195.151.217.147] (HELO localhost.localdomain)
by overta.ru (CommuniGate Pro SMTP 3.4.7)
with ESMTP id 727716; Sun, 30 Sep 2001 19:45:58 +0400
To: Jason Kyle <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] gdb-5.0 patch
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 30 Sep 2001 19:40:18 +0400
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
Lines: 16
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Jason Kyle <[email-masked]> writes:

> Hi,
>
> I finally got patch together based on Roland Zitzke's modifications to
> Denis's original gdb-4.18 work. Builds okay on cygwin and should be
> alright under gnu/linux too. Next step is simulator. Use Denis's
> monitor-0.2.src.tar.gz from http://home.overta.ru/users/denisc/

Jason !

Are you and Roland Zitzke have a FSF COPYING ASSIGNMENTS and
DISCLAIMERS.
It's important if we want to see the avr port in the mainstream GDB.

Denis.

From [email-masked] Mon Oct 01 10:17:59 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15nouM-0008LD-00
for <[email-masked]>; Mon, 01 Oct 2001 10:17:58 +1200
Received: from cel1.jpk.co.nz (adsl-179.world-net.co.nz [210.55.228.179])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id f8UMJlR12012;
Mon, 1 Oct 2001 10:19:48 +1200
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Mon, 01 Oct 2001 10:13:33 +1200
To: Denis Chertykov <[email-masked]>
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] gdb-5.0 patch
Cc: [email-masked]
In-Reply-To: <[email-masked]>
References: <[email-masked]>
<[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

At 03:40 1/10/2001, Denis Chertykov wrote:
>Jason Kyle <[email-masked]> writes:
>
> > Hi,
> >
> > I finally got patch together based on Roland Zitzke's modifications to
> > Denis's original gdb-4.18 work. Builds okay on cygwin and should be
> > alright under gnu/linux too. Next step is simulator. Use Denis's
> > monitor-0.2.src.tar.gz from http://home.overta.ru/users/denisc/
>
>Jason !
>
>Are you and Roland Zitzke have a FSF COPYING ASSIGNMENTS and
>DISCLAIMERS.
>It's important if we want to see the avr port in the mainstream GDB.
>
>Denis.

Hi Denis,

I will do this when the patch is verified as functional and perhaps after a
simulator is ready for inclusion as well. The original copyright from your
4.18 patch has been retained for the time being.

Jason

From [email-masked] Mon Oct 01 14:17:28 2001
Received: from proxy.peter.com.au ([203.47.34.4] helo=peter.com.au)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15nse8-0008Uj-00
for <[email-masked]>; Mon, 01 Oct 2001 14:17:28 +1200
Received: from [203.47.34.3] ([203.47.34.3] verified) by peter.com.au (Stalker SMTP Server 1.8b2) with ESMTP id S.0000465092 for <[email-masked]>; Mon, 01 Oct 2001 10:18:41 +0800
Mime-Version: 1.0
X-Sender: peter@pop
Message-Id: <p05100308b7dd811c4abc@[203.47.34.3]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
Date: Mon, 1 Oct 2001 10:13:23 +0800
To: [email-masked]
From: Peter N Lewis <[email-masked]>
Subject: Re: [avr-gcc-list] AVR Development Board DonTronics DT006-K
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

At 6:40 -0400 30/9/01, Robin Iddon wrote:

>I will post the results here, if you want to wait for it. Don seems
>like a good bloke - sent me personal email confirming my order -
>should be here this week.

The DonTronics stuff is very good. The PCBs are well made, and they
are documented sufficiently to easily get working (sometimes you have
to do a little leg work keeping track of the different web pages and
such).

I use three bas boards myself, one 1200-based serial programmer which
can program the other two boards with pretty much anything on them (I
have a Mac, no parallel port, so I need the serial interface).

>I'll probably bring it up with the free basic compiler he references
>from his site, just to be sure it works as expected, then shift over
>to the avr-gcc, which I have not yet tried to use.

You shouldn't have any real problems.

Enjoy,
Peter.

--
<http://www.interarchy.com/> <ftp://ftp.interarchy.com/interarchy.hqx>

From [email-masked] Mon Oct 01 18:48:06 2001
Received: from netti.nic.fi ([212.38.224.82])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15nws0-0003Gy-00
for <[email-masked]>; Mon, 01 Oct 2001 18:48:05 +1200
Received: (qmail 25661 invoked by uid 101); 1 Oct 2001 09:49:49 +0300
Message-ID: <[email-masked]>
To: <[email-masked]>
Subject: Re: [avr-gcc-list] simulator
Date: Mon, 1 Oct 2001 06:49:49 -0000
From: <[email-masked]>
X-Mailer: TWIG 2.6.0.cvs
In-Reply-To: <[email-masked]>
X-Client-IP: 194.19.8.2
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Sounds interesting :-)
Too bad I'm not familiar with Python, but I've been
"fooling around" with AVR:s for some time ...
And There's not too many (1--) AVR simulators for Linux ...
Sounds like a good enough reason to pick up Python ...

Have You got a web-page, or how do You plan to make
the code available ??

BR : Johan

BTW : Is 'pyhton' a typo, or am I completely lost ??

"Theodore A. Roth" <[email-masked]> wrote:

> Hi,
>
> I've been working on a simluator written in pyhton for the last couple of
> weeks. It's not near done yet, but I can already run programs that don't
> use the IO registers. Right now I'm working on hooks for the virtual
> connections to the IO pins of devices.
>
> I'm not sure if it could be accessed from gdb, but it has been in the back
> of my mind. Right now I'm only using assembly code to test it so as to
> keep the programs simple and be able to understand what's going on.
>
> So far, I've got the basics for the at90s1200, 4414 and 8515 going, but
> I've only been testing with the 8515. It should be easy to add new
devices
> in the feature, since I've been designing it with that in mind.
>
> If anyone's interested, I'd be more than happy to make the code
available.
>
> Ted Roth
> [email-masked]
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

--

________________________________________________________________
Ilmainen Internet @ http://www.nic.fi/

From [email-masked] Mon Oct 01 20:50:09 2001
Received: from mailgate5.cinetic.de ([217.72.192.165])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15nym8-0005xy-00
for <[email-masked]>; Mon, 01 Oct 2001 20:50:09 +1200
Received: from smtp.web.de (smtp01.dlan.cinetic.de [172.20.0.189])
by mailgate5.cinetic.de (8.11.2/8.11.2/SuSE Linux 8.11.0-0.4) with SMTP id f917flh27587;
Mon, 1 Oct 2001 09:41:47 +0200
Received: from FRITZweb by smtp.web.de with smtp
(freemail 4.2.2.3 #20) id m15nxhy-007py1C; Mon, 1 Oct 2001 09:41 +0200
Message-ID: <001a01c14a4c$482d9000$fe78a8c0@FRITZweb>
From: "Roland Zitzke" <[email-masked]>
To: "Denis Chertykov" <[email-masked]>
Cc: <[email-masked]>
References: <[email-masked]> <[email-masked]>
Subject: Re: [avr-gcc-list] gdb-5.0 patch
Date: Mon, 1 Oct 2001 09:40:02 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,
no, I don't have such authorisation. May be someone who went through all
that paper work cout put his name at the creator of the patch and just do
it.
After all, I didn't do to much work on it except modifying a bunch of
macros.
Roland

> Jason Kyle <[email-masked]> writes:
>
> > Hi,
> >
> > I finally got patch together based on Roland Zitzke's modifications to
> > Denis's original gdb-4.18 work. Builds okay on cygwin and should be
> > alright under gnu/linux too. Next step is simulator. Use Denis's
> > monitor-0.2.src.tar.gz from http://home.overta.ru/users/denisc/
>
> Jason !
>
> Are you and Roland Zitzke have a FSF COPYING ASSIGNMENTS and
> DISCLAIMERS.
> It's important if we want to see the avr port in the mainstream GDB.
>
> Denis.
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
>

From [email-masked] Mon Oct 01 21:18:57 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15nzE1-00060E-00
for <[email-masked]>; Mon, 01 Oct 2001 21:18:57 +1200
Received: from jpk1.jpk.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id f919Ku703874
for <[email-masked]>; Mon, 1 Oct 2001 21:20:57 +1200
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Mon, 01 Oct 2001 21:20:19 +1200
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] simulator
In-Reply-To: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

At 09:27 30/09/2001 -0600, Theodore A. Roth wrote:
>Hi,
>
>I've been working on a simluator written in pyhton for the last couple of
>weeks. It's not near done yet, but I can already run programs that don't
>use the IO registers. Right now I'm working on hooks for the virtual
>connections to the IO pins of devices.
>
>I'm not sure if it could be accessed from gdb, but it has been in the back
>of my mind. Right now I'm only using assembly code to test it so as to
>keep the programs simple and be able to understand what's going on.
>
>So far, I've got the basics for the at90s1200, 4414 and 8515 going, but
>I've only been testing with the 8515. It should be easy to add new devices
>in the feature, since I've been designing it with that in mind.
>
>If anyone's interested, I'd be more than happy to make the code available.
>
>Ted Roth
>[email-masked]

Hi Ted,

What kind of simulation speed can you achieve? I imagine using python
wouldn't be all that quick. Whatever is finally included with gdb will
most definitely require as complete on-chip peripheral simulation as
possible as well as the ability to add off-chip devices (e.g. LCD display)
virtually wired to the virtual AVR. Flexability will be the prime
requirement (that includes OS independence), speed secondary but important.

Anyone else got any thoughts on simulators? Bruce?

Cheers,

Jason Kyle

From [email-masked] Mon Oct 01 21:33:09 2001
Received: from sitemail.everyone.net ([216.200.145.35] helo=omta04.mta.everyone.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15nzRk-000618-00
for <[email-masked]>; Mon, 01 Oct 2001 21:33:09 +1200
Received: from sitemail.everyone.net (reports [216.200.145.62])
by omta04.mta.everyone.net (Postfix) with ESMTP id F12F8540D3
for <[email-masked]>; Mon, 1 Oct 2001 02:35:00 -0700 (PDT)
Received: by sitemail.everyone.net (Postfix, from userid 99)
id A8C5836F9; Mon, 1 Oct 2001 02:35:00 -0700 (PDT)
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0
X-Mailer: MIME-tools 5.41 (Entity 5.404)
Date: Mon, 1 Oct 2001 02:35:00 -0700 (PDT)
From: Molnar Zoltan <[email-masked]>
To: [email-masked]
Reply-To: [email-masked]
X-Originating-Ip: [193.230.240.162]
Message-Id: <[email-masked]>
Subject: [avr-gcc-list] External memory mapping problem
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi All!

I have the following memory configuration for an ATMega103:

intenal RAM: $0060- $0FFF (4K)
free space for memory mapped devices: $1000- $7FFF
32K external RAM: $8000- $FFFF (32K)

- Does anybody knows how the linker script file should be modified (the 'data' section I suppose) in order to tell the linker about the 36K of available SRAM?

- Is the linker capable to manage this type of configuration? I mean that can I tell the linker to use for variables, etc. the SRAM from $0060-$0FFF and $8000-$FFFF ?

I have seen somewhere on the net something like this in a source with a memory mapped ethernet card, unfortunatly I can't find the code anymore.

Any help would be appreciated

Regards
Zoltan Molnar

_____________________________________________________________
Are you a Techie? Get Your Free Tech Email Address Now! Visit http://www.TechEmail.com

From [email-masked] Tue Oct 02 03:12:17 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15o4jw-0006Eg-00
for <[email-masked]>; Tue, 02 Oct 2001 03:12:16 +1200
Received: from 199.182.90.249.ras04.den.iras.frii.net (199.182.90.249.ras04.den.iras.frii.net [199.182.90.249])
by deimos.frii.net (8.11.6/8.11.6) with ESMTP id f91FDtn93454;
Mon, 1 Oct 2001 09:13:55 -0600 (MDT)
Date: Mon, 1 Oct 2001 09:14:41 -0600 (MDT)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>
cc: <[email-masked]>
Subject: Re: [avr-gcc-list] simulator
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I do plan on making the source available, I'm just trying to get a bit
more of the guts in there before I expose it others. I'll try to get
something up today or tomorrow. Here's the web site where it will be 'real
soon now':

<http://res099095.halls.colostate.edu/programs/simulavr/>

Don't feel too bad if you don't know python, I'm still learning avr
assembly. Python is super easy to learn if you can do assembly or C.

As for 'pyhton', I obviously don't proof read very well. ;)

Ted Roth

On Mon, 1 Oct 2001, [email-masked] wrote:

:)
:)
:)
:)Sounds interesting :-)
:)Too bad I'm not familiar with Python, but I've been
:)"fooling around" with AVR:s for some time ...
:)And There's not too many (1--) AVR simulators for Linux ...
:)Sounds like a good enough reason to pick up Python ...
:)
:)Have You got a web-page, or how do You plan to make
:)the code available ??
:)
:)BR : Johan
:)
:)BTW : Is 'pyhton' a typo, or am I completely lost ??
:)

From [email-masked] Tue Oct 02 03:24:32 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15o4vo-0006FT-00
for <[email-masked]>; Tue, 02 Oct 2001 03:24:32 +1200
Received: from 199.182.90.249.ras04.den.iras.frii.net (199.182.90.249.ras04.den.iras.frii.net [199.182.90.249])
by deimos.frii.net (8.11.6/8.11.6) with ESMTP id f91FQMn05900;
Mon, 1 Oct 2001 09:26:22 -0600 (MDT)
Date: Mon, 1 Oct 2001 09:27:09 -0600 (MDT)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: Jason Kyle <[email-masked]>
cc: <[email-masked]>
Subject: Re: [avr-gcc-list] simulator
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Jason,

I haven't run any tests to see how many instructions per second it can do,
but I have already hooked in the python profiler and see that most of the
overhead is in initializing all the arrays for the device and dumping a
core image. The profiler seems to tell me it's not spending much time in
the actual instruction execution time. Things would be much faster for me
if I wasn't using a Dual Pentium Pro 180 system for development. I'm sure
it would be considerably faster with some of the gigahertz processors out
there now.

You're right that it's now going to be as fast as C/C++, but pythons hash
and array accesses are faster than most people think. It's the walking of
the hashes or arrays that is really slow as I'm seeing when I do core
dumps.

I've already been giving thought to on/off-chip peripherals via a virtual
hardware interface. It's still a little weak in the kness, but I got the
basics of IO Port access done last night. I'm going to clean it up a bit
today and then will get it up on the web for others to see.

The flexibility and os independence of python are why I choose it. It is
also possible to put the bottle necks into C modules to speed things up if
necessary, although it makes it a bit harder to compile and run on many
platforms. I'm also game to just using this as a prototype for something
in pure C or C++.

Ted Roth

On Mon, 1 Oct 2001, Jason Kyle wrote:

:)Hi Ted,
:)
:)What kind of simulation speed can you achieve? I imagine using python
:)wouldn't be all that quick. Whatever is finally included with gdb will
:)most definitely require as complete on-chip peripheral simulation as
:)possible as well as the ability to add off-chip devices (e.g. LCD display)
:)virtually wired to the virtual AVR. Flexability will be the prime
:)requirement (that includes OS independence), speed secondary but important.
:)
:)Anyone else got any thoughts on simulators? Bruce?
:)
:)Cheers,
:)
:)Jason Kyle
:)
:)
:)_______________________________________________
:)avr-gcc-list mailing list
:)[email-masked]
:)http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
:)

From [email-masked] Tue Oct 02 03:30:35 2001
Received: from cluster1.tfb.com ([204.212.132.101] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15o51e-0006G8-00
for <[email-masked]>; Tue, 02 Oct 2001 03:30:34 +1200
Received: from jaz.tfb.com (204-216-234-86.dsl.cust.tfb.com [204.216.234.86])
by cluster1.tfb.com (8.11.0/8.11.0) with ESMTP id f91FWKb32022;
Mon, 1 Oct 2001 08:32:21 -0700
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Mon, 01 Oct 2001 08:34:16 -0700
To: <[email-masked]>, <[email-masked]>
From: ChristoGeo <[email-masked]>
Subject: Re: [avr-gcc-list] simulator
In-Reply-To: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I don't say too much here but I would suggest that any simulator out there
be written in C not Python. Only thing worse would be TCL based.

I could write the opcodes in C for you if you desire. I write cpu cores
all the time in C for pleasure

Regards,
Chris

At 06:49 AM 10/1/2001 +0000, [email-masked] wrote:

>Sounds interesting :-)
>Too bad I'm not familiar with Python, but I've been
>"fooling around" with AVR:s for some time ...
>And There's not too many (1--) AVR simulators for Linux ...
>Sounds like a good enough reason to pick up Python ...
>
>Have You got a web-page, or how do You plan to make
>the code available ??
>
>BR : Johan
>
>BTW : Is 'pyhton' a typo, or am I completely lost ??
>
>"Theodore A. Roth" <[email-masked]> wrote:
>
> > Hi,
> >
> > I've been working on a simluator written in pyhton for the last couple of
> > weeks. It's not near done yet, but I can already run programs that don't
> > use the IO registers. Right now I'm working on hooks for the virtual
> > connections to the IO pins of devices.
> >
> > I'm not sure if it could be accessed from gdb, but it has been in the back
> > of my mind. Right now I'm only using assembly code to test it so as to
> > keep the programs simple and be able to understand what's going on.
> >
> > So far, I've got the basics for the at90s1200, 4414 and 8515 going, but
> > I've only been testing with the 8515. It should be easy to add new
>devices
> > in the feature, since I've been designing it with that in mind.
> >
> > If anyone's interested, I'd be more than happy to make the code
>available.
> >
> > Ted Roth
> > [email-masked]
> >
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > [email-masked]
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
> >
>
>
>
>--
>
>
>
>
>________________________________________________________________
>Ilmainen Internet @ http://www.nic.fi/
>
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Tue Oct 02 03:40:51 2001
Received: from cluster2.tfb.com ([204.212.132.102] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15o5Bb-0006H2-00
for <[email-masked]>; Tue, 02 Oct 2001 03:40:51 +1200
Received: from jaz.tfb.com (204-216-234-86.dsl.cust.tfb.com [204.216.234.86])
by cluster2.tfb.com (8.11.0/8.11.0) with ESMTP id f91FgY919673;
Mon, 1 Oct 2001 08:42:34 -0700
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Mon, 01 Oct 2001 08:44:31 -0700
To: "Theodore A. Roth" <[email-masked]>, Jason Kyle <[email-masked]>
From: ChristoGeo <[email-masked]>
Subject: Re: [avr-gcc-list] simulator
Cc: <[email-masked]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Why not code the actual core in C and the rest in Python?

Chris

At 09:27 AM 10/1/2001 -0600, Theodore A. Roth wrote:
>Hi Jason,
>
>I haven't run any tests to see how many instructions per second it can do,
>but I have already hooked in the python profiler and see that most of the
>overhead is in initializing all the arrays for the device and dumping a
>core image. The profiler seems to tell me it's not spending much time in
>the actual instruction execution time. Things would be much faster for me
>if I wasn't using a Dual Pentium Pro 180 system for development. I'm sure
>it would be considerably faster with some of the gigahertz processors out
>there now.
>
>You're right that it's now going to be as fast as C/C++, but pythons hash
>and array accesses are faster than most people think. It's the walking of
>the hashes or arrays that is really slow as I'm seeing when I do core
>dumps.
>
>I've already been giving thought to on/off-chip peripherals via a virtual
>hardware interface. It's still a little weak in the kness, but I got the
>basics of IO Port access done last night. I'm going to clean it up a bit
>today and then will get it up on the web for others to see.
>
>The flexibility and os independence of python are why I choose it. It is
>also possible to put the bottle necks into C modules to speed things up if
>necessary, although it makes it a bit harder to compile and run on many
>platforms. I'm also game to just using this as a prototype for something
>in pure C or C++.
>
>
>Ted Roth
>
>
>
>On Mon, 1 Oct 2001, Jason Kyle wrote:
>
>:)Hi Ted,
>:)
>:)What kind of simulation speed can you achieve? I imagine using python
>:)wouldn't be all that quick. Whatever is finally included with gdb will
>:)most definitely require as complete on-chip peripheral simulation as
>:)possible as well as the ability to add off-chip devices (e.g. LCD display)
>:)virtually wired to the virtual AVR. Flexability will be the prime
>:)requirement (that includes OS independence), speed secondary but important.
>:)
>:)Anyone else got any thoughts on simulators? Bruce?
>:)
>:)Cheers,
>:)
>:)Jason Kyle
>:)
>:)
>:)_______________________________________________
>:)avr-gcc-list mailing list
>:)[email-masked]
>:)http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>:)
>
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Tue Oct 02 03:43:16 2001
Received: from cluster2.tfb.com ([204.212.132.102] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15o5Du-0006HX-00
for <[email-masked]>; Tue, 02 Oct 2001 03:43:15 +1200
Received: from jaz.tfb.com (204-216-234-86.dsl.cust.tfb.com [204.216.234.86])
by cluster2.tfb.com (8.11.0/8.11.0) with ESMTP id f91Fj3919847;
Mon, 1 Oct 2001 08:45:03 -0700
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Mon, 01 Oct 2001 08:47:00 -0700
To: "Theodore A. Roth" <[email-masked]>, Jason Kyle <[email-masked]>
From: ChristoGeo <[email-masked]>
Subject: Re: [avr-gcc-list] simulator
Cc: <[email-masked]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

If written in C, it would run in any environment. I still use DOS and
Linux. Dos is my majority of my time. I was trying to port one of my 6805
simulators into Linux (C), but I have some problems to resolve regarding a
crash ;)

Chris

At 09:27 AM 10/1/2001 -0600, Theodore A. Roth wrote:
>Hi Jason,
>
>I haven't run any tests to see how many instructions per second it can do,
>but I have already hooked in the python profiler and see that most of the
>overhead is in initializing all the arrays for the device and dumping a
>core image. The profiler seems to tell me it's not spending much time in
>the actual instruction execution time. Things would be much faster for me
>if I wasn't using a Dual Pentium Pro 180 system for development. I'm sure
>it would be considerably faster with some of the gigahertz processors out
>there now.
>
>You're right that it's now going to be as fast as C/C++, but pythons hash
>and array accesses are faster than most people think. It's the walking of
>the hashes or arrays that is really slow as I'm seeing when I do core
>dumps.
>
>I've already been giving thought to on/off-chip peripherals via a virtual
>hardware interface. It's still a little weak in the kness, but I got the
>basics of IO Port access done last night. I'm going to clean it up a bit
>today and then will get it up on the web for others to see.
>
>The flexibility and os independence of python are why I choose it. It is
>also possible to put the bottle necks into C modules to speed things up if
>necessary, although it makes it a bit harder to compile and run on many
>platforms. I'm also game to just using this as a prototype for something
>in pure C or C++.
>
>
>Ted Roth
>
>
>
>On Mon, 1 Oct 2001, Jason Kyle wrote:
>
>:)Hi Ted,
>:)
>:)What kind of simulation speed can you achieve? I imagine using python
>:)wouldn't be all that quick. Whatever is finally included with gdb will
>:)most definitely require as complete on-chip peripheral simulation as
>:)possible as well as the ability to add off-chip devices (e.g. LCD display)
>:)virtually wired to the virtual AVR. Flexability will be the prime
>:)requirement (that includes OS independence), speed secondary but important.
>:)
>:)Anyone else got any thoughts on simulators? Bruce?
>:)
>:)Cheers,
>:)
>:)Jason Kyle
>:)
>:)
>:)_______________________________________________
>:)avr-gcc-list mailing list
>:)[email-masked]
>:)http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>:)
>
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Tue Oct 02 06:18:10 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15o7dp-0006OE-00
for <[email-masked]>; Tue, 02 Oct 2001 06:18:09 +1200
Received: from 199.182.90.196.ras04.den.iras.frii.net (199.182.90.196.ras04.den.iras.frii.net [199.182.90.196])
by deimos.frii.net (8.11.6/8.11.6) with ESMTP id f91IK0i73339
for <[email-masked]>; Mon, 1 Oct 2001 12:20:01 -0600 (MDT)
Date: Mon, 1 Oct 2001 12:20:48 -0600 (MDT)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>
Subject: Re: [avr-gcc-list] simulator
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I can see that python in dos might be difficult. I don't think you can
get the full python to work there.

I'm not afraid of switching it over the C, but pure python code pretty
much just runs as is on many platforms. Whereas most all the C code I've
ever seen needs a lot of #ifdef'ing and minor tweaks to get it to compile
on different systems.

I've uploaded what I have to my website. If you all think it's crap, it
can go away. I've never looked at another sim core before, so my design
could be garbage. I've just kinda been learning as I go.

Here's the URL: http://res099095.halls.colostate.edu/programs/simulavr/

Ted Roth

On Mon, 1 Oct 2001, ChristoGeo wrote:

:)If written in C, it would run in any environment. I still use DOS and
:)Linux. Dos is my majority of my time. I was trying to port one of my 6805
:)simulators into Linux (C), but I have some problems to resolve regarding a
:)crash ;)
:)
:)Chris
:)
:)

From [email-masked] Tue Oct 02 07:39:21 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15o8uO-0006WV-00
for <[email-masked]>; Tue, 02 Oct 2001 07:39:21 +1200
Received: from 199.182.87.251.ras03.den.iras.frii.net (199.182.87.251.ras03.den.iras.frii.net [199.182.87.251])
by deimos.frii.net (8.11.6/8.11.6) with ESMTP id f91JfCi49700
for <[email-masked]>; Mon, 1 Oct 2001 13:41:12 -0600 (MDT)
Date: Mon, 1 Oct 2001 13:42:00 -0600 (MDT)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>
Subject: Re: [avr-gcc-list] simulator
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Ok, I just did a simple test to see how fast my simulator is. I am only
getting about 250 instructions per second. I doubt this would be
acceptable.

I'd only been running very simple short programs before so I didn't really
notice how slow it is. I might be able to speed it up some, but it doesn't
look like it can help much. Looks like it's time for C.

What is the minimum inst/sec that would be satisfactory?

Ted Roth

Here's the asm program I ran through it (2964 inst in 12.28 seconds on my
PPro 180):

.device AT90S8515

.include "8515def.inc"

.cseg
rjmp MAIN ; reset
nop ; int0
nop ; int1
nop ; timer1 capt
nop ; timer1 compa
nop ; timer1 compb
nop ; timer1 ovf
nop ; timer0 ovf
nop ; spi, stc
nop ; uart, rx
nop ; uart, udre
nop ; uart, tx
nop ; ana_comp

MAIN:
;; init stack pointer to 0x025f (the last byte of int sram)
ldi r16, $5f ; low byte of end
of int sram
out SPL, r16
ldi r16, $02 ; high byte of end
of int sram
out SPH, r16

ldi r16, $0f ; initialize outer
loop counter

LOOP1:
cpi r16, $00
breq DONE
dec r16
rcall INNER
rjmp LOOP1

INNER:
ldi r17, $2f ; initialize inner
loop counter

LOOP2:
cpi r17, $00
breq REPEAT
dec r17
rjmp LOOP2
REPEAT:
ret

DONE:
nop

From [email-masked] Tue Oct 02 07:52:09 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15o96m-0006XK-00
for <[email-masked]>; Tue, 02 Oct 2001 07:52:08 +1200
Received: from 199.182.87.251.ras03.den.iras.frii.net (199.182.87.251.ras03.den.iras.frii.net [199.182.87.251])
by deimos.frii.net (8.11.6/8.11.6) with ESMTP id f91Js0i62004;
Mon, 1 Oct 2001 13:54:00 -0600 (MDT)
Date: Mon, 1 Oct 2001 13:54:48 -0600 (MDT)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>
cc: ChristoGeo <[email-masked]>
Subject: Re: [avr-gcc-list] simulator
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Chris,

I'd be interested in seeing some of your code for other cpu cores. I'm
curious how you map the opcodes into function calls and such. I'd like to
get some more ideas in mind head before digging into C code.

It looks like python is _too_ slow. At least the python stuff got me a
prototype to work from (if the design isn't completely stupid) and a good
deal of knowledge about the avr core.

Ted Roth

On Mon, 1 Oct 2001, ChristoGeo wrote:

:)I don't say too much here but I would suggest that any simulator out there
:)be written in C not Python. Only thing worse would be TCL based.
:)
:)I could write the opcodes in C for you if you desire. I write cpu cores
:)all the time in C for pleasure
:)
:)Regards,
:)Chris
:)
:)
:)
:)At 06:49 AM 10/1/2001 +0000, [email-masked] wrote:
:)
:)
:)
:)>Sounds interesting :-)
:)>Too bad I'm not familiar with Python, but I've been
:)>"fooling around" with AVR:s for some time ...
:)>And There's not too many (1--) AVR simulators for Linux ...
:)>Sounds like a good enough reason to pick up Python ...
:)>
:)>Have You got a web-page, or how do You plan to make
:)>the code available ??
:)>
:)>BR : Johan
:)>
:)>BTW : Is 'pyhton' a typo, or am I completely lost ??
:)>
:)>"Theodore A. Roth" <[email-masked]> wrote:
:)>
:)> > Hi,
:)> >
:)> > I've been working on a simluator written in pyhton for the last couple of
:)> > weeks. It's not near done yet, but I can already run programs that don't
:)> > use the IO registers. Right now I'm working on hooks for the virtual
:)> > connections to the IO pins of devices.
:)> >
:)> > I'm not sure if it could be accessed from gdb, but it has been in the back
:)> > of my mind. Right now I'm only using assembly code to test it so as to
:)> > keep the programs simple and be able to understand what's going on.
:)> >
:)> > So far, I've got the basics for the at90s1200, 4414 and 8515 going, but
:)> > I've only been testing with the 8515. It should be easy to add new
:)>devices
:)> > in the feature, since I've been designing it with that in mind.
:)> >
:)> > If anyone's interested, I'd be more than happy to make the code
:)>available.
:)> >
:)> > Ted Roth
:)> > [email-masked]
:)> >
:)> >
:)> > _______________________________________________
:)> > avr-gcc-list mailing list
:)> > [email-masked]
:)> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
:)> >
:)>
:)>
:)>
:)>--
:)>
:)>
:)>
:)>
:)>________________________________________________________________
:)>Ilmainen Internet @ http://www.nic.fi/
:)>
:)>
:)>_______________________________________________
:)>avr-gcc-list mailing list
:)>[email-masked]
:)>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
:)
:)
:)_______________________________________________
:)avr-gcc-list mailing list
:)[email-masked]
:)http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
:)

From [email-masked] Tue Oct 02 08:46:49 2001
Received: from dt083nf7.san.rr.com ([204.210.26.247] helo=mail.lightner.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15o9xg-0006ap-00
for <[email-masked]>; Tue, 02 Oct 2001 08:46:49 +1200
Received: from lightner.net (snert [168.143.116.114])
by mail.lightner.net (8.8.7/8.8.6) with ESMTP id NAA14693;
Mon, 1 Oct 2001 13:48:25 -0700
Message-ID: <[email-masked]>
Date: Mon, 01 Oct 2001 13:44:51 -0700
From: "Bruce D. Lightner" <[email-masked]>
X-Mailer: Mozilla 4.74 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Jason Kyle <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] simulator
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Jason,

> What kind of simulation speed can you achieve? I imagine using python
> wouldn't be all that quick. Whatever is finally included with gdb will
> most definitely require as complete on-chip peripheral simulation as
> possible as well as the ability to add off-chip devices (e.g. LCD display)
> virtually wired to the virtual AVR. Flexability will be the prime
> requirement (that includes OS independence), speed secondary but important.
>
> Anyone else got any thoughts on simulators? Bruce?

As I've told you, my C-based simulator for an AT90S8515 sitting amongst the
PicoWeb hardware is available. It is well debugged and its speed is good,
running above "real time", depending upon your emulated AVR "crystal". I've
benchmarked it at over 4 million instructions per second on a ~700 MHz
Pentium III, both under Linux (gcc) and Windows (MS Visual C++). It's
strictly command-line driven with no GUI of any kind. A "gdb" connection
would make it much more useful.

In my "past life" I was involved with a number of microprocessor IC design
projects, which of course required instruction simulators of various
flavors. We've always found that C-based simulators gave the best speed
while preserving portability. I've learned a number of tricks over the
years that help to keep the speed up. As I've told you, I'm committed to
keeping this AVR simulator one of the fastest in the world! :-)

Despite my best intentions, I've not found enough free time from "real work"
to package up the source code and/or connect it to "gdb". As you know the
simulator emulates the UART (optionally using the PC's serial port) and it
has code for the AVR timers and most of the interrupts. It does not emulate
the SPI port or the watchdog. It also has an option to use a "real" AVR
processor to "proxy" I/O via the PC's parallel port connected to the AVR's
SPI port (i.e., using the PicoWeb's "programming" cable). This runs a lot
slower for all "proxied" I/O instructions due to communication overhead
(i.e., ~10K I/O instructions per second max.), but I've used it to control
the PicoWeb's Realtek Ethernet chip in real time with no problems.

Extending my simulator to support the other AVR instruction sets is pretty
straightforward because the simulator basically uses the opcode tables from
the AVR assembler, after a little post-processing with a Perl script. There
is a short section of C-code for each opcode. Only a handful of new
instructions are needed for the "Mega parts". If connected to "gdb" one
could probably remove a lot of the code that is there now for things like
disassembly and linker symbol table processing.

One of the challanges is to provide for straightforward simulator extensions
for emulation of custom hardware around the AVR processor. In fact, the
current emulator "knows about" and emulates the PicoWeb's Realtek Ethernet
controller chip and its 32Kbyte serial EEPROM chip. This is C-code that is
compiled and linked with the base simulator. A better approach might be to
place this kind of logic in a seperate program and communicate via sockets.
This would allow emulations written on other programming languages (e.g.,
Python, Java, Visual Basic(!), etc.), even running over the network on
different hosts. (There is a "fancy term" for this now, namely
"co-emulation" :-) We had worked out a scheme, including source code, for
the AVR simulator to work this way using TCP/IP sockets, but it got
abandoned early on in the project.

My "free time" is now 100% occupied preparing for a two-week off-road
dunebuggy trip to Baja California starting the second week of October.
Therefore, I'm not going to be able to work on this until near the end of
the month.

Best regards,

Bruce

--
Bruce D. Lightner
La Jolla, California
Email: [email-masked]
URL: http://www.lightner.net/lightner/bruce/

From [email-masked] Tue Oct 02 09:10:21 2001
Received: from mailb.telia.com ([194.22.194.6])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15oAKS-0006cM-00
for <[email-masked]>; Tue, 02 Oct 2001 09:10:21 +1200
Received: from d1o926.telia.com (d1o926.telia.com [213.66.172.241])
by mailb.telia.com (8.11.6/8.11.6) with ESMTP id f91LCBX17119;
Mon, 1 Oct 2001 23:12:11 +0200 (CEST)
Received: from jesper (h169n2fls34o926.telia.com [217.208.35.169])
by d1o926.telia.com (8.10.2/8.10.1) with SMTP id f91LCBA03657;
Mon, 1 Oct 2001 23:12:11 +0200 (CEST)
Message-ID: <001101c14abd$d8c57c60$65656565@jesper>
From: "Jesper Hansen" <[email-masked]>
To: "Theodore A. Roth" <[email-masked]>, <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] simulator
Date: Mon, 1 Oct 2001 23:12:53 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

It's a different CPU, but just for comparison, my Nascom (Z-80) emulator
runs an emulated Z-80 at approx. 60 MHz on my 1.1GHz Athlon, including
the emulation of various hardware ports and 48*16 character screen circuitry
refreshing at about 50 Hz.
I'd guesstimate it would run the AVR instruction set at 10+ MHz.

/Jesper
http://www.myplace.nu/nascom

----- Original Message -----
From: "Theodore A. Roth" <[email-masked]>
To: <[email-masked]>
Sent: Monday, October 01, 2001 9:42 PM
Subject: Re: [avr-gcc-list] simulator

> Ok, I just did a simple test to see how fast my simulator is. I am only
> getting about 250 instructions per second. I doubt this would be
> acceptable.
>
> I'd only been running very simple short programs before so I didn't really
> notice how slow it is. I might be able to speed it up some, but it doesn't
> look like it can help much. Looks like it's time for C.
>
> What is the minimum inst/sec that would be satisfactory?
>
> Ted Roth
>
>
>
> Here's the asm program I ran through it (2964 inst in 12.28 seconds on my
> PPro 180):
>
> .device AT90S8515
>
> .include "8515def.inc"
>
> .cseg
> rjmp MAIN ; reset
> nop ; int0
> nop ; int1
> nop ; timer1 capt
> nop ; timer1 compa
> nop ; timer1 compb
> nop ; timer1 ovf
> nop ; timer0 ovf
> nop ; spi, stc
> nop ; uart, rx
> nop ; uart, udre
> nop ; uart, tx
> nop ; ana_comp
>
> MAIN:
> ;; init stack pointer to 0x025f (the last byte of int sram)
> ldi r16, $5f ; low byte of end
> of int sram
> out SPL, r16
> ldi r16, $02 ; high byte of end
> of int sram
> out SPH, r16
>
> ldi r16, $0f ; initialize outer
> loop counter
>
> LOOP1:
> cpi r16, $00
> breq DONE
> dec r16
> rcall INNER
> rjmp LOOP1
>
> INNER:
> ldi r17, $2f ; initialize inner
> loop counter
>
> LOOP2:
> cpi r17, $00
> breq REPEAT
> dec r17
> rjmp LOOP2
> REPEAT:
> ret
>
> DONE:
> nop
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Tue Oct 02 09:48:27 2001
Received: from [63.239.228.194] (helo=cliff.logicpd.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15oAvL-0006eA-00
for <[email-masked]>; Tue, 02 Oct 2001 09:48:27 +1200
Received: by cliff.logicpd.com with Internet Mail Service (5.5.2650.21)
id <TDGQJP1L>; Mon, 1 Oct 2001 11:04:43 -0500
Message-ID: <[email-masked]>
From: Randy Kleinman <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Date: Mon, 1 Oct 2001 11:04:33 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: text/plain;
charset="iso-8859-1"
Subject: [avr-gcc-list] C Variables in Assembly
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I would like to know if there is a way to use C variables within my inline
assembly. I am pretty new at assembly and I do not quite know all of its
functions. Basically I want to take a value that I have received from the
UART on my ATmega163 and use it to vary a value in my assembly routine. How
do I declare, say a variable, MyVar, for use in assembly?

Thanks,
Randy Kleinman

From [email-masked] Tue Oct 02 10:25:26 2001
Received: from cluster1.tfb.com ([204.212.132.101] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15oBV7-0006gL-00
for <[email-masked]>; Tue, 02 Oct 2001 10:25:25 +1200
Received: from jaz.tfb.com (204-216-234-86.dsl.cust.tfb.com [204.216.234.86])
by cluster1.tfb.com (8.11.0/8.11.0) with ESMTP id f91MRFb27935;
Mon, 1 Oct 2001 15:27:15 -0700
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Mon, 01 Oct 2001 15:29:11 -0700
To: "Theodore A. Roth" <[email-masked]>, <[email-masked]>
From: ChristoGeo <[email-masked]>
Subject: Re: [avr-gcc-list] simulator
In-Reply-To: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi list, basically, I code 8051/6805 as microcode and let the C compiler
(BC 3.1) sort it out. The compiler will take my switch() and make a nice
jump table out of the opcodes.

below is some of a simulator I use for a Custom 8051. It gives you the
general idea. Keep in mind, I update my display after every opcode is
executed. I am going to change my ways though and make a mapping of where
registers live on my drawn screen to only updated 1 register (since most
instructions update 1-2 values max).

My simulator differs from a real cpu core from the fact that I
automatically add the PC with a fixed opcode length from a table. In real
life, the PC is like your X,Y, or Z pointers and is incremented by fetches
or writes to change the contents (I also specialize in real-time AVR based
simulation of 8051 and 6805 ;) ).

I really prefer writing embedded simulators. The AVR is perfect! I use
external SRAM to store my entire code in place. I download new code or
read out code by routines inside the AVR. My average AVR 6805 opcode is
under 10 clks!!!

take care,
Chris

(code is below)

At 01:54 PM 10/1/2001 -0600, Theodore A. Roth wrote:
>Chris,
>
>I'd be interested in seeing some of your code for other cpu cores. I'm
>curious how you map the opcodes into function calls and such. I'd like to
>get some more ideas in mind head before digging into C code.
>
>It looks like python is _too_ slow. At least the python stuff got me a
>prototype to work from (if the design isn't completely stupid) and a good
>deal of knowledge about the avr core.
>
>Ted Roth
>
>On Mon, 1 Oct 2001, ChristoGeo wrote:
>
>:)I don't say too much here but I would suggest that any simulator out there
>:)be written in C not Python. Only thing worse would be TCL based.
>:)
>:)I could write the opcodes in C for you if you desire. I write cpu cores
>:)all the time in C for pleasure
>:)
>:)Regards,
>:)Chris
>:)
>:)
>:)
>:)At 06:49 AM 10/1/2001 +0000, [email-masked] wrote:
>:)
>:)
>:)
>:)>Sounds interesting :-)
>:)>Too bad I'm not familiar with Python, but I've been
>:)>"fooling around" with AVR:s for some time ...
>:)>And There's not too many (1--) AVR simulators for Linux ...
>:)>Sounds like a good enough reason to pick up Python ...
>:)>
>:)>Have You got a web-page, or how do You plan to make
>:)>the code available ??
>:)>
>:)>BR : Johan
>:)>
>:)>BTW : Is 'pyhton' a typo, or am I completely lost ??
>:)>
>:)>"Theodore A. Roth" <[email-masked]> wrote:
>:)>
>:)> > Hi,
>:)> >
>:)> > I've been working on a simluator written in pyhton for the last
>couple of
>:)> > weeks. It's not near done yet, but I can already run programs that don't
>:)> > use the IO registers. Right now I'm working on hooks for the virtual
>:)> > connections to the IO pins of devices.
>:)> >
>:)> > I'm not sure if it could be accessed from gdb, but it has been in
>the back
>:)> > of my mind. Right now I'm only using assembly code to test it so as to
>:)> > keep the programs simple and be able to understand what's going on.
>:)> >
>:)> > So far, I've got the basics for the at90s1200, 4414 and 8515 going, but
>:)> > I've only been testing with the 8515. It should be easy to add new
>:)>devices
>:)> > in the feature, since I've been designing it with that in mind.
>:)> >
>:)> > If anyone's interested, I'd be more than happy to make the code
>:)>available.
>:)> >
>:)> > Ted Roth
>:)> > [email-masked]

// Bits used in SimStat
//
#define _console 0x01 // bit 0
#define _debug 0x02 // bit 1

// Program Status Word Bits
//
#define CY 0x80
#define AC 0x40
#define F0 0x20
#define RS1 0x10
#define RS0 0x08
#define OV 0x04
#define USER 0x02
#define P 0x01

// 0000-7FFF: ROM
// 8000-DFFF: EEPROM

uchar SimStat, // bit 1=debug bit 0=console
SaveStat, // Save of SimStats for interrupts
//
SFR[0xFF],
RAM[0xFF],
//
*R0,*R1,*R2,*R3,
*R4,*R5,*R6,*R7,
//
*SP = &SFR[0x81],
*DPL = &SFR[0x82],
*DPH = &SFR[0x83],
//
*P1 = &SFR[0x90], // P1
*DDR1 = &SFR[0x94], // P1 DDR
//
*XDPH = &SFR[0xB3], // Hi-MovX
*PSW = &SFR[0xD0], // CY AC F0 RS1 RS0 OV - P
*AReg = &SFR[0xE0],
*BReg = &SFR[0xF0];

uint PC = 0x0000, // Program Counter Start Ofs
*DPTR = &SFR[0x82], // 2 bytes wide dpl|dph)
Map; // result of bitmap call

ulong CYCLES= 0L;

int oc1, // Current OpCode fetched by PC
oc2, // operand 1
oc3; // operand 2

FILE *log; // output of core into text file

// =-=-=-=-=-=-=-=-=-=-= //
// Sim Support Functions //
// =-=-=-=-=-=-=-=-=-=-= //

// Our Interrupts for system (turn off console updates, debug
mode, fake send/recv, etc)
//
void Interrupts()
{
uint i;

switch(PC)
{

// case 0x3AE7: SimStat |= _debug; // disassemble 5 lines from PC and
pause on each opcode.. (step through)
// case 0x2fdd:
// Pause();
// break;

case 0x3132: // Algorithm #1 entry point
case 0x3155: // Algorithm #2 entry point
case 0x5532: // ram tests
case 0x4555: // clear ram
case 0x2214: // Calc Checksum
SaveStat = SimStat;
SimStat = 0; // no console, no debug
break;

case 0x3333: // Algorithm #1 exit point
case 0x256E: // ram tests are finished..
case 0x333A: // clear ram
case 0x2222: // Calc Checksum exit

SimStat = SaveStat; // restore sim_state bits
break;

case 0x1239: // CMS Sendbyte
SendByte(*AReg);
oc1 = 0x22; // implant a ret now!
Pause();
break;

// eewrite @dptr from @r0 4 bytes
//
case 0x00BE: gotoxy(1,24);
cprintf("eeburn %04X: %02X %02X %02X %02X",(*DPTR),
RAM[(*R0)],
RAM[(*R0)+1],
RAM[(*R0)+2],
RAM[*(R0)+3]);

for (i=0; i<4; i++)
Core[(*DPTR)++] = RAM[(*R0)++];

(*AReg)=0;
oc1 = 0x22;
Pause();
break;

} // end of switch
}

uint BitMap(uchar Bit)
{
uchar a,
Masks[8]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};

a = (Bit>0x7F) ? (Bit&0xF8) : ((Bit/8)+0x20);
return ((uint)(a<<8) | Masks[(Bit%8)] ); // compress return
}

// this is a function on purpose because some of the controllers I
work with can do wacky things I cant explain here!
//
void AdjPC(uchar arg1)
{
PC += arg1;
}

// wait for a keypress but let the main key-catcher
// process the keystroke.
//
void Pause(void)
{
while (!kbhit())
;
}

void InitRegs(void)
{
uint i;

for (i=0; i<0x100; i++)
RAM[i] = 0;

memset(SFR,0x00,0xFF); // clear all sfr space

PC = 0x0000;
*DPTR = 0x0000; // DPTR = 0000
*SP = 0x07; // SP = 07h

*P1 = 0x01;
PackPtr =0; // for faking recvbyte..
}

// Dumps an array (eeprom,ram,sfr,xram...) to a file..
//
void StoreRegs(uchar *Filename, uchar *Array, uint Length)
{
FILE *out;
uint i;

if ((out = fopen(Filename, "wb"))== NULL)
{
fprintf(stderr, "Cannot open input file.\n");
exit(1);
}

for (i=0; i<Length; i++)
fputc(Array[i], out);
fclose(out);
}

// oc1 = arg1
// oc2 = arg2
//
// PC = ( ((PC+2)&0xF800) | (((oc1&0xE0)<<3) | oc2) );
//
void ajmp(uchar arg1, uchar arg2)
{
PC &= 0xF800;
PC |= ( ((arg1&0xE0)<<3) | arg2);
}

void add(uchar arg1)
{

if ( ((uint)(*AReg + arg1)) > 0xFF)
(*PSW) |= CY; // Set Carry
else
(*PSW) &= ~CY; // Clear Carry

(*AReg) += arg1;
}

void addc(uchar arg1)
{
if ((*PSW)&CY)
arg1++; // add +1

if ( ((uint)(*AReg)+arg1) > 0xFF)
(*PSW) |= CY; // Set Carry
else
(*PSW) &= ~CY; // Clear Carry

(*AReg) += arg1;
}

void subb(uchar arg1)
{
if ((*PSW)&CY)
arg1++; // subtract one more

if (((uint)(*AReg)-arg1) > 0xFF)
*PSW |= CY; // Set Carry
else
*PSW &= ~CY; // Clear Carry
(*AReg) -= arg1;
}

void cjne(uchar arg1, int arg2, int relofs)
{
if (relofs > 0x7F)
relofs |= 0xFF00;

if (arg1 < arg2)
(*PSW) |= CY; // Set Carry
else
(*PSW) &= ~CY; // Clr Carry

if (arg1 != arg2)
PC += relofs;
}

void djnz(uchar *arg1, uint relofs)
{
if (relofs > 0x7F)
relofs |= 0xFF00;

(*arg1)--;

if (*arg1 !=0)
PC += relofs;
}

void push(uchar arg1)
{
(*SP)++;
RAM[(*SP)] = arg1;
}

uchar pop()
{
uchar a;

a = RAM[*SP]; // Pop High Address
(*SP)--;
return(a);
}

void main(int argc, char **argv)
{
uint Address, // Given address for ease of use..
i=0,
X=0;

uchar a, // GP Working Register
ch, // GP for Key Entry
*iptr,
*jptr, // i+j GP Pointers for 85 Opcode
AdjBYTE=0,
AdjBIT=0,
c,xx=0,yy=0;

// directvideo=1;
clrscr();

InitRegs(); // Init Regs to power up values..
// LoadHex("alarm.hex"); // Load Intel-Hex file into core[]
// LoadEEProm(argv[1]); // Load in .BIN of EEProm of choice..

SimStat |= _console;// + _debug; // enable console display

if ((log = fopen("CORE.LOG", "wt"))== NULL)
{
fprintf(stderr, "Cannot open log file.\n");
exit(1);
}

while (ch !=27)
{

R0 = &RAM[(*PSW)&0x18];
R1 = &RAM[((*PSW)&0x18)+1];
R2 = &RAM[((*PSW)&0x18)+2];
R3 = &RAM[((*PSW)&0x18)+3];
R4 = &RAM[((*PSW)&0x18)+4];
R5 = &RAM[((*PSW)&0x18)+5];
R6 = &RAM[((*PSW)&0x18)+6];
R7 = &RAM[((*PSW)&0x18)+7];

// if the display is on, show the current values after each opcode
//
if (SimStat & _console)
{
gotoxy(1,1);
// Internal Ram
//

for (i=0x00; i<0x100; i+=16)
cprintf("%02X: %02X %02X %02X %02X %02X %02X %02X %02X
%02X %02X %02X %02X %02X %02X %02X %02X\n\r",
(i&0xF0),
RAM[i],RAM[i+1],RAM[i+2],RAM[i+3],RAM[i+4],RAM[i+5],RAM[i+6],RAM[i+7],
RAM[i+8],RAM[i+9],RAM[i+10],RAM[i+11],RAM[i+12],RAM[i+13],RAM[i+14],RAM[i+15]);

gotoxy(55,1); cprintf("PC: %04X DPTR: %04X", PC, *DPTR);
gotoxy(55,2); cprintf("X-R0: %04X X-R1: %04X",
((*XDPH)<<8)|(*R0),((*XDPH)<<8)|(*R1));
gotoxy(55,3); cprintf("SP: %02X CLK: %08lu", *SP,CYCLES);
gotoxy(55,4); cprintf("A: %02X B: %02X",*AReg,*BReg);
//
gotoxy(55,6); cprintf("R0: %02X RSEL: %01i", *R0,
((((*PSW)&RS0)|((*PSW)&RS1))>>3));
gotoxy(55,7); cprintf("R1: %02X CY: %01i", *R1, ((*PSW)&CY)>>7);
gotoxy(55,8); cprintf("R2: %02X Z: %01i", *R2, ((*AReg)==0x00));
gotoxy(55,9); cprintf("R3: %02X F0: %01i", *R3, ((*PSW)&F0)>>5);
gotoxy(55,10);cprintf("R4: %02X", *R4);
gotoxy(55,11);cprintf("R5: %02X SS: %02X", *R5, SimStat);
gotoxy(55,12);cprintf("R6: %02X", *R6);
gotoxy(55,13);cprintf("R7: %02X", *R7);

// SimStat &= ~_console; // turn off console now
}

if (SimStat & _debug)
{
c=0;
gotoxy(1,17); c= DisAsm(PC,1); // 1 = show in red..
gotoxy(1,18); c+=DisAsm(PC+c,0);
gotoxy(1,19); c+=DisAsm(PC+c,0);
gotoxy(1,20); c+=DisAsm(PC+c,0);
gotoxy(1,21); c+=DisAsm(PC+c,0);

Pause();
}

if (kbhit())
{
ch=getch();
switch(toupper(ch))
{
// Flip console on/off
//
case 'C': SimStat ^= _console;
break;

// Flip debug on/off!
//
case 'D': SimStat ^= _debug;
break;

// Save eeprom area..
//
case 'S': StoreRegs("CORE.BIN", Core,0x9000);
StoreRegs("EEPROM.BIN", &Core[0x8000], 0x1000);
StoreRegs("RAM.BIN", RAM, 0x100);
StoreRegs("SFR.BIN", &SFR[0x80], 0x80);
break;

} // end of switch(toupper(ch))
} //end of if kbhit()

oc1 = Core[PC];
oc2 = Core[PC+1];
oc3 = Core[PC+2];

Interrupts(); // do interrupts before PC is incremented!
PC += OpTable[oc1].length;

switch(oc1)
{
// NOP
//
case 0x00: break;

case 0x01: // AJMP xx
case 0x21:
case 0x41:
case 0x61:
case 0x81:
case 0xA1:
case 0xC1:
case 0xE1: ajmp(oc1,oc2);
break;

// LJMP 16 Bit Ofs
//
case 0x02: PC = (oc2<<8) | oc3;
break;

// RR A
//
case 0x03: (*AReg) = (((*AReg) >> 1) | ((*AReg) << 7));
break;

// INC A
//
case 0x04: (*AReg)++;
break;

// INC XX
//
case 0x05: if (oc2 > 0x7F) SFR[oc2]++;
else RAM[oc2]++;
break;

case 0x06: RAM[(*R0)]++; break; // inc @r0
case 0x07: RAM[(*R1)]++; break; // inc @r1
case 0x08: (*R0)++; break; // inc r0
case 0x09: (*R1)++; break; // inc r1
case 0x0A: (*R2)++; break; // inc r2
case 0x0B: (*R3)++; break; // inc r3
case 0x0C: (*R4)++; break; // inc r4
case 0x0D: (*R5)++; break; // inc r5
case 0x0E: (*R6)++; break; // inc r6
case 0x0F: (*R7)++; break; // inc r7

// JBC XX, XX
// 10 F7 FD - jbc b.7, $
// sfr's bitmap out exactly,
//
case 0x10: if (oc3 > 0x7F)
oc3 |= 0xFF00;

Map=BitMap(oc2);

if ((Map>>8) < 0x80)
{
if (RAM[(Map>>8)]&(Map&0xFF))
PC += oc3;
RAM[(Map>>8)] &= ~(Map&0xFF);
}
else
{
if (SFR[(Map>>8)]&(Map&0xFF))
PC += oc3;
SFR[(Map>>8)] &= ~(Map&0xFF);
}
break;

case 0x11: // ACALL xx
case 0x31:
case 0x51:
case 0x71:
case 0x91:
case 0xB1:
case 0xD1:
case 0xF1: push((uchar)PC&0xFF);
push((uchar)(PC>>8));
ajmp(oc1,oc2);
break;

// LCALL XX XX
//
case 0x12: push((uchar)PC&0xFF);
push((uchar)(PC>>8));
PC = (oc2<<8) | oc3;
break;

// RRC A
//
case 0x13: if ((*PSW)&CY)
{ // Carry is set prior to shift
if ((*AReg)&1)
(*PSW) |= CY; // Set Carry
else
(*PSW) &= ~CY; // Clear Carry

(*AReg) >>=1;
(*AReg) |=0x80; // Move in CY
}
else
{ // Carry is clr prior to shift
if ((*AReg)&1)
(*PSW) |= CY; // Set Carry
else
(*PSW) &= ~CY; // Clear Carry
(*AReg) >>=1;
(*AReg) &= 0x7F; // Added 17 July 1998
}
break;

// DEC A
//
case 0x14: (*AReg)--;
break;

// DEC XX
//
case 0x15: if (oc2 > 0x7F) SFR[oc2]--;
else RAM[oc2]--;
break;

case 0x16: RAM[(*R0)]--; break; // dec @r0
case 0x17: RAM[(*R1)]--; break; // dec @r1
case 0x18: (*R0)--; break; // dec r0
case 0x19: (*R1)--; break; // dec r1
case 0x1A: (*R2)--; break; // dec r2
case 0x1B: (*R3)--; break; // dec r3
case 0x1C: (*R4)--; break; // dec r4
case 0x1D: (*R5)--; break; // dec r5
case 0x1E: (*R6)--; break; // dec r6
case 0x1F: (*R7)--; break; // dec r7

.....snip.....

case 0x26: add(RAM[(*R0)]); break; // add a, @r0
case 0x27: add(RAM[(*R1)]); break; // add a, @r1
case 0x28: add(*R0); break; // add a, r0
case 0x29: add(*R1); break; // add a, r1
case 0x2A: add(*R2); break; // add a, r2
case 0x2B: add(*R3); break; // add a, r3
case 0x2C: add(*R4); break; // add a, r4
case 0x2D: add(*R5); break; // add a, r5
case 0x2E: add(*R6); break; // add a, r6
case 0x2F: add(*R7); break; // add a, r7

....snip....

case 0xF6: RAM[(*R0)] = (*AReg); break; // mov @r0, a
case 0xF7: RAM[(*R1)] = (*AReg); break; // mov @r1, a
case 0xF8: (*R0) = (*AReg); break; // mov r0, a
case 0xF9: (*R1) = (*AReg); break; // mov r1, a
case 0xFA: (*R2) = (*AReg); break; // mov r2, a
case 0xFB: (*R3) = (*AReg); break; // mov r3, a
case 0xFC: (*R4) = (*AReg); break; // mov r4, a
case 0xFD: (*R5) = (*AReg); break; // mov r5, a
case 0xFE: (*R6) = (*AReg); break; // mov r6, a
case 0xFF: (*R7) = (*AReg); break; // mov r7, a

} // End of switch

CYCLES += OpTable[oc1].cycles;
} //end of while(ch!=27)
fclose(log);
}

From [email-masked] Tue Oct 02 21:05:43 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15oLUl-0007B4-00
for <[email-masked]>; Tue, 02 Oct 2001 21:05:43 +1200
Received: from jpk1.jpk.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id f9296ha00732;
Tue, 2 Oct 2001 21:06:45 +1200
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Tue, 02 Oct 2001 21:06:06 +1200
To: "Bruce D. Lightner" <[email-masked]>
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] simulator
Cc: [email-masked]
In-Reply-To: <[email-masked]>
References: <[email-masked]>
<[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Bruce,

I'm sure the AVR community would be very pleased to have your simulator
modified to suit gdb. Let us know when you're back from the dunebuggy
trip. There's bound to be a few willing helpers out there, can we perhaps
lessen your work load? How easy would it be to split off periperals
etc? Guess we need to sort out a means of interfacing between them and the
simulator. gdb -> sim could be done with a remote gdb session and we
should also look at a remote stub for in-circuit debug (both serial and
SPI, Denis did an SPI one originally).

Cheers,

Jason Kyle

From [email-masked] Fri Oct 05 10:04:24 2001
Received: from mail.gmx.de ([213.165.64.20] helo=mail.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15pGbP-0001P3-00
for <[email-masked]>; Fri, 05 Oct 2001 10:04:23 +1200
Received: (qmail 15889 invoked by uid 0); 4 Oct 2001 22:05:57 -0000
Received: from pd9501c1e.dip.t-dialin.net (HELO gmx.de) (217.80.28.30)
by mail.gmx.net (mp009-rz3) with SMTP; 4 Oct 2001 22:05:57 -0000
Message-ID: <[email-masked]>
Date: Fri, 05 Oct 2001 00:15:56 +0200
From: Karsten Schmidt <[email-masked]>
Reply-To: [email-masked]
Organization: at home
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
CC: Jason Kyle <[email-masked]>, Roland Zitzke <[email-masked]>
Subject: Re: [avr-gcc-list] gdb-5.0 patch + simulator + hardware
References: <[email-masked]>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all;

> gdb4.18 won't work with binutils 2.11.2, you'll need an earlier version
and
> that will mean an earlier gcc as well as there were some register name
> convention changes at some stage.

1.
I'm disagreeing on this. I successful compiled gdb4.18 with binutils
2.11.2 and tested the stuff with avrmon-stk200-0.6.0. (See
http://www.pvv.ntnu.no/~torhr/avrmon-stk200 for this). It work well; ok
it’s slow, but anyway this will get time to think about errors:-)

Just as a remember for me: printer port has to set to ECP.

2.
In order to compile gdb5.0 under Linux witch the supplied patch I'm
running in problems. Doing as described, results in:

updating cache ../config.cache
creating ./config.status
creating Makefile
creating tui/Makefile
creating .gdbinit
creating config.h
linking ./config/i386/xm-linux.h to xm.h
to tm.h./config/avr/tm-avr.h
: File not found: ./config/avr/tm-avr.h
Configure in /usr/local/src/gdb-5.0/gdb failed, exiting

I need some time to figure out what, the problem is. The ^M in the
source-files. Using recode on the patched files solved the problem and gdb
compiles cleanly.

3. Concerning the problem of compiling gdb5.0 another question come up.
Roland has linked opcodes bfd include libiberty
into the binutils directory? Is this also needed? Can somebody explain
this to me?

This handling is also described for gdb4.18
rm -rf opcodes bfd include libiberty

ln -s ../binutils-2.11.2/bfd/ bfd
ln -s ../binutils-2.11.2/include include
ln -s ../binutils-2.11.2/bfd bfd
ln -s ../binutils-2.11.2/opcodes opcodes
ln -s ../binutils-2.11.2/libiberty libiberty

4.
Using avrmon-stk200-0.6.0 together with the newly and cleanly compiled
gdb5.0 and setting the target to “avr-mon” results in the following:

target avr-mon localhost:11111
Remote target avr-mon connected to localhost:11111
monitor_supply_register (0): bad value from monitor: 00 r1 =00 r2
=ff
r3 =ff r4 =ff r5 =ff r6 =ff r7 =ff
r8 =df r9 =ff r10=ff r11=ff r12=ff r13=77 r14=ff
r15=ff
r16=ff r17=48 r18=00 r19=ff r20=ff r21=ff r22=ff
r23=ff
r24=00 r25=00 r26=ad r27=00 r28=00 r29=02 r30=2a
r31=00
X=00ad Y=0200 Z=002a
SREG=02 C=0 Z=1 N=0 V=0 S=0 H=0 T=0 I=0
PC=000a2 SP=025c
db>.
(gdb)

To be honest, I haven’t a clue what this means.

5.
A simulator would be nice. Some times ago I posted a link from a
university
in Germany, where a simulator can be found.
This simulator can handle LCD and I2C.
Here the link for the page:
http://www-ivs.cs.uni-magdeburg.de/bs/lehre/wise0001/es/seminare.shtml
http://www-ivs.cs.uni-magdeburg.de/bs/lehre/wise0001/es/download/avrsim.tar.gz

English page can be found here:
http://wwwivs.cs.uni-magdeburg.de/~gal/avr-manual.html

Kind regards

Karsten Schmidt

From [email-masked] Fri Oct 05 17:50:51 2001
Received: from 208-58-86-11.c3-0.sfo-ubr1.sfrn-sfo.ca.cable.rcn.com ([208.58.86.11] helo=micron.home.246gt.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15pNso-0001gb-00
for <[email-masked]>; Fri, 05 Oct 2001 17:50:50 +1200
Received: (from ken@localhost)
by micron.home.246gt.com (8.11.3/8.11.3) id f955qm700751
for [email-masked]; Thu, 4 Oct 2001 22:52:48 -0700 (PDT)
X-Authentication-Warning: micron.home.246gt.com: ken set sender to [email-masked] using -f
Date: Thu, 4 Oct 2001 22:52:47 -0700
From: [email-masked]
To: [email-masked]
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="huq684BweRXVnRxX"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Fri, Oct 05, 2001 at 12:01:08PM +1200
Subject: [avr-gcc-list] atmega163/avrmega163 support missing?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--huq684BweRXVnRxX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

i am trying to get gcc/binutils going for a mega163 target. i have binutils=
2.11.2 and gcc 3.0.1 from gnu's site.

i'm starting off by attempting to build some very simple sample code, just =
to make sure that i have everything set up correctly, but it is failing.

in particular, this dies:
avr-ld -o test test.o -m avrmega163

it complains that=20
avr-ld: unrecognised emulation mode: avrmega163
Supported emulations: avr85xx avr1200 avr23xx avr44x4 avr4433 avrmega603 a=
vrmega103 avrmega161

huh? i thought this was a supported part, but avr-ld pretty explicitly doe=
sn't:

% avr-ld --version
GNU ld 2.11.2
Copyright 2001 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
Supported emulations:
avr85xx
avr1200
avr23xx
avr44x4
avr4433
avrmega603
avrmega103
avrmega161

baffled, i found on the net, a binutils patch from last year that seemed to=
add support for the ATmega163 to as and bfs, and it looks like the current=
binutils-2.11.2 from june 2001 has these changes integrated. but there is =
no mention of avrmega163, which i guess is what ld would want, just ATmega1=
63 for avr-as.

weirder still, libc seems to support this part (iom163.h). i'd imagine that=
it must have been built with an avr-as and avr-ld which did also (maybe i =
shouldn't assume that?). i also tried -matmega163. no dice.=20

i grepped through the binutils-2.11.2 source tree, and found a reference to=
ATmega163 in bfd/cpu-avr.c, and in gas/config/tc-avr.c. but nothing in ld=
. sure enough, the avr-as has no trouble with an ".arch atmega163" in the s=
ource code. but avr-ld isn't so happy.

in any case, this died also:
avr-ld -o test test.o -m ATmega163

i then got the latest weekly snapshot of binutils... same problem. i'm obvi=
ously missing some bit of information. at this point, my only guess is that=
i have to use "-mavrmegaXXX or -mavr85xx" with avr-ld in order to link cor=
rectly for atmega163, but i'm not sure which to use.

sorry for the dumb question, folks, but: how should i link a file to make a=
n "avrmega163" binary?

thanks!

-ken

--huq684BweRXVnRxX
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (NetBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE7vUqse8HF+6xeOIcRAiTeAJ9i1AUErngSvBONRNT+d+Au/eKRSgCgr6UK
A6RvJUBWL6ErFPSTE4UEjAM=
=q52+
-----END PGP SIGNATURE-----

--huq684BweRXVnRxX--

From [email-masked] Sat Oct 06 01:01:45 2001
Received: from gateway.coinco.com ([209.144.41.178] helo=exchange_ca.CoinCo.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15pUbp-0001y5-00
for <[email-masked]>; Sat, 06 Oct 2001 01:01:45 +1200
Received: by exchange_ca.coinco.com with Internet Mail Service (5.5.2653.19)
id <42ZGTMXK>; Fri, 5 Oct 2001 08:04:49 -0500
Message-ID: <[email-masked]>
From: Bart McCoard <[email-masked]>
To: [email-masked]
Subject: RE: [avr-gcc-list] simulator
Date: Fri, 5 Oct 2001 08:04:49 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C14D9E.50894730"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C14D9E.50894730
Content-Type: text/plain;
charset="iso-8859-1"

When simulating the avr from code written in C the simulators / emulators
can associate the source with the asm when stepping through the code. Is
this information located in the ELF file? Does anyone know how to do this
or where info could be found?

Thanks,
Bart

------_=_NextPart_001_01C14D9E.50894730
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: [avr-gcc-list] simulator</TITLE>
</HEAD>
<BODY>
<BR>

<P><FONT SIZE=3D2>When simulating the avr from code written in C the =
simulators / emulators can associate the source with the asm when =
stepping through the code.&nbsp; Is this information located in the ELF =
file?&nbsp; Does anyone know how to do this or where info could be =
found?</FONT></P>

<P><FONT SIZE=3D2>Thanks,</FONT>
<BR><FONT SIZE=3D2>Bart</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C14D9E.50894730--

From [email-masked] Sat Oct 06 01:51:40 2001
Received: from for.spb.ru ([195.201.69.16] helo=cyclone.eis.ru)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15pVNo-00020I-00
for <[email-masked]>; Sat, 06 Oct 2001 01:51:25 +1200
Received: (qmail 45455 invoked from network); 5 Oct 2001 14:01:15 -0000
Received: from good.for.spb.ru (HELO eis.ru) (195.201.69.80)
by for.spb.ru with SMTP; 5 Oct 2001 14:01:15 -0000
Date: Fri, 5 Oct 2001 17:51:48 +0400
From: Dmitry <[email-masked]>
To: [email-masked]
Message-Id: <[email-masked]>
Organization: eis.ru
X-Mailer: Sylpheed version 0.5.3 (GTK+ 1.2.8; i386-unknown-freebsd5.0)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] memory allocation
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi fellows,

Is it possible to tell the compiler to allocate some variables, which are below 100 bytes length at the top of SRAM?

Thanks in advance,
Dmitry.

P.S. please reply on [email-masked] cause I am not subscribed to the list.

*********************************************************************
("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ
`6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys
(_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44
_..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia
(il),-'' (li),' ((!.-' +7 (812) 3148860, 5585314
*********************************************************************

From [email-masked] Sat Oct 06 10:05:16 2001
Received: from verden.pvv.ntnu.no ([129.241.210.224])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15pd5n-0002Mt-00
for <[email-masked]>; Sat, 06 Oct 2001 10:05:15 +1200
Received: (qmail 71454 invoked by uid 21029); 5 Oct 2001 22:07:23 -0000
Message-ID: <[email-masked]>
From: [email-masked]
Subject: Re: [avr-gcc-list] gdb-5.0 patch + simulator + hardware
In-Reply-To: <[email-masked]> from Karsten Schmidt at "Oct 5, 2001
00:15:56 am"
To: [email-masked]
Date: Sat, 6 Oct 2001 00:07:23 +0200 (CEST)
Reply-To: [email-masked]
X-Mailer: ELM [version 2.4ME+ PL72 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Karsten Schmidt wrote:

> > gdb4.18 won't work with binutils 2.11.2, you'll need an earlier
> > version and that will mean an earlier gcc as well as there were
> > some register name convention changes at some stage.

> I'm disagreeing on this. I successful compiled gdb4.18 with binutils
> 2.11.2 and tested the stuff with avrmon-stk200-0.6.0. (See
> http://www.pvv.ntnu.no/~torhr/avrmon-stk200 for this).

Please don't take my word for a fact when it comes to claiming
portability between gdb-4.18 and binutils-2.11.2 / gcc-3.0. I simply
used the latest version available for each tool at a certain time.

When that's said, I can confirm that the configuration seems to work
pretty well most of the time. I have seen one problem, however, that I
can't remember were there before; trying to dump a call stack trace
seem to get the debugger stuck in some endless loop.

> ok it's slow,

Yup. The communication protocol isn't exactly optimised for
speed. It's very robust, though. I don't think I've ever managed to
make it break down, even when I use the same pins both for debugger
communication and doing real work at the same time.

> Using avrmon-stk200-0.6.0 together with the newly and cleanly
> compiled gdb5.0 and setting the target to avr-mon results in the
> following:
>
> [...]

I guess I'll have to look into that as soon as get gdb-5.0 up and
running.

- Tor Ringstad -

From [email-masked] Sat Oct 06 19:37:36 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15pm1f-0004oe-00
for <[email-masked]>; Sat, 06 Oct 2001 19:37:35 +1200
Received: from jpk1.jpk.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id f967dsN17439
for <[email-masked]>; Sat, 6 Oct 2001 19:39:54 +1200
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Sat, 06 Oct 2001 19:39:16 +1200
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] gdb-5.0 patch + simulator + hardware
In-Reply-To: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi everyone, some answers to Karsten's questions

2.
>I need some time to figure out what, the problem is. The ^M in the
>source-files. Using recode on the patched files solved the problem and gdb
>compiles cleanly.

Sorry about that, didn't spot the obvious windoze CR's in there - probably
because vi under cygwin doesn't show them. Patch 0.1 has the CR's removed.

>3. Concerning the problem of compiling gdb5.0 another question come up.
>Roland has linked opcodes bfd include libiberty
>into the binutils directory? Is this also needed? Can somebody explain
>this to me?

gdb5.0 before patching has almost all the avr related files from bfd
opcodes libiberty directories, I have included the only missing one (
/include/opcode/avr.h) in the patch file so there is no need to do the
symbolic links into your binutils build anymore. Just patch gdb-5.0 and build.

>4.
>Using avrmon-stk200-0.6.0 together with the newly and cleanly compiled
>gdb5.0 and setting the target to "avr-mon" results in the following:
>
>target avr-mon localhost:11111
>Remote target avr-mon connected to localhost:11111
>monitor_supply_register (0): bad value from monitor: 00 r1 =00 r2
>=ff
>r3 =ff r4 =ff r5 =ff r6 =ff r7 =ff
>r8 =df r9 =ff r10=ff r11=ff r12=ff r13=77 r14=ff
>r15=ff
>r16=ff r17=48 r18=00 r19=ff r20=ff r21=ff r22=ff
>r23=ff
>r24=00 r25=00 r26=ad r27=00 r28=00 r29=02 r30=2a
>r31=00
>X=00ad Y=0200 Z=002a
>SREG=02 C=0 Z=1 N=0 V=0 S=0 H=0 T=0 I=0
>PC=000a2 SP=025c
>db>.
>(gdb)
>
>To be honest, I haven't a clue what this means.

Pass, next question :) I'm going to try and use a serial port debugging
interface as an alternative to the SPI port one Denis originally used.

>5.
>A simulator would be nice. Some times ago I posted a link from a
>university
>in Germany, where a simulator can be found.

I'm going to find time to look at it soon, the author would need to consent
to it being added to the gnu project if it was to be an official part of gdb.

Cheers,

Jason Kyle

From [email-masked] Sat Oct 06 19:42:58 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15pm6s-0004pI-00
for <[email-masked]>; Sat, 06 Oct 2001 19:42:58 +1200
Received: from jpk1.jpk.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id f967jHN18444
for <[email-masked]>; Sat, 6 Oct 2001 19:45:17 +1200
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Sat, 06 Oct 2001 19:44:40 +1200
To: [email-masked]
From: Jason Kyle <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: [avr-gcc-list] gdb-5.0 patch-0.1
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

Fixed minor problem with gdb-patch-0.0 that was causing build problems with
non-cygwin environment, gdb-5.0-avr-patch-0.1 is now available.

http://avr.jpk.co.nz/gdb-5.0-avr-patch-0.1.gz
ftp://avr.jpk.co.nz/pub/gdb/gdb-5.0-avr-patch-0.1.gz

NB There is no need to provide symbolic links to your binutils build as was
the case with the gdb-4.18 patch.

Cheers,

Jason Kyle

From [email-masked] Sat Oct 06 22:12:50 2001
Received: from merkur.hrz.tu-freiberg.de ([139.20.64.28])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15poRt-0004vl-00
for <[email-masked]>; Sat, 06 Oct 2001 22:12:49 +1200
Received: from there (cobain.exphys.tu-freiberg.de [139.20.13.66])
by merkur.hrz.tu-freiberg.de (8.11.6/8.11.6) with SMTP id f96AFu156269
for <[email-masked]>; Sat, 6 Oct 2001 12:15:56 +0200 (CEST)
(envelope-from [email-masked])
Message-Id: <[email-masked]>
Content-Type: text/plain;
charset="iso-8859-1"
From: Torsten Hahn <[email-masked]>
To: [email-masked]
Date: Sat, 6 Oct 2001 12:23:59 +0200
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [avr-gcc-list] can not build gcc3.0.1
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

at the moment i am starting do develop for the stk200. I want to use the gcc
compiler for this but i can not get it build.

I use a Suse Linux 7.1, i downloaded the sources for gcc3.0.1 and binutils
2.11.2.

First i installed trhe binutils with:

./configure --target=avr
make
make install

that works fine

than i tried the same with the gcc:

./configure --target=avr
make

and there after a long time of compiling i got a strange error saying:

checking whether the C compiler (/usr/local/avr-gcc/tmp/gcc-3.0.1/gcc/xgcc
-B/usr/local/avr-gcc/tmp/gcc-3.0.1/gcc/ -B/usr/local/avr/bin/
-B/usr/local/avr/lib/ -isystem /usr/local/avr/include -O2 ) works... no
configure: error: installation or configuration problem: C compiler cannot
create executables.
make: *** [configure-target-libiberty] Error 1

Can somebody help ?

Greetings,
Torsten.
--
Torsten Hahn / Chemnitzer Str. 4 / 09599 Freiberg / Germany
mail: [email-masked]
phone: (+49) 177 2181338
pgp key avaiable at: http://math-www.uni-paderborn.de/pgpnet/wwwkeys.html

From [email-masked] Sun Oct 07 08:28:40 2001
Received: from cluster2.tfb.com ([204.212.132.102] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15px7n-0006uT-00
for <[email-masked]>; Sun, 07 Oct 2001 08:28:39 +1300
Received: from jaz.tfb.com (204-216-234-86.dsl.cust.tfb.com [204.216.234.86])
by cluster2.tfb.com (8.11.0/8.11.0) with ESMTP id f96JUq901631
for <[email-masked]>; Sat, 6 Oct 2001 12:30:52 -0700
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Sat, 06 Oct 2001 12:32:48 -0700
To: [email-masked]
From: ChristoGeo <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: [avr-gcc-list] programming your atmels under linux?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Does anyone have source code to demonstrate using the parallel port under
Linux? Also, serial port code would be nice.

I normally use the parallel port in EPP mode to up/down byte-wide packets
to devices I build. Also, I use the serial port. The problem is I need
direct access to the ports and not the /dev/xxx type access.

Any direction, example, or help is greatly appriciated!
Also, if anyone knows how to properly check if a keystroke was pressed in C
for Linux would be kewl too!

Regards,
Chris

From [email-masked] Sun Oct 07 09:26:44 2001
Received: from europa.your-site.com ([140.186.45.14] helo=bottle-rocket.org)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15py1z-0006x0-00
for <[email-masked]>; Sun, 07 Oct 2001 09:26:44 +1300
Received: from face ([64.10.157.17]) by bottle-rocket.org ; Sat, 06 Oct 2001 16:28:50 -0400
Date: Sat, 6 Oct 2001 16:32:05 -0400
From: Aaron <[email-masked]>
To: [email-masked]
Cc: ChristoGeo <[email-masked]>
Subject: Re: [avr-gcc-list] programming your atmels under linux?
Message-Id: <[email-masked]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
X-Mailer: Sylpheed version 0.6.2 (GTK+ 1.2.10; i586-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Access directly to the parallel port under linux is only possible if you are part of the kernel... ie- you need to patch into the kernel to pull that off... ouch.

Why not take a look at this package:

http://www.circlemud.org/~jelson/software/parapin/

It shows both methods of accessing the parallel port, user space and kernel space. Even if you decide not to use this package, it will at least get you started in the right direction.

Aaron

On Sat, 06 Oct 2001 12:32:48 -0700 ChristoGeo wrote:

> Does anyone have source code to demonstrate using the parallel port under
> Linux? Also, serial port code would be nice.
>
> I normally use the parallel port in EPP mode to up/down byte-wide packets
> to devices I build. Also, I use the serial port. The problem is I need
> direct access to the ports and not the /dev/xxx type access.
>
> Any direction, example, or help is greatly appriciated!
> Also, if anyone knows how to properly check if a keystroke was pressed in C
> for Linux would be kewl too!
>
> Regards,
> Chris
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Sun Oct 07 09:41:09 2001
Received: from cluster1.tfb.com ([204.212.132.101] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15pyFw-0006y1-00
for <[email-masked]>; Sun, 07 Oct 2001 09:41:08 +1300
Received: from jaz.tfb.com (204-216-234-86.dsl.cust.tfb.com [204.216.234.86])
by cluster1.tfb.com (8.11.0/8.11.0) with ESMTP id f96KhKb12770;
Sat, 6 Oct 2001 13:43:21 -0700
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Sat, 06 Oct 2001 13:45:16 -0700
To: Aaron <[email-masked]>, [email-masked]
From: ChristoGeo <[email-masked]>
Subject: Re: [avr-gcc-list] programming your atmels under linux?
In-Reply-To: <[email-masked]>
References: <[email-masked]>
<[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

What about via io_perm, etc..?? Does anyone have any open-source AVR
programming source code in C?

Chris

At 04:32 PM 10/6/2001 -0400, Aaron wrote:
>Access directly to the parallel port under linux is only possible if you
>are part of the kernel... ie- you need to patch into the kernel to pull
>that off... ouch.
>
>Why not take a look at this package:
>
>http://www.circlemud.org/~jelson/software/parapin/
>
>It shows both methods of accessing the parallel port, user space and
>kernel space. Even if you decide not to use this package, it will at least
>get you started in the right direction.
>
>Aaron
>
>
>
>On Sat, 06 Oct 2001 12:32:48 -0700 ChristoGeo wrote:
>
> > Does anyone have source code to demonstrate using the parallel port under
> > Linux? Also, serial port code would be nice.
> >
> > I normally use the parallel port in EPP mode to up/down byte-wide packets
> > to devices I build. Also, I use the serial port. The problem is I need
> > direct access to the ports and not the /dev/xxx type access.
> >
> > Any direction, example, or help is greatly appriciated!
> > Also, if anyone knows how to properly check if a keystroke was pressed
> in C
> > for Linux would be kewl too!
> >
> > Regards,
> > Chris
> >
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > [email-masked]
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Sun Oct 07 09:46:20 2001
Received: from sproxy.gmx.de ([213.165.64.20] helo=mail.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15pyKx-0006yY-00
for <[email-masked]>; Sun, 07 Oct 2001 09:46:19 +1300
Received: (qmail 18175 invoked by uid 0); 6 Oct 2001 20:48:01 -0000
Received: from b4f48.pppool.de (HELO there) (213.7.79.72)
by mail.gmx.net (mp002-rz3) with SMTP; 6 Oct 2001 20:48:01 -0000
Content-Type: text/plain;
charset="iso-8859-1"
From: Torsten Hahn <[email-masked]>
To: [email-masked]
Date: Sat, 6 Oct 2001 22:46:29 +0200
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Message-Id: <[email-masked]>
Subject: [avr-gcc-list] start help
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

today i got the avr-gcc and some other tools working. Has somebody a little
nice test example? What i need would be a simple Makefile and a kind of
"Hello World" applikation in c for starting.
I tried to get the examples from http://8bit.at/avr to run under linux, but
this fails. I seems like the makefiles for this examples do not work under
linux.

Thx for help.
Torsten.
--
Torsten Hahn / Chemnitzer Str. 4 / 09599 Freiberg / Germany
mail: [email-masked]
phone: (+49) 177 2181338
pgp key avaiable at: http://math-www.uni-paderborn.de/pgpnet/wwwkeys.html

From [email-masked] Sun Oct 07 09:50:06 2001
Received: from europa.your-site.com ([140.186.45.14] helo=bottle-rocket.org)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15pyOb-0006z8-00
for <[email-masked]>; Sun, 07 Oct 2001 09:50:05 +1300
Received: from face ([64.10.157.17]) by bottle-rocket.org ; Sat, 06 Oct 2001 16:52:19 -0400
Date: Sat, 6 Oct 2001 16:55:34 -0400
From: Aaron <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] programming your atmels under linux?
Message-Id: <[email-masked]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
<[email-masked]>
<[email-masked]>
X-Mailer: Sylpheed version 0.6.2 (GTK+ 1.2.10; i586-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Check out freshmeat.net They have at least two packages with source for programming AVRs.

Aaron

On Sat, 06 Oct 2001 13:45:16 -0700 ChristoGeo wrote:

> What about via io_perm, etc..?? Does anyone have any open-source AVR
> programming source code in C?
>
> Chris
>
>
> At 04:32 PM 10/6/2001 -0400, Aaron wrote:
> >Access directly to the parallel port under linux is only possible if you
> >are part of the kernel... ie- you need to patch into the kernel to pull
> >that off... ouch.
> >
> >Why not take a look at this package:
> >
> >http://www.circlemud.org/~jelson/software/parapin/
> >
> >It shows both methods of accessing the parallel port, user space and
> >kernel space. Even if you decide not to use this package, it will at least
> >get you started in the right direction.
> >
> >Aaron
> >
> >
> >
> >On Sat, 06 Oct 2001 12:32:48 -0700 ChristoGeo wrote:
> >
> > > Does anyone have source code to demonstrate using the parallel port under
> > > Linux? Also, serial port code would be nice.
> > >
> > > I normally use the parallel port in EPP mode to up/down byte-wide packets
> > > to devices I build. Also, I use the serial port. The problem is I need
> > > direct access to the ports and not the /dev/xxx type access.
> > >
> > > Any direction, example, or help is greatly appriciated!
> > > Also, if anyone knows how to properly check if a keystroke was pressed
> > in C
> > > for Linux would be kewl too!
> > >
> > > Regards,
> > > Chris
> > >
> > >
> > > _______________________________________________
> > > avr-gcc-list mailing list
> > > [email-masked]
> > > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Sun Oct 07 10:31:06 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15pz2H-000716-00
for <[email-masked]>; Sun, 07 Oct 2001 10:31:06 +1300
Received: from jpk1.jpk.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id f96LXNN07331
for <[email-masked]>; Sun, 7 Oct 2001 10:33:23 +1300
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Sun, 07 Oct 2001 10:32:50 +1300
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] programming your atmels under linux?
In-Reply-To: <[email-masked]>
References: <[email-masked]>
<[email-masked]>
<[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

At 13:45 6/10/2001 -0700, ChristoGeo wrote:
>What about via io_perm, etc..?? Does anyone have any open-source AVR
>programming source code in C?
>
>Chris

*The* programming software you are looking for is uisp, covers pretty much
all methods of programming AVR's in the one package.

http://www.amelek.gda.pl/avr/

Cheers,

Jason Kyle

From [email-masked] Sun Oct 07 23:58:19 2001
Received: from mail.gmx.net ([213.165.64.20])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15qBdS-0007XD-00
for <[email-masked]>; Sun, 07 Oct 2001 23:58:18 +1300
Received: (qmail 12192 invoked by uid 0); 7 Oct 2001 11:00:03 -0000
Received: from a4f2a.pppool.de (HELO there) (213.6.79.42)
by mail.gmx.net (mp001-rz3) with SMTP; 7 Oct 2001 11:00:03 -0000
Content-Type: text/plain;
charset="iso-8859-1"
From: Torsten Hahn <[email-masked]>
To: [email-masked]
Date: Sun, 7 Oct 2001 13:01:40 +0200
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Message-Id: <[email-masked]>
Subject: [avr-gcc-list] Problem with avr-libc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

if i trie to compile a pice of code like this

--
#include <io-avr.h>
#include <interrupt.h>
#include <sig-avr.h>

#define LED 7;

SIGNAL (SIG_INTERRUPT0)
{
loop_until_bit_is_set(PORTB,LED);
}
--

i get always an error Message meaning:

avr-gcc -O3 -I/usr/local/avr/include -mmcu=at90s8535 ledon.c -o ledon.o
ledon.c: In function `_interrupt0_':
ledon.c:24: parse error before ';' token

This happens also, if i try any other Macro defined in iomacros.h from the
avr-libc distribution.

Any Ideas whats going wrong ?

Torsten.
--
Torsten Hahn / Chemnitzer Str. 4 / 09599 Freiberg / Germany
mail: [email-masked]
phone: (+49) 177 2181338
pgp key avaiable at: http://math-www.uni-paderborn.de/pgpnet/wwwkeys.html

From [email-masked] Mon Oct 08 00:12:36 2001
Received: from viefep11-int.chello.at ([213.46.255.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15qBrF-0007YE-00
for <[email-masked]>; Mon, 08 Oct 2001 00:12:34 +1300
Received: from gmx.at ([62.178.92.247]) by viefep11-int.chello.at
(InterMail vM.5.01.03.06 201-253-122-118-106-20010523) with ESMTP
id <[email-masked]>;
Sun, 7 Oct 2001 13:14:14 +0200
Message-ID: <[email-masked]>
Date: Sun, 07 Oct 2001 13:14:15 +0200
From: Christoph Plattner <[email-masked]>
Organization: private
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.6 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Torsten Hahn <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] Problem with avr-libc
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

A very simple typo !!!

#define LED 7

*not*

#define LED 7;

The ';' is wrong !!!!

With friendly regards
Christoph P.

Torsten Hahn wrote:
>
> Hi,
>
> if i trie to compile a pice of code like this
>
> --
> #include <io-avr.h>
> #include <interrupt.h>
> #include <sig-avr.h>
>
> #define LED 7;
>
> SIGNAL (SIG_INTERRUPT0)
> {
> loop_until_bit_is_set(PORTB,LED);
> }
> --
>
> i get always an error Message meaning:
>
> avr-gcc -O3 -I/usr/local/avr/include -mmcu=at90s8535 ledon.c -o ledon.o
> ledon.c: In function `_interrupt0_':
> ledon.c:24: parse error before ';' token
>
> This happens also, if i try any other Macro defined in iomacros.h from the
> avr-libc distribution.
>
> Any Ideas whats going wrong ?
>
> Torsten.
> --
> Torsten Hahn / Chemnitzer Str. 4 / 09599 Freiberg / Germany
> mail: [email-masked]
> phone: (+49) 177 2181338
> pgp key avaiable at: http://math-www.uni-paderborn.de/pgpnet/wwwkeys.html
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
-------------------------------------------------------
private: [email-masked]
company: [email-masked]

From [email-masked] Mon Oct 08 10:32:59 2001
Received: from hertz.ikp.physik.tu-darmstadt.de ([130.83.24.91])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15qLXd-000827-00
for <[email-masked]>; Mon, 08 Oct 2001 10:32:58 +1300
Received: (from bon@localhost)
by hertz.ikp.physik.tu-darmstadt.de (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) id f97LZ5009016;
Sun, 7 Oct 2001 23:35:05 +0200
X-Authentication-Warning: hertz.ikp.physik.tu-darmstadt.de: bon set sender to [email-masked] using -f
From: Uwe Bonnes <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <[email-masked]>
Date: Sun, 7 Oct 2001 23:35:05 +0200
To: ChristoGeo <[email-masked]>
Cc: Aaron <[email-masked]>, [email-masked]
Subject: Re: [avr-gcc-list] programming your atmels under linux?
In-Reply-To: <[email-masked]>
References: <[email-masked]>
<[email-masked]>
X-Mailer: VM 6.90 under Emacs 20.7.1
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>>>>> "ChristoGeo" == ChristoGeo <[email-masked]> writes:

ChristoGeo> What about via io_perm, etc..?? Does anyone have any
ChristoGeo> open-source AVR programming source code in C?

ppdev allows access to the parallel port as a user with appropriate rights
for that device
--
Uwe Bonnes [email-masked]

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

From [email-masked] Mon Oct 08 14:55:20 2001
Received: from dns.ep.tsinghua.edu.cn ([166.111.32.2] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15qPdW-0008Ek-00
for <[email-masked]>; Mon, 08 Oct 2001 14:55:18 +1300
Received: from xuet ([166.111.32.166])
by dns.ep.tsinghua.edu.cn (8.11.0/8.11.0) with SMTP id f9820nw24784
for <[email-masked]>; Mon, 8 Oct 2001 10:00:49 +0800
Message-ID: <002a01c14f9c$38018240$a6206fa6@xuet>
From: "xuet" <[email-masked]>
To: <[email-masked]>
Date: Mon, 8 Oct 2001 09:54:51 +0800
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0027_01C14FDF.45EAC680"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.3825.400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.3825.400
Subject: [avr-gcc-list] help on ucos porting to AVR
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_0027_01C14FDF.45EAC680
Content-Type: text/plain;
charset="gb2312"
Content-Transfer-Encoding: base64

SGksZXZlcnkgb25lOg0KICAgSSBkb3dubG9hZCB0aGUgdWNvcyBmb3IgQVZSIEplc3BlcidzIHdl
YiBzaXRlLkJ1dCB3aGVuIEkgY29tcGlsZSB0aGVtLlRoZSBnY2MgYWx3YXlzIHRlbGwgbWUgdGhh
dCAuLlxhdnJcbGliXHNyY1xnY3RybC5zIGhhdmUgZXJyb3IuU29tZSBvbmUga25vdyBpdD8NCiAg
IEhlbHAgcGxlYXNlLg0KICAgVGhhbmtzLg0KDQpCZXN0IHJlZ2FyZHMsDQpYdWUNCg==

------=_NextPart_000_0027_01C14FDF.45EAC680
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: base64

PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv
L0VOIj4NCjxIVE1MPjxIRUFEPg0KPE1FVEEgaHR0cC1lcXVpdj1Db250ZW50LVR5cGUgY29udGVu
dD0idGV4dC9odG1sOyBjaGFyc2V0PWdiMjMxMiI+DQo8TUVUQSBjb250ZW50PSJNU0hUTUwgNS41
MC4zODI1LjEzMDAiIG5hbWU9R0VORVJBVE9SPg0KPFNUWUxFPjwvU1RZTEU+DQo8L0hFQUQ+DQo8
Qk9EWSBiZ0NvbG9yPSNmZmZmZmY+DQo8RElWPjxGT05UIHNpemU9Mj5IaSxldmVyeSBvbmU6PC9G
T05UPjwvRElWPg0KPERJVj48Rk9OVCBzaXplPTI+Jm5ic3A7Jm5ic3A7IEkgZG93bmxvYWQgdGhl
IHVjb3MgZm9yIEFWUiBKZXNwZXIncyB3ZWIgc2l0ZS5CdXQgDQp3aGVuIEkgY29tcGlsZSB0aGVt
LlRoZSBnY2MgYWx3YXlzIHRlbGwgbWUgdGhhdCAuLlxhdnJcbGliXHNyY1xnY3RybC5zIGhhdmUg
DQplcnJvci5Tb21lIG9uZSBrbm93IGl0PzwvRk9OVD48L0RJVj4NCjxESVY+PEZPTlQgc2l6ZT0y
PiZuYnNwOyZuYnNwOyBIZWxwIHBsZWFzZS48L0ZPTlQ+PC9ESVY+DQo8RElWPjxGT05UIHNpemU9
Mj4mbmJzcDsmbmJzcDsgVGhhbmtzLjwvRk9OVD48L0RJVj4NCjxESVY+PEZPTlQgc2l6ZT0yPjwv
Rk9OVD4mbmJzcDs8L0RJVj4NCjxESVY+PEZPTlQgc2l6ZT0yPkJlc3QgcmVnYXJkcyw8L0ZPTlQ+
PC9ESVY+DQo8RElWPjxGT05UIHNpemU9Mj5YdWU8L0ZPTlQ+PC9ESVY+PC9CT0RZPjwvSFRNTD4N
Cg==

------=_NextPart_000_0027_01C14FDF.45EAC680--

From [email-masked] Mon Oct 08 22:40:19 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15qWtU-000073-00
for <[email-masked]>; Mon, 08 Oct 2001 22:40:17 +1300
Received: (from j@localhost)
by ida.interface-business.de id f989gFP18137;
Mon, 8 Oct 2001 11:42:15 +0200 (MET DST)
Date: Mon, 8 Oct 2001 11:42:15 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] start help
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Torsten Hahn <[email-masked]> wrote:

> today i got the avr-gcc and some other tools working. Has somebody a
> little nice test example? What i need would be a simple Makefile and
> a kind of "Hello World" applikation in c for starting.

Already a bit aged, but should still cover the "Hello world" as
well as a more sophisticated example:

ftp://ftp.ifbus.de/pub/j_wunsch/avr-demo.tar.gz

It contains a schematic as a Postscript file. If you need the
schematic as PDF, it's here:

ftp://ftp.ifbus.de/pub/j_wunsch/demo-avr.pdf

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Tue Oct 09 00:32:24 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15qYdz-0000DF-00
for <[email-masked]>; Tue, 09 Oct 2001 00:32:23 +1300
Received: (qmail 20342 invoked from network); 8 Oct 2001 10:38:21 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 8 Oct 2001 10:38:21 -0000
Received: from fri.uni-lj.si ([193.2.76.118]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with ESMTP id AAA23156
for <[email-masked]>; Mon, 8 Oct 2001 13:21:52 +0200
Message-ID: <[email-masked]>
Date: Mon, 08 Oct 2001 13:28:40 +0200
From: [email-masked] (Robert Rozman)
X-Mailer: Mozilla 4.51 [sl] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: [email-masked]
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] In-Circuit debug under win-cygwin ?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I recently noticed several mails regarding gcc 3.0.1, gdb (4.18 and 5.0) and
avrmon-stk200 to be used as in circuit debugging under Linux. But in some mails,
also cygwin is mentioned.

Has anyone working system under cygwin and would share instructions how to do
this ?

If this is not possible, how to easily solve programming over stk200 dongle
under Linux - there are some problems reported regarding access to par port ?

Thanks in advance,

regards,

Robert Rozman.

Joerg Wunsch je napisal:

> Torsten Hahn <[email-masked]> wrote:
>
> > today i got the avr-gcc and some other tools working. Has somebody a
> > little nice test example? What i need would be a simple Makefile and
> > a kind of "Hello World" applikation in c for starting.
>
> Already a bit aged, but should still cover the "Hello world" as
> well as a more sophisticated example:
>
> ftp://ftp.ifbus.de/pub/j_wunsch/avr-demo.tar.gz
>
> It contains a schematic as a Postscript file. If you need the
> schematic as PDF, it's here:
>
> ftp://ftp.ifbus.de/pub/j_wunsch/demo-avr.pdf
>
> --
> J"org Wunsch Unix support engineer
> [email-masked] http://www.interface-systems.de/~j/
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Tue Oct 09 07:06:08 2001
Received: from mailf.telia.com ([194.22.194.25])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15qen1-0000Yx-00
for <[email-masked]>; Tue, 09 Oct 2001 07:06:07 +1300
Received: from d1o926.telia.com (d1o926.telia.com [213.66.172.241])
by mailf.telia.com (8.11.6/8.11.6) with ESMTP id f98I6lE02851
for <[email-masked]>; Mon, 8 Oct 2001 20:06:47 +0200 (CEST)
Received: from jesper (h169n2fls34o926.telia.com [217.208.35.169])
by d1o926.telia.com (8.10.2/8.10.1) with SMTP id f98I6kA02983
for <[email-masked]>; Mon, 8 Oct 2001 20:06:46 +0200 (CEST)
Message-ID: <019001c15024$1bd47e00$65656565@jesper>
From: "Jesper Hansen" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]>
Subject: [avr-gcc-list] Assembly only, with avr-gcc
Date: Mon, 8 Oct 2001 20:07:03 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

Does anyone know how to make avr-gcc (or actually avr-ld) skip
the startup file gcrt*.o ???

I want to use only assembly code, but it always tries to link in the
startup block.

/Jesper

From [email-masked] Tue Oct 09 07:17:35 2001
Received: from mail.gmx.de ([213.165.64.20] helo=mail.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15qey6-0000Zr-00
for <[email-masked]>; Tue, 09 Oct 2001 07:17:34 +1300
Received: (qmail 31016 invoked by uid 0); 8 Oct 2001 18:19:10 -0000
Received: from a4f59.pppool.de (HELO there) (213.6.79.89)
by mail.gmx.net (mp009-rz3) with SMTP; 8 Oct 2001 18:19:10 -0000
Content-Type: text/plain;
charset="iso-8859-1"
From: Torsten Hahn <[email-masked]>
To: [email-masked]
Date: Mon, 8 Oct 2001 20:10:31 +0200
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Message-Id: <[email-masked]>
Subject: [avr-gcc-list] avr-as doku
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

where can i find the dokumentation about the avr-gcc assembler ? I need a
detailed description about such things like labels, subroutines, interrupts
etc. I did not find somthing like this in the package.

Torsten
--
Torsten Hahn / Chemnitzer Str. 4 / 09599 Freiberg / Germany
mail: [email-masked]
phone: (+49) 177 2181338
pgp key avaiable at: http://math-www.uni-paderborn.de/pgpnet/wwwkeys.html

From [email-masked] Tue Oct 09 08:37:28 2001
Received: from pop.sttl.uswest.net ([206.81.192.8] helo=sttlpop7.sttl.uswest.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15qgDP-0000di-00
for <[email-masked]>; Tue, 09 Oct 2001 08:37:27 +1300
Received: (qmail 19346 invoked by uid 0); 8 Oct 2001 19:38:39 -0000
Received: from pdslppp13.sttl.uswest.net (HELO dell) (63.224.33.13)
by sttlpop7.sttl.uswest.net with SMTP; 8 Oct 2001 19:38:39 -0000
Date: Mon, 8 Oct 2001 12:29:59 -0700
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "Torsten Hahn" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] avr-as doku
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Look for "gas" in the on line gnu gcc documentation.

You are not going to find what you are looking for. GAS will tell you
about segments labels and macros, but no information on programming an
AVR chip. You need to puzzle out the technical documentation for the
chips. I.e. what is the difference between "rcall", "icall" and
"call", "ret" and "iret", how to save and restore the status register,
where interrupt vectors go, etc.

The hard way is to just learn the assembly mnemonics and read the chip
data sheets. Easier is to get a text on programming an AVR. Somewhat
difficult is to do thing in C and inspect the assembly listings (-S
with gcc). In any case, look at existing assembly code (library and
headers and the startup code gcrt1.S) All these files should be part
of the standard distribution (somewhere).

Good luck! The learning curve is steep. It is pretty easy once you
puzzled out the basics.

----- Original Message -----
From: "Torsten Hahn" <[email-masked]>
To: <[email-masked]>
Sent: Monday, October 08, 2001 11:10 AM
Subject: [avr-gcc-list] avr-as doku

> Hi,
>
> where can i find the dokumentation about the avr-gcc assembler ? I
need a
> detailed description about such things like labels, subroutines,
interrupts
> etc. I did not find somthing like this in the package.
>
> Torsten
> --

From [email-masked] Tue Oct 09 08:23:34 2001
Received: from [213.191.73.61] (helo=webmail.hansenet.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15qfzy-0000cs-00
for <[email-masked]>; Tue, 09 Oct 2001 08:23:34 +1300
Received: from there (213.191.92.113) by webmail.hansenet.de (5.5.034)
id 3B930FE00001F2A6; Mon, 8 Oct 2001 21:24:28 +0200
Message-ID: <[email-masked]> (added by [email-masked])
Content-Type: text/plain;
charset="iso-8859-2"
From: Ralph Koettlitz <[email-masked]>
Reply-To: [email-masked]
To: "Jesper Hansen" <[email-masked]>,
<[email-masked]>
Subject: Re: [avr-gcc-list] Assembly only, with avr-gcc
Date: Mon, 8 Oct 2001 21:26:39 +0200
X-Mailer: KMail [version 1.3]
References: <[email-masked]> <[email-masked]> <019001c15024$1bd47e00$65656565@jesper>
In-Reply-To: <019001c15024$1bd47e00$65656565@jesper>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Am Montag, 8. Oktober 2001 20:07 schrieb Jesper Hansen:
> Hi all,
>
> Does anyone know how to make avr-gcc (or actually avr-ld) skip
> the startup file gcrt*.o ???

Make your own gctrt.o with gcrt*.c!

Ralph

From [email-masked] Tue Oct 09 21:59:36 2001
Received: from merkur.hrz.tu-freiberg.de ([139.20.64.28])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15qsjf-0001CW-00
for <[email-masked]>; Tue, 09 Oct 2001 21:59:36 +1300
Received: from there (cobain.exphys.tu-freiberg.de [139.20.13.66])
by merkur.hrz.tu-freiberg.de (8.11.6/8.11.6) with SMTP id f99931142846
for <[email-masked]>; Tue, 9 Oct 2001 11:03:02 +0200 (CEST)
(envelope-from [email-masked])
Message-Id: <[email-masked]>
Content-Type: text/plain;
charset="iso-8859-1"
From: Torsten Hahn <[email-masked]>
To: "AVR GCC List" <[email-masked]>
Date: Tue, 9 Oct 2001 11:11:10 +0200
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [avr-gcc-list] interrupt in as
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

can explain me somebody how can i implement an interrupt-handler purely in
assembler ?

I would need an interrupt routine with no overhead from the c-compiler. If I
use

SIGNAL(INTERRUPT0)
{
asm("nop");
}

I get code output like this:

000000b4 <_interrupt1_>:
b4: 1f 92 push r1
b6: 0f 92 push r0
b8: 0f b6 in r0, 0x3f ; 63
ba: 0f 92 push r0
bc: 11 24 eor r1, r1
be: 00 00 nop
c0: 0f 90 pop r0
c2: 0f be out 0x3f, r0 ; 63
c4: 0f 90 pop r0
c6: 1f 90 pop r1
c8: 18 95 reti

The Problem is now, that i have an extremly time critical applikation and i
have for some reasons only 16 (!) takt-cycles to handle this interrupt
optimal. The code constructet wasts about 12 of them.

Thanks,
TH.
--
Torsten Hahn / Chemnitzer Str. 4 / 09599 Freiberg / Germany
mail: [email-masked]
phone: (+49) 177 2181338
pgp key avaiable at: http://math-www.uni-paderborn.de/pgpnet/wwwkeys.html

From [email-masked] Tue Oct 09 23:15:57 2001
Received: from stud4.tuwien.ac.at ([193.170.75.21] ident=e9425141)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15qtvY-0001Gm-00
for <[email-masked]>; Tue, 09 Oct 2001 23:15:56 +1300
Received: from localhost (e9425141@localhost)
by stud4.tuwien.ac.at (8.9.3 (PHNE_18546)/8.9.3) with ESMTP id MAA28186;
Tue, 9 Oct 2001 12:18:17 +0200 (MEST)
Date: Tue, 9 Oct 2001 12:18:17 +0200 (MEST)
From: Christian Troedhandl <[email-masked]>
To: Torsten Hahn <[email-masked]>
cc: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] interrupt in as
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Tue, 9 Oct 2001, Torsten Hahn wrote:

> Hi,
>
> can explain me somebody how can i implement an interrupt-handler purely in
> assembler ?
You could code it in a plain Assambler file like this:

handler.S:
-----cut-----

.section .text

.global _interrupt0_
.type _interrupt0_.@function

_interrupt0_:
/* save all needed registers here */
nop
/* restore registers */
reti
--------------

Then you compile and link this file just the same way you would do, if it
were a .c file.

Christian

--------------------------------------------------------------------
Christian Troedhandl email: [email-masked]
Karajangasse 6/19 phone: +(43) (1) 9477114
A-1200 Wien mobile phone: +(43) (699) 19477114

"Old C - Programmers never die, they're just cast into void !"
--------------------------------------------------------------------

From [email-masked] Wed Oct 10 00:21:10 2001
Received: from merkur.hrz.tu-freiberg.de ([139.20.64.28])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15quwf-0001Jz-00
for <[email-masked]>; Wed, 10 Oct 2001 00:21:09 +1300
Received: from there (cobain.exphys.tu-freiberg.de [139.20.13.66])
by merkur.hrz.tu-freiberg.de (8.11.6/8.11.6) with SMTP id f99BOb148520;
Tue, 9 Oct 2001 13:24:37 +0200 (CEST)
(envelope-from [email-masked])
Message-Id: <[email-masked]>
Content-Type: text/plain;
charset="iso-8859-1"
From: Torsten Hahn <[email-masked]>
To: [email-masked],
Susanne Gebhard <[email-masked]>
Date: Tue, 9 Oct 2001 13:32:47 +0200
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by merkur.hrz.tu-freiberg.de id f99BOb148520
Subject: [avr-gcc-list] C++ Buch
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Susi,

sorry, aber ich br=E4uchte das C++ Buch, was ich dier letztens gegeben ha=
be=20
doch nochmal wieder.
K=F6nnntest du das evtl. mal bei Gelegeheit mitbringen ?

CU,
Torsten.
--=20
Torsten Hahn / Chemnitzer Str. 4 / 09599 Freiberg / Germany
mail: [email-masked]
phone: (+49) 177 2181338
pgp key avaiable at: http://math-www.uni-paderborn.de/pgpnet/wwwkeys.html

From [email-masked] Wed Oct 10 01:49:44 2001
Received: from [212.24.45.11] (helo=mail.chat.ru)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15qwKO-0001PC-00
for <[email-masked]>; Wed, 10 Oct 2001 01:49:44 +1300
Received: from ts1-a13.km.sovam.net.ua ([212.109.34.53] helo=212.109.34.53)
by mail.chat.ru with asmtp (Exim 3.22 #14)
id 15qwHw-000KoU-00
for [email-masked]; Tue, 09 Oct 2001 16:47:13 +0400
Date: Tue, 9 Oct 2001 15:12:24 +0300
From: Alexey Boyko <[email-masked]>
X-Mailer: The Bat! (v1.52f)
Reply-To: Alexey Boyko <[email-masked]>
Organization: Open System
X-Priority: 3 (Normal)
Message-ID: <[email-masked]>
To: "[email-masked]" <[email-masked]>
Subject: Subject: [avr-gcc-list] can not build gcc3.0.1
In-Reply-To: <[email-masked]>
References: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Authorized: smartly
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

aglrajcn> Subject: [avr-gcc-list] can not build gcc3.0.1

aglrajcn> ./configure --target=avr
aglrajcn> make

aglrajcn> and there after a long time of compiling i got a strange error saying:

aglrajcn> checking whether the C compiler (/usr/local/avr-gcc/tmp/gcc-3.0.1/gcc/xgcc
aglrajcn> -B/usr/local/avr-gcc/tmp/gcc-3.0.1/gcc/ -B/usr/local/avr/bin/
aglrajcn> -B/usr/local/avr/lib/ -isystem /usr/local/avr/include -O2 ) works... no
aglrajcn> configure: error: installation or configuration problem: C compiler cannot
aglrajcn> create executables.
aglrajcn> make: *** [configure-target-libiberty] Error 1

aglrajcn> Can somebody help ?

I get this problem too. This error happens, because xgcc try to
compile and link test program. But it can't find crts8515.o. This file
come with avr-libc. (find "avr-libc" in www.google.com). Try download
avr-libc. Then for gcc:

$ make all-gcc
$ make install-gcc

make avr-libc and install them. Try to make rest of avr-gcc.

Best regards,
Alexey mailto:[email-masked]

From [email-masked] Wed Oct 10 02:04:58 2001
Received: from mailout03.sul.t-online.com ([194.25.134.81] helo=mailout03.sul.t-online.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15qwZ8-0001QO-00
for <[email-masked]>; Wed, 10 Oct 2001 02:04:58 +1300
Received: from fwd01.sul.t-online.de
by mailout03.sul.t-online.de with smtp
id 15qwbT-00051f-06; Tue, 09 Oct 2001 15:07:23 +0200
Received: from krajenski.de (520059590703-0001@[217.230.12.147]) by fmrl01.sul.t-online.com
with smtp id 15qwbF-2KlhNwC; Tue, 9 Oct 2001 15:07:09 +0200
Received: (qmail 705 invoked by uid 1000); 9 Oct 2001 13:07:08 -0000
Date: Tue, 9 Oct 2001 15:07:08 +0200
From: Clemens Gerlach <[email-masked]>
To: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] interrupt in as
Message-ID: <[email-masked]>
Mail-Followup-To: AVR GCC List <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Tue, Oct 09, 2001 at 11:11:10AM +0200
X-Sender: [email-masked]
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Tue, Oct 09, 2001 at 11:11:10AM +0200, Torsten Hahn wrote:
> I would need an interrupt routine with no overhead from the c-compiler. If I
> use

use __attribute__((naked)) for the function to avoid pro/epilog.
you have to save registers and status by yourself.

i use this in one of my programs:

void SIG_SPI(void) __attribute__((signal,naked));
void SIG_SPI(void)
{
asm volatile ( "push r27\n\t"
"push r26\n\t"
"push r25\n\t"
"lds r26, sendp\n\t"
"sbic %0, 0\n\t"
"ldi r26, lo8(results)\n\t"
"ld r25, X+\n\t"
"out %0, r25\n\t"
"sts sendp, r26\n\t"
"pop r25\n\t"
"pop r26\n\t"
"pop r27\n\t"
"reti"
::"I" (SPDR));

}

the assembly is the only thing that appears in the isr.

but remember there's allways a jmp (2 clocks) from the interrupt table to
the isr.

clemens

From [email-masked] Wed Oct 10 02:55:49 2001
Received: from merkur.hrz.tu-freiberg.de ([139.20.64.28])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15qxMK-0001T5-00
for <[email-masked]>; Wed, 10 Oct 2001 02:55:49 +1300
Received: from there (cobain.exphys.tu-freiberg.de [139.20.13.66])
by merkur.hrz.tu-freiberg.de (8.11.6/8.11.6) with SMTP id f99DxG166205
for <[email-masked]>; Tue, 9 Oct 2001 15:59:17 +0200 (CEST)
(envelope-from [email-masked])
Message-Id: <[email-masked]>
Content-Type: text/plain;
charset="iso-8859-1"
From: Torsten Hahn <[email-masked]>
To: [email-masked]
Date: Tue, 9 Oct 2001 16:07:27 +0200
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [avr-gcc-list] #define in as
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

can i define some usefull names etc. for register or ports in an pure
assembler file ?
I tried around with

#define myregister r16

etc. but this dos not seem to work. The avr-as says

Error: constant value required

When i try to use this like

ldi myregister, 0

Whats wrong ?

Cu,
Torsten.
--
Torsten Hahn / Chemnitzer Str. 4 / 09599 Freiberg / Germany
mail: [email-masked]
phone: (+49) 177 2181338
pgp key avaiable at: http://math-www.uni-paderborn.de/pgpnet/wwwkeys.html

From [email-masked] Wed Oct 10 03:16:09 2001
Received: from sttlpop7.sttl.uswest.net ([206.81.192.8])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15qxg0-0001UW-00
for <[email-masked]>; Wed, 10 Oct 2001 03:16:08 +1300
Received: (qmail 81913 invoked by uid 0); 9 Oct 2001 14:18:34 -0000
Received: from pdslppp13.sttl.uswest.net (HELO dell) (63.224.33.13)
by sttlpop7.sttl.uswest.net with SMTP; 9 Oct 2001 14:18:34 -0000
Date: Tue, 9 Oct 2001 07:07:16 -0700
Message-ID: <[email-masked]>
From: "Larry Barello" <[email-masked]>
To: "Torsten Hahn" <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] #define in as
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I do this all the time and it works great... You need to use the C
preprocessor - GAS doesn't know anything about #defines.

avr-gcc -x assembler-with-cpp <infile> -o <outfile>

----- Original Message -----
From: "Torsten Hahn" <[email-masked]>

> Hi,
>
> can i define some usefull names etc. for register or ports in an
pure
> assembler file ?
> I tried around with
>
> #define myregister r16
>
> etc. but this dos not seem to work. The avr-as says
>
> Error: constant value required
>
> When i try to use this like
>
> ldi myregister, 0
>
> Whats wrong ?
>

From [email-masked] Wed Oct 10 03:52:09 2001
Received: from vita.hk.net
([152.101.101.101] helo=hk.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15qyEq-0001Wg-00
for <[email-masked]>; Wed, 10 Oct 2001 03:52:09 +1300
Received: from hk.net (p11.tnt.hk.net [202.66.202.11])
by hk.net (8.9.1/8.9.1) with ESMTP id WAA06589
for <[email-masked]>; Tue, 9 Oct 2001 22:54:29 +0800 (HKT)
Message-ID: <[email-masked]>
Date: Tue, 09 Oct 2001 22:42:08 +0800
From: Kang Tin LAI <[email-masked]>
Organization: Solar System
X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 i86pc)
X-Accept-Language: zh-TW, en, zh-CN
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] interrupt in as
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

Try these:

void SIG_INTERRUPT0(void) __attribute__ ((naked));
void SIG_INTERRUPT0(void)
{
/* your codes */
}

No overhead, including "reti", even not in pure assembler code.

Kang

Torsten Hahn wrote:
>
> Hi,
>
> can explain me somebody how can i implement an interrupt-handler purely in
> assembler ?
>
> I would need an interrupt routine with no overhead from the c-compiler. If I
> use
>
> SIGNAL(INTERRUPT0)
> {
> asm("nop");
> }
>
> I get code output like this:
>
> 000000b4 <_interrupt1_>:
> b4: 1f 92 push r1
> b6: 0f 92 push r0
> b8: 0f b6 in r0, 0x3f ; 63
> ba: 0f 92 push r0
> bc: 11 24 eor r1, r1
> be: 00 00 nop
> c0: 0f 90 pop r0
> c2: 0f be out 0x3f, r0 ; 63
> c4: 0f 90 pop r0
> c6: 1f 90 pop r1
> c8: 18 95 reti
>
> The Problem is now, that i have an extremly time critical applikation and i
> have for some reasons only 16 (!) takt-cycles to handle this interrupt
> optimal. The code constructet wasts about 12 of them.
>
> Thanks,
> TH.
> --
> Torsten Hahn / Chemnitzer Str. 4 / 09599 Freiberg / Germany
> mail: [email-masked]
> phone: (+49) 177 2181338
> pgp key avaiable at: http://math-www.uni-paderborn.de/pgpnet/wwwkeys.html
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Wed Oct 10 04:18:38 2001
Received: from bfb36.pppool.de ([213.7.251.54] helo=unity.lapawa.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15qyeT-0001YO-00
for <[email-masked]>; Wed, 10 Oct 2001 04:18:38 +1300
Received: from [192.168.77.10] (helo=bullet.lapawa.net ident=mail)
by unity.lapawa.net with esmtp (Exim 3.22 #1 (Debian))
id 15qyhE-0002IG-00
for <[email-masked]>; Tue, 09 Oct 2001 17:21:28 +0200
Received: from tim by bullet.lapawa.net with local (Exim 3.32 #1 (Debian))
id 15qyh9-0007z4-00
for <[email-masked]>; Tue, 09 Oct 2001 17:21:23 +0200
Date: Tue, 9 Oct 2001 17:21:23 +0200
From: Tim Lapawa <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
Mail-Followup-To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.22i
Subject: [avr-gcc-list] why avr-gcc and not avr-ld
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi list,
does anyone know why it seems to be necessary to use the avr-gcc
and not avr-ld to link some object files to one elf?

With avr-ld all the initialization codes is missing. No _real_init_, _init_ and r interrup vectors table is in the final binary.

Wich options must I pass to avr-ld to behave like avr-gcc??

greetings Tim

--
\\\///
Tim Lapawa (o -) [email-masked]
-------------oo0-(_)-0oo----------------------
,ooo0 Where do you want
( ) 0ooo, to go tomorrow?
---\ (---------( )----------------------
\ _ ) ) /
( _ /

From [email-masked] Wed Oct 10 04:37:19 2001
Received: from atusks01.alcatel.at ([212.183.9.130] helo=mail.alcatel.at)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15qywY-0001Zf-00
for <[email-masked]>; Wed, 10 Oct 2001 04:37:18 +1300
Received: from alcatel.at (atusel33.aut.alcatel.at [146.112.129.215])
by mail.alcatel.at (8.9.3/8.9.3/1.21 01/27/01 21:43:09) with ESMTP id RAA25314;
Tue, 9 Oct 2001 17:39:07 +0200 (MET DST)
Message-ID: <[email-masked]>
Date: Tue, 09 Oct 2001 17:37:59 +0200
From: Christoph Plattner <[email-masked]>
Organization: AAA
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.8 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
To: Tim Lapawa <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] why avr-gcc and not avr-ld
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

If you use arv-ld directrly (internal used by gcc) then you must
specify all additional object files like gcrt1.o manually.
A little bit expert's work ....

Bye
Christoph P.

Tim Lapawa wrote:
>
> Hi list,
> does anyone know why it seems to be necessary to use the avr-gcc
> and not avr-ld to link some object files to one elf?
>
> With avr-ld all the initialization codes is missing. No _real_init_, _init_ and r interrup vectors table is in the final binary.
>
> Wich options must I pass to avr-ld to behave like avr-gcc??
>
> greetings Tim
>
> --
> \\\///
> Tim Lapawa (o -) [email-masked]
> -------------oo0-(_)-0oo----------------------
> ,ooo0 Where do you want
> ( ) 0ooo, to go tomorrow?
> ---\ (---------( )----------------------
> \ _ ) ) /
> ( _ /
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
+--------V--------+ [email-masked]
| A L C A T E L | -----------------------------
+-----------------+ Phone: +43 1 27722 3706
T A S Fax: +43 1 27722 3955

From [email-masked] Wed Oct 10 05:08:42 2001
Received: from vita.hk.net
([152.101.101.101] helo=hk.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15qzQv-0001c0-00
for <[email-masked]>; Wed, 10 Oct 2001 05:08:41 +1300
Received: from hk.net (p11.tnt.hk.net [202.66.202.11])
by hk.net (8.9.1/8.9.1) with ESMTP id AAA10026
for <[email-masked]>; Wed, 10 Oct 2001 00:10:59 +0800 (HKT)
Message-ID: <[email-masked]>
Date: Tue, 09 Oct 2001 23:58:37 +0800
From: Kang Tin LAI <[email-masked]>
Organization: Solar System
X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 i86pc)
X-Accept-Language: zh-TW, en, zh-CN
MIME-Version: 1.0
To: [email-masked]
Subject: Re: [avr-gcc-list] why avr-gcc and not avr-ld
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

avr-ld [ld flags] crts8515.o file1.o files2.o -L/opt/avr/lib
-L/opt/avr/lib/gcc-lib/avr/3.0.1 -lc -lm -lgcc

[ld flags]
some linker flags, for example -Map file.map will create map file
with
the name: file.map
crts8515.o
startup codes, assume your target is AT90S8515
file1.o file2.o
your object code files, add all you need to link at here
-L option
the search path for linker searching for library, I have 2 searched
paths here
-l option
the library to be searched for, I have here the library libc, libm
and libgcc

It is the basic ld command line.

Cheers.

Kang

Tim Lapawa wrote:
>
> Hi list,
> does anyone know why it seems to be necessary to use the avr-gcc
> and not avr-ld to link some object files to one elf?
>
> With avr-ld all the initialization codes is missing. No _real_init_, _init_ and r interrup vectors table is in the final binary.
>
> Wich options must I pass to avr-ld to behave like avr-gcc??
>
> greetings Tim
>
> --
> \\\///
> Tim Lapawa (o -) [email-masked]
> -------------oo0-(_)-0oo----------------------
> ,ooo0 Where do you want
> ( ) 0ooo, to go tomorrow?
> ---\ (---------( )----------------------
> \ _ ) ) /
> ( _ /
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Wed Oct 10 05:16:55 2001
Received: from vita.hk.net
([152.101.101.101] helo=hk.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15qzYs-0001cf-00
for <[email-masked]>; Wed, 10 Oct 2001 05:16:55 +1300
Received: from hk.net (p11.tnt.hk.net [202.66.202.11])
by hk.net (8.9.1/8.9.1) with ESMTP id AAA10516
for <[email-masked]>; Wed, 10 Oct 2001 00:19:15 +0800 (HKT)
Message-ID: <[email-masked]>
Date: Wed, 10 Oct 2001 00:06:53 +0800
From: Kang Tin LAI <[email-masked]>
Organization: Solar System
X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 i86pc)
X-Accept-Language: zh-TW, en, zh-CN
MIME-Version: 1.0
To: [email-masked]
Subject: Re: [avr-gcc-list] why avr-gcc and not avr-ld
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Oh,

The most important one missing: -o output.elf - which creates the
final elf file.

Cheers again!

Kang

Kang Tin LAI wrote:
>
> Hi,
>
> avr-ld [ld flags] crts8515.o file1.o files2.o -L/opt/avr/lib
> -L/opt/avr/lib/gcc-lib/avr/3.0.1 -lc -lm -lgcc
>
> [ld flags]
> some linker flags, for example -Map file.map will create map file
> with
> the name: file.map
> crts8515.o
> startup codes, assume your target is AT90S8515
> file1.o file2.o
> your object code files, add all you need to link at here
> -L option
> the search path for linker searching for library, I have 2 searched
> paths here
> -l option
> the library to be searched for, I have here the library libc, libm
> and libgcc
>
> It is the basic ld command line.
>
> Cheers.
>
> Kang
>
> Tim Lapawa wrote:
> >
> > Hi list,
> > does anyone know why it seems to be necessary to use the avr-gcc
> > and not avr-ld to link some object files to one elf?
> >
> > With avr-ld all the initialization codes is missing. No _real_init_, _init_ and r interrup vectors table is in the final binary.
> >
> > Wich options must I pass to avr-ld to behave like avr-gcc??
> >
> > greetings Tim
> >
> > --
> > \\\///
> > Tim Lapawa (o -) [email-masked]
> > -------------oo0-(_)-0oo----------------------
> > ,ooo0 Where do you want
> > ( ) 0ooo, to go tomorrow?
> > ---\ (---------( )----------------------
> > \ _ ) ) /
> > ( _ /
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > [email-masked]
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Wed Oct 10 05:25:34 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15qzhF-0001df-00
for <[email-masked]>; Wed, 10 Oct 2001 05:25:33 +1300
Received: (from j@localhost)
by ida.interface-business.de id f99GRu326848;
Tue, 9 Oct 2001 18:27:56 +0200 (MET DST)
Date: Tue, 9 Oct 2001 18:27:56 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] why avr-gcc and not avr-ld
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Tim Lapawa <[email-masked]> wrote:

> Wich options must I pass to avr-ld to behave like avr-gcc??

-v tells you more about it:

$ avr-gcc -v -O2 -Wall -mmcu=at90s2333 demo.c -o demo.out
Reading specs from /usr/local/lib/gcc-lib/avr/3.0/specs
Configured with: ./configure --target=avr --prefix=/usr/local i386--freebsd4.4
Thread model: single
gcc version 3.0
/usr/local/lib/gcc-lib/avr/3.0/cc1 -lang-c -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=0 -DAVR -D__AVR__ -D__AVR -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -Wall -D__AVR_ARCH__=2 -D__AVR_AT90S2333__ -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int -D__INT_MAX__=32767 demo.c -quiet -dumpbase demo.c -mmcu=at90s2333 -O2 -Wall -version -o /var/tmp/cc9oykMl.s
GNU CPP version 3.0 (cpplib) (GNU assembler syntax)
GNU C version 3.0 (avr)
compiled by GNU C version 2.95.3 20010315 (release) [FreeBSD].
ignoring nonexistent directory "/usr/local/avr/sys-include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/lib/gcc-lib/avr/3.0/include
/usr/local/avr/include
End of search list.
demo.c:378: warning: return type of `main' is not `int'
/usr/local/lib/gcc-lib/avr/3.0/../../../../avr/bin/as -mmcu=at90s2333 -o /var/tmp/cccBRJOc.o /var/tmp/cc9oykMl.s
/usr/local/lib/gcc-lib/avr/3.0/../../../../avr/bin/ld -m avr23xx -o demo.out /usr/local/lib/gcc-lib/avr/3.0/../../../../avr/lib/crts2333.o -L/usr/local/lib/gcc-lib/avr/3.0 -L/usr/local/lib/gcc-lib/avr/3.0/../../../../avr/lib /var/tmp/cccBRJOc.o -lgcc -lc -lgcc

The last (fairly long, sorry about that) line is the linker command
line. Depending on your actual MCU target, and configured path names,
it will differ.

It's usually always a good idea to use the compiler front-end instead
of using the linker directly. If you specify "-nostdlib" on the
command line, neither the crtXXX.o file nor any of the default
libraries will be linked. Unix C compiler front ends determine the
type of the input file based on the suffix, thus:

..c is considered C code
..cpp or .C is considered C++ code
..S is considered assembler code to be passed through the C preprocessor
..s is considered assembler code not to be preprocessed

anything else is considered linker input files (usually .o or .a
files). You can mix any of these file types on a single command line.
Due to this flexibility, there's usually no need to call any of the
lower-level tools (cpp, cc1, as, ld) directly. If you want to specify
a direct linker input option, you can do that with -Xlinker, like

avr-cc -Xlinker --cref -o demo.out demo.c

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Wed Oct 10 08:50:41 2001
Received: from verden.pvv.ntnu.no ([129.241.210.224])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15r2tk-0001s9-00
for <[email-masked]>; Wed, 10 Oct 2001 08:50:41 +1300
Received: (qmail 43284 invoked by uid 21029); 9 Oct 2001 19:53:04 -0000
To: Torsten Hahn <[email-masked]>
Cc: "AVR GCC List" <[email-masked]>
Subject: Re: [avr-gcc-list] interrupt in as
References: <[email-masked]>
From: Tor Ringstad <[email-masked]>
Date: 09 Oct 2001 21:53:04 +0200
In-Reply-To: Torsten Hahn's message of "Tue, 9 Oct 2001 11:11:10 +0200"
Message-ID: <[email-masked]>
Lines: 32
X-Mailer: Gnus v5.7/Emacs 20.7
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

[Torsten Hahn]
> The Problem is now, that i have an extremly time critical
> applikation and i have for some reasons only 16 (!) takt-cycles to
> handle this interrupt optimal.

With this kind of restraint, pure assembly may indeed be the best (or
even only) way to go.

[Clemens Gerlach]
> use __attribute__((naked)) for the function to avoid pro/epilog.
> you have to save registers and status by yourself.

Before you go for the "naked" C-functions variant, just be sure you
understand what the prologue and epilogue really do.

- It saves/restores the contents of SREG, which you don't want the ISR
to accidentally change. However, as Clemens Gerlach shows, it's
possible to write ISR code that doesn't touch the SREG.

- It clears r1, which is assumed by all generated C code to have the
value zero. This is important if your function is to contain any C
code at all.

- It saves/restores the contents of all registers that are used. The
reason for this is obvious.

You should also notice, that for a little less restrained situation,
writing in C really is an option worth considering. With a little
care, you can get the compiler to generate reasonably compact code.

- Tor Ringstad -

From [email-masked] Tue Oct 09 21:49:55 2001
Received: from bfb36.pppool.de ([213.7.251.54] helo=unity.lapawa.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15qsaI-0001Bo-00
for <[email-masked]>; Tue, 09 Oct 2001 21:49:55 +1300
Received: from [192.168.77.10] (helo=bullet.lapawa.net ident=mail)
by unity.lapawa.net with esmtp (Exim 3.22 #1 (Debian))
id 15qscr-0002Bo-00
for <[email-masked]>; Tue, 09 Oct 2001 10:52:33 +0200
Received: from tim by bullet.lapawa.net with local (Exim 3.32 #1 (Debian))
id 15qscr-0000GX-00
for <[email-masked]>; Tue, 09 Oct 2001 10:52:33 +0200
Date: Tue, 9 Oct 2001 10:52:32 +0200
To: [email-masked]
Message-ID: <[email-masked]>
Mail-Followup-To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.22i
From: Tim Lapawa <[email-masked]>
Subject: [avr-gcc-list] constant strings in FLASH
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello list,

with this code I would like to force some strings to stay in ROM.

#include <pgmspace.h>
const char __attribute__((progmem)) welcome[]="Welcome to SER2LCDisplay";
Later I want to access it with the __lpm_inline() macro.

After compiling and uploading it to a at90s8515.
The string is stored at the beginning of the FLASH at address $00000.
But there should be the reset interrupt vektor.

How can I tell the linker to put these progmem segments behind the normal executive code? Doess anyone else use the progmem to store constant values?

greeting Tim

--
\\\///
Tim Lapawa (o -) [email-masked]
-------------oo0-(_)-0oo----------------------
,ooo0 Where do you want
( ) 0ooo, to go tomorrow?
---\ (---------( )----------------------
\ _ ) ) /
( _ /

From [email-masked] Wed Oct 10 16:29:05 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15rA2e-0002Co-00
for <[email-masked]>; Wed, 10 Oct 2001 16:28:22 +1300
Received: (from rneswold@localhost)
by DrMemory.fnal.GOV (8.11.3/8.11.3) id f9A3UhE11361
for [email-masked]; Tue, 9 Oct 2001 22:30:43 -0500 (CDT)
(envelope-from rneswold)
Date: Tue, 9 Oct 2001 22:30:43 -0500
From: Rich Neswold <[email-masked]>
To: AVR Mailing List <[email-masked]>
Message-ID: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="gr/z0/N6AeWAPJVB"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.3-RELEASE
Subject: [avr-gcc-list] GCC 3.0 patches
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--gr/z0/N6AeWAPJVB
Content-Type: multipart/mixed; boundary="IrhDeMKUP4DT/M7F"
Content-Disposition: inline

--IrhDeMKUP4DT/M7F
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello,

I have a small set of patches for GCC 3.0 to make a small improvement and
fix (what I believe to be) a bug. The patch file is attached to this
message. I'd like to hear comments.

The patch file does three things:

1. Changes two instances of '|' to '||'. It turns out that the use of '|'
still worked, but I changed it to be consistent with other boolean tests
that had the same variables.

2. I noticed that when I use "-mtiny-stack", the function prologue of
main() still adds two instructions to manipulate SPH. This patch makes sure
that if your stack is only 8-bits, main() doesn't try to touch SPH (saving
4 bytes of flash).

3. The final patch is much more involved and, although it fixes my problem,
I'd like to see if anyone knows if this new behavior will break something.

It all started a few days ago...

I'm working on a little project using the 2313 processor. I have a few
global variables which are needed to hold the state of interrupt routines,
etc., etc. Since these variables are allocated in SRAM, my code space was
getting rapidly exhausted by the compiler since it took a few instructions
to update a single variable (three instructions just to increment it, for
instance!)

I saw a post here recently discussing the -ffixed-REG option. So I thought
I'd try it. I set my variable to use r10 and I compiled my code with
"-ffixed-r10". My ROM image did shrink, but it didn't work. Looking at a
disassembly, I noticed the interrupt routine had a bug.

Some test code, which shows the problem, is here:

#include <interrupt.h>
#include <sig-avr.h>

register uint8_t tick asm("r10");

SIGNAL(SIG_OVERFLOW0)
{
outp(inp(TCNT0) - 63, TCNT0);
++tick;
}

void tickInit(void)
{
tick =3D 0;
outp(3, TCCR0);
outp(-63, TCNT0);
outp(2, TIMSK);
}

This code, on a 4MHz processor, increments "tick" every millisecond. I
compiled it with the following command line:

avr-gcc -pipe -g -I /usr/local/avrdev/include -Wall \
-Wa,-a=3Dbug.lst -c -Os -mmcu=3Dat90s2313 -mtiny-stack \
-fverbose-asm -ffixed-r10 bug.c

The assembly for the interrupt routine was this:

_overflow0_:
**** SIGNAL(SIG_OVERFLOW0)
**** {
push __zero_reg__
push __tmp_reg__
in __tmp_reg__,__SREG__
push __tmp_reg__
clr __zero_reg__
push r10
push r24
**** outp(inp(TCNT0) - 63, TCNT0);
in r24,50
subi r24,lo8(-(-63))
out 50,r24
**** ++tick;
inc r10 <--- now one instruction instead of 3!
**** }
pop r24
pop r10
pop __tmp_reg__
out __SREG__,__tmp_reg__
pop __tmp_reg__
pop __zero_reg__
reti

The code now (happily!) uses "inc r10" to bump the counter, but you'll also
notice that the interrupt routine pushes and pops r10 from the stack! So
routines that use "tick" don't see it getting updated at 1Khz. The third
portion of my patch has the interrupt prologue code check to see if a
register is in the fixed register list, and if so, doesn't push or pop it.

After rebuilding the compiler with these patches, the new assembly code
looks like this:

_overflow0_:
**** SIGNAL(SIG_OVERFLOW0)
**** {
push __zero_reg__
push __tmp_reg__
in __tmp_reg__,__SREG__
push __tmp_reg__
clr __zero_reg__
push r24
**** outp(inp(TCNT0) - 63, TCNT0);
in r24,50
subi r24,lo8(-(-63))
out 50,r24
**** ++tick;
inc r10
**** }
pop r24
pop __tmp_reg__
out __SREG__,__tmp_reg__
pop __tmp_reg__
pop __zero_reg__
reti

I searched the disassembly of my ROM for uses of r10 and only found mine (I
wasn't sure if avr-libc or libgcc temporarily used it.) Everything seems
fine and the code is tighter when using --ffixed-REG. I'm going to switch
over a few more globals and do some more testing.

FreeBSD users can apply these patches to Joerg Wunsch's port of the tools
by saving the attached files as:

/usr/ports/devel/avr-gcc/files/patch-na

=2E..and then rebuild the port.

Comments requested and welcome....

--=20
Rich Neswold

efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

--IrhDeMKUP4DT/M7F
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-na

--- gcc/config/avr/avr.c.orig Sat May 12 15:32:41 2001
+++ gcc/config/avr/avr.c Sat Oct 6 01:04:15 2001
@@ -562,7 +562,7 @@
fprintf (file,"\tsei\n");
++prologue_size;
}
- if (interrupt_func_p | signal_func_p)
+ if (interrupt_func_p || signal_func_p)
{
fprintf (file, "\t"
AS1 (push,__zero_reg__) CR_TAB
@@ -574,14 +574,23 @@
}
if (main_p)
{
- fprintf (file, ("\t"
- AS2 (ldi,r28,lo8(%s - %d)) CR_TAB
- AS2 (ldi,r29,hi8(%s - %d)) CR_TAB
- AS2 (out,__SP_H__,r29) CR_TAB
- AS2 (out,__SP_L__,r28) "\n"),
- avr_init_stack, size, avr_init_stack, size);
+ if (!TARGET_TINY_STACK) {
+ fprintf (file, ("\t"
+ AS2 (ldi,r28,lo8(%s - %d)) CR_TAB
+ AS2 (ldi,r29,hi8(%s - %d)) CR_TAB
+ AS2 (out,__SP_H__,r29) CR_TAB
+ AS2 (out,__SP_L__,r28) "\n"),
+ avr_init_stack, size, avr_init_stack, size);

- prologue_size += 4;
+ prologue_size += 4;
+ } else {
+ fprintf (file, ("\t"
+ AS2 (ldi,r28,lo8(%s - %d)) CR_TAB
+ AS2 (out,__SP_L__,r28) "\n"),
+ avr_init_stack, size);
+
+ prologue_size += 2;
+ }
}
else if (minimize && (frame_pointer_needed || live_seq > 6))
{
@@ -613,7 +622,8 @@
{
for (reg = 0; reg < 32; ++reg)
{
- if ((!leaf_func_p
+ if (!fixed_regs[reg] &&
+ ((!leaf_func_p
&& (call_used_regs[reg]
&& (interrupt_func_p || signal_func_p)
&& !(reg == TMP_REGNO || reg == ZERO_REGNO)))
@@ -621,7 +631,7 @@
&& (!call_used_regs[reg]
|| interrupt_func_p || signal_func_p)
&& ! (frame_pointer_needed
- && (reg == REG_Y || reg == (REG_Y+1)))))
+ && (reg == REG_Y || reg == (REG_Y+1))))))
{
fprintf (file, "\t" AS1 (push,%s) "\n", avr_regnames[reg]);
++prologue_size;
@@ -737,7 +747,7 @@
fputs ("\t", file);
epilogue_size += out_adj_frame_ptr (file, -size);

- if (interrupt_func_p | signal_func_p)
+ if (interrupt_func_p || signal_func_p)
{
epilogue_size += out_set_stack_ptr (file, -1, 0);
}
@@ -754,7 +764,8 @@

for (reg = 31; reg >= 0; --reg)
{
- if ((!leaf_func_p
+ if (!fixed_regs[reg] &&
+ ((!leaf_func_p
&& (call_used_regs[reg]
&& (interrupt_func_p || signal_func_p)
&& !(reg == TMP_REGNO || reg == ZERO_REGNO)))
@@ -762,14 +773,14 @@
&& (!call_used_regs[reg]
|| interrupt_func_p || signal_func_p)
&& ! (frame_pointer_needed
- && (reg == REG_Y || reg == (REG_Y+1)))))
+ && (reg == REG_Y || reg == (REG_Y+1))))))
{
fprintf (file, "\t" AS1 (pop,%s) "\n", avr_regnames[reg]);
++epilogue_size;
}
}

- if (interrupt_func_p | signal_func_p)
+ if (interrupt_func_p || signal_func_p)
{
fprintf (file, "\t"
AS1 (pop,__tmp_reg__) CR_TAB

--IrhDeMKUP4DT/M7F--

--gr/z0/N6AeWAPJVB
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE7w8DiZmE+i9FKxdwRAoEjAJoC0pyIesa6wxxsdx4g0EZlpUs9QwCgvxCM
z5P8+5xaB22J+NifgStmcDY=
=IZcZ
-----END PGP SIGNATURE-----

--gr/z0/N6AeWAPJVB--

From [email-masked] Wed Oct 10 18:38:28 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15rC4a-0002I4-00
for <[email-masked]>; Wed, 10 Oct 2001 18:38:28 +1300
Received: from marekm by alf.amelek.gda.pl with local (Exim 3.33 #1 (Debian))
id 15rC6t-0003ST-00; Wed, 10 Oct 2001 07:40:51 +0200
Subject: Re: [avr-gcc-list] GCC 3.0 patches
In-Reply-To: <[email-masked]>
To: [email-masked]
Date: Wed, 10 Oct 2001 07:40:51 +0200 (CEST)
CC: AVR Mailing List <[email-masked]>
X-Mailer: ELM [version 2.4ME+ PL94 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Message-Id: <[email-masked]>
From: Marek Michalkiewicz <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> 2. I noticed that when I use "-mtiny-stack", the function prologue of
> main() still adds two instructions to manipulate SPH. This patch makes sure

This is intentional - you can use -mtiny-stack on devices with 16-bit stack
pointer as well (if the stack fits within one 256-byte page), so SPH has to
be initialized somewhere...

> The code now (happily!) uses "inc r10" to bump the counter, but you'll also
> notice that the interrupt routine pushes and pops r10 from the stack! So
> routines that use "tick" don't see it getting updated at 1Khz. The third
> portion of my patch has the interrupt prologue code check to see if a
> register is in the fixed register list, and if so, doesn't push or pop it.

Good catch, thanks.

Marek

From [email-masked] Wed Oct 10 22:40:56 2001
Received: from for.spb.ru ([195.201.69.16] helo=cyclone.eis.ru)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15rFrC-0002SW-00
for <[email-masked]>; Wed, 10 Oct 2001 22:40:55 +1300
Received: (qmail 24192 invoked from network); 10 Oct 2001 09:43:18 -0000
Received: from good.for.spb.ru (HELO eis.ru) (195.201.69.80)
by for.spb.ru with SMTP; 10 Oct 2001 09:43:18 -0000
Date: Wed, 10 Oct 2001 13:42:09 +0400
From: Dmitry <[email-masked]>
To: [email-masked]
Message-Id: <[email-masked]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
Organization: eis.ru
X-Mailer: Sylpheed version 0.5.3 (GTK+ 1.2.8; i386-unknown-freebsd5.0)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] subroutine and 8bit types...
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Fellows,
I have a question about compiler attributes and so.

First of all - small part of code:
=========================================

#include <inttypes.h>

uint32_t __last;

uint32_t getlast()
{
return __last;
}

==========================================

the avr-gcc produces:
---------------------------------
.text
.global getlast
.type getlast,@function
getlast:
/* prologue: frame size=0 */
/* prologue end (size=0) */
lds r24,__last
lds r25,(__last)+1
lds r26,(__last)+2
lds r27,(__last)+3
mov r22,r24
mov r23,r25
mov r24,r26
mov r25,r27
/* epilogue: frame size=0 */
ret
/* epilogue end (size=1) */
/* function getlast size 13 (12) */
-----------------------------------

It seems to me that there are little overhead:
The subroutine returns value of __last in registers r22-r25.
But it loads r24-r27 first and the moves them ro r22-r25.

"lds" allows to load data from data space to any register. So, it seems to me that

uint32_t getlast()
{
asm volatile(
"lds r22,__last \n\t"
"lds r23,(__last)+1 \n\t"
"lds r24,(__last)+2 \n\t"
"lds r25,(__last)+3 "
);
}

will be more efficient. But compiler complains about void return.

The question is: is it possible to tell the compiler, that within a particular call only
r22-r25 must be used ?

Thanks in advance

*********************************************************************
("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ
`6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys
(_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44
_..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia
(il),-'' (li),' ((!.-' +7 (812) 3148860, 5585314
*********************************************************************

From [email-masked] Wed Oct 10 23:37:20 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15rGjm-0002V5-00
for <[email-masked]>; Wed, 10 Oct 2001 23:37:19 +1300
Received: (from j@localhost)
by ida.interface-business.de id f9AAdiJ33412;
Wed, 10 Oct 2001 12:39:44 +0200 (MET DST)
Date: Wed, 10 Oct 2001 12:39:44 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] constant strings in FLASH
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Tim Lapawa <[email-masked]> wrote:

> After compiling and uploading it to a at90s8515.
> The string is stored at the beginning of the FLASH at address $00000.

You must have done something wrong, but you didn't write how you
created your ELF (and then binary) file.

I recently posted the URL of a minimalistic AVR C file set, the file
demo.c there also contains strings in flash -- and they work as they
ought to.

$ avr-nm -n demo.out | grep ' [tT] '
00000000 t .__start_of_init__
0000001c T greeting
00000052 T quit_serial
00000080 T hello_serial
00000109 T watchdog
00000126 T snooze
00000136 T ee_done
00000148 t .__c_startup__
00000148 T _real_init_
....

As you can see, the first 0x1c bytes are being spared for the
interrupt vectors, followed by the __attribute__ ((progmem)) strings,
then the regular program text (i. e., executable code).

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Thu Oct 11 01:28:48 2001
Received: from varis.cs.tut.fi
([130.230.4.42] helo=cs.tut.fi ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15rITe-0002ad-00
for <[email-masked]>; Thu, 11 Oct 2001 01:28:47 +1300
Received: from orfeuskerttu.cs.tut.fi ([email-masked] [130.230.2.34])
by cs.tut.fi (8.8.8/8.8.8) with ESMTP id PAA22859;
Wed, 10 Oct 2001 15:31:14 +0300 (EET DST)
From: Kujala Matti <[email-masked]>
Received: (from ear@localhost)
by orfeuskerttu.cs.tut.fi (8.8.5/8.8.4)
id PAA00787; Wed, 10 Oct 2001 15:31:14 +0300 (EET DST)
Message-Id: <[email-masked]>
Subject: Re: [avr-gcc-list] interrupt in as
In-Reply-To: <[email-masked]> from Torsten Hahn at "Oct 9, 2001 11:11:10 am"
To: [email-masked] (Torsten Hahn)
Date: Wed, 10 Oct 2001 15:31:14 +0300 (EET DST)
Cc: [email-masked]
X-Mailer: ELM [version 2.4ME+ PL49 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> Hi,
>
> can explain me somebody how can i implement an interrupt-handler purely in
> assembler ?
>
> I would need an interrupt routine with no overhead from the c-compiler. If I
> use
>
> SIGNAL(INTERRUPT0)
> {
> asm("nop");
> }
>
> I get code output like this:
>
> 000000b4 <_interrupt1_>:
> b4: 1f 92 push r1
> b6: 0f 92 push r0
> b8: 0f b6 in r0, 0x3f ; 63
> ba: 0f 92 push r0
> bc: 11 24 eor r1, r1
> be: 00 00 nop
> c0: 0f 90 pop r0
> c2: 0f be out 0x3f, r0 ; 63
> c4: 0f 90 pop r0
> c6: 1f 90 pop r1
> c8: 18 95 reti
>
> The Problem is now, that i have an extremly time critical applikation and i
> have for some reasons only 16 (!) takt-cycles to handle this interrupt
> optimal. The code constructet wasts about 12 of them.

Doesn't that code use something like 20 cycles?

Anyway, you are talking about a very tight timing.

Worst case you have just begun executing a 4 cycle instruction when the
interrupt occurs. The instruction will be completed so here goes 3 cycles.
The jump to the routine throught interrupt vector takes 6 cycles, so we
are at 9 cycles total. Return with reti takes 4 cycles, for 13 cycles
total. You are left with only 3 cycles to do whatever you want.

Correct me if above was somehow wrong.

Here is something I wrote, however I don't know if it works with the
current version of avr-gcc:

http://www.cs.tut.fi/kurssit/81151/harjoitustyo/uusi_auto/documentation/examples/__output_compare_1a.s

--
What sorcery, what spells, have brought thee here?

From [email-masked] Thu Oct 11 03:38:31 2001
Received: from bfb36.pppool.de ([213.7.251.54] helo=unity.lapawa.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15rKVC-0002ga-00
for <[email-masked]>; Thu, 11 Oct 2001 03:38:30 +1300
Received: from [192.168.77.10] (helo=bullet.lapawa.net ident=mail)
by unity.lapawa.net with esmtp (Exim 3.22 #1 (Debian))
id 15rKX1-0002iC-00
for <[email-masked]>; Wed, 10 Oct 2001 16:40:23 +0200
Received: from tim by bullet.lapawa.net with local (Exim 3.32 #1 (Debian))
id 15rKX0-0000er-00
for <[email-masked]>; Wed, 10 Oct 2001 16:40:22 +0200
Date: Wed, 10 Oct 2001 16:40:21 +0200
From: Tim Lapawa <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] constant strings in FLASH
Message-ID: <[email-masked]>
Mail-Followup-To: [email-masked]
References: <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[email-masked]>
User-Agent: Mutt/1.3.22i
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I used avr-ld directly and not avr-gcc. Therefore my code was not linked with
crts8515.o. Therefore every segment was stored in wrong place.

> Tim Lapawa <[email-masked]> wrote:
>
> > After compiling and uploading it to a at90s8515.
> > The string is stored at the beginning of the FLASH at address $00000.
>
> You must have done something wrong, but you didn't write how you
> created your ELF (and then binary) file.
>
> I recently posted the URL of a minimalistic AVR C file set, the file
> demo.c there also contains strings in flash -- and they work as they
> ought to.
>
> $ avr-nm -n demo.out | grep ' [tT] '
> 00000000 t .__start_of_init__
> 0000001c T greeting
> 00000052 T quit_serial
> 00000080 T hello_serial
> 00000109 T watchdog
> 00000126 T snooze
> 00000136 T ee_done
> 00000148 t .__c_startup__
> 00000148 T _real_init_
> ....
>
> As you can see, the first 0x1c bytes are being spared for the
> interrupt vectors, followed by the __attribute__ ((progmem)) strings,
> then the regular program text (i. e., executable code).
>
> --
> J"org Wunsch Unix support engineer
> [email-masked] http://www.interface-systems.de/~j/
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
\\\///
Tim Lapawa (o -) [email-masked]
-------------oo0-(_)-0oo----------------------
,ooo0 Where do you want
( ) 0ooo, to go tomorrow?
---\ (---------( )----------------------
\ _ ) ) /
( _ /

From [email-masked] Thu Oct 11 04:09:46 2001
Received: from mail.gmx.net ([213.165.64.20])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15rKzQ-0002iG-00
for <[email-masked]>; Thu, 11 Oct 2001 04:09:45 +1300
Received: (qmail 16582 invoked by uid 0); 10 Oct 2001 15:11:43 -0000
Received: from pd953af13.dip.t-dialin.net (HELO gmx.de) (217.83.175.19)
by mail.gmx.net (mp010-rz3) with SMTP; 10 Oct 2001 15:11:43 -0000
Message-ID: <[email-masked]>
Date: Wed, 10 Oct 2001 17:21:50 +0200
From: Jens Spinner <[email-masked]>
X-Mailer: Mozilla 4.75 [de] (Win98; U)
X-Accept-Language: de
MIME-Version: 1.0
To: [email-masked]
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Re: can not build gcc3.0.1
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I had the same problem and used [make --ignore-errors] on second try.
even so.. avr-gcc seems to work fine.

vy 73
JENS

> Hello,
>
> aglrajcn> Subject: [avr-gcc-list] can not build gcc3.0.1
>
> aglrajcn> ./configure --target=avr
> aglrajcn> make
>
> aglrajcn> and there after a long time of compiling i got a strange error saying:
>
> aglrajcn> checking whether the C compiler (/usr/local/avr-gcc/tmp/gcc-3.0.1/gcc/xgcc
> aglrajcn> -B/usr/local/avr-gcc/tmp/gcc-3.0.1/gcc/ -B/usr/local/avr/bin/
> aglrajcn> -B/usr/local/avr/lib/ -isystem /usr/local/avr/include -O2 ) works... no
> aglrajcn> configure: error: installation or configuration problem: C compiler cannot
> aglrajcn> create executables.
> aglrajcn> make: *** [configure-target-libiberty] Error 1
>
> aglrajcn> Can somebody help ?
>
> I get this problem too. This error happens, because xgcc try to
> compile and link test program. But it can't find crts8515.o. This file
> come with avr-libc. (find "avr-libc" in www.google.com). Try download
> avr-libc. Then for gcc:
>
> $ make all-gcc
> $ make install-gcc
>
> make avr-libc and install them. Try to make rest of avr-gcc.
>
> Best regards,
> Alexey mailto:[email-masked]

From [email-masked] Thu Oct 11 05:45:36 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15rMUB-0002mj-00
for <[email-masked]>; Thu, 11 Oct 2001 05:45:35 +1300
Received: from 199.182.89.57.ras03.den.iras.frii.net (199.182.89.57.ras03.den.iras.frii.net [199.182.89.57])
by deimos.frii.net (8.11.6/8.11.6) with ESMTP id f9AGlhR63257;
Wed, 10 Oct 2001 10:47:44 -0600 (MDT)
Date: Wed, 10 Oct 2001 10:48:39 -0600 (MDT)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: Jesper Hansen <[email-masked]>
cc: <[email-masked]>
Subject: Re: [avr-gcc-list] Assembly only, with avr-gcc
In-Reply-To: <019001c15024$1bd47e00$65656565@jesper>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I was able to use avr-as to assemble an asm file like this:

avr-as -mmcu=at90s8515 -o test.out test.asm
avr-objcopy -O ihex test.out test.hex

The hex file was identical to one I created using Atmels assembler and the
test.asm file is a complete program for my purposes.

Ted

On Mon, 8 Oct 2001, Jesper Hansen wrote:

:)Hi all,
:)
:)Does anyone know how to make avr-gcc (or actually avr-ld) skip
:)the startup file gcrt*.o ???
:)
:)I want to use only assembly code, but it always tries to link in the
:)startup block.
:)
:)/Jesper
:)
:)
:)_______________________________________________
:)avr-gcc-list mailing list
:)[email-masked]
:)http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
:)

From [email-masked] Thu Oct 11 06:30:35 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15rNBh-0002sw-00
for <[email-masked]>; Thu, 11 Oct 2001 06:30:34 +1300
Received: (from rneswold@localhost)
by DrMemory.fnal.GOV (8.11.3/8.11.3) id f9AHWUu14923;
Wed, 10 Oct 2001 12:32:30 -0500 (CDT)
(envelope-from rneswold)
Date: Wed, 10 Oct 2001 12:32:30 -0500
From: Rich Neswold <[email-masked]>
To: Marek Michalkiewicz <[email-masked]>
Cc: AVR Mailing List <[email-masked]>
Subject: Re: [avr-gcc-list] GCC 3.0 patches
Message-ID: <[email-masked]>
Reply-To: [email-masked]
References: <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="fOHHtNG4YXGJ0yqR"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Wed, Oct 10, 2001 at 07:40:51AM +0200
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.3-RELEASE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--fOHHtNG4YXGJ0yqR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Wasn't it 10-Oct-2001, at 07:40AM, when Marek Michalkiewicz said:
> > 2. I noticed that when I use "-mtiny-stack", the function prologue of
> > main() still adds two instructions to manipulate SPH. This patch makes
> > sure
>=20
> This is intentional - you can use -mtiny-stack on devices with 16-bit
> stack pointer as well (if the stack fits within one 256-byte page), so
> SPH has to be initialized somewhere...

Okay. Then I'll go back and take a different approach. Thanks for the info.

--=20
Rich Neswold

efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

--fOHHtNG4YXGJ0yqR
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE7xIYtZmE+i9FKxdwRAtsdAKCESF1q1Q5UFP88knkMGVw7i9qMLgCg3Hm0
74GklGPJ6pYwWfaVesmlt8k=
=REKE
-----END PGP SIGNATURE-----

--fOHHtNG4YXGJ0yqR--

From [email-masked] Thu Oct 11 06:36:07 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15rNH4-0002tX-00
for <[email-masked]>; Thu, 11 Oct 2001 06:36:07 +1300
Received: (from rneswold@localhost)
by DrMemory.fnal.GOV (8.11.3/8.11.3) id f9AHcOa14976;
Wed, 10 Oct 2001 12:38:24 -0500 (CDT)
(envelope-from rneswold)
Date: Wed, 10 Oct 2001 12:38:23 -0500
From: Rich Neswold <[email-masked]>
To: Dmitry <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] subroutine and 8bit types...
Message-ID: <[email-masked]>
Reply-To: [email-masked]
References: <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="SxgehGEc6vB0cZwN"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Wed, Oct 10, 2001 at 01:42:09PM +0400
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.3-RELEASE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--SxgehGEc6vB0cZwN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Wasn't it 10-Oct-2001, at 01:42PM, when Dmitry said:
> will be more efficient. But compiler complains about void return.

You can add __attribute__((naked)) to the function definition. Then, you'll
have to add the return instruction to your inline assembly.

--=20
Rich Neswold

efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

--SxgehGEc6vB0cZwN
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE7xIePZmE+i9FKxdwRAl0RAKDyVXQtkTkRY7mxR/idKW36hK2hQgCg84HM
pbzNxRvjIc3yTOMzMOu3rtM=
=Gypb
-----END PGP SIGNATURE-----

--SxgehGEc6vB0cZwN--

From [email-masked] Thu Oct 11 21:43:21 2001
Received: from merkur.hrz.tu-freiberg.de ([139.20.64.28])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15rbR1-0003X4-00
for <[email-masked]>; Thu, 11 Oct 2001 21:43:20 +1300
Received: from there (cobain.exphys.tu-freiberg.de [139.20.13.66])
by merkur.hrz.tu-freiberg.de (8.11.6/8.11.6) with SMTP id f9B8kt155903
for <[email-masked]>; Thu, 11 Oct 2001 10:46:56 +0200 (CEST)
(envelope-from [email-masked])
Message-Id: <[email-masked]>
Content-Type: text/plain;
charset="iso-8859-1"
From: Torsten Hahn <[email-masked]>
To: AVR GCC List <[email-masked]>
Date: Thu, 11 Oct 2001 10:55:07 +0200
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [avr-gcc-list] inline assembler
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

i have a c-file like this:

#define myreg r16

.
.
.

int main(void)
{
...
asm ("
LDI myreg, 0xff
");
}

But this does not work ! How can i tell avr-gcc, to use the #define(ed)
statements also in the inlined assembler sections ?
Or is there a directitive for the as like .define myreg r16 ?

CU,
Torsten.
--
Torsten Hahn / Chemnitzer Str. 4 / 09599 Freiberg / Germany
mail: [email-masked]
phone: (+49) 177 2181338
pgp key avaiable at: http://math-www.uni-paderborn.de/pgpnet/wwwkeys.html

From [email-masked] Thu Oct 11 22:00:32 2001
Received: from mail2.alcatel.fr ([212.208.74.132] helo=mel.alcatel.fr)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15rbhf-0003Y2-00
for <[email-masked]>; Thu, 11 Oct 2001 22:00:31 +1300
Received: from aifhs2.alcatel.fr (mailhub.alcatel.fr [155.132.180.80])
by mel.alcatel.fr (8.11.6/8.11.6/ALCANET/MAIL2 2001) with ESMTP id f9B92x632581;
Thu, 11 Oct 2001 11:02:59 +0200
Received: from bsf.alcatel.fr (mail18.dit.sxb.bsf.alcatel.fr [155.132.18.212])
by aifhs2.alcatel.fr (ALCANET/SMTP2) with ESMTP id LAA06646;
Thu, 11 Oct 2001 11:01:11 +0200 (MET DST)
Received: from mail (mail-bsf-alcatel-fr.dit.sxb.bsf.alcatel.fr [155.132.205.91])
by bsf.alcatel.fr (8.8.8+Sun/8.9.3) with ESMTP id LAA01050;
Thu, 11 Oct 2001 11:02:45 +0200 (MET DST)
Received: from xolos (xolos [172.25.48.247])
by mail (8.8.8+Sun/) with ESMTP id LAA01046;
Thu, 11 Oct 2001 11:02:44 +0200 (MET DST)
Received: by xolos (8.9.3+Sun/ABS1.5) id LAA03451; Thu, 11 Oct 2001 11:02:03 +0200 (MEST)
X-Authentication-Warning: xolos.zoo: gph set sender to [email-masked] using -f
From: Philippe GIACINTI <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <[email-masked]>
Date: Thu, 11 Oct 2001 11:02:03 +0200
To: Torsten Hahn <[email-masked]>
Cc: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] inline assembler
In-Reply-To: <[email-masked]>
References: <[email-masked]>
X-Mailer: VM 6.90 under Emacs 20.7.1
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

on October 11 2001 Torsten Hahn <[email-masked]> wrote:
> Hi,
>
> i have a c-file like this:
>
> #define myreg r16
>
> .
> .
> .
>
> int main(void)
> {
> ...
> asm ("
> LDI myreg, 0xff
> ");
> }
>
> But this does not work ! How can i tell avr-gcc, to use the #define(ed)
> statements also in the inlined assembler sections ?
> Or is there a directitive for the as like .define myreg r16 ?
>
> CU,
> Torsten.
> --
> Torsten Hahn / Chemnitzer Str. 4 / 09599 Freiberg / Germany
> mail: [email-masked]
> phone: (+49) 177 2181338
> pgp key avaiable at: http://math-www.uni-paderborn.de/pgpnet/wwwkeys.html
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
Hello,

If you want that the preprocessor does its job, you have to put the
macro outside double quote ...

#define myreg r16
int main(void)
{
...
__asm__("LDI "myreg",0xFF\n");
...
}

Regards.
--
Philippe Giacinti - Alcatel Business Systems
mailto:[email-masked]

From [email-masked] Thu Oct 11 23:25:51 2001
Received: from mail.pepperl-fuchs.com ([194.120.135.222] helo=de.pepperl-fuchs.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15rd2E-0003cd-00
for <[email-masked]>; Thu, 11 Oct 2001 23:25:50 +1300
Received: from exmail.pepperl-fuchs.com (exmail.pepperl-fuchs.com [172.16.11.61])
by de.pepperl-fuchs.com (8.11.0/8.10.2) with ESMTP id f9BASIC07050
for <[email-masked]>; Thu, 11 Oct 2001 12:28:22 +0200
Received: by exmail.pepperl-fuchs.com with Internet Mail Service (5.5.2650.21)
id <TXCHV7CQ>; Thu, 11 Oct 2001 12:25:23 +0200
Message-ID: <[email-masked]>
From: Stumpf Michael <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Subject: WG: [avr-gcc-list] inline assembler
Date: Thu, 11 Oct 2001 12:25:22 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C1523F.0866D9E0"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C1523F.0866D9E0
Content-Type: text/plain;
charset="iso-8859-1"

Hi,

don't miss the stringify preprocessor token #

__asm__("LDI " #myreg ",0xFF\n");

> Hello,
>
> If you want that the preprocessor does its job, you have to put the
> macro outside double quote ...
>
> #define myreg r16
> int main(void)
> {
> ...
> __asm__("LDI "myreg",0xFF\n");
> ...
> }
>
> Regards.
> --
> Philippe Giacinti - Alcatel Business Systems
> mailto:[email-masked]
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

------_=_NextPart_001_01C1523F.0866D9E0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>WG: [avr-gcc-list] inline assembler</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Hi,</FONT>
<BR><FONT SIZE=3D2>&nbsp;</FONT>
<BR><FONT SIZE=3D2>don't miss the stringify preprocessor token #</FONT>
<BR><FONT SIZE=3D2>&nbsp;</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp; __asm__(&quot;LDI &quot; #myreg =
&quot;,0xFF\n&quot;);</FONT>
<BR><FONT SIZE=3D2>&nbsp;</FONT>
<BR><FONT SIZE=3D2>&gt; Hello,</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; If you want that the preprocessor does its job, =
you have to put the</FONT>
<BR><FONT SIZE=3D2>&gt; macro outside double quote ...</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; #define myreg r16</FONT>
<BR><FONT SIZE=3D2>&gt; int main(void)</FONT>
<BR><FONT SIZE=3D2>&gt; {</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp; ...</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp; __asm__(&quot;LDI =
&quot;myreg&quot;,0xFF\n&quot;);</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp; ...</FONT>
<BR><FONT SIZE=3D2>&gt; }</FONT>
<BR><FONT SIZE=3D2>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT>
<BR><FONT SIZE=3D2>&gt; Regards.</FONT>
<BR><FONT SIZE=3D2>&gt; -- </FONT>
<BR><FONT SIZE=3D2>&gt; Philippe Giacinti - Alcatel Business =
Systems</FONT>
<BR><FONT SIZE=3D2>&gt; <A =
HREF=3D"mailto:[email-masked]">mailto:Philippe.Gia=
[email-masked]</A></FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; =
_______________________________________________</FONT>
<BR><FONT SIZE=3D2>&gt; avr-gcc-list mailing list</FONT>
<BR><FONT SIZE=3D2>&gt; [email-masked]</FONT>
<BR><FONT SIZE=3D2>&gt; <A =
HREF=3D"http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list" =
TARGET=3D"_blank">http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list</A>=
</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&nbsp;</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C1523F.0866D9E0--

From [email-masked] Thu Oct 11 23:35:04 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15rdB8-0003dK-00
for <[email-masked]>; Thu, 11 Oct 2001 23:35:03 +1300
Received: (from j@localhost)
by ida.interface-business.de id f9BAbYS63752;
Thu, 11 Oct 2001 12:37:34 +0200 (MET DST)
Date: Thu, 11 Oct 2001 12:37:34 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] inline assembler
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Torsten Hahn <[email-masked]> wrote:

> Hi,
>
> i have a c-file like this:
>
> #define myreg r16
>
> .
> .
> .
>
> int main(void)
> {
> ...
> asm ("
> LDI myreg, 0xff
> ");
> }
>
> But this does not work ! How can i tell avr-gcc, to use the #define(ed)
> statements also in the inlined assembler sections ?

The problem is not the inline assembler statement, but actually that
(from the C point of view), you're trying to replace something that's
inside a string literal. The C preprocessor doesn't apply macro
expansion there. You can easily verify this by simply passing the
file just through the preprocessor only. For one example, you can do
this by running "avr-gcc -E <filename>.c".

When running this with your file, you get:

% avr-gcc -E foo.c
# 3 "foo.c"
..
..
..

int main(void)
{
....
foo.c:10:6: warning: multi-line string literals are deprecated
asm ("
LDI myreg, 0xff
"
# 10 "foo.c"
);

}

As you can see, it doesn't work (but you knew that already :), and you
get a warning. The warning says that you should not run string
literals across several source lines, since this isn't compliant with
the C standard. Instead, write a single "..." per line, which is
terminated by a \n. Then, to allow for macro expansion, you have to
terminate the string right before the macro. Also, the macro should
expand into a string literal itself. This way, you'd get:

#define myreg "r16"

..
..
..

int main(void)
{
....
asm ("\n"
"LDI " myreg ", 0xff\n"
"\n");
}

That way, you exploit a feature of ANSI C where multiple adjacent
string literals are being concatenated, regardless of whether there's
white space (or even comments) between them. Thus, writing

"foo" /* this is a comment */ "bar"

will effectively yield the C string literal "foobar". Note however
that you can't see /this/ already in the output of the C preprocessor,
since that feature is a feature of the language itself and thus
implemented in the compiler stage. You can, however, see the result
in the generated assembler output (avr-gcc -S).

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Fri Oct 12 02:16:53 2001
Received: from [212.24.45.11] (helo=mail.chat.ru)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15rfhl-0003lg-00
for <[email-masked]>; Fri, 12 Oct 2001 02:16:53 +1300
Received: from ts1-a14.km.sovam.net.ua ([212.109.34.54] helo=212.109.34.54)
by mail.chat.ru with asmtp (Exim 3.22 #14)
id 15rffP-0000DN-00
for [email-masked]; Thu, 11 Oct 2001 17:14:28 +0400
Date: Thu, 11 Oct 2001 11:14:19 +0300
From: Alexey Boyko <[email-masked]>
X-Mailer: The Bat! (v1.52f)
Reply-To: Alexey Boyko <[email-masked]>
Organization: Open System
X-Priority: 3 (Normal)
Message-ID: <[email-masked]>
To: "[email-masked]" <[email-masked]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Authorized: smartly
Subject: [avr-gcc-list] GCC 3.0 patches
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello avr-gcc-list-request,

aglrajcn> The code now (happily!) uses "inc r10" to bump the counter, but you'll also
aglrajcn> notice that the interrupt routine pushes and pops r10 from the stack! So
aglrajcn> routines that use "tick" don't see it getting updated at 1Khz. The third
aglrajcn> portion of my patch has the interrupt prologue code check to see if a
aglrajcn> register is in the fixed register list, and if so, doesn't push or pop it.

BTW, avr-gcc 2.95.2 did not have this bug.

From [email-masked] Mon Oct 15 09:59:08 2001
Received: from smtp.datacomm.ch ([212.40.5.52] helo=flu-smtp-01.datacomm.ch)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ssLi-0008U6-00
for <[email-masked]>; Mon, 15 Oct 2001 09:59:07 +1300
Received: from oemcomputer (line-77-147-glattbrugg1.tiscalinet.ch [212.254.77.147])
by flu-smtp-01.datacomm.ch (8.11.6/8.11.6) with SMTP id f9EL1pU08636
for <[email-masked]>; Sun, 14 Oct 2001 23:01:52 +0200
Message-ID: <003001c154f3$a2869680$934dfed4@oemcomputer>
From: "Pietro Nizzola" <[email-masked]>
To: <[email-masked]>
Date: Sun, 14 Oct 2001 23:02:28 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] store program address into a variable
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,
I would like to get the program address of a given instruction and store
this address into a variable.
How can I achieve this?
My idea ist something like this, but it doesn't work:

void (*address)(void);

void Job1(void)
{
....
}

int main(void)
{
address = label;
...
Job1();
label:
...
return;
}

Grazie
Pietro

From [email-masked] Tue Oct 16 01:09:09 2001
Received: from netti.nic.fi ([212.38.224.82])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15t6YJ-0000b2-00
for <[email-masked]>; Tue, 16 Oct 2001 01:09:04 +1300
Received: (qmail 24006 invoked by uid 101); 15 Oct 2001 15:11:48 +0300
Message-ID: <[email-masked]>
To: <[email-masked]>
Subject: Re: [avr-gcc-list] store program address into a variable
Date: Mon, 15 Oct 2001 12:11:48 -0000
From: <[email-masked]>
X-Mailer: TWIG 2.6.0.cvs
In-Reply-To: <003001c154f3$a2869680$934dfed4@oemcomputer>
X-Client-IP: 194.19.8.2
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Instead of using a label and a pointer to it,
try using a function / func-pointer.

At least to me, that sounds more "correct" ....

If You give the function a 'naked' attribute,
and use a pointer to the function, the pointer
should point to the first instruction of the function ....

BR : Johan

PS. I haven't tried this 'pointer to naked function' stuff,
I'm just guessing .....

Pietro Nizzola <[email-masked]> wrote:

> Hi,
> I would like to get the program address of a given instruction and store
> this address into a variable.
> How can I achieve this?
> My idea ist something like this, but it doesn't work:
>
> void (*address)(void);
>
> void Job1(void)
> {
> ....
> }
>
> int main(void)
> {
> address = label;
> ...
> Job1();
> label:
> ...
> return;
> }
>
> Grazie
> Pietro
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

--

________________________________________________________________
Ilmainen Internet @ http://www.nic.fi/

From [email-masked] Tue Oct 16 01:37:25 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15t6zd-0000cT-00
for <[email-masked]>; Tue, 16 Oct 2001 01:37:17 +1300
Received: (qmail 25665 invoked from network); 15 Oct 2001 11:43:16 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 15 Oct 2001 11:43:16 -0000
Received: from fri.uni-lj.si ([193.2.76.118]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with ESMTP id AAA15236
for <[email-masked]>; Mon, 15 Oct 2001 14:26:41 +0200
Message-ID: <[email-masked]>
Date: Mon, 15 Oct 2001 14:33:28 +0200
From: [email-masked] (Robert Rozman)
X-Mailer: Mozilla 4.51 [sl] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] In circuit debug under rh7 with stk200 dongle?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I've posted similar message asking for cygwin a while ago. Since I got
no response, I decided to try with Linux (at my hand there is rh7). Can
someone please take few minutes and describe, how to compile all
necessary tools to be able to source debug AVR using avrstk200monitor ?

Is anyone doing that successfully ? I've seen some messages about gdb5
and patches etc, etc. I kindly ask if someone could take some time and
gather all info in one place ?

Thanks in advance,

Robert Rozman

From [email-masked] Tue Oct 16 03:11:48 2001
Received: from merkur.hrz.tu-freiberg.de ([139.20.64.28])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15t8T5-0000h6-00
for <[email-masked]>; Tue, 16 Oct 2001 03:11:47 +1300
Received: from there (cobain.exphys.tu-freiberg.de [139.20.13.66])
by merkur.hrz.tu-freiberg.de (8.11.6/8.11.6) with SMTP id f9FEFo124383
for <[email-masked]>; Mon, 15 Oct 2001 16:15:51 +0200 (CEST)
(envelope-from [email-masked])
Message-Id: <[email-masked]>
Content-Type: text/plain;
charset="iso-8859-1"
From: Torsten Hahn <[email-masked]>
To: [email-masked]
Date: Mon, 15 Oct 2001 16:24:10 +0200
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [avr-gcc-list] global vars
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

if i have have defined some global vars, can i access them in an inline
assembler block ? I want do something like this:

int tmp;

int main(void)
{
....
_asm_("read/write/modify tmp here");
...
}

CU,
Torsten.
--
Torsten Hahn / Chemnitzer Str. 4 / 09599 Freiberg / Germany
mail: [email-masked]
phone: (+49) 177 2181338
pgp key avaiable at: http://math-www.uni-paderborn.de/pgpnet/wwwkeys.html

From [email-masked] Tue Oct 16 07:39:23 2001
Received: from mail.gmx.net ([213.165.64.20])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15tCe1-0000wG-00
for <[email-masked]>; Tue, 16 Oct 2001 07:39:22 +1300
Received: (qmail 30258 invoked by uid 0); 15 Oct 2001 18:41:42 -0000
Received: from pd9055cfa.dip.t-dialin.net (HELO gmx.de) (217.5.92.250)
by mail.gmx.net (mp010-rz3) with SMTP; 15 Oct 2001 18:41:42 -0000
Message-ID: <[email-masked]>
Date: Mon, 15 Oct 2001 20:52:26 +0200
From: Karsten Schmidt <[email-masked]>
Reply-To: [email-masked]
Organization: at home
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Robert Rozman <[email-masked]>
CC: [email-masked], [email-masked]
Subject: Re: [avr-gcc-list] In circuit debug under rh7 with stk200 dongle?
References: <[email-masked]>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Robert,
Hi Tor

First at all, I would recommend to visit
http://www.pvv.ntnu.no/~torhr/avrmon-stk200. Here you can download the
latest version of avrmon-stk200-0.6.0. There are also the tested version
listed, and these listed versions work for me also. I detected a "funny"
behaviour, that the monitor does not work under kde (producing useless
printouts and so on), so test the monitor first without any window-manager
(anyway fvm works for me).
Maybe you have to try out different setting for the parallel port. Tor
mentioned this somewhere in the readme.

Second source of information can be found in the archive of this mailing
list, check mails about gdb4.18 and gdb5.0.

Hope this help, if you have further question don’t hesitate to contact me.

Kind regards

Karsten

PS. Thor have you any idea about the kde-behaviour?

Robert Rozman wrote:

> Hello,
>
> I've posted similar message asking for cygwin a while ago. Since I got
> no response, I decided to try with Linux (at my hand there is rh7). Can
> someone please take few minutes and describe, how to compile all
> necessary tools to be able to source debug AVR using avrstk200monitor ?
>
> Is anyone doing that successfully ? I've seen some messages about gdb5
> and patches etc, etc. I kindly ask if someone could take some time and
> gather all info in one place ?
>
> Thanks in advance,
>
> Robert Rozman
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
Karsten Schmidt

Und fuer die Herren aus Pullach AK47, Plutonium, Attentat

From [email-masked] Tue Oct 16 02:12:25 2001
Received: from smtp02.web.de ([217.72.192.151] helo=smtp.web.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15t7Xa-0000eW-00
for <[email-masked]>; Tue, 16 Oct 2001 02:12:24 +1300
Received: from [172.178.103.46] (helo=FRITZweb)
by smtp.web.de with asmtp (Exim 3.31 #19)
id 15t7Zq-0006hP-00
for [email-masked]; Mon, 15 Okt 2001 15:14:42 +0200
Message-ID: <001001c1557b$0ae36e60$fe78a8c0@FRITZweb>
From: "Roland Zitzke" <[email-masked]>
To: <[email-masked]>
Date: Mon, 15 Oct 2001 15:12:28 +0200
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_000D_01C1558B.CD88E340"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Subject: [avr-gcc-list] compiling gcc under cygwin
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_000D_01C1558B.CD88E340
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,
has anyone tried to compile the latest version of gcc (3.0.1 or the =
latest snapshot) under cygwin?
I get some strange errors=20
for example
in libiberty/
I need to manually define HAVE_SYS_ERRLIST
to avoid conflicts resulting for static vs non-static definition of some =
error constants.
I also get errors with the intermediate assember language files and I =
can't fix those easily.
Any comments?

Rgds
Roland

------=_NextPart_000_000D_01C1558B.CD88E340
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>has anyone tried to compile the latest =
version of=20
gcc (3.0.1 or the latest snapshot) under cygwin?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I get some strange errors </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>for example</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>in libiberty/</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I need to manually define=20
HAVE_SYS_ERRLIST</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>to avoid conflicts resulting for static =
vs=20
non-static definition of some error constants.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I also get errors with the intermediate =
assember=20
language files and I can't fix those easily.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Any comments?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Rgds</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Roland</FONT></DIV></BODY></HTML>

------=_NextPart_000_000D_01C1558B.CD88E340--

From [email-masked] Tue Oct 16 10:12:59 2001
Received: from mta7.pltn13.pbi.net ([64.164.98.8] helo=pltn13.pbi.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15tF2h-00013w-00
for <[email-masked]>; Tue, 16 Oct 2001 10:12:59 +1300
Received: from bourbonsolo1 ([209.78.192.136])
by mta7.pltn13.pbi.net (iPlanet Messaging Server 5.1 (built May 7 2001))
with SMTP id <[email-masked]> for
[email-masked]; Mon, 15 Oct 2001 14:15:53 -0700 (PDT)
Date: Mon, 15 Oct 2001 14:15:32 -0700
From: Dean Ferreyra <[email-masked]>
Subject: [avr-gcc-list] compiling gcc under cygwin
To: [email-masked]
Reply-to: [email-masked]
Message-id: <[email-masked]>
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT
Importance: Normal
X-Priority: 3 (Normal)
X-MSMail-priority: Normal
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Roland,

I had the same problem and I also defined HAVE_SYS_ERRLIST to 1 in
(libiberty/strerror.c). I did notice that there was this in the generated
config.h file:

/* Define if you have the sys_errlist variable. */
/* #undef HAVE_SYS_ERRLIST */

It does not undefine HAVE_SYS_ERRLIST, but it does not define it anywhere
either. This worked for me and I'm back in business.

Regarding your "errors with the intermediate assember language files", if
you can be more specific maybe others can help.

Dean Ferryera
[email-masked]

-----Original Message-----
From: [email-masked]
[mailto:[email-masked]]On Behalf Of Roland Zitzke
Sent: Monday, October 15, 2001 6:12 AM
To: [email-masked]
Subject: [avr-gcc-list] compiling gcc under cygwin

Hi,
has anyone tried to compile the latest version of gcc (3.0.1 or the latest
snapshot) under cygwin?
I get some strange errors
for example
in libiberty/
I need to manually define HAVE_SYS_ERRLIST
to avoid conflicts resulting for static vs non-static definition of some
error constants.
I also get errors with the intermediate assember language files and I can't
fix those easily.
Any comments?

Rgds
Roland

From [email-masked] Tue Oct 16 11:13:22 2001
Received: from verden.pvv.ntnu.no ([129.241.210.224])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15tFz7-00016x-00
for <[email-masked]>; Tue, 16 Oct 2001 11:13:21 +1300
Received: (qmail 57262 invoked by uid 21029); 15 Oct 2001 22:16:12 -0000
To: [email-masked]
Subject: Re: [avr-gcc-list] In circuit debug under rh7 with stk200 dongle?
References: <[email-masked]> <[email-masked]>
From: Tor Ringstad <[email-masked]>
Date: 16 Oct 2001 00:16:11 +0200
In-Reply-To: Karsten Schmidt's message of "Mon, 15 Oct 2001 20:52:26 +0200"
Message-ID: <[email-masked]>
Lines: 23
X-Mailer: Gnus v5.7/Emacs 20.7
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Karsten Schmidt <[email-masked]> writes:

> I detected a "funny" behaviour, that the monitor does not work under
> kde (producing useless printouts and so on), so test the monitor
> first without any window-manager (anyway fvm works for me).

Hmm...I don't have a KDE system handy, so I don't think I'll get
around to debug this particular problem anytime soon. Would you have a
chance to give it a try? There are a couple of debug macros in mon.c
that can be enabled in order to get some more diagnostic information
while running.

> Maybe you have to try out different setting for the parallel
> port. Tor mentioned this somewhere in the readme.

If you're referring to the comment in mon.c ("Bugs: For me this work
only if Parellel port in EPP mode. May be ECP mode also work?"), this
was left by Denis Chertykov. Maybe he can explain its implications.
The parallel port's always worked ok for me, but then I haven't really
been experimenting much, either.

- Tor Ringstad -

From [email-masked] Tue Oct 16 21:48:44 2001
Received: from for.spb.ru ([195.201.69.16] helo=cyclone.eis.ru)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15tPtt-0001Vl-00
for <[email-masked]>; Tue, 16 Oct 2001 21:48:40 +1300
Received: (qmail 36998 invoked from network); 16 Oct 2001 08:53:38 -0000
Received: from good.for.spb.ru (HELO eis.ru) (195.201.69.80)
by for.spb.ru with SMTP; 16 Oct 2001 08:53:38 -0000
Date: Tue, 16 Oct 2001 12:49:48 +0400
From: Dmitry <[email-masked]>
To: Torsten Hahn <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] global vars
Message-Id: <[email-masked]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
Organization: eis.ru
X-Mailer: Sylpheed version 0.5.3 (GTK+ 1.2.8; i386-unknown-freebsd5.0)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

try

int tmp

asm volatile (
"lds r24 tmp \n\t"
"lds r25 (tmp)+1 \n\t"
"lds r26 (tmp)+2 \n\t"
"lds r27 (tmp)+3 \n\t"
...
"sts tmp, ...
"sts (tmp)+1, ...
);

at least it works in my case

On Mon, 15 Oct 2001 16:24:10 +0200
Torsten Hahn <[email-masked]> wrote:

> Hi,
>
> if i have have defined some global vars, can i access them in an inline
> assembler block ? I want do something like this:
>
> int tmp;
>
> int main(void)
> {
> ....
> _asm_("read/write/modify tmp here");
> ...
> }
>
> CU,
> Torsten.
> --
> Torsten Hahn / Chemnitzer Str. 4 / 09599 Freiberg / Germany
> mail: [email-masked]
> phone: (+49) 177 2181338
> pgp key avaiable at: http://math-www.uni-paderborn.de/pgpnet/wwwkeys.html
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

*********************************************************************
("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ
`6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys
(_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44
_..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia
(il),-'' (li),' ((!.-' +7 (812) 314-8860, 5585314
*********************************************************************

From [email-masked] Wed Oct 17 00:26:38 2001
Received: from relais.videotron.ca ([24.201.245.36] helo=VL-MS-MR003.sc1.videotron.ca)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15tSMo-0001cD-00
for <[email-masked]>; Wed, 17 Oct 2001 00:26:38 +1300
Received: from soleil99 ([66.130.84.47]) by
VL-MS-MR003.sc1.videotron.ca (Netscape Messaging Server 4.15
MR003 Jul 24 2001 16:23:26) with SMTP id GLAQKS01.NUR for
<[email-masked]>; Tue, 16 Oct 2001 07:29:16 -0400
Message-ID: <[email-masked]>
From: =?iso-8859-1?B?ZnJhbudvaXM=?= <[email-masked]>
To: <[email-masked]>
Date: Tue, 16 Oct 2001 07:25:05 -0400
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0018_01C15613.AD861EE0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Subject: [avr-gcc-list] avr-gcc list subscription
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_0018_01C15613.AD861EE0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I subscribe to avr-gcc list

------=_NextPart_000_0018_01C15613.AD861EE0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I subscribe to avr-gcc=20
list</FONT></DIV></BODY></HTML>

------=_NextPart_000_0018_01C15613.AD861EE0--

From [email-masked] Wed Oct 17 12:27:11 2001
Received: from lecs.cs.ucla.edu ([131.179.144.100] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15tdc6-00026Z-00
for <[email-masked]>; Wed, 17 Oct 2001 12:27:10 +1300
Received: from lark.lecs.cs.ucla.edu (lark.lecs.cs.ucla.edu [131.179.144.21])
by lecs.cs.ucla.edu (8.9.3/8.9.3) with ESMTP id QAA30753
for <[email-masked]>; Tue, 16 Oct 2001 16:29:57 -0700
Received: from lecs.cs.ucla.edu (localhost [127.0.0.1])
by lark.lecs.cs.ucla.edu (8.9.3/8.9.3) with ESMTP id QAA16546
for <[email-masked]>; Tue, 16 Oct 2001 16:29:56 -0700
Message-ID: <[email-masked]>
Date: Tue, 16 Oct 2001 16:29:56 -0700
From: Vladimir Bychkovskiy <[email-masked]>
X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.4.1 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Automatic fucnction stack depth measurment
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

Is there any way to make avr-gcc measure the size of the stack required
to run a given function?
I guess one could do this by looking at assembly code, but is there any
other [faster] way?

We need to allocate many data buffers as we can, but the stack "segment"
does not have a size limit... Our system starts to behave very funny
when part of the data gets overwritten... The exact instance of overrun
is hard to detect though.

Thanks in advance,
Vlad.

From [email-masked] Wed Oct 17 21:51:11 2001
Received: from atusks01.alcatel.at ([212.183.9.130] helo=mail.alcatel.at)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15tmPu-0002Qz-00
for <[email-masked]>; Wed, 17 Oct 2001 21:51:10 +1300
Received: from alcatel.at (atusel33.aut.alcatel.at [146.112.129.215])
by mail.alcatel.at (8.9.3/8.9.3/1.21 01/27/01 21:43:09) with ESMTP id KAA11662;
Wed, 17 Oct 2001 10:52:55 +0200 (MET DST)
Message-ID: <[email-masked]>
Date: Wed, 17 Oct 2001 10:52:54 +0200
From: Christoph Plattner <[email-masked]>
Organization: AAA
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.8 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
To: Dmitry <[email-masked]>
CC: Torsten Hahn <[email-masked]>, [email-masked]
Subject: Re: [avr-gcc-list] global vars
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Not fully correct !!!

Type "int" has only 16bits !!! NOT 32 !!!

Bye
Christoph P.

Dmitry wrote:
>
> try
>
> int tmp
>
> asm volatile (
> "lds r24 tmp \n\t"
> "lds r25 (tmp)+1 \n\t"
> "lds r26 (tmp)+2 \n\t"
> "lds r27 (tmp)+3 \n\t"
> ...
> "sts tmp, ...
> "sts (tmp)+1, ...
> );
>
> at least it works in my case
>
> On Mon, 15 Oct 2001 16:24:10 +0200
> Torsten Hahn <[email-masked]> wrote:
>
> > Hi,
> >
> > if i have have defined some global vars, can i access them in an inline
> > assembler block ? I want do something like this:
> >
> > int tmp;
> >
> > int main(void)
> > {
> > ....
> > _asm_("read/write/modify tmp here");
> > ...
> > }
> >
> > CU,
> > Torsten.
> > --
> > Torsten Hahn / Chemnitzer Str. 4 / 09599 Freiberg / Germany
> > mail: [email-masked]
> > phone: (+49) 177 2181338
> > pgp key avaiable at: http://math-www.uni-paderborn.de/pgpnet/wwwkeys.html
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > [email-masked]
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
> >
>
> *********************************************************************
> ("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ
> `6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys
> (_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44
> _..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia
> (il),-'' (li),' ((!.-' +7 (812) 314-8860, 5585314
> *********************************************************************
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
+--------V--------+ [email-masked]
| A L C A T E L | -----------------------------
+-----------------+ Phone: +43 1 27722 3706
T A S Fax: +43 1 27722 3955

From [email-masked] Wed Oct 17 22:03:16 2001
Received: from for.spb.ru ([195.201.69.16] helo=cyclone.eis.ru)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15tmbG-0002Ry-00
for <[email-masked]>; Wed, 17 Oct 2001 22:03:06 +1300
Received: (qmail 58307 invoked from network); 17 Oct 2001 09:05:18 -0000
Received: from good.for.spb.ru (HELO eis.ru) (195.201.69.80)
by for.spb.ru with SMTP; 17 Oct 2001 09:05:18 -0000
Date: Wed, 17 Oct 2001 13:03:59 +0400
From: Dmitry <[email-masked]>
To: Christoph Plattner <[email-masked]>
Cc: [email-masked], [email-masked]
Subject: Re: [avr-gcc-list] global vars
Message-Id: <[email-masked]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
<[email-masked]>
<[email-masked]>
Organization: eis.ru
X-Mailer: Sylpheed version 0.5.3 (GTK+ 1.2.8; i386-unknown-freebsd5.0)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

true.

I do prefer to use types declared in inttypes.h

so in the example below one has to declare tmp as (u)int32_t or long.
in case of in it reads as

int tmp

asm volatile (
"lds r24 tmp \n\t"
"lds r25 (tmp)+1 \n\t"
...
"sts tmp, ...
"sts (tmp)+1, ...
);

also, for faster math and stuff it seems to reasonable to use r24, r26, r28, r30 for low byte of tmp...
then tmp can be inctemented, etc. using just one line like

lds r26, tmp
lds r27, (tmp)+1
addiw r26, 1
sts tmp, r26
sts (tmp)+1, r27

Regards,
Dmitry

On Wed, 17 Oct 2001 10:52:54 +0200
Christoph Plattner <[email-masked]> wrote:

> Not fully correct !!!
>
> Type "int" has only 16bits !!! NOT 32 !!!
>
> Bye
> Christoph P.
>
>
>
> Dmitry wrote:
> >
> > try
> >
> > int tmp
> >
> > asm volatile (
> > "lds r24 tmp \n\t"
> > "lds r25 (tmp)+1 \n\t"
> > "lds r26 (tmp)+2 \n\t"
> > "lds r27 (tmp)+3 \n\t"
> > ...
> > "sts tmp, ...
> > "sts (tmp)+1, ...
> > );
> >
> > at least it works in my case
> >
> > On Mon, 15 Oct 2001 16:24:10 +0200
> > Torsten Hahn <[email-masked]> wrote:
> >
> > > Hi,
> > >
> > > if i have have defined some global vars, can i access them in an inline
> > > assembler block ? I want do something like this:
> > >
> > > int tmp;
> > >
> > > int main(void)
> > > {
> > > ....
> > > _asm_("read/write/modify tmp here");
> > > ...
> > > }
> > >
> > > CU,
> > > Torsten.
> > > --
> > > Torsten Hahn / Chemnitzer Str. 4 / 09599 Freiberg / Germany
> > > mail: [email-masked]
> > > phone: (+49) 177 2181338
> > > pgp key avaiable at: http://math-www.uni-paderborn.de/pgpnet/wwwkeys.html
> > >
> > > _______________________________________________
> > > avr-gcc-list mailing list
> > > [email-masked]
> > > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
> > >
> >
> > *********************************************************************
> > ("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ
> > `6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys
> > (_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44
> > _..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia
> > (il),-'' (li),' ((!.-' +7 (812) 314-8860, 5585314
> > *********************************************************************
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > [email-masked]
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
> --
> +--------V--------+ [email-masked]
> | A L C A T E L | -----------------------------
> +-----------------+ Phone: +43 1 27722 3706
> T A S Fax: +43 1 27722 3955
>

*********************************************************************
("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ
`6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys
(_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44
_..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia
(il),-'' (li),' ((!.-' +7 (812) 314-8860, 5585314
*********************************************************************

From [email-masked] Thu Oct 18 05:22:12 2001
Received: from [209.235.58.166] (helo=artemisgroup.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ttSN-0002kH-00
for <[email-masked]>; Thu, 18 Oct 2001 05:22:11 +1300
Received: from c11030-a.scllg1.pa.home.com (c11030-a.scllg1.pa.home.com [24.15.29.78])
by artemisgroup.com (Postfix) with ESMTP id B63DA7B85
for <[email-masked]>; Wed, 17 Oct 2001 12:25:11 -0400 (EDT)
Date: Wed, 17 Oct 2001 12:24:11 -0400 (EDT)
From: Patrick Lanphier <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] Interfacing LCD/ADC/Servos
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I'm looking to get started on my first microporcessor project with GCC and
the AVR.2313. I will be connecting to one of Analog Devices 16 bit ADC
converters, one servo and an LCD to start. I would like to start by
getting the LCD working. Where can I find libraries to do this? Next
where can I find libraries for interfacing the the ADC and servos? Thank
you very much for your help.

Patrick Lanphier
The Artemis Group
http://www.artemisgroup.com
phone: 814-235-0444
fax: 800-582-9710

From [email-masked] Thu Oct 18 19:22:51 2001
Received: from r220-1.rz.rwth-aachen.de ([134.130.3.31])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15u6Zu-0003JM-00
for <[email-masked]>; Thu, 18 Oct 2001 19:22:51 +1300
Received: from r220-1.rz.RWTH-Aachen.DE (relay2.RWTH-Aachen.DE [134.130.3.1])
by r220-1.rz.RWTH-Aachen.DE (8.10.1/8.11.3-2) with ESMTP id f9I6Poj23402
for <[email-masked]>; Thu, 18 Oct 2001 08:25:50 +0200 (MEST)
Received: from Ostermann-net.de (pD952C825.dip.t-dialin.net [217.82.200.37])
by r220-1.rz.RWTH-Aachen.DE (8.10.1/8.11.3/6) with SMTP id f9I6Pno23389
for <[email-masked]>; Thu, 18 Oct 2001 08:25:49 +0200 (MEST)
Message-Id: <[email-masked]>
Date: Thu, 18 Oct 2001 07:57:55 +0200
From: Thorsten Ostermann <[email-masked]>
To: [email-masked]
X-Mailer: Thorsten Ostermann's registered AK-Mail 3.1 publicbeta2a [ger]
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] Re: Interfacing LCD/ADC/Servos
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Patrick!

> I'm looking to get started on my first microporcessor project with
> GCC and the AVR.2313. I will be connecting to one of Analog Devices
> 16 bit ADC converters, one servo and an LCD to start. I would like
> to start by getting the LCD working. Where can I find libraries to
> do this?

Vorker Oth as dinen that:
http://8bit.at/avr/ (site is available both in german and english)
It's easy to adjust to other processors and pinouts. It includes only
basic routines (e.g. no selfdefined symbols and stuff like that).

Best regards
Thorsten
--
PGP welcome!
Thorsten online: http://www.ostermann-net.de/electronic/
Rund um Schrittmotor, Fr=E4s-Bohr-Plotter & Mikrocontroller

From [email-masked] Thu Oct 18 22:03:48 2001
Received: from mail.ams.de ([195.30.77.11] helo=[192.168.90.11])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15u95f-0003Pg-00
for <[email-masked]>; Thu, 18 Oct 2001 22:03:48 +1300
Received: from adva-mailer.munich.adva.com (unverified) by
(Content Technologies SMTPRS 4.2.1) with ESMTP id <T56abe3b5bcc0a85a0b4a0@> for <[email-masked]>;
Thu, 18 Oct 2001 11:03:34 +0200
Received: by adva-mailer.munich.adva.com with Internet Mail Service (5.5.2653.19)
id <TL1QB2TR>; Thu, 18 Oct 2001 11:00:08 +0200
Message-ID: <[email-masked]>
From: Stefan Wimmer <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Date: Thu, 18 Oct 2001 11:05:44 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
charset="iso-8859-1"
Subject: [avr-gcc-list] RE: Interfacing LCD/ADC/Servos
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

From: Patrick Lanphier <[email-masked]>

> I'm looking to get started on my first microporcessor project
> with GCC and the AVR.2313. I will be connecting to one of
> Analog Devices 16 bit ADC converters, one servo and an LCD to
> start. I would like to start by getting the LCD working.
>
> Where can I find libraries to do this? Next
> where can I find libraries for interfacing the the ADC and
> servos?

Now, tell us a littel more about the application and you'll get the whole
source code from the mailing list... :)

Honestly:
Have a look at Dave van Horns "Getting started Code" and you'll find your
LCD and (RC-)Servo routines. "One of Analog Devices 16 bit ADC" has either a
parallel (needs lotsa pins) or - more probable - some kind of serial
interface. Both should be easy to implement yourself if it isn't already in
the "Getting started.." too.

From [email-masked] Thu Oct 18 00:52:27 2001
Received: from [203.199.70.93] (helo=web8006.mail.in.yahoo.com)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15tpFK-0002ZP-00
for <[email-masked]>; Thu, 18 Oct 2001 00:52:26 +1300
Message-ID: <[email-masked]>
Received: from [192.35.17.20] by web8006.mail.in.yahoo.com via HTTP; Wed, 17 Oct 2001 12:54:52 BST
Date: Wed, 17 Oct 2001 12:54:52 +0100 (BST)
From: =?iso-8859-1?q?S=20S?= <[email-masked]>
To: [email-masked]
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Subject: [avr-gcc-list] Avoiding memory initialization
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Everybody,

I am using Atmega103. I have declared an array of char
which I do not wish to get initialized on every CPU
reset signal. I am keeping some acquired data here. In
short I want to use this array as battery backed up
RAM. However startup code clears the entire bss
section on every reset signal. Is there a way to avoid
this? Can somebody provide me source code to do the
same?

Thanks.
Sean.

____________________________________________________________
*NEW* Connect to Yahoo! Messenger through your mobile phone *NEW*
Visit http://in.mobile.yahoo.com/smsmgr_signin.html

From [email-masked] Fri Oct 19 05:25:38 2001
Received: from 208-58-86-11.c3-0.sfo-ubr1.sfrn-sfo.ca.cable.rcn.com ([208.58.86.11] helo=bc.home.246gt.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15uFzF-0003iJ-00
for <[email-masked]>; Fri, 19 Oct 2001 05:25:37 +1300
Received: from fred.home.246gt.com (fred.home.246gt.com [10.0.0.74])
by bc.home.246gt.com (8.11.3/8.11.3) with ESMTP id f9IGSfK83600
for <[email-masked]>; Thu, 18 Oct 2001 09:28:41 -0700 (PDT)
(envelope-from [email-masked])
Received: (from ken@localhost)
by fred.home.246gt.com (8.11.2/8.11.2) id f9IGTTO11488
for [email-masked]; Thu, 18 Oct 2001 09:29:29 -0700
X-Authentication-Warning: fred.home.246gt.com: ken set sender to [email-masked] using -f
Date: Thu, 18 Oct 2001 09:29:29 -0700
From: ken restivo <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: application/pgp; x-action=sign; format=text
Content-Disposition: inline; filename="msg.pgp"
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Thu, Oct 18, 2001 at 12:01:10PM +1300
Subject: [avr-gcc-list] gdb 5.0 not building, avrsim looking for micro asm?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

two questions, if i may.

1) avrsim regularly complains about "File is not standard Micro Asm Output File" how can i generate such a beast? i looked in docs for avr-ld and avr-objcopy and found no mention of a Micro Asm format. i have tried binary and a few other formats, avrsim is still not happy.

2) i have been trying to build gdb 5.0 with the gdb-5.0-avr-patch-0.0.gz.
./configure --target=avr fails:
linking ./config/i386/xm-linux.h to xm.h
to tm.h./config/avr/tm-avr.h
: File not found: ./config/avr/tm-avr.h
Configure in /usr/src/gdb-5.0/gdb failed, exiting.

sure enough, config/avr is empty. wha?

the patch applied with no errors, too.

i am obviously missing a step somewhere in the build. any help would be appreciated.

thanks!

- -ken
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7zwNoe8HF+6xeOIcRAuSCAKDy576qpY9MjDlA+CcNjrG1T3QbpgCcCSRg
M3hBGRB/5SPqb03D5Cra2Yw=
=u8OG
-----END PGP SIGNATURE-----

From [email-masked] Fri Oct 19 13:03:58 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15uN8o-00044N-00
for <[email-masked]>; Fri, 19 Oct 2001 13:03:58 +1300
Received: from jpk1.jpk.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id f9J07Ar21222
for <[email-masked]>; Fri, 19 Oct 2001 13:07:10 +1300
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Fri, 19 Oct 2001 13:06:37 +1300
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] gdb 5.0 not building, avrsim looking for
micro asm?
In-Reply-To: <[email-masked]>
References: <[email-masked]>
<[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

At 09:29 18/10/2001 -0700, ken restivo wrote
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>two questions, if i may.
>
>1) avrsim regularly complains about "File is not standard Micro Asm
>Output File" how can i generate such a beast? i looked in docs for avr-ld
>and avr-objcopy and found no mention of a Micro Asm format. i have tried
>binary and a few other formats, avrsim is still not happy.

Not sure which simulator you are trying to use, Micro Asm format is what
AVA (http://medo.fov.uni-mb.si/mapp/uTools/index.html) produces and it was
replaced by the gnu assembler in binutils a long time ago. There is some
work going on at the moment to get a simulator working with gdb-5.0, it
will be some weeks/months yet I think.

>2) i have been trying to build gdb 5.0 with the gdb-5.0-avr-patch-0.0.gz.
>./configure --target=avr fails:
> linking ./config/i386/xm-linux.h to xm.h
> to tm.h./config/avr/tm-avr.h
> : File not found: ./config/avr/tm-avr.h
> Configure in /usr/src/gdb-5.0/gdb failed, exiting.
>
> sure enough, config/avr is empty. wha?
>
>the patch applied with no errors, too.
>
>i am obviously missing a step somewhere in the build. any help would be
>appreciated.

Grab patch-0.1 from http://avr.jpk.co.nz/gdb-5.0-avr-patch-0.1.gz which has
proper unix formatting, slight cockup in patch-0.0 thanks to those
wonderful CR's in dos/win.

Cheers,

Jason Kyle

PS your email arrived as an attachment .pgp file, would be better to send
plain text to the list.

From [email-masked] Fri Oct 19 19:40:01 2001
Received: from ns0.ipal.net
([206.97.148.120] helo=vega.ipal.net ident=postfix)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15uTK4-0004JY-00
for <[email-masked]>; Fri, 19 Oct 2001 19:40:00 +1300
Received: by vega.ipal.net (Postfix, from userid 700)
id AB1AF23C; Fri, 19 Oct 2001 01:43:07 -0500 (CDT)
Received: from localhost (localhost [127.0.0.1])
by vega.ipal.net (Postfix) with ESMTP id AA2B2238
for <[email-masked]>; Fri, 19 Oct 2001 01:43:07 -0500 (CDT)
Date: Fri, 19 Oct 2001 01:43:07 -0500 (CDT)
From: Chris Baugher <[email-masked]>
X-Sender: [email-masked]
To: [email-masked]
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] Problem with interrupt handler?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi everyone,

I recently decided to try building some projects using the AVR chips and
have been trying to get some simple test code to run on an at90s2313. I'm
using avr-gcc 3.0.1 and binutils 2.11.2. The problem comes when I try to
compile a program that has an interrupt routine declared. When I try to
run the code on the chip I get all kinds of eratic behaviour, meaning it
doesn't do what it's supposed to.
So after poking around here is what I think.

This is the program I'm trying to run:

/* START */

#include <io.h>
#include <interrupt.h>
#include <sig-avr.h>
#include <timer.h>

static unsigned char ix=0;

SIGNAL(SIG_OVERFLOW0)
{
++ix;
}

void main(void)
{
outp(0xFF,DDRB); /* set port B for output mode */

outp(0xFF,DDRD);

for(;;) {
outp(ix,PORTD);
}
}
/* END */

NOTICE!! Interrupts are never enabled so the ISR should never execute, but
I think it does! Below is the list file generated by the assembler. It
sure looks to me like the ISR is the very first thing executed.

GAS LISTING dro.s page 1

1 .file "dro.c"
2 .arch at90s2313
3 __SREG__ = 0x3f
4 __SP_H__ = 0x3e
5 __SP_L__ = 0x3d
6 __tmp_reg__ = 0
7 __zero_reg__ = 1
8 _PC_ = 2
9 .data
10 .type ix,@object
11 .size ix,1
12 ix:
13 0000 00 .byte 0
14 .text
15 .global _overflow0_
16 .type _overflow0_,@function
17 _overflow0_:
18 /* prologue: frame size=0 */
19 0000 1F92 push __zero_reg__
20 0002 0F92 push __tmp_reg__
21 0004 0FB6 in __tmp_reg__,__SREG__
22 0006 0F92 push __tmp_reg__
23 0008 1124 clr __zero_reg__
24 000a 8F93 push r24
25 /* prologue end (size=6) */
26 000c 8091 0000 lds r24,ix
27 0010 8F5F subi r24,lo8(-(1))
28 0012 8093 0000 sts ix,r24
29 /* epilogue: frame size=0 */
30 0016 8F91 pop r24
31 0018 0F90 pop __tmp_reg__
32 001a 0FBE out __SREG__,__tmp_reg__
33 001c 0F90 pop __tmp_reg__
34 001e 1F90 pop __zero_reg__
35 0020 1895 reti
36 /* epilogue end (size=6) */
37 /* function _overflow0_ size 17 (5) */
38 .Lfe1:
39 .size _overflow0_,.Lfe1-_overflow0_
40 .global main
41 .type main,@function
42 main:
43 /* prologue: frame size=0 */
44 0022 C0E0 ldi r28,lo8(__stack - 0)
45 0024 D0E0 ldi r29,hi8(__stack - 0)
46 0026 DEBF out __SP_H__,r29
47 0028 CDBF out __SP_L__,r28
48 /* prologue end (size=4) */
49 002a 8FEF ldi r24,lo8(-1)
50 /* #APP */
51 002c 87BB out 23,r24
52 002e 81BB out 17,r24
53 /* #NOAPP */
54 0030 8091 0000 lds r24,ix
55 .L43:
56 /* #APP */
57 0034 82BB out 18,r24
GAS LISTING dro.s page 2

58 /* #NOAPP */
59 0036 FECF rjmp .L43
60 /* epilogue: frame size=0 */
61 __stop_progIi__:
62 0038 FFCF rjmp __stop_progIi__
63 /* epilogue end (size=1) */
64 /* function main size 15 (10) */
65 .Lfe2:
66 .size main,.Lfe2-main
67 /* File dro.c: code 32 = 0x0020 ( 15), prologues 10, epilogues 7 */
GAS LISTING dro.s page 3

DEFINED SYMBOLS
*ABS*:00000000 dro.c
*ABS*:0000003f __SREG__
*ABS*:0000003e __SP_H__
*ABS*:0000003d __SP_L__
*ABS*:00000000 __tmp_reg__
*ABS*:00000001 __zero_reg__
*ABS*:00000002 _PC_
dro.s:12 .data:00000000 ix
dro.s:17 .text:00000000 _overflow0_
dro.s:42 .text:00000022 main
dro.s:61 .text:00000038 __stop_progIi__
*ABS*:00000000 *ABS*

UNDEFINED SYMBOLS
__stack

Looking at this list file it sure looks like the program starts at line 19
which is a push instruction. Isn't the first instruction supposed to be a
jump to the main routine? Am I missing something? I can give more info if
needed.

Thanks!

Chris|

From [email-masked] Fri Oct 19 20:27:45 2001
Received: from varis.cs.tut.fi
([130.230.4.42] helo=cs.tut.fi ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15uU4F-0004Li-00
for <[email-masked]>; Fri, 19 Oct 2001 20:27:44 +1300
Received: from orfeuskerttu.cs.tut.fi ([email-masked] [130.230.2.34])
by cs.tut.fi (8.8.8/8.8.8) with ESMTP id KAA22978;
Fri, 19 Oct 2001 10:30:49 +0300 (EET DST)
From: Kujala Matti <[email-masked]>
Received: (from ear@localhost)
by orfeuskerttu.cs.tut.fi (8.8.5/8.8.4)
id KAA09034; Fri, 19 Oct 2001 10:30:49 +0300 (EET DST)
Message-Id: <[email-masked]>
Subject: Re: [avr-gcc-list] Problem with interrupt handler?
In-Reply-To: <[email-masked]> from Chris Baugher at "Oct 19, 2001 01:43:07 am"
To: [email-masked] (Chris Baugher)
Date: Fri, 19 Oct 2001 10:30:49 +0300 (EET DST)
Cc: [email-masked]
X-Mailer: ELM [version 2.4ME+ PL49 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>
> Hi everyone,
>
> I recently decided to try building some projects using the AVR chips and
> have been trying to get some simple test code to run on an at90s2313. I'm
> using avr-gcc 3.0.1 and binutils 2.11.2. The problem comes when I try to
> compile a program that has an interrupt routine declared. When I try to
> run the code on the chip I get all kinds of eratic behaviour, meaning it
> doesn't do what it's supposed to.
> So after poking around here is what I think.

<clip>

> Looking at this list file it sure looks like the program starts at line 19
> which is a push instruction. Isn't the first instruction supposed to be a
> jump to the main routine? Am I missing something? I can give more info if
> needed.

It looks like for some reason your code is not linked with c-runtime code
(something like crt2313.o). Interrupt vector initializations and jump to
main is done there.

--
What sorcery, what spells, have brought thee here?

From [email-masked] Fri Oct 19 20:51:12 2001
Received: from ns0.ipal.net
([206.97.148.120] helo=vega.ipal.net ident=postfix)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15uUQy-0004N7-00
for <[email-masked]>; Fri, 19 Oct 2001 20:51:12 +1300
Received: by vega.ipal.net (Postfix, from userid 700)
id EC6DC23C; Fri, 19 Oct 2001 02:54:19 -0500 (CDT)
Received: from localhost (localhost [127.0.0.1])
by vega.ipal.net (Postfix) with ESMTP
id EA26F238; Fri, 19 Oct 2001 02:54:19 -0500 (CDT)
Date: Fri, 19 Oct 2001 02:54:19 -0500 (CDT)
From: Chris Baugher <[email-masked]>
X-Sender: [email-masked]
To: Kujala Matti <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Problem with interrupt handler?
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Fri, 19 Oct 2001, Kujala Matti wrote:
> >
> > Hi everyone,
> >
> > I recently decided to try building some projects using the AVR chips and
> > have been trying to get some simple test code to run on an at90s2313. I'm
> > using avr-gcc 3.0.1 and binutils 2.11.2. The problem comes when I try to
> > compile a program that has an interrupt routine declared. When I try to
> > run the code on the chip I get all kinds of eratic behaviour, meaning it
> > doesn't do what it's supposed to.
> > So after poking around here is what I think.
>
> <clip>
>
> > Looking at this list file it sure looks like the program starts at line 19
> > which is a push instruction. Isn't the first instruction supposed to be a
> > jump to the main routine? Am I missing something? I can give more info if
> > needed.
>
> It looks like for some reason your code is not linked with c-runtime code
> (something like crt2313.o). Interrupt vector initializations and jump to
> main is done there.

A few minutes after writing that mail I started thinking along those
lines. This is the sequence of commands I use for compiling etc..

fluke:~/dro$ make
avr-gcc -mmcu=at90s2313 -O2 -Wall -S -Wstrict-prototypes \
-I/usr/local/avr/include -c dro.c
dro.c:55: warning: return type of `main' is not `int'
avr-as -gstabs -mmcu=at90s2313 -ahlms=dro.lst dro.s -o dro.o \
-I/usr/local/avr/lib/
avr-ld -Map dro.map -o dro dro.o
avr-objcopy -g --output-target=ihex dro dro.ihex
fluke:~/dro$

Does this look reasonable?

C|

>
> --
> What sorcery, what spells, have brought thee here?
>

From [email-masked] Fri Oct 19 22:18:33 2001
Received: from mailout02.sul.t-online.com ([194.25.134.17] helo=mailout02.sul.t-online.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15uVnU-0004RH-00
for <[email-masked]>; Fri, 19 Oct 2001 22:18:32 +1300
Received: from fwd02.sul.t-online.de
by mailout02.sul.t-online.de with smtp
id 15uVqW-0007N5-02; Fri, 19 Oct 2001 11:21:40 +0200
Received: from krajenski.de (520059590703-0001@[217.81.138.143]) by fmrl02.sul.t-online.com
with smtp id 15uVqG-0jfUbAC; Fri, 19 Oct 2001 11:21:24 +0200
Received: (qmail 633 invoked by uid 1000); 19 Oct 2001 09:21:14 -0000
Date: Fri, 19 Oct 2001 11:21:14 +0200
From: Clemens Gerlach <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] Problem with interrupt handler?
Message-ID: <[email-masked]>
Mail-Followup-To: [email-masked]
References: <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Fri, Oct 19, 2001 at 02:54:19AM -0500
X-Sender: [email-masked]
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Fri, Oct 19, 2001 at 02:54:19AM -0500, Chris Baugher wrote:

> > It looks like for some reason your code is not linked with c-runtime code
> > (something like crt2313.o). Interrupt vector initializations and jump to
> > main is done there.
>
> A few minutes after writing that mail I started thinking along those
> lines. This is the sequence of commands I use for compiling etc..
>
>
> fluke:~/dro$ make
> avr-gcc -mmcu=at90s2313 -O2 -Wall -S -Wstrict-prototypes \
> -I/usr/local/avr/include -c dro.c
> dro.c:55: warning: return type of `main' is not `int'
> avr-as -gstabs -mmcu=at90s2313 -ahlms=dro.lst dro.s -o dro.o \
> -I/usr/local/avr/lib/
> avr-ld -Map dro.map -o dro dro.o
> avr-objcopy -g --output-target=ihex dro dro.ihex
> fluke:~/dro$
>
>
> Does this look reasonable?

you do not link the startup code (crts2313.o). the interrupt jump table and
other setup code (e.g stack initialisation) is located there.

simply use avr-gcc to link your object files (e.g.):

avr-gcc -mmcu=at90s4433 -Wall -O9 -o flow.o -c flow.c # no -S here
avr-gcc -mmcu=at90s4433 -Wall -O9 -o main.elf flow.o # use to call linker
# also links runtime code
avr-objcopy -O srec main.elf main.srec # maybe change to ihex

your milage may vary.

clemens

From [email-masked] Sat Oct 20 03:56:15 2001
Received: from smtp02.hk.linkage.net ([202.76.4.21])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ub4I-0004gP-00
for <[email-masked]>; Sat, 20 Oct 2001 03:56:15 +1300
Received: from vita.hk.net ([email-masked] [152.101.101.101])
by smtp02.hk.linkage.net (8.10.2/8.10.2) with SMTP id f9JF37d03673
for <[email-masked]>; Fri, 19 Oct 2001 23:03:07 +0800 (HKT)
Date: Fri, 19 Oct 2001 22:59:19 +0800 (HKT)
From: Lai Kang Tin <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] Problem with interrupt handler?
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

You didn't initialize the timer, and enable the CPU interrupt in
main function before the for loop.

Kang Tin LAI

On Fri, 19 Oct 2001, Chris Baugher wrote:

>
> Hi everyone,
>
> I recently decided to try building some projects using the AVR chips and
> have been trying to get some simple test code to run on an at90s2313. I'm
> using avr-gcc 3.0.1 and binutils 2.11.2. The problem comes when I try to
> compile a program that has an interrupt routine declared. When I try to
> run the code on the chip I get all kinds of eratic behaviour, meaning it
> doesn't do what it's supposed to.
> So after poking around here is what I think.
>
> This is the program I'm trying to run:
>
>
> /* START */
>
> #include <io.h>
> #include <interrupt.h>
> #include <sig-avr.h>
> #include <timer.h>
>
> static unsigned char ix=0;
>
> SIGNAL(SIG_OVERFLOW0)
> {
> ++ix;
> }
>
> void main(void)
> {
> outp(0xFF,DDRB); /* set port B for output mode */
>
> outp(0xFF,DDRD);
>
> for(;;) {
> outp(ix,PORTD);
> }
> }
> /* END */
>
>
> NOTICE!! Interrupts are never enabled so the ISR should never execute, but
> I think it does! Below is the list file generated by the assembler. It
> sure looks to me like the ISR is the very first thing executed.
>
>
>
> GAS LISTING dro.s page 1
>
>
> 1 .file "dro.c"
> 2 .arch at90s2313
> 3 __SREG__ = 0x3f
> 4 __SP_H__ = 0x3e
> 5 __SP_L__ = 0x3d
> 6 __tmp_reg__ = 0
> 7 __zero_reg__ = 1
> 8 _PC_ = 2
> 9 .data
> 10 .type ix,@object
> 11 .size ix,1
> 12 ix:
> 13 0000 00 .byte 0
> 14 .text
> 15 .global _overflow0_
> 16 .type _overflow0_,@function
> 17 _overflow0_:
> 18 /* prologue: frame size=0 */
> 19 0000 1F92 push __zero_reg__
> 20 0002 0F92 push __tmp_reg__
> 21 0004 0FB6 in __tmp_reg__,__SREG__
> 22 0006 0F92 push __tmp_reg__
> 23 0008 1124 clr __zero_reg__
> 24 000a 8F93 push r24
> 25 /* prologue end (size=6) */
> 26 000c 8091 0000 lds r24,ix
> 27 0010 8F5F subi r24,lo8(-(1))
> 28 0012 8093 0000 sts ix,r24
> 29 /* epilogue: frame size=0 */
> 30 0016 8F91 pop r24
> 31 0018 0F90 pop __tmp_reg__
> 32 001a 0FBE out __SREG__,__tmp_reg__
> 33 001c 0F90 pop __tmp_reg__
> 34 001e 1F90 pop __zero_reg__
> 35 0020 1895 reti
> 36 /* epilogue end (size=6) */
> 37 /* function _overflow0_ size 17 (5) */
> 38 .Lfe1:
> 39 .size _overflow0_,.Lfe1-_overflow0_
> 40 .global main
> 41 .type main,@function
> 42 main:
> 43 /* prologue: frame size=0 */
> 44 0022 C0E0 ldi r28,lo8(__stack - 0)
> 45 0024 D0E0 ldi r29,hi8(__stack - 0)
> 46 0026 DEBF out __SP_H__,r29
> 47 0028 CDBF out __SP_L__,r28
> 48 /* prologue end (size=4) */
> 49 002a 8FEF ldi r24,lo8(-1)
> 50 /* #APP */
> 51 002c 87BB out 23,r24
> 52 002e 81BB out 17,r24
> 53 /* #NOAPP */
> 54 0030 8091 0000 lds r24,ix
> 55 .L43:
> 56 /* #APP */
> 57 0034 82BB out 18,r24
> GAS LISTING dro.s page 2
>
>
> 58 /* #NOAPP */
> 59 0036 FECF rjmp .L43
> 60 /* epilogue: frame size=0 */
> 61 __stop_progIi__:
> 62 0038 FFCF rjmp __stop_progIi__
> 63 /* epilogue end (size=1) */
> 64 /* function main size 15 (10) */
> 65 .Lfe2:
> 66 .size main,.Lfe2-main
> 67 /* File dro.c: code 32 = 0x0020 ( 15), prologues 10, epilogues 7 */
> GAS LISTING dro.s page 3
>
>
> DEFINED SYMBOLS
> *ABS*:00000000 dro.c
> *ABS*:0000003f __SREG__
> *ABS*:0000003e __SP_H__
> *ABS*:0000003d __SP_L__
> *ABS*:00000000 __tmp_reg__
> *ABS*:00000001 __zero_reg__
> *ABS*:00000002 _PC_
> dro.s:12 .data:00000000 ix
> dro.s:17 .text:00000000 _overflow0_
> dro.s:42 .text:00000022 main
> dro.s:61 .text:00000038 __stop_progIi__
> *ABS*:00000000 *ABS*
>
> UNDEFINED SYMBOLS
> __stack
>
>
>
> Looking at this list file it sure looks like the program starts at line 19
> which is a push instruction. Isn't the first instruction supposed to be a
> jump to the main routine? Am I missing something? I can give more info if
> needed.
>
> Thanks!
>
> Chris|
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

K.T.LAI
[email-masked]

From [email-masked] Sat Oct 20 04:09:18 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ubGv-0004hY-00
for <[email-masked]>; Sat, 20 Oct 2001 04:09:17 +1300
Received: (from j@localhost)
by ida.interface-business.de id f9JFCOs24876;
Fri, 19 Oct 2001 17:12:24 +0200 (MET DST)
Date: Fri, 19 Oct 2001 17:12:24 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] Problem with interrupt handler?
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Chris Baugher <[email-masked]> wrote:

> static unsigned char ix=0;
>
> SIGNAL(SIG_OVERFLOW0)
> {
> ++ix;
> }

Btw., the variable `ix' should be declared `volatile'.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Sat Oct 20 04:09:37 2001
Received: from smtp02.hk.linkage.net ([202.76.4.21])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ubHE-0004he-00
for <[email-masked]>; Sat, 20 Oct 2001 04:09:37 +1300
Received: from vita.hk.net ([email-masked] [152.101.101.101])
by smtp02.hk.linkage.net (8.10.2/8.10.2) with SMTP id f9JFGTd05556
for <[email-masked]>; Fri, 19 Oct 2001 23:16:30 +0800 (HKT)
Date: Fri, 19 Oct 2001 23:12:41 +0800 (HKT)
From: Lai Kang Tin <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] Avoiding memory initialization
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

There is a loop inside the C startup code for zeroing the bss segment,
to realize your requirement, you need to modify the C startup code
for your own. The startup code uses symbol __bss_end to stop the zeroing loop,
you change it to (__bss_end - 10), ten bytes assumed for your application.

To access these 10 bytes storage, use pointer in your codes:

extern unsigned __bss_end;
char *pointer = (char *)(&__bss_end - 10);

void func()
{
*pointer = 0x12;
}

Cheers!

Kang Tin LAI

On Wed, 17 Oct 2001, [iso-8859-1] S S wrote:

> Hello Everybody,
>
> I am using Atmega103. I have declared an array of char
> which I do not wish to get initialized on every CPU
> reset signal. I am keeping some acquired data here. In
> short I want to use this array as battery backed up
> RAM. However startup code clears the entire bss
> section on every reset signal. Is there a way to avoid
> this? Can somebody provide me source code to do the
> same?
>
> Thanks.
> Sean.
>
> ____________________________________________________________
> *NEW* Connect to Yahoo! Messenger through your mobile phone *NEW*
> Visit http://in.mobile.yahoo.com/smsmgr_signin.html
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

K.T.LAI
[email-masked]

From [email-masked] Sat Oct 20 04:35:02 2001
Received: from smtp02.hk.linkage.net ([202.76.4.21])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ubfp-0004jP-00
for <[email-masked]>; Sat, 20 Oct 2001 04:35:01 +1300
Received: from vita.hk.net ([email-masked] [152.101.101.101])
by smtp02.hk.linkage.net (8.10.2/8.10.2) with SMTP id f9JFftd09384
for <[email-masked]>; Fri, 19 Oct 2001 23:41:55 +0800 (HKT)
Date: Fri, 19 Oct 2001 23:38:07 +0800 (HKT)
From: Lai Kang Tin <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] Avoiding memory initialization
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I am sorry, it isn't working. You need not to modify anything, the simplest
way to do it:

extern unsigned __bss_end;
char *pointer = (char *)(&__bss_end + 1);

void func()
{
*pointer = 0x12;
*(pointer + 1) = 0x34;
...
}

The storage between __bss_start and __bss_end is for all variables of you
application, and will be zero by C startup code of avr lib. After __bss_end
to the rest of RAM, it is free for you.

Cheers!

kang Tin LAI

On Fri, 19 Oct 2001, Lai Kang Tin wrote:

> Hi,
>
> There is a loop inside the C startup code for zeroing the bss segment,
> to realize your requirement, you need to modify the C startup code
> for your own. The startup code uses symbol __bss_end to stop the zeroing loop,
> you change it to (__bss_end - 10), ten bytes assumed for your application.
>
> To access these 10 bytes storage, use pointer in your codes:
>
> extern unsigned __bss_end;
> char *pointer = (char *)(&__bss_end - 10);
>
> void func()
> {
> *pointer = 0x12;
> }
>
> Cheers!
>
> Kang Tin LAI
>
> On Wed, 17 Oct 2001, [iso-8859-1] S S wrote:
>
> > Hello Everybody,
> >
> > I am using Atmega103. I have declared an array of char
> > which I do not wish to get initialized on every CPU
> > reset signal. I am keeping some acquired data here. In
> > short I want to use this array as battery backed up
> > RAM. However startup code clears the entire bss
> > section on every reset signal. Is there a way to avoid
> > this? Can somebody provide me source code to do the
> > same?
> >
> > Thanks.
> > Sean.
> >
> > ____________________________________________________________
> > *NEW* Connect to Yahoo! Messenger through your mobile phone *NEW*
> > Visit http://in.mobile.yahoo.com/smsmgr_signin.html
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > [email-masked]
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
> >
>
> K.T.LAI
> [email-masked]
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

K.T.LAI
[email-masked]

From [email-masked] Sat Oct 20 04:43:41 2001
Received: from ns0.ipal.net
([206.97.148.120] helo=vega.ipal.net ident=postfix)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15uboD-0004kF-00
for <[email-masked]>; Sat, 20 Oct 2001 04:43:41 +1300
Received: by vega.ipal.net (Postfix, from userid 700)
id 3AF7623C; Fri, 19 Oct 2001 10:46:49 -0500 (CDT)
Received: from localhost (localhost [127.0.0.1])
by vega.ipal.net (Postfix) with ESMTP
id 3A435238; Fri, 19 Oct 2001 10:46:49 -0500 (CDT)
Date: Fri, 19 Oct 2001 10:46:49 -0500 (CDT)
From: Chris Baugher <[email-masked]>
X-Sender: [email-masked]
To: Clemens Gerlach <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Problem with interrupt handler?
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Fri, 19 Oct 2001, Clemens Gerlach wrote:

> On Fri, Oct 19, 2001 at 02:54:19AM -0500, Chris Baugher wrote:
> >
> > fluke:~/dro$ make
> > avr-gcc -mmcu=at90s2313 -O2 -Wall -S -Wstrict-prototypes \
> > -I/usr/local/avr/include -c dro.c
> > dro.c:55: warning: return type of `main' is not `int'
> > avr-as -gstabs -mmcu=at90s2313 -ahlms=dro.lst dro.s -o dro.o \
> > -I/usr/local/avr/lib/
> > avr-ld -Map dro.map -o dro dro.o
> > avr-objcopy -g --output-target=ihex dro dro.ihex
> > fluke:~/dro$
> >
> >
> > Does this look reasonable?
>
> you do not link the startup code (crts2313.o). the interrupt jump table and
> other setup code (e.g stack initialisation) is located there.
>
> simply use avr-gcc to link your object files (e.g.):
>
> avr-gcc -mmcu=at90s4433 -Wall -O9 -o flow.o -c flow.c # no -S here
> avr-gcc -mmcu=at90s4433 -Wall -O9 -o main.elf flow.o # use to call linker
> # also links runtime code
> avr-objcopy -O srec main.elf main.srec # maybe change to ihex

Hmm, yes I see. Apparently when avr-gcc calls the assembler and linker it
passes more options than I thought. Great, fixed. All is well, at least
until I do something else dumb.

Thanks!

C|

>
>
> your milage may vary.
>
> clemens
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Sat Oct 20 04:50:33 2001
Received: from ns0.ipal.net
([206.97.148.120] helo=vega.ipal.net ident=postfix)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ubur-0004lQ-00
for <[email-masked]>; Sat, 20 Oct 2001 04:50:33 +1300
Received: by vega.ipal.net (Postfix, from userid 700)
id 6C9DE23C; Fri, 19 Oct 2001 10:53:36 -0500 (CDT)
Received: from localhost (localhost [127.0.0.1])
by vega.ipal.net (Postfix) with ESMTP
id 6BEF4238; Fri, 19 Oct 2001 10:53:36 -0500 (CDT)
Date: Fri, 19 Oct 2001 10:53:36 -0500 (CDT)
From: Chris Baugher <[email-masked]>
X-Sender: [email-masked]
To: Joerg Wunsch <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Problem with interrupt handler?
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Fri, 19 Oct 2001, Joerg Wunsch wrote:

> Chris Baugher <[email-masked]> wrote:
>
> > static unsigned char ix=0;
> >
> > SIGNAL(SIG_OVERFLOW0)
> > {
> > ++ix;
> > }
>
> Btw., the variable `ix' should be declared `volatile'.

Well, actually it will only be used in that ISR. And it needs to hold it's
value between calls, so it should really be local.

SIGNAL(SIG_OVERFLOW0)
{
static unsigned char ix=0;

++ix;
}

C|

>
> --
> J"org Wunsch Unix support engineer
> [email-masked] http://www.interface-systems.de/~j/
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Sat Oct 20 04:54:29 2001
Received: from ns0.ipal.net
([206.97.148.120] helo=vega.ipal.net ident=postfix)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ubye-0004mC-00
for <[email-masked]>; Sat, 20 Oct 2001 04:54:29 +1300
Received: by vega.ipal.net (Postfix, from userid 700)
id DBC3123C; Fri, 19 Oct 2001 10:57:38 -0500 (CDT)
Received: from localhost (localhost [127.0.0.1])
by vega.ipal.net (Postfix) with ESMTP
id DAB66238; Fri, 19 Oct 2001 10:57:38 -0500 (CDT)
Date: Fri, 19 Oct 2001 10:57:38 -0500 (CDT)
From: Chris Baugher <[email-masked]>
X-Sender: [email-masked]
To: Lai Kang Tin <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Problem with interrupt handler?
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Fri, 19 Oct 2001, Lai Kang Tin wrote:

> Hi,
>
> You didn't initialize the timer, and enable the CPU interrupt in
> main function before the for loop.

Yes I know, the point was that the ISR code still was executed even though
interrupts weren't enabled. It's fixed now though, it was a linker
problem (really a programmer problem).

C|

>
> Kang Tin LAI
>
> On Fri, 19 Oct 2001, Chris Baugher wrote:
>
> >
> > Hi everyone,
> >
> > I recently decided to try building some projects using the AVR chips and
> > have been trying to get some simple test code to run on an at90s2313. I'm
> > using avr-gcc 3.0.1 and binutils 2.11.2. The problem comes when I try to
> > compile a program that has an interrupt routine declared. When I try to
> > run the code on the chip I get all kinds of eratic behaviour, meaning it
> > doesn't do what it's supposed to.
> > So after poking around here is what I think.
> >
> > This is the program I'm trying to run:
> >
> >
> > /* START */
> >
> > #include <io.h>
> > #include <interrupt.h>
> > #include <sig-avr.h>
> > #include <timer.h>
> >
> > static unsigned char ix=0;
> >
> > SIGNAL(SIG_OVERFLOW0)
> > {
> > ++ix;
> > }
> >
> > void main(void)
> > {
> > outp(0xFF,DDRB); /* set port B for output mode */
> >
> > outp(0xFF,DDRD);
> >
> > for(;;) {
> > outp(ix,PORTD);
> > }
> > }
> > /* END */
> >
> >
> > NOTICE!! Interrupts are never enabled so the ISR should never execute, but
> > I think it does! Below is the list file generated by the assembler. It
> > sure looks to me like the ISR is the very first thing executed.
> >
> >
> >
> > GAS LISTING dro.s page 1
> >
> >
> > 1 .file "dro.c"
> > 2 .arch at90s2313
> > 3 __SREG__ = 0x3f
> > 4 __SP_H__ = 0x3e
> > 5 __SP_L__ = 0x3d
> > 6 __tmp_reg__ = 0
> > 7 __zero_reg__ = 1
> > 8 _PC_ = 2
> > 9 .data
> > 10 .type ix,@object
> > 11 .size ix,1
> > 12 ix:
> > 13 0000 00 .byte 0
> > 14 .text
> > 15 .global _overflow0_
> > 16 .type _overflow0_,@function
> > 17 _overflow0_:
> > 18 /* prologue: frame size=0 */
> > 19 0000 1F92 push __zero_reg__
> > 20 0002 0F92 push __tmp_reg__
> > 21 0004 0FB6 in __tmp_reg__,__SREG__
> > 22 0006 0F92 push __tmp_reg__
> > 23 0008 1124 clr __zero_reg__
> > 24 000a 8F93 push r24
> > 25 /* prologue end (size=6) */
> > 26 000c 8091 0000 lds r24,ix
> > 27 0010 8F5F subi r24,lo8(-(1))
> > 28 0012 8093 0000 sts ix,r24
> > 29 /* epilogue: frame size=0 */
> > 30 0016 8F91 pop r24
> > 31 0018 0F90 pop __tmp_reg__
> > 32 001a 0FBE out __SREG__,__tmp_reg__
> > 33 001c 0F90 pop __tmp_reg__
> > 34 001e 1F90 pop __zero_reg__
> > 35 0020 1895 reti
> > 36 /* epilogue end (size=6) */
> > 37 /* function _overflow0_ size 17 (5) */
> > 38 .Lfe1:
> > 39 .size _overflow0_,.Lfe1-_overflow0_
> > 40 .global main
> > 41 .type main,@function
> > 42 main:
> > 43 /* prologue: frame size=0 */
> > 44 0022 C0E0 ldi r28,lo8(__stack - 0)
> > 45 0024 D0E0 ldi r29,hi8(__stack - 0)
> > 46 0026 DEBF out __SP_H__,r29
> > 47 0028 CDBF out __SP_L__,r28
> > 48 /* prologue end (size=4) */
> > 49 002a 8FEF ldi r24,lo8(-1)
> > 50 /* #APP */
> > 51 002c 87BB out 23,r24
> > 52 002e 81BB out 17,r24
> > 53 /* #NOAPP */
> > 54 0030 8091 0000 lds r24,ix
> > 55 .L43:
> > 56 /* #APP */
> > 57 0034 82BB out 18,r24
> > GAS LISTING dro.s page 2
> >
> >
> > 58 /* #NOAPP */
> > 59 0036 FECF rjmp .L43
> > 60 /* epilogue: frame size=0 */
> > 61 __stop_progIi__:
> > 62 0038 FFCF rjmp __stop_progIi__
> > 63 /* epilogue end (size=1) */
> > 64 /* function main size 15 (10) */
> > 65 .Lfe2:
> > 66 .size main,.Lfe2-main
> > 67 /* File dro.c: code 32 = 0x0020 ( 15), prologues 10, epilogues 7 */
> > GAS LISTING dro.s page 3
> >
> >
> > DEFINED SYMBOLS
> > *ABS*:00000000 dro.c
> > *ABS*:0000003f __SREG__
> > *ABS*:0000003e __SP_H__
> > *ABS*:0000003d __SP_L__
> > *ABS*:00000000 __tmp_reg__
> > *ABS*:00000001 __zero_reg__
> > *ABS*:00000002 _PC_
> > dro.s:12 .data:00000000 ix
> > dro.s:17 .text:00000000 _overflow0_
> > dro.s:42 .text:00000022 main
> > dro.s:61 .text:00000038 __stop_progIi__
> > *ABS*:00000000 *ABS*
> >
> > UNDEFINED SYMBOLS
> > __stack
> >
> >
> >
> > Looking at this list file it sure looks like the program starts at line 19
> > which is a push instruction. Isn't the first instruction supposed to be a
> > jump to the main routine? Am I missing something? I can give more info if
> > needed.
> >
> > Thanks!
> >
> > Chris|
> >
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > [email-masked]
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
> >
>
> K.T.LAI
> [email-masked]
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Sat Oct 20 06:05:58 2001
Received: from mid-mail-02.intekom.com ([196.25.69.45] helo=mail.intekom.com)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15ud5p-0004qw-00
for <[email-masked]>; Sat, 20 Oct 2001 06:05:58 +1300
Received: (qmail 22655 invoked from network); 19 Oct 2001 16:45:46 -0000
Received: from bnb53-01-p239.nt.saix.net (HELO scorpio) ([155.239.180.239]) (envelope-sender <[email-masked]>)
by intekom.com (qmail-ldap-1.03) with SMTP
for <[email-masked]>; 19 Oct 2001 16:45:46 -0000
X-vSMTP: intekom.com
From: "Anton Erasmus" <[email-masked]>
Organization: Home
To: [email-masked]
Date: Fri, 19 Oct 2001 18:47:54 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: Re: [avr-gcc-list] Avoiding memory initialization
CC: [email-masked]
Message-ID: <3BD0755A.31968.28BFFB@localhost>
Priority: normal
In-reply-to: <[email-masked]>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

Use the something like

int gTestVar __attribute__((section ("no_init")));

This will put gTestVar in a section called no_init. Any section you
define is not initialised by the startup code. You might have to tell
the linker where to put the code.

Hope this helps
Regards
Anton

> Hello Everybody,
>
> I am using Atmega103. I have declared an array of char
> which I do not wish to get initialized on every CPU
> reset signal. I am keeping some acquired data here. In
> short I want to use this array as battery backed up
> RAM. However startup code clears the entire bss
> section on every reset signal. Is there a way to avoid
> this? Can somebody provide me source code to do the
> same?
>
> Thanks.
> Sean.
>
> ____________________________________________________________
> *NEW* Connect to Yahoo! Messenger through your mobile phone *NEW*
> Visit http://in.mobile.yahoo.com/smsmgr_signin.html
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Sat Oct 20 15:08:30 2001
Received: from ns0.ipal.net
([206.97.148.120] helo=vega.ipal.net ident=postfix)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15ulYr-0005Kc-00
for <[email-masked]>; Sat, 20 Oct 2001 15:08:30 +1300
Received: by vega.ipal.net (Postfix, from userid 700)
id 12A4E23C; Fri, 19 Oct 2001 21:11:40 -0500 (CDT)
Received: from localhost (localhost [127.0.0.1])
by vega.ipal.net (Postfix) with ESMTP id 12021238
for <[email-masked]>; Fri, 19 Oct 2001 21:11:40 -0500 (CDT)
Date: Fri, 19 Oct 2001 21:11:40 -0500 (CDT)
From: Chris Baugher <[email-masked]>
X-Sender: [email-masked]
To: [email-masked]
In-Reply-To: <3BD0755A.31968.28BFFB@localhost>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] More interrupt oddity
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello again,

I've stumbled into another interrupt problem. The code looks like this:

volatile char displacement;

SIGNAL(SIG_INTERRUPT0)
{
--displacement;
}

SIGNAL(SIG_INTERRUPT1)
{
++displacement;
}

INTERRUPT(SIG_OVERFLOW0)
{
...

read value of displacement and do some stuff

...

}

What's happening is that the increment and decrement are being eliminated
somehow during linking. I know this because the list file shows the
correct code but the object module only has one instruction (reti) for
each ISR. How can I keep this from happening?

Thanks again.

Chris|

From [email-masked] Sun Oct 21 08:08:30 2001
Received: from ns0.ipal.net
([206.97.148.120] helo=vega.ipal.net ident=postfix)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15v1Ty-0007cY-00
for <[email-masked]>; Sun, 21 Oct 2001 08:08:30 +1300
Received: by vega.ipal.net (Postfix, from userid 700)
id 79BD123C; Sat, 20 Oct 2001 14:11:43 -0500 (CDT)
Received: from localhost (localhost [127.0.0.1])
by vega.ipal.net (Postfix) with ESMTP id 7913C238
for <[email-masked]>; Sat, 20 Oct 2001 14:11:43 -0500 (CDT)
Date: Sat, 20 Oct 2001 14:11:43 -0500 (CDT)
From: Chris Baugher <[email-masked]>
X-Sender: [email-masked]
To: [email-masked]
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] Re: More interrupt oddity
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Fri, 19 Oct 2001, Chris Baugher wrote:

>
> Hello again,
>
> I've stumbled into another interrupt problem. The code looks like this:

Ok, I solved my own problem. What I did wrong was this:

volatile char displacement;

SIGNAL(SIG_INTERUPT0) <------notice mis-spelling, should be SIG_INTERRUPT0
{ with 2 R's
--displacement;
}

The goofy part is that the linker didn't give any errors or warnings that
something may be wrong. Shouldn't it fail with an undefined symbol or
something?

C|

> volatile char displacement;
>
> SIGNAL(SIG_INTERRUPT0)
> {
> --displacement;
> }
>
> SIGNAL(SIG_INTERRUPT1)
> {
> ++displacement;
> }
>
>
> INTERRUPT(SIG_OVERFLOW0)
> {
> ...
>
> read value of displacement and do some stuff
>
> ...
>
> }
>
>
> What's happening is that the increment and decrement are being eliminated
> somehow during linking. I know this because the list file shows the
> correct code but the object module only has one instruction (reti) for
> each ISR. How can I keep this from happening?
>
> Thanks again.
>
> Chris|
>
>
>

From [email-masked] Sun Oct 21 13:20:20 2001
Received: from femail17.sdc1.sfba.home.com ([24.0.95.144])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15v6Lj-0007pW-00
for <[email-masked]>; Sun, 21 Oct 2001 13:20:19 +1300
Received: from xeonxp ([24.2.77.128]) by femail17.sdc1.sfba.home.com
(InterMail vM.4.01.03.20 201-229-121-120-20010223) with ESMTP
id <20011021002329.OCJW14800.femail17.sdc1.sfba.home.com@xeonxp>
for <[email-masked]>; Sat, 20 Oct 2001 17:23:29 -0700
From: "Mike Dombrowski" <[email-masked]>
To: [email-masked]
Date: Sat, 20 Oct 2001 20:24:17 -0400
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: [avr-gcc-list] Re: More interrupt oddity
Reply-to: [email-masked]
Message-ID: <3BD1DD71.8706.2FB0C88C@localhost>
Priority: normal
In-reply-to: <[email-masked]>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On 21 Oct 2001, at 12:01, [email-masked] wrote:

> Ok, I solved my own problem. What I did wrong was this:
>
>
> volatile char displacement;
>
> SIGNAL(SIG_INTERUPT0) <------notice mis-spelling, should be
> SIG_INTERRUPT0
> { with 2 R's
> --displacement;
> }
>
> The goofy part is that the linker didn't give any errors or warnings
> that something may be wrong. Shouldn't it fail with an undefined
> symbol or something?

I believe the interrupt routines are defined as macros, so running
the macro with a bad input would just not meet and #IF and thus
nothing would be put in your code as a result of the macro. I may
be wrong tho, the way to check is to look at the header.

Mike

From [email-masked] Sun Oct 21 13:38:22 2001
Received: from pop.sttl.uswest.net ([206.81.192.7] helo=sttlpop6.sttl.uswest.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15v6dB-0007qm-00
for <[email-masked]>; Sun, 21 Oct 2001 13:38:21 +1300
Received: (qmail 39204 invoked by uid 0); 21 Oct 2001 00:41:35 -0000
Received: from pdslppp13.sttl.uswest.net (HELO lbarello) (63.224.33.13)
by sttlpop6.sttl.uswest.net with SMTP; 21 Oct 2001 00:41:35 -0000
Date: Sat, 20 Oct 2001 17:36:59 -0700
Message-ID: <006901c159c9$292b80e0$3300000a@lbarello>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <3BD1DD71.8706.2FB0C88C@localhost>
Subject: Re: [avr-gcc-list] Re: More interrupt oddity
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Simple: if you misspell the macro name then you get a routine
with the entry point of SIG_INTERUPT0() - since it is not called
by anything you wouldn't see it. I bet it is there, just
somewhere else in the memory map. Look at the linker map and you
will probably find it floating around somewhere, a spot of dead
code.

"SIG_INTERRUPT0" is translated to "_interrupt0_" (sig-avr.h)
which is the entry point used by the interrupt vector table
(gcrt1.S) If "_interrupt0_" doesn't appear, then the vector table
points to a dummy return.

You can just use "_interrupt0_" instead of SIG_INTERRUPT0 and it
will work the same. SIG_INTERRUPT0 is just another level of
indirection for some reason or another.

Mike's advice was good: look in the headers to see how it all
works.

----- Original Message -----
From: "Mike Dombrowski" <[email-masked]>
To: <[email-masked]>
Sent: Saturday, October 20, 2001 5:24 PM
Subject: [avr-gcc-list] Re: More interrupt oddity

> On 21 Oct 2001, at 12:01, [email-masked]
wrote:
>
> > Ok, I solved my own problem. What I did wrong was this:
> >
> >
> > volatile char displacement;
> >
> > SIGNAL(SIG_INTERUPT0) <------notice mis-spelling, should be
> > SIG_INTERRUPT0
> > { with 2 R's
> > --displacement;
> > }
> >
> > The goofy part is that the linker didn't give any errors or
warnings
> > that something may be wrong. Shouldn't it fail with an
undefined
> > symbol or something?
>
> I believe the interrupt routines are defined as macros, so
running
> the macro with a bad input would just not meet and #IF and thus
> nothing would be put in your code as a result of the macro. I
may
> be wrong tho, the way to check is to look at the header.
>

From [email-masked] Sun Oct 21 14:12:22 2001
Received: from proxy.peter.com.au ([203.47.34.4] helo=peter.com.au)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15v7A5-0007sv-00
for <[email-masked]>; Sun, 21 Oct 2001 14:12:22 +1300
Received: from [203.47.34.3] ([203.47.34.3] verified) by peter.com.au (Stalker SMTP Server 1.8b2) with ESMTP id S.0000472335 for <[email-masked]>; Sun, 21 Oct 2001 09:15:25 +0800
Mime-Version: 1.0
X-Sender: peter@pop
Message-Id: <p05100310b7f7cd2c57b7@[203.47.34.3]>
In-Reply-To: <3BD1DD71.8706.2FB0C88C@localhost>
References: <3BD1DD71.8706.2FB0C88C@localhost>
Date: Sun, 21 Oct 2001 08:59:09 +0800
To: [email-masked]
From: Peter N Lewis <[email-masked]>
Subject: [avr-gcc-list] Re: More interrupt oddity
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>On 21 Oct 2001, at 12:01, [email-masked] wrote:

> > The goofy part is that the linker didn't give any errors or warnings
>> that something may be wrong. Shouldn't it fail with an undefined
> > symbol or something?

If you look in the docs, aka sig-avr.h, you see that:

#define SIG_INTERRUPT0 _interrupt0_

SIG_INTERRUPT0 is just defined to be the name of the routine
(_interrupt0_), and that name (_interrupt0_) happens to be used in
the jump table, so the linker knows it can be called.

#define SIGNAL(signame) \
void signame (void) __attribute__ ((signal)); \
void signame (void)

So your code just ended up being:

void SIG_INTERRUPT0 (void) __attribute__ ((signal));
void SIG_INTERRUPT0 (void)

This is just a function which preserves more registers and flags than
normal. And it is never called, so I guess the linker would be free
to remove it entirely or optimize away all the code which has no
effect.

There isn't ny good way for the code to defend against this problem,
unless there was perhaps some what to add to the #define a warning if
the input parameter was SIG_* since that would presumably indicate a
misspelling.

Enjoy,
Peter.

--
Sungroper Solar Car Association <http://www.sungroper.asn.au/>

From [email-masked] Mon Oct 22 03:29:14 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15vJbF-0008OO-00
for <[email-masked]>; Mon, 22 Oct 2001 03:29:13 +1300
Received: (qmail 23030 invoked from network); 21 Oct 2001 13:36:07 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 21 Oct 2001 13:36:07 -0000
Received: from robikranj ([193.2.76.192]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with SMTP id AAA11011
for <[email-masked]>; Sun, 21 Oct 2001 16:19:20 +0200
Message-ID: <002c01c15a3f$ad3d74d0$0200a8c0@robikranj>
From: [email-masked] (Robert Rozman)
To: <[email-masked]>
References: <3BD1DD71.8706.2FB0C88C@localhost> <p05100310b7f7cd2c57b7@[203.47.34.3]>
Date: Sun, 21 Oct 2001 16:50:06 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Subject: [avr-gcc-list] Source code for user interface menus
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I wonder if anyone is willing to share some source code and examples for
creating user interface on average LCD (2linesX16 characters).

Regards,

Robert Rozman
[email-masked]

From [email-masked] Mon Oct 22 13:45:21 2001
Received: from ns0.ipal.net
([206.97.148.120] helo=vega.ipal.net ident=postfix)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15vTDV-0000RD-00
for <[email-masked]>; Mon, 22 Oct 2001 13:45:21 +1300
Received: by vega.ipal.net (Postfix, from userid 700)
id 81AC823C; Sun, 21 Oct 2001 19:48:39 -0500 (CDT)
Received: from localhost (localhost [127.0.0.1])
by vega.ipal.net (Postfix) with ESMTP
id 80F3C238; Sun, 21 Oct 2001 19:48:39 -0500 (CDT)
Date: Sun, 21 Oct 2001 19:48:39 -0500 (CDT)
From: Chris Baugher <[email-masked]>
X-Sender: [email-masked]
To: Peter N Lewis <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Re: More interrupt oddity
In-Reply-To: <p05100310b7f7cd2c57b7@[203.47.34.3]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Sun, 21 Oct 2001, Peter N Lewis wrote:

> >On 21 Oct 2001, at 12:01, [email-masked] wrote:
>
> > > The goofy part is that the linker didn't give any errors or warnings
> >> that something may be wrong. Shouldn't it fail with an undefined
> > > symbol or something?
>
> If you look in the docs, aka sig-avr.h, you see that:
>
> #define SIG_INTERRUPT0 _interrupt0_
>
> SIG_INTERRUPT0 is just defined to be the name of the routine
> (_interrupt0_), and that name (_interrupt0_) happens to be used in
> the jump table, so the linker knows it can be called.
>
> #define SIGNAL(signame) \
> void signame (void) __attribute__ ((signal)); \
> void signame (void)
>
> So your code just ended up being:
>
> void SIG_INTERRUPT0 (void) __attribute__ ((signal));
> void SIG_INTERRUPT0 (void)
>
> This is just a function which preserves more registers and flags than
> normal. And it is never called, so I guess the linker would be free
> to remove it entirely or optimize away all the code which has no
> effect.

Ahh. Actually I DID look at the headers and I saw the macro expansion but
I was thinking that the linker would see the "__attribute__ ((signal))"
and flag this function as an ISR. But it wouldn't be able to figure out
what interrupt to tie it to because the function name wasn't in the list
of "functions that are interrupts".

Basically this all just demonstrates my lack of understanding of how
the linker works:-/

Ahh well... onward.

C|

> There isn't ny good way for the code to defend against this problem,
> unless there was perhaps some what to add to the #define a warning if
> the input parameter was SIG_* since that would presumably indicate a
> misspelling.
>
> Enjoy,
> Peter.
>
> --
> Sungroper Solar Car Association <http://www.sungroper.asn.au/>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Mon Oct 22 22:16:47 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15vbCH-0000mn-00
for <[email-masked]>; Mon, 22 Oct 2001 22:16:37 +1300
Received: (from j@localhost)
by ida.interface-business.de id f9M9Jsx40064;
Mon, 22 Oct 2001 11:19:54 +0200 (MET DST)
Date: Mon, 22 Oct 2001 11:19:54 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <3BD1DD71.8706.2FB0C88C@localhost>
<p05100310b7f7cd2c57b7@[203.47.34.3]>
<002c01c15a3f$ad3d74d0$0200a8c0@robikranj>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] Source code for user interface menus
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

[email-masked] (Robert Rozman) wrote:

> I wonder if anyone is willing to share some source code and examples for
> creating user interface on average LCD (2linesX16 characters).

The following has once been an experiment only. Unfortunately, it's
not very well-documented. :) The pin connections are #define'd on
top of the file. It also has example code for downloading a few
characters, and it expects a fully connected HD44780, i. e. the busy
flag needs to be readable.

I think it has been written for a one-line display, but together with
the documentation for the HD44780, it shouldn't be hard to rewrite it
for a two-line display.

/*
* HD44780 LCD display test
*
* Copyright 2001 Joerg Wunsch.
*
* All kinds of warranty disclaimed, use at your own risk. You are
* allowed to freely modify and/or redistribute that code.
*/

#include <io.h>
#include <pgmspace.h>

#define LCD_RS PD5
#define LCD_RW PD6
#define LCD_E PD7
#define LCD_D4 PB0
#define LCD_D5 PB2
#define LCD_D6 PB3
#define LCD_D7 PB4

#define HD44780_CLR 0x01
#define HD44780_HOME 0x02
#define HD44780_ENTMODE(inc, shift) (0x04|(inc? 0x02: 0)|(shift? 1: 0))
#define HD44780_DISPCTL(disp, cursor, blink) \
(0x08|(disp? 0x04: 0)|(cursor? 0x02: 0)|(blink? 1: 0))
#define HD44780_SHIFT(shift, right) \
(0x10|(shift? 0x08: 0)|(right? 0x04: 0))
#define HD44780_FNSET(if8bit, twoline, font8x10) \
(0x20|(if8bit? 0x10: 0)|(twoline? 0x08: 0)|(font8x10? 0x04: 0))
#define HD44780_CGADDR(addr) (0x40|(addr & 0x3f))
#define HD44780_DDADDR(addr) (0x80|(addr & 0x7f))

#define HD44780_BUSYFLAG 0x80

static inline void
lcd_pulse_e(void)
{

sbi(PORTD, LCD_E);
asm volatile("nop"); /* guarantee 500 ns high */
cbi(PORTD, LCD_E);
}

void
lcd_outnibble(uint8_t n, uint8_t rs)
{
uint8_t x;

cbi(PORTD, LCD_RW);
if (rs)
sbi(PORTD, LCD_RS);
else
cbi(PORTD, LCD_RS);
x = (((n & ((BV(LCD_D5)|BV(LCD_D6)|BV(LCD_D7)) >> (LCD_D5 - LCD_D4 - 1)))
<< (LCD_D5 - LCD_D4 - 1)) |
(n & BV(LCD_D4)));
outp(x, PORTB);
lcd_pulse_e();
}

void
lcd_outbyte(uint8_t b, uint8_t rs)
{
lcd_outnibble(b >> 4, rs);
lcd_outnibble(b & 0xf, rs);
}

uint8_t
lcd_innibble(uint8_t rs)
{
uint8_t x;

sbi(PORTD, LCD_RW);
outp(inp(DDRB) & ~(BV(LCD_D4)|BV(LCD_D5)|BV(LCD_D6)|BV(LCD_D7)), DDRB);
if (rs)
sbi(PORTD, LCD_RS);
else
cbi(PORTD, LCD_RS);
lcd_pulse_e();
x = inp(PINB) & (BV(LCD_D4)|BV(LCD_D5)|BV(LCD_D6)|BV(LCD_D7));
outp(inp(DDRB) | (BV(LCD_D4)|BV(LCD_D5)|BV(LCD_D6)|BV(LCD_D7)), DDRB);
cbi(PORTD, LCD_RW);

return (x & BV(LCD_D4)) |
((x & (BV(LCD_D5)|BV(LCD_D6)|BV(LCD_D7))) >> (LCD_D5 - LCD_D4 - 1));
}

uint8_t
lcd_inbyte(uint8_t rs)
{
uint8_t x;

x = lcd_innibble(rs) << 4;
x |= lcd_innibble(rs);

return x;
}

#define lcd_outcmd(n) lcd_outbyte(n, 0)
#define lcd_outdata(n) lcd_outbyte(n, 1)
#define lcd_incmd() lcd_inbyte(0)
#define lcd_indata() lcd_inbyte(1)

void
wait_lcd_ready(void)
{
while (lcd_incmd() & HD44780_BUSYFLAG) ;
}

void
ioinit(void)
{

outp(BV(LCD_D4)|BV(LCD_D5)|BV(LCD_D6)|BV(LCD_D7), DDRB);
outp(BV(LCD_RS)|BV(LCD_RW)|BV(LCD_E), DDRD);
}

static const char chargen[] __attribute__((progmem)) =
{
0x18, 0x14, 0x19, 0x15, 0x12, 0x05, 0x05, 0, /* 0: RX */
0x1c, 0x08, 0x0d, 0x0d, 0x02, 0x05, 0x05, 0, /* 1: TX */
0x08, 0x1f, 0x08, 0x00, 0x02, 0x1f, 0x02, 0, /* 2: <-/-> */
0x02, 0x1f, 0x02, 0x00, 0x02, 0x1f, 0x02, 0, /* 3: ->/-> */
0x00, 0x00, 0x0a, 0x1f, 0x0a, 0x00, 0x00, 0, /* 4: <--> */
0x18, 0x10, 0x14, 0x02, 0x0b, 0x0a, 0x03, 0, /* 5: rit */
};

void
init_chargen(void)
{
uint8_t i;
char c;

lcd_outcmd(HD44780_CGADDR(0));
wait_lcd_ready();

for (i = 0; i < sizeof chargen / sizeof chargen[0]; i++)
{
c = __lpm_inline((uint16_t)(chargen + i));
lcd_outdata(c);
wait_lcd_ready();
}

lcd_outcmd(HD44780_DDADDR(0));
wait_lcd_ready();
}

void
delay1s(void)
{
uint32_t i;

for (i = 0; i < 500000; i++)
;
}

void
main(void)
{
char c;
uint8_t i;

ioinit();

lcd_outnibble(HD44780_FNSET(0, 1, 0) >> 4, 0);
wait_lcd_ready();
lcd_outcmd(HD44780_FNSET(0, 1, 0));
wait_lcd_ready();
lcd_outcmd(HD44780_CLR);
wait_lcd_ready();
lcd_outcmd(HD44780_DISPCTL(1, 1, 0));
wait_lcd_ready();
lcd_outcmd(HD44780_ENTMODE(1, 0));
wait_lcd_ready();

init_chargen();

for (i = 0; i < 80; i++)
{
if (i <= 5)
c = i; /* RAM chargen */
else
c = (i - 6) + '!';
lcd_outdata(c);
wait_lcd_ready();
}
lcd_outcmd(HD44780_DISPCTL(1, 0, 0));
wait_lcd_ready();

for (;;)
{
lcd_outcmd(HD44780_SHIFT(1, 1));
delay1s();
}
}

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Mon Oct 22 22:18:24 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15vbDy-0000nF-00
for <[email-masked]>; Mon, 22 Oct 2001 22:18:23 +1300
Received: (from j@localhost)
by ida.interface-business.de id f9M9LfQ40075;
Mon, 22 Oct 2001 11:21:41 +0200 (MET DST)
Date: Mon, 22 Oct 2001 11:21:41 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
From: [email-masked] (Joerg Wunsch)
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Subject: [avr-gcc-list] Sought: interrupt-driven buffered UART sender
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Speaking of wanted coding examples...

Does anybody have an example of a buffered, interrupt-driven UART
sending routine for the AVRs? I tried implementing one myself, but it
isn't working quite correctly, so before re-inventing the wheel, i
thought i'd ask here.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Mon Oct 22 23:02:03 2001
Received: from varis.cs.tut.fi
([130.230.4.42] helo=cs.tut.fi ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15vbuE-0000pZ-00
for <[email-masked]>; Mon, 22 Oct 2001 23:02:02 +1300
Received: from orfeuskerttu.cs.tut.fi ([email-masked] [130.230.2.34])
by cs.tut.fi (8.8.8/8.8.8) with ESMTP id NAA00370;
Mon, 22 Oct 2001 13:05:15 +0300 (EET DST)
From: Kujala Matti <[email-masked]>
Received: (from ear@localhost)
by orfeuskerttu.cs.tut.fi (8.8.5/8.8.4)
id NAA11780; Mon, 22 Oct 2001 13:05:15 +0300 (EET DST)
Message-Id: <[email-masked]>
Subject: Re: [avr-gcc-list] compiling gcc under cygwin
In-Reply-To: <001001c1557b$0ae36e60$fe78a8c0@FRITZweb> from Roland Zitzke at "Oct 15, 2001 03:12:28 pm"
To: [email-masked] (Roland Zitzke)
Date: Mon, 22 Oct 2001 13:05:15 +0300 (EET DST)
Cc: [email-masked]
X-Mailer: ELM [version 2.4ME+ PL49 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> Hi,
> has anyone tried to compile the latest version of gcc (3.0.1 or the latest snapshot) under cygwin?
> I get some strange errors
> for example
> in libiberty/
> I need to manually define HAVE_SYS_ERRLIST
> to avoid conflicts resulting for static vs non-static definition of some error constants.
> I also get errors with the intermediate assember language files and I can't fix those easily.
> Any comments?

Updates to cygwin-package seem to be quite frequent, and since it hasn't
been officially updated to gcc3.01 yet I suppese there are some real
troubles. (I've also heard that gcc3.01 doesn't compile very cleanly on
some unix-machines).

--
What sorcery, what spells, have brought thee here?

From [email-masked] Mon Oct 22 23:54:22 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15vcir-0000sC-00
for <[email-masked]>; Mon, 22 Oct 2001 23:54:21 +1300
Received: from marekm by alf.amelek.gda.pl with local (Exim 3.33 #1 (Debian))
id 15vcla-0000i2-00
for <[email-masked]>; Mon, 22 Oct 2001 12:57:10 +0200
To: [email-masked]
Date: Mon, 22 Oct 2001 12:57:10 +0200 (CEST)
X-Mailer: ELM [version 2.4ME+ PL94 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Message-Id: <[email-masked]>
From: Marek Michalkiewicz <[email-masked]>
Subject: [avr-gcc-list] RFC: interrupt vectors in gcrt1.S
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I'd like to add support for some new devices to gcrt1.S in avr-libc,
and there is a small problem with interrupt vectors. They are not
necessarily in the same order anymore (for example, see UART1 in
atmega161 and atmega128, or at94k...), and gcrt1.S becomes a little
difficult to maintain. So I'd like to change names of interrupt
vectors in gcrt1.S to look like: __vector_1, __vector_2, ...

Now, the io*.h file specific to each device will have:

#define SIG_INTERRUPT0 __vector_1
#define SIG_INTERRUPT1 __vector_2

and so on, you get the idea. Still, to avoid waste of program memory
on smaller chips, crt*.o for each one will only have the necessary
interrupt vector size. Things would still work the same way, only all
these nice interrupt names are moved from crt*.o to include files and
now the C preprocessor expands them to __vector_N.

This should make it easier to add support for more new devices in the
future. These __vector_N names can also be used directly if necessary
(say if you have your own custom ASIC containing an AVR core with a
non-standard set of interrupts, different from any existing device).

At the same time I'd like to remove the SIG_* defines from <sig-avr.h>
(now they would be in io*.h for each device, where I think they belong).

There are a lot of files to change in avr-libc, so please expect some
temporary breakage. Files to support the most popular devices will be
changed first. I use mainly AT90S8535 and ATmega163, I guess the 2313
and 8515 are quite popular too, any others?

Does anyone see problems with this?

It will take some time as I'm very busy (I thought I was very busy
a year ago, now it's worse...) but I'd like to discuss this here.

Still not sure if there is any good way to warn about misspelled names
of interrupt functions (other than looking at the interrupt vectors in
the linker output file), while we are at it...

Thanks,
Marek

From [email-masked] Tue Oct 23 00:37:50 2001
Received: from mail.teleteam.net ([199.34.16.10])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15vdOv-0000uU-00
for <[email-masked]>; Tue, 23 Oct 2001 00:37:49 +1300
Received: from tbd.tnex.com (cust-208-208-110-38.teleteam.net [208.208.110.38])
by mail.teleteam.net (8.11.6/8.11.6) with SMTP id f9MBfKQ24661
for <[email-masked]>; Mon, 22 Oct 2001 06:41:22 -0500 (CDT)
Message-Id: <[email-masked]>
From: "Bill Knight" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Mon, 22 Oct 2001 06:38:56 -0500
Reply-To: "Bill Knight" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 2000 Professional (2.20.2320) For Windows 2000 (5.0.2195;2)
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: RE: [avr-gcc-list] Sought: interrupt-driven buffered UART sender
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I'm finishing up the port of just what you are asking for.
Should have it done within the week. I will be posting it
to the GCC forum on AVRFreaks.net when it's finished.

-Bill Knight
R O SoftWare

Speaking of wanted coding examples...

Does anybody have an example of a buffered, interrupt-driven UART
sending routine for the AVRs? I tried implementing one myself, but it
isn't working quite correctly, so before re-inventing the wheel, i
thought i'd ask here.

From [email-masked] Tue Oct 23 05:00:56 2001
Received: from dialin-145-254-252-090.arcor-ip.net ([145.254.252.90] helo=mail.mjerger.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15vhVX-00017i-00
for <[email-masked]>; Tue, 23 Oct 2001 05:00:56 +1300
Received: from there (localhost.localdomain [127.0.0.1])
by mail.mjerger.de (Postfix) with SMTP id 508282716E
for <[email-masked]>; Mon, 22 Oct 2001 18:04:00 +0200 (CEST)
Content-Type: text/plain;
charset="iso-8859-1"
From: Michael Jerger <[email-masked]>
To: [email-masked]
Date: Mon, 22 Oct 2001 18:04:00 +0200
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Message-Id: <[email-masked]>
Subject: [avr-gcc-list] generate intel-hex fioles with avr-gcc
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

hi,

im using the new stk 500 with the avr studio @win98.
I installed the avr-gcc 2000/02/13 from http://8bit.at/avr.

Compiling and debuggin looks fine, but flushing the controller
demands an intel-hex file (avr-isp2.4 wont flush my stk500).

How can i generate intel hexfiles instead of motorola ?

cheers
micha

PS: Are pgp signatures allowed in this list ?

From [email-masked] Tue Oct 23 05:26:16 2001
Received: from ns0.ipal.net
([206.97.148.120] helo=vega.ipal.net ident=postfix)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15vhu2-00019W-00
for <[email-masked]>; Tue, 23 Oct 2001 05:26:16 +1300
Received: by vega.ipal.net (Postfix, from userid 700)
id 3E0A423F; Mon, 22 Oct 2001 11:29:13 -0500 (CDT)
Received: from localhost (localhost [127.0.0.1])
by vega.ipal.net (Postfix) with ESMTP id 3D5E923D
for <[email-masked]>; Mon, 22 Oct 2001 11:29:13 -0500 (CDT)
Date: Mon, 22 Oct 2001 11:29:13 -0500 (CDT)
From: Chris Baugher <[email-masked]>
X-Sender: [email-masked]
To: [email-masked]
Subject: Re: [avr-gcc-list] compiling gcc under cygwin
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Mon, 22 Oct 2001, Kujala Matti wrote:

> > Hi,
> > has anyone tried to compile the latest version of gcc (3.0.1 or the latest snapshot) under cygwin?
> > I get some strange errors
> > for example
> > in libiberty/
> > I need to manually define HAVE_SYS_ERRLIST
> > to avoid conflicts resulting for static vs non-static definition of some error constants.
> > I also get errors with the intermediate assember language files and I can't fix those easily.
> > Any comments?
>
> Updates to cygwin-package seem to be quite frequent, and since it hasn't
> been officially updated to gcc3.01 yet I suppese there are some real
> troubles. (I've also heard that gcc3.01 doesn't compile very cleanly on
> some unix-machines).

Gcc 3.0.1 didn't compile well on my Linux box (slackware 7.0). I got lots
of warnings. Although it seems to be working ok so far.

C|

>
> --
> What sorcery, what spells, have brought thee here?
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Tue Oct 23 05:43:57 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15viBA-0001Ar-00
for <[email-masked]>; Tue, 23 Oct 2001 05:43:56 +1300
Received: from ari-co2d-26.rasserver.net (ari-co2d-26.rasserver.net [207.92.202.26])
by deimos.frii.net (8.11.6/8.11.6) with ESMTP id f9MGkvL28913
for <[email-masked]>; Mon, 22 Oct 2001 10:46:57 -0600 (MDT)
Date: Mon, 22 Oct 2001 10:48:16 -0600 (MDT)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>
Subject: Re: [avr-gcc-list] generate intel-hex fioles with avr-gcc
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

You can use avr-objcopy (from binutils) to do this. Here's a Makefile I
use on linux to automate it.

Ted

OPTS = -mmcu=at90s8515
AS = avr-as
OBJCOPY = avr-objcopy

all: test.bin test.hex

%.bin: %.out
$(OBJCOPY) -O binary $< $@

%.hex: %.out
$(OBJCOPY) -O ihex $< $@

%.out: %.asm
$(AS) $(OPTS) -o $@ $<

clean:
rm -f *.hex *.lst *.obj *.rom *.out *.bin

On Mon, 22 Oct 2001, Michael Jerger wrote:

:)hi,
:)
:)im using the new stk 500 with the avr studio @win98.
:)I installed the avr-gcc 2000/02/13 from http://8bit.at/avr.
:)
:)Compiling and debuggin looks fine, but flushing the controller
:)demands an intel-hex file (avr-isp2.4 wont flush my stk500).
:)
:)How can i generate intel hexfiles instead of motorola ?
:)
:)
:)
:)cheers
:)micha
:)
:)
:)PS: Are pgp signatures allowed in this list ?
:)
:)_______________________________________________
:)avr-gcc-list mailing list
:)[email-masked]
:)http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
:)

From [email-masked] Tue Oct 23 08:41:51 2001
Received: from mx04.nexgo.de ([151.189.8.80])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15vkxJ-0001O2-00
for <[email-masked]>; Tue, 23 Oct 2001 08:41:50 +1300
Received: from kleinertiga.local (dialin-145-254-111-188.arcor-ip.net [145.254.111.188])
by mx04.nexgo.de (Postfix) with ESMTP
id CF30F37B8B; Mon, 22 Oct 2001 21:44:49 +0200 (CEST)
Received: from gmx.de (localhost [127.0.0.1])
by kleinertiga.local (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id f9MJil601706;
Mon, 22 Oct 2001 21:44:53 +0200
X-Authentication-Warning: kleinertiga.local: Host localhost [127.0.0.1] claimed to be gmx.de
Message-ID: <[email-masked]>
Date: Mon, 22 Oct 2001 21:44:47 +0200
From: Klaus Rudolph <[email-masked]>
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Robert Rozman <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Source code for user interface menus
References: <3BD1DD71.8706.2FB0C88C@localhost> <p05100310b7f7cd2c57b7@[203.47.34.3]> <002c01c15a3f$ad3d74d0$0200a8c0@robikranj>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

in the moment I try to develop a little menu driven function calling
stack.

Today it can handle: Menu_Entrys-> Jump to a function (pointer)
Label -> text on Display only
Edit -> Get text (here from a pc-keyboard) and display it
after filter (hex/dec/txt filter today implemented)

You want something like that. Can send you as PM. But undocumented and
buggy and not finished at all!

Cheers
Klaus

Robert Rozman wrote:
>
> Hello,
>
> I wonder if anyone is willing to share some source code and examples for
> creating user interface on average LCD (2linesX16 characters).
>
> Regards,
>
> Robert Rozman
> [email-masked]
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Tue Oct 23 10:47:44 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15vmv9-0001TI-00
for <[email-masked]>; Tue, 23 Oct 2001 10:47:44 +1300
Received: (from rneswold@localhost)
by DrMemory.fnal.GOV (8.11.3/8.11.3) id f9MLomi67871;
Mon, 22 Oct 2001 16:50:48 -0500 (CDT)
(envelope-from rneswold)
Date: Mon, 22 Oct 2001 16:50:48 -0500
From: Rich Neswold <[email-masked]>
To: Joerg Wunsch <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Sought: interrupt-driven buffered UART sender
Message-ID: <[email-masked]>
Reply-To: [email-masked]
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="zaRBsRFn0XYhEU69"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Mon, Oct 22, 2001 at 11:21:41AM +0200
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.3-RELEASE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--zaRBsRFn0XYhEU69
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Wasn't it 22-Oct-2001, at 11:21AM, when Joerg Wunsch said:
> Speaking of wanted coding examples...
>=20
> Does anybody have an example of a buffered, interrupt-driven UART
> sending routine for the AVRs? I tried implementing one myself, but it
> isn't working quite correctly, so before re-inventing the wheel, i
> thought i'd ask here.

I have one. I was going to polish up its documentation before releasing it
to the mailing list. If you want to look at it, I'll send it to you.

--=20
Rich Neswold

efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

--zaRBsRFn0XYhEU69
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE71JS3ZmE+i9FKxdwRAqoRAKCjmqbDNUhq0xbK9VmOdMzpKm74kACfZLDJ
4xicKKRP5VSDm+dhgfsKcCA=
=MDft
-----END PGP SIGNATURE-----

--zaRBsRFn0XYhEU69--

From [email-masked] Tue Oct 23 12:19:09 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15voLd-0001Y7-00
for <[email-masked]>; Tue, 23 Oct 2001 12:19:09 +1300
Received: from cel1.jpk.co.nz (adsl-179.world-net.co.nz [210.55.228.179])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id f9MNMa411594
for <[email-masked]>; Tue, 23 Oct 2001 12:22:36 +1300
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Tue, 23 Oct 2001 12:24:57 +1300
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Fwd: RE : VIRUS FOUND Re : [avr-gcc-list] Sought :
interrupt-driven buffered UART sender
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I received the following notification, haven't verified if a virus was
present or not but have forwarded the info anyway. Please check before
opening the attachments in Rich Neswold's previous email.

Jason Kyle
avr-gcc list admin

>Delivered-To: [email-masked]
>From: [email-masked]
>To: [email-masked]
>Date: Tue, 23 Oct 2001 00:14:26 +0200 (MEST)
>Subject: RE : VIRUS FOUND Re : [avr-gcc-list] Sought : interrupt-driven
> buffered UART sender
>Sender: [email-masked]
>X-BeenThere: [email-masked]
>X-Mailman-Version: 2.0
>List-Help: <mailto:[email-masked]?subject=help>
>List-Post: <mailto:[email-masked]>
>List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
> <mailto:[email-masked]?subject=subscribe>
>List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
>List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
> <mailto:[email-masked]?subject=unsubscribe>
>List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>
>
>Dear Mrs. and Mr.,
>
>we have received an message Re: [avr-gcc-list] Sought: interrupt-driven
>buffered UART sender
>at Mon, 22 Oct 2001 16:50:48 -0500 from you, which is infected by an Virus.
>
>We have found the virus
>
>Scenarios/Incoming/Anthrax Info Virus: 'Blocked'.
>
>.
>
>Please check your system and inform your administrator!
>
>Thank you and best regards
>
>Beru AG
>DNE - Virusadministration

From [email-masked] Tue Oct 23 13:29:48 2001
Received: from mtiwmhc21.worldnet.att.net ([204.127.131.46])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15vpS0-0001bH-00
for <[email-masked]>; Tue, 23 Oct 2001 13:29:48 +1300
Received: from jimanji ([12.93.208.167]) by mtiwmhc21.worldnet.att.net
(InterMail vM.4.01.03.27 201-229-121-127-20010626) with SMTP
id <20011023003241.HJRF29594.mtiwmhc21.worldnet.att.net@jimanji>;
Tue, 23 Oct 2001 00:32:41 +0000
Message-ID: <[email-masked]>
Reply-To: "Jim Pearce" <[email-masked]>
From: "Jim Pearce" <[email-masked]>
To: <[email-masked]>,
"Jason Kyle" <[email-masked]>
References: <[email-masked]>
Subject: Re: RE : VIRUS FOUND Re : [avr-gcc-list] Sought : interrupt-driven buffered UART sender
Date: Mon, 22 Oct 2001 20:33:33 -0300
Organization: Pegasus Technologies
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

How can a text file and a PGP signature be a virus?

I think they must have a problem!

From [email-masked] Tue Oct 23 15:24:38 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15vrF7-0001g6-00
for <[email-masked]>; Tue, 23 Oct 2001 15:24:37 +1300
Received: (from rneswold@localhost)
by DrMemory.fnal.GOV (8.11.3/8.11.3) id f9N2Rrm68380;
Mon, 22 Oct 2001 21:27:53 -0500 (CDT)
(envelope-from rneswold)
Date: Mon, 22 Oct 2001 21:27:53 -0500
From: Rich Neswold <[email-masked]>
To: Jason Kyle <[email-masked]>
Cc: [email-masked]
Subject: Re: Fwd: RE : VIRUS FOUND Re : [avr-gcc-list] Sought : interrupt-driven buffered UART sender
Message-ID: <[email-masked]>
Reply-To: [email-masked]
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Tue, Oct 23, 2001 at 12:24:57PM +1300
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.3-RELEASE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Wasn't it 23-Oct-2001, at 12:24PM, when Jason Kyle said:
> I received the following notification, haven't verified if a virus was
> present or not but have forwarded the info anyway. Please check before
> opening the attachments in Rich Neswold's previous email.

Don't panic!

It was just my GnuPG digital signature. Sorry for any confusion it caused.
I'll try to remember to not sign future messages.

--
Rich Neswold

efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

From [email-masked] Wed Oct 24 02:17:40 2001
Received: from mail2.alphalink.com.au ([202.161.124.58])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15w1R5-000251-00
for <[email-masked]>; Wed, 24 Oct 2001 02:17:40 +1300
Received: from research (d284-ps2-mel.alphalink.com.au [202.161.108.30])
by mail2.alphalink.com.au (8.11.4/8.9.3) with SMTP id f9NDKpn21113
for <[email-masked]>; Tue, 23 Oct 2001 23:20:57 +1000
From: "Ron Kreymborg" <[email-masked]>
To: <[email-masked]>
Subject: RE: [avr-gcc-list] Sought: interrupt-driven buffered UART sender
Date: Tue, 23 Oct 2001 23:27:13 +1000
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0002_01C15C1A.3EECDCA0"
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
In-Reply-To: <[email-masked]>
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Importance: Normal
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_0002_01C15C1A.3EECDCA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

> Speaking of wanted coding examples...
>
> Does anybody have an example of a buffered, interrupt-driven UART
> sending routine for the AVRs? I tried implementing one myself, but it
> isn't working quite correctly, so before re-inventing the wheel, i
> thought i'd ask here.
>
> --
> J"org Wunsch Unix support engineer
> [email-masked]
> http://www.interface-systems.de/~j/

Below and attached a Uart send routine I use quite a lot.

Cheers
Ron

-------------------------------------------
Ron Kreymborg
Jennaron Research
Melbourne, Australia

UARTOUT.H :
//---------------------------------------------------------
// UartOut.c header file. Users to include.

extern volatile int TxBusy;

extern void UartOutInit(void);
extern void UartSend(char *buffer, int length);

UARTOUT.C :
//-------------------------------------------------------------------
// Transmit a known length buffer of bytes. Check that the public
// boolean <TxBusy> is false before calling UartSend(). If there
// can be a number of callers, check and set the flag from within
// a critical region first (ie bracket with interrupts off). If
// you are using an rtos, replace the flag with a semaphore.
// Only bits 0 and 1 of PORTD need be defined here.
// Ron Kreymborg
//-------------------------------------------------------------------

#include <io.h>
#include <sig-avr.h>
#include "UartOut.h"

// Baud rates
#define UART_BAUD_19200 12
#define UART_BAUD_9600 25
#define UART_BAUD_2400 103

volatile int TxBusy;

static volatile char *TxPntr;
static volatile int MessageLen;

//-------------------------------------------------------------------
// Init the hardware
//
void UartOutInit(void)
{
// PORTD
outp(0x00, PORTD); // all low
outp(0xfc, DDRD); // 0 & 1 input for UART
// Enable RxD/TxD and ints
outp((1<<RXCIE) | (1<<TXCIE) | (1<<RXEN) | (1<<TXEN), UCR);
// Set baud rate
outp(UART_BAUD_9600, UBRR);
// Flag as not busy
TxBusy = 0;
}

//-------------------------------------------------------------------
// Call with a pointer to the bytes to send in <buffer>, the number
// of bytes to send in <length>. This function writes the first
// byte to the Uart then returns. The interrupt routine sends the rest.
//
void UartSend(char *buffer, int length)
{
TxBusy = 1; // Tx now busy
MessageLen = length; // save length
TxPntr = buffer; // and pointer
outp(*TxPntr++, UDR); // write first byte from data buffer
}

//-------------------------------------------------------------------
// Signal handler for uart txd ready interrupt.
//
SIGNAL(SIG_UART_TRANS)
{
if (--MessageLen > 0) // while bytes to send
outp(*TxPntr++, UDR); // write next byte from data buffer
else
TxBusy = 0; // once again available for transmitting
}

------=_NextPart_000_0002_01C15C1A.3EECDCA0
Content-Type: application/x-zip-compressed;
name="UartOut.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="UartOut.zip"

UEsDBBQAAAAIACO7VytqJBTbfAAAANwAAAAWAAAAWElOVTM4Ni94aW51L1VhcnRPdXQuaJ2MMQ7C
MBAEe0v+w5UBgf2AdHRUFCQPMPYZW7Iu0vmMwu9JkFJEdGy5szvWnv+NVtbC6FhuTYyHhC4gQ8wF
DYwVuYJMkMmXFtBopRXOgkzwmoqTZbUwgWG+tPrudziHTXulLN1aHPpffkcKnU+O4fhoMSKfvsaC
9JS0Hj5QSwMEFAAAAAgAF7tXKwB3VBl8AwAArggAABYAAABYSU5VMzg2L3hpbnUvVWFydE91dC5j
rVbfb9pIEH5H4n8Y9aQKWgImd61UQZGSkDtFbZPIOFLforU9tlcxa7S7DqC7/u+d2XUAJ6l4uO4D
sLvz85tvZhmNTv7/6nZGI4i0UGYpLQh4UNVaQYkqtwXEdZahhiqDeGvRDOGiwOQBbCEsfSCs6riU
iTMRV1WJQsE02pzXZjsDaSATpUGIMas0QiLKUqoc7oS2C1Rprz+Eq4zNaHQWEtKOkUJQ9TL2XlkH
tRlA4vwKlYJB7zorRQ6ZrpawlraQypkQkGhpJamBxlxWCjKpjYWepDC0SB5ImcVBKota1ytryE3m
InEGtlUNgoKtDYdKAWlbkXuNq1IkuHfsjAgKZilWBWU3dNo3qtxCLMlo4GIdcw63N2E0B4WYgq04
wRQzqWjHiXu9kAL9onG7jCud88nxsh1d3U6384dUSVmnCFNZDYvZ4YGR+Yl41O3TN1ybm9oOizes
TpGdizoFLaj2JOYDh7uzMLo/P7ub348/nQYB7Nf49DWpTx9bQnD64TWp07/aUuPgT47hsSqFlSVy
xcBTa8LnxtJxArvrpBAa3kWbW2X15OU1a39DY0SOX1FNfHbHQTy6HEhXSnpOUgzpWng6c+gyhQZR
FunxQb/b+bfb4QRJ0VHD76rarnrBJggG/rQ/gdZicpcllNW6JZ8lA5jPwxfiLB/AW2KgVKvaAnWg
w3rn+lKJmHAJN/NRtJk7thJG5sB4bzydht8vri778B/wJjrchN8vr/cX9HsAdxdhf7JzsKBWi5/Y
c2C2zQvSOg8P1f7m7hIGVEXqVGx/4QsPnyFweXY7P35vBS8Y26anV5UbDtysXFM3+Hhj0GEEUz8U
ZwN37WeVM/I0JVvCfpDOhhAVPBBrlVgeS2saUyzJ84QnlB+hpP3klnnDP2gCoa21MmwB93MLNKHJ
HcSevCGNxg6fUc8NWt8bPuyBawUf1Z6LO3zHz3nkFz8RG6rJ+qAm+3YiPW+wpUw6Rjxic/Xkh/uT
5H0wL5wxywm4pgQHrGk6+/17Isw8bLGddByazah3ILp3IRVWNI5+O2EWMlf0yBQULT1Qrr1qV7EN
ER5Fut1XqinJ4uqf67OvPfq6dy0QhWfXi75PYVcHmUHv5OQA2RkE/We5FjzPWkTzusew2uGkcPNL
mFgQ6dHem3zWeq3FpFf0LIpcENfFo5ClmyoMh23+UhBJcwf/T1BLAQIUABQAAAAIACO7VytqJBTb
fAAAANwAAAAWAAAAAAAAAAEAIAC2gQAAAABYSU5VMzg2L3hpbnUvVWFydE91dC5oUEsBAhQAFAAA
AAgAF7tXKwB3VBl8AwAArggAABYAAAAAAAAAAQAgALaBsAAAAFhJTlUzODYveGludS9VYXJ0T3V0
LmNQSwUGAAAAAAIAAgCIAAAAYAQAAAAA

------=_NextPart_000_0002_01C15C1A.3EECDCA0--

From [email-masked] Wed Oct 24 05:17:16 2001
Received: from mail.teleteam.net ([199.34.16.10])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15w4Et-0002CN-00
for <[email-masked]>; Wed, 24 Oct 2001 05:17:15 +1300
Received: from tbd.tnex.com (cust-208-208-110-38.teleteam.net [208.208.110.38])
by mail.teleteam.net (8.11.6/8.11.6) with SMTP id f9NGKuJ14851
for <[email-masked]>; Tue, 23 Oct 2001 11:20:56 -0500 (CDT)
Message-Id: <[email-masked]>
From: "Bill Knight" <[email-masked]>
To: "avr-gcc-list" <[email-masked]>
Date: Tue, 23 Oct 2001 11:18:15 -0500
Reply-To: "Bill Knight" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 2000 Professional (2.20.2320) For Windows 2000 (5.0.2195;2)
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] AVR Device Independent, Polled/Interrupt UART Module
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Just posted a project to AVRFreaks.net that may be of interest to
the list.

-Bill Knight
R O SoftWare

The C source implements a set of routines which allow the use of the
UART(s) present on the various versions of the AVR micros to be
operated in polled and/or interrupt mode. The operation of the UART
has been fixed at 8 bit and Double Speed has not been used (but could
be added).

This is the first pass at a port of established code and as a first
pass there may very well be bugs, etc. It has been tested on the
AT90S8515 in both interrupt and polled modes. The support for the
second UART on the ATmega161 has not been tested as I don't happen to
have one. Also, as this is my first port of code to the AVR, the code
may not be the most efficient.

From [email-masked] Wed Oct 24 05:50:48 2001
Received: from sttlpop5.sttl.uswest.net ([206.81.192.5])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15w4lL-0002E5-00
for <[email-masked]>; Wed, 24 Oct 2001 05:50:47 +1300
Received: (qmail 21045 invoked by alias); 23 Oct 2001 16:54:13 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 20955 invoked by uid 0); 23 Oct 2001 16:54:12 -0000
Received: from pdslppp13.sttl.uswest.net (HELO lbarello) (63.224.33.13)
by sttlpop5.sttl.uswest.net with SMTP; 23 Oct 2001 16:54:12 -0000
Message-ID: <00ac01c15be3$552cfcc0$3300000a@lbarello>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Date: Tue, 23 Oct 2001 09:50:16 -0700
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] Watch variables in Astudio
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Has anyone on this list grabbed the elf->coff converter that
allows Astudio to have watch variables on GCC code? It is on
www.avrfreaks.org. I tried it but it GPF's before the conversion
is complete (win98 & winme)

From [email-masked] Wed Oct 24 18:42:06 2001
Received: from pixx-a.telos.de ([194.173.126.193] helo=pizz-a.telos.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wGnm-0002o6-00
for <[email-masked]>; Wed, 24 Oct 2001 18:42:06 +1300
Received: from exim by pizz-a.telos.de with local (Exim 3.16 #7)
id 15wGdJ-0008Mr-00
for [email-masked]; Wed, 24 Oct 2001 07:31:17 +0200
Received: from [194.173.126.4] (helo=back.telos.de)
by pizz-a.telos.de with esmtp (Exim 3.16 #7)
id 15wGdJ-0008Mk-00
for [email-masked]; Wed, 24 Oct 2001 07:31:17 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Date: Wed, 24 Oct 2001 07:32:38 +0200
content-class: urn:content-classes:message
X-MimeOLE: Produced By Microsoft Exchange V6.0.4417.0
Message-ID: <[email-masked]>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: C++ for AV^R
Thread-Index: AcFcTRnAR7C258hQEdWsQwAQWjkbdA==
From: "Zitzke, Roland" <[email-masked]>
To: <[email-masked]>
X-telosmf: done
Subject: [avr-gcc-list] C++ for AV^R
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,
has anyone ever tested the c++ front-end of the gcc 3.0 or 3.0.1 for the
AVR?
I noticed that it it possible without any problems to include c++ in the
--enable-languages statement when configuring and building.
The code produced looks fine at a first glance however, I'ld certainly
like to have some more information about it before using it in a
project.
Thanks and regards
Roland
=20

From [email-masked] Wed Oct 24 22:24:21 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wKGp-0002xB-00
for <[email-masked]>; Wed, 24 Oct 2001 22:24:20 +1300
Received: (from j@localhost)
by ida.interface-business.de id f9O9ReL15745;
Wed, 24 Oct 2001 11:27:40 +0200 (MET DST)
Date: Wed, 24 Oct 2001 11:27:40 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] Sought: interrupt-driven buffered UART sender
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Ron Kreymborg" <[email-masked]> wrote:

> Below and attached a Uart send routine I use quite a lot.

Thanks for following up to this!

(Btw., Rich's code looks fine, i'll test it and send him my remarks.
He intents to make it freely available.)

> //-------------------------------------------------------------------
> // Signal handler for uart txd ready interrupt.
> //
> SIGNAL(SIG_UART_TRANS)

Does SIG_UART_TRANS make sense? According to the AVR documentation,
it'll only be signalled once all characters have left the transmitter.
Normally, I'd use SIG_UART_DATA instead (which gets signalled once
there's room in the data holding register, i. e. the current byte is
still in the Tx shift register). However, handling UDRE interrupts is
a bit messy (the interrupt gets only cleared by writing to UDR, so
once all has been written, you need to turn that interrupt off again
completely since you can't write anything else to UDR), so i didn't
get my version to work at first.

Rich's code apparently does it that way. He did some things a bit
differently than my initial version, maybe that's the reason why it
works. ;-)

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Wed Oct 24 22:27:26 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wKJo-0002xh-00
for <[email-masked]>; Wed, 24 Oct 2001 22:27:25 +1300
Received: (from j@localhost)
by ida.interface-business.de id f9O9Upn15759;
Wed, 24 Oct 2001 11:30:51 +0200 (MET DST)
Date: Wed, 24 Oct 2001 11:30:51 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] C++ for AV^R
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Zitzke, Roland" <[email-masked]> wrote:

> has anyone ever tested the c++ front-end of the gcc 3.0 or 3.0.1 for
> the AVR?

Not much more than you did, i'm afraid. I once included the C++
frontend in the FreeBSD port of avr-gcc i'm maintaining, mainly
because i was interested in writing some simple C++ class-based code
for the AVR (a small complex class to be used in an FFT algorithm).
However, i didn't find the time to stress-test the generated code by
now.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Thu Oct 25 00:56:30 2001
Received: from mail.teleteam.net ([199.34.16.10])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wMe5-00034Z-00
for <[email-masked]>; Thu, 25 Oct 2001 00:56:30 +1300
Received: from tbd.tnex.com (cust-208-208-110-38.teleteam.net [208.208.110.38])
by mail.teleteam.net (8.11.6/8.11.6) with SMTP id f9OC0C606213
for <[email-masked]>; Wed, 24 Oct 2001 07:00:13 -0500 (CDT)
Message-Id: <[email-masked]>
From: "Bill Knight" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Wed, 24 Oct 2001 06:57:48 -0500
Reply-To: "Bill Knight" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 2000 Professional (2.20.2320) For Windows 2000 (5.0.2195;2)
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] A Suggestion to the avr-gcc-list Manager
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I don't know what software is being used to manage this list but a
suggestion if I may?

Would it be possible to change the Reply To: field to the list
<[email-masked]>, while leaving the From: field set to
the originator? That way (at least for my e-mail program) the sender
of a reply has a quick way to choose where the reply is sent.

Just a suggestion.

-Bill Knight
R O SoftWare

From [email-masked] Thu Oct 25 00:57:01 2001
Received: from mail2.alphalink.com.au ([202.161.124.58])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wMea-00034e-00
for <[email-masked]>; Thu, 25 Oct 2001 00:57:01 +1300
Received: from research (d116-ps3-mel.alphalink.com.au [202.161.108.244])
by mail2.alphalink.com.au (8.11.4/8.9.3) with SMTP id f9OBxr000381;
Wed, 24 Oct 2001 21:59:55 +1000
From: "Ron Kreymborg" <[email-masked]>
To: "Joerg Wunsch" <[email-masked]>,
<[email-masked]>
Subject: RE: [avr-gcc-list] Sought: interrupt-driven buffered UART sender
Date: Wed, 24 Oct 2001 22:06:17 +1000
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
In-Reply-To: <[email-masked]>
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Importance: Normal
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

In most situations, compared to the time scale of transmitting a byte, the
difference between using SIG_UART_TRANS and SIG_UART_DATA will be negligable
(a few microseconds). As you suggest, the advantage of SIG_UART_TRANS is
that you need not mess with the interrupt bits when there are no more bytes
to send (my code just sets the software busy flag to free). So unless data
rate is everything, I would go for the simpler solution.

//-------------------------------------------------------------------
// Signal handler for uart txd ready interrupt.
//
SIGNAL(SIG_UART_TRANS)
{
if (--MessageLen > 0) // while bytes to send
outp(*TxPntr++, UDR); // write next byte from data buffer
else
TxBusy = 0; // once again available
}

Ron

-------------------------------------------
Ron Kreymborg
Jennaron Research
Melbourne, Australia

> Does SIG_UART_TRANS make sense? According to the AVR documentation,
> it'll only be signalled once all characters have left the transmitter.
> Normally, I'd use SIG_UART_DATA instead (which gets signalled once
> there's room in the data holding register, i. e. the current byte is
> still in the Tx shift register). However, handling UDRE interrupts is
> a bit messy (the interrupt gets only cleared by writing to UDR, so
> once all has been written, you need to turn that interrupt off again
> completely since you can't write anything else to UDR), so i didn't
> get my version to work at first.
>
> Rich's code apparently does it that way. He did some things a bit
> differently than my initial version, maybe that's the reason why it
> works. ;-)
>
> --
> J"org Wunsch Unix support engineer
> [email-masked]
> http://www.interface-systems.de/~j/

From [email-masked] Thu Oct 25 01:15:14 2001
Received: from [213.250.32.129] (helo=timnts.tim.si)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wMwE-000366-00
for <[email-masked]>; Thu, 25 Oct 2001 01:15:14 +1300
Received: by TIMNTS with Internet Mail Service (5.5.2650.21)
id <4V5A5WFF>; Wed, 24 Oct 2001 13:34:39 +0200
Message-ID: <CD43781E1F1DD511AEEC00025558F51F4D97@TIMNTS>
From: Luc Damjan <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Date: Wed, 24 Oct 2001 13:34:39 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: text/plain;
charset="ISO-8859-2"
Subject: [avr-gcc-list] Text area full.
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all!

I am working on a big project with at90s8535 and when I compile it I get
some errors:

avr-gcc main.o uart.o global.o timer.o mystring.o ad.o unscramble.o
outpower.o
alarm.o caller.o -Wl,-Map=main.map,--cref -mmcu=at90s8535 -o main.elf
..\lib\gcc-lib\avr\3.0\..\..\..\..\avr\bin\ld.exe: region text is full
(main.elf
section .text)
make: *** [main.elf] Error 1

I thought that the program area of the at90s8353 was full, but when I
compile the same project for atmega103 and load it into the AVR studio, the
program area is less than 4K full. Any ideas?

Regards,

Damjan Luc.

From [email-masked] Thu Oct 25 03:29:49 2001
Received: from 208-58-86-11.c3-0.sfo-ubr1.sfrn-sfo.ca.cable.rcn.com ([208.58.86.11] helo=bc.home.246gt.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wP2S-0003Cn-00
for <[email-masked]>; Thu, 25 Oct 2001 03:29:48 +1300
Received: from fred.home.246gt.com (fred.home.246gt.com [10.0.0.74])
by bc.home.246gt.com (8.11.3/8.11.3) with ESMTP id f9OEXJK91532
for <[email-masked]>; Wed, 24 Oct 2001 07:33:19 -0700 (PDT)
(envelope-from [email-masked])
Received: (from ken@localhost)
by fred.home.246gt.com (8.11.2/8.11.2) id f9OEXIE24985
for [email-masked]; Wed, 24 Oct 2001 07:33:18 -0700
X-Authentication-Warning: fred.home.246gt.com: ken set sender to [email-masked] using -f
Date: Wed, 24 Oct 2001 07:33:18 -0700
From: ken restivo <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: application/pgp; x-action=sign; format=text
Content-Disposition: inline; filename="msg.pgp"
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Wed, Oct 17, 2001 at 12:01:09PM +1300
Subject: [avr-gcc-list] buffered uart writing/reading
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

someone was asking about buffered uart receives, etc.

i found this and was amazed.

* Nut/OS is a small real time operating system aimed at 8-bit CPUs.
*
* It supports the following features:
* - Corporative multi-threading
* - Synchronization mechanisms
* - Dynamic memory management
* - Asynchronous timers
* - Serial port character I/O
*
* A reasonably large hardware resource might be:
* - 0.5 kBytes RAM
* - 8 kBytes ROM
* - 1 MIPS CPU speed

http://www.ethernut.de

looks like a hybrid between LGPL and BSD licences... perfect for my purposes and maybe also for many others too.

there is even a NutPrintFormat which is a pretty damn good analogue of unix fprintf. it is buffered i/o roughly similar to stdio.

the OS itself looks quite closely tied to the mega103, but i'll be using portions of it on the mega163.

it also has a full tcp/ip stack! i'm floored. if the folks who did this are on this list: you guys rock!

- -ken
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE71tEte8HF+6xeOIcRAtdYAKCtC8faQZjNw+CZwtMcpoem8DoCYgCeOISy
ukLo/U98V2+HcCC1UyB2L+M=
=DvDF
-----END PGP SIGNATURE-----

From [email-masked] Thu Oct 25 06:23:46 2001
Received: from [206.97.148.120] (helo=vega.ipal.net ident=postfix)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wRkn-0003L3-00
for <[email-masked]>; Thu, 25 Oct 2001 06:23:46 +1300
Received: by vega.ipal.net (Postfix, from userid 700)
id 6145923D; Wed, 24 Oct 2001 12:27:14 -0500 (CDT)
Received: from localhost (localhost [127.0.0.1])
by vega.ipal.net (Postfix) with ESMTP id 609D623C
for <[email-masked]>; Wed, 24 Oct 2001 12:27:14 -0500 (CDT)
Date: Wed, 24 Oct 2001 12:27:14 -0500 (CDT)
From: Chris Baugher <[email-masked]>
X-Sender: [email-masked]
To: [email-masked]
Subject: Re: [avr-gcc-list] A Suggestion to the avr-gcc-list Manager
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Wed, 24 Oct 2001, Bill Knight wrote:

> I don't know what software is being used to manage this list but a
> suggestion if I may?
>
> Would it be possible to change the Reply To: field to the list
> <[email-masked]>, while leaving the From: field set to
> the originator? That way (at least for my e-mail program) the sender
> of a reply has a quick way to choose where the reply is sent.

I second this request.

C|

>
> Just a suggestion.
>
> -Bill Knight
> R O SoftWare
>
>
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Thu Oct 25 07:48:55 2001
Received: from [212.184.210.65] (helo=romulus.maridan.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wT5B-0003TG-00
for <[email-masked]>; Thu, 25 Oct 2001 07:48:54 +1300
Received: from egnite.net (pD9009FA5.dip.t-dialin.net [217.0.159.165])
by romulus.maridan.net (8.9.3/8.9.3) with SMTP id UAA25554
for <[email-masked]>; Wed, 24 Oct 2001 20:51:47 +0200
Message-Id: <[email-masked]>
From: "Harald Kipp" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Wed, 24 Oct 2001 21:00:54 +0100 (MEZ)
Reply-To: "Harald Kipp" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 2.00.1500 for OS/2 Warp 4.00
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: [avr-gcc-list] buffered uart writing/reading
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>if the folks who did this are on this list

Unfortunately Dave Hudson, who wrote the initial code,
has been employed by one of Atmel's competitors.

Send any feedback regarding Nut/OS to

[email-masked]

The whole thing is quite complex and may still
contain bugs. There seem to be something wrong when
calling timer functions (Sleep, Timeout) from concurrent
threads.

However, the UART part is bullet proofed and the
TCP stack did everything I needed till now. It
does not contain any Slip/PPP, but needs an Ethernet
controller (RTL8019AS).

Of course, the complete source for AVR-GCC is
included (if you don't forget to check it during
installation).

The code is free for private and commercial use,
open and closed source projects. As far as I can say,
it doesn't contain any GPL'ed parts, only LGPL with
additional comments for lesser restrictions from Dave.
Other parts have been stolen from BSD Linux.

Last not least: Without such a reliable compiler like
AVR-GCC this large project wouldn't have been possible.

Harald Kipp

egnite Software GmbH TEL +49 (0)2323-925375
Westring 303 FAX +49 (0)2323-925374
D 44629 Herne http://www.egnite.de
Germany

Buy Ethernut Online: http://www.opticompo.com
Ethernut Support: http://www.ethernut.de
Ethernut Development: http://ethernut.sourceforge.net

From [email-masked] Thu Oct 25 07:52:34 2001
Received: from fe100.worldonline.dk ([212.54.64.211])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15wT8j-0003Tl-00
for <[email-masked]>; Thu, 25 Oct 2001 07:52:33 +1300
Received: (qmail 21132 invoked by uid 0); 24 Oct 2001 18:55:33 -0000
Received: from 100.ppp1-1.worldonline.dk (HELO worldonline.dk) (213.237.0.100)
by fe100.worldonline.dk with SMTP; 24 Oct 2001 18:55:33 -0000
Message-ID: <[email-masked]>
Date: Wed, 24 Oct 2001 20:54:08 +0200
From: Jens Andersen <[email-masked]>
X-Mailer: Mozilla 4.08 [en] (Win98; I)
MIME-Version: 1.0
To: Jason Kyle <[email-masked]>
CC: [email-masked]
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Little OT: Is [email-masked] still alive.
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Jason Kyle wrote:
>
> Those of you who are subscribed to [email-masked] will need to
> re-subscribe next week sometime when the server has been re-built, see
> forwarded email below.
cut.

Hi all.

I did a re-subscription to the avrchat list about 2 weeks ago,
and recieved confirmation from the majordomo server, but i have not
recieved any traffic.

So i wonder, is the avrchat list still alive, or have i somehow
fouled up my re-subscription.

Best regards
Jens Andersen

From [email-masked] Thu Oct 25 09:00:01 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wUC1-0003XR-00
for <[email-masked]>; Thu, 25 Oct 2001 09:00:01 +1300
Received: from cel1.jpk.co.nz (adsl-179.world-net.co.nz [210.55.228.179])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id f9OK3Z416637
for <[email-masked]>; Thu, 25 Oct 2001 09:03:35 +1300
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Thu, 25 Oct 2001 09:06:05 +1300
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] A Suggestion to the avr-gcc-list Manager
In-Reply-To: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

And I reject that request!

There can be problems when you start munging the headers, check out
http://www.unicom.com/pw/reply-to-harmful.html for more detail.

I simple way around the problem you seem to be having is to select ReplyAll
rather than just Reply.

We use GNU mailman http://www.list.org

Cheers,

Jason Kyle
avr-gcc-list admin

At 06:27 25/10/2001, Chris Baugher wrote:
>On Wed, 24 Oct 2001, Bill Knight wrote:
>
> > I don't know what software is being used to manage this list but a
> > suggestion if I may?
> >
> > Would it be possible to change the Reply To: field to the list
> > <[email-masked]>, while leaving the From: field set to
> > the originator? That way (at least for my e-mail program) the sender
> > of a reply has a quick way to choose where the reply is sent.
>
>I second this request.

From [email-masked] Thu Oct 25 09:33:06 2001
Received: from firewall.dalsa.com ([207.176.180.114] helo=dalsa.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wUi2-0003Zi-00
for <[email-masked]>; Thu, 25 Oct 2001 09:33:06 +1300
Received: by firewall.dalsa.com id <119041>; Wed, 24 Oct 2001 16:36:18 -0400
Subject: Re: [avr-gcc-list] buffered uart writing/reading
To: ken restivo <[email-masked]>
Cc: [email-masked]
X-Mailer: Lotus Notes Release 5.0.1a (Intl) 17 August 1999
Message-Id: <[email-masked]>
From: [email-masked]
Date: Wed, 24 Oct 2001 16:33:31 -0400
X-MIMETrack: Serialize by Router on Wat/Dalsa(Release 5.0.5 |September 22, 2000) at 10/24/2001
04:33:31 PM
MIME-Version: 1.0
Content-type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Ken:
something happened with your attachment;
could you please try again;
Paivaa
John Johnson.

From [email-masked] Thu Oct 25 13:37:21 2001
Received: from ns0.ipal.net
([206.97.148.120] helo=vega.ipal.net ident=postfix)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wYWO-0003lr-00
for <[email-masked]>; Thu, 25 Oct 2001 13:37:20 +1300
Received: by vega.ipal.net (Postfix, from userid 700)
id 18E9423D; Wed, 24 Oct 2001 19:40:51 -0500 (CDT)
Received: from localhost (localhost [127.0.0.1])
by vega.ipal.net (Postfix) with ESMTP id 182A223C
for <[email-masked]>; Wed, 24 Oct 2001 19:40:51 -0500 (CDT)
Date: Wed, 24 Oct 2001 19:40:51 -0500 (CDT)
From: Chris Baugher <[email-masked]>
X-Sender: [email-masked]
Cc: [email-masked]
Subject: Re: [avr-gcc-list] A Suggestion to the avr-gcc-list Manager
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Thu, 25 Oct 2001, Jason Kyle wrote:

> And I reject that request!

Ok. It's not a big deal but I would like to clarify why I (at least)
wanted this. See below.

> There can be problems when you start munging the headers, check out
> http://www.unicom.com/pw/reply-to-harmful.html for more detail.
>
> I simple way around the problem you seem to be having is to select ReplyAll
> rather than just Reply.

This doesn't address what to do if you want to reply the list ONLY. When
replying to a list message I don't like to reply-to-all because then the
author of the message gets 2 copies, one from the list and one from the
person replying. To me this is annoying. Not a lot but a little.
To do this in Pine I have to first reply to all, then delete the
To: address, then cut the list address from the Cc: field and paste it
into the To: field.
This is easy to do but it would be convenient if I didn't have to.

While I think that some of the arguments in the URL you pointed to were a
bit of a stretch I do agree that munging the Reply-To: field is probably
not "The Right Thing to Do".

So anyway, sorry for cluttering up the list with this.

C|

PS: If anyone knows of a way to reply to the list only in Pine (easily) I
would like to know about it! Thanks!

>
> We use GNU mailman http://www.list.org
>
> Cheers,
>
> Jason Kyle
> avr-gcc-list admin
>
> At 06:27 25/10/2001, Chris Baugher wrote:
> >On Wed, 24 Oct 2001, Bill Knight wrote:
> >
> > > I don't know what software is being used to manage this list but a
> > > suggestion if I may?
> > >
> > > Would it be possible to change the Reply To: field to the list
> > > <[email-masked]>, while leaving the From: field set to
> > > the originator? That way (at least for my e-mail program) the sender
> > > of a reply has a quick way to choose where the reply is sent.
> >
> >I second this request.
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Thu Oct 25 20:22:24 2001
Received: from bs1.dnx.de ([213.252.143.130] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15weqO-00041j-00
for <[email-masked]>; Thu, 25 Oct 2001 20:22:24 +1300
Received: from pd9e34698.dip.t-dialin.net ([217.227.70.152] helo=callisto.local)
by bs1.dnx.de with asmtp (Exim 3.33 #1)
id 15wetn-0006A1-00
for [email-masked]; Thu, 25 Oct 2001 09:25:55 +0200
Received: from localhost (localhost [127.0.0.1])
by callisto.local (Postfix on SuSE Linux 7.2 (i386)) with ESMTP id A538FB623
for <[email-masked]>; Thu, 25 Oct 2001 10:59:44 +0200 (CEST)
Date: Thu, 25 Oct 2001 10:59:44 +0200 (CEST)
From: Robert Schwebel <[email-masked]>
X-X-Sender: <[email-masked]>
Reply-To: <[email-masked]>
To: <[email-masked]>
Subject: Re: [avr-gcc-list] A Suggestion to the avr-gcc-list Manager
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: QUOTED-PRINTABLE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Wed, 24 Oct 2001, Chris Baugher wrote:
> To do this in Pine I have to first reply to all, then delete the To:
> address, then cut the list address from the Cc: field and paste it
> into the To: field. This is easy to do but it would be convenient if I
> didn't have to.

Procmail is your friend:

----------8<----------
:0 f
* [email-masked]
| formail -i 'Reply-To: [email-masked]'

:0
* [email-masked]
path/to/your/mailfolder
---------->8----------

Robert
--=20
+--------------------------------------------------------+
| Dipl.-Ing. Robert Schwebel |
| Linux Solutions for Science and Industry |
| Braunschweiger Stra=DFe 79, 31134 Hildesheim, Germany |
| Phone: +49-5121-28619-0 Fax: +49-5121-28619-4 |
+--------------------------------------------------------+

From [email-masked] Thu Oct 25 21:33:52 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wfxU-00044r-00
for <[email-masked]>; Thu, 25 Oct 2001 21:33:49 +1300
Received: (from j@localhost)
by ida.interface-business.de id f9P8bCj28973;
Thu, 25 Oct 2001 10:37:12 +0200 (MET DST)
Date: Thu, 25 Oct 2001 10:37:12 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] A Suggestion to the avr-gcc-list Manager
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Chris Baugher <[email-masked]> wrote:

>> I simple way around the problem you seem to be having is to select
>> ReplyAll rather than just Reply.

> This doesn't address what to do if you want to reply the list ONLY.

Well, there are various options for this:

.. you manually edit the headers after hitting the group-reply button,

.. you use an MUA that supports replying to mailing lists (e. g. Mutt
does -- and Mutt's default behaviour is much like pine, so you
shouldn't have much troubles using it),

.. procmail has already been mentioned,

.. i use a mail -> news gateway that sets the reply-to address
accordingly (and adds a "followup-to: poster" so nobody would
followup into the local newsgroup).

In either case, i agree with Jason that this should not be done at the
mailing list gateway. Many other mailing lists have been discussing
this before, and virtually all agree that it's a bad idea.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Thu Oct 25 21:40:12 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wg3c-00045j-00
for <[email-masked]>; Thu, 25 Oct 2001 21:40:09 +1300
Received: (from j@localhost)
by ida.interface-business.de id f9P8hZX28982;
Thu, 25 Oct 2001 10:43:35 +0200 (MET DST)
Date: Thu, 25 Oct 2001 10:43:35 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] buffered uart writing/reading
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Harald Kipp" <[email-masked]> wrote:

> However, the UART part is bullet proofed and the
> TCP stack did everything I needed till now. It
> does not contain any Slip/PPP, but needs an Ethernet
> controller (RTL8019AS).

Btw., i also intend to buy an Ethernut board, and to play a bit with
it. Anyway, i think this one is fighting in a totally different class
than what has been my initial idea when asking the question.
Basically, a buffered UART driver is something that is needed in
almost any serious application that uses a UART, even on smaller
controllers. Thus i like Rich's solution which has been optimized
down as much as possible. (I'm still in the process of testing it,
hobbyist's spare-time is scarce, and will probably send Rich some
comments...)

> Other parts have been stolen from BSD Linux.

No such thing as »BSD Linux«. :-) There's BSD, and there's Linux...
(Since you're saying you don't have GPLed code, my guess is you've
actually been using one of the BSDs.)

I didn't look into the NutOS code so far. How much work would it be
to adapt it to another ethernet chip? The reason i'm asking: i've got
a pile of 3C509 cards around, IMHO the hardware effort to get them
working together with an ATMega shouldn't differ much from the
RTL8012, so the questions is whether it's easy to plug in another
ethernet hardware driver. (I know a bit of ethernet drivers, at least
from the context of writing a FreeBSD driver.)

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Thu Oct 25 22:30:53 2001
Received: from [212.184.210.65] (helo=romulus.maridan.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wgqi-00048C-00
for <[email-masked]>; Thu, 25 Oct 2001 22:30:52 +1300
Received: from egnite.net (pD900A7E5.dip.t-dialin.net [217.0.167.229])
by romulus.maridan.net (8.9.3/8.9.3) with SMTP id LAA10370;
Thu, 25 Oct 2001 11:33:47 +0200
Message-Id: <[email-masked]>
From: "Harald Kipp" <[email-masked]>
To: "[email-masked]" <[email-masked]>,
"Joerg Wunsch" <[email-masked]>
Date: Thu, 25 Oct 2001 11:42:59 +0100 (MEZ)
Reply-To: "Harald Kipp" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 2.00.1500 for OS/2 Warp 4.00
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Subject: Re: [avr-gcc-list] buffered uart writing/reading
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>No such thing as =BBBSD Linux=AB. :-)

You're correct. It should read BSD Unix.

>I didn't look into the NutOS code so far. How much work would it be
>to adapt it to another ethernet chip? The reason i'm asking: i've got
>a pile of 3C509 cards around, IMHO the hardware effort to get them
>working together with an ATMega shouldn't differ much from the
>RTL8012, so the questions is whether it's easy to plug in another
>ethernet hardware driver.

Not very difficult. Nut/OS uses a well defined interface for
the network driver. I'd recommend to get the original Liquorice
code from sourceforge. It contains a 3COM driver, which should
be easily portable to Nut/OS.

Also check http://avr.jpk.co.nz/eavr/eavr.html

Harald Kipp

egnite Software GmbH TEL +49 (0)2323-925375
Westring 303 FAX +49 (0)2323-925374
D 44629 Herne http://www.egnite.de
Germany

Buy Ethernut Online: http://www.opticompo.com
Ethernut Support: http://www.ethernut.de
Ethernut Development: http://ethernut.sourceforge.net

From [email-masked] Thu Oct 25 23:23:39 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15whfj-0004Aw-00
for <[email-masked]>; Thu, 25 Oct 2001 23:23:37 +1300
Received: (from j@localhost)
by ida.interface-business.de id f9PAQuA44479;
Thu, 25 Oct 2001 12:26:56 +0200 (MET DST)
Date: Thu, 25 Oct 2001 12:26:56 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
In-Reply-To: <[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] buffered uart writing/reading
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Harald Kipp" <[email-masked]> wrote:

[Plug a 3C509 into Nut/OS]

> Not very difficult. Nut/OS uses a well defined interface for
> the network driver. I'd recommend to get the original Liquorice
> code from sourceforge. It contains a 3COM driver, which should
> be easily portable to Nut/OS.

Great. Probably nothing i'll get time to do within the next
couple of months, but a fine usage to recycle old ISA ethernet
cards.

Thanks for all your work!

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Fri Oct 26 03:37:17 2001
Received: from mail.arrow.altech.co.za ([196.28.127.102] helo=aadpdc.arrow.altech.co.za)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wldE-0004NW-00
for <[email-masked]>; Fri, 26 Oct 2001 03:37:17 +1300
Received: by ACA811FB.ipt.aol.com with Internet Mail Service (5.5.2448.0)
id <45TSFR8Q>; Thu, 25 Oct 2001 16:32:44 +0200
Message-ID: <[email-masked]>
From: Andries Posthumus <[email-masked]>
To: [email-masked]
Date: Thu, 25 Oct 2001 16:32:43 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C15D61.E8854606"
Subject: [avr-gcc-list] Program size
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C15D61.E8854606
Content-Type: text/plain;
charset="iso-8859-1"

How do I know, what is the size of program memory and ram used when code was
compiled ?

Regards

Andries Posthumus

------_=_NextPart_001_01C15D61.E8854606
Content-Type: text/html;
charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

<META content="MSHTML 5.00.3103.1000" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=697324514-25102001>How do I know, what
is the size of program memory and ram used when code was compiled
?</SPAN></FONT></DIV>
<DIV class=Section1>
<P><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">Regards</SPAN> </P>
<P><B><U><SPAN style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">Andries
Posthumus</SPAN></U></B><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">
</SPAN></P>
<P>&nbsp;</P></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------_=_NextPart_001_01C15D61.E8854606--

From [email-masked] Fri Oct 26 04:15:09 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wmDs-0004PX-00
for <[email-masked]>; Fri, 26 Oct 2001 04:15:09 +1300
Received: (from j@localhost)
by ida.interface-business.de id f9PFIfW18762;
Thu, 25 Oct 2001 17:18:41 +0200 (MET DST)
Date: Thu, 25 Oct 2001 17:18:41 +0200 (MET DST)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] Program size
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Andries Posthumus <[email-masked]> wrote:

> How do I know, what is the size of program memory and ram used when
> code was compiled ?

avr-size is your friend. Run it on the (final) ELF file, and it'll
display you some values:

text data bss dec hex filename
812 2 7 821 335 test2.out

»text« is the size of the program memory (instructions and possibly
constant strings you've put there using »__attribute__((progmem))«).

»data« is the usage of initialized RAM (variables at global level or
with storage class »static« that have an initializer). Since the
initialization has to be performed by the AVR before entering the main
program, those values increase the actual ROM usage (the initializer
values are stored behind the program text, and the runtime system
initializes the RAM from there).

»bss« is also part of the RAM, but contains uninitialized data. The
runtime environment ensures these data are zeroed out before starting
main().

Thus, the above program would effectively consume 814 bytes of ROM,
and 9 bytes of RAM.

The remaining values are there because they always used to be there in
the Unix pendant of the size command; they have no useful meaning for
the AVR toolchain.

A note about data initialization: it's a common misconception for many
C newbies to declare variables at the global level or with a static
storage class like that:

int somenumber = 0;

void
somefunc(void)
{
static int somecounter = 0;

...
}

just to »make sure« those variables have a »well-defined 0 value« when
entering main(). Technically however, this means you instruct the
compiler to move out those variables from bss to data. As explained
above, this will cause additional ROM consumption on the AVR, since
the initializer values have to be carried in ROM. The net effect
(from the program's point of view) of all this is nil; the C standard
already ensures that global and static variables are set to 0 at
startup. (This is a simplified statement in terms of the standard,
but good enough for our consideration here.) The runtime code
implements this C standard requirement, and zeroes out the bss.

So, always write it like that:

int somenumber;

void
somefunc(void)
{
static int somecounter;

...
}

> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

Please don't post HTML articles.

p.s.: No, there's no 100 % agreed explanation what »bss« actually
stands for. The most likely version is that some old compiler used it
as an instruction standing for »block starting symbol«, and Unix has
inherited it from there. But there are other explanations for it as
well.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Fri Oct 26 05:56:13 2001
Received: from ns0.ipal.net
([206.97.148.120] helo=vega.ipal.net ident=postfix)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wnnh-0004VB-00
for <[email-masked]>; Fri, 26 Oct 2001 05:56:13 +1300
Received: by vega.ipal.net (Postfix, from userid 700)
id 582B123D; Thu, 25 Oct 2001 11:59:47 -0500 (CDT)
Received: from localhost (localhost [127.0.0.1])
by vega.ipal.net (Postfix) with ESMTP
id 5770D23C; Thu, 25 Oct 2001 11:59:47 -0500 (CDT)
Date: Thu, 25 Oct 2001 11:59:47 -0500 (CDT)
From: Chris Baugher <[email-masked]>
X-Sender: [email-masked]
To: Robert Schwebel <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] A Suggestion to the avr-gcc-list Manager
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=X-UNKNOWN
Content-Transfer-Encoding: QUOTED-PRINTABLE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Thu, 25 Oct 2001, Robert Schwebel wrote:

> On Wed, 24 Oct 2001, Chris Baugher wrote:
> > To do this in Pine I have to first reply to all, then delete the To:
> > address, then cut the list address from the Cc: field and paste it
> > into the To: field. This is easy to do but it would be convenient if I
> > didn't have to.
>=20
> Procmail is your friend:
>=20
> ----------8<----------
> :0 f
> * [email-masked]
> | formail -i 'Reply-To: [email-masked]'
>=20
> :0
> * [email-masked]
> path/to/your/mailfolder
> ---------->8----------

Cool, I'll look into this. Thanks!

Incidentally I found out that I don't actually *have* to have the
To: field filled in. I can just delete the To: field and leave the list
address in Cc: and it works fine.

C|

>=20
> Robert
> --=20
> +--------------------------------------------------------+
> | Dipl.-Ing. Robert Schwebel |
> | Linux Solutions for Science and Industry |
> | Braunschweiger Stra=DFe 79, 31134 Hildesheim, Germany |
> | Phone: +49-5121-28619-0 Fax: +49-5121-28619-4 |
> +--------------------------------------------------------+
>=20
>=20
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>=20

From [email-masked] Fri Oct 26 06:16:14 2001
Received: from [206.97.148.120] (helo=vega.ipal.net ident=postfix)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wo74-0004WR-00
for <[email-masked]>; Fri, 26 Oct 2001 06:16:14 +1300
Received: by vega.ipal.net (Postfix, from userid 700)
id 4BDA023F; Thu, 25 Oct 2001 12:19:50 -0500 (CDT)
Received: from localhost (localhost [127.0.0.1])
by vega.ipal.net (Postfix) with ESMTP id 499A223D
for <[email-masked]>; Thu, 25 Oct 2001 12:19:50 -0500 (CDT)
Date: Thu, 25 Oct 2001 12:19:50 -0500 (CDT)
From: Chris Baugher <[email-masked]>
X-Sender: [email-masked]
Cc: [email-masked]
Subject: Re: [avr-gcc-list] A Suggestion to the avr-gcc-list Manager
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Thu, 25 Oct 2001, Joerg Wunsch wrote:

> Chris Baugher <[email-masked]> wrote:
>
> >> I simple way around the problem you seem to be having is to select
> >> ReplyAll rather than just Reply.
>
> > This doesn't address what to do if you want to reply the list ONLY.
>
> Well, there are various options for this:
>
> .. you manually edit the headers after hitting the group-reply button,

doing that now

> .. you use an MUA that supports replying to mailing lists (e. g. Mutt
> does -- and Mutt's default behaviour is much like pine, so you
> shouldn't have much troubles using it),

This won't happen. I've been been using Pine for a long time and would be
sad if I had to switch.:(

> .. procmail has already been mentioned,

hmmm... yes...

> .. i use a mail -> news gateway that sets the reply-to address
> accordingly (and adds a "followup-to: poster" so nobody would
> followup into the local newsgroup).
>
> In either case, i agree with Jason that this should not be done at the
> mailing list gateway. Many other mailing lists have been discussing
> this before, and virtually all agree that it's a bad idea.

Wow. I must have been lucky then. I'm pretty sure all 6 of the other lists
I'm on DO mung the headers.

C|

>
> --
> J"org Wunsch Unix support engineer
> [email-masked] http://www.interface-systems.de/~j/
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Fri Oct 26 06:56:16 2001
Received: from mail.teleteam.net ([199.34.16.10])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15wojo-0004cZ-00
for <[email-masked]>; Fri, 26 Oct 2001 06:56:16 +1300
Received: from tbd.tnex.com (cust-208-208-110-38.teleteam.net [208.208.110.38])
by mail.teleteam.net (8.11.6/8.11.6) with SMTP id f9PI07W06494
for <[email-masked]>; Thu, 25 Oct 2001 13:00:07 -0500 (CDT)
Message-Id: <[email-masked]>
From: "Bill Knight" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Thu, 25 Oct 2001 12:57:27 -0500
Reply-To: "Bill Knight" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 2000 Professional (2.20.2320) For Windows 2000 (5.0.2195;2)
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: Re: [avr-gcc-list] A Suggestion to the avr-gcc-list Manager
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Thu, 25 Oct 2001 12:19:50 -0500 (CDT), Chris Baugher wrote:

>Wow. I must have been lucky then. I'm pretty sure all 6 of the other lists
>I'm on DO mung the headers.

Same here. That's why I origianlly suggested it (and I find it useful).

From [email-masked] Fri Oct 26 17:04:02 2001
Received: from thor.hol.gr ([194.30.192.25])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15wyDv-00053Y-00
for <[email-masked]>; Fri, 26 Oct 2001 17:03:59 +1300
Received: (qmail 3907 invoked from network); 26 Oct 2001 04:03:25 -0000
Received: from isis.hol.gr (194.30.192.21)
by thor.hol.gr with SMTP; 26 Oct 2001 04:03:25 -0000
Received: (qmail 8371 invoked from network); 26 Oct 2001 04:06:50 -0000
Received: from vdp136.ath03.cas.hol.gr (HELO dafni1) (195.97.118.137)
by isis.hol.gr with SMTP; 26 Oct 2001 04:06:50 -0000
Reply-To: <[email-masked]>
From: "Dafni & Robert Berger" <[email-masked]>
To: <[email-masked]>
Date: Fri, 26 Oct 2001 07:13:34 +0300
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
In-Reply-To: <[email-masked]>
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Subject: [avr-gcc-list] debugging avr-gcc code
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

Can you please tell me how to debug avr-gcc code ?

First of all I would like to say that I'm pretty new with the AVR and I'm
searching for a simulator, since I don't have any harware yet.

1.) I tried avr studio:

With the elf to coff tool I can debug simple programs, but I compiled
ucos-ii and it keeps crashing the avr studio.

2.) I tried avrsim on linux:

This is also a bit unhappy even with simple programs.
I found out that I need to pass a bin file, so I covert the .rom file (intel
hex) into a bin file, but still I'm getting a segmentation fault.

I can not even compile the source code on RH7.1, since I'm getting syntax
errors.

3.) I am willing to buy an ICE, but I don't know how to debug avr-gcc code
with this.

Can you please help ?

How are you guys debugging your code ?

reards,

Robert

From [email-masked] Fri Oct 26 19:22:23 2001
Received: from [206.97.148.120] (helo=vega.ipal.net ident=postfix)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15x0Nq-0005AC-00
for <[email-masked]>; Fri, 26 Oct 2001 19:22:23 +1300
Received: by vega.ipal.net (Postfix, from userid 700)
id BDDEC23F; Fri, 26 Oct 2001 01:25:59 -0500 (CDT)
Received: from localhost (localhost [127.0.0.1])
by vega.ipal.net (Postfix) with ESMTP id BD47423D
for <[email-masked]>; Fri, 26 Oct 2001 01:25:59 -0500 (CDT)
Date: Fri, 26 Oct 2001 01:25:59 -0500 (CDT)
From: Chris Baugher <[email-masked]>
X-Sender: [email-masked]
Cc: [email-masked]
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] ATTiny15
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I notice the ATTiny15 is not supported by avr-gcc. Is support planned for
this chip in the near future?

C|

From [email-masked] Sat Oct 27 23:51:34 2001
Received: from r220-1.rz.rwth-aachen.de ([134.130.3.31])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15xR3s-0006NC-00
for <[email-masked]>; Sat, 27 Oct 2001 23:51:32 +1300
Received: from r220-1.rz.RWTH-Aachen.DE (relay2.RWTH-Aachen.DE [134.130.3.1])
by r220-1.rz.RWTH-Aachen.DE (8.10.1/8.11.3-2) with ESMTP id f9RAtBj01683
for <[email-masked]>; Sat, 27 Oct 2001 12:55:11 +0200 (MEST)
Received: from Ostermann-net.de (pD9E09EC3.dip.t-dialin.net [217.224.158.195])
by r220-1.rz.RWTH-Aachen.DE (8.10.1/8.11.3/6) with SMTP id f9RAtAo01679
for <[email-masked]>; Sat, 27 Oct 2001 12:55:10 +0200 (MEST)
Message-Id: <[email-masked]>
Date: Sat, 27 Oct 2001 09:40:22 +0200
From: Thorsten Ostermann <[email-masked]>
To: [email-masked]
X-Mailer: Thorsten Ostermann's registered AK-Mail 3.1 publicbeta2a [ger]
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] Re: ATTiny15
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi!

> I notice the ATTiny15 is not supported by avr-gcc. Is support
> planned for this chip in the near future?

I don't know the specs of the Tiny15. Is it similar to the Tiny12? That
one has no real stack, so you won't find any compiler for it.

Best regards
Thorsten
--
PGP welcome!
Thorsten online: http://www.ostermann-net.de/electronic/
Rund um Schrittmotor, Fr=E4s-Bohr-Plotter & Mikrocontroller

From [email-masked] Sun Oct 28 08:55:48 2001
Received: from mx04.nexgo.de ([151.189.8.80])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15xZYa-0008Lc-00
for <[email-masked]>; Sun, 28 Oct 2001 08:55:48 +1300
Received: from kleinertiga.local (dialin-145-254-113-141.arcor-ip.net [145.254.113.141])
by mx04.nexgo.de (Postfix) with ESMTP
id 9A12F37F84; Sat, 27 Oct 2001 21:59:20 +0200 (CEST)
Received: from gmx.de (localhost [127.0.0.1])
by kleinertiga.local (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id f9RJxCG08359;
Sat, 27 Oct 2001 21:59:17 +0200
X-Authentication-Warning: kleinertiga.local: Host localhost [127.0.0.1] claimed to be gmx.de
Message-ID: <[email-masked]>
Date: Sat, 27 Oct 2001 21:59:12 +0200
From: Klaus Rudolph <[email-masked]>
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked], [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Unable to install avr-gcc from combio.de binary linux sources
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Gunnar, hi all

I downloaded your binary tar balls (libc, gcc und binutils)
After tar -xzf and copys i got:
crts8515.o not found

OK I must compile the src from the libc

make
OK the crts8515.o was build
make install
error over error. There are bugs in the makefile?

Can I copy the files by hand ... many directorys! Please tell me a
better way!

Anybody can help me?

Cheers
Klaus

From [email-masked] Sun Oct 28 10:15:59 2001
Received: from mx04.nexgo.de ([151.189.8.80])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15xaoA-0008Oz-00
for <[email-masked]>; Sun, 28 Oct 2001 10:15:59 +1300
Received: from kleinertiga.local (dialin-145-254-113-164.arcor-ip.net [145.254.113.164])
by mx04.nexgo.de (Postfix) with ESMTP
id 734EA37B27; Sat, 27 Oct 2001 23:19:43 +0200 (CEST)
Received: from gmx.de (localhost [127.0.0.1])
by kleinertiga.local (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id f9RLJaG14036;
Sat, 27 Oct 2001 23:19:41 +0200
X-Authentication-Warning: kleinertiga.local: Host localhost [127.0.0.1] claimed to be gmx.de
Message-ID: <[email-masked]>
Date: Sat, 27 Oct 2001 23:19:36 +0200
From: Klaus Rudolph <[email-masked]>
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked], [email-masked]
Subject: Re: [avr-gcc-list] Unable to install avr-gcc from combio.de binary linux
sources
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

my problem is solved. There was an illegal prefix=/... in the makefiles,
thats all.

Thanks for listening and good night!

Cheers
Klaus

From [email-masked] Sun Oct 28 19:34:09 2001
Received: from mailout02.sul.t-online.com ([194.25.134.17] helo=mailout02.sul.t-online.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15xjWK-0000IS-00
for <[email-masked]>; Sun, 28 Oct 2001 19:34:08 +1300
Received: from fwd05.sul.t-online.de
by mailout02.sul.t-online.de with smtp
id 15xjZx-0002uA-02; Sun, 28 Oct 2001 07:37:53 +0100
Received: from vivaldi (520013112276-0001@[217.228.140.81]) by fwd05.sul.t-online.com
with smtp id 15xjZt-1dF1PMC; Sun, 28 Oct 2001 07:37:49 +0100
Reply-To: <[email-masked]>
From: [email-masked] (Nicolas Nickisch)
To: <[email-masked]>
Date: Sun, 28 Oct 2001 07:37:47 +0100
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
X-Sender: [email-masked]
Subject: [avr-gcc-list] Potential linker problems with interrupt routine
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi, even after hours of reading newsgroup subjects and trying I still have
problems with my project.
So I need help.

The error: My program uses an interrupt handler for the external interrupt
but the interupt-routine is called right at program-startup. The
main()-function is never executed.

The initialization stuff and even sei() is done in the main()-function.

After compiling and testing my program in AVR-Studio I found out, that the
interrupt handler is called directly from gcrt1.s - not the main()-function
as wanted.

As far as I know the problem comes from a linker problem: the startup code
seems not to be linked to the compiled program.

Somewhere I found I hint that the compiler switch "-c" is responsible for
the missing link (?)

So this is the make-output:

avr-gcc -c -g -O -Wall -Wstrict-prototypes -Wa,-ahlmns=pcf-test.lst -mmcu=at
90s8
515 -I. pcf-test.c -o pcf-test.o
pcf-test.c: In function `_interrupt0_':
pcf-test.c:182: warning: array subscript has type `char'
avr-gcc -c -g -O -Wall -Wstrict-prototypes -Wa,-ahlmns=lcd.lst -mmcu=at90s85
15 -
I. lcd.c -o lcd.o
avr-gcc -c -g -O -Wall -Wstrict-prototypes -Wa,-ahlmns=timer.lst -mmcu=at90s
8515
-I. timer.c -o timer.o
avr-gcc -Wa,-gstabs -mmcu=at90s8515 -c -o i2cmas.o i2cmas.S
avr-gcc i2cmas.o pcf-test.o lcd.o
timer.o -Wl,-Map=PCF8574.map,--cref -mmcu=at
90s8515 -o PCF8574.elf
avr-objcopy -O ihex -R .eeprom PCF8574.elf PCF8574.rom
avr-objcopy -j
.eeprom --set-section-flags=.eeprom="alloc,load" --change-section
-lma .eeprom=0 -O ihex PCF8574.elf PCF8574.eep
Errors: none
elfcoff PCF8574.elf coff PCF8574.cof PCF8574.sym
Ended
cp Coff\PCF8574.cof .
cp Coff\\*sym .
cp Coff\\*S .
rm i2cmas.o

And here we have all the "-c"s. I think I eliminated all the "-c" in make1,
make2 and makefile.

For additionial information:

pcf-test.c contains the main()-function and the interrupt-handler and calls
functions in other files

lcd.c contains functions for output to an lcd-display
timer. c contains a delay-fnction

i2cmas.S is a assembler library from P. Fleury

The makefile:
# Simple Makefile
# Volker Oth (c) 1999 modified by N. Nickisch 2001

include $(AVR)/include/make1

########### change this lines according to your project ##################

#put the name of the target mcu here (at90s8515, at90s8535, attiny22,
atmega603 etc.)
MCU = at90s8515

#put the name of the target file here (without extension)
TRG = PCF8574

#put your C sourcefiles here
SRC = timer.c lcd.c pcf-test.c

#put additional assembler source file here
ASRC = i2cmas.s

#additional libraries and object files to link
LIB =

#additional includes to compile
INC =

#compiler flags
CPFLAGS = -g -O -Wall -Wstrict-prototypes -Wa,-ahlmns=$(<:.c=.lst)

#linker flags
LDFLAGS = -Wl,-Map=$(TRG).map,--cref

########### you should not need to change the following line #############
include $(AVR)/include/make2

###### dependecies, add any dependencies you need here ###################

#sercomm.o : sercomm.c
timer.o : timer.c timer.h
lcd.o: timer.h timer.c lcd.c
pcf-test.o :pcf-test.c

$(TRG).o : $(TRG).c

OUT = coff

The make1:
# GCC-AVR standard Makefile part 1
# Volker Oth 1/2000
# Modified by AVRfreaks.net for smoother integrasjon with AVR Studio.
(06/2001)

###### define some variables based on the AVR base path in $(AVR) #######
CC = avr-gcc
AS = avr-gcc -x assembler-with-cpp
RM = rm -f
RD = rm -r
RN = mv
CP = cp
BIN = avr-objcopy
ELFCOF = elfcoff
SIZE = avr-size
INCDIR = .
LIBDIR = $(AVR)/avr/lib
SHELL = $(AVR)/bin/sh.exe
###### output format can be srec, ihex (avrobj is always created) #######
FORMAT = ihex
########################## default mcu type #############################
MCU = at90s8515
####################### default compiler flags ##########################
CPFLAGS = -g -O3 -Wall -Wstrict-prototypes -Wa,-ahlms=$(<:.c=.lst)
####################### default assembler flags #########################
ASFLAGS = -Wa,-gstabs
########################## default linker flags #########################
LDFLAGS = -Wl,-Map=$(TRG).map,--cref

The make 2:
# GCC-AVR standard Makefile part 2
# Volker Oth 1/2000
# Modified by AVRfreaks.net for smoother integrasjon with AVR Studio.
(06/2001)

#define all project specific object files
OBJ = $(ASRC:.s=.o) $(SRC:.c=.o)
CPFLAGS += -mmcu=$(MCU)
ASFLAGS += -mmcu=$(MCU)
LDFLAGS += -mmcu=$(MCU)

#this defines the aims of the make process
all: $(TRG).elf $(TRG).rom $(TRG).eep $(TRG).ok $(TRG).cof

#compile: instructions to create assembler and/or object files from C source
%o : %c
$(CC) -c $(CPFLAGS) -I$(INCDIR) $< -o $@
#neu $(CC) $(CPFLAGS) -I$(INCDIR) $< -o $@

%s : %c
$(CC) -S $(CPFLAGS) -I$(INCDIR) $< -o $@

#assemble: instructions to create object file from assembler files
%o : %s
$(AS) -c $(ASFLAGS) -I$(INCDIR) $< -o $@
#neu $(AS) $(ASFLAGS) -I$(INCDIR) $< -o $@

#link: instructions to create elf output file from object files
%elf: $(OBJ)
$(CC) $(OBJ) $(LIB) $(LDFLAGS) -o $@

#create bin (ihex, srec) file from elf output file
%rom: %elf
$(BIN) -O $(FORMAT) -R .eeprom $< $@

%eep: %elf
$(BIN) -j
.eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma
.eeprom=0 -O $(FORMAT) $< $@

%cof: %elf
$(ELFCOF) $< $(OUT) $@ $*sym
$(CP) Coff\$@ .
$(CP) Coff\\*sym .
$(CP) Coff\\*S .

#If all other steps compile ok then echo "Errors: none".
#Necessary for AVR Studio to understand that everything went ok.
%ok:
@echo "Errors: none"

#make instruction to delete created files
clean:
$(RM) $(OBJ)
$(RM) $(SRC:.c=.s)
$(RM) $(SRC:.c=.lst)
$(RM) $(TRG).map
$(RM) $(TRG).elf
$(RM) $(TRG).obj
$(RM) $(TRG).a90
$(RM) $(TRG).hex
$(RM) $(TRG).avd
$(RM) $(TRG).cof
$(RM) $(TRG).eep
$(RM) $(TRG).rom

$(RM) $(TRG).sym
$(RM) $(TRG).c_sym

$(RM) *.bak
$(RM) *.log

$(RD) Coff

size:
$(SIZE) $(TRG).elf

This project has been started months ago.
The first test runs worked. Now I returned to the project after downloading
elfcoff and installing the newest avr-gcc-package.
maybe the program was first compiled with an older version of avr-gcc.

Nicolas Nickisch

From [email-masked] Mon Oct 29 01:37:57 2001
Received: from dav27.law15.hotmail.com ([64.4.22.84] helo=hotmail.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15xpCO-0000YA-00
for <[email-masked]>; Mon, 29 Oct 2001 01:37:56 +1300
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
Sun, 28 Oct 2001 04:41:15 -0800
X-Originating-IP: [213.123.18.200]
From: "Leon Heller" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]>
Date: Mon, 29 Oct 2001 00:39:39 -0000
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <[email-masked]>
X-OriginalArrivalTime: 28 Oct 2001 12:41:15.0105 (UTC) FILETIME=[D506AD10:01C15FAD]
Subject: [avr-gcc-list] List archive?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Is the list archived anywhere? I've a few questions, and they are bound to
have been answered before.

Leon

Leon Heller, G1HSM [email-masked]
http://www.geocities.com/leon_heller
Low-cost Altera Flex design kit: http://www.leonheller.com

From [email-masked] Mon Oct 29 01:50:07 2001
Received: from mtiwmhc25.worldnet.att.net ([204.127.131.50])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15xpOA-0000Z6-00
for <[email-masked]>; Mon, 29 Oct 2001 01:50:06 +1300
Received: from jimanji ([12.93.212.124]) by mtiwmhc25.worldnet.att.net
(InterMail vM.4.01.03.27 201-229-121-127-20010626) with SMTP
id <20011028125323.PTV11294.mtiwmhc25.worldnet.att.net@jimanji>
for <[email-masked]>; Sun, 28 Oct 2001 12:53:23 +0000
Message-ID: <[email-masked]>
Reply-To: "Jim Pearce" <[email-masked]>
From: "Jim Pearce" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]> <[email-masked]>
Subject: Re: [avr-gcc-list] List archive?
Date: Sun, 28 Oct 2001 08:53:24 -0400
Organization: Pegasus Technologies
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

http://avr.jpk.co.nz/pipermail/avr-gcc-list/

> Is the list archived anywhere? I've a few questions, and they are bound to
> have been answered before.
>
> Leon
>
> Leon Heller, G1HSM [email-masked]
> http://www.geocities.com/leon_heller
> Low-cost Altera Flex design kit: http://www.leonheller.com
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Mon Oct 29 03:41:11 2001
Received: from mx04.nexgo.de ([151.189.8.80])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15xr7d-0000ee-00
for <[email-masked]>; Mon, 29 Oct 2001 03:41:11 +1300
Received: from kleinertiga.local (dialin-145-254-116-072.arcor-ip.net [145.254.116.72])
by mx04.nexgo.de (Postfix) with ESMTP id 3A39F38119
for <[email-masked]>; Sun, 28 Oct 2001 15:43:30 +0100 (CET)
Received: from gmx.de (localhost [127.0.0.1])
by kleinertiga.local (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id f9SFhNN01875
for <[email-masked]>; Sun, 28 Oct 2001 16:43:23 +0100
X-Authentication-Warning: kleinertiga.local: Host localhost [127.0.0.1] claimed to be gmx.de
Message-ID: <[email-masked]>
Date: Sun, 28 Oct 2001 16:43:23 +0100
From: Klaus Rudolph <[email-masked]>
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] strtoul is not working?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

i tryed:

uint16_t x;
char string[20];

strcpy_P(string, PSTR("12ac"));
x=(uint16_t)strtoul(string, 0, 16);

after all different numbers tested i got allways 0xffff for x.

Any idea?

Thank
Klaus

From [email-masked] Tue Oct 30 00:19:17 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15yARm-0001XT-00
for <[email-masked]>; Tue, 30 Oct 2001 00:19:15 +1300
Received: (from j@localhost)
by ida.interface-business.de id f9TBMxH42188;
Mon, 29 Oct 2001 12:22:59 +0100 (MET)
Date: Mon, 29 Oct 2001 12:22:59 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
In-Reply-To: <[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] Potential linker problems with interrupt routine
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

[email-masked] (Nicolas Nickisch) wrote:

> As far as I know the problem comes from a linker problem: the
> startup code seems not to be linked to the compiled program.

You could verify this with "avr-nm -n PCF8574.elf". Look at all the
symbols that have a »T« or »t« in it. For a simple test program using
both external interrupts it looks like this:

% avr-nm -n i2cana.out | grep ' [tT] '
00000000 t .__start_of_init__
0000001c T greeting
00000027 T s1
00000033 T s2
00000040 T s3
0000004d T s4
0000005e t .__c_startup__
0000005e T _real_init_
00000076 t .copy_data_loop
0000007c t .copy_data_start
00000086 t .zero_bss_loop
00000088 t .zero_bss_start
0000008e t _unexpected_1_
00000092 T _interrupt0_
000000b4 T _interrupt1_
000000d6 T ioinit
000000ee T putchar
000000fa T printstr_p
00000118 t L_69
00000134 t L_87
00000146 T main
00000276 t __stop_progIi__
00000278 T _etext

Note the symbols located at addresses 0 and 0x5e. These are the
run-time initialization functions. The interrupt routines are located
way behind that.

> Somewhere I found I hint that the compiler switch "-c" is
> responsible for the missing link (?)

You misread that. -c causes the compiler to compile a single source
file (either assembler or C code) into one (intermediate) object file.
All those object files then need to be linked (again, using avr-gcc)
together, plus the system library (which will cause the initialization
code and the relevant modules from the C library to be linked in).

As far as i can tell, your compile steps look OK (albeit you're
generating many many listing files -- do you really look at them at
all?), so the problem must be somewhere else.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Tue Oct 30 06:30:41 2001
Received: from [206.97.148.120] (helo=vega.ipal.net ident=postfix)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15yGFE-0001r9-00
for <[email-masked]>; Tue, 30 Oct 2001 06:30:40 +1300
Received: by vega.ipal.net (Postfix, from userid 700)
id CFD01243; Mon, 29 Oct 2001 11:34:25 -0600 (CST)
Received: from localhost (localhost [127.0.0.1])
by vega.ipal.net (Postfix) with ESMTP id CF239242
for <[email-masked]>; Mon, 29 Oct 2001 11:34:25 -0600 (CST)
Date: Mon, 29 Oct 2001 11:34:25 -0600 (CST)
From: Chris Baugher <[email-masked]>
X-Sender: [email-masked]
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Re: ATTiny15
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=X-UNKNOWN
Content-Transfer-Encoding: QUOTED-PRINTABLE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Sat, 27 Oct 2001, Thorsten Ostermann wrote:

> Hi!
>=20
> > I notice the ATTiny15 is not supported by avr-gcc. Is support
> > planned for this chip in the near future?
>=20
> I don't know the specs of the Tiny15. Is it similar to the Tiny12? That
> one has no real stack, so you won't find any compiler for it.

As far as I know none of the ATTiny devices have any ram besides the
standard 32 registers. But the Imagecraft compiler supports the Tiny
chips, so shouldn't gcc be able to also?

C|

>=20
> Best regards
> Thorsten
> --
> PGP welcome!
> Thorsten online: http://www.ostermann-net.de/electronic/
> Rund um Schrittmotor, Fr=E4s-Bohr-Plotter & Mikrocontroller
>=20
>=20
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>=20

From [email-masked] Tue Oct 30 07:31:46 2001
Received: from cluster2.tfb.com ([204.212.132.102] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15yHCL-0001tm-00
for <[email-masked]>; Tue, 30 Oct 2001 07:31:45 +1300
Received: from jaz.tfb.com (204-216-234-239.dsl.cust.tfb.com [204.216.234.239])
by cluster2.tfb.com (8.11.0/8.11.0) with ESMTP id f9TIZa920312
for <[email-masked]>; Mon, 29 Oct 2001 10:35:37 -0800
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Mon, 29 Oct 2001 10:37:30 -0800
To: [email-masked]
From: ChristoGeo <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: [avr-gcc-list] Who has MEGA64 or MEGA128s?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Anyone have a distributor who has in stock MEGA64's or MEGA128's?

Are they shipping at 16mhz ratings?

I am using a mega now at 10mhz but prefer the on-chip multiplier and I need
the IO from the mega devices.

Christo

From [email-masked] Tue Oct 30 23:43:37 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15yWMn-0002UI-00
for <[email-masked]>; Tue, 30 Oct 2001 23:43:34 +1300
Received: (qmail 14579 invoked from network); 30 Oct 2001 09:51:06 -0000
Received: from center.fri.uni-lj.si (193.2.72.5)
by mail.fri.uni-lj.si with SMTP; 30 Oct 2001 09:51:06 -0000
Received: from fri.uni-lj.si ([193.2.76.118]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with ESMTP id AAA24118
for <[email-masked]>; Tue, 30 Oct 2001 11:34:01 +0100
Message-ID: <[email-masked]>
Date: Tue, 30 Oct 2001 11:40:50 +0100
From: [email-masked] (Robert Rozman)
X-Mailer: Mozilla 4.51 [sl] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
CC: [email-masked]
References: <[email-masked]>
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] How to use avr-monitor 0.6 under win ?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I'm interested in possibility to do source in circuit debugging with AVR-STK200
- Monitor under cygwin or windows generally.

I've already installed gcc from avr-freaks. If I'm right, now I need to compile
gdb5.0 and then avr-stk200monitor. What patch , what sources to download, what
modifications to makefile of avr-stkmonitor.

Can anyone give me some advice or yet better to put some basic instructions on
some web page or yet better to provide binaries for cygwin to be used.

Is it possible to compile AVR-monitor under cygwin ? - How ?

I bet all of us begging run-time bugs to reveal themselves will bi excited
about possibility of doing in cuircuit debugging :-)

Thanks in advance,

Regards,

Robert Rozman.

From [email-masked] Wed Oct 31 12:04:25 2001
Received: from verden.pvv.ntnu.no ([129.241.210.224])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15yhvk-00032P-00
for <[email-masked]>; Wed, 31 Oct 2001 12:04:24 +1300
Received: (qmail 53406 invoked by uid 21029); 30 Oct 2001 23:08:14 -0000
To: [email-masked] (Robert Rozman)
Cc: [email-masked]
Subject: Re: [avr-gcc-list] How to use avr-monitor 0.6 under win ?
References: <[email-masked]> <[email-masked]>
From: Tor Ringstad <[email-masked]>
Date: 31 Oct 2001 00:08:14 +0100
In-Reply-To: [email-masked]'s message of "Tue, 30 Oct 2001 11:40:50 +0100"
Message-ID: <[email-masked]>
Lines: 23
X-Mailer: Gnus v5.7/Emacs 20.7
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

[email-masked] (Robert Rozman) writes:

> I've already installed gcc from avr-freaks. If I'm right, now I need
> to compile gdb5.0 and then avr-stk200monitor. What patch , what
> sources to download, what modifications to makefile of
> avr-stkmonitor.

Actually, I've never tested avrmon-stk200-0.6.0 with gdb-5.0, I've
only used it with the older 4.18 + patch.

Also, Karsten Schmidt pointed out in a posting on this list a month
ago, that he ran into a problem when trying to use the monitor with
gdb-5.0.

> Is it possible to compile AVR-monitor under cygwin ? - How ?

The target part of the monitor is not a problem.

The host part, however, is probably rather Linux specific because of
the parallel port manipulation.

- Tor Ringstad -

From [email-masked] Wed Oct 31 11:06:03 2001
Received: from [203.24.179.147] (helo=smartcontainer.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15yh1H-0002yh-00
for <[email-masked]>; Wed, 31 Oct 2001 11:06:03 +1300
Received: (qmail 16092 invoked by uid 8); 30 Oct 2001 22:10:02 -0000
Received: from peter.smartcontainer.net (20.20.20.46, claiming to be "smartcontainer.net")
by smarty with SMTP id smtpd63Skoh; Tue, 30 Oct 2001 17:10:01 EST
Message-ID: <[email-masked]>
Date: Wed, 31 Oct 2001 09:10:04 +1100
From: Peter Jansen <[email-masked]>
Organization: Smart Container
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.10-xfs i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
CC: Peter Jansen <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] building gcc/g++ for AVR
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I'm trying to build g++ for the AVR and the following works but don't
quite what is in the libstdc++ that was too big to combile for the AVR.

So I do the following,

> in some source directory:
>
> (for bin utils)
>
> tar xvzf binutils-2.11.2.tar.gz
> mkdir binobj
> cd binobj
> ../binutils-2.11.2/configure --target=avr
> make
> make install (by default installs to /usr/local)
>
> (now gcc)
>
> tar xvzf gcc-3.0.2.tar.gz
> mkdir gccobj
> cd gccobj
> ../gcc-3.0.2/configure --target=avr --enable-languages=c
> make
> make install
>
> (now newlib)
>
> tar xvzf newlib-1.9.0.tar.gz
> mkdir newlibobj
> cd newlibobj
> ../newlib-1.9.0/configure --target=avr
> make
> make install
>
> (now g++)
>
> mkdir g++obj
> cd g++obj
> ../gcc-3.0.2/configure --target=avr --enable-languages=c,c++
>
> (Doing a make here fails because when the assembler makes misc-inst)
> (is too big and some rcalls are outside the 64k jump range.)
> (in the file libstdc++/avr/src/makefile I remove the references to
> (building misc-inst, their are two of these a .cc file and a .lo file,
> (and it builds ok.)
>
> make
> make install

If you use the --prefix option for the configure lines, then make sure
that you use it in every place.

The question is what does the misc-inst.cc library for and is their some
option when building g++ not to build the libstdc++ or is this an
intergral part of the c++ compiler.

Obviously when embedding c++ on the AVR we have to be carful of which
libraries to use so as not to use too much space.

Any one got any ideas on how to make misc-inst smaller or what building
g++ has to do with building libstdc++? Is their some build options so as
not to build libstdc++?

Thanks,

--
Peter Jansen
Smart Container
Level 2, NIC Building
Eveleigh
NSW 1430
AUSTRALIA

From [email-masked] Thu Nov 01 04:41:43 2001
Received: from [195.8.250.45] (helo=e_mail_server)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15yxUq-0003en-00
for <[email-masked]>; Thu, 01 Nov 2001 04:41:41 +1300
Received: from pc47 (192.168.5.147)
by e_mail_server with MERCUR-SMTP/POP3/IMAP4-Server (v3.30.09 CC-0098305)
for <[email-masked]>; Wed, 31 Oct 2001 16:45:35 +0100
From: "Andreas Schlass" <[email-masked]>
To: <[email-masked]>
Date: Wed, 31 Oct 2001 16:45:34 +0100
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Importance: Normal
Subject: [avr-gcc-list] Powerdown AT90S2313
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

can anybody help me to solve the following problem. For a battery powered
project I want to power down the AT90S2313 after some minutes to save
energy. In asm the modus is called "sleep". Does an equivalent c-command
exist which is able to bring the processor in the sleep modus? Maybe someone
has a part of code for this problem? My second question is, if by using the
gcc-compiler, is there a possibility to use asm-commands directly?

Any help would be very welcome.

Thanks

Andreas Schlass
[email-masked]

From [email-masked] Thu Nov 01 06:52:01 2001
Received: from dt083nf7.san.rr.com ([204.210.26.247] helo=mail.lightner.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15yzWy-0003oE-00
for <[email-masked]>; Thu, 01 Nov 2001 06:52:00 +1300
Received: from lightner.net (snert [168.143.116.90])
by mail.lightner.net (8.8.7/8.8.6) with ESMTP id JAA29198;
Wed, 31 Oct 2001 09:55:57 -0800
Message-ID: <[email-masked]>
Date: Wed, 31 Oct 2001 09:55:49 -0800
From: "Bruce D. Lightner" <[email-masked]>
X-Mailer: Mozilla 4.74 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Andreas Schlass <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] Powerdown AT90S2313
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Andreas Schlass wrote:
>
> Hello,
>
> can anybody help me to solve the following problem. For a battery powered
> project I want to power down the AT90S2313 after some minutes to save
> energy. In asm the modus is called "sleep". Does an equivalent c-command
> exist which is able to bring the processor in the sleep modus? Maybe someone
> has a part of code for this problem?

Add this #define to your C code...

#define sleep() ({ asm volatile ("sleep" "\n\t");})

Then to enter one of the sleep modes, use the following C code...

sleep();

Note that to actually enter one of the sleep modes, first the SE bit in
MCUCR must be set (one) before the SLEEP instruction is executed. You can
setup the MCUCR using C code "in" and "out" instructions.

> My second question is, if by using the
> gcc-compiler, is there a possibility to use asm-commands directly?

Using in-line assembly, as in the above example, is one obvious way. This
is a complex subject.

The other is to simply write C-callable AVR assembly language files (namely
.s or .S files) and then compile them with "avr-gcc", which will "magically"
cause them to be assembled with "avr-as".

> Any help would be very welcome.
>
> Thanks
>
> Andreas Schlass
> [email-masked]
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

Best regards,

Bruce

--
Bruce D. Lightner
La Jolla, California
Email: [email-masked]
URL: http://www.lightner.net/lightner/bruce/

From [email-masked] Thu Nov 01 08:49:56 2001
Received: from mail.gmx.net ([213.165.64.20])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15z1N6-0003uU-00
for <[email-masked]>; Thu, 01 Nov 2001 08:49:56 +1300
Received: (qmail 10357 invoked by uid 0); 31 Oct 2001 19:53:27 -0000
Received: from pd9051f45.dip.t-dialin.net (HELO gmx.net) (217.5.31.69)
by mail.gmx.net (mp006-rz3) with SMTP; 31 Oct 2001 19:53:27 -0000
Message-ID: <[email-masked]>
Date: Wed, 31 Oct 2001 20:46:40 -0500
From: thomas <[email-masked]>
X-Mailer: Mozilla 4.77 [de] (X11; U; Linux 2.4.3-20mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] uisp stk500
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Has anyone experience with the uisp/stk500 combination ?

From [email-masked] Thu Nov 01 11:52:55 2001
Received: from [203.24.179.147] (helo=smartcontainer.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15z4EB-00042a-00
for <[email-masked]>; Thu, 01 Nov 2001 11:52:55 +1300
Received: (qmail 26829 invoked by uid 8); 31 Oct 2001 22:56:58 -0000
Received: from trev.smartcontainer.net (20.20.20.53, claiming to be "smartcontainer.net")
by smarty with SMTP id smtpdiynKzG; Wed, 31 Oct 2001 17:56:56 EST
Message-ID: <[email-masked]>
Date: Thu, 01 Nov 2001 09:52:07 +1100
From: Scott Finneran <[email-masked]>
Organization: Smart Container
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Subject: Re: [avr-gcc-list] uisp stk500
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Not really, however if I may offer a friendly pointer to some excellent
advice, please check out the following. I found it to be very
informative and I believe that it will help you in finding answers to
your questions.

http://www.tuxedo.org/~esr/faqs/smart-questions.html

Kind Regards,

Scott

thomas wrote:
>
> Has anyone experience with the uisp/stk500 combination ?
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Fri Nov 02 05:55:38 2001
Received: from mail.gmx.de ([213.165.64.20] helo=mail.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15zL7x-0004gx-00
for <[email-masked]>; Fri, 02 Nov 2001 05:55:37 +1300
Received: (qmail 17262 invoked by uid 0); 1 Nov 2001 16:59:11 -0000
Received: from pd9051a07.dip.t-dialin.net (HELO eiswind.local) (217.5.26.7)
by mail.gmx.net (mp004-rz3) with SMTP; 1 Nov 2001 16:59:11 -0000
Content-Type: text/plain;
charset="iso-8859-1"
From: Thomas <[email-masked]>
To: [email-masked]
Date: Thu, 1 Nov 2001 17:52:19 -0500
X-Mailer: KMail [version 1.2]
MIME-Version: 1.0
Message-Id: <[email-masked]>
Content-Transfer-Encoding: 8bit
Subject: [avr-gcc-list] uisp/stk500 again
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Since friendly Scott Finneran sent me some advice that didn't help at all,
here's another try:

What I'm actually trying, is to get the Stk500 control for AvrStudio working
with wine. While failing at that that, we (notably Uwe Bonnes) found that the
Stk500 control gets stuck switching the board to programming mode, when at
that time it expects 2 bytes to be sent back from the board, when only one is
received. Even changing the timeout behaviour of wine didn't help. What leads
to my question is, that I then tried uisp to control the board, which shows
exactly the same behaviour at the same point in the protocol. So possibly it
is not a wine problem at all.Magically the Stk500 control of AvrStudio works
fine under windows/vmware.

So long
Thomas

From [email-masked] Fri Nov 02 11:17:00 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15zQ8y-0004xr-00
for <[email-masked]>; Fri, 02 Nov 2001 11:17:00 +1300
Received: from cel1.jpk.co.nz (adsl-179.world-net.co.nz [210.55.228.179])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id fA1ML9f13207
for <[email-masked]>; Fri, 2 Nov 2001 11:21:10 +1300
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Fri, 02 Nov 2001 11:24:07 +1300
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] uisp/stk500 again
In-Reply-To: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Thomas,

I did the initial STK500 protocol extraction (DMCA anyone?
http://www.anti-dmca.org/ ) and Daniel Berntsson did the uisp support based
on it. Atmel haven't released the protocol but have been claiming they
will do so for a very long time ago, I got tired of waiting. I can see the
same thing happening with the new JTAG ice.

Haven't actually used my STK500 for anything :) as it was purchased for the
above reason, hence I haven't tried it with uisp. I'll need some more
information about exactly what it is you're doing that shows up the
problem, I don't run wine or AvrStudio so uisp & stk500 info would be
better. We'll get it sorted!

Jason Kyle

PS Your initial post was a little vague - I didn't know what to reply
with. Having said that the link about "How To Ask Questions The Smart Way"
is good information and recommended reading for everyone, it is important
for all of us to get along.

At 11:52 2/11/2001, Thomas wrote:
>Since friendly Scott Finneran sent me some advice that didn't help at all,
>here's another try:
>
>What I'm actually trying, is to get the Stk500 control for AvrStudio working
>with wine. While failing at that that, we (notably Uwe Bonnes) found that the
>Stk500 control gets stuck switching the board to programming mode, when at
>that time it expects 2 bytes to be sent back from the board, when only one is
>received. Even changing the timeout behaviour of wine didn't help. What leads
>to my question is, that I then tried uisp to control the board, which shows
>exactly the same behaviour at the same point in the protocol. So possibly it
>is not a wine problem at all.Magically the Stk500 control of AvrStudio works
>fine under windows/vmware.
>
>So long
>Thomas

From [email-masked] Fri Nov 02 11:34:33 2001
Received: from [203.24.179.147] (helo=smartcontainer.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 15zQPw-0004yr-00
for <[email-masked]>; Fri, 02 Nov 2001 11:34:33 +1300
Received: (qmail 5006 invoked by uid 8); 1 Nov 2001 22:38:40 -0000
Received: from peter.smartcontainer.net (20.20.20.46, claiming to be "smartcontainer.net")
by smarty with SMTP id smtpdnpkabK; Thu, 01 Nov 2001 17:38:38 EST
Message-ID: <[email-masked]>
Date: Fri, 02 Nov 2001 09:38:41 +1100
From: Peter Jansen <[email-masked]>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1
X-Accept-Language: en-us
MIME-Version: 1.0
To: [email-masked]
Subject: Re: [avr-gcc-list] uisp/stk500 again
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi All,

> I did the initial STK500 protocol extraction (DMCA anyone?
> http://www.anti-dmca.org/ ) and Daniel Berntsson did the uisp support
> based on it. Atmel haven't released the protocol but have been claiming
> they will do so for a very long time ago, I got tired of waiting. I can
> see the same thing happening with the new JTAG ice.

Thanks for the inital work, I have used uisp with the stk500 on both the
AT90S8515 and ATmega128 processors and their are a few times it does not
work, but once working it does fine. I think I just unpacked it out of
the tar and it worked.

Scott Finneran and I have been working on getting the AVRJTAGICE working
with gdb and are most of the way their. If any one else is working on
this we would like to know.

I have been using the avr-gcc tool chain and uisp on linux to program
the device through a stk500 which works fine.

Regards,

--
Peter Jansen

From [email-masked] Sat Nov 03 05:31:43 2001
Received: from smtp02.web.de ([217.72.192.151] helo=smtp.web.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15zhEN-0005f8-00
for <[email-masked]>; Sat, 03 Nov 2001 05:31:43 +1300
Received: from [130.149.53.80] (helo=raum513)
by smtp.web.de with smtp (Exim 3.32 #26)
id 15zhHw-00021a-00
for [email-masked]; Fri, 02 Nov 2001 17:35:24 +0100
From: Carsten Scharfenberg <[email-masked]>
To: [email-masked]
Date: Fri, 2 Nov 2001 17:28:18 +0100
X-Mailer: KMail [version 1.1.99]
Content-Type: text/plain;
charset="iso-8859-1"
MIME-Version: 1.0
Message-Id: <01110217281801.01391@raum513>
Content-Transfer-Encoding: 8bit
Subject: [avr-gcc-list] UART again
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,
last month Ron submitted code for a buffered UART transmitter based upon TX
Complete Interrupt which arose the question of using the Data Register Empty
Interrupt. - So I did, but whenever I enable UDRIE in UCR no UART interrupts
seem to be triggered.
Here's a sample code of mine which uses three interrupts - everyone switching
another led on and off when being called: SIG_UART_TRANS for showing if any
TXC interrupts are triggered, SIG_UART_DATA for showing if any UDRE
interrupts are triggered and SIG_OVERFLOW0 for showing if the whole
controller is working as it should.

#include <io.h>
#include <interrupt.h>
#include <sig-avr.h>

void init();

int main()
{
init();
outp( 0, UDR );

for(;;);

return 0;
}

INTERRUPT( SIG_OVERFLOW0 )
{
static led = 0;

if( led & 1 )
sbi( PORTB, 7 );
else
cbi( PORTB, 7 );

led++;
}

INTERRUPT( SIG_UART_TRANS )
{
static led = 0;

if( led & 1 )
sbi( PORTB, 0 );
else
cbi( PORTB, 0 );

outp( 0, UDR );

led++;
}

INTERRUPT( SIG_UART_DATA )
{
static led = 0;

if( led & 1 )
sbi( PORTB, 1 );
else
cbi( PORTB, 1 );

outp( 0, UDR );

led++;
}

void init()
{
/******* UART Setup Code ****/
outp( 0x26, UBRR );
outp( 0x68, UCR );

/******* Port B Setup Code ****/
outp( 0xff, DDRB );
outp( 0xff, PORTB );

/******* Timer0 Setup Code ****/
outp( 0x07, TCCR0 );
outp( 0x00, TCNT0 );
outp( 0x01, TIMSK );

/******* Enable All Interrupts ****/
sei();
}

This is the result:
if enable only the TXC interrupt, everything works fine. If I enable the UDRE
interrupt whithout having a corresponding interrupt service routine only the
timer led is blinking - no matter if TXC is also enabled. And if I enable
UDRE while having a corresponding interrupt service routine (as shown above)
nothing happens - all leds are dead.
why this?
I haven't had any problems like these when I wrote such code in Assembler
with AVR-Studio.

Carsten

From [email-masked] Sat Nov 03 08:36:03 2001
Received: from mta5.snfc21.pbi.net ([206.13.28.241] helo=snfc21.pbi.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 15zk6l-0005q7-00
for <[email-masked]>; Sat, 03 Nov 2001 08:36:03 +1300
Received: from bourbonsolo1 ([209.78.192.136])
by mta5.snfc21.pbi.net (iPlanet Messaging Server 5.1 (built May 7 2001))
with SMTP id <[email-masked]> for
[email-masked]; Fri, 02 Nov 2001 11:39:57 -0800 (PST)
Date: Fri, 02 Nov 2001 11:39:23 -0800
From: Dean Ferreyra <[email-masked]>
Subject: RE: [avr-gcc-list] UART again
In-reply-to: <01110217281801.01391@raum513>
To: [email-masked]
Reply-to: [email-masked]
Message-id: <[email-masked]>
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT
Importance: Normal
X-Priority: 3 (Normal)
X-MSMail-priority: Normal
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Carsten,

> INTERRUPT( SIG_UART_DATA )
> {
> static led = 0;
>
> if( led & 1 )
> sbi( PORTB, 1 );
> else
> cbi( PORTB, 1 );
>
> outp( 0, UDR );
>
> led++;
> }

I suggest that you use SIGNAL( SIG_UART_DATA ) instead. When you use
INTERRUPT( ... ), interrupts are automatically enabled in the prologue code
before your C code is executed and (I think) this leads the MCU to
re-interrupt endlessly.

Dean

From [email-masked] Sun Nov 04 17:47:18 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 160FBl-00004L-00
for <[email-masked]>; Sun, 04 Nov 2001 17:47:17 +1300
Received: from jpk1.jpk.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id fA40GId15340
for <[email-masked]>; Sun, 4 Nov 2001 13:16:18 +1300
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Sun, 04 Nov 2001 13:15:48 +1300
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] uisp/stk500 again
In-Reply-To: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

At 09:38 2/11/2001 +1100, you wrote:

>Scott Finneran and I have been working on getting the AVRJTAGICE working
>with gdb and are most of the way their. If any one else is working on this
>we would like to know.

Had planned on getting the serial comms documented but have been hampered
by crap local distributors who won't get me a JTAG micro, but they will
sell me the JTAG ICE - dumb huh? Looks like you guys have done it already,
good work.

There is work going on to make an AVR simulator target for gdb as well,
would be a good time to try and combine this so there are no major problems
at a later date. Can't wait to have proper debugging facilities!

Are you using the existing gdb5.0 AVR patch-0.0.2 ?

Cheers,

Jason Kyle

From [email-masked] Mon Nov 05 13:44:06 2001
Received: from [203.24.179.147] (helo=smartcontainer.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 160Xrx-0000qp-00
for <[email-masked]>; Mon, 05 Nov 2001 13:44:05 +1300
Received: (qmail 29142 invoked by uid 8); 5 Nov 2001 00:45:59 -0000
Received: from link.smartcontainer.net (20.20.20.53, claiming to be "smartcontainer.net")
by smarty with SMTP id smtpdU0aFW3; Sun, 04 Nov 2001 19:45:51 EST
Message-ID: <[email-masked]>
Date: Mon, 05 Nov 2001 11:41:05 +1100
From: Scott Finneran <[email-masked]>
Organization: Smart Container
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686)
X-Accept-Language: en
MIME-Version: 1.0
CC: [email-masked]
References: <[email-masked]> <[email-masked]>
Content-Type: multipart/mixed;
boundary="------------5166954BDAC70F9BC3AB6E8D"
Subject: [avr-gcc-list] avr-jtag for gdb
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.
--------------5166954BDAC70F9BC3AB6E8D
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

As most of you are probably aware, Atmel have released a JTAG box for
the AVRs. Unfortunately so far the only way to drive it is with
AVRStudio. This is about to change (insert fan-fare). Basically, we are
writing some software to interface the AVR JTAG ICE to gdb.

Following a lot of hair pulling:

- We have a document for the serial protocol which sits between
AVRStudio and the AVRJTAGICE. It is fairly complete but does have gaps.
We would love it if Atmel would release the protocol details, but that
doesn't seem to be all that likely.

- We have a piece of software avrjtagd (AVR JTAG daemon). Basically it
translates GDBs standard serial debug protocol (refer GDB doco for
details) into AVRJTAGICE protocol.

- Comms is via a socket ie TCP connect between GDB and a machine running
avrjtagd. The machine running avrjtagd then has the AVRJTAGICE attached
to it's serial port. This has the nice feature of allowing simple
sharing of the ICE between groups of developers (ie if you can't get the
boss to spring for more than one JTAG box).

- The software (when released) will be GPL'ed. It will be Free as in
speech (which we don't actually have in Australia) and free as in beer
(once we have this is Australia, we'll start looking into free speech).

- At present it has only been tested under linux but I can't think of a
reason that it shouldn't run on other platforms.

- It is not quite at alpha yet (I can download code into flash and get
it to run but am still working on breakpoints).

I would GREATLY appreciate any help on the project. For starters, the
protocol document is attached. Any "patches" to the doc would be warmly
welcomed. These include formatting of sections that may be a little hard
to follow.

I plan to release the code RSN. Basically as soon as I get a sourceforge
page set up.

If you don't fit into the "I'll help with the protocol" or the "I'll
help with the coding" camps. We are also going to need testers. So if
you have your AVR JTAG ICE, standby.

I'd also appreciate suggestions (or questions if the above doesn't quite
make sense) or even expressions of interest in using the thing.

Cheers,

Scott Finneran

Jason Kyle wrote:
>
> At 09:38 2/11/2001 +1100, you wrote:
>
> >Scott Finneran and I have been working on getting the AVRJTAGICE working
> >with gdb and are most of the way their. If any one else is working on this
> >we would like to know.
>
> Had planned on getting the serial comms documented but have been hampered
> by crap local distributors who won't get me a JTAG micro, but they will
> sell me the JTAG ICE - dumb huh? Looks like you guys have done it already,
> good work.
>
> There is work going on to make an AVR simulator target for gdb as well,
> would be a good time to try and combine this so there are no major problems
> at a later date. Can't wait to have proper debugging facilities!
>
> Are you using the existing gdb5.0 AVR patch-0.0.2 ?
>
> Cheers,
>
> Jason Kyle
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
--------------5166954BDAC70F9BC3AB6E8D
Content-Type: text/plain; charset=us-ascii;
name="avrIceProtocol.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="avrIceProtocol.txt"

/*
* avrjtag - The "avrjtag" program.
* Copyright (C) 2001 Scott Finneran & Peter Jansen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
*
* This file contains the AVR JTAG ICE protocol documentation.
*/

AVR JTAG-ICE serial protocol commands

Background: This document outlines the results of a reverse engineering
effort of the protocol which exists between AVRStudio and the AVR
JTAG-Ice.

Something to note is that the protocol supports dynamic bitrate
changes. AVRStudio does indeed change the bitrate "mid-stream".
Specifically, it seems to speed it up to 115200bps just prior to
downloading (and possibly uploading) blocks of date to the
JTAG-Ice. After the download, the bitrate is restored to 19200bps.

This can make Analysing the protocol somewhat painful using a serial line
sniffer.

Something that the document does lack is detail on the "state" or
procedural aspect of the protocol. ie "This command must be proceeded
by blah blah...."

Most commands are of the format <letter> [operands....]. An assumption
was made that the letters actually mean something (ie W for write, R for
read).

***************************************************************

Hints for those wishing to help with understanding the protocol:

The thing that made understanding the protocol difficult, is that it
switches bitrates when writing to memory. As such, a traditional
protocol analyser or line monitor (which connects to the serial line
itself) will lose sync when this happens!.

One work-around for this is to use a program like HHD Serial Monitor
(http://www.hddsoftware.com). Rather than involve serial hardware, this
program captures the MS-Windows serial driver requests. As such, you can
see the data sent and received, without worrying about bitrate changes
(although you can see driver config requests also, so you know when it
happens).

***************************************************************
Formatting:

All commands from the Host end in a Space, Space (shown below as '__')

All commands from the JTAG box start with a 'A' and end in a 'A', except
when writing to memory, a 'A''A' is sent only after the data is
written.

Things in [] are hex characters. eg [42] [FA]

Underscores '_' indicate a space. Actual spaces in the text below are
for the purposes of formatting only.

Serial port works at 19200, N 8 1
(until the bitrate change command is issued)

****************************************************************
This command is either sync (ie serial line sync) or status or
something. The first command also appears to have a few spaces sent down
first. Haven't quite worked it out yet.

S__ : Sync

A AVRNOCD A - the reply

****************************************************************
Query:
These commands start with a ASCII 'q' (ie [71])

qz__ : query HW version

A [c0] A - the reply

q [7B] __ : query SW version

A [66] A

q [84] __ : query supply voltage

A [xx] A - the reply voltage = xx/41

q [A7] __ : ????

A [3f] A

q [A8] __ : ????

A [20] A

q [A9] __ : ????

A [70] A

q [AA] __ : ????

A [29] A

****************************************************************

Appears to somehow configure the JTAG box. The data probably changes for
different processors.

[A0] [.(123 bytes).....] __ : ????

A A

****************************************************************

[A3] __ : Enable program mode.

A A

****************************************************************

[A4] __ : Disable program mode.

A A

****************************************************************

[A5] __ : Erase program memory. Program mode must be enabled.

A A

****************************************************************

R [cc] [x][x][y][y] __ : Read memory

where cc is command

[B2] - Fuse Bits
[B3] - Lock Bits
[B4] - Signature Bits
[A0] - Program memory if Prog Mode enabled (read words)
[B0] - Program memory if Prog Mode disabled (read words)
[20] - Data Memory
[22] - EEPROM

x x is the number of locations - 1 (little endian) *1 *2
y y is the start address (big endian)

A [....(data)....] [00] A *1

For data memory, the data returned is a series of bytes (endian-ness
does not apply).

For prog memory, the data returned is a 16-bit big endian.

*1 note: For program memory each location is 16 bits. As such, it will
return N words, rather than bytes. These words are little endian. For
data space, locations are 8 bits wide, so N bytes are returned.
*2 AVRStudio only requests 0xff bytes at a time. The reliability of the
system to respond to larger numbers is unknown.

****************************************************************

W [cc] [x][x][y][y] __ : Write memory

where cc is command

[A0] - Program memory if Prog Mode enabled (write words)
[B0] - Program memory if Prog Mode disabled (write words)
[B2] - Fuse Bits
[B3] - Lock Bits
[B4] - Signature Bits
[20] - Data memory (write bytes)
[22] - EEPROM
[60] - first program break point at location y y
this needs the data [01] for the following h command

x x is the numer of locations - 1 (little endian)
y y is the start address (big endian)

The reply to this command is a single A

Then the Host sends h [....(data)....] __ which is the data

The reply is A A (success) or E E (failure).

ONLY IN THE CASE OF PROG SPACE WRITE:
The data is written into the flash when the flash programming buffer
(2048 bits/256 bytes/128 words) is filled. As such, in the event of a
prog space page being smaller than an entire page (ie < 0x7F words),
AVRStudio sends down a single write to the last location in the page.

notes:
- For program memory each location is 16 bits. As such, N words (rather
than bytes) need to be sent. These words are little endian.
- The object files output from both AVRStudio & GCC are already
word-wise little endian.

****************************************************************

3 [x][x][x] __ : set PC

A A : where xxx is the new value for the PC.

****************************************************************

2 __ : get next PC

A [x][x][x] A : where xxx is the next location to execute (?)
NOTE: APPEARS TO BE INVALID WHEN THE LAST INSTRUCTION
WAS A BRANCH.

****************************************************************

1 __ : single step command

A A

****************************************************************

G __ : go command

The reply to this A B [00] [BP] for a break point (once the break occurs).

[BP] - which breakpoint was "hit" (refer breakpoint below).
[04] - Breakpoint X
[08] - Breakpoint Y
[10] - Breakpoint Z

****************************************************************

F __ : finish (halt)

A [00][PCL][PCH] A

[PCL] - PC Low byte
[PCH] - PC High byte

****************************************************************

x __ : ???

A A

****************************************************************

"Box Config" commands

These appear to be set actions performed on various configuration
registers withing the box itself. The generic command appears to be:

B [rn] [val] __ : Box Config

where rn is the register number, val is the value written.

[FD] - ???
[FF] - ???
[FA] - ???
[00] - ???

[62] set bit rate.
val = (FA: 19200, FF: 115200)

[86] set JTAG port bitrate (AVRStudio calls this the debug freq.)
val = (FA: 100kHz, F3: 50kHz, FD: 200kHz)

[81] [00] Written after modifying the PC.

[A1] set break on branch/skip (will run until the next
branch/skip instruction)
[A2] val = Breakpoint X Address -High
[A3] val = Breakpoint X Address -Low
[A4] val = Breakpoint Y Address -High
[A5] val = Breakpoint Y Address -Low
[A6] val = BP mode (see Breakpoints below)

[88] val = ?? (related to config bits. refer below).
[89] val = ?? (related to config bits. refer below).
[8A] val = ?? (related to config bits. refer below).

Programming Mode.

The following sequence (according to AVRStudio), prepares the chip for
JTAG programming. It appears to only happen once per session (when
programming mode is enabled).

Send: [42] [88] [00] [20] [20]
Reply: [41] [41]

Send: [42] [89] [01] [20] [20]
Reply: [41] [41]

Send: [42] [8A] [08] [20] [20]
Reply: [41] [41]

Chip Config (Fuse, Signature and Lock) Bits:

These are access using the normal read & write commands using
"special" address space identifiers.Fuse Bits:

Fuse bits are written/read by accessing address zero of the [B2]
address space.

Signature Bits:

Signature bits are written/read by accessing address zero of the [B4]
address space.

Lock Bits:

Lock bits are written/read by accessing address zero of the [B3]
address space.

Breakpoints:

note: AVRStudio's first breakpoint is set by writing a 1 to the
desired break address using address space 60 (refer Write
command). I believe a corresponding write of zero will clear this
breakpoint.This is a code space breakpoint only.

Where BP mode is a bitmask formatted thusly (don't you think the word
thusly doesn't get used enough in doco?):

-------------------------------------------------
| | | | | | |
| 0 | Mask| BP Active | BP Mode | BP Mode |
| | Mode| | | (BP X) | (BP Y) |
-------------------------------------------------

Mask Mode:
[0] = X & Y are seperate Breakpoints (non-masked mode).
[1] = X is masked with Y to create a single range of
breakpoint addresses.

BP Active:
[00] = Invalid
[01] = Masked Mode (must be set to this value if Mask Mode = 1).
[10] = 1 Breakpoint (Breakpoint X active only)
[01] = 2 Breakpoints (Breakpoints X & Y active)

BP Mode:
[00] = Data Space Read
[01] = Data Space Write
[10] = Data Space Read/Write (ie Data Access)
[11] = Program Space Read

Examples:
[2C] - Single program BP at [x][x]
[3F] - two break points at [x][x] and [y][y]
[28] - single data R/W BP at [x][x]
[20] - single data R BP at [x][x]
[24] - single data W BP at [x][x]
[34] - two data BP's one R at [x][x] and one W at [y][y]
[35] - two data BP's one R at [x][x] and one R at [y][y]
[53] - Masked program read BP at [x][x] mask [y][y]
[50] - Masked data read BP at [x][x] mask [y][y]
[51] - masked data write BP at [x][x] mask [y][y]
[52] - masked data RW BP at [x][x] mask [y][y]

The reply is A A

--------------5166954BDAC70F9BC3AB6E8D--

From [email-masked] Mon Nov 05 22:32:48 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 160g7a-0001Bb-00
for <[email-masked]>; Mon, 05 Nov 2001 22:32:47 +1300
Received: (from j@localhost)
by ida.interface-business.de id fA59YbY67923;
Mon, 5 Nov 2001 10:34:37 +0100 (MET)
Date: Mon, 5 Nov 2001 10:34:37 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <01110217281801.01391@raum513>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] UART again
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Carsten Scharfenberg <[email-masked]> wrote:

> last month Ron submitted code for a buffered UART transmitter based
> upon TX Complete Interrupt which arose the question of using the
> Data Register Empty Interrupt. - So I did, but whenever I enable
> UDRIE in UCR no UART interrupts seem to be triggered.

Ask Rich Neswold for a copy of his code. The code looks good,
although i haven't been successful in using it so far -- but that's
certainly my own stupidity, and also lack of time recently to actually
play around with it a bit more.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Mon Nov 05 23:18:42 2001
Received: from mx0.gmx.net ([213.165.64.100])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 160gq0-0001Du-00
for <[email-masked]>; Mon, 05 Nov 2001 23:18:41 +1300
Received: (qmail 6962 invoked by uid 0); 5 Nov 2001 10:20:04 -0000
Date: Mon, 5 Nov 2001 11:20:04 +0100 (MET)
From: Victor Sluiter <[email-masked]>
To: [email-masked]
MIME-Version: 1.0
References: <[email-masked]>
X-Priority: 3 (Normal)
X-Authenticated-Sender: [email-masked]
X-Authenticated-IP: [212.136.198.145]
Message-ID: <[email-masked]>
X-Mailer: WWW-Mail 1.5 (Global Message Exchange)
X-Flags: 0001
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Problem with malloc()
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I have been working with AVR-GCC to my full satisfaction for almost two
years now, but sibce last week I have a problem I can't find a solution for. When
I use the function 'malloc()', the compiler gives the following
error:
C:\VICTOR\AVRGCC\BIN\..\lib\gcc-lib\avr\2.95.2\..\..\..\..\avr\lib\libc-mega.a(m
alloc.o): In function `malloc':
C:\Victor\AVRGCC\avr\lib\src/malloc.c:16: undefined reference to
`_end_of_ram_'
C:\Victor\AVRGCC\avr\lib\src/malloc.c:16: undefined reference to
`_end_of_ram_'
C:\VICTOR\AVRGCC\BIN\MAKE.EXE: *** [base.elf] Error 1

Has anyone got a suggestion what might be wrong?
Thanks in advance, Victor Sluiter

--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

From [email-masked] Tue Nov 06 03:17:26 2001
Received: from mx0.gmx.de ([213.165.64.100] helo=mx0.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 160kZ2-0001NB-00
for <[email-masked]>; Tue, 06 Nov 2001 03:17:25 +1300
Received: (qmail 16423 invoked by uid 0); 5 Nov 2001 14:18:49 -0000
Date: Mon, 5 Nov 2001 15:18:48 +0100 (MET)
From: Victor Sluiter <[email-masked]>
To: [email-masked]
MIME-Version: 1.0
References: <[email-masked]>
X-Priority: 3 (Normal)
X-Authenticated-Sender: [email-masked]
X-Authenticated-IP: [212.136.198.145]
Message-ID: <[email-masked]>
X-Mailer: WWW-Mail 1.5 (Global Message Exchange)
X-Flags: 0001
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Re: Problem with malloc()
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Thanks for your help Carsten, but unfotunately nothing has changed after I
changed my makefile.... What surprises me, is that _end_of_ram_ is declared in
line 11 of malloc.c as 'extern size_t _end_of_ram_;', but the error points
to line 16, where it is used the first time: 'size_t * heap_top =
&_end_of_ram_;'. So -I guess- the compiler can't get the address of the 'extern size_t'.
But I guess I'm wrong, because in that case many others would have had the
same problem..... I'm puzzled.....
Greetings, Victor

> Hi Victor,
> you should add the following line to your makefile
> ASFLAGS = -L -favr_noendianbug -D__end_of_ram=0x0fff
> the -L option is as far as I know not necessary but the definition of the
> _end_of_ram should solve your problem. Never make this value bigger than
> your RAM-Size! Cause of optimization you will get very funny behaviour ;-)
> CU carsten

--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

From [email-masked] Tue Nov 06 08:02:41 2001
Received: from mta5.snfc21.pbi.net ([206.13.28.241] helo=snfc21.pbi.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 160p16-0001cW-00
for <[email-masked]>; Tue, 06 Nov 2001 08:02:41 +1300
Received: from bourbonsolo1 ([209.78.192.136])
by mta5.snfc21.pbi.net (iPlanet Messaging Server 5.1 (built May 7 2001))
with SMTP id <[email-masked]> for
[email-masked]; Mon, 05 Nov 2001 11:04:32 -0800 (PST)
Date: Mon, 05 Nov 2001 11:03:57 -0800
From: Dean Ferreyra <[email-masked]>
Subject: RE: [avr-gcc-list] Re: Problem with malloc()
In-reply-to: <[email-masked]>
To: [email-masked]
Reply-to: [email-masked]
Message-id: <[email-masked]>
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Importance: Normal
X-Priority: 3 (Normal)
X-MSMail-priority: Normal
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Victor,

> What surprises me, is that _end_of_ram_
> is declared in
> line 11 of malloc.c as 'extern size_t _end_of_ram_;', but the error points
> to line 16, where it is used the first time: 'size_t * heap_top =
> &_end_of_ram_;'.

I believe you are using an old version of the libc library. The
"_end_of_ram_" symbol is automatically generated and is now called
"__bss_end".

See http://www.amelek.gda.pl/avr/libc/ for Marek Michalkiewicz's latest libc
library.

Dean Ferreyra

From [email-masked] Tue Nov 06 23:19:17 2001
Received: from mx0.gmx.net ([213.165.64.100])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 1613K7-0002Al-00
for <[email-masked]>; Tue, 06 Nov 2001 23:19:15 +1300
Received: (qmail 9947 invoked by uid 0); 6 Nov 2001 10:20:41 -0000
Date: Tue, 6 Nov 2001 11:20:41 +0100 (MET)
From: Victor Sluiter <[email-masked]>
To: [email-masked]
MIME-Version: 1.0
References: <[email-masked]>
X-Priority: 3 (Normal)
X-Authenticated-Sender: [email-masked]
X-Authenticated-IP: [212.136.198.145]
Message-ID: <[email-masked]>
X-Mailer: WWW-Mail 1.5 (Global Message Exchange)
X-Flags: 0001
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] RE: Still problem with malloc()
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Thanks, Dean!
I downloaded the lataest version, and copied the 'malloc.c' file. The error
stayed the same.... The problem might be in libc-mega.a, because that is the
file that 'points' to the error... Maybe I should have mentioned that I use
the AVR-GCC for windows (allas, sad but true :-) ), I downloaded it from
http://8-bit.at/avr . I hope this is some useful information!
Greetings, Victor

> I believe you are using an old version of the libc library. The
> "_end_of_ram_" symbol is automatically generated and is now called
> "__bss_end".
>
> See http://www.amelek.gda.pl/avr/libc/ for Marek Michalkiewicz's latest
> libc
> library.
>
> Dean Ferreyra

--
-------------------------------------------------------
Een gewaarschuwd schizofreen telt voor vier.
- Fons Jansen
-------------------------------------------------------

GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

From [email-masked] Wed Nov 07 00:26:13 2001
Received: from mx0.gmx.de ([213.165.64.100] helo=mx0.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 1614Mt-0002Dv-00
for <[email-masked]>; Wed, 07 Nov 2001 00:26:11 +1300
Received: (qmail 14956 invoked by uid 0); 6 Nov 2001 11:27:39 -0000
Date: Tue, 6 Nov 2001 12:27:39 +0100 (MET)
From: Victor Sluiter <[email-masked]>
To: [email-masked]
MIME-Version: 1.0
References: <[email-masked]>
X-Priority: 3 (Normal)
X-Authenticated-Sender: [email-masked]
X-Authenticated-IP: [212.136.198.145]
Message-ID: <[email-masked]>
X-Mailer: WWW-Mail 1.5 (Global Message Exchange)
X-Flags: 0001
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Sorry...
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Okay... I Know... RTFM..... :-) I was a bit to fast simply copying those
files. I decently tried to install the libc. Changed the 'Makefile Win32' to
'makefile', and typed 'make'. It started out very nice, but gave me the next
error:
..
mkdir libc
mkdir libm
avr-gcc -x assembler-with-cpp -mmcu=at90s1200 -I./../include -I.
-Wa,-gstabs -c
C:/VICTOR/AVRGCC/lib/avr-libc-20011029/src/gcrt1.S -o crts1200.o
In file included from
C:\VICTOR\AVRGCC\lib\avr-libc-20011029\src\macros.inc:18,
from C:/VICTOR/AVRGCC/lib/avr-libc-20011029/src/gcrt1.S:27:
.\..\include\io-avr.h:71: warning: #warning "device type not defined"
C:/VICTOR/AVRGCC/lib/avr-libc-20011029/src/gcrt1.S: Assembler messages:
C:/VICTOR/AVRGCC/lib/avr-libc-20011029/src/gcrt1.S:211: Error: non-constant
expr
ession in ".if" statement
C:/VICTOR/AVRGCC/lib/avr-libc-20011029/src/gcrt1.S:229: Error: Constant
value re
quired
...
After this, a lot more errors of the same kind, referring to different lines
in gcrt1.S.
I changed the io-avr in order to direct it to iom103.h when no device was
defined, but this resulted in errors like
C:/VICTOR/AVRGCC/lib/avr-libc-20011029/src/gcrt1.S:125: Error: Illegal
opcode jm
p for mcu avr2
in different lines of gcrt1.S. I have no idea where to look for the error,
any help is welcome. I hope I'm not irritating you yet.....
Greetings, Victor

--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

From [email-masked] Wed Nov 07 08:48:56 2001
Received: from mta5.snfc21.pbi.net ([206.13.28.241] helo=snfc21.pbi.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161CDP-0002cD-00
for <[email-masked]>; Wed, 07 Nov 2001 08:48:55 +1300
Received: from bourbonsolo1 ([209.78.192.136])
by mta5.snfc21.pbi.net (iPlanet Messaging Server 5.1 (built May 7 2001))
with SMTP id <[email-masked]> for
[email-masked]; Tue, 06 Nov 2001 11:50:53 -0800 (PST)
Date: Tue, 06 Nov 2001 11:50:17 -0800
From: Dean Ferreyra <[email-masked]>
Subject: RE: [avr-gcc-list] Sorry...
In-reply-to: <[email-masked]>
To: [email-masked]
Reply-to: [email-masked]
Message-id: <[email-masked]>
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Importance: Normal
X-Priority: 3 (Normal)
X-MSMail-priority: Normal
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Victor,

> Maybe I should have mentioned that I use
> the AVR-GCC for windows (allas, sad but true :-) ),
> I downloaded it from http://8-bit.at/avr .

I am not familiar with that version. I am also using avr-gcc on a Windows
(2000) system.

I think I may have made things worse for you! I don't know the answer to
your problem. Maybe the version of avr-gcc that you're using is not
compatible with the latest version of libc. Maybe someone else on the list
knows what is going on.

On the other hand, I thought I would tell you how I get avr-gcc up on my
machine in case you want to try it. It ensures that you have the lastest
binutils and gcc and you'll get a system that works with the latest libc. I
have to say, thought, that I don't know if this is feasible with a slow
connection.

I use Cygwin (http://sources.redhat.com/cygwin/) to provide a Unix-like
environment on my Windows machine. It's pretty painless since Cygnus
provides the binaries. Then I download the latest CVS sources for binutil
and gcc and make them. Here are some instructions on using CVS to get
binutils sources: http://sources.redhat.com/binutils/. And here are some
instructions on using CVS to get gcc sources: http://gcc.gnu.org/cvs.html.
It can be an involved process, but if you're up to it, I think its a good
way to get avr-gcc running on Windows. I used to use the snapshots
(ftp://sourceware.cygnus.com/pub/binutils/snapshots/ and
ftp://gcc.gnu.org/pub/gcc/snapshots/), but at some point they stopped
tracking the CVS sources and Marek Michalkiewicz suggested CVS and I've
never looked back.

At the end of this, I've included Marek's posted reply to some of my
questions that got me started with CVS.

Good luck!

Dean Ferreyra

---------------------------------------------

From: Marek Michalkiewicz [mailto:[email-masked]]
Sent: Saturday, May 06, 2000 3:29 AM
Cc: AVR List
Subject: Re: ! synchronize avr-gcc with avr-binutils !

> I have downloaded and built a recent snapshot of binutils:
>
ftp://sourceware.cygnus.com/pub/binutils/snapshots/binutils-000503.tar.bz2
> and started to build a recent snapshot of gcc:
> ftp://gcc.gnu.org/pub/gcc/snapshots/2000-05-01/egcs-core-20000501.tar.gz
>
> The avr-as from this binutils still gives me errors when registers are not
> preceded by an "r".

It seems binutils snapshots (even 000505 - non-Y2K-compliant) still
don't have the CVS changes from 1 May. Strange... So you have to
check out the sources using anonymous CVS. Unfortunately it's a pain
unless you have fast Internet access, but only the first time (later
CVS updates usually take no more than a few minutes).

It is probably a good idea to use current CVS gcc sources too, but
be careful - they are being broken and fixed all the time :-).

One good trick when using CVS sources is to build in a separate
directory (so nothing is written to the CVS tree), like this:

$ cd egcs
$ cvs -z9 up
$ mkdir ../build
$ cd ../build
$ ../egcs/configure --enable-languages=c --target=avr # --enable-checking
$ make
$ su -c "make install"

(it is probably safest to rm -rf the build directory each time
you do a new build - in theory, makefile dependencies should do
the right thing, but in practice it might fail sometimes).

The --enable-checking option is for the paranoid only (as of
yesterday CVS there was internal compiler error in libgcc2.c),
most people don't use it and live with these bugs...

The old stable gcc-core-2.95.2-avr-patch-1.1 could be made to
work with the new binutils by a simple 2-line change in avr.c
function asm_file_start() - this way you can have 2.95.2 (stable)
and 2.96 (CVS) installed at the same time, and choose one with
the avr-gcc -V option (the one installed last is the default).

> (As an aside, I have been using GNU C for AVR for several weeks now and
I'm
> ecstatic to have such a great development system! Thanks to everyone who
> has made this possible!)

Yes, it is great, but projects like this can never be said to be
really finished, there is always one more bug or optimization :-).

One thing still really missing is support for multiple address
spaces (program and data), so you can access constants in program
memory directly from C without these ugly macros. Not easy to
implement though (needs significant changes in gcc core sources,
not just in the AVR port), but potentially useful on some other
targets as well (many DSPs use the Harvard architecture too).

Marek

From [email-masked] Wed Nov 07 23:43:58 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161QBZ-0003Dn-00
for <[email-masked]>; Wed, 07 Nov 2001 23:43:57 +1300
Received: (from j@localhost)
by ida.interface-business.de id fA7Ajw447074;
Wed, 7 Nov 2001 11:45:58 +0100 (MET)
Date: Wed, 7 Nov 2001 11:45:58 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
From: [email-masked] (Joerg Wunsch)
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Subject: [avr-gcc-list] Updated avr-demo.zip
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

After noticing that there are still some people who retrieve the
fairly old version of my demo program, i've made an update available.
It's now packed into a .zip file, and the schematics is already in PDF
format to help out the Windows users who usually have problems viewing
a PS file.

You can find it at ftp://ftp.ifbus.de/pub/j_wunsch/avr-demo.zip

The demo was originally intented to accompany Rich Neswold's avr-libc
documentation, but then, well, developed to something that
demonstrates almost any of the underlying concepts of avr-gcc. It's
still just a simple PWM-driven LED (like Rich originally intented),
but there are options to control the LED via RS-232, or via an analog
input (when using an AVR that has an ADC, of course).

The updates mainly consists of small bugfixes, for things where gcc 3
is pickier than 2.x used to be. Also, the detailed code size analysis
at the top of the program has been updated -- gcc 3 generated about 10
% smaller code than 2.x did. Unfortunately, using the itoa()
conversion from libc eats up the difference, but my old hand-crafted
version turned out to be buggy anyway. But i hope the size analysis
give people a hint about how to interpret the output of avr-size and
avr-nm.

Enjoy.
--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Wed Nov 07 23:47:55 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161QFN-0003EJ-00
for <[email-masked]>; Wed, 07 Nov 2001 23:47:53 +1300
Received: (from j@localhost)
by ida.interface-business.de id fA7AnmS47085;
Wed, 7 Nov 2001 11:49:48 +0100 (MET)
Date: Wed, 7 Nov 2001 11:49:48 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] building gcc/g++ for AVR
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Cc: Peter Jansen <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

[Well, this mail's already a few days old here.]

Peter Jansen <[email-masked]> wrote:

> I'm trying to build g++ for the AVR and the following works but
> don't quite what is in the libstdc++ that was too big to combile for
> the AVR.

My FreeBSD port of avr-gcc builds the C++ frontend, but it uses the
following patch to not build those parts that don't seem to be useful
(or don't compile at all) for the AVR target.

--- configure.in.orig Sun Aug 12 18:18:37 2001
+++ configure.in Sun Aug 12 18:18:13 2001
@@ -665,6 +665,9 @@
target_configdirs="${target_configdirs} target-bsp target-cygmon"
fi
;;
+ avr-*-*)
+ noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libiberty"
+ ;;
arm-*-oabi*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
--- Makefile.in.orig Sun Aug 12 16:44:46 2001
+++ Makefile.in Sun Aug 12 16:45:18 2001
@@ -169,7 +169,7 @@

# This is set by the configure script to the list of directories which
# should be built using the target tools.
-TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib librx winsup opcodes bsp libstub cygmon libf2c libchill libobjc
+TARGET_CONFIGDIRS = libgloss $(SPECIAL_LIBS) newlib librx winsup opcodes bsp libstub cygmon libf2c libchill libobjc

# Target libraries are put under this directory:
# Changed by configure to $(target_alias) if cross.

(I don't need libiberty, YMMV.)
--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Thu Nov 08 00:39:34 2001
Received: from smtp02.web.de ([217.72.192.151] helo=smtp.web.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161R3N-0003Gn-00
for <[email-masked]>; Thu, 08 Nov 2001 00:39:33 +1300
Received: from [130.149.53.80] (helo=raum513)
by smtp.web.de with smtp (Exim 3.32 #26)
id 161R4s-0005oG-00
for [email-masked]; Wed, 07 Nov 2001 12:41:06 +0100
From: Carsten Scharfenberg <[email-masked]>
To: [email-masked]
Date: Wed, 7 Nov 2001 12:33:51 +0100
X-Mailer: KMail [version 1.1.99]
Content-Type: text/plain;
charset="iso-8859-1"
MIME-Version: 1.0
Message-Id: <01110712335100.00807@raum513>
Content-Transfer-Encoding: 8bit
Subject: [avr-gcc-list] furthermore UART problems
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,
first of all I want to thank Dean. He was absolutly right with his proposal
of using SIGNAL instead of INTERRUPT.
My problem: I have an AVR-software that should send "hello" through UART. And
I'm using minicom to receive the string. But what I actually get is crap -
though the number of received bytes is ok.
This is my transmit code:

typedef struct
{
char *data, size, counter;
} serialTransmitInfo;

static serialTransmitInfo transmitInfo;

SIGNAL( SIG_UART_DATA )
{
/*
* last byte to send? - disable UDR interrupt
*/
if( transmitInfo.counter+1 == transmitInfo.size )
cbi( UCR, UDRIE );

/*
* transmit byte and increase counter
*/
outp( transmitInfo.data[transmitInfo.counter], UDR );
transmitInfo.counter++;
}

void serialTransmit( char *data, char size )
{
transmitInfo.data = data;
transmitInfo.size = size;
transmitInfo.counter = 1;

/*
* enable UDR interrupt if more than one byte is to be sent
*/
if( size > 1 )
sbi( UCR, UDRIE );

/*
* transmit first byte
*/
outp( data[0], UDR );
}

what is received by minicom is:
..'î.7.

There's no communication problem with two PCs using minicom.

I'm using a mega103L with 4MHz. These are my initial UART settings:
outp( 0x25, UBRR );
outp( 0x08, UCR );
with minicom I'm using 9600 8N1 with no flow control.

Carsten

From [email-masked] Thu Nov 08 01:05:30 2001
Received: from nuustak.csir.co.za ([146.64.10.11])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161RSS-0003IE-00
for <[email-masked]>; Thu, 08 Nov 2001 01:05:29 +1300
Received: from CS-IMO.CSIR.CO.ZA ([146.64.10.94])
by nuustak.csir.co.za (8.11.4/8.11.4) with ESMTP id fA7C7OI00666
for <[email-masked]>; Wed, 7 Nov 2001 14:07:24 +0200 (SAST)
Disclaimer: The CSIR exercises no editorial control over E-mail
messages originating in the organisation and the views in this
message are therefore not necessarily those of the CSIR and/or
its employees.
Received: from GW-IMO-MTA by CS-IMO.CSIR.CO.ZA
with Novell_GroupWise; Wed, 07 Nov 2001 14:07:19 +0200
Message-Id: <[email-masked]>
X-Mailer: Novell GroupWise Internet Agent 6.0
Date: Wed, 07 Nov 2001 14:07:12 +0200
From: "Peter Bosscha" <[email-masked]>
To: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="=_7E24A1E7.4C2D5093"
Subject: [avr-gcc-list] Mega32 Project
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a MIME message. If you are reading this text, you may want to
consider changing to a mail reader or gateway that understands how to
properly handle MIME multipart messages.

--=_7E24A1E7.4C2D5093
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hi,

I'm busy with a new project on the MEGA32, using the latest AVRGCC =
version.
The compiler seems happy with ATMEGA32 but the linker (LD.exe) complains =
that it does not understand "AVR5". The --help for the linker also does =
not list the MEGA32.
What to do ? Is there a work around ?

Regards
Peter Bosscha

--=_7E24A1E7.4C2D5093
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Description: HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1"=
>
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR></HEAD>
<BODY style=3D"MARGIN-TOP: 2px; FONT: 8pt MS Shell Dlg; MARGIN-LEFT: 2px">
<DIV><FONT size=3D1>Hi,</FONT></DIV>
<DIV><FONT size=3D1></FONT>&nbsp;</DIV>
<DIV><FONT size=3D1>I'm busy with a new project on the MEGA32, using the =
latest=20
AVRGCC version.</FONT></DIV>
<DIV><FONT size=3D1>The compiler seems happy with ATMEGA32 but the linker =
(LD.exe)=20
complains that it does not understand "AVR5". The --help for the linker =
also=20
does not list the MEGA32.</FONT></DIV>
<DIV><FONT size=3D1>What to do ? Is there a work around ?</FONT></DIV>
<DIV><FONT size=3D1></FONT>&nbsp;</DIV>
<DIV><FONT size=3D1>Regards</FONT></DIV>
<DIV><FONT size=3D1>Peter Bosscha</FONT></DIV></BODY></HTML>

--=_7E24A1E7.4C2D5093--

From [email-masked] Thu Nov 08 01:11:35 2001
Received: from hertz.ikp.physik.tu-darmstadt.de ([130.83.24.91])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161RYN-0003J0-00
for <[email-masked]>; Thu, 08 Nov 2001 01:11:35 +1300
Received: (from bon@localhost)
by hertz.ikp.physik.tu-darmstadt.de (8.11.6/8.11.2/SuSE Linux 8.11.1-0.5) id fA7CDa123446;
Wed, 7 Nov 2001 13:13:36 +0100
X-Authentication-Warning: hertz.ikp.physik.tu-darmstadt.de: bon set sender to [email-masked] using -f
From: Uwe Bonnes <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <[email-masked]>
Date: Wed, 7 Nov 2001 13:13:35 +0100
To: Carsten Scharfenberg <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] furthermore UART problems
In-Reply-To: <01110712335100.00807@raum513>
References: <01110712335100.00807@raum513>
X-Mailer: VM 6.90 under Emacs 20.7.1
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>>>>> "Carsten" == Carsten Scharfenberg <[email-masked]> writes:

Carsten> I'm using a mega103L with 4MHz. These are my initial UART
Carsten> settings: outp( 0x25, UBRR ); outp( 0x08, UCR ); with minicom
Carsten> I'm using 9600 8N1 with no flow control.

0x25 != 25

The table in the atmega datasheet gives decimal values

Bye
--
Uwe Bonnes [email-masked]

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

From [email-masked] Thu Nov 08 01:13:19 2001
Received: from [195.15.68.1] (helo=mail.bluebiz.ch)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 161Ra2-0003JV-00
for <[email-masked]>; Thu, 08 Nov 2001 01:13:19 +1300
X-ITHouse-Forward-Path: <[email-masked]>
Received: From uranus.epicard.ch by mail.bluebiz.ch (IT House Mail Server [IT-B0-D45F090A-345080B0]); Wed, 7 Nov 2001 13:17:46 +0100
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.0.2
Date: Wed, 07 Nov 2001 13:15:09 +0100
To: [email-masked]
From: Patrick Joly <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: [avr-gcc-list] avr-ld and at94k
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I use for my project an AT94K40AL.
When I compile or assemble with -mmcu=at94k, it'is OK. But with linker, I
obtain 'unrecognised emulation mode: avr"

>avr-gcc -mmcu=at94k main.o ... -o main.elf
ld.exe: unrecognised emulation mode: avr5
Supported emulations: avr85xx avr1200 avr23xx avr44x4 avr4433 avrmega603
avrmega103 avrmega161

How can I add at94k support to avr-ld ?

I use avrgcc20010821a from avrfreaks.

Thanks

Patrick Joly

From [email-masked] Thu Nov 08 01:59:55 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161SIp-0003MB-00
for <[email-masked]>; Thu, 08 Nov 2001 01:59:45 +1300
Received: from marekm by alf.amelek.gda.pl with local (Exim 3.33 #1 (Debian))
id 161SJl-0000dE-00; Wed, 07 Nov 2001 14:00:33 +0100
Subject: Re: [avr-gcc-list] Mega32 Project
In-Reply-To: <[email-masked]>
To: Peter Bosscha <[email-masked]>
Date: Wed, 7 Nov 2001 14:00:32 +0100 (CET)
CC: [email-masked]
X-Mailer: ELM [version 2.4ME+ PL94 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Message-Id: <[email-masked]>
From: Marek Michalkiewicz <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> I'm busy with a new project on the MEGA32, using the latest AVRGCC version.
> The compiler seems happy with ATMEGA32 but the linker (LD.exe) complains that it does not understand "AVR5". The --help for the linker also does not list the MEGA32.
> What to do ? Is there a work around ?

For now, try this workaround:

avr-gcc -mmcu=atmega32 -Wl,-m,avrmega161 -Wl,-T,m323.x

where m323.x is a copy of /usr/local/avr/lib/ldscripts/avrmega161.x
edited to increase maximum memory sizes (look at the first few
lines of the file, under MEMORY).

The "avr5" emulation was intended to be for all devices with
enhanced core and >8K of program memory, but I didn't have time
to make the necessary binutils patches, and now ATmega64/128
require a different linker script anyway (internal SRAM starts
at 0x100, not 0x60 - I wonder why Atmel didn't do that from the
start, fewer address bits to decode).

BTW, ATmega32 was renamed to ATmega323, but (just to add more
confusion) I heard there will be ATmega32 too...

Marek

From [email-masked] Thu Nov 08 06:18:41 2001
Received: from spr-tik2.ethz.ch ([129.132.119.69] helo=tik2.ethz.ch)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161WLY-0003Xj-00
for <[email-masked]>; Thu, 08 Nov 2001 06:18:41 +1300
Received: from tec-pc-jg.ethz.ch (VtKQCe4H76y9eu0RSizl4NbCXW2mu0F/@tec-pc-jg [129.132.119.47])
by tik2.ethz.ch (8.8.8/8.8.8) with ESMTP id SAA22063;
Wed, 7 Nov 2001 18:20:45 +0100 (MET)
From: Jan Beutel <[email-masked]>
To: [email-masked]
Cc: Oliver Kasten <[email-masked]>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Evolution/0.99.0+cvs.2001.11.06.15.04 (Preview Release)
Date: 07 Nov 2001 18:20:45 +0100
Message-Id: <[email-masked]>
Mime-Version: 1.0
Subject: [avr-gcc-list] atmega128 support
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

is anybody using an atmega128l with gcc successfully yet? we would
really like to benefit from the second uart, but are unsure if we can
port our code from 103 to 128....

--
Jan Beutel [email-masked]
Computer Engineering and Networks Laboratory, ETZ G63
ETH Zurich +41 1 632 70 32 Phone
Gloriastrasse 35 +41 1 632 10 35 Fax
CH 8092 Zurich/Switzerland http://www.tik.ee.ethz.ch/~beutel

From [email-masked] Thu Nov 08 09:35:08 2001
Received: from [213.191.73.62] (helo=webmail.hansenet.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161ZPf-0003kO-00
for <[email-masked]>; Thu, 08 Nov 2001 09:35:08 +1300
Received: from there (62.109.74.240) by webmail.hansenet.de (5.5.034)
id 3BE9263B00000BC0; Wed, 7 Nov 2001 21:36:01 +0100
Message-ID: <[email-masked]> (added by [email-masked])
Content-Type: text/plain;
charset="iso-8859-1"
From: Ralph Koettlitz <[email-masked]>
Reply-To: [email-masked]
To: Marek Michalkiewicz <[email-masked]>,
Peter Bosscha <[email-masked]>
Subject: Re: [avr-gcc-list] Mega32 Project
Date: Wed, 7 Nov 2001 21:36:32 +0100
X-Mailer: KMail [version 1.3.1]
Cc: [email-masked]
References: <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Am Mittwoch 07 November 2001 14:00 schrieb Marek Michalkiewicz:
>
> BTW, ATmega32 was renamed to ATmega323, but (just to add more
> confusion) I heard there will be ATmega32 too...
>
No, the ATmega32 is the shrinked dice version an has more features with the
boot loader and could be clocked up to 16Mhz....
ATmega323 is the preleminary version of the Atmega32.

Ralph

From [email-masked] Thu Nov 08 14:17:55 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161dpK-0003z5-00
for <[email-masked]>; Thu, 08 Nov 2001 14:17:54 +1300
Received: (from rneswold@localhost)
by DrMemory.fnal.GOV (8.11.3/8.11.3) id fA81Li123781;
Wed, 7 Nov 2001 19:21:44 -0600 (CST)
(envelope-from rneswold)
Date: Wed, 7 Nov 2001 19:21:44 -0600
From: Rich Neswold <[email-masked]>
To: Joerg Wunsch <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] UART again
Message-ID: <[email-masked]>
Reply-To: Rich Neswold <[email-masked]>
References: <01110217281801.01391@raum513> <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="gKMricLos+KVdGMg"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Mon, Nov 05, 2001 at 10:34:37AM +0100
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.3-RELEASE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--gKMricLos+KVdGMg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Wasn't it 5-Nov-2001, at 10:34AM, when Joerg Wunsch said:
> Ask Rich Neswold for a copy of his code. The code looks good, although i
> haven't been successful in using it so far

Yow! That's not very good publicity... :-)

What problems have you had? I've been using it very successfully for a few
months now. Maybe I forgot to include something in my instructions to you.
Let me know so we can get it to work.

--=20
Rich Neswold

efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

--gKMricLos+KVdGMg
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE76d4oZmE+i9FKxdwRAvo4AJ4zgJa+PFskmk3S+D21rbL9ud0DuQCfSljC
aJgkUsX5vOIh9MmRTYdtphA=
=HQGh
-----END PGP SIGNATURE-----

--gKMricLos+KVdGMg--

From [email-masked] Thu Nov 08 14:24:38 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161dvo-0003zj-00
for <[email-masked]>; Thu, 08 Nov 2001 14:24:37 +1300
Received: (from rneswold@localhost)
by DrMemory.fnal.GOV (8.11.3/8.11.3) id fA81SUf23800;
Wed, 7 Nov 2001 19:28:30 -0600 (CST)
(envelope-from rneswold)
Date: Wed, 7 Nov 2001 19:28:30 -0600
From: Rich Neswold <[email-masked]>
To: Joerg Wunsch <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Updated avr-demo.zip
Message-ID: <[email-masked]>
Reply-To: Rich Neswold <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="1LKvkjL3sHcu1TtY"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Wed, Nov 07, 2001 at 11:45:58AM +0100
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.3-RELEASE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--1LKvkjL3sHcu1TtY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Wasn't it 7-Nov-2001, at 11:45AM, when Joerg Wunsch said:
> The demo was originally intented to accompany Rich Neswold's avr-libc
> documentation

I've "ported" the document over to DocBook. I've also included your demo
project's source code and schematic. One problem is that the schematic was
postscript, so when it gets added to the PDF file, a portion gets clipped.
Is there a way to get your schemtic in encapsulated postscript? I believe
(correct me if I'm wrong) that .eps files can be scaled whereas .ps files
are difficult to scale in a document since the .ps file has page sizes,
orientation, etc. encoded.

The function reference has been updated to cover version 20010717 of
avr-libc. I'm currently documenting the GCC 3.0 command line options...

--=20
Rich Neswold

efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

--1LKvkjL3sHcu1TtY
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE76d+9ZmE+i9FKxdwRAi4rAJ0dvnaTsxaBKNrSAJE+xFNLNJPkxACg2jCq
2wwPRHuAk9MQElGCNwtP2DI=
=cWA5
-----END PGP SIGNATURE-----

--1LKvkjL3sHcu1TtY--

From [email-masked] Thu Nov 08 16:20:49 2001
Received: from cluster2.tfb.com ([204.212.132.102] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161fkG-000460-00
for <[email-masked]>; Thu, 08 Nov 2001 16:20:48 +1300
Received: from jaz.tfb.com (204-216-234-239.dsl.cust.tfb.com [204.216.234.239])
by cluster2.tfb.com (8.11.0/8.11.0) with ESMTP id fA83Msx09848
for <[email-masked]>; Wed, 7 Nov 2001 19:22:54 -0800
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Wed, 07 Nov 2001 19:24:51 -0800
To: [email-masked]
From: ChristoGeo <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: [avr-gcc-list] Help talking to serial port in Linux
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi, I am looking for some examples of communications up/down through the
serial port under linux. I am trying to port my dos tools over to Linux
and this is my biggest problem (serial comms). I need to open the port at
115200 and also control dtr signal (my reset), etc. Anyone have any places
with examples?

Thanks,
Geo

From [email-masked] Thu Nov 08 16:43:48 2001
Received: from [203.24.179.147] (helo=smartcontainer.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 161g6V-00047d-00
for <[email-masked]>; Thu, 08 Nov 2001 16:43:48 +1300
Received: (qmail 4539 invoked by uid 8); 8 Nov 2001 03:45:51 -0000
Received: from link.smartcontainer.net (20.20.20.53, claiming to be "smartcontainer.net")
by smarty with SMTP id smtpdKV8vDs; Wed, 07 Nov 2001 22:45:47 EST
Message-ID: <[email-masked]>
Date: Thu, 08 Nov 2001 14:40:32 +1100
From: Scott Finneran <[email-masked]>
Organization: Smart Container
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: ChristoGeo <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] Help talking to serial port in Linux
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

The LDP (Linux Documentation Project) http://www.linuxdoc.org is always
a good place to start. In this case, check out the
Serial-Programming-Howto document.

Scott
--
Scott Finneran [email-masked] _--_|\
R&D Software Engineer / \
Smart Container Telephone: +61 2 9935 5555 \_.--._*
Level 1, N.I.C. Building Facsimile: +61 2 9417 3862 V
Australian Technology Park,
Garden Street.
Eveleigh, NSW Australia 1430

ChristoGeo wrote:
>
> Hi, I am looking for some examples of communications up/down through the
> serial port under linux. I am trying to port my dos tools over to Linux
> and this is my biggest problem (serial comms). I need to open the port at
> 115200 and also control dtr signal (my reset), etc. Anyone have any places
> with examples?
>
> Thanks,
> Geo
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Thu Nov 08 18:19:31 2001
Received: from cluster1.tfb.com ([204.212.132.101] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161hb8-0004Cf-00
for <[email-masked]>; Thu, 08 Nov 2001 18:19:30 +1300
Received: from jaz.tfb.com (204-216-234-239.dsl.cust.tfb.com [204.216.234.239])
by cluster1.tfb.com (8.11.0/8.11.0) with ESMTP id fA85LZb09439
for <[email-masked]>; Wed, 7 Nov 2001 21:21:35 -0800
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Wed, 07 Nov 2001 21:23:33 -0800
To: [email-masked]
From: ChristoGeo <[email-masked]>
Subject: Re: [avr-gcc-list] Help talking to serial port in Linux
In-Reply-To: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Thanks to both of you guys for responding. Really, I was hoping to see an
example someone may have already done to perhaps talk to an avr or something.

Regards,
Geo

From [email-masked] Thu Nov 08 18:52:32 2001
Received: from [203.24.179.147] (helo=smartcontainer.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 161i75-0004Eh-00
for <[email-masked]>; Thu, 08 Nov 2001 18:52:31 +1300
Received: (qmail 5332 invoked by uid 8); 8 Nov 2001 05:54:39 -0000
Received: from link.smartcontainer.net (20.20.20.53, claiming to be "smartcontainer.net")
by smarty with SMTP id smtpdYdVZKm; Thu, 08 Nov 2001 00:54:38 EST
Message-ID: <[email-masked]>
Date: Thu, 08 Nov 2001 16:49:23 +1100
From: Scott Finneran <[email-masked]>
Organization: Smart Container
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686)
X-Accept-Language: en
MIME-Version: 1.0
CC: [email-masked]
Subject: Re: [avr-gcc-list] Help talking to serial port in Linux
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

The document covers what you asked for ie. driving a serial port under
linux.

Talking to an AVR should be no different to talking to any other device
with a UART or am I missing something?

Regards,

Scott

ChristoGeo wrote:
>
> Thanks to both of you guys for responding. Really, I was hoping to see an
> example someone may have already done to perhaps talk to an avr or something.
>
> Regards,
> Geo
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Thu Nov 08 20:13:25 2001
Received: from sense-smead-139.oz.net ([216.39.162.139] helo=henry.amplepower.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161jNM-0004JG-00
for <[email-masked]>; Thu, 08 Nov 2001 20:13:25 +1300
Received: from mail.amplepower.com ([email-masked] [192.168.8.220])
by henry.amplepower.com (8.8.7/8.8.7) with ESMTP id XAA03649;
Wed, 7 Nov 2001 23:14:54 -0800
Date: Wed, 7 Nov 2001 23:14:54 -0800 (PST)
From: David Smead <[email-masked]>
To: ChristoGeo <[email-masked]>
cc: <[email-masked]>
Subject: Re: [avr-gcc-list] Help talking to serial port in Linux
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="-1463806968-774501618-1005203694=:3533"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to [email-masked] for more info.

---1463806968-774501618-1005203694=:3533
Content-Type: TEXT/PLAIN; charset=US-ASCII

Christo,

Attached is a file that shows how I ported some DOS stuff to Linux. It
was pulled from a few different sources, and hasn't been thrououghly
tested.

It seems to work, but there's a lot going on so you'll have to read the
include files and do a man on the functions that are called that are part
of the Linux libraries. Then you have to get into the structures that
deal with operating modes.

There's probably an easier way, (there is, it's called Python).

--
Sincerely,

David Smead
http://www.amplepower.com.

On Wed, 7 Nov 2001, ChristoGeo wrote:

> Hi, I am looking for some examples of communications up/down through the
> serial port under linux. I am trying to port my dos tools over to Linux
> and this is my biggest problem (serial comms). I need to open the port at
> 115200 and also control dtr signal (my reset), etc. Anyone have any places
> with examples?
>
> Thanks,
> Geo
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

---1463806968-774501618-1005203694=:3533
Content-Type: APPLICATION/zip; name="com_ports.zip"
Content-Transfer-Encoding: BASE64
Content-ID: <[email-masked]>
Content-Description:
Content-Disposition: attachment; filename="com_ports.zip"

UEsDBBQAAAAIAHVvoSgzHJT8nwYAAFcXAAALABUAY29tX3BvcnRzLmNVVAkA
Az7wDTk0L+o7VXgEAPQB9AHNGGtT20bws/QrtmSGyEZgm0chUZwZI0zrKbEZ
y0yaphmPkE5Gg3zSSOcATehv7+6dJMsO4LQEpnxAutXu3r4fbtQ1zYYBvIMx
nOJzCCNwYAvA1uiv3tD1FyH3opnP4E0m/DDeuni7AEpDPlmEzXiImAjTGnU4
4+E1ZMLlvpv6EMy4J8KYg8+CTPGf0wUeF1FOFoQRAy/mIo2jAnkRm6UpXxJG
sHQaxlnO4nTg9H4HCeNutMysymvNi6fjJE4Fkq4RKZ6Bzij4LCjsgPgBR2ro
OrYO8AJfQ87oBNv7+gvG/TCYI42GZ90KFh2hVQEcd06cLjRLOjSRCD28MJ15
AnJNII78cZyQxTLrPpSlzyEXpGsQTmYp86GtbrJ0cZMwEiwnT13B9C8okHfh
plCno4WKovLn7syXUNfDO0B5WJoAIEsY88dCPS1N2SpNWZbEqAafSLbKXrcw
7Izw3kIuOsnPY+GeR+zjJ2jL+7/A2s7BbrO5ZsKhfIFbU4Fbr7YVWL6U4Fc/
Kyg9S+DugQLSswRuS7aH2wtMC55VljnHKsOdXKIqOwWqErb2FLO9CmhnV4J2
dqugrb1vgC1F2pqT7kuk/b0SoLgTc/2WvEP2xniBOJCWBGnJPDwbdWfUGY7q
j/7T69qoNzrpvta0OGFcJgZsAr2DW6aGjndSqJUohow8iVxDxzbq2hGmxrB3
OuoN+q81HfnWu/2jx8tXz2+mq8aBL+1SlgyfZV4aJhi4JKAeBoYSqd0Ge/Cu
BTVNQ9PmpJgcJL4Baw2ffW4IceOQwQfj4dH7IXzFl/7AHo0+qNej7knnA9Qs
nUUZgyXO26j0Q3xb38lXpkTKxCzlxmYLgbd6fiqZS2CD7KChPWFwDMdnfZus
XHGYUdOeMC68KM5YERjysBQZn+PQhznWPDakAk8eHtLvlSJYk2YVXsawFonU
yCUxYWQ7nf7gvQnrlUpbswAwnrCqiThlVAr5hGWqAN5VWW91qWnB9SH/VEzy
pA6SoiQz4aF/8EHeKQu6iPFYTeESecFNpuoM3kX6TPmcCo7dAv+jZa/SULC5
m9ZRChOy8C8WBwaJVaMsKBKDSB4y+ly/p7f5hP0LmxPy6tRArGyBWZBipokL
puoPTlZ5wcggFE/kFjlUYCS0oVn6KGWuv8pFlIeE/QaaskAuuaw4Iu1KB0pj
PUvSTNk0d+E1nN8IllG/RWCc3pAj70od/HpX8tQRbuYT2Yw/R2NUnuLC0pUA
XmKh2b/vTw/i1CBicjNqkOATFbAk6Ke20sGCjQ1PqgLVwlHqjTdubHxXOpLN
nqcIplGQO9QemnBy/E3hQ4Rnb1F3Ga953aT+jjbJPXIPkruAtLrwoX5Pbuiy
M9JIUL7TJ23B3uU34658iXEdu6cIls4JwjQTmJngx7RyuLwyhNa2UC7Nc6MI
2LU7TSISZ+ne+aVylzC5eWC21jBkkbKopJstnPAgwZI7ZVhzsQCjMufxZJZt
/dg4KPbBw7NjaDW3d0uA03kn98P8ODSua2CkiUg3317XVHbTpvYRCT/l2Y7i
huKmCsFslCnZsnS5f9WJgUVRACxiU8axtYS8spZB7qryaxuMoqrPsbC2Q0PH
ADSqFR/qNdgoAPmmKLuAvO5aUPtS2yX1LCWsambS7SHHUJVBSnVIVR+EUyFq
4TsRWqQLlaKX5ktYXy9PfzZfWrIikapYftqqDFmSE9arpGCiLrVWE+ryx4h5
ezseO93R8YkpZ/f+4cnA/g1oTqRBEadKwIuAx3zzPIq9S4rKXmMApIvwJstD
Z3XWVEwUH1pd4ivwZrhQowuQrUBOcvAssNuLvwgsTKP0E0O+wpM01VETZjih
5+mPdRCTg8YH6Qq5R5YTRbFQlm4AChhq9qXvrTI2qBXQZ7OEbG7mozb1/Uyk
3jQxMHKJuGaq+2q0MMnYJrN/kc3JC1DXUEaMgdZR2plIKEEyhEq0eCXaOQ4m
l/SKS7PaBApJlPcx7Q94a21BEpIjZ7jljb0gcifwFUPfRkd3TnBPs4fdzpG6
YRlvvQ1/n3aG3f6htdBO0dQ8zu+Uu8NdhLYzGpwe3sfWdnp/dO/6iLLZzsG9
ZMORY48ca0EQTFD/iqpYEFGQqV/DluSKShZGz8bFqI+ad+1fB/joOb1f8lil
3ci9UvlK9eJ2vhF/Y+l99gMtjXj3GJp9ZhxW2RppB0dH99v6v3ti33rYCPH/
wwiK9CltoD86HB8bjA8v+QsL/tS9ZLLq5Rs+inVV2hNZ5dtJc+UwOx8tavmU
9Q9QSwMEFAAAAAgAdW+hKKuG4yb1AAAAGQIAAAsAFQBjb21fcG9ydHMuaFVU
CQADPvANOXMv6jtVeAQA9AH0AXWRMWvDMBCFZ+lXHHhxTIjjrp1Kli4lpelu
jHSKD2zJnM+B/vvKTgi262oQ3Huf3gNdQs5bdHA6f5Sf56/vS/mukyiQx4Wm
52oBR3iePIPc4i0X+bkcVTxZPmdfoNhmiwerdVS1qqALLEA9IEmNfO8JfM+o
BKSOnlCLB4C3CS6dHflIa+WoQbDYG6ZO4mtGGdijBcehhcpD6NCnu4MeG8nL
NJdjSgrjOJXvXvUtkAXThB5X5lgW/efYDWIW7h5MXXG8eMFdccWtU1pst3Ky
qO8n3YTBy59ubtz/sSZ4R9eBMd0KDhYjrBP0lpxS8ftnm1aPtfwCUEsBAhcD
FAAAAAgAdW+hKDMclPyfBgAAVxcAAAsADQAAAAAAAQAAAKCBAAAAAGNvbV9w
b3J0cy5jVVQFAAM+8A05VXgAAFBLAQIXAxQAAAAIAHVvoSirhuMm9QAAABkC
AAALAA0AAAAAAAEAAACggd0GAABjb21fcG9ydHMuaFVUBQADPvANOVV4AABQ
SwUGAAAAAAIAAgCMAAAAEAgAAAAA
---1463806968-774501618-1005203694=:3533--

From [email-masked] Thu Nov 08 21:01:50 2001
Received: from cluster1.tfb.com ([204.212.132.101] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161k8D-0004Lo-00
for <[email-masked]>; Thu, 08 Nov 2001 21:01:49 +1300
Received: from jaz.tfb.com (204-216-234-239.dsl.cust.tfb.com [204.216.234.239])
by cluster1.tfb.com (8.11.0/8.11.0) with ESMTP id fA883mb14454;
Thu, 8 Nov 2001 00:03:48 -0800
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Thu, 08 Nov 2001 00:05:46 -0800
To: David Smead <[email-masked]>
From: ChristoGeo <[email-masked]>
Subject: Re: [avr-gcc-list] Help talking to serial port in Linux
Cc: <[email-masked]>
In-Reply-To: <[email-masked]
om>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Thanks Dave! This was exactly what I was looking for. I thought there
might have been a more-direct way of doing this like via ioperm for
parallel io. This is a big help!

Christo

At 11:14 PM 11/7/2001 -0800, David Smead wrote:
>Christo,
>
>Attached is a file that shows how I ported some DOS stuff to Linux. It
>was pulled from a few different sources, and hasn't been thrououghly
>tested.
>
>It seems to work, but there's a lot going on so you'll have to read the
>include files and do a man on the functions that are called that are part
>of the Linux libraries. Then you have to get into the structures that
>deal with operating modes.
>
>There's probably an easier way, (there is, it's called Python).
>
>--
>Sincerely,
>
>David Smead
>http://www.amplepower.com.
>
>On Wed, 7 Nov 2001, ChristoGeo wrote:
>
> > Hi, I am looking for some examples of communications up/down through the
> > serial port under linux. I am trying to port my dos tools over to Linux
> > and this is my biggest problem (serial comms). I need to open the port at
> > 115200 and also control dtr signal (my reset), etc. Anyone have any places
> > with examples?
> >
> > Thanks,
> > Geo
> >
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > [email-masked]
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
> >

From [email-masked] Thu Nov 08 23:29:00 2001
Received: from catv-213-100-4-26.swipnet.se ([213.100.4.26] helo=mathcore1.swipnet.se)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161mQY-0004VB-00
for <[email-masked]>; Thu, 08 Nov 2001 23:28:59 +1300
Received: from mathcore3 (mathcore3 [192.168.0.3])
by mathcore1.swipnet.se (8.11.6/8.11.2) with ESMTP id fA8Ax7f15718
for <[email-masked]>; Thu, 8 Nov 2001 11:59:07 +0100
Subject: Re: [avr-gcc-list] Updated avr-demo.zip
From: Otto Tronarp <[email-masked]>
To: [email-masked]
In-Reply-To: <[email-masked]>
References: <[email-masked]>
<[email-masked]>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Evolution/0.99.0+cvs.2001.11.06.15.04 (Preview Release)
Date: 08 Nov 2001 11:32:26 +0100
Message-Id: <1005215546.1485.1.camel@mathcore3>
Mime-Version: 1.0
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

You can always try to use ps2eps
http://www.telematik.informatik.uni-karlsruhe.de/~bless/ps2eps.html
to get a eps file.

/Otto

On Thu, 2001-11-08 at 02:28, Rich Neswold wrote:
> Wasn't it 7-Nov-2001, at 11:45AM, when Joerg Wunsch said:
> > The demo was originally intented to accompany Rich Neswold's avr-libc
> > documentation
>
> I've "ported" the document over to DocBook. I've also included your demo
> project's source code and schematic. One problem is that the schematic was
> postscript, so when it gets added to the PDF file, a portion gets clipped.
> Is there a way to get your schemtic in encapsulated postscript? I believe
> (correct me if I'm wrong) that .eps files can be scaled whereas .ps files
> are difficult to scale in a document since the .ps file has page sizes,
> orientation, etc. encoded.
>
> The function reference has been updated to cover version 20010717 of
> avr-libc. I'm currently documenting the GCC 3.0 command line options...
>
> --
> Rich Neswold
>
> efax: 1.240.536.7092
> web: www.enteract.com/~rneswold/

From [email-masked] Fri Nov 09 02:32:20 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161pI3-0004eQ-00
for <[email-masked]>; Fri, 09 Nov 2001 02:32:19 +1300
Received: from otris.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id OAA27744
for <[email-masked]>; Thu, 8 Nov 2001 14:34:19 +0100
Message-ID: <[email-masked]>
Date: Thu, 08 Nov 2001 14:41:02 +0100
From: Gunnar Henne <[email-masked]>
Reply-To: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Problems compiling avr-gcc on linux
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I tried to make a new linux release on my RedHat 7.1 box.

First I configured, compiled and installed binutils:
./configure --target=avr --exec-prefix=/opt/avrgcc --prefix=/opt/avrgcc
--disable-nls
make
make install
-> everything OK

Appended /opt/avrgcc/bin to the PATH

Then I configured gcc with:
./configure --target=avr --exec-prefix=/opt/avrgcc --prefix=/opt/avrgcc
--disable-nls --enable-language=c

After compiling a lot of stuff I get this error:

checking whether the C compiler (/tmp/gcc-3.0.1/gcc/xgcc
-B/tmp/gcc-3.0.1/gcc/ -B/opt/avrgcc/avr/bin/ -B/opt/avrgcc/avr/lib/
-isystem /opt/avrgcc/avr/include -g -O2 ) works... no
configure: error: installation or configuration problem: C compiler
cannot create executables.
make: *** [configure-target-libiberty] Fehler 1

Can someone give me a hint, how to solve the problem?

Thanks in advance

Gunnar

From [email-masked] Fri Nov 09 06:20:28 2001
Received: from sense-smead-139.oz.net ([216.39.162.139] helo=henry.amplepower.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161sqp-0004qY-00
for <[email-masked]>; Fri, 09 Nov 2001 06:20:27 +1300
Received: from mail.amplepower.com ([email-masked] [192.168.8.220])
by henry.amplepower.com (8.8.7/8.8.7) with ESMTP id JAA07998;
Thu, 8 Nov 2001 09:22:10 -0800
Date: Thu, 8 Nov 2001 09:22:09 -0800 (PST)
From: David Smead <[email-masked]>
To: Gunnar Henne <[email-masked]>
cc: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Problems compiling avr-gcc on linux
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Be root?

How much space is in opt?

--
Sincerely,

David Smead
http://www.amplepower.com.

On Thu, 8 Nov 2001, Gunnar Henne wrote:

> Hello,
>
> I tried to make a new linux release on my RedHat 7.1 box.
>
> First I configured, compiled and installed binutils:
> ./configure --target=avr --exec-prefix=/opt/avrgcc --prefix=/opt/avrgcc
> --disable-nls
> make
> make install
> -> everything OK
>
> Appended /opt/avrgcc/bin to the PATH
>
> Then I configured gcc with:
> ./configure --target=avr --exec-prefix=/opt/avrgcc --prefix=/opt/avrgcc
> --disable-nls --enable-language=c
>
> After compiling a lot of stuff I get this error:
>
> checking whether the C compiler (/tmp/gcc-3.0.1/gcc/xgcc
> -B/tmp/gcc-3.0.1/gcc/ -B/opt/avrgcc/avr/bin/ -B/opt/avrgcc/avr/lib/
> -isystem /opt/avrgcc/avr/include -g -O2 ) works... no
> configure: error: installation or configuration problem: C compiler
> cannot create executables.
> make: *** [configure-target-libiberty] Fehler 1
>
> Can someone give me a hint, how to solve the problem?
>
> Thanks in advance
>
> Gunnar
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Fri Nov 09 06:22:34 2001
Received: from sense-smead-139.oz.net ([216.39.162.139] helo=henry.amplepower.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161ssr-0004r1-00
for <[email-masked]>; Fri, 09 Nov 2001 06:22:34 +1300
Received: from mail.amplepower.com ([email-masked] [192.168.8.220])
by henry.amplepower.com (8.8.7/8.8.7) with ESMTP id JAA07979;
Thu, 8 Nov 2001 09:20:41 -0800
Date: Thu, 8 Nov 2001 09:20:40 -0800 (PST)
From: David Smead <[email-masked]>
To: Otto Tronarp <[email-masked]>
cc: <[email-masked]>
Subject: Re: [avr-gcc-list] Updated avr-demo.zip
In-Reply-To: <1005215546.1485.1.camel@mathcore3>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Otto,

Thanks for the link. This is a much needed utility!

--
Sincerely,

David Smead
http://www.amplepower.com.

On 8 Nov 2001, Otto Tronarp wrote:

> You can always try to use ps2eps
> http://www.telematik.informatik.uni-karlsruhe.de/~bless/ps2eps.html
> to get a eps file.
>
> /Otto
>
> On Thu, 2001-11-08 at 02:28, Rich Neswold wrote:
> > Wasn't it 7-Nov-2001, at 11:45AM, when Joerg Wunsch said:
> > > The demo was originally intented to accompany Rich Neswold's avr-libc
> > > documentation
> >
> > I've "ported" the document over to DocBook. I've also included your demo
> > project's source code and schematic. One problem is that the schematic was
> > postscript, so when it gets added to the PDF file, a portion gets clipped.
> > Is there a way to get your schemtic in encapsulated postscript? I believe
> > (correct me if I'm wrong) that .eps files can be scaled whereas .ps files
> > are difficult to scale in a document since the .ps file has page sizes,
> > orientation, etc. encoded.
> >
> > The function reference has been updated to cover version 20010717 of
> > avr-libc. I'm currently documenting the GCC 3.0 command line options...
> >
> > --
> > Rich Neswold
> >
> > efax: 1.240.536.7092
> > web: www.enteract.com/~rneswold/
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Fri Nov 09 07:54:03 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161uJI-00050o-00
for <[email-masked]>; Fri, 09 Nov 2001 07:54:00 +1300
Received: (from rneswold@localhost)
by DrMemory.fnal.GOV (8.11.3/8.11.3) id fA8IuXi26275;
Thu, 8 Nov 2001 12:56:33 -0600 (CST)
(envelope-from rneswold)
Date: Thu, 8 Nov 2001 12:56:32 -0600
From: Rich Neswold <[email-masked]>
To: Otto Tronarp <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Updated avr-demo.zip
Message-ID: <[email-masked]>
Reply-To: Rich Neswold <[email-masked]>
References: <[email-masked]> <[email-masked]> <1005215546.1485.1.camel@mathcore3>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="tqI+Z3u+9OQ7kwn0"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <1005215546.1485.1.camel@mathcore3>; from [email-masked] on Thu, Nov 08, 2001 at 11:32:26AM +0100
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.3-RELEASE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--tqI+Z3u+9OQ7kwn0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Wasn't it 8-Nov-2001, at 11:32AM, when Otto Tronarp said:
> You can always try to use ps2eps
> http://www.telematik.informatik.uni-karlsruhe.de/~bless/ps2eps.html
> to get a eps file.

Thanks! I'll give it a try...

--=20
Rich Neswold

efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

--tqI+Z3u+9OQ7kwn0
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE76tVgZmE+i9FKxdwRAuhyAJ9p0K07DtpWcKae4iCHUBvG5BecqwCfW/uY
2TpOGdd9nLQLqH2XPMoyDgk=
=sDNw
-----END PGP SIGNATURE-----

--tqI+Z3u+9OQ7kwn0--

From [email-masked] Fri Nov 09 03:00:47 2001
Received: from [209.235.58.166] (helo=artemisgroup.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161pjb-0004gK-00
for <[email-masked]>; Fri, 09 Nov 2001 03:00:47 +1300
Received: from c11030-a.scllg1.pa.home.com (c11030-a.scllg1.pa.home.com [24.15.29.78])
by artemisgroup.com (Postfix) with ESMTP id C95957BC5
for <[email-masked]>; Thu, 8 Nov 2001 09:02:18 -0500 (EST)
Date: Thu, 8 Nov 2001 09:00:30 -0500 (EST)
From: Patrick Lanphier <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] Re: avr-gcc-list digest, Vol 1 #222 - 4 msgs
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Below is my first C program for an AVR2313 chip. I don't undersand why
when I incude the "SIGNAL" function things don't function at all. Thanks
everyone for your help. Any general pointers would be great also.

============================================================

/*
First C Program for the AVR-2313 Chip

avr-gcc -O3 -mmcu=at90s2313 -c main.c -o main.elf
avr-objcopy -S -O ihex main.elf main.hex
*/

#include <eeprom.h>
#include <interrupt.h>
#include <timer.h>
#include <wdt.h>
#include <math.h>
#include <pgmspace.h>
#include <stdlib.h>
#include <errno.h>
#include <io.h>
#include <interrupt.h>
#include <sig-avr.h>

unsigned int led;
SIGNAL(SIG_OVERFLOW0) {
outp(0x1, PORTB);
led = ~led;
outp(led, PORTB);
outp(0, TCNT0);
}

int main(void) {
led = 0xFF;
outp(0xFF,DDRB); // use all pins on PortB for output
outp(led, PORTB);
outp(0x1, PORTB);
outp(TOIE0, TIMSK); // enable TCNT0 overflow
outp(TOV0, TIFR); // TOV0: Timer/Counter0 Overflow Flag
outp(0,TCNT0); // reset TCNT0
outp(CS02 && CS00,TCCR0); //
sei(); // enable interrupts
while(1);
}
============================================================

Patrick Lanphier
The Artemis Group
http://www.artemisgroup.com
phone: 814-235-0444
fax: 800-582-9710

From [email-masked] Fri Nov 09 09:23:58 2001
Received: from mail.teleteam.net ([199.34.16.10])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161viP-00056I-00
for <[email-masked]>; Fri, 09 Nov 2001 09:23:57 +1300
Received: from tbd.tnex.com (cust-208-208-110-38.teleteam.net [208.208.110.38])
by mail.teleteam.net (8.11.6/8.11.6) with SMTP id fA8KQV921141
for <[email-masked]>; Thu, 8 Nov 2001 14:26:32 -0600 (CST)
Message-Id: <[email-masked]>
From: "Bill Knight" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Thu, 08 Nov 2001 14:23:34 -0600
Reply-To: "Bill Knight" <[email-masked]>
Priority: Normal
X-Mailer: PMMail 2000 Professional (2.20.2320) For Windows 2000 (5.0.2195;2)
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Re: first C program for an AVR2313
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Patrick
Congratulations!!
Since you asked and I want to know too, I have understood from postings
that the use of -O3 is dangerous with avr-gcc. Apparently it can frequently
cause the generation of incorrect code. maybe others on this list can
enlighten us both.
Regards
-Bill Knight
R O SoftWare

On Thu, 8 Nov 2001 09:00:30 -0500 (EST), Patrick Lanphier wrote:

>Below is my first C program for an AVR2313 chip. I don't undersand why
>when I incude the "SIGNAL" function things don't function at all. Thanks
>everyone for your help. Any general pointers would be great also.
>
>============================================================
>
>/*
>First C Program for the AVR-2313 Chip
>
>avr-gcc -O3 -mmcu=at90s2313 -c main.c -o main.elf
>avr-objcopy -S -O ihex main.elf main.hex
>*/
>
>#include <eeprom.h>
>#include <interrupt.h>
>#include <timer.h>
>#include <wdt.h>
>#include <math.h>
>#include <pgmspace.h>
>#include <stdlib.h>
>#include <errno.h>
>#include <io.h>
>#include <interrupt.h>
>#include <sig-avr.h>
>
>unsigned int led;
>SIGNAL(SIG_OVERFLOW0) {
> outp(0x1, PORTB);
> led = ~led;
> outp(led, PORTB);
> outp(0, TCNT0);
>}
>
>int main(void) {
> led = 0xFF;
> outp(0xFF,DDRB); // use all pins on PortB for output
> outp(led, PORTB);
> outp(0x1, PORTB);
> outp(TOIE0, TIMSK); // enable TCNT0 overflow
> outp(TOV0, TIFR); // TOV0: Timer/Counter0 Overflow Flag
> outp(0,TCNT0); // reset TCNT0
> outp(CS02 && CS00,TCCR0); //
> sei(); // enable interrupts
> while(1);
>}
>============================================================
>
>Patrick Lanphier
>The Artemis Group
>http://www.artemisgroup.com
>phone: 814-235-0444
> fax: 800-582-9710
>
>
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Fri Nov 09 10:03:33 2001
Received: from viefep15-int.chello.at ([213.46.255.19])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161wKi-00059Q-00
for <[email-masked]>; Fri, 09 Nov 2001 10:03:32 +1300
Received: from gmx.at ([62.178.92.247]) by viefep15-int.chello.at
(InterMail vM.5.01.03.06 201-253-122-118-106-20010523) with ESMTP
id <[email-masked]>;
Thu, 8 Nov 2001 22:05:09 +0100
Message-ID: <[email-masked]>
Date: Thu, 08 Nov 2001 22:05:08 +0100
From: Christoph Plattner <[email-masked]>
Organization: private
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.6 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: ChristoGeo <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] Help talking to serial port in Linux
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Have you tried the "uisp" tool, downloadable together with the gcc.
I use it for the parallel (also possible) and it works fine for me.

With friendly regards
Christoph P.

ChristoGeo wrote:
>
> Thanks to both of you guys for responding. Really, I was hoping to see an
> example someone may have already done to perhaps talk to an avr or something.
>
> Regards,
> Geo
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
-------------------------------------------------------
private: [email-masked]
company: [email-masked]

From [email-masked] Fri Nov 09 10:23:47 2001
Received: from mta7.pltn13.pbi.net ([64.164.98.8] helo=pltn13.pbi.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161weI-0005Bn-00
for <[email-masked]>; Fri, 09 Nov 2001 10:23:47 +1300
Received: from bourbonsolo1 ([209.78.192.136])
by mta7.pltn13.pbi.net (iPlanet Messaging Server 5.1 (built May 7 2001))
with SMTP id <[email-masked]> for
[email-masked]; Thu, 08 Nov 2001 13:25:50 -0800 (PST)
Date: Thu, 08 Nov 2001 13:25:13 -0800
From: Dean Ferreyra <[email-masked]>
In-reply-to:
<[email-masked]>
To: [email-masked]
Reply-to: [email-masked]
Message-id: <[email-masked]>
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Importance: Normal
X-Priority: 3 (Normal)
X-MSMail-priority: Normal
Subject: [avr-gcc-list] Re: avr-gcc-list digest, Vol 1 #222 - 4 msgs
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Patrick,

There are a lot of things that need fixing in your code. For starters, I
suggest you read Rich Neswold's excellent document at
http://www.enteract.com/~rneswold/avr.

You seem to be confusing the purpose of outp(). It sets all eight bits to
the value you pass it. If you want to twiddle a single bit, use the sbi()
and cbi() macros. So to enable the timer overflow, you have

> outp(TOIE0, TIMSK); // enable TCNT0 overflow

which sets all the bits in TIMSK to zero. Instead, use

sbi(TIMSK, TOIE0);

Also, this line

> outp(CS02 && CS00,TCCR0); //

sets all the bits in TCCR0 to zero (or two if you change the "&&" to "&").
Instead, use

outp(5, TCCR0);

or

sbi(TCCR0, CS00);
sbi(TCCR0, CS02);

These changes are a start. You may even see some flashing LEDs!

Dean Ferreyra

From [email-masked] Fri Nov 09 10:17:02 2001
Received: from [213.191.73.62] (helo=webmail.hansenet.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161wXm-0005Ab-00
for <[email-masked]>; Fri, 09 Nov 2001 10:17:02 +1300
Received: from there (213.191.92.196) by webmail.hansenet.de (5.5.034)
id 3BE9263B000022D2 for [email-masked]; Thu, 8 Nov 2001 22:18:37 +0100
Message-ID: <[email-masked]> (added by [email-masked])
Content-Type: text/plain;
charset="iso-8859-1"
From: Ralph Koettlitz <[email-masked]>
Reply-To: [email-masked]
To: [email-masked]
Subject: Re: [avr-gcc-list] atmega128 support
Date: Thu, 8 Nov 2001 22:19:13 +0100
X-Mailer: KMail [version 1.3.1]
References: <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Am Mittwoch 07 November 2001 18:20 schrieb Jan Beutel:
> is anybody using an atmega128l with gcc successfully yet? we would
> really like to benefit from the second uart, but are unsure if we can
> port our code from 103 to 128....

The 128 has a compability mode...

Regards

Ralph

From [email-masked] Fri Nov 09 11:46:46 2001
Received: from 208-58-86-11.c3-0.sfo-ubr1.sfrn-sfo.ca.cable.rcn.com ([208.58.86.11] helo=bc.home.246gt.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 161xwb-0005HE-00
for <[email-masked]>; Fri, 09 Nov 2001 11:46:45 +1300
Received: from fred.home.246gt.com (fred.home.246gt.com [10.0.0.74])
by bc.home.246gt.com (8.11.3/8.11.3) with ESMTP id fA8MmrX12548
for <[email-masked]>; Thu, 8 Nov 2001 14:48:53 -0800 (PST)
(envelope-from [email-masked])
Received: (from ken@localhost)
by fred.home.246gt.com (8.11.2/8.11.2) id fA8Nnpg14214
for [email-masked]; Thu, 8 Nov 2001 15:49:51 -0800
X-Authentication-Warning: fred.home.246gt.com: ken set sender to [email-masked] using -f
Date: Thu, 8 Nov 2001 15:49:50 -0800
From: ken restivo <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: application/pgp; x-action=sign; format=text
Content-Disposition: inline; filename="msg.pgp"
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Thu, Nov 08, 2001 at 12:01:10PM +1300
Subject: [avr-gcc-list] uart oddity
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have been experimenting with the uart sample code posted here on this list (thanks, by the way!) on my mega163, and discovered some "funny" behaviour.

If RXEN and RXCIE are set, and a byte is received, and I either do not have a SIG_UART_RECV handler, or if I do have one and it doesn't read UDR, then all uart activity hangs. The cpu runs, my blinkenlights keep blinken, but no bytes get transmitted, and my SIG_UART_RECV routine does not get called ever again no matter how many more characters are received. To fix the problem, I have to insert an inb(UDR) into the SIG_UART_RECV routine. Of course, I could also turn off RXEN and RXCIE too.

Now this is simple to fix and will cause no problems in my "real" application. But it seems strange to me and was not expected. I have read the UART section of the databook several times now, and saw no hint of this. I also didn't see anything about it in the avrlibc docs. Maybe this is obvious and of course I should expect this behaviour. Or maybe I am doing something wrong. in any case I haven't been able to explain it and figured it might be worth posting about.

cheers!

- -ken
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE76xode8HF+6xeOIcRAupeAKCCFCdu2JCpTewZFZHdUUdPKuhnewCgkJz5
A92nOy9u38llwTqGgZndZ8Q=
=736X
-----END PGP SIGNATURE-----

From [email-masked] Fri Nov 09 11:49:24 2001
Received: from [203.24.179.147] (helo=smartcontainer.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 161xzA-0005Hi-00
for <[email-masked]>; Fri, 09 Nov 2001 11:49:24 +1300
Received: (qmail 9203 invoked by uid 8); 8 Nov 2001 22:51:35 -0000
Received: from peter.smartcontainer.net (20.20.20.46, claiming to be "smartcontainer.net")
by smarty with SMTP id smtpdcEJPvc; Thu, 08 Nov 2001 17:51:32 EST
Message-ID: <[email-masked]>
Date: Fri, 09 Nov 2001 09:51:32 +1100
From: Peter Jansen <[email-masked]>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: Gunnar Henne <[email-masked]>
CC: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Problems compiling avr-gcc on linux
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> I tried to make a new linux release on my RedHat 7.1 box.
>
> First I configured, compiled and installed binutils:
> ./configure --target=avr --exec-prefix=/opt/avrgcc --prefix=/opt/avrgcc
> --disable-nls
> make
> make install
> -> everything OK
>
> Appended /opt/avrgcc/bin to the PATH
>
> Then I configured gcc with:
> ./configure --target=avr --exec-prefix=/opt/avrgcc --prefix=/opt/avrgcc
> --disable-nls --enable-language=c
>
> After compiling a lot of stuff I get this error:
>
> checking whether the C compiler (/tmp/gcc-3.0.1/gcc/xgcc
> -B/tmp/gcc-3.0.1/gcc/ -B/opt/avrgcc/avr/bin/ -B/opt/avrgcc/avr/lib/
> -isystem /opt/avrgcc/avr/include -g -O2 ) works... no
> configure: error: installation or configuration problem: C compiler
> cannot create executables.
> make: *** [configure-target-libiberty] Fehler 1

I have seen the same problems, I have not figured out what is causing
it, but doing a 'make' (which gives the error) then a 'make install'
seems to work out ok.

Its something to do with missing library header files.

You need the newlib header files to build the libraries that build with
the compiler.

Regards,

--
Peter Jansen
Smart Container
Level 1, NIC Building
Eveleigh
NSW 1430
AUSTRALIA

From [email-masked] Fri Nov 09 12:26:26 2001
Received: from [203.24.179.147] (helo=smartcontainer.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 161yZ0-0005Ky-00
for <[email-masked]>; Fri, 09 Nov 2001 12:26:26 +1300
Received: (qmail 9508 invoked by uid 8); 8 Nov 2001 23:28:38 -0000
Received: from peter.smartcontainer.net (20.20.20.46, claiming to be "smartcontainer.net")
by smarty with SMTP id smtpdBXCHcu; Thu, 08 Nov 2001 18:28:31 EST
Message-ID: <[email-masked]>
Date: Fri, 09 Nov 2001 10:28:31 +1100
From: Peter Jansen <[email-masked]>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: Jan Beutel <[email-masked]>
CC: [email-masked], Oliver Kasten <[email-masked]>
Subject: Re: [avr-gcc-list] atmega128 support
References: <[email-masked]>
Content-Type: multipart/mixed;
boundary="------------090409030303000700000306"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.
--------------090409030303000700000306
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

> is anybody using an atmega128l with gcc successfully yet? we would
> really like to benefit from the second uart, but are unsure if we can
> port our code from 103 to 128....

Yes I have gcc and binutils working for the mega128, attached are some
patches for the compiler and binutils that you need to rebuild.

You also need a new library for the defines for the mega128, I'm still
working out the best library for that newlib or avr-lib, avr-lib has its
problems, new-lib makes larger code.

Have a look at this message about building gcc etc,

http://avr.jpk.co.nz/pipermail/avr-gcc-list/2001-November/001020.html

and

http://avr.jpk.co.nz/pipermail/avr-gcc-list/2001-October/001000.html

Regards,

--
Peter Jansen
Smart Container
Level 1, NIC Building
Eveleigh
NSW 1430
AUSTRALIA

--------------090409030303000700000306
Content-Type: text/plain;
name="binutils-2.11.2-patch-mega128"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="binutils-2.11.2-patch-mega128"

diff -rc3P binutils-2.11.2/gas/config/tc-avr.c binutils-2.11.2-patch-0.1/gas/config/tc-avr.c
*** binutils-2.11.2/gas/config/tc-avr.c Thu Jun 7 13:15:28 2001
--- binutils-2.11.2-patch-0.1/gas/config/tc-avr.c Tue Nov 6 18:58:48 2001
***************
*** 87,92 ****
--- 87,93 ----
{"atmega163", AVR_ISA_M161, bfd_mach_avr5},
{"atmega32", AVR_ISA_M161, bfd_mach_avr5},
{"at94k", AVR_ISA_94K, bfd_mach_avr5},
+ {"atmega128", AVR_ISA_M128, bfd_mach_avr5},
{NULL, 0, 0}
};

***************
*** 258,264 ****
" avr2 - AT90S2xxx, AT90S4xxx, AT90S8xxx, ATtiny22\n"
" avr3 - ATmega103, ATmega603\n"
" avr4 - ATmega83, ATmega85\n"
! " avr5 - ATmega161, ATmega163, ATmega32, AT94K\n"
" or immediate microcontroller name.\n"));
fprintf (stream,
_(" -mall-opcodes accept all AVR opcodes, even if not supported by MCU\n"
--- 259,265 ----
" avr2 - AT90S2xxx, AT90S4xxx, AT90S8xxx, ATtiny22\n"
" avr3 - ATmega103, ATmega603\n"
" avr4 - ATmega83, ATmega85\n"
! " avr5 - ATmega161, ATmega163, ATmega32, AT94K, ATmega128\n"
" or immediate microcontroller name.\n"));
fprintf (stream,
_(" -mall-opcodes accept all AVR opcodes, even if not supported by MCU\n"
diff -rc3P binutils-2.11.2/include/opcode/avr.h binutils-2.11.2-patch-0.1/include/opcode/avr.h
*** binutils-2.11.2/include/opcode/avr.h Mon Aug 7 00:09:14 2000
--- binutils-2.11.2-patch-0.1/include/opcode/avr.h Wed Nov 7 12:26:47 2001
***************
*** 34,39 ****
--- 34,40 ----
#define AVR_ISA_M83 (AVR_ISA_2xxx | AVR_ISA_MUL | AVR_ISA_LPMX | AVR_ISA_SPM)
#define AVR_ISA_M603 (AVR_ISA_2xxx | AVR_ISA_MEGA)
#define AVR_ISA_M103 (AVR_ISA_M603 | AVR_ISA_ELPM)
+ #define AVR_ISA_M128 (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_LPMX | AVR_ISA_ELPMX )
#define AVR_ISA_M161 (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_LPMX | AVR_ISA_SPM)
#define AVR_ISA_94K (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_LPMX)

diff -rc3P binutils-2.11.2/ld/Makefile.am binutils-2.11.2-patch-0.1/ld/Makefile.am
*** binutils-2.11.2/ld/Makefile.am Mon Jun 11 20:05:07 2001
--- binutils-2.11.2-patch-0.1/ld/Makefile.am Wed Nov 7 13:43:15 2001
***************
*** 119,124 ****
--- 119,125 ----
eavr44x4.o \
eavr85xx.o \
eavrmega103.o \
+ eavrmega128.o \
eavrmega161.o \
eavrmega603.o \
ecoff_sparc.o \
***************
*** 380,385 ****
--- 381,390 ----
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avrmega103 "$(tdir_avr85xx)"
+ eavrmega128.c: $(srcdir)/emulparams/avrmega128.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avrmega128 "$(tdir_avr85xx)"
eavrmega161.c: $(srcdir)/emulparams/avrmega161.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
${GEN_DEPENDS}
diff -rc3P binutils-2.11.2/ld/Makefile.in binutils-2.11.2-patch-0.1/ld/Makefile.in
*** binutils-2.11.2/ld/Makefile.in Mon Jun 11 20:05:07 2001
--- binutils-2.11.2-patch-0.1/ld/Makefile.in Wed Nov 7 13:43:48 2001
***************
*** 227,232 ****
--- 227,233 ----
eavr44x4.o \
eavr85xx.o \
eavrmega103.o \
+ eavrmega128.o \
eavrmega161.o \
eavrmega603.o \
ecoff_sparc.o \
***************
*** 1094,1099 ****
--- 1095,1104 ----
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avrmega103 "$(tdir_avr85xx)"
+ eavrmega128.c: $(srcdir)/emulparams/avrmega128.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avrmega128 "$(tdir_avr85xx)"
eavrmega161.c: $(srcdir)/emulparams/avrmega161.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
${GEN_DEPENDS}
diff -rc3P binutils-2.11.2/ld/configure.tgt binutils-2.11.2-patch-0.1/ld/configure.tgt
*** binutils-2.11.2/ld/configure.tgt Mon Jun 11 20:05:08 2001
--- binutils-2.11.2-patch-0.1/ld/configure.tgt Wed Nov 7 13:44:17 2001
***************
*** 22,28 ****
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
arc-*-elf*) targ_emul=arcelf ;;
avr-*-*) targ_emul=avr85xx
! targ_extra_emuls="avr1200 avr23xx avr44x4 avr4433 avrmega603 avrmega103 avrmega161" ;;
cris-*-*aout*) targ_emul=crisaout
targ_extra_emuls="criself crislinux"
targ_extra_libpath=$targ_extra_emuls ;;
--- 22,28 ----
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
arc-*-elf*) targ_emul=arcelf ;;
avr-*-*) targ_emul=avr85xx
! targ_extra_emuls="avr1200 avr23xx avr44x4 avr4433 avrmega603 avrmega103 avrmega128 avrmega161" ;;
cris-*-*aout*) targ_emul=crisaout
targ_extra_emuls="criself crislinux"
targ_extra_libpath=$targ_extra_emuls ;;
diff -rc3P binutils-2.11.2/ld/emulparams/avrmega128.sh binutils-2.11.2-patch-0.1/ld/emulparams/avrmega128.sh
*** binutils-2.11.2/ld/emulparams/avrmega128.sh Thu Jan 1 10:00:00 1970
--- binutils-2.11.2-patch-0.1/ld/emulparams/avrmega128.sh Wed Nov 7 13:39:33 2001
***************
*** 0 ****
--- 1,12 ----
+ ARCH=avr:5
+ MACHINE=
+ SCRIPT_NAME=elf32avr
+ OUTPUT_FORMAT="elf32-avr"
+ MAXPAGESIZE=1
+ EMBEDDED=yes
+ TEMPLATE_NAME=generic
+
+ TEXT_LENGTH=128K
+ DATA_LENGTH=4096
+ EEPROM_LENGTH=4K
+ STACK=0x0FFF

--------------090409030303000700000306
Content-Type: text/plain;
name="gcc-3.0.2-patch-mega128"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="gcc-3.0.2-patch-mega128"

diff -rc3P gcc-3.0.2/gcc/ChangeLog gcc-3.0.2-patch-0.1/gcc/ChangeLog
*** gcc-3.0.2/gcc/ChangeLog Wed Oct 24 03:19:18 2001
--- gcc-3.0.2-patch-0.1/gcc/ChangeLog Wed Nov 7 14:57:55 2001
***************
*** 1,3 ****
--- 1,9 ----
+ 2001-11-07 Peter Jansen <[email-masked]>
+
+ * gcc/config/avr/avr.c - added mega128 to list of avr5 types
+ * gcc/config/avr/avr/h - Ditto
+
+
2001-10-23 Release Manager

* GCC 3.0.2 Released.
diff -rc3P gcc-3.0.2/gcc/config/avr/avr.c gcc-3.0.2-patch-0.1/gcc/config/avr/avr.c
*** gcc-3.0.2/gcc/config/avr/avr.c Thu Jun 28 07:35:37 2001
--- gcc-3.0.2-patch-0.1/gcc/config/avr/avr.c Tue Nov 6 18:35:24 2001
***************
*** 153,158 ****
--- 153,159 ----
{ "atmega163", AVR5 },
{ "atmega32", AVR5 },
{ "at94k", AVR5 },
+ { "atmega128", AVR5 },
/* Assembler only. */
{ "avr1", AVR1 },
{ "at90s1200", AVR1 },
***************
*** 1164,1170 ****
/* Choose mode for jump insn:
1 - relative jump in range -63 <= x <= 62 ;
2 - relative jump in range -2046 <= x <= 2045 ;
! 3 - absolute jump (only for ATmega[16]03). */

int
avr_jump_mode (x, insn)
--- 1165,1171 ----
/* Choose mode for jump insn:
1 - relative jump in range -63 <= x <= 62 ;
2 - relative jump in range -2046 <= x <= 2045 ;
! 3 - absolute jump (only for ATmega1[6][03][28]). */

int
avr_jump_mode (x, insn)
diff -rc3P gcc-3.0.2/gcc/config/avr/avr.h gcc-3.0.2-patch-0.1/gcc/config/avr/avr.h
*** gcc-3.0.2/gcc/config/avr/avr.h Tue Apr 17 04:25:42 2001
--- gcc-3.0.2-patch-0.1/gcc/config/avr/avr.h Tue Nov 6 17:59:26 2001
***************
*** 2973,2978 ****
--- 2973,2979 ----
%{mmcu=avr3:%(cpp_avr3)} \
%{mmcu=atmega603:%(cpp_avr3) -D__AVR_ATmega603__} \
%{mmcu=atmega103:%(cpp_avr3) -D__AVR_ATmega103__} \
+ %{mmcu=atmega128:%(cpp_avr5) -D__AVR_ATmega128__} \
%{mmcu=avr4:%(cpp_avr4)} \
%{mmcu=atmega83: %(cpp_avr4) -D__AVR_ATmega83__} \
%{mmcu=atmega85: %(cpp_avr4) -D__AVR_ATmega85__} \
***************
*** 3051,3056 ****
--- 3052,3058 ----
%{!mmcu*:-m avr85xx} \
%{mmcu=atmega603:-m avrmega603} \
%{mmcu=atmega103:-m avrmega103} \
+ %{mmcu=atmega128:-m avrmega128} \
%{mmcu=atmega161:-m avrmega161} \
%{mmcu=atmega163:-m avrmega161} \
%{mmcu=atmega32:-m avr5} \
***************
*** 3130,3135 ****
--- 3132,3138 ----
%{mmcu=at90c8534:crtc8534.o%s} \
%{mmcu=at90s8535:crts8535.o%s} \
%{mmcu=atmega103|mmcu=avr3:crtm103.o%s} \
+ %{mmcu=atmega128|mmcu=avr5:crtm128.o%s} \
%{mmcu=atmega603:crtm603.o%s} \
%{mmcu=atmega83|mmcu=avr4:crtm83.o%s} \
%{mmcu=atmega85:crtm85.o%s} \
diff -rc3P gcc-3.0.2/gcc/config/avr/t-avr gcc-3.0.2-patch-0.1/gcc/config/avr/t-avr
*** gcc-3.0.2/gcc/config/avr/t-avr Sun Jan 21 03:49:01 2001
--- gcc-3.0.2-patch-0.1/gcc/config/avr/t-avr Tue Nov 6 18:02:33 2001
***************
*** 49,55 ****
mmcu?avr3=mmcu?atmega103 mmcu?avr3=mmcu?atmega603 \
mmcu?avr4=mmcu?atmega83 mmcu?avr4=mmcu?atmega85 \
mmcu?avr5=mmcu?atmega161 mmcu?avr5=mmcu?atmega163 \
! mmcu?avr5=mmcu?atmega32 mmcu?avr5=mmcu?at94k

MULTILIB_EXCEPTIONS =

--- 49,56 ----
mmcu?avr3=mmcu?atmega103 mmcu?avr3=mmcu?atmega603 \
mmcu?avr4=mmcu?atmega83 mmcu?avr4=mmcu?atmega85 \
mmcu?avr5=mmcu?atmega161 mmcu?avr5=mmcu?atmega163 \
! mmcu?avr5=mmcu?atmega32 mmcu?avr5=mmcu?at94k \
! mmcu?avr5=mmcu?atmega128

MULTILIB_EXCEPTIONS =

Only in gcc-3.0.2: libstdc++-v3

--------------090409030303000700000306--

From [email-masked] Fri Nov 09 12:54:38 2001
Received: from [203.24.179.147] (helo=smartcontainer.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 161z0I-0005OI-00
for <[email-masked]>; Fri, 09 Nov 2001 12:54:38 +1300
Received: (qmail 9688 invoked by uid 8); 8 Nov 2001 23:56:49 -0000
Received: from peter.smartcontainer.net (20.20.20.46, claiming to be "smartcontainer.net")
by smarty with SMTP id smtpdlWgY6a; Thu, 08 Nov 2001 18:56:48 EST
Message-ID: <[email-masked]>
Date: Fri, 09 Nov 2001 10:56:48 +1100
From: Peter Jansen <[email-masked]>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: Jan Beutel <[email-masked]>
CC: [email-masked], Oliver Kasten <[email-masked]>
Subject: Re: [avr-gcc-list] atmega128 support
References: <[email-masked]>
Content-Type: multipart/mixed;
boundary="------------060607010005020805070804"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.
--------------060607010005020805070804
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

> is anybody using an atmega128l with gcc successfully yet? we would
> really like to benefit from the second uart, but are unsure if we can
> port our code from 103 to 128....

Attached is a patch to your avr-libc for the ATmega128.

Their is some problems with the way I/O and data space is defined for
the processors, we have made the changes for the 128 so it works. I
think the library should be changed so that the registers are defined as
data space and converted to I/O addresses (subtract 0x20) when required.
This is what gcc does. This would require changing the I/O access
macros which I have not got around to yet, and we are not using for our
project.

Regards,

--
Peter Jansen
Smart Container
Level 1, NIC Building
Eveleigh
NSW 1430
AUSTRALIA

--------------060607010005020805070804
Content-Type: text/plain;
name="avr-lib-20011029-patch-mega128"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="avr-lib-20011029-patch-mega128"

diff -rc3P avr-libc-20011029/include/ctype.h avr-libc-20011029-patch-0.1/include/ctype.h
*** avr-libc-20011029/include/ctype.h Sun Oct 7 02:53:36 2001
--- avr-libc-20011029-patch-0.1/include/ctype.h Wed Nov 7 17:38:50 2001
***************
*** 12,17 ****
--- 12,21 ----
#define __ATTR_CONST__ __attribute__((__const__))
#endif

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
extern int isalnum(int __c) __ATTR_CONST__;
extern int isalpha(int __c) __ATTR_CONST__;
extern int isascii(int __c) __ATTR_CONST__;
***************
*** 28,32 ****
--- 32,40 ----
extern int toascii(int __c) __ATTR_CONST__;
extern int tolower(int __c) __ATTR_CONST__;
extern int toupper(int __c) __ATTR_CONST__;
+
+ #ifdef __cplusplus
+ }
+ #endif

#endif
diff -rc3P avr-libc-20011029/include/eeprom.h avr-libc-20011029-patch-0.1/include/eeprom.h
*** avr-libc-20011029/include/eeprom.h Sun Oct 29 04:19:50 2000
--- avr-libc-20011029-patch-0.1/include/eeprom.h Wed Nov 7 17:42:43 2001
***************
*** 26,31 ****
--- 26,35 ----
/* return 1 if EEPROM is ready for a new read/write operation, 0 if not */
#define eeprom_is_ready() bit_is_clear(EECR, EEWE)

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
/* read one byte from EEPROM address ADDR */
extern unsigned char eeprom_rb(unsigned int addr);

***************
*** 37,42 ****
--- 41,51 ----

/* read a block of SIZE bytes from EEPROM address ADDR to BUF */
extern void eeprom_read_block(void *buf, unsigned int addr, size_t n);
+
+
+ #ifdef __cplusplus
+ }
+ #endif

/* IAR C compatibility defines */
#define _EEPUT(addr, val) eeprom_wb(addr, val)
diff -rc3P avr-libc-20011029/include/errno.h avr-libc-20011029-patch-0.1/include/errno.h
*** avr-libc-20011029/include/errno.h Mon Jun 5 02:53:57 2000
--- avr-libc-20011029-patch-0.1/include/errno.h Wed Nov 7 17:43:35 2001
***************
*** 3,9 ****
--- 3,17 ----
#ifndef __ERRNO_H_
#define __ERRNO_H_ 1

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
extern int errno;
+
+ #ifdef __cplusplus
+ }
+ #endif

#define EDOM 33
#define ERANGE 34
diff -rc3P avr-libc-20011029/include/interrupt.h avr-libc-20011029-patch-0.1/include/interrupt.h
*** avr-libc-20011029/include/interrupt.h Mon Feb 12 06:18:05 2001
--- avr-libc-20011029-patch-0.1/include/interrupt.h Wed Nov 7 17:40:30 2001
***************
*** 6,11 ****
--- 6,15 ----
#define sei() __asm__ __volatile__ ("sei" ::)
#define cli() __asm__ __volatile__ ("cli" ::)

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
extern inline void enable_external_int (unsigned char ints)
{
#ifdef EIMSK
***************
*** 23,27 ****
--- 27,35 ----
outp (ints, TIMSK);
#endif
}
+
+ #ifdef __cplusplus
+ }
+ #endif

#endif
diff -rc3P avr-libc-20011029/include/io-avr.h avr-libc-20011029-patch-0.1/include/io-avr.h
*** avr-libc-20011029/include/io-avr.h Sun Oct 29 04:19:35 2000
--- avr-libc-20011029-patch-0.1/include/io-avr.h Tue Nov 6 19:06:14 2001
***************
*** 22,27 ****
--- 22,29 ----
# include <ioat94k.h>
#elif defined (__AVR_ATmega103__)
# include <iom103.h>
+ #elif defined (__AVR_ATmega128__)
+ # include <iom128.h>
#elif defined (__AVR_ATmega603__)
# include <iom603.h>
#elif defined (__AVR_ATmega32__)
diff -rc3P avr-libc-20011029/include/io.h avr-libc-20011029-patch-0.1/include/io.h
*** avr-libc-20011029/include/io.h Sat Apr 1 23:07:05 2000
--- avr-libc-20011029-patch-0.1/include/io.h Wed Nov 7 17:37:23 2001
***************
*** 13,19 ****
--- 13,27 ----

#define outb outp

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
#include <io-avr.h>
#include <iomacros.h>
+
+ #ifdef __cplusplus
+ }
+ #endif

#endif /* _IO_H_ */
diff -rc3P avr-libc-20011029/include/iom128.h avr-libc-20011029-patch-0.1/include/iom128.h
*** avr-libc-20011029/include/iom128.h Thu Jan 1 10:00:00 1970
--- avr-libc-20011029-patch-0.1/include/iom128.h Wed Nov 7 13:00:29 2001
***************
*** 0 ****
--- 1,739 ----
+ /*
+ * iom128.h
+ */
+
+ #ifndef __IOM128
+ #define __IOM128 1
+
+ #define AVR_MEGA 1
+ #define AVR_ENHANCED 1
+
+ /*
+ * Predefined SFR Addresses.
+ * NOTE: These addresses will be either DATA MEMORY or I/O MEMORY addresses,
+ * depending on how you define __SFR_OFFSET (0x0 for I/O, 0x20 for DATA).
+ * For accesses to memory locations 0x20 through to 0x5F, gcc subtracts
+ * 0x20 from the address supplied and uses an I/O instruction, rather than
+ * a data memory access instruction (I/O instructions can only address the
+ * first 64 I/O memory locations).
+ * By using the __SFR_OFFSET symbol defined as 0x20 in the header file, all
+ * special file registers (data memory addresses 0x00--0x1F), all I/O
+ * registers (data memory address 0x20--0x5F, I/O memory address 0x00--0x3F)
+ * and all extended I/O registers (data memory address 0x60--0xFF) can be
+ * used as is, without being wrapped in macros to adjust the address.
+ */
+ /* #define __SFR_OFFSET 0x0 */
+ #define __SFR_OFFSET 0x20
+
+ /* Input Pins, Port F */
+ #define PINF (0x0 + __SFR_OFFSET)
+
+ /* Input Pins, Port E */
+ #define PINE (0x1 + __SFR_OFFSET)
+
+ /* Data Direction Register, Port E */
+ #define DDRE (0x2 + __SFR_OFFSET)
+
+ /* Data Register, Port E */
+ #define PORTE (0x3 + __SFR_OFFSET)
+
+ /* ADC Low Byte */
+ #define ADCL (0x4 + __SFR_OFFSET)
+
+ /* ADC High Byte */
+ #define ADCH (0x5 + __SFR_OFFSET)
+
+ /* ADC Control and status register */
+ #define ADCSR (0x6 + __SFR_OFFSET)
+
+ /* ADC Multiplexer select */
+ #define ADMUX (0x7 + __SFR_OFFSET)
+
+ /* Analog Comparator Control and Status Register */
+ #define ACSR (0x8 + __SFR_OFFSET)
+
+ /* USART0 Baud Rate Register Low */
+ #define UBRR0L (0x9 + __SFR_OFFSET)
+
+ /* USART0 Control and Status Register B */
+ #define UCSR0B (0xA + __SFR_OFFSET)
+
+ /* USART0 Control and Status Register A */
+ #define UCSR0A (0xB + __SFR_OFFSET)
+
+ /* USART I/O Data Register */
+ #define UDR0 (0xC + __SFR_OFFSET)
+
+ /* SPI Control Register */
+ #define SPCR (0xD + __SFR_OFFSET)
+
+ /* SPI Status Register */
+ #define SPSR (0xE + __SFR_OFFSET)
+
+ /* SPI I/O Data Register */
+ #define SPDR (0xF + __SFR_OFFSET)
+
+ /* Input Pins, Port D */
+ #define PIND (0x10 + __SFR_OFFSET)
+
+ /* Data Direction Register, Port D */
+ #define DDRD (0x11 + __SFR_OFFSET)
+
+ /* Data Register, Port D */
+ #define PORTD (0x12 + __SFR_OFFSET)
+
+ /* Input Pins, Port C */
+ #define PINC (0x13 + __SFR_OFFSET)
+
+ /* Data Direction Register, Port C */
+ #define DDRC (0x14 + __SFR_OFFSET)
+
+ /* Data Register, Port C */
+ #define PORTC (0x15 + __SFR_OFFSET)
+
+ /* Input Pins, Port B */
+ #define PINB (0x16 + __SFR_OFFSET)
+
+ /* Data Direction Register, Port B */
+ #define DDRB (0x17 + __SFR_OFFSET)
+
+ /* Data Register, Port B */
+ #define PORTB (0x18 + __SFR_OFFSET)
+
+ /* Input Pins, Port A */
+ #define PINA (0x19 + __SFR_OFFSET)
+
+ /* Data Direction Register, Port A */
+ #define DDRA (0x1A + __SFR_OFFSET)
+
+ /* Data Register, Port A */
+ #define PORTA (0x1B + __SFR_OFFSET)
+
+ /* EEPROM Control Register */
+ #define EECR (0x1C + __SFR_OFFSET)
+
+ /* EEPROM Data Register */
+ #define EEDR (0x1D + __SFR_OFFSET)
+
+ /* EEPROM Address Register Low */
+ #define EEARL (0x1E + __SFR_OFFSET)
+
+ /* EEPROM Address Register High */
+ #define EEARH (0x1F + __SFR_OFFSET)
+
+ /* Special Function I/O Register */
+ #define SFIOR (0x20 + __SFR_OFFSET)
+
+ /* Watchdog Timer Control Register */
+ #define WDTCR (0x21 + __SFR_OFFSET)
+
+ /* On-chip Debug Register */
+ #define OCDR (0x22 + __SFR_OFFSET)
+
+ /* Timer2 Output Compare Register */
+ #define OCR2 (0x23 + __SFR_OFFSET)
+
+ /* Timer/Counter 2 */
+ #define TCNT2 (0x24 + __SFR_OFFSET)
+
+ /* Timer/Counter 2 Control register */
+ #define TCCR2 (0x25 + __SFR_OFFSET)
+
+ /* T/C 1 Input Capture Register Low */
+ #define ICR1L (0x26 + __SFR_OFFSET)
+
+ /* T/C 1 Input Capture Register High */
+ #define ICR1H (0x27 + __SFR_OFFSET)
+
+ /* Timer/Counter1 Output Compare Register B Low */
+ #define OCR1BL (0x28 + __SFR_OFFSET)
+
+ /* Timer/Counter1 Output Compare Register B High */
+ #define OCR1BH (0x29 + __SFR_OFFSET)
+
+ /* Timer/Counter1 Output Compare Register A Low */
+ #define OCR1AL (0x2A + __SFR_OFFSET)
+
+ /* Timer/Counter1 Output Compare Register A High */
+ #define OCR1AH (0x2B + __SFR_OFFSET)
+
+ /* Timer/Counter 1 Low */
+ #define TCNT1L (0x2C + __SFR_OFFSET)
+
+ /* Timer/Counter 1 High */
+ #define TCNT1H (0x2D + __SFR_OFFSET)
+
+ /* Timer/Counter 1 Control and Status Register */
+ #define TCCR1B (0x2E + __SFR_OFFSET)
+
+ /* Timer/Counter 1 Control Register */
+ #define TCCR1A (0x2F + __SFR_OFFSET)
+
+ /* Timer/Counter 0 Asynchronous Control & Status Register */
+ #define ASSR (0x30 + __SFR_OFFSET)
+
+ /* Output Compare Register 0 */
+ #define OCR0 (0x31 + __SFR_OFFSET)
+
+ /* Timer/Counter 0 */
+ #define TCNT0 (0x32 + __SFR_OFFSET)
+
+ /* Timer/Counter 0 Control Register */
+ #define TCCR0 (0x33 + __SFR_OFFSET)
+
+ /* MCU Status Register */
+ #define MCUSR (0x34 + __SFR_OFFSET)
+
+ /* MCU general Control Register */
+ #define MCUCR (0x35 + __SFR_OFFSET)
+
+ /* Timer/Counter Interrupt Flag Register */
+ #define TIFR (0x36 + __SFR_OFFSET)
+
+ /* Timer/Counter Interrupt MaSK register */
+ #define TIMSK (0x37 + __SFR_OFFSET)
+
+ /* External Interrupt Flag Register */
+ #define EIFR (0x38 + __SFR_OFFSET)
+
+ /* External Interrupt MaSK register */
+ #define EIMSK (0x39 + __SFR_OFFSET)
+
+ /* External Interrupt Control Register B */
+ #define EICRB (0x3A + __SFR_OFFSET)
+
+ /* RAM Page Z select register */
+ #define RAMPZ (0x3B + __SFR_OFFSET)
+
+ /* XDIV Divide control register */
+ #define XDIV (0x3C + __SFR_OFFSET)
+
+ /* Stack Pointer Low */
+ #define SPL (0x3D + __SFR_OFFSET)
+
+ /* Stack Pointer High */
+ #define SPH (0x3E + __SFR_OFFSET)
+
+ /* Status REGister */
+ #define SREG (0x3F + __SFR_OFFSET)
+
+ /* Data Direction Register, Port F */
+ #define DDRF (0x61)
+
+ /* Data Register, Port F */
+ #define PORTF (0x62)
+
+ /* Input Pins, Port G */
+ #define PING (0x63)
+
+ /* Data Direction Register, Port G */
+ #define DDRG (0x64)
+
+ /* Data Register, Port G */
+ #define PORTG (0x65)
+
+ /* Store Program Memory Control Register */
+ #define SPMCR (0x68)
+
+ /* External Interrupt Control Register A */
+ #define EICRA (0x6A)
+
+ /* External Memory Control Register B */
+ #define XMCRB (0x6C)
+
+ /* External Memory Control Register A */
+ #define XMCRA (0x6D)
+
+ /* Oscillator Calibration Register */
+ #define OSCCAL (0x6F)
+
+ /* 2-wire Serial Interface Bit Rate Register */
+ #define TWBR (0x70)
+
+ /* 2-wire Serial Interface Status Register */
+ #define TWSR (0x71)
+
+ /* 2-wire Serial Interface Address Register */
+ #define TWAR (0x72)
+
+ /* 2-wire Serial Interface Data Register */
+ #define TWDR (0x73)
+
+ /* 2-wire Serial Interface Control Register */
+ #define TWCR (0x74)
+
+ /* Time Counter 1 Output Compare Register C Low */
+ #define OCR1CL (0x78)
+
+ /* Time Counter 1 Output Compare Register C High */
+ #define OCR1CH (0x79)
+
+ /* Timer/Counter 1 Control Register C */
+ #define TCCR1C (0x7A)
+
+ /* Extended Timer Interrupt Flag Register */
+ #define ETIFR (0x7C)
+
+ /* Extended Timer Interrupt Mask Register */
+ #define ETIMSK (0x7D)
+
+ /* Timer/Counter 3 Input Capture Register Low */
+ #define ICR3L (0x80)
+
+ /* Timer/Counter 3 Input Capture Register High */
+ #define ICR3H (0x81)
+
+ /* Timer/Counter 3 Output Compare Register C Low */
+ #define OCR3CL (0x82)
+
+ /* Timer/Counter 3 Output Compare Register C High */
+ #define OCR3CH (0x83)
+
+ /* Timer/Counter 3 Output Compare Register B Low */
+ #define OCR3BL (0x84)
+
+ /* Timer/Counter 3 Output Compare Register B High */
+ #define OCR3BH (0x85)
+
+ /* Timer/Counter 3 Output Compare Register A Low */
+ #define OCR3AL (0x86)
+
+ /* Timer/Counter 3 Output Compare Register A High */
+ #define OCR3AH (0x87)
+
+ /* Timer/Counter 3 Counter Register High */
+ #define TCNT3L (0x88)
+
+ /* Timer/Counter 3 Counter Register High */
+ #define TCNT3H (0x89)
+
+ /* Timer/Counter 3 Control Register B */
+ #define TCCR3B (0x8A)
+
+ /* Timer/Counter 3 Control Register A */
+ #define TCCR3A (0x8B)
+
+ /* Timer/Counter 3 Control Register C */
+ #define TCCR3C (0x8C)
+
+ /* USART0 Baud Rate Register High */
+ #define UBRR0H (0x90)
+
+ /* USART0 Control and Status Register C */
+ #define UCSR0C (0x95)
+
+ /* USART1 Baud Rate Register High */
+ #define UBRR1H (0x98)
+
+ /* USART1 Baud Rate Register Low*/
+ #define UBRR1L (0x99)
+
+ /* USART1 Control and Status Register B */
+ #define UCSR1B (0x9A)
+
+ /* USART1 Control and Status Register A */
+ #define UCSR1A (0x9B)
+
+ /* USART1 I/O Data Register */
+ #define UDR1 (0x9C)
+
+ /*
+ * Interrupt Vector Definitions
+ */
+
+ /* NB! vectors are specified as byte addresses */
+
+ #define RESET_vect (0x00)
+ #define INT0_vect (0x04)
+ #define INT1_vect (0x08)
+ #define INT2_vect (0x0C)
+ #define INT3_vect (0x10)
+ #define INT4_vect (0x14)
+ #define INT5_vect (0x18)
+ #define INT6_vect (0x1C)
+ #define INT7_vect (0x20)
+ #define TIMER2_COMP_vect (0x24)
+ #define TIMER2_OVF_vect (0x28)
+ #define TIMER1_CAPT_vect (0x2C)
+ #define TIMER1_COMPA_vect (0x30)
+ #define TIMER1_COMPB_vect (0x34)
+ #define TIMER1_OVF_vect (0x38)
+ #define TIMER0_COMP_vect (0x3C)
+ #define TIMER0_OVF_vect (0x40)
+ #define SPI_STC_vect (0x44)
+ #define UART0_RX_vect (0x48)
+ #define UART0_UDRE_vect (0x4C)
+ #define UART0_TX_vect (0x50)
+ #define ADC_vect (0x54)
+ #define EE_RDY_vect (0x58)
+ #define ANA_COMP_vect (0x5C)
+ #define TIMER1_COMPC_vect (0x60)
+ #define TIMER3_CAPT_vect (0x64)
+ #define TIMER3_COMPA_vect (0x68)
+ #define TIMER3_COMPB_vect (0x6C)
+ #define TIMER3_COMPC_vect (0x70)
+ #define TIMER3_OVF_vect (0x74)
+ #define UART1_RX_vect (0x78)
+ #define UART1_UDRE_vect (0x7C)
+ #define UART1_TX_vect (0x80)
+ #define TWI_INT_vect (0x84)
+ #define SPM_READY_vect (0x88)
+
+ #define INT_VECT_SIZE (0x8C)
+
+ /*
+ The Register Bit names are represented by their bit number (0-7).
+ */
+
+ /* 2-wire Control Register */
+ #define TWINT 7
+ #define TWEA 6
+ #define TWSTA 5
+ #define TWSTO 4
+ #define TWWC 3
+ #define TWEN 2
+ #define TWIE 0
+
+ /* 2-wire Address Register */
+ #define TWA6 7
+ #define TWA5 6
+ #define TWA4 5
+ #define TWA3 4
+ #define TWA2 3
+ #define TWA1 2
+ #define TWA0 1
+ #define TWGCE 0
+
+ /* 2-wire Status Register */
+ #define TWS7 7
+ #define TWS6 6
+ #define TWS5 5
+ #define TWS4 4
+ #define TWS3 3
+ #define TWPS1 1
+ #define TWPS0 0
+
+ /* External Memory Control Register A */
+ #define SRL2 6
+ #define SRL1 5
+ #define SRL0 4
+ #define SRW01 3
+ #define SRW00 2
+ #define SRW11 1
+
+ /* External Memory Control Register B */
+ #define XMBK 7
+ #define XMM2 2
+ #define XMM1 1
+ #define XMM0 0
+
+ /* XDIV Divide control register*/
+ #define XDIVEN 7
+ #define XDIV6 6
+ #define XDIV5 5
+ #define XDIV4 4
+ #define XDIV3 3
+ #define XDIV2 2
+ #define XDIV1 1
+ #define XDIV0 0
+
+ /* RAM Page Z select register */
+ #define RAMPZ0 0
+
+ /* External Interrupt Control Register A */
+ #define ISC31 7
+ #define ISC30 6
+ #define ISC21 5
+ #define ISC20 4
+ #define ISC11 3
+ #define ISC10 2
+ #define ISC01 1
+ #define ISC00 0
+
+ /* External Interrupt Control Register B */
+ #define ISC71 7
+ #define ISC70 6
+ #define ISC61 5
+ #define ISC60 4
+ #define ISC51 3
+ #define ISC50 2
+ #define ISC41 1
+ #define ISC40 0
+
+ /* Store Program Memory Control Register */
+ #define SPMIE 7
+ #define RWWSB 6
+ #define RWWSRE 4
+ #define BLBSET 3
+ #define PGWRT 2
+ #define PGERS 1
+ #define SPMEN 0
+
+ /* External Interrupt MaSK register */
+ #define INT7 7
+ #define INT6 6
+ #define INT5 5
+ #define INT4 4
+ #define INT3 3
+ #define INT2 2
+ #define INT1 1
+ #define INT0 0
+
+ /* External Interrupt Flag Register */
+ #define INTF7 7
+ #define INTF6 6
+ #define INTF5 5
+ #define INTF4 4
+
+ /* Timer/Counter Interrupt MaSK register */
+ #define OCIE2 7
+ #define TOIE2 6
+ #define TICIE1 5
+ #define OCIE1A 4
+ #define OCIE1B 3
+ #define TOIE1 2
+ #define OCIE0 1
+ #define TOIE0 0
+
+ /* Timer/Counter Interrupt Flag Register */
+ #define OCF2 7
+ #define TOV2 6
+ #define ICF1 5
+ #define OCF1A 4
+ #define OCF1B 3
+ #define TOV1 2
+ #define OCF0 1
+ #define TOV0 0
+
+ /* Extended Timer Interrupt MaSK register */
+ #define TICIE3 5
+ #define OCIE3A 4
+ #define OCIE3B 3
+ #define TOIE3 2
+ #define OCIE3C 1
+ #define OCIE1C 0
+
+ /* Extended Timer Interrupt Flag Register */
+ #define ICF3 5
+ #define OCF3A 4
+ #define OCF3B 3
+ #define TOV3 2
+ #define OCF3C 1
+ #define OCF1C 0
+
+ /* MCU general Control Register */
+ #define SRE 7
+ #define SRW 6
+ #define SE 5
+ #define SM1 4
+ #define SM0 3
+ #define SM2 2
+ #define IVSEL 1
+ #define IVCE 0
+
+ /* MCU Status Register */
+ #define JTD 7
+ #define JTRF 4
+ #define WDRF 3
+ #define BORF 2
+ #define EXTRF 1
+ #define PORF 0
+
+ /* Timer/Counter Control Register */
+ #define FOC 7
+ #define WGM0 6
+ #define COM1 5
+ #define COM0 4
+ #define WGM1 3
+ #define CS2 2
+ #define CS1 1
+ #define CS0 0
+
+ /* Timer/Counter 0 Asynchronous Control & Status Register */
+ #define AS0 3
+ #define TCN0UB 2
+ #define OCR0UB 1
+ #define TCR0UB 0
+
+ /* Timer/Counter Control Register A */
+ #define COMA1 7
+ #define COMA0 6
+ #define COMB1 5
+ #define COMB0 4
+ #define COMC1 3
+ #define COMC0 2
+ #define WGMA1 1
+ #define WGMA0 0
+
+ /* Timer/Counter Control and Status Register B */
+ #define ICNC 7
+ #define ICES 6
+ #define WGMB3 4
+ #define WGMB2 3
+ #define CSB2 2
+ #define CSB1 1
+ #define CSB0 0
+
+ /* Timer/Counter Control Register C */
+ #define FOCA 7
+ #define FOCB 6
+ #define FOCC 5
+
+ /* On-chip Debug Register */
+ #define OCDR7 7
+ #define OCDR6 6
+ #define OCDR5 5
+ #define OCDR4 4
+ #define OCDR3 3
+ #define OCDR2 2
+ #define OCDR1 1
+ #define OCDR0 0
+
+ /* Watchdog Timer Control Register */
+ #define WDCE 4
+ #define WDE 3
+ #define WDP2 2
+ #define WDP1 1
+ #define WDP0 0
+
+ /* Special Function I/O Register */
+ #define TSM 7
+ #define ADHSM 4
+ #define ACME 3
+ #define PUD 2
+ #define PSR0 1
+ #define PSR321 0
+
+ /* EEPROM Control Register */
+ #define EERIE 3
+ #define EEMWE 2
+ #define EEWE 1
+ #define EERE 0
+
+ /* Port Data Register */
+ #define PORT7 7
+ #define PORT6 6
+ #define PORT5 5
+ #define PORT4 4
+ #define PORT3 3
+ #define PORT2 2
+ #define PORT1 1
+ #define PORT0 0
+
+ /* Port Data Direction Register */
+ #define DD7 7
+ #define DD6 6
+ #define DD5 5
+ #define DD4 4
+ #define DD3 3
+ #define DD2 2
+ #define DD1 1
+ #define DD0 0
+
+ /* Port Input Pins */
+ #define PIN7 7
+ #define PIN6 6
+ #define PIN5 5
+ #define PIN4 4
+ #define PIN3 3
+ #define PIN2 2
+ #define PIN1 1
+ #define PIN0 0
+
+ /* Status Register */
+ #define SREG_I 7
+ #define SREG_T 6
+ #define SREG_H 5
+ #define SREG_S 4
+ #define SREG_V 3
+ #define SREG_N 2
+ #define SREG_Z 1
+ #define SREG_C 0
+
+ /* SPI Status Register */
+ #define SPIF 7
+ #define WCOL 6
+ #define SPI2X 0
+
+ /* SPI Control Register */
+ #define SPIE 7
+ #define SPE 6
+ #define DORD 5
+ #define MSTR 4
+ #define CPOL 3
+ #define CPHA 2
+ #define SPR1 1
+ #define SPR0 0
+
+ /* USART Register C */
+ #define UMSEL 6
+ #define UPM1 5
+ #define UPM0 4
+ #define USBS 3
+ #define UCSZ1 2
+ #define UCSZ0 1
+ #define UCPOL 0
+
+ /* USART Status Register A */
+ #define RXC 7
+ #define TXC 6
+ #define UDRE 5
+ #define FE 4
+ #define OVR 3 /* This definition differs from the databook */
+ /*definition to avoid problems with the OR instruction */
+
+ /* USART Control Register */
+ #define RXCIE 7
+ #define TXCIE 6
+ #define UDRIE 5
+ #define RXEN 4
+ #define TXEN 3
+ #define UCSZ 2
+ #define RXB8 1
+ #define TXB8 0
+
+ /* Analog Comparator Control and Status Register */
+ #define ACD 7
+ #define ACBG 6
+ #define ACO 5
+ #define ACI 4
+ #define ACIE 3
+ #define ACIC 2
+ #define ACIS1 1
+ #define ACIS0 0
+
+ /* ADC Control and status register */
+ #define ADEN 7
+ #define ADSC 6
+ #define ADFR 5
+ #define ADIF 4
+ #define ADIE 3
+ #define ADPS2 2
+ #define ADPS1 1
+ #define ADPS0 0
+
+ /* ADC Multiplexer select */
+ #define REFS1 7
+ #define REFS0 6
+ #define ADLAR 5
+ #define MUX4 4
+ #define MUX3 3
+ #define MUX2 2
+ #define MUX1 1
+ #define MUX0 0
+
+ /* Pointer definition */
+ #define XL r26
+ #define XH r27
+ #define YL r28
+ #define YH r29
+ #define ZL r30
+ #define ZH r31
+
+ /* Constants */
+ #define RAMEND 0x0FFF /*Last On-Chip SRAM Location*/
+ #define XRAMEND 0xFFFF
+ #define E2END 0x0FFF
+ #define FLASHEND 0xFFFF
+
+ #endif /* __IOM128 */
diff -rc3P avr-libc-20011029/include/math.h avr-libc-20011029-patch-0.1/include/math.h
*** avr-libc-20011029/include/math.h Mon Aug 20 23:24:30 2001
--- avr-libc-20011029-patch-0.1/include/math.h Wed Nov 7 17:37:59 2001
***************
*** 19,24 ****
--- 19,28 ----
#define __ATTR_CONST__ __attribute__((__const__))
#endif

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
extern double cos(double) __ATTR_CONST__;
extern double fabs(double) __ATTR_CONST__;
#if 0
***************
*** 55,60 ****
--- 59,68 ----
/* non-standard functions */
extern double square(double) __ATTR_CONST__;
extern double inverse(double) __ATTR_CONST__;
+
+ #ifdef __cplusplus
+ }
+ #endif

#endif /* _MATH_H */

diff -rc3P avr-libc-20011029/include/pgmspace.h avr-libc-20011029-patch-0.1/include/pgmspace.h
*** avr-libc-20011029/include/pgmspace.h Sun Jul 1 23:52:36 2001
--- avr-libc-20011029-patch-0.1/include/pgmspace.h Wed Nov 7 17:39:46 2001
***************
*** 44,49 ****
--- 44,53 ----

#define PROGMEM __ATTR_PROGMEM__

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
typedef void prog_void PROGMEM;
typedef char prog_char PROGMEM;
typedef unsigned char prog_uchar PROGMEM;
***************
*** 108,113 ****
--- 112,121 ----
extern int sprintf_P(char *, PGM_P, ...);
extern int sscanf_P(const char *, PGM_P, ...);
extern PGM_P strerror_P(int);
+ #endif
+
+ #ifdef __cplusplus
+ }
#endif

#endif /* __PGMSPACE_H_ */
diff -rc3P avr-libc-20011029/include/stdlib.h avr-libc-20011029-patch-0.1/include/stdlib.h
*** avr-libc-20011029/include/stdlib.h Sun Jul 8 04:51:27 2001
--- avr-libc-20011029-patch-0.1/include/stdlib.h Wed Nov 7 17:36:18 2001
***************
*** 10,15 ****
--- 10,19 ----
#define __ptr_t void *
#endif

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
typedef struct {
int quot;
int rem;
***************
*** 110,115 ****
--- 114,123 ----
extern int rand(void);
extern void *realloc(void *, size_t);
extern void srand(unsigned int);
+ #endif
+
+ #ifdef __cplusplus
+ }
#endif

#endif /* _STDLIB_H_ */
diff -rc3P avr-libc-20011029/include/string-avr.h avr-libc-20011029-patch-0.1/include/string-avr.h
*** avr-libc-20011029/include/string-avr.h Sat Apr 1 23:07:05 2000
--- avr-libc-20011029-patch-0.1/include/string-avr.h Wed Nov 7 17:45:51 2001
***************
*** 36,41 ****
--- 36,45 ----
#define __const const
#define __string_h_int__ char

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
/* Copy N bytes of SRC to DEST. */
extern inline __ptr_t memcpy(__ptr_t __to, const void *__from, size_t __n)
{
***************
*** 360,365 ****
--- 364,373 ----
__const char *__end = (__const char *) memchr (__string, '\0', __maxlen);
return __end ? __end - __string : __maxlen;
}
+
+ #ifdef __cplusplus
+ }
+ #endif

#endif /* string-avr.h */

diff -rc3P avr-libc-20011029/include/string.h avr-libc-20011029-patch-0.1/include/string.h
*** avr-libc-20011029/include/string.h Sun Jul 1 23:18:11 2001
--- avr-libc-20011029-patch-0.1/include/string.h Wed Nov 7 17:35:44 2001
***************
*** 26,31 ****
--- 26,35 ----
#define __ATTR_PURE__ __attribute__((__pure__))
#endif

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
extern void *memccpy(void *, const void *, int, size_t);
extern void *memchr(const void *, int, size_t) __ATTR_PURE__;
extern int memcmp(const void *, const void *, size_t) __ATTR_PURE__;
***************
*** 48,53 ****
--- 52,61 ----
extern char *strrev(char *);
extern char *strstr(const char *, const char *) __ATTR_PURE__;
extern char *strupr(char *);
+
+ #ifdef __cplusplus
+ }
+ #endif

#endif /* _STRING_H_ */

diff -rc3P avr-libc-20011029/include/timer.h avr-libc-20011029-patch-0.1/include/timer.h
*** avr-libc-20011029/include/timer.h Sat Apr 1 23:07:05 2000
--- avr-libc-20011029-patch-0.1/include/timer.h Wed Nov 7 17:44:33 2001
***************
*** 3,8 ****
--- 3,12 ----

#include <io.h>

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
enum {
STOP = 0,
CK = 1,
***************
*** 28,32 ****
--- 32,40 ----
{
outb (0x1, TCNT0);
}
+
+ #ifdef __cplusplus
+ }
+ #endif

#endif /* _TIMER_H_ */
diff -rc3P avr-libc-20011029/src/Makefile avr-libc-20011029-patch-0.1/src/Makefile
*** avr-libc-20011029/src/Makefile Tue Oct 30 02:11:25 2001
--- avr-libc-20011029-patch-0.1/src/Makefile Tue Nov 6 18:09:12 2001
***************
*** 92,98 ****

crt_avr4_mega = crtm83.o # crtm85.o

! crt_avr5_mega = crtm161.o crtm163.o crtm32.o

crt_avr5_other = crtat94k.o

--- 92,98 ----

crt_avr4_mega = crtm83.o # crtm85.o

! crt_avr5_mega = crtm161.o crtm163.o crtm32.o crtm128.o

crt_avr5_other = crtat94k.o

diff -rc3P avr-libc-20011029/src/gcrt1.S avr-libc-20011029-patch-0.1/src/gcrt1.S
*** avr-libc-20011029/src/gcrt1.S Sun Oct 29 05:43:32 2000
--- avr-libc-20011029-patch-0.1/src/gcrt1.S Wed Nov 7 12:59:15 2001
***************
*** 178,197 ****
#ifdef UART_RX_vect
VEC _uart_recv_, UART_RX_vect
#endif
! #ifdef UART1_RX_vect
! VEC _uart1_recv_, UART1_RX_vect
#endif
#ifdef UART_UDRE_vect
VEC _uart_data_, UART_UDRE_vect
#endif
! #ifdef UART1_UDRE_vect
VEC _uart1_data_, UART1_UDRE_vect
#endif
#ifdef UART_TX_vect
VEC _uart_trans_, UART_TX_vect
#endif
! #ifdef UART1_TX_vect
VEC _uart1_trans_, UART1_TX_vect
#endif
#ifdef ADC_vect
VEC _adc_, ADC_vect
--- 178,215 ----
#ifdef UART_RX_vect
VEC _uart_recv_, UART_RX_vect
#endif
! #if defined (__AVR_ATmega128__)
! #ifdef UART0_RX_vect
! VEC _uart0_recv_, UART0_RX_vect
! #endif
! #else
! #ifdef UART1_RX_vect
! VEC _uart1_recv_, UART1_RX_vect
! #endif
#endif
#ifdef UART_UDRE_vect
VEC _uart_data_, UART_UDRE_vect
#endif
! #if defined (__AVR_ATmega128__)
! #ifdef UART0_UDRE_vect
! VEC _uart0_data_, UART0_UDRE_vect
! #endif
! #else
! #ifdef UART1_UDRE_vect
VEC _uart1_data_, UART1_UDRE_vect
+ #endif
#endif
#ifdef UART_TX_vect
VEC _uart_trans_, UART_TX_vect
#endif
! #if defined (__AVR_ATmega128__)
! #ifdef UART0_TX_vect
! VEC _uart0_trans_, UART0_TX_vect
! #endif
! #else
! #ifdef UART1_TX_vect
VEC _uart1_trans_, UART1_TX_vect
+ #endif
#endif
#ifdef ADC_vect
VEC _adc_, ADC_vect
***************
*** 202,210 ****
--- 220,262 ----
#ifdef ANA_COMP_vect
VEC _comparator_, ANA_COMP_vect
#endif
+ #if defined (__AVR_ATmega128__)
+ #ifdef TIMER1_COMPC_vect
+ VEC _output_compare1c_, TIMER1_COMPC_vect
+ #endif
+ #ifdef TIMER3_CAPT_vect
+ VEC _input_capture3_, TIMER3_CAPT_vect
+ #endif
+ #ifdef TIMER3_COMPA_vect
+ VEC _output_compare3a_, TIMER3_COMPA_vect
+ #endif
+ #ifdef TIMER3_COMPB_vect
+ VEC _output_compare3b_, TIMER3_COMPB_vect
+ #endif
+ #ifdef TIMER3_COMPC_vect
+ VEC _output_compare3c_, TIMER3_COMPC_vect
+ #endif
+ #ifdef TIMER3_OVF_vect
+ VEC _overflow3_, TIMER3_OVF_vect
+ #endif
+ #ifdef UART1_RX_vect
+ VEC _uart1_recv_, UART1_RX_vect
+ #endif
+ #ifdef UART1_UDRE_vect
+ VEC _uart1_data_, UART1_UDRE_vect
+ #endif
+ #ifdef UART1_TX_vect
+ VEC _uart1_trans_, UART1_TX_vect
+ #endif
+ #endif
#ifdef TWI_INT_vect
VEC _twi_, TWI_INT_vect
#endif
+ #if defined (__AVR_ATmega128__)
+ #ifdef SPM_READY_vect
+ VEC _spm_ready_, SPM_READY_vect
+ #endif
+ #endif
#endif /* most other devices (not AT94K, not ATtiny15) */

/* extra check */
***************
*** 222,244 ****
#define r_tmp1 r18
#define r_tmp2 r19

.global _U(_real_init_)
_U(_real_init_):
_U(_init_):
clr __zero_reg__
! out SREG, __zero_reg__
#ifdef WDTCR
ldi r_tmp1, lo8(__init_wdtcr__)
wdr
! out WDTCR, r_tmp1
#endif
#ifdef MCUCR
ldi r_tmp1, lo8(__init_mcucr__)
! out MCUCR, r_tmp1
#endif
#ifdef EMCUCR
ldi r_tmp1, lo8(__init_emcucr__)
! out EMCUCR, r_tmp1
#endif
; XXX should we also read, save and clear MCUSR (if present) here?
; (datasheets suggest to do it as soon as possible after reset)
--- 274,305 ----
#define r_tmp1 r18
#define r_tmp2 r19

+ /*
+ * I/O instructions below (out) require an address < 0x40.
+ * If an SFR offset is being used, the register address needs to be
+ * scaled back from its DATA memory address to its I/O memory address.
+ */
+ #ifndef __SFR_OFFSET
+ #define __SFR_OFFSET 0
+ #endif /* !__SFR_OFFSET */
+
.global _U(_real_init_)
_U(_real_init_):
_U(_init_):
clr __zero_reg__
! out (SREG - __SFR_OFFSET), __zero_reg__
#ifdef WDTCR
ldi r_tmp1, lo8(__init_wdtcr__)
wdr
! out (WDTCR - __SFR_OFFSET), r_tmp1
#endif
#ifdef MCUCR
ldi r_tmp1, lo8(__init_mcucr__)
! out (MCUCR - __SFR_OFFSET), r_tmp1
#endif
#ifdef EMCUCR
ldi r_tmp1, lo8(__init_emcucr__)
! out (EMCUCR - __SFR_OFFSET), r_tmp1
#endif
; XXX should we also read, save and clear MCUSR (if present) here?
; (datasheets suggest to do it as soon as possible after reset)
***************
*** 294,297 ****

.endfunc
#endif /* if !defined (__AVR_ASM_ONLY__) */
-
--- 355,357 ----

--------------060607010005020805070804--

From [email-masked] Fri Nov 09 21:54:00 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1627QE-0005y2-00
for <[email-masked]>; Fri, 09 Nov 2001 21:53:59 +1300
Received: from otris.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id JAA08532
for <[email-masked]>; Fri, 9 Nov 2001 09:56:03 +0100
Message-ID: <[email-masked]>
Date: Fri, 09 Nov 2001 10:02:45 +0100
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] New linux binaries available
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I built some new binaries for linux from the actual releases.
They are not yet in my download page, please use the following links:

All as RPM
www.combio.de/avr/avr-devtools-1.0-1.i386.rpm

All as tarball
www.combio.de/avr/avr-devtools-3.0.2-2.11.2-20011029.tar.gz

GCC (unstripped)
http://www.combio.de/avr/gcc-3.0.2-avr-linuxbin.tar.gz

Binutils (unstripped)
http://www.combio.de/avr/binutils-2.11.2-avr-linuxbin.tar.gz

LIBC (without sources)
avr-libc-20011029-linuxbin.tar.gz

Regards

Gunnar Henne

From [email-masked] Fri Nov 09 22:22:38 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1627rx-0005zU-00
for <[email-masked]>; Fri, 09 Nov 2001 22:22:37 +1300
Received: (from j@localhost)
by ida.interface-business.de id fA99OkO00281;
Fri, 9 Nov 2001 10:24:46 +0100 (MET)
Date: Fri, 9 Nov 2001 10:24:46 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <01110217281801.01391@raum513>
<[email-masked]>
<[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] UART again
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Rich Neswold <[email-masked]> wrote:

>> Ask Rich Neswold for a copy of his code. The code looks good, although i
>> haven't been successful in using it so far

> Yow! That's not very good publicity... :-)

Oh, sorry for the private reply, i didn't notice it went to the list
as well.

Well, looks like either my part is broken or i'm too stupid to send
anything out to the UART in my test circuit. My demo.c run, but even
if i modify that, the UART stops working.

I'm quite confident that your code is good. ;-)

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Fri Nov 09 22:27:58 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1627x7-000603-00
for <[email-masked]>; Fri, 09 Nov 2001 22:27:57 +1300
Received: (from j@localhost)
by ida.interface-business.de id fA99U8K00306;
Fri, 9 Nov 2001 10:30:08 +0100 (MET)
Date: Fri, 9 Nov 2001 10:30:08 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] Re: avr-gcc-list digest, Vol 1 #222 - 4 msgs
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Patrick Lanphier <[email-masked]> wrote:

> unsigned int led;

Must be:

volatile unsigned int led;

Btw., since ports are 8 bits wide,

volatile unsigned char led;

would save you one byte of RAM.

(gcc 3 + optimization is much more picky about forgotten "volatile"
qualifiers than gcc 2 has been.)

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Fri Nov 09 22:41:57 2001
Received: from mx0.gmx.de ([213.165.64.100] helo=mx0.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 1628Ad-00063F-00
for <[email-masked]>; Fri, 09 Nov 2001 22:41:56 +1300
Received: (qmail 10845 invoked by uid 0); 9 Nov 2001 09:43:30 -0000
Date: Fri, 9 Nov 2001 10:43:30 +0100 (MET)
From: Victor Sluiter <[email-masked]>
To: [email-masked]
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-Authenticated-Sender: [email-masked]
X-Authenticated-IP: [212.136.198.145]
Message-ID: <[email-masked]>
X-Mailer: WWW-Mail 1.5 (Global Message Exchange)
X-Flags: 0001
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Cygwin & Ava
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

After hearing from Cygwin, I installed it on my PC. It works fine! Now I'd
like to install avr-gcc and ava. I downloaded the src for ava, and unpacked
it. Now hen I type 'make', the following happens:

vs@IP /ava-0.3b/src
$ make
gcc -o ava -DAVA_LIB="\"../../usr/lib/uTools/ava\"" -Wall -fenum-int-equiv
-O Ma
in.o Preproc.o Lexer.o Syntax.o Symbol.o Segment.o Keywords.o Reports.o
Object.o
Avr.o
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld:
cann
ot find -luser32
collect2: ld returned 1 exit status
make: *** [ava] Error 1

I'm a newbie on Linux and Unix (as you might have guessed), so maybe I'm
missing a package, or unpacked in the wrong dir? I changed the dirs in the
makefile to
# Directory Setup
AVA_BIN = ../../usr/local/bin
AVA_LIB = ../../usr/local/lib/uTools/ava

and the compiler settings to
# GNU C++ compiler
CPPFLAGS= -DAVA_LIB="\"$(AVA_LIB)\"" -Wall \
-fenum-int-equiv -O

I'm using GCC 2.95.3-5.
Does someone know what I'm doing wrong, or maybe know a tutorial on the web?
Any help would be welcome!
Thanks in advance, Victor

--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

From [email-masked] Sat Nov 10 01:42:53 2001
Received: from dav61.law15.hotmail.com ([64.4.22.196] helo=hotmail.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 162Azl-0006HI-00
for <[email-masked]>; Sat, 10 Nov 2001 01:42:53 +1300
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
Fri, 9 Nov 2001 04:44:35 -0800
X-Originating-IP: [213.123.25.121]
From: "Leon Heller" <[email-masked]>
To: <[email-masked]>
Date: Fri, 9 Nov 2001 12:41:23 -0000
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <[email-masked]>
X-OriginalArrivalTime: 09 Nov 2001 12:44:35.0416 (UTC) FILETIME=[4960B580:01C1691C]
Subject: [avr-gcc-list] AVR Studio doesn't like avr-gcc .obj files
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Whilst avr-gcc works fine otherwise, AVR Studio 3.52 gives error messages
when I try to load an object file:

One or more source files cannot be found
Error in Nordic object file

I've downloaded ElfCoff.zip, will that help?

Leon

Leon Heller, G1HSM [email-masked]
http://www.geocities.com/leon_heller
Low-cost Altera Flex design kit: http://www.leonheller.com

From [email-masked] Sat Nov 10 02:56:57 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 162C9Q-0006M2-00
for <[email-masked]>; Sat, 10 Nov 2001 02:56:56 +1300
Received: from otris.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id OAA07261
for <[email-masked]>; Fri, 9 Nov 2001 14:59:07 +0100
Message-ID: <[email-masked]>
Date: Fri, 09 Nov 2001 15:05:50 +0100
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Re: AVR Studio doesn't like avr-gcc .obj files
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Leon,

Leon Heller schrieb:
> Whilst avr-gcc works fine otherwise, AVR Studio 3.52 gives error messages
> when I try to load an object file:
>
> One or more source files cannot be found
> Error in Nordic object file

AStudio is very picky about the path-infos in object files. You cant use
object files generated under Linux. Under windows you have to recompile
the avr-libc and leave the sources in the place, where they are at
compile time. If you have downloaded the binaries from www.combio.de/avr
and followed the instructions it should work.

Greetings

Gunnar

From [email-masked] Sat Nov 10 05:23:41 2001
Received: from mout04.kundenserver.de ([195.20.224.89])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 162ERQ-0006WE-00
for <[email-masked]>; Sat, 10 Nov 2001 05:23:40 +1300
Received: from [172.19.20.60] (helo=mrelayng0.kundenserver.de)
by mout04.kundenserver.de with esmtp (Exim 2.12 #2)
id 162ETX-0002vO-00
for [email-masked]; Fri, 9 Nov 2001 17:25:51 +0100
Received: from b000d.pppool.de ([213.7.0.13] helo=sar-nabu.net)
by mrelayng0.kundenserver.de with asmtp (Exim 3.22 #2)
id 162ETW-0004a5-00; Fri, 09 Nov 2001 17:25:50 +0100
Message-ID: <[email-masked]>
Date: Fri, 09 Nov 2001 17:25:17 +0100
From: Corax <[email-masked]>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011012
X-Accept-Language: en, de-de, de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] New linux binaries available
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Thank you!
Installing a simple package is no problem, but collecting all resources
for gcc and installing it in parallel with another gcc is beyond my
skill, if only /just/ beyond. So I had to use the Win software, but
since I do everything else under Linux, it was really cumbersome...
Now I even have a spare partition ;)
Conrad Braun

Gunnar Henne wrote:

> Hello,
>
> I built some new binaries for linux from the actual releases.
> They are not yet in my download page, please use the following links:
>
> All as RPM
> www.combio.de/avr/avr-devtools-1.0-1.i386.rpm
>
> All as tarball
> www.combio.de/avr/avr-devtools-3.0.2-2.11.2-20011029.tar.gz
>
> GCC (unstripped)
> http://www.combio.de/avr/gcc-3.0.2-avr-linuxbin.tar.gz
>
> Binutils (unstripped)
> http://www.combio.de/avr/binutils-2.11.2-avr-linuxbin.tar.gz
>
> LIBC (without sources)
> avr-libc-20011029-linuxbin.tar.gz
>
> Regards
>
> Gunnar Henne
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
>

--
[email-masked]
http://www.sar-nabu.net/
Hardware - Software - Brainware

From [email-masked] Sat Nov 10 07:18:55 2001
Received: from dt083nf7.san.rr.com ([204.210.26.247] helo=mail.lightner.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 162GEw-0006iA-00
for <[email-masked]>; Sat, 10 Nov 2001 07:18:54 +1300
Received: from lightner.net (snert [168.143.116.97])
by mail.lightner.net (8.8.7/8.8.6) with ESMTP id KAA28108;
Fri, 9 Nov 2001 10:20:22 -0800
Message-ID: <[email-masked]>
Date: Fri, 09 Nov 2001 10:20:10 -0800
From: "Bruce D. Lightner" <[email-masked]>
X-Mailer: Mozilla 4.74 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: ken restivo <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] uart oddity
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Ken,

I can probably guess what's going on, although I'm more of an expert on the
AT90S8515...

> I have been experimenting with the uart sample code posted here on this
> list (thanks, by the way!) on my mega163, and discovered some "funny"
> behaviour.
>
> If RXEN and RXCIE are set, and a byte is received, and I either do not
> have a SIG_UART_RECV handler, or if I do have one and it doesn't read
> UDR, then all uart activity hangs. The cpu runs, my blinkenlights keep
> blinken, but no bytes get transmitted, and my SIG_UART_RECV routine does
> not get called ever again no matter how many more characters are received.
> To fix the problem, I have to insert an inb(UDR) into the SIG_UART_RECV
> routine. Of course, I could also turn off RXEN and RXCIE too.
>
> Now this is simple to fix and will cause no problems in my "real"
> application. But it seems strange to me and was not expected. I have
> read the UART section of the databook several times now, and saw no hint
> of this. I also didn't see anything about it in the avrlibc docs. Maybe
> this is obvious and of course I should expect this behaviour. Or maybe
> I am doing something wrong. in any case I haven't been able to explain
> it and figured it might be worth posting about.
>
> cheers!
>
> - -ken

Here's what the datasheet on the AT90S8515 says...

Bit 7 - RXC: UART Receive Complete

This bit is set (one) when a received character is transferred from
the Receiver Shift register to UDR. The bit is set regard-less of any
detected framing errors. When the RXCIE bit in UCR is set, the UART
Receive Complete interrupt will be executed when RXC is set(one). RXC is
cleared by reading UDR. When interrupt-driven data reception is used,
the UART Receive Complete Interrupt routine must read UDR in order
to clear RXC, otherwise a new interrupt will occur once the interrupt
routine terminates.

Note the last sentence...

Assuming that other AVR processors' UARTs behave the same way (a good bet),
I suspect that your processor is in a tight loop servicing the RXC interrupt
precisely because no AVR code is reading the received data from the UART's
UDR register. If you don't read the UDR, the interrupt will NOT be cleared.

If an interrupt service routine is not provided, you probably get a simple
"return from interrupt" instruction (i.e., "reti") in the default AVR
interrupt vector table...essentially an empty interrupt handler. If YOU
provide an interrupt handler WITHOUT an "inb(UDR)" statement, then you get
the same behavior. In both cases, the AVR processor will interrupt
endlessly on receipt of the first character by the UART. Because you are
guaranteed to execute one AVR instruction AFTER an "reti" instruction, it
looks like the AVR processor is running...and it is...but very slowly!!!

As for why you can't transmit characters...

If in your case UART transmits are being done with interrupts, both possible
TX interrupt vectors (i.e., TXC and DRE) are of lower priority than the
"RXC" handler, so they will be "held off" by the perpetual "RXC" interrupt.

Anyway, this is not "strange" behavior...it is probably documented in *your*
Mega163 manual, just like it is in *my* AT90S8515 manual. (So, I guess the
moral of the story is once again...RTFM! :-) (Me? Of course I *always*
RTFM before asking questions! :-)

Best regards,

Bruce

--
Bruce D. Lightner
La Jolla, California
Email: [email-masked]
URL: http://www.lightner.net/lightner/bruce/

From [email-masked] Sat Nov 10 07:24:37 2001
Received: from f168.law15.hotmail.com ([64.4.23.168] helo=hotmail.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 162GKS-0006ik-00
for <[email-masked]>; Sat, 10 Nov 2001 07:24:36 +1300
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
Fri, 9 Nov 2001 10:26:20 -0800
Received: from 62.7.120.182 by lw15fd.law15.hotmail.msn.com with HTTP;
Fri, 09 Nov 2001 18:26:20 GMT
X-Originating-IP: [62.7.120.182]
From: "Leon Heller" <[email-masked]>
To: [email-masked], [email-masked]
Bcc:
Subject: Re: [avr-gcc-list] Re: AVR Studio doesn't like avr-gcc .obj files
Date: Fri, 09 Nov 2001 18:26:20 +0000
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
Message-ID: <[email-masked]>
X-OriginalArrivalTime: 09 Nov 2001 18:26:20.0660 (UTC) FILETIME=[0774A340:01C1694C]
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>From: Gunnar Henne <[email-masked]>
>To: AVR GCC List <[email-masked]>
>Subject: [avr-gcc-list] Re: AVR Studio doesn't like avr-gcc .obj files
>Date: Fri, 09 Nov 2001 15:05:50 +0100
>
>Hello Leon,
>
>Leon Heller schrieb:
> > Whilst avr-gcc works fine otherwise, AVR Studio 3.52 gives error
>messages
> > when I try to load an object file:
> >
> > One or more source files cannot be found
> > Error in Nordic object file
>
>AStudio is very picky about the path-infos in object files. You cant use
>object files generated under Linux. Under windows you have to recompile
>the avr-libc and leave the sources in the place, where they are at
>compile time. If you have downloaded the binaries from www.combio.de/avr
>and followed the instructions it should work.

I was compiling under Windoze98. I'll try the binaries you mention.

Thanks,

Leon
--
Leon Heller, G1HSM Tel: +44 1327 359058 Email:[email-masked]
My web page: http://www.geocities.com/leon_heller
My low-cost Altera Flex design kit: http://www.leonheller.com

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

From [email-masked] Sat Nov 10 10:52:09 2001
Received: from 208-58-86-11.c3-0.sfo-ubr1.sfrn-sfo.ca.cable.rcn.com ([208.58.86.11] helo=bc.home.246gt.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 162JZH-0006v4-00
for <[email-masked]>; Sat, 10 Nov 2001 10:52:07 +1300
Received: from fred.home.246gt.com (fred.home.246gt.com [10.0.0.74])
by bc.home.246gt.com (8.11.3/8.11.3) with ESMTP id fA9LsJX24253;
Fri, 9 Nov 2001 13:54:19 -0800 (PST)
(envelope-from [email-masked])
Received: (from ken@localhost)
by fred.home.246gt.com (8.11.2/8.11.2) id fA9MtHb22051;
Fri, 9 Nov 2001 14:55:17 -0800
X-Authentication-Warning: fred.home.246gt.com: ken set sender to [email-masked] using -f
Date: Fri, 9 Nov 2001 14:55:17 -0800
From: ken restivo <[email-masked]>
To: "Bruce D. Lightner" <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] uart oddity
Message-ID: <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: application/pgp; x-action=sign; format=text
Content-Disposition: inline; filename="msg.pgp"
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Fri, Nov 09, 2001 at 10:20:10AM -0800
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thank you! Now it makes sense.

Yes, almost the exact same text is in my Mega163 databook as is in your 8515 book; I saw it, read it (several times!), and it just didn't click. And I didn't think to check which interrupts are higher priority. Duh. So, I did RTFM, but i failed to "UTFM"... Understand the Freakin' Manual. ;-).

Again, thank you for taking the time to give a a very smart and informative answer to what must seem to have been a profoundly stupid question.

Cheers!

- -ken
- ----------

On Fri, Nov 09, 2001 at 10:20:10AM -0800, Bruce D. Lightner wrote:
>
<detailed and cogent explanation not repeated here>
> If in your case UART transmits are being done with interrupts, both possible
> TX interrupt vectors (i.e., TXC and DRE) are of lower priority than the
> "RXC" handler, so they will be "held off" by the perpetual "RXC" interrupt.
>
> Anyway, this is not "strange" behavior...it is probably documented in *your*
> Mega163 manual, just like it is in *my* AT90S8515 manual. (So, I guess the
> moral of the story is once again...RTFM! :-) (Me? Of course I *always*
> RTFM before asking questions! :-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE77F7Ue8HF+6xeOIcRAntkAJ9ePqBsWHTOq0tQ1KnxoNfOx7PAeQCg7gWx
LWooTtDiHVHpXa4VfgVCKcc=
=oLPq
-----END PGP SIGNATURE-----

From [email-masked] Sat Nov 10 11:13:22 2001
Received: from sense-smead-139.oz.net ([216.39.162.139] helo=henry.amplepower.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 162Jtp-0006yK-00
for <[email-masked]>; Sat, 10 Nov 2001 11:13:22 +1300
Received: from mail.amplepower.com ([email-masked] [192.168.8.220])
by henry.amplepower.com (8.8.7/8.8.7) with ESMTP id OAA31812;
Fri, 9 Nov 2001 14:15:20 -0800
Date: Fri, 9 Nov 2001 14:15:20 -0800 (PST)
From: David Smead <[email-masked]>
To: Victor Sluiter <[email-masked]>
cc: <[email-masked]>
Subject: Re: [avr-gcc-list] Cygwin & Ava
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Victor,

The linker can't find a library named user32. If the library is in the
standard place, (/usr/lib), then you need to run ldconfig to put it in the
linker cache.

--
Sincerely,

David Smead
http://www.amplepower.com.

On Fri, 9 Nov 2001, Victor Sluiter wrote:

> After hearing from Cygwin, I installed it on my PC. It works fine! Now I'd
> like to install avr-gcc and ava. I downloaded the src for ava, and unpacked
> it. Now hen I type 'make', the following happens:
>
> vs@IP /ava-0.3b/src
> $ make
> gcc -o ava -DAVA_LIB="\"../../usr/lib/uTools/ava\"" -Wall -fenum-int-equiv
> -O Ma
> in.o Preproc.o Lexer.o Syntax.o Symbol.o Segment.o Keywords.o Reports.o
> Object.o
> Avr.o
> /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld:
> cann
> ot find -luser32
> collect2: ld returned 1 exit status
> make: *** [ava] Error 1
>
> I'm a newbie on Linux and Unix (as you might have guessed), so maybe I'm
> missing a package, or unpacked in the wrong dir? I changed the dirs in the
> makefile to
> # Directory Setup
> AVA_BIN = ../../usr/local/bin
> AVA_LIB = ../../usr/local/lib/uTools/ava
>
> and the compiler settings to
> # GNU C++ compiler
> CPPFLAGS= -DAVA_LIB="\"$(AVA_LIB)\"" -Wall \
> -fenum-int-equiv -O
>
> I'm using GCC 2.95.3-5.
> Does someone know what I'm doing wrong, or maybe know a tutorial on the web?
> Any help would be welcome!
> Thanks in advance, Victor
>
>

From [email-masked] Sun Nov 11 05:23:50 2001
Received: from rdu25-2-113.nc.rr.com ([24.25.2.113] helo=smtp.bsdhome.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 162av7-00083A-00
for <[email-masked]>; Sun, 11 Nov 2001 05:23:49 +1300
Received: from neutrino.bsdhome.com (jupiter [192.168.220.13])
by smtp.bsdhome.com (8.11.3nb1/8.11.4) with ESMTP id fAAGPY701737
for <[email-masked]>; Sat, 10 Nov 2001 11:25:35 -0500 (EST)
Received: (from bsd@localhost)
by neutrino.bsdhome.com (8.11.6/8.11.6) id fAAGPOE41958;
Sat, 10 Nov 2001 11:25:24 -0500 (EST)
(envelope-from bsd)
Date: Sat, 10 Nov 2001 11:25:24 -0500
From: Brian Dean <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Subject: [avr-gcc-list] ../avr/bin/ld: region text is full --- but by how much?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

When you exceed the code space using avr-gcc/ld, is there a way to
make the linker tell you by how much you've overflowed it? One can
use avr-size on your own .o's and even on the crt0 for the appropriate
target and sum up the sections. However, it's difficult to get all
the size information from library routines that you may be using.

Since the linker obviously knows which section has been exceeded, and
it must know by how much, is there any way to make it tell you this
information? Sometimes its very useful to know if you are just a few
bytes over or waaaay over. In the former case you may just need to
optimize a little to get your code to fit. For the latter, you may
need to go back to the drawing board.

Any tips appreciated.

Thanks,
-Brian
--
Brian Dean [email-masked]

From [email-masked] Sun Nov 11 10:49:47 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 162g0X-0001Zz-00
for <[email-masked]>; Sun, 11 Nov 2001 10:49:46 +1300
Received: (from rneswold@localhost)
by DrMemory.fnal.GOV (8.11.6/8.11.3) id fAALX4n08765;
Sat, 10 Nov 2001 15:33:04 -0600 (CST)
(envelope-from rneswold)
Date: Sat, 10 Nov 2001 15:33:04 -0600
From: Rich Neswold <[email-masked]>
To: Joerg Wunsch <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] UART again
Message-ID: <[email-masked]>
Reply-To: Rich Neswold <[email-masked]>
References: <01110217281801.01391@raum513> <[email-masked]> <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="jy6Sn24JjFx/iggw"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Fri, Nov 09, 2001 at 10:24:46AM +0100
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.4-RELEASE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--jy6Sn24JjFx/iggw
Content-Type: multipart/mixed; boundary="LyciRD1jyfeSSjG0"
Content-Disposition: inline

--LyciRD1jyfeSSjG0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Wasn't it 9-Nov-2001, at 10:24AM, when Joerg Wunsch said:
> Well, looks like either my part is broken or i'm too stupid to send
> anything out to the UART in my test circuit. My demo.c run, but even if
> i modify that, the UART stops working.

Okay, I've attached a HEX file containing an application which shows my
UART routines in action. This ROM image is targetted for a 4MHz 2313
processor (i.e. it runs on an STK-200 without problems.)

It spits out a banner and then echoes received serial data to the UART
transmitter. I used "minicom" to test this.

Hope this helps...

--=20
Rich Neswold

efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

--LyciRD1jyfeSSjG0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="rom.hex"

:100000002AC041C040C03FC03EC03DC03CC0B0C09F
:1000100092C039C038C00D0A5541525420546573FE
:100020007420524F4D0D0A5468697320524F4D2071
:1000300077696C6C206563686F207768617465769A
:1000400065722069732073656E7420746F20697403
:100050002E0D0A0A000011241FBE20E0A89521BD24
:1000600020E025BFE2EAF1E0A0E6B0E003C0C895D9
:1000700031960D92A036D9F7A0E6B0E001C01D92EE
:10008000A837E9F702C000C01895CFEDCDBFC6E193
:10009000D0E089E12AD07894FD2FEC2FC895802DEF
:1000A000882329F026D0882311F02196F5CF80E20D
:1000B00085BF88958FED85BF34D0882361F303D049
:1000C00018D0E9CFFFCFFF27579880916100882390
:1000D00051F0E0916300E81B08F4E65FEC598A9563
:1000E000809361008081579A089589B988E98AB917
:1000F00008955598909160009A3080F4FF27E09120
:100100006200E2598193EE56EA3008F0EE27E09360
:10011000620093959093600081E001C08827559A12
:1001200008958091610008951092600008958827D5
:100130005E9B839508958F938FB78F93EF93FF9373
:1001400080916000882369F0FF27E0916200E81B3E
:1001500008F4E65FE2598A958093600080818CB94B
:1001600001C05598FF91EF918F918FBF8F91189596
:100170008F938FB78F93EF93FF938CB1F0916100C2
:10018000FA3080F7F395F0936100FF27E091630068
:10019000EC598193E456EA3008F0EE27E0936300CF
:0201A000E1CFAD
:00000001FF

--LyciRD1jyfeSSjG0--

--jy6Sn24JjFx/iggw
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE77Z0PZmE+i9FKxdwRAjGLAKC5SlNl4awQJEFgdhlQFlIuU6AerwCglBER
FXq5rldjaEYlhmhYLjLrSd0=
=O0id
-----END PGP SIGNATURE-----

--jy6Sn24JjFx/iggw--

From [email-masked] Sun Nov 11 17:40:25 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 162mPw-0001zU-00
for <[email-masked]>; Sun, 11 Nov 2001 17:40:25 +1300
Received: (from rneswold@localhost)
by DrMemory.fnal.GOV (8.11.6/8.11.3) id fAB4Nmp09362;
Sat, 10 Nov 2001 22:23:48 -0600 (CST)
(envelope-from rneswold)
Date: Sat, 10 Nov 2001 22:23:48 -0600
From: Rich Neswold <[email-masked]>
To: Joerg Wunsch <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] UART again
Message-ID: <[email-masked]>
Reply-To: Rich Neswold <[email-masked]>
References: <01110217281801.01391@raum513> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="iVCmgExH7+hIHJ1A"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Sat, Nov 10, 2001 at 03:33:04PM -0600
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.4-RELEASE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--iVCmgExH7+hIHJ1A
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Wasn't it 10-Nov-2001, at 03:33PM, when Rich Neswold said:
> This ROM image is targetted for a 4MHz 2313 processor (i.e. it runs on an
> STK-200 without problems.)

Oops. I should have mentioned that it is using 9600 baud, 8 bits, etc.

--=20
Rich Neswold

efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

--iVCmgExH7+hIHJ1A
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE77f1UZmE+i9FKxdwRAtbSAJ44VPJaFViBcr3r3Dz2lwrwnjw9AACg2y7L
x6tL3KVD+tCIL46Fr4AHFhw=
=ZzoT
-----END PGP SIGNATURE-----

--iVCmgExH7+hIHJ1A--

From [email-masked] Tue Nov 13 05:43:56 2001
Received: from [209.235.58.166] (helo=artemisgroup.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 163KBf-00049e-00
for <[email-masked]>; Tue, 13 Nov 2001 05:43:56 +1300
Received: from c11030-a.scllg1.pa.home.com (c11030-a.scllg1.pa.home.com [24.15.29.78])
by artemisgroup.com (Postfix) with ESMTP id BBF747BC1
for <[email-masked]>; Mon, 12 Nov 2001 11:45:50 -0500 (EST)
Date: Mon, 12 Nov 2001 11:45:47 -0500 (EST)
From: Patrick Lanphier <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] AVR GCC
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Where is the best literature on how to get started programming the AVR
2313 with example code. Thank you.

Patrick Lanphier
The Artemis Group
http://www.artemisgroup.com
phone: 814-235-0444
fax: 800-582-9710

From [email-masked] Tue Nov 13 07:11:03 2001
Received: from f229.law15.hotmail.com ([64.4.23.229] helo=hotmail.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 163LXy-0004JP-00
for <[email-masked]>; Tue, 13 Nov 2001 07:11:02 +1300
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
Mon, 12 Nov 2001 10:12:59 -0800
Received: from 62.7.73.24 by lw15fd.law15.hotmail.msn.com with HTTP;
Mon, 12 Nov 2001 18:12:58 GMT
X-Originating-IP: [62.7.73.24]
From: "Leon Heller" <[email-masked]>
To: [email-masked], [email-masked]
Bcc:
Subject: Re: [avr-gcc-list] AVR GCC
Date: Mon, 12 Nov 2001 18:12:58 +0000
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
Message-ID: <[email-masked]>
X-OriginalArrivalTime: 12 Nov 2001 18:12:59.0112 (UTC) FILETIME=[A8EF5E80:01C16BA5]
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>From: Patrick Lanphier <[email-masked]>
>To: <[email-masked]>
>Subject: [avr-gcc-list] AVR GCC
>Date: Mon, 12 Nov 2001 11:45:47 -0500 (EST)
>
>Where is the best literature on how to get started programming the AVR
>2313 with example code. Thank you.

I've got some very simple assembler stuff to get you started on my Geocities
web site(see sig.)

Leon
--
Leon Heller, G1HSM Tel: +44 1327 359058 Email:[email-masked]
My web page: http://www.geocities.com/leon_heller
My low-cost Altera Flex design kit: http://www.leonheller.com

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

From [email-masked] Tue Nov 13 14:03:14 2001
Received: from [203.24.179.147] (helo=smartcontainer.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 163Ryr-0004gY-00
for <[email-masked]>; Tue, 13 Nov 2001 14:03:13 +1300
Received: (qmail 26257 invoked by uid 8); 13 Nov 2001 01:05:38 -0000
Received: from link.smartcontainer.net (20.20.20.53, claiming to be "smartcontainer.net")
by smarty with SMTP id smtpdcmQqSK; Mon, 12 Nov 2001 20:05:31 EST
Message-ID: <[email-masked]>
Date: Tue, 13 Nov 2001 11:59:25 +1100
From: Scott Finneran <[email-masked]>
Organization: Smart Container
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Using AVR JTAG ICE with avr-gdb.
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello everyone,

I have written a program (called AVaRICE) to interface avr-gdb (ie gdb5
with the standard avr patch) with the new Atmel AVR JTAG ICE.

The AVaRICE homepage may be found at: http://avarice.sourceforge.net

Please feel free to download and give it a try. Feedback would be
greatly appreciated.

Regards,

Scott Finneran

From [email-masked] Tue Nov 13 15:25:52 2001
Received: from [209.235.58.166] (helo=artemisgroup.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 163TGq-0004lI-00
for <[email-masked]>; Tue, 13 Nov 2001 15:25:52 +1300
Received: from c11030-a.scllg1.pa.home.com (c11030-a.scllg1.pa.home.com [24.15.29.78])
by artemisgroup.com (Postfix) with ESMTP id A6D0E7BC1
for <[email-masked]>; Mon, 12 Nov 2001 21:27:34 -0500 (EST)
Date: Mon, 12 Nov 2001 21:27:29 -0500 (EST)
From: Patrick Lanphier <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] Optimization?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Well the below code works fine, flashing that is, when using the -O3
optimization but does not work with -O1 optimization, I don't understand.

/**************************************************************************

avr-gcc -O0 -mmcu=at90s2313 -c demo2.c -o main.o
avr-gcc -o main.elf main.o
avr-objcopy -O ihex main.elf main.hex

***************************************************************************/

#include <io.h>
#include <interrupt.h>
#include <sig-avr.h>

int main(void)
{
uint8_t f,i, j, k;

outp(255, DDRB); /* port B all outputs */
outp(0, PORTB); /* turn all leds off */

while(1){
outp(0, PORTB); // turn led on
for(f=0; f<255; f++) // delay
for(i=0; i<255; i++)
for(j=0; j<255; j++)
k=k+1;
outp(255, PORTB); // turn led off
for(f=0; f<255; f++) // delay
for(i=0; i<255; i++)
for(j=0; j<255; j++)
k=k+1;
}
}

Patrick Lanphier
The Artemis Group
http://www.artemisgroup.com
phone: 814-235-0444
fax: 800-582-9710

From [email-masked] Wed Nov 14 00:27:23 2001
Received: from mx0.gmx.de ([213.165.64.100] helo=mx0.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 163bir-0005Fm-00
for <[email-masked]>; Wed, 14 Nov 2001 00:27:22 +1300
Received: (qmail 9268 invoked by uid 0); 13 Nov 2001 11:29:19 -0000
Date: Tue, 13 Nov 2001 12:29:19 +0100 (MET)
From: Victor Sluiter <[email-masked]>
To: <[email-masked]>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-Authenticated-Sender: [email-masked]
X-Authenticated-IP: [212.136.198.145]
Message-ID: <[email-masked]>
X-Mailer: WWW-Mail 1.5 (Global Message Exchange)
X-Flags: 0001
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Cygwin, MingW, GCC
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I'm still trying to install a new version of AVR-GCC, meanwhile I have
installed both MingW an Cygwin. My difficulty now is: what version of AVR-GCC
should I use? My considerations are as follows:
- For MingW, some special versions are precompiled. Won't I have the same
problem with MingW as I have now with the VolkerOth version: no possibillity to
upgrade to newer versions of libc?
- For Cygwin: what files do I need? I found various sites with
avr-gcc<timestamp, etc>.tar.gz and the binutils, while others claim that I need a new
version of GNU CC, and path it, or just compile it in combination with the right
binutils.
- What versions are known to be made compatible with avr-studio (with or
without Elf2Coff)

Before I mess up my complete disk with half installations, I'd like to hear
if someone's got some good tips on the subjects above :-).

All help is very welcome!
Greetings, Victor

--
-------------------------------------------------------
Een gewaarschuwd schizofreen telt voor vier.
- Fons Jansen
-------------------------------------------------------

GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

From [email-masked] Wed Nov 14 00:46:45 2001
Received: from overclockers.zip.com.au ([61.8.3.18] helo=odin.zip.com.au)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 163c1d-0005Gt-00
for <[email-masked]>; Wed, 14 Nov 2001 00:46:45 +1300
Received: from mwp by odin.zip.com.au with local-esmtp (Exim 3.12 #1 (Debian))
id 163c3a-0002ml-00; Tue, 13 Nov 2001 22:48:46 +1100
Date: Tue, 13 Nov 2001 22:48:46 +1100 (EST)
From: MWP <[email-masked]>
X-Sender: [email-masked]
To: Patrick Lanphier <[email-masked]>
cc: [email-masked]
Subject: Re: [avr-gcc-list] Optimization?
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I wouldnt be supprised if it has somthing to do with incr k, but then not
using it. I cant answer why it works with O3 tho... weird.

try using asm("nop") instead of incr k;

MWp

On Mon, 12 Nov 2001, Patrick Lanphier wrote:

> Well the below code works fine, flashing that is, when using the -O3
> optimization but does not work with -O1 optimization, I don't understand.
>
>
> /**************************************************************************
>
> avr-gcc -O0 -mmcu=at90s2313 -c demo2.c -o main.o
> avr-gcc -o main.elf main.o
> avr-objcopy -O ihex main.elf main.hex
>
> ***************************************************************************/
>
> #include <io.h>
> #include <interrupt.h>
> #include <sig-avr.h>
>
> int main(void)
> {
> uint8_t f,i, j, k;
>
> outp(255, DDRB); /* port B all outputs */
> outp(0, PORTB); /* turn all leds off */
>
> while(1){
> outp(0, PORTB); // turn led on
> for(f=0; f<255; f++) // delay
> for(i=0; i<255; i++)
> for(j=0; j<255; j++)
> k=k+1;
> outp(255, PORTB); // turn led off
> for(f=0; f<255; f++) // delay
> for(i=0; i<255; i++)
> for(j=0; j<255; j++)
> k=k+1;
> }
> }
>
> Patrick Lanphier
> The Artemis Group
> http://www.artemisgroup.com
> phone: 814-235-0444
> fax: 800-582-9710
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Wed Nov 14 01:36:40 2001
Received: from maile.telia.com ([194.22.190.16])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 163cnu-0005Jt-00
for <[email-masked]>; Wed, 14 Nov 2001 01:36:39 +1300
Received: from d1o926.telia.com (d1o926.telia.com [213.66.172.241])
by maile.telia.com (8.11.6/8.11.6) with ESMTP id fADCd6608978
for <[email-masked]>; Tue, 13 Nov 2001 13:39:07 +0100 (CET)
Received: from jesper (h169n2fls34o926.telia.com [217.208.35.169])
by d1o926.telia.com (8.10.2/8.10.1) with SMTP id fADCd6A09748
for <[email-masked]>; Tue, 13 Nov 2001 13:39:06 +0100 (CET)
Message-ID: <002901c16c40$2eb25370$65656565@jesper>
From: "Jesper Hansen" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Cygwin, MingW, GCC
Date: Tue, 13 Nov 2001 13:39:01 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Victor,

Just wondering, as I haven't followed this thread - Why in the world do
you want to mess around with Cygwin and MingW, when you can run
AVR-GCC 3.0 directly under Windows ???

/Jesper
http://www.yampp.com

----- Original Message -----
From: "Victor Sluiter" <[email-masked]>
To: <[email-masked]>
Sent: Tuesday, November 13, 2001 12:29 PM
Subject: [avr-gcc-list] Cygwin, MingW, GCC

> I'm still trying to install a new version of AVR-GCC, meanwhile I have
> installed both MingW an Cygwin. My difficulty now is: what version of
AVR-GCC
> should I use? My considerations are as follows:
> - For MingW, some special versions are precompiled. Won't I have the same
> problem with MingW as I have now with the VolkerOth version: no
possibillity to
> upgrade to newer versions of libc?
> - For Cygwin: what files do I need? I found various sites with
> avr-gcc<timestamp, etc>.tar.gz and the binutils, while others claim that I
need a new
> version of GNU CC, and path it, or just compile it in combination with the
right
> binutils.
> - What versions are known to be made compatible with avr-studio (with or
> without Elf2Coff)
>
> Before I mess up my complete disk with half installations, I'd like to
hear
> if someone's got some good tips on the subjects above :-).
>
> All help is very welcome!
> Greetings, Victor
>
> --
> -------------------------------------------------------
> Een gewaarschuwd schizofreen telt voor vier.
> - Fons Jansen
> -------------------------------------------------------
>
> GMX - Die Kommunikationsplattform im Internet.
> http://www.gmx.net
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Wed Nov 14 01:47:34 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 163cyS-0005Kt-00
for <[email-masked]>; Wed, 14 Nov 2001 01:47:33 +1300
Received: (from j@localhost)
by ida.interface-business.de id fADCo0J45201;
Tue, 13 Nov 2001 13:50:00 +0100 (MET)
Date: Tue, 13 Nov 2001 13:50:00 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] Optimization?
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

MWP <[email-masked]> wrote:

> try using asm("nop") instead of incr k;

It would already help to declare `k' as `volatile uint8_t k;'

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Wed Nov 14 03:49:51 2001
Received: from mx0.gmx.net ([213.165.64.100])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 163esn-0005SQ-00
for <[email-masked]>; Wed, 14 Nov 2001 03:49:51 +1300
Received: (qmail 30639 invoked by uid 0); 13 Nov 2001 14:51:47 -0000
Date: Tue, 13 Nov 2001 15:51:47 +0100 (MET)
From: Victor Sluiter <[email-masked]>
To: <[email-masked]>
MIME-Version: 1.0
References: <002901c16c40$2eb25370$65656565@jesper>
Subject: Re: [avr-gcc-list] Cygwin, MingW, GCC
X-Priority: 3 (Normal)
X-Authenticated-Sender: [email-masked]
X-Authenticated-IP: [212.136.198.145]
Message-ID: <[email-masked]>
X-Mailer: WWW-Mail 1.5 (Global Message Exchange)
X-Flags: 0001
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

My problem started with using malloc();, which gave an error during
compiling. Dean Ferreyra suggested it might be an old libc. I compiled a new one, but
my avr-gcc, the version of Volker Oth (till now a very good version!!) still
gave an error.
The AVR-GCC of AVR-Freaks (I guess that's the one you mean) has this remark
to their malloc.c:

void *malloc( size_t size ); Allocates 'size' bytes of memory and returns a
pointer to it. Implemented, but not tested.

I've downloaded theAVR-GCC from AVR Freaks, and will test it tonight, but I
still would be happier to be able to be more up-to-date with the
developments. I must agree that it is quite a fuzz to be working with Cygwin, because of
my lack of knowledge about unix-like environments. And coming to that; I hope
to be learning som basic unix skills from this 'aventure' :-)

By the way, thanks for the tip to look at a windows/dos version again...
I'll tell you my findings!!
Greetings, Victor

> Hi Victor,
>
> Just wondering, as I haven't followed this thread - Why in the world do
> you want to mess around with Cygwin and MingW, when you can run
> AVR-GCC 3.0 directly under Windows ???
>
>
> /Jesper
> http://www.yampp.com
>
>
> ----- Original Message -----
> From: "Victor Sluiter" <[email-masked]>
> To: <[email-masked]>
> Sent: Tuesday, November 13, 2001 12:29 PM
> Subject: [avr-gcc-list] Cygwin, MingW, GCC
>
>
> > I'm still trying to install a new version of AVR-GCC, meanwhile I have
> > installed both MingW an Cygwin. My difficulty now is: what version of
> AVR-GCC
> > should I use? My considerations are as follows:
> > - For MingW, some special versions are precompiled. Won't I have the
> same
> > problem with MingW as I have now with the VolkerOth version: no
> possibillity to
> > upgrade to newer versions of libc?
> > - For Cygwin: what files do I need? I found various sites with
> > avr-gcc<timestamp, etc>.tar.gz and the binutils, while others claim that
> I
> need a new
> > version of GNU CC, and path it, or just compile it in combination with
> the
> right
> > binutils.
> > - What versions are known to be made compatible with avr-studio (with or
> > without Elf2Coff)
> >
> > Before I mess up my complete disk with half installations, I'd like to
> hear
> > if someone's got some good tips on the subjects above :-).
> >
> > All help is very welcome!
> > Greetings, Victor
> >
> > --
> > -------------------------------------------------------
> > Een gewaarschuwd schizofreen telt voor vier.
> > - Fons Jansen
> > -------------------------------------------------------
> >
> > GMX - Die Kommunikationsplattform im Internet.
> > http://www.gmx.net
> >
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > [email-masked]
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

--
-------------------------------------------------------
Een gewaarschuwd schizofreen telt voor vier.
- Fons Jansen
-------------------------------------------------------

GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

From [email-masked] Wed Nov 14 04:49:42 2001
Received: from mx0.gmx.de ([213.165.64.100] helo=mx0.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 163foj-0005Wo-00
for <[email-masked]>; Wed, 14 Nov 2001 04:49:41 +1300
Received: (qmail 30391 invoked by uid 0); 13 Nov 2001 15:51:40 -0000
Date: Tue, 13 Nov 2001 16:51:40 +0100 (MET)
From: Victor Sluiter <[email-masked]>
To: <[email-masked]>
MIME-Version: 1.0
References: <002901c16c40$2eb25370$65656565@jesper>
Subject: Re: [avr-gcc-list] Cygwin, MingW, GCC
X-Priority: 3 (Normal)
X-Authenticated-Sender: [email-masked]
X-Authenticated-IP: [212.136.198.145]
Message-ID: <[email-masked]>
X-Mailer: WWW-Mail 1.5 (Global Message Exchange)
X-Flags: 0001
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Jesper,
Thanks indeed VERY much, now I have a good working AVR-GCC. To my surprise I
saw how often the AVR-GCC distribution is updated. Wonderful! And malloc();
no longer gives an error... I haven't really tried the working of malloc, but
at this moment I trust that it is functioning well (anyone disagree?)....
I also noticed that the new GCC make the code a little bit larger (2,7k
instead of 2,5k), and that it is a little bit more picky on code. For example :

sat.c:27: warning: assignment discards qualifiers from pointer target type

because of a pointer to a prog_char. But those are just minor details.......

Many thanks for all the help!
Victor

--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

From [email-masked] Wed Nov 14 11:50:49 2001
Received: from [206.97.148.120] (helo=vega.ipal.net ident=postfix)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 163mOH-00060u-00
for <[email-masked]>; Wed, 14 Nov 2001 11:50:49 +1300
Received: by vega.ipal.net (Postfix, from userid 700)
id ABF3F247; Tue, 13 Nov 2001 16:53:18 -0600 (CST)
Received: from localhost (localhost [127.0.0.1])
by vega.ipal.net (Postfix) with ESMTP id AB3DB246
for <[email-masked]>; Tue, 13 Nov 2001 16:53:18 -0600 (CST)
Date: Tue, 13 Nov 2001 16:53:18 -0600 (CST)
From: Chris Baugher <[email-masked]>
X-Sender: [email-masked]
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Optimization?
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

What is the clock speed?

I'm thinking that maybe it IS working but the delay is so long that it
never gets past the first set of delay loops.

When you compile with -O3 it may optimize out the k=k+1 and shorten the
length of the delay to where you can actually see the blinking.

C|

On Mon, 12 Nov 2001, Patrick Lanphier wrote:

> Well the below code works fine, flashing that is, when using the -O3
> optimization but does not work with -O1 optimization, I don't understand.
>
>
> /**************************************************************************
>
> avr-gcc -O0 -mmcu=at90s2313 -c demo2.c -o main.o
> avr-gcc -o main.elf main.o
> avr-objcopy -O ihex main.elf main.hex
>
> ***************************************************************************/
>
> #include <io.h>
> #include <interrupt.h>
> #include <sig-avr.h>
>
> int main(void)
> {
> uint8_t f,i, j, k;
>
> outp(255, DDRB); /* port B all outputs */
> outp(0, PORTB); /* turn all leds off */
>
> while(1){
> outp(0, PORTB); // turn led on
> for(f=0; f<255; f++) // delay
> for(i=0; i<255; i++)
> for(j=0; j<255; j++)
> k=k+1;
> outp(255, PORTB); // turn led off
> for(f=0; f<255; f++) // delay
> for(i=0; i<255; i++)
> for(j=0; j<255; j++)
> k=k+1;
> }
> }
>
> Patrick Lanphier
> The Artemis Group
> http://www.artemisgroup.com
> phone: 814-235-0444
> fax: 800-582-9710
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Wed Nov 14 13:08:36 2001
Received: from [209.235.58.166] (helo=artemisgroup.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 163nbX-00066P-00
for <[email-masked]>; Wed, 14 Nov 2001 13:08:36 +1300
Received: from c11030-a.scllg1.pa.home.com (c11030-a.scllg1.pa.home.com [24.15.29.78])
by artemisgroup.com (Postfix) with ESMTP
id D09067BC1; Tue, 13 Nov 2001 19:10:35 -0500 (EST)
Date: Tue, 13 Nov 2001 19:10:28 -0500 (EST)
From: Patrick Lanphier <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>
Cc: Chris Baugher <[email-masked]>
Subject: Re: [avr-gcc-list] Optimization?
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

And the winner of the Optimization of the LED blinking light question goes
to Chris Baugher. Thank you very much. This makes complete sense but
just getting into embedded systems one doesn't know up from down. Thank
you.

Patrick Lanphier
The Artemis Group
http://www.artemisgroup.com
phone: 814-235-0444
fax: 800-582-9710

From [email-masked] Wed Nov 14 15:53:56 2001
Received: from [203.24.179.147] (helo=smartcontainer.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 163qBY-0006Gh-00
for <[email-masked]>; Wed, 14 Nov 2001 15:53:56 +1300
Received: (qmail 32177 invoked by uid 8); 14 Nov 2001 02:56:28 -0000
Received: from link.smartcontainer.net (20.20.20.53, claiming to be "smartcontainer.net")
by smarty with SMTP id smtpd4aspFG; Tue, 13 Nov 2001 21:56:19 EST
Message-ID: <[email-masked]>
Date: Wed, 14 Nov 2001 13:49:57 +1100
From: Scott Finneran <[email-masked]>
Organization: Smart Container
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: "[email-masked]" <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Using GDB with AVR JTAG ICE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Everyone,

A day or two ago, I posted a message announcing the availability of the
AVaRICE project. This program allows you to connect the Atmel JTAG ICE
to GDB.

Thankyou to all those who responded. Rather than flood this mailing list
with further off-topic discussion, I would like to take this oportunity
to let you known that AVaRICE now has it's own mailing list.

To those who mailed me directly, I will get back to you soon. In the
meantime please do join the mailing list.

Info (including subscription details) on this list may be found on the
website(http://avarice.sourceforge.net/)

Kind Regards,

Scott Finneran

From [email-masked] Thu Nov 15 05:21:40 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1642nD-00071m-00
for <[email-masked]>; Thu, 15 Nov 2001 05:21:39 +1300
Received: from 199.182.91.78.ras04.den.iras.frii.net (199.182.91.78.ras04.den.iras.frii.net [199.182.91.78])
by deimos.frii.net (8.11.6/8.11.6) with ESMTP id fAEGOCZ14494
for <[email-masked]>; Wed, 14 Nov 2001 09:24:12 -0700 (MST)
Date: Wed, 14 Nov 2001 09:25:46 -0700 (MST)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: AVR GCC List <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] simulavr-0.0.7
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

A while back I posted here that I was working on a python based, avr
simulator. Well, that turned out to be _way_ too slow so I rewrote it in
C. I just uploaded simulavr-0.0.7 to my website:

http://res099095.halls.colostate.edu/programs/simulavr/

With this release, I've gotten gdb to talk to the simulator via gdbserver.
There's a patch for gdb-5.0 in the release which must be applied onto top
of the gdb-5.0-avr-patch-0.1 patch floating around. For convienence, I've
also included the gdb-5.0-avr-patch-0.1 patch in the release.

So far, gdb can set break points, step through the code and examine/set
variable and memory.

The stepping through the code is not working correctly though as it only
steps by the single machine instruction and not a line of C code. If
anyone knows how I can get this to work correctly, I'd love to hear from
you.

Also, beware that my patch might break the avr-mon target in gdb. I had to
change some things in avr-tdep.c that could affect avr-rom.c

There's still a lot of work to do, but I thought I'd release what I've got
in the hopes that someone is interested.

Ted Roth

From [email-masked] Thu Nov 15 05:52:10 2001
Received: from smtp01.web.de ([194.45.170.210] helo=smtp.web.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1643Gj-00073t-00
for <[email-masked]>; Thu, 15 Nov 2001 05:52:10 +1300
Received: from [217.5.28.22] (helo=217.5.28.22)
by smtp.web.de with esmtp (Exim 3.32 #26)
id 1643J8-0008IG-00; Wed, 14 Nov 2001 17:54:41 +0100
Date: Wed, 14 Nov 2001 17:56:13 +0100
From: Andreas Schwarz <[email-masked]>
X-Mailer: The Bat! (v1.53d) Personal
X-Priority: 3 (Normal)
Message-ID: <[email-masked]>
To: "Theodore A. Roth" <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] simulavr-0.0.7
In-Reply-To: <[email-masked]>
References: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

Wednesday, November 14, 2001, 5:25:46 PM, you wrote:

> A while back I posted here that I was working on a python based, avr
> simulator.

a suggestion: I've been always looking for a simulator that does not
only simulate the controller, but also external hardware, e.g. LCDs.
There could be an interface for some scripting langue so that you can
write a module for the hardware you want to use with the controller.
I don't know how complicated that would be, but I'm really astonished that
something like this doesn't yet exist...

Andreas

--
www.mikrocontroller.net - AVR-Tutorial, Forum, über 200 Links

PGP-Key: http://andreas-s.net/pgp-public-key.txt
(Fingerprint: C00A 6B54 AC98 31FF 1BDC 2B9D 9426 AD36)

From [email-masked] Thu Nov 15 06:05:40 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1643Tn-00074m-00
for <[email-masked]>; Thu, 15 Nov 2001 06:05:39 +1300
Received: from 199.182.91.54.ras04.den.iras.frii.net (199.182.91.54.ras04.den.iras.frii.net [199.182.91.54])
by deimos.frii.net (8.11.6/8.11.6) with ESMTP id fAEH8EZ60872
for <[email-masked]>; Wed, 14 Nov 2001 10:08:14 -0700 (MST)
Date: Wed, 14 Nov 2001 10:09:52 -0700 (MST)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
cc: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] simulavr-0.0.7
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

That's actually in the TODO list. There is a preliminary interface to
external ports via the PORTx interface which could be used for
interfacing to external hardware. I don't have any LCD hardward yet.
If anyone could loan me something in the future, I'd work on it.

Right now I'm focusing on getting the gdb interface working correctly.
Which is more than enough work for me.

I am planning on adding a python binding in the future.

Ted Roth

On Wed, 14 Nov 2001, Andreas Schwarz wrote:

:)Hello,
:)
:)Wednesday, November 14, 2001, 5:25:46 PM, you wrote:
:)
:)> A while back I posted here that I was working on a python based, avr
:)> simulator.
:)
:)a suggestion: I've been always looking for a simulator that does not
:)only simulate the controller, but also external hardware, e.g. LCDs.
:)There could be an interface for some scripting langue so that you can
:)write a module for the hardware you want to use with the controller.
:)I don't know how complicated that would be, but I'm really astonished that
:)something like this doesn't yet exist...
:)
:)Andreas
:)
:)

From [email-masked] Thu Nov 15 09:44:02 2001
Received: from ns0.ipal.net
([206.97.148.120] helo=vega.ipal.net ident=postfix)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1646t8-0007Mf-00
for <[email-masked]>; Thu, 15 Nov 2001 09:44:02 +1300
Received: by vega.ipal.net (Postfix, from userid 700)
id 8706B240; Wed, 14 Nov 2001 14:46:35 -0600 (CST)
Received: from localhost (localhost [127.0.0.1])
by vega.ipal.net (Postfix) with ESMTP
id 864F623F; Wed, 14 Nov 2001 14:46:35 -0600 (CST)
Date: Wed, 14 Nov 2001 14:46:35 -0600 (CST)
From: Chris Baugher <[email-masked]>
X-Sender: [email-masked]
To: Patrick Lanphier <[email-masked]>
Cc: [email-masked],
Chris Baugher <[email-masked]>
Subject: Re: [avr-gcc-list] Optimization?
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

You're welcome. When timing is important you have to be mindful of things
like clock speed and how many clock cycles it takes to do things. The
compiler makes it more confusing because the code generated is not always
what you think it's going to be, depending on the level of optimization
used.

A useful thing to do I have found is to generate a list file during the
compile. Then try compiling with diferent levels of optimization and
compare the list files. This will give you an idea of what the difference
is between the optimized and unoptimized code at the assembly level. Keep
in mind though that the list file isn't always exactly the code that goes
into the executable. The linker can remove subroutines that never get
called. That tripped me up awhile back.

C|

On Tue, 13 Nov 2001, Patrick Lanphier wrote:

> And the winner of the Optimization of the LED blinking light question goes
> to Chris Baugher. Thank you very much. This makes complete sense but
> just getting into embedded systems one doesn't know up from down. Thank
> you.
>
> Patrick Lanphier
> The Artemis Group
> http://www.artemisgroup.com
> phone: 814-235-0444
> fax: 800-582-9710
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Thu Nov 15 09:15:45 2001
Received: from web14303.mail.yahoo.com ([216.136.173.79])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 1646Rk-0007Kk-00
for <[email-masked]>; Thu, 15 Nov 2001 09:15:44 +1300
Message-ID: <[email-masked]>
Received: from [216.153.187.13] by web14303.mail.yahoo.com via HTTP; Wed, 14 Nov 2001 12:18:20 PST
Date: Wed, 14 Nov 2001 12:18:20 -0800 (PST)
From: John Branthoover <[email-masked]>
To: AVR-GCC List <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: [avr-gcc-list] AVR-GCC Newbie: Looking For A CRC Or Checksum Routine
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello All,
Does anyone out there have a C routine to compute
the CRC or checksum of the EEPROM on a AVR device?
Any information will be greatly appreciated. Thank
you for your time and have a nice day!

__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

From [email-masked] Thu Nov 15 10:43:13 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1647oO-0007Qv-00
for <[email-masked]>; Thu, 15 Nov 2001 10:43:12 +1300
Received: from 199.182.91.122.ras04.den.iras.frii.net (199.182.91.122.ras04.den.iras.frii.net [199.182.91.122])
by deimos.frii.net (8.11.6/8.11.6) with ESMTP id fAELjkQ68234
for <[email-masked]>; Wed, 14 Nov 2001 14:45:46 -0700 (MST)
Date: Wed, 14 Nov 2001 14:47:29 -0700 (MST)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: AVR GCC List <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] simulavr-0.0.8
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Sorry to have a second release in one day, but I think this is more worthy
than the last. I figured out why gdb wasn't stepping through C code
correctly and fixed it. This release might almost be useful for debugging
simple programs.

http://res099095.halls.colostate.edu/programs/simulavr/

Ted Roth

From [email-masked] Thu Nov 15 11:43:10 2001
Received: from [203.24.179.147] (helo=smartcontainer.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 1648kQ-0007VQ-00
for <[email-masked]>; Thu, 15 Nov 2001 11:43:10 +1300
Received: (qmail 3411 invoked by uid 8); 14 Nov 2001 22:45:46 -0000
Received: from link.smartcontainer.net (20.20.20.53, claiming to be "smartcontainer.net")
by smarty with SMTP id smtpd40pP1o; Wed, 14 Nov 2001 17:45:46 EST
Message-ID: <[email-masked]>
Date: Thu, 15 Nov 2001 09:39:24 +1100
From: Scott Finneran <[email-masked]>
Organization: Smart Container
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686)
X-Accept-Language: en
MIME-Version: 1.0
CC: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] simulavr-0.0.7
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

If people are looking at writing a peripheral simulator, check out this
one for the PIC. It has some really nifty sims of things like LCD
screens etc. The code may even be usable.

http://www.dattalo.com/gnupic/gpsim.html

Scott Finneran

"Theodore A. Roth" wrote:
>
> That's actually in the TODO list. There is a preliminary interface to
> external ports via the PORTx interface which could be used for
> interfacing to external hardware. I don't have any LCD hardward yet.
> If anyone could loan me something in the future, I'd work on it.
>
> Right now I'm focusing on getting the gdb interface working correctly.
> Which is more than enough work for me.
>
> I am planning on adding a python binding in the future.
>
> Ted Roth
>
> On Wed, 14 Nov 2001, Andreas Schwarz wrote:
>
> :)Hello,
> :)
> :)Wednesday, November 14, 2001, 5:25:46 PM, you wrote:
> :)
> :)> A while back I posted here that I was working on a python based, avr
> :)> simulator.
> :)
> :)a suggestion: I've been always looking for a simulator that does not
> :)only simulate the controller, but also external hardware, e.g. LCDs.
> :)There could be an interface for some scripting langue so that you can
> :)write a module for the hardware you want to use with the controller.
> :)I don't know how complicated that would be, but I'm really astonished that
> :)something like this doesn't yet exist...
> :)
> :)Andreas
> :)
> :)
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Thu Nov 15 22:22:52 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 164IjR-00088U-00
for <[email-masked]>; Thu, 15 Nov 2001 22:22:51 +1300
Received: (from j@localhost)
by ida.interface-business.de id fAF9OdJ62251;
Thu, 15 Nov 2001 10:24:39 +0100 (MET)
Date: Thu, 15 Nov 2001 10:24:39 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] simulavr-0.0.7
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Scott Finneran <[email-masked]> wrote:

> If people are looking at writing a peripheral simulator, check out
> this one for the PIC. It has some really nifty sims of things like
> LCD screens etc. The code may even be usable.

....and Scott Dattalo is a nice person to work with. I once asked him
about supporting other CPUs. He wrote me that he had written the
simulator with the design goald in mind that it should be
CPU-independant, but of course, as long as there's only one actual CPU
implementation, projects like this usually develop a number of
unforeseen problems when it actually comes to porting it to something
else.

(For the single and only PIC project i did so far, that simulator
turned out to be quite helpful to me.)

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Fri Nov 16 02:13:37 2001
Received: from atusks01.alcatel.at ([212.183.9.130] helo=mail.alcatel.at)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 164MKl-0008MN-00
for <[email-masked]>; Fri, 16 Nov 2001 02:13:36 +1300
Received: from alcatel.at (atusel33.aut.alcatel.at [146.112.129.215])
by mail.alcatel.at (8.9.3/8.9.3/1.21 01/27/01 21:43:09) with ESMTP id OAA21030;
Thu, 15 Nov 2001 14:16:08 +0100 (MET)
Message-ID: <[email-masked]>
Date: Thu, 15 Nov 2001 14:16:07 +0100
From: Christoph Plattner <[email-masked]>
Organization: AAA
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.8 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
To: John Branthoover <[email-masked]>
CC: AVR-GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] AVR-GCC Newbie: Looking For A CRC Or Checksum
Routine
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

see application notes on the Atmel AVR home page. There is an
example inside, as far I remember.

Bye
Christoph P.

John Branthoover wrote:
>
> Hello All,
> Does anyone out there have a C routine to compute
> the CRC or checksum of the EEPROM on a AVR device?
> Any information will be greatly appreciated. Thank
> you for your time and have a nice day!
>
> __________________________________________________
> Do You Yahoo!?
> Find the one for you at Yahoo! Personals
> http://personals.yahoo.com
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

------------------------------------------------------------------
private: [email-masked]
company: [email-masked]

From [email-masked] Fri Nov 16 04:28:26 2001
Received: from web14301.mail.yahoo.com ([216.136.173.77])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 164ORF-0008Ta-00
for <[email-masked]>; Fri, 16 Nov 2001 04:28:25 +1300
Message-ID: <[email-masked]>
Received: from [216.153.187.13] by web14301.mail.yahoo.com via HTTP; Thu, 15 Nov 2001 07:31:04 PST
Date: Thu, 15 Nov 2001 07:31:04 -0800 (PST)
From: John Branthoover <[email-masked]>
To: AVR-GCC List <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: [avr-gcc-list] Newbie: Writing Efficient C Code For AVR Microcontrollers.
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello All,
I am currently writing C code for my first AVR
project. Being fairly new to C, I am concerned about
writing inefficient code and wasting program memory
space. I have down loaded the Atmel application note
AVR035: Efficient C coding for AVR. This application
seems to based on the IAR compiler.

My question is: Can this information in the
application note be applied to the AVR-GCC compiler?
If not, are there any documents with tips for writing
efficient C code using the AVR-GCC compiler?

Any information that you can give me will be greatly
appreciated. Thank you for your time and have a nice
day.

__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

From [email-masked] Fri Nov 16 20:53:32 2001
Received: from 208-58-86-11.c3-0.sfo-ubr1.sfrn-sfo.ca.cable.rcn.com ([208.58.86.11] helo=micron.home.246gt.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 164doU-0000tC-00
for <[email-masked]>; Fri, 16 Nov 2001 20:53:26 +1300
Received: (from ken@localhost)
by micron.home.246gt.com (8.11.3/8.11.3) id fAG7u7T00863
for [email-masked]; Thu, 15 Nov 2001 23:56:07 -0800 (PST)
X-Authentication-Warning: micron.home.246gt.com: ken set sender to [email-masked] using -f
Date: Thu, 15 Nov 2001 23:56:06 -0800
From: [email-masked]
To: [email-masked]
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Fri, Nov 09, 2001 at 01:22:13PM +1300
Subject: [avr-gcc-list] simulator issues
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

i apologize if simulator issues are off-topic; if there is a simulavr list i'd be glad to join it and post there.

that said, here goes:
i was able to successfully download, compile, and run simulavr on a redhat 7.1 system with gcc 3.01. the test assembly programs and the test c program worked just fine, in both simulavr mode and gdbserver mode. i'm using the 8515 personality for my testing.

however, trying to load any program larger than a few hundred bytes crashes simulavr. i get this:

file storage.c: line 93: address out of boundsAborted (core dumped)

with this detail:
#0 0x40055801 in __kill () from /lib/i686/libc.so.6
(gdb) bt
#0 0x40055801 in __kill () from /lib/i686/libc.so.6
#1 0x400555da in raise (sig=6) at ../sysdeps/posix/raise.c:27
#2 0x40056d82 in abort () at ../sysdeps/generic/abort.c:88
#3 0x0804b4c8 in _avr_error () at avrerror.c:74
#4 0x08055268 in storage_readw (stor=0x8058c20, addr=-3006) at storage.c:93
#5 0x080526f7 in flash_read (flash=0x8058c20, addr=-1503) at flash.c:51
#6 0x0804a688 in exec_next_instruction (core=0x8058b90) at avrcore.c:414
#7 0x0804a925 in avr_core_step (core=0x8058b90) at avrcore.c:536
#8 0x0804aa0d in avr_core_run (core=0x8058b90) at avrcore.c:586
#9 0x0804916b in main (argc=3, argv=0xbffff94c) at main.c:267
#10 0x40044177 in __libc_start_main (main=0x8049050 <main>, argc=3,
ubp_av=0xbffff94c, init=0x8048880 <_init>, fini=0x8055fc0 <_fini>,
rtld_fini=0x4000e184 <_dl_fini>, stack_end=0xbffff93c)
at ../sysdeps/generic/libc-start.c:129

the -1503 address in flash_read looks to me like the problem.

in stepping through this, i noticed that storage_readw is called by this:
inline word flash_read ( Flash *flash, int addr)
{ return storage_readw( (Storage *)flash, addr*2 ); }

and was very confused as to why addr is being multiplied by 2 before being passed to storage_readw. it looks to me like a macro expansion problem, or some magick i don't understand, and i just didn't have time or the skill to chase it down any further than this.

i duplicated the problem with a slight modification of demo.c that uses a long PSTR to simulate filling up about 5K of flash ram.

#include <io.h>
#include <progmem.h>

int main(void)
{
unsigned char cnt;
char * uglystring;
uglystring = PSTR(" <long string of about 5k bytes> \n");

outp( 0xff, DDRB ); /* enable port b for output */

for ( cnt=0; cnt < strlen_P(uglystring); cnt++)
outp( PRG_RDB(&uglystring[cnt]), PORTB );

for (;;)
; /* loop forever */

return 0;
}

the above test program works just fine with a very short strings (10bytes) but fails with larger ones.

and what i ended up with was:
text data bss dec hex filename
5356 0 0 5356 14ec demo.elf

the simulator otherwise looks very solid and easily extensible (i'm looking forward to being able to simulate a mega163!) and i'm sure this out-of-bounds error is either simple to fix or pilot error on my part.

thanks!

-ken

From [email-masked] Fri Nov 16 22:25:07 2001
Received: from usc.edu ([128.125.253.136] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 164fFB-0000yI-00
for <[email-masked]>; Fri, 16 Nov 2001 22:25:06 +1300
Received: from aludra.usc.edu (aludra.usc.edu [128.125.253.184])
by usc.edu (8.9.3.1/8.9.3/usc) with ESMTP
id BAA03453 for <[email-masked]>; Fri, 16 Nov 2001 01:28:01 -0800 (PST)
Received: from localhost (mediratt@localhost)
by aludra.usc.edu (8.10.1/8.10.1/usc) with ESMTP
id fAG9S0c16459 for <[email-masked]>; Fri, 16 Nov 2001 01:28:00 -0800 (PST)
Date: Fri, 16 Nov 2001 01:28:00 -0800 (PST)
From: Rohit Mediratta <[email-masked]>
To: <[email-masked]>
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] AVR Newbie
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,
I installed avr-gcc for the first time today.
but have no way of testing it.

If anyone could give me links to simple C programs which i could use to
test my environment that would be great.

thanks
rohit

From [email-masked] Sat Nov 17 02:47:48 2001
Received: from a1as04-p140.hh.tli.de
([195.252.132.140] helo=pluto ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 164jLG-0001D4-00
for <[email-masked]>; Sat, 17 Nov 2001 02:47:42 +1300
Received: from Informatik.Uni-Oldenburg.DE ([127.0.0.1]) by pluto
with esmtp (ident beth using rfc1413) id m164Jnx-000yGWC
(Debian Smail-3.2.0.102 1998-Aug-2 #2); Thu, 15 Nov 2001 11:31:33 +0100 (CET)
Message-ID: <[email-masked]>
Date: Thu, 15 Nov 2001 11:26:10 +0100
From: Carsten Beth <[email-masked]>
Organization: C.v.Ossietzky =?iso-8859-1?Q?Universit=E4t?= Oldenburg - Fachbereich
Informatik
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.15 i586)
X-Accept-Language: German, de, English, en, en
MIME-Version: 1.0
To: [email-masked]
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Re: AVR-GCC Newbie: Looking For A CRC Or Checksum Routine
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi John!

Have a look to Atmels application notes 235 and 236. If you have
intalled AVR Studio you can look to the files "c:/Programme/Atmel/AVR
20Studio/Appnotes/avr235.asm" and "c:/Programme/Atmel/AVR
20Studio/Appnotes/avr236.asm".

Have a nice day too

Carsten Beth

John Branthoover wrote:

> Hello All,
> Does anyone out there have a C routine to compute
> the CRC or checksum of the EEPROM on a AVR device?
> Any information will be greatly appreciated. Thank
> you for your time and have a nice day!

From [email-masked] Sat Nov 17 03:46:10 2001
Received: from mx0.gmx.net ([213.165.64.100])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 164kFs-0001Go-00
for <[email-masked]>; Sat, 17 Nov 2001 03:46:09 +1300
Received: (qmail 1153 invoked by uid 0); 16 Nov 2001 14:47:30 -0000
Date: Fri, 16 Nov 2001 15:47:30 +0100 (MET)
From: Victor Sluiter <[email-masked]>
To: [email-masked]
MIME-Version: 1.0
References: <[email-masked]>
Subject: Re: [avr-gcc-list] AVR Newbie
X-Priority: 3 (Normal)
X-Authenticated-Sender: [email-masked]
X-Authenticated-IP: [212.136.198.145]
Message-ID: <[email-masked]>
X-Mailer: WWW-Mail 1.5 (Global Message Exchange)
X-Flags: 0001
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Rohit,

Take a look at
http://www.avrfreaks.net/AVRGCC/download.php

The GCCTEST zip is very helpful! You can finfd routines to flash LEDs, send
data through the UART, etc. Succes!

Greetings, Victor

>
Hi,
> I installed avr-gcc for the first time today.
> but have no way of testing it.
>
> If anyone could give me links to simple C programs which i could use to
> test my environment that would be great.
>
> thanks
> rohit
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

--
-------------------------------------------------------
Een gewaarschuwd schizofreen telt voor vier.
- Fons Jansen
-------------------------------------------------------

GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

From [email-masked] Sat Nov 17 03:57:20 2001
Received: from firewall.dalsa.com ([207.176.180.114] helo=dalsa.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 164kQh-0001Hz-00
for <[email-masked]>; Sat, 17 Nov 2001 03:57:19 +1300
Received: by firewall.dalsa.com id <119041>; Fri, 16 Nov 2001 10:01:29 -0500
Subject: Re: [avr-gcc-list] Newbie: Writing Efficient C Code For AVR
Microcontrollers.
To: AVR-GCC List <[email-masked]>
Cc: John Branthoover <[email-masked]>
X-Mailer: Lotus Notes Release 5.0.1a (Intl) 17 August 1999
Message-Id: <[email-masked]>
From: [email-masked]
Date: Fri, 16 Nov 2001 09:42:24 -0500
X-MIMETrack: Serialize by Router on Wat/Dalsa(Release 5.0.5 |September 22, 2000) at 11/16/2001
09:42:26 AM
MIME-Version: 1.0
Content-type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

In answer to John Branthoover <[email-masked]>
(see part of original posting below)

Try http://www.bytecraft.com/ and follow the links to
either the programming examples and tips on that website
or to the list of publications on the subject.

One of these publications is:
C Programming for Embedded Systems
Author: Kirk Zurell

Unfortunately Byte Craft does not have tools for the AVR.

John Branthoover <[email-masked] posted the following:

I am currently writing C code for my first AVR
project. Being fairly new to C, I am concerned about
writing inefficient code and wasting program memory
space. I have down loaded the Atmel application note
AVR035: Efficient C coding for AVR. This application
seems to based on the IAR compiler.

Thanks,
John Johnson
DALSA Inc.

From [email-masked] Sat Nov 17 04:12:36 2001
Received: from [63.221.177.165] (helo=exchange.cirris.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 164kfT-0001JH-00
for <[email-masked]>; Sat, 17 Nov 2001 04:12:36 +1300
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Subject: RE: [avr-gcc-list] Newbie: Writing Efficient C Code For AVR Microcontrollers.
X-MimeOLE: Produced By Microsoft Exchange V6.0.4712.0
Content-Class: urn:content-classes:message
Date: Fri, 16 Nov 2001 08:14:15 -0700
Message-ID: <[email-masked]>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: [avr-gcc-list] Newbie: Writing Efficient C Code For AVR Microcontrollers.
Thread-Index: AcFuJPdcPEccW+BKQ0uo8j94fJQ40gAi4ooA
From: "Jon Bertrand" <[email-masked]>
To: "John Branthoover" <[email-masked]>,
"AVR-GCC List" <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

John,

This may seem obvious but I'll toss it out anyway: If you are worried
about code size then watch your assembly language listing and your code
segment size as you try different ways to code. Pick the way that is
the smallest. I find every development environment is a little
different so I keep a careful eye on size as I add functionality.

You soon get a feel for how c code translates to assembly so you'll know
what to use and what to avoid.

Jon B.

> -----Original Message-----
> From: John Branthoover [mailto:[email-masked]]
> Sent: Thursday, November 15, 2001 8:31 AM
> To: AVR-GCC List
> Subject: [avr-gcc-list] Newbie: Writing Efficient C Code For AVR
> Microcontrollers.
>=20
>=20
> Hello All,
> I am currently writing C code for my first AVR
> project. Being fairly new to C, I am concerned about
> writing inefficient code and wasting program memory
> space. I have down loaded the Atmel application note
> AVR035: Efficient C coding for AVR. This application
> seems to based on the IAR compiler.
>=20
> My question is: Can this information in the
> application note be applied to the AVR-GCC compiler?=20
> If not, are there any documents with tips for writing
> efficient C code using the AVR-GCC compiler?
>=20
> Any information that you can give me will be greatly
> appreciated. Thank you for your time and have a nice
> day.
>=20
>=20
>=20
> __________________________________________________
> Do You Yahoo!?
> Find the one for you at Yahoo! Personals
> http://personals.yahoo.com
>=20
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>=20

From [email-masked] Sat Nov 17 07:33:35 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 164nny-0001Z8-00
for <[email-masked]>; Sat, 17 Nov 2001 07:33:34 +1300
Received: from 199.182.92.159.ras04.den.iras.frii.net (199.182.92.159.ras04.den.iras.frii.net [199.182.92.159])
by deimos.frii.net (8.11.6/8.11.6) with ESMTP id fAGIa8Y65336;
Fri, 16 Nov 2001 11:36:08 -0700 (MST)
Date: Fri, 16 Nov 2001 11:38:04 -0700 (MST)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>
cc: <[email-masked]>
Subject: Re: [avr-gcc-list] simulator issues
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Thu, 15 Nov 2001, [email-masked] wrote:

:)however, trying to load any program larger than a few hundred bytes
:)crashes simulavr. i get this:
:)

I think I fixed this. Try the fix_pc_wrap patch here:

http://res099095.halls.colostate.edu/programs/simulavr/patches/

Ted Roth

From [email-masked] Sun Nov 18 06:26:59 2001
Received: from mx7.port.ru ([194.67.57.17])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1659F4-0002r0-00
for <[email-masked]>; Sun, 18 Nov 2001 06:26:58 +1300
Received: from [194.105.215.6] (helo=mail.ru)
by mx7.port.ru with esmtp (Exim 3.14 #1)
id 1659Hg-0006hZ-00; Sat, 17 Nov 2001 20:29:40 +0300
Message-ID: <[email-masked]>
Date: Sat, 17 Nov 2001 21:26:59 +0300
From: dimmy <[email-masked]>
User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.4) Gecko/20011001
X-Accept-Language: en-us
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
CC: [email-masked]
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] COMPILER Frame pointer bug!!!
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Fellows,

I found strange avr-gcc behaviour.

If you declare a function with a variable number of arguments or the
number of arguments is over 18 (actually, total number of bytes,
required for arguments) or you allocate over 18 bytes inside the
function, then avr-gcc disables interrupts on enter to the function and
does not enable them anymore.

This is valid only in case, when frame pointer cannot be eliminated or
when no optimization enabled.
For example, the code:

char *newfmt(int n, char *fmt, ...)
{
char *p;
va_list ap;
int ind;
int i;
char w[3000]; /* will never be used. the same result if the
size of w is over 16 */

va_start(ap, fmt);

for (i=0; i<n;i++)
{
ind = va_arg(ap, int);
excall(ind);
}

va_end(ap);
return (p);
}

will result as (avr-gcc -mmcu=atmega103 -O -S ):

/* prologue: frame size=3000 */
push r10
push r11
push r12
push r13
push r14
push r15
push r16
push r17
push r28
push r29
in r28,__SP_L__
in r29,__SP_H__
subi r28,lo8(3000)
sbci r29,hi8(3000)
in __tmp_reg__,__SREG__
cli ; <=====
DISABLE INTERRUPTS
out __SP_H__,r29
out __SREG__,__tmp_reg__
out __SP_L__,r28
/* prologue end (size=19) */
.......

And no 'sei' instruction in the function body!!!
Actully, in function's epilogue, gcc disables interrupts as well.

I'll contact the originator of the compiler later.

If you cannot wait and want to fix this bug right now, you have to
recompile the gcc sources.
The patch is here:
diff -u gcc/config/avr/avr.c.orig gcc/config/avr/avr.c
--- gcc/config/avr/avr.c.orig Sat Nov 17 21:18:14 2001
+++ gcc/config/avr/avr.c Sat Nov 17 21:24:28 2001
@@ -511,13 +511,14 @@
fprintf (file, AS2 (out, __SREG__, __tmp_reg__) CR_TAB);
size++;
}
- else if (do_sei)
+
+ fprintf (file, AS2 (out, __SP_L__, r28) "\n")
+
+ if (do_sei)
{
fprintf (file, "sei" CR_TAB);
size++;
}
-
- fprintf (file, AS2 (out, __SP_L__, r28) "\n");

return size;
}

So, just be carefull -

1. make shure, gcc can omit frame pointer within a function call
2. declare vars as global or static,
3 if you cannot do 1 or 2, apply patch

Hope it helps,
Dmitry

From [email-masked] Sun Nov 18 16:27:35 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 165IcJ-0004ss-00
for <[email-masked]>; Sun, 18 Nov 2001 16:27:35 +1300
Received: from jpk1.jpk.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id fAI3UOr22981;
Sun, 18 Nov 2001 16:30:24 +1300
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Sun, 18 Nov 2001 16:30:03 +1300
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] COMPILER Frame pointer bug!!!
Cc: [email-masked]
In-Reply-To: <[email-masked]>
References: <[email-masked]>
<[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Dmitry,

Can you specify what version of gcc this applies to, it may have been fixed
already. If you aren't aready using gcc-3.01 please verify the problem
using it.

Cheers,

Jason Kyle

At 21:26 17/11/2001 +0300, dimmy wrote:
>Fellows,
>
>I found strange avr-gcc behaviour.
>
>If you declare a function with a variable number of arguments or the
>number of arguments is over 18 (actually, total number of bytes, required
>for arguments) or you allocate over 18 bytes inside the function, then
>avr-gcc disables interrupts on enter to the function and does not enable
>them anymore.
>
>This is valid only in case, when frame pointer cannot be eliminated or
>when no optimization enabled.
<snip>

From [email-masked] Sun Nov 18 18:25:36 2001
Received: from pop.sttl.uswest.net ([206.81.192.10] helo=sttlpop9.sttl.uswest.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 165KSV-0004yd-00
for <[email-masked]>; Sun, 18 Nov 2001 18:25:35 +1300
Received: (qmail 63432 invoked by uid 0); 18 Nov 2001 05:28:20 -0000
Received: from pdslppp77.sttl.uswest.net (HELO dell) (63.224.33.77)
by sttlpop9.sttl.uswest.net with SMTP; 18 Nov 2001 05:28:20 -0000
Date: Sat, 17 Nov 2001 21:24:00 -0800
Message-ID: <008601c16ff1$db388380$3300000a@dell>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]>
Subject: Re: [avr-gcc-list] COMPILER Frame pointer bug!!!
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This isn't a bug. The following line restores the interrupt
flag.

> out __SREG__,__tmp_reg__

The interrupts are disabled only for the two cycles needed to
update the stack pointer. If you took an interrupt with the
stack pointer half updated bad things happen! I know. I had
that bug in my RTOS for a while :)

From [email-masked] Mon Nov 19 00:25:44 2001
Received: from viefep13-int.chello.at ([213.46.255.15])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 165Q51-0005G6-00
for <[email-masked]>; Mon, 19 Nov 2001 00:25:43 +1300
Received: from gmx.at ([62.178.92.247]) by viefep13-int.chello.at
(InterMail vM.5.01.03.06 201-253-122-118-106-20010523) with ESMTP
id <[email-masked]>;
Sun, 18 Nov 2001 12:27:59 +0100
Message-ID: <[email-masked]>
Date: Sun, 18 Nov 2001 12:27:59 +0100
From: Christoph Plattner <[email-masked]>
Organization: private
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.6 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: dimmy <[email-masked]>, [email-masked]
CC: AVR GCC List <[email-masked]>, [email-masked]
Subject: Re: [avr-gcc-list] COMPILER Frame pointer bug!!!
References: <[email-masked]> <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello !

No the code is OK, you simple have overseen the interrupt handling.

Using cli/sei is ALWAYS WRONG and many old operating system errors
have to be searched. The correct handling is (used C style to
explain):

flags = save_cpu_flags (); /* inlcuding Interrupt Enable bit */
cli (); /* disable interrupts */

< critical code >

restore_cpu_flags (flags); /* set the old IE state !!! */

This method is necessary, if this routines is called under interrupts
OFF, the interrupt MUST NOT switched on with SEI !!

> in __tmp_reg__,__SREG__
> cli
> DISABLE INTERRUPTS
> out __SP_H__,r29
> out __SREG__,__tmp_reg__
> out __SP_L__,r28

Here you see the "save_cpu_flags" in the first line (save SREG into
__tmp_reg__), the the `cli', and at the bottom the restore from
__tmp_reg__ in the SREG !

For optimization for do short interrupt locks, the restoring is not the
last operation, as AVR guarantees to execute one instruction of the
current sequence after enabling interrupts again. So the restoring is
done before the second part of the stack pointer is setup. In this
way, the interrupts off time is shorter.

The protections with locked interrupts is necessary here. The access to
the 16bit stack pointer must be atomic. Otherwise it would be fatal, if
one of the two parts are defined to the new value and suddenly an
interrupt
via an IRQ is done. The stack pointer has an invalid value then.

I hope I could clarify the stuff

With friendly regards
Christoph P.

dimmy wrote:
>
> Fellows,
>
> I found strange avr-gcc behaviour.
>
> If you declare a function with a variable number of arguments or the
> number of arguments is over 18 (actually, total number of bytes,
> required for arguments) or you allocate over 18 bytes inside the
> function, then avr-gcc disables interrupts on enter to the function and
> does not enable them anymore.
>
> This is valid only in case, when frame pointer cannot be eliminated or
> when no optimization enabled.
> For example, the code:
>
> char *newfmt(int n, char *fmt, ...)
> {
> char *p;
> va_list ap;
> int ind;
> int i;
> char w[3000]; /* will never be used. the same result if the
> size of w is over 16 */
>
> va_start(ap, fmt);
>
> for (i=0; i<n;i++)
> {
> ind = va_arg(ap, int);
> excall(ind);
> }
>
> va_end(ap);
> return (p);
> }
>
> will result as (avr-gcc -mmcu=atmega103 -O -S ):
>
> /* prologue: frame size=3000 */
> push r10
> push r11
> push r12
> push r13
> push r14
> push r15
> push r16
> push r17
> push r28
> push r29
> in r28,__SP_L__
> in r29,__SP_H__
> subi r28,lo8(3000)
> sbci r29,hi8(3000)
> in __tmp_reg__,__SREG__
> cli ; <=====
> DISABLE INTERRUPTS
> out __SP_H__,r29
> out __SREG__,__tmp_reg__
> out __SP_L__,r28
> /* prologue end (size=19) */
> .......
>
> And no 'sei' instruction in the function body!!!
> Actully, in function's epilogue, gcc disables interrupts as well.
>
> I'll contact the originator of the compiler later.
>
> If you cannot wait and want to fix this bug right now, you have to
> recompile the gcc sources.
> The patch is here:
> diff -u gcc/config/avr/avr.c.orig gcc/config/avr/avr.c
> --- gcc/config/avr/avr.c.orig Sat Nov 17 21:18:14 2001
> +++ gcc/config/avr/avr.c Sat Nov 17 21:24:28 2001
> @@ -511,13 +511,14 @@
> fprintf (file, AS2 (out, __SREG__, __tmp_reg__) CR_TAB);
> size++;
> }
> - else if (do_sei)
> +
> + fprintf (file, AS2 (out, __SP_L__, r28) "\n")
> +
> + if (do_sei)
> {
> fprintf (file, "sei" CR_TAB);
> size++;
> }
> -
> - fprintf (file, AS2 (out, __SP_L__, r28) "\n");
>
> return size;
> }
>
> So, just be carefull -
>
> 1. make shure, gcc can omit frame pointer within a function call
> 2. declare vars as global or static,
> 3 if you cannot do 1 or 2, apply patch
>
> Hope it helps,
> Dmitry
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
-------------------------------------------------------
private: [email-masked]
company: [email-masked]

From [email-masked] Mon Nov 19 02:51:06 2001
Received: from innovative.iinet.net.au ([203.59.144.24] helo=sprocket.innovative.iinet.net.au)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 165SLh-0005O1-00
for <[email-masked]>; Mon, 19 Nov 2001 02:51:05 +1300
Received: (from uucp@localhost)
by sprocket.innovative.iinet.net.au (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id VAA15070;
Sun, 18 Nov 2001 21:53:08 +0800
Received: from UNKNOWN(203.6.142.20), claiming to be "flywheel.innovative.iinet.net.au"
via SMTP by innovative.iinet.net.au, id smtpdahDcqd; Sun Nov 18 13:52:42 2001
Received: (from bernie@localhost)
by flywheel.innovative.iinet.net.au (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) id fAIDqfs13328;
Sun, 18 Nov 2001 21:52:41 +0800
From: Bernd Felsche <[email-masked]>
Message-Id: <[email-masked]>
Subject: Re: [avr-gcc-list] COMPILER Frame pointer bug!!!
In-Reply-To: <[email-masked]> from Christoph Plattner at "Nov 18, 2001
12:27:59 pm"
To: Christoph Plattner <[email-masked]>
Date: Sun, 18 Nov 2001 21:52:41 +0800 (WST)
CC: dimmy <[email-masked]>, [email-masked],
AVR GCC List <[email-masked]>, [email-masked]
X-Mailer: ELM [version 2.4ME+ PL60 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Christoph Plattner tapped away at the keyboard with:

> No the code is OK, you simple have overseen the interrupt handling.
>
> Using cli/sei is ALWAYS WRONG and many old operating system errors
> have to be searched. The correct handling is (used C style to
> explain):
>
> flags = save_cpu_flags (); /* inlcuding Interrupt Enable bit */
> cli (); /* disable interrupts */
>
> < critical code >
>
> restore_cpu_flags (flags); /* set the old IE state !!! */

Unfortunately, there's the opportunity for an interrupt to occur
between the save and the interrupt disable. Or did I miss something
in the instruction set details?

This is pretty much a short-coming of the AVR. If the cli() and
sei() were both save the previous status of the interrupt flag to
(say) the carry bit, then the previous state could be restored
reliably, under all circumstances.

[snip]

--
/"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia
\ / ASCII ribbon campaign | I'm a .signature virus! |
X against HTML mail | Copy me into your ~/.signature|
/ \ and postings | to help me spread! |

From [email-masked] Mon Nov 19 11:00:07 2001
Received: from viefep15-int.chello.at ([213.46.255.19])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 165Zyv-0005qe-00
for <[email-masked]>; Mon, 19 Nov 2001 11:00:06 +1300
Received: from gmx.at ([62.178.92.247]) by viefep15-int.chello.at
(InterMail vM.5.01.03.06 201-253-122-118-106-20010523) with ESMTP
id <[email-masked]>;
Sun, 18 Nov 2001 23:02:26 +0100
Message-ID: <[email-masked]>
Date: Sun, 18 Nov 2001 23:02:26 +0100
From: Christoph Plattner <[email-masked]>
Organization: private
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.6 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Bernd Felsche <[email-masked]>
CC: dimmy <[email-masked]>, [email-masked],
AVR GCC List <[email-masked]>, [email-masked]
Subject: Re: [avr-gcc-list] COMPILER Frame pointer bug!!!
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I also thougt about this problem, but if all routines locking interrupts
or modifying the stats register are written in the correct way (with
restoring flags) then, there is NO problem, if there is an interruption
within save-flags and CLI. Because the interrupt has to restore the
flags, so everything has a consistent state. The most CPU architectures
I know, cannot save the flags and CLI in an atomic way.

With friendly regards
Christoph P.

Bernd Felsche wrote:
>
> Christoph Plattner tapped away at the keyboard with:
>
> > No the code is OK, you simple have overseen the interrupt handling.
> >
> > Using cli/sei is ALWAYS WRONG and many old operating system errors
> > have to be searched. The correct handling is (used C style to
> > explain):
> >
> > flags = save_cpu_flags (); /* inlcuding Interrupt Enable bit */
> > cli (); /* disable interrupts */
> >
> > < critical code >
> >
> > restore_cpu_flags (flags); /* set the old IE state !!! */
>
> Unfortunately, there's the opportunity for an interrupt to occur
> between the save and the interrupt disable. Or did I miss something
> in the instruction set details?
>
> This is pretty much a short-coming of the AVR. If the cli() and
> sei() were both save the previous status of the interrupt flag to
> (say) the carry bit, then the previous state could be restored
> reliably, under all circumstances.
>
> [snip]
>
> --
> /"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia
> \ / ASCII ribbon campaign | I'm a .signature virus! |
> X against HTML mail | Copy me into your ~/.signature|
> / \ and postings | to help me spread! |

--
-------------------------------------------------------
private: [email-masked]
company: [email-masked]

From [email-masked] Mon Nov 19 13:40:54 2001
Received: from innovative.iinet.net.au ([203.59.144.24] helo=sprocket.innovative.iinet.net.au)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 165cUW-0005zn-00
for <[email-masked]>; Mon, 19 Nov 2001 13:40:53 +1300
Received: (from uucp@localhost)
by sprocket.innovative.iinet.net.au (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id IAA16775
for <[email-masked]>; Mon, 19 Nov 2001 08:42:55 +0800
Received: from UNKNOWN(203.6.142.20), claiming to be "flywheel.innovative.iinet.net.au"
via SMTP by innovative.iinet.net.au, id smtpdZTS8xt; Mon Nov 19 00:42:36 2001
Received: (from bernie@localhost)
by flywheel.innovative.iinet.net.au (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) id fAJ0gYg15768;
Mon, 19 Nov 2001 08:42:34 +0800
From: Bernd Felsche <[email-masked]>
Message-Id: <[email-masked]>
Subject: Re: [avr-gcc-list] COMPILER Frame pointer bug!!!
In-Reply-To: <[email-masked]> from Christoph Plattner at "Nov 18, 2001
11:02:26 pm"
To: [email-masked], [email-masked],
List <[email-masked]>
Date: Mon, 19 Nov 2001 08:42:34 +0800 (WST)
X-Mailer: ELM [version 2.4ME+ PL60 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Christoph Plattner tapped away at the keyboard with:
> Bernd Felsche wrote:
> > Christoph Plattner tapped away at the keyboard with:
> >
> > > No the code is OK, you simple have overseen the interrupt handling.
> > >
> > > Using cli/sei is ALWAYS WRONG and many old operating system errors
> > > have to be searched. The correct handling is (used C style to
> > > explain):
> > >
> > > flags = save_cpu_flags (); /* inlcuding Interrupt Enable bit */
> > > cli (); /* disable interrupts */
> > >
> > > < critical code >
> > >
> > > restore_cpu_flags (flags); /* set the old IE state !!! */
> >
> > Unfortunately, there's the opportunity for an interrupt to occur
> > between the save and the interrupt disable. Or did I miss something
> > in the instruction set details?
> >
> > This is pretty much a short-coming of the AVR. If the cli() and
> > sei() were both save the previous status of the interrupt flag to
> > (say) the carry bit, then the previous state could be restored
> > reliably, under all circumstances.

> I also thougt about this problem, but if all routines locking
> interrupts or modifying the stats register are written in the
> correct way (with restoring flags) then, there is NO problem, if
> there is an interruption within save-flags and CLI. Because the
> interrupt has to restore the flags, so everything has a consistent
> state. The most CPU architectures I know, cannot save the flags
> and CLI in an atomic way.

An interrupt will firstly clear the bit, then set it if it executes
a RETI to continue previous processing. That's where I was getting
confuddled. Restoring the flags from a saved value is "correct".

From [email-masked] Mon Nov 19 21:03:07 2001
Received: from for.spb.ru ([195.201.69.16] helo=cyclone.eis.ru)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 165jOS-0006Ky-00
for <[email-masked]>; Mon, 19 Nov 2001 21:03:04 +1300
Received: (qmail 14995 invoked from network); 19 Nov 2001 08:05:49 -0000
Received: from good.for.spb.ru (HELO eis.ru) (195.201.69.80)
by for.spb.ru with SMTP; 19 Nov 2001 08:05:49 -0000
Date: Mon, 19 Nov 2001 11:03:46 +0300
From: Dmitry <[email-masked]>
To: Jason Kyle <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] COMPILER Frame pointer bug!!!
Message-Id: <[email-masked]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
<[email-masked]>
<[email-masked]>
Organization: eis.ru
X-Mailer: Sylpheed version 0.5.3 (GTK+ 1.2.8; i386-unknown-freebsd5.0)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Fellows!

The code is Ok, but it seems to me, that I got an interrupt on the SP update.

But anyway I think that lines out __SREG__,__tmp_reg__ and out __SP_L__,r28 should be swapped.
... also, I think that stack pointer should be latched by hardware during read/write operations.

Thanks for all who replied

Dmitry

> At 21:26 17/11/2001 +0300, dimmy wrote:
> >Fellows,
> >
> >I found strange avr-gcc behaviour.
> >
> >If you declare a function with a variable number of arguments or the
> >number of arguments is over 18 (actually, total number of bytes, required
> >for arguments) or you allocate over 18 bytes inside the function, then
> >avr-gcc disables interrupts on enter to the function and does not enable
> >them anymore.
> >
> >This is valid only in case, when frame pointer cannot be eliminated or
> >when no optimization enabled.
> <snip>
>
>

*********************************************************************
("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ
`6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys
(_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44
_..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia
(il),-'' (li),' ((!.-' +7 (812) 314-8860, 5585314
*********************************************************************

From [email-masked] Mon Nov 19 21:41:58 2001
Received: from mail.tps.de ([195.126.171.2] ident=daemon)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 165k04-0006NY-00
for <[email-masked]>; Mon, 19 Nov 2001 21:41:57 +1300
Received: (from daemon@localhost)
by mail.tps.de (8.8.7/8.8.7) id JAA01842
for <[email-masked]>; Mon, 19 Nov 2001 09:44:47 +0100
Received: from UNKNOWN(193.96.199.65), claiming to be "goepplinux"
via SMTP by mail.tps.de, id smtpda01840; Mon Nov 19 09:44:36 2001
From: Matthias =?iso-8859-1?q?G=F6ppner?= <[email-masked]>
Organization: TSP
To: AVR-GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Newbie: Writing Efficient C Code For AVR Microcontrollers.
Date: Fri, 16 Nov 2001 11:13:04 +0100
X-Mailer: KMail [version 1.1.99]
Content-Type: text/plain;
charset="us-ascii"
References: <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Message-Id: <01111611130401.00862@goepplinux>
Content-Transfer-Encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Am Donnerstag, 15. November 2001 16:31 schrieb John Branthoover:
> Hello All,
> I am currently writing C code for my first AVR
> project. Being fairly new to C, I am concerned about
> writing inefficient code and wasting program memory
> space.

You do better in focussing to writing good, easy to understand code
with a clear design. Maybe that`s enough to meet your requirements.
Surely it will reduce your total developing time.

And that`s a good base for further steps:
First let the compiler optimize your code. Optimization is sometimes
tedious work which can be done automatically. Only if that isn`t
enough you have to optimize by hand (addressing arrays with pointers,
...)

Regards
Matthias

--
TSP - Teleprocessing Systems & Products mbH
Matthias Goeppner [email-masked]
Altenreuth 5 95326 Kulmbach - Germany
phone: +49 9221 804253 fax : +49 9221 8219015

From [email-masked] Mon Nov 19 19:43:34 2001
Received: from diament.ists.pwr.wroc.pl ([156.17.130.3] ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 165i9U-0006H6-00
for <[email-masked]>; Mon, 19 Nov 2001 19:43:33 +1300
Received: (qmail 8322 invoked by uid 1652); 19 Nov 2001 06:46:13 -0000
Message-ID: <[email-masked]>
From: [email-masked]
To: [email-masked]
Date: Mon, 19 Nov 2001 07:46:13 +0100 (CET)
X-Mailer: ELM [version 2.4ME+ PL66 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] www.amelek.gda.pl is down
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

The www.amelek.gda.pl server (containing avr-libc, uisp and
handling my primary DNS and mail) is down since last Saturday
(was still OK on Friday). I'll check today what is going on -
the box is in an unattended location, as France Telecom [1]
lacks "technical possibilities" [2] to move my permanent
Internet connection to a new location.

Previous failure about 2 weeks ago was caused by a cheap ATX
power supply that decided to die. These things always happen
on weekends or holidays...

Marek

[1] really still called TPSA (http://www.tpsa.pl/), but being
sold by our government to another state-owned monopoly, only
now in a foreign country

[2] that's what they tell you when they don't want to spend
money on a new Ericsson HiS shelf for 16 subscribers

From [email-masked] Mon Nov 19 22:31:26 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 165klx-0006QV-00
for <[email-masked]>; Mon, 19 Nov 2001 22:31:26 +1300
Received: from marekm by alf.amelek.gda.pl with local (Exim 3.33 #1 (Debian))
id 165khQ-0000uy-00; Mon, 19 Nov 2001 10:26:44 +0100
Subject: Re: [avr-gcc-list] COMPILER Frame pointer bug!!!
In-Reply-To: <[email-masked]>
To: dimmy <[email-masked]>
Date: Mon, 19 Nov 2001 10:26:44 +0100 (CET)
CC: AVR GCC List <[email-masked]>, [email-masked]
X-Mailer: ELM [version 2.4ME+ PL94 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Message-Id: <[email-masked]>
From: Marek Michalkiewicz <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> I found strange avr-gcc behaviour.

Don't panic! :)

> in __tmp_reg__,__SREG__ ; this saves the I flag
> cli ; <=====
> DISABLE INTERRUPTS
> out __SP_H__,r29
> out __SREG__,__tmp_reg__ ; this restores its previous state
> out __SP_L__,r28 ; interrupt can come after this instruction

> And no 'sei' instruction in the function body!!!

That would be wrong, as the function could be called with interrupts
already disabled, and shouldn't enable them in this case.

Hope this helps,
Marek

From [email-masked] Mon Nov 19 22:46:20 2001
Received: from atusks01.alcatel.at ([212.183.9.130] helo=mail.alcatel.at)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 165l0M-0006SF-00
for <[email-masked]>; Mon, 19 Nov 2001 22:46:19 +1300
Received: from alcatel.at (atusel33.aut.alcatel.at [146.112.129.215])
by mail.alcatel.at (8.9.3/8.9.3/1.21 01/27/01 21:43:09) with ESMTP id KAA00181;
Mon, 19 Nov 2001 10:40:44 +0100 (MET)
Message-ID: <[email-masked]>
Date: Mon, 19 Nov 2001 10:40:43 +0100
From: Christoph Plattner <[email-masked]>
Organization: AAA
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.8 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
To: Dmitry <[email-masked]>
CC: Jason Kyle <[email-masked]>, [email-masked]
Subject: Re: [avr-gcc-list] COMPILER Frame pointer bug!!!
References: <[email-masked]>
<[email-masked]>
<[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Again, the swapping here is not necessary ! After the interrupt is
enabled
again (restore SREG), it is guaranteed, that on instruction of the
current
code sequence is executed. So the SP_L writing is done, before any
interrupt
occurs.

With friendly regards
Christoph P.

Dmitry wrote:
>
> Fellows!
>
> The code is Ok, but it seems to me, that I got an interrupt on the SP update.
>
> But anyway I think that lines out __SREG__,__tmp_reg__ and out __SP_L__,r28 should be swapped.
> ... also, I think that stack pointer should be latched by hardware during read/write operations.
>
> Thanks for all who replied
>
> Dmitry
>
> > At 21:26 17/11/2001 +0300, dimmy wrote:
> > >Fellows,
> > >
> > >I found strange avr-gcc behaviour.
> > >
> > >If you declare a function with a variable number of arguments or the
> > >number of arguments is over 18 (actually, total number of bytes, required
> > >for arguments) or you allocate over 18 bytes inside the function, then
> > >avr-gcc disables interrupts on enter to the function and does not enable
> > >them anymore.
> > >
> > >This is valid only in case, when frame pointer cannot be eliminated or
> > >when no optimization enabled.
> > <snip>
> >
> >
>
> *********************************************************************
> ("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ
> `6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys
> (_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44
> _..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia
> (il),-'' (li),' ((!.-' +7 (812) 314-8860, 5585314
> *********************************************************************
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
+--------V--------+ [email-masked]
| A L C A T E L | -----------------------------
+-----------------+ Phone: +43 1 27722 3706
T A S Fax: +43 1 27722 3955

From [email-masked] Mon Nov 19 22:49:48 2001
Received: from pf107.gdansk.sdi.tpnet.pl ([213.77.129.107] helo=alf.amelek.gda.pl)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 165l3j-0006Sj-00
for <[email-masked]>; Mon, 19 Nov 2001 22:49:48 +1300
Received: from marekm by alf.amelek.gda.pl with local (Exim 3.33 #1 (Debian))
id 165l6P-00014E-00
for <[email-masked]>; Mon, 19 Nov 2001 10:52:33 +0100
To: [email-masked]
Date: Mon, 19 Nov 2001 10:52:33 +0100 (CET)
X-Mailer: ELM [version 2.4ME+ PL94 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Message-Id: <[email-masked]>
From: Marek Michalkiewicz <[email-masked]>
Subject: [avr-gcc-list] www.amelek.gda.pl is back up
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

Following up my previous mail (sent from a different address that was not
subscribed, so probably still in moderator queue), my server is back up.

Luckily, it was only a long power failure (Saturday 14:30 to Monday 8:30),
tripped circuit breaker (overloaded by someone else's oven - my box is not
THAT big, draws only about 40W :) and no one was there to reset it, so the
system has been shut down safely after running on UPS for 5 minutes...

Marek

From [email-masked] Mon Nov 19 23:59:43 2001
Received: from mail.arrow.altech.co.za ([196.28.127.102] helo=aadpdc.arrow.altech.co.za)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 165m9O-0006Wx-00
for <[email-masked]>; Mon, 19 Nov 2001 23:59:43 +1300
Received: by arrow.altech.co.za with Internet Mail Service (5.5.2448.0)
id <VWYXQQVT>; Mon, 19 Nov 2001 12:54:02 +0200
Message-ID: <[email-masked]>
From: Andries Posthumus <[email-masked]>
To: [email-masked]
Date: Mon, 19 Nov 2001 12:54:01 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C170E8.7F6A1CCE"
Subject: [avr-gcc-list] AVRStudio - coff error
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C170E8.7F6A1CCE
Content-Type: text/plain;
charset="iso-8859-1"

Hi everybody

Please help ... When I loadup the coff file which are generated with the elf
converter, AVR Studio causes an error, and close down again.

Regards

Andries Posthumus

------_=_NextPart_001_01C170E8.7F6A1CCE
Content-Type: text/html;
charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

<META content="MSHTML 5.00.3103.1000" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=767490511-19112001>Hi
everybody</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=767490511-19112001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=767490511-19112001>Please help ... When
I loadup the coff file which are generated with the elf converter, AVR Studio
causes an error, and close down again.</SPAN></FONT></DIV>
<DIV class=Section1>
<P><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">Regards</SPAN> </P>
<P><B><U><SPAN style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">Andries
Posthumus</SPAN></U></B><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">
</SPAN></P></DIV></BODY></HTML>

------_=_NextPart_001_01C170E8.7F6A1CCE--

From [email-masked] Tue Nov 20 06:54:07 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 165scQ-0006wM-00
for <[email-masked]>; Tue, 20 Nov 2001 06:54:06 +1300
Received: from 199.182.90.246.ras04.den.iras.frii.net (199.182.90.246.ras04.den.iras.frii.net [199.182.90.246])
by deimos.frii.net (8.11.6/8.11.6) with ESMTP id fAJHuxN12613
for <[email-masked]>; Mon, 19 Nov 2001 10:56:59 -0700 (MST)
Date: Mon, 19 Nov 2001 10:59:00 -0700 (MST)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: AVR GCC List <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] autoconf macros
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all.

I'm converting my build system for my project to use autotools and was
wondering if anyone has already written autoconf macros for checking for
avr-gcc and avrlibc (and maybe uisp)? I've done a quick search of the web
with no results.

It seems to me that these could be useful to quite a few projects out
there. If these macros don't exist and I write them, would any body be
interested in them?

Ted Roth

From [email-masked] Tue Nov 20 07:11:40 2001
Received: from gateway.coinco.com ([209.144.41.178] helo=exchange_ca.CoinCo.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 165stQ-0006xK-00
for <[email-masked]>; Tue, 20 Nov 2001 07:11:40 +1300
Received: by exchange_ca.coinco.com with Internet Mail Service (5.5.2653.19)
id <WSFZYFRZ>; Mon, 19 Nov 2001 12:14:44 -0600
Message-ID: <[email-masked]>
From: Bart McCoard <[email-masked]>
To: [email-masked]
Date: Mon, 19 Nov 2001 12:14:40 -0600
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C17126.0E74DC00"
Subject: [avr-gcc-list] IDE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C17126.0E74DC00
Content-Type: text/plain;
charset="iso-8859-1"

Does anyone know of a good IDE that can be used to edit C code and execute
command line batch files for use with AVR-GCC and Windows? I've been using
multi-edit, but its not free. I need something that can pipe compiler,
assembler and linker information to a window. I've also used the free IAR
IDE that comes with the IAR assembler, but I dont like it.

Thanks
Bart

------_=_NextPart_001_01C17126.0E74DC00
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>IDE</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Arial">Does anyone know of a good IDE that =
can be used to edit C code and execute command line batch files for use =
with AVR-GCC and Windows?&nbsp; I've been using multi-edit, but its not =
free.&nbsp; I need something that can pipe compiler, assembler and =
linker information to a window.&nbsp; I've also used the free IAR IDE =
that comes with the IAR assembler, but I dont like it.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Thanks</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Bart </FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C17126.0E74DC00--

From [email-masked] Tue Nov 20 12:35:31 2001
Received: from herndon10.his.com
([209.67.207.13] helo=mail.his.com ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 165xwp-0007FG-00
for <[email-masked]>; Tue, 20 Nov 2001 12:35:31 +1300
Received: from lapper.tfb.com (max1h-51.his.com [216.32.85.51])
by mail.his.com (8.9.3/8.9.3) with ESMTP id SAA03727;
Mon, 19 Nov 2001 18:38:25 -0500 (EST)
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Mon, 19 Nov 2001 15:35:46 -0800
To: Bart McCoard <[email-masked]>, [email-masked]
From: ChristoGeo <[email-masked]>
Subject: Re: [avr-gcc-list] IDE
In-Reply-To: <[email-masked]
o.com>
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="=====================_358094==_.ALT"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--=====================_358094==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed

I would recommed "rhide" from www.rhide.com. It is 100% clone of Borland
C++ v3.1 for dos!!! There is a linux version and dos version! It's real nice.

Christo

At 12:14 PM 11/19/2001 -0600, Bart McCoard wrote:

>Does anyone know of a good IDE that can be used to edit C code and execute
>command line batch files for use with AVR-GCC and Windows? I've been
>using multi-edit, but its not free. I need something that can pipe
>compiler, assembler and linker information to a window. I've also used
>the free IAR IDE that comes with the IAR assembler, but I dont like it.
>
>Thanks
>Bart

--=====================_358094==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
I would recommed &quot;rhide&quot; from
<a href="http://www.rhide.com/" eudora="autourl">www.rhide.com</a>.&nbsp;
It is 100% clone of Borland C++ v3.1 for dos!!!&nbsp; There is a linux
version and dos version!&nbsp; It's real nice.<br><br>
Christo<br><br>
At 12:14 PM 11/19/2001 -0600, Bart McCoard wrote:<br><br>
<blockquote type=cite class=cite cite><font size=2>Does anyone know of a
good IDE that can be used to edit C code and execute command line batch
files for use with AVR-GCC and Windows?&nbsp; I've been using multi-edit,
but its not free.&nbsp; I need something that can pipe compiler,
assembler and linker information to a window.&nbsp; I've also used the
free IAR IDE that comes with the IAR assembler, but I dont like it.<br>
</font><br>
<font size=2>Thanks</font> <br>
<font size=2>Bart </font></blockquote></html>

--=====================_358094==_.ALT--

From [email-masked] Tue Nov 20 20:51:55 2001
Received: from r220-1.rz.rwth-aachen.de ([134.130.3.31])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1665hB-0007fF-00
for <[email-masked]>; Tue, 20 Nov 2001 20:51:54 +1300
Received: from r220-1.rz.RWTH-Aachen.DE (relay2.RWTH-Aachen.DE [134.130.3.1])
by r220-1.rz.RWTH-Aachen.DE (8.10.1/8.11.3-2) with ESMTP id fAK7scV05225
for <[email-masked]>; Tue, 20 Nov 2001 08:54:48 +0100 (MET)
Received: from Ostermann-net.de (pD952C15B.dip.t-dialin.net [217.82.193.91])
by r220-1.rz.RWTH-Aachen.DE (8.10.1/8.11.3/6) with SMTP id fAK7sbX05220
for <[email-masked]>; Tue, 20 Nov 2001 08:54:37 +0100 (MET)
Message-Id: <[email-masked]>
Date: Tue, 20 Nov 2001 08:46:31 +0100
From: Thorsten Ostermann <[email-masked]>
To: [email-masked]
X-Mailer: Thorsten Ostermann's registered AK-Mail 3.1 publicbeta2a [ger]
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] Re: IDE (Bart McCoard)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Bart!

> Does anyone know of a good IDE that can be used to edit C code and
> execute command line batch files for use with AVR-GCC and Windows?
> I've been using multi-edit, but its not free. I need something that
> can pipe compiler, assembler and linker information to a window.

UltraEdit32 does all this, and a lot of more, but it isn't free, too.
But I'm very happy with it. Syntax highlighthing for HTML, C, Java,
AVR-ASM(!) and many others, Hex-Editor, compare function, macros,
(simple?) FTP, projects, ...

Have a look at http://www.ultraedit.com

Best regards
Thorsten Ostermann
--
http://www.NC-Step.de
Schrittmotor- und Mikrocontrollerl=F6sungen
Einfacher & preiswerter Einstieg mit Baus=E4tzen!

From [email-masked] Tue Nov 20 23:23:54 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16684H-0007nT-00
for <[email-masked]>; Tue, 20 Nov 2001 23:23:53 +1300
Received: (from j@localhost)
by ida.interface-business.de id fAKAQhU00106;
Tue, 20 Nov 2001 11:26:43 +0100 (MET)
Date: Tue, 20 Nov 2001 11:26:43 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] IDE
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Bart McCoard <[email-masked]> wrote:

> Does anyone know of a good IDE that can be used to edit C code and
> execute command line batch files for use with AVR-GCC and Windows?

Well, the generic answer to this question is: Emacs. ;-)

Don't know how good the Windows version of Emacs is working, though.
And of course, Emacs is nothing everybody could even get used to --
but those who did usually don't need anything else.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Wed Nov 21 00:57:28 2001
Received: from bifrost.mjolner.dk
([130.225.4.254] helo=geri.mjolner.dk ident=hidden-user)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 1669Wp-0007tL-00
for <[email-masked]>; Wed, 21 Nov 2001 00:57:27 +1300
Received: (qmail 10442 invoked by uid 2413); 20 Nov 2001 12:00:23 -0000
Date: Tue, 20 Nov 2001 13:00:23 +0100
From: Flemming Gram Christensen <[email-masked]>
To: Joerg Wunsch <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] IDE
Message-ID: <[email-masked]>
References: <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Tue, Nov 20, 2001 at 11:26:43AM +0100
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Tue, Nov 20, 2001 at 11:26:43AM +0100, Joerg Wunsch wrote:
> Bart McCoard <[email-masked]> wrote:
>
> > Does anyone know of a good IDE that can be used to edit C code and
> > execute command line batch files for use with AVR-GCC and Windows?
>
> Well, the generic answer to this question is: Emacs. ;-)

I second this.

It integrates with gdb in a very nice way.

Create Makefiles for your projects, load source code
type M-x compile (M-x being meta-x or alt-x on windows).

Also TAGS files and tag-search is very usefull.

Regards
Flemming

>
> Don't know how good the Windows version of Emacs is working, though.
> And of course, Emacs is nothing everybody could even get used to --
> but those who did usually don't need anything else.
>
> --
> J"org Wunsch Unix support engineer
> [email-masked] http://www.interface-systems.de/~j/
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
Flemming Gram Christensen, M.Sc., Software Engineer, Mjølner Informatics
------------------------------------------------------------------------
Mjolner Informatics A/S Phone: +45 70 27 43 43
Helsingforsgade 27 Fax: +45 70 27 43 44
DK-8200 Aarhus N, Denmark E-mail: [email-masked]
------------------------------------------------------------------------

From [email-masked] Wed Nov 21 01:18:26 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1669r6-0007ub-00
for <[email-masked]>; Wed, 21 Nov 2001 01:18:24 +1300
Received: (from j@localhost)
by ida.interface-business.de id fAKCLKc00491
for [email-masked]; Tue, 20 Nov 2001 13:21:20 +0100 (MET)
Date: Tue, 20 Nov 2001 13:21:20 +0100
From: Joerg Wunsch <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] IDE
Message-ID: <[email-masked]>
Reply-To: Joerg Wunsch <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Tue, Nov 20, 2001 at 01:00:23PM +0100
X-Phone: +49-351-31809-14
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
Organization: interface systems GmbH, Dresden
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

As Flemming Gram Christensen wrote:

> Create Makefiles for your projects, load source code
> type M-x compile (M-x being meta-x or alt-x on windows).

Of course, you can easily customize this to bind it onto an F-key of
your choice. ;-) (For me, F5 is "compile", and F3 runs "gdb".)

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Wed Nov 21 06:04:43 2001
Received: from mx.pcnet.ro ([213.154.128.3])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 166EK2-0008Ah-00
for <[email-masked]>; Wed, 21 Nov 2001 06:04:42 +1300
Received: from rally.localdomain (IDENT:[email-masked] [213.154.130.17] (may be forged))
by mx.pcnet.ro (8.9.3/8.9.3) with ESMTP id TAA24717
for <[email-masked]>; Tue, 20 Nov 2001 19:06:50 +0200
Received: from localhost (IDENT:cburneci@localhost [127.0.0.1])
by rally.localdomain (8.9.3/8.8.7) with ESMTP id TAA00783
for <[email-masked]>; Tue, 20 Nov 2001 19:04:27 +0200
Message-Id: <[email-masked]>
Date: Tue, 20 Nov 2001 19:04:25 +0200
From: Cristian Burneci <[email-masked]>
To: "avr-gcc list" <[email-masked]>
Reply-To: [email-masked]
X-Mailer: Spruce 0.7.6 for X11 w/smtpio 0.9.0
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Subject: [avr-gcc-list] Re:[avr-gcc list] IDE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Mon, 19 Nov 2001 12:14:40 -0600 Bart McCoard <[email-masked]>
wrote:

> Does anyone know of a good IDE that can be used to edit C code and
execute
> command line batch files for use with AVR-GCC and Windows? I've been
using
> multi-edit, but its not free. I need something that can pipe compiler,
> assembler and linker information to a window. I've also used the free
IAR
> IDE that comes with the IAR assembler, but I dont like it.

I use Setedit. It uses a Turbo-Vision like interface and it was meant to be
used with GCC. Among other features it parses the output of GCC and sends
you right to the line of source the error has occured. It even opens the
file in question for you. It is free. Versions for DOS/Windows and Linux
available at:

http://members.xoom.com/stropea/
http://setsoft.webjump.com/
or any Simtelnet mirror, example:
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2apps/edi*.zip

Cristian Burneci

From [email-masked] Wed Nov 21 07:21:06 2001
Received: from mx04.nexgo.de ([151.189.8.80])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 166FW5-0008Jd-00
for <[email-masked]>; Wed, 21 Nov 2001 07:21:06 +1300
Received: from kleinertiga.local (dialin-145-254-116-229.arcor-ip.net [145.254.116.229])
by mx04.nexgo.de (Postfix) with ESMTP id D8E6E37F16
for <[email-masked]>; Tue, 20 Nov 2001 19:18:54 +0100 (CET)
Received: from gmx.de (localhost [127.0.0.1])
by kleinertiga.local (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id fAKIGCe01529
for <[email-masked]>; Tue, 20 Nov 2001 19:18:20 +0100
X-Authentication-Warning: kleinertiga.local: Host localhost [127.0.0.1] claimed to be gmx.de
Message-ID: <[email-masked]>
Date: Tue, 20 Nov 2001 19:16:11 +0100
From: Klaus Rudolph <[email-masked]>
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Using .data & bss
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

if i want to use the .data section i can write in assembler:

.data
label1: .byte 10,20,30
label2: .byte 1,2,3
label3: .skip 10
...

but that give me the bytes in the text section again, normaly the
startup code is
copys the text to the data section so that i have initialisized ram,
fine.
But i want not initialisized ram and no allocation of additional space
in the
text section.

.bss
label1: .skip 3
label2: .skip 3
label3: .skip 10

But there is no .bss in avr-gcc. What is the solution.

bye
Klaus

From [email-masked] Wed Nov 21 07:48:14 2001
Received: from mx04.nexgo.de ([151.189.8.80])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 166FwK-0008Lc-00
for <[email-masked]>; Wed, 21 Nov 2001 07:48:13 +1300
Received: from kleinertiga.local (dialin-145-254-116-140.arcor-ip.net [145.254.116.140])
by mx04.nexgo.de (Postfix) with ESMTP id 202AE37F5A
for <[email-masked]>; Tue, 20 Nov 2001 19:51:13 +0100 (CET)
Received: from gmx.de (localhost [127.0.0.1])
by kleinertiga.local (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id fAKIoXe01909
for <[email-masked]>; Tue, 20 Nov 2001 19:50:39 +0100
X-Authentication-Warning: kleinertiga.local: Host localhost [127.0.0.1] claimed to be gmx.de
Message-ID: <[email-masked]>
Date: Tue, 20 Nov 2001 19:50:33 +0100
From: Klaus Rudolph <[email-masked]>
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] uisp with segmentation fault
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

i have a system with an older linux installation (suse 6.x) where a
gcc 2.91 is installed. On an other linux box i have installed a
2.92.2 compiler. Here i compiled the uisp with the
--static option to link it staticly. I copied this static uisp to
my old box and there it crashes with segmentation fault.

with:
strace -fo dump uisp -dstk200 --erase
i got:
1419 execve("./uisp", ["uisp", "-dstk200", "--erase"], [/* 68 vars */])
= 0
1419 fcntl(0, F_GETFD) = 0
1419 fcntl(1, F_GETFD) = 0
1419 fcntl(2, F_GETFD) = 0
1419 geteuid() = 500
1419 getuid() = 500
1419 getegid() = 100
1419 getgid() = 100
1419 brk(0) = 0x80a49d4
1419 brk(0x80a49f4) = 0x80a49f4
1419 brk(0x80a5000) = 0x80a5000
1419 getpid() = 1419
1419 --- SIGSEGV (Speicherzugriffsfehler) ---
1419 +++ killed by SIGSEGV +++
~

Any ideas? Is it not possible to link a source static and use it on an
older box?

bye
Klaus

From [email-masked] Wed Nov 21 09:13:15 2001
Received: from viefep14-int.chello.at ([213.46.255.13])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 166HGb-0008Qs-00
for <[email-masked]>; Wed, 21 Nov 2001 09:13:14 +1300
Received: from gmx.at ([62.178.92.247]) by viefep14-int.chello.at
(InterMail vM.5.01.03.06 201-253-122-118-106-20010523) with ESMTP
id <[email-masked]>;
Tue, 20 Nov 2001 21:15:39 +0100
Message-ID: <[email-masked]>
Date: Tue, 20 Nov 2001 21:15:39 +0100
From: Christoph Plattner <[email-masked]>
Organization: private
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.6 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Klaus Rudolph <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] uisp with segmentation fault
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I have not seen it from the strace, but have you thouht about the fact,
that you MUST be `root' !!

The uisp uses the `ioperm' call to get access to the io-ports. This call
need's root priviledges. From strace I see, that you are the user "500"
not "0" !! (getuid !)

Switch to the user root and uisp will work.

With friendly regards
Christoph P.

Klaus Rudolph wrote:
>
> Hi all,
>
> i have a system with an older linux installation (suse 6.x) where a
> gcc 2.91 is installed. On an other linux box i have installed a
> 2.92.2 compiler. Here i compiled the uisp with the
> --static option to link it staticly. I copied this static uisp to
> my old box and there it crashes with segmentation fault.
>
> with:
> strace -fo dump uisp -dstk200 --erase
> i got:
> 1419 execve("./uisp", ["uisp", "-dstk200", "--erase"], [/* 68 vars */])
> = 0
> 1419 fcntl(0, F_GETFD) = 0
> 1419 fcntl(1, F_GETFD) = 0
> 1419 fcntl(2, F_GETFD) = 0
> 1419 geteuid() = 500
> 1419 getuid() = 500
> 1419 getegid() = 100
> 1419 getgid() = 100
> 1419 brk(0) = 0x80a49d4
> 1419 brk(0x80a49f4) = 0x80a49f4
> 1419 brk(0x80a5000) = 0x80a5000
> 1419 getpid() = 1419
> 1419 --- SIGSEGV (Speicherzugriffsfehler) ---
> 1419 +++ killed by SIGSEGV +++
> ~
>
> Any ideas? Is it not possible to link a source static and use it on an
> older box?
>
> bye
> Klaus
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
-------------------------------------------------------
private: [email-masked]
company: [email-masked]

From [email-masked] Wed Nov 21 09:49:15 2001
Received: from mx04.nexgo.de ([151.189.8.80])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 166HpS-0008TE-00
for <[email-masked]>; Wed, 21 Nov 2001 09:49:14 +1300
Received: from kleinertiga.local (dialin-145-254-111-120.arcor-ip.net [145.254.111.120])
by mx04.nexgo.de (Postfix) with ESMTP
id 1BD0637AF1; Tue, 20 Nov 2001 21:52:15 +0100 (CET)
Received: from gmx.de (localhost [127.0.0.1])
by kleinertiga.local (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id fAKKpae02590;
Tue, 20 Nov 2001 21:51:41 +0100
X-Authentication-Warning: kleinertiga.local: Host localhost [127.0.0.1] claimed to be gmx.de
Message-ID: <[email-masked]>
Date: Tue, 20 Nov 2001 21:51:35 +0100
From: Klaus Rudolph <[email-masked]>
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Christoph Plattner <[email-masked]>,
[email-masked]
Subject: Re: [avr-gcc-list] uisp with segmentation fault
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Chritoph,

>
> I have not seen it from the strace, but have you thouht about the fact,
> that you MUST be `root' !!

I tried uisp as root as well, that change not the bahavior. You are
right that
I tested with strace with user rights. Sorry. But my root-strace
looks absoluly equal, only the uid (0) and the pid is an other.
After getpid it crashes. :-(

>
> The uisp uses the `ioperm' call to get access to the io-ports. This call
> need's root priviledges. From strace I see, that you are the user "500"
> not "0" !! (getuid !)
In the dump you can see no ioperm call. I think there is a problem with
librarys
but where and how to fix that?

>
> Switch to the user root and uisp will work.
No :-(

Bye,

Klaus

From [email-masked] Wed Nov 21 10:15:47 2001
Received: from mail.forpost.ru ([217.23.68.3] helo=overta.ru)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 166IF8-0008VD-00
for <[email-masked]>; Wed, 21 Nov 2001 10:15:47 +1300
Received: from [195.151.217.150] (HELO localhost.localdomain)
by overta.ru (CommuniGate Pro SMTP 3.4.7)
with ESMTP id 1073442; Wed, 21 Nov 2001 00:18:15 +0300
To: Dmitry <[email-masked]>
Cc: Jason Kyle <[email-masked]>, [email-masked]
Subject: Re: [avr-gcc-list] COMPILER Frame pointer bug!!!
References: <[email-masked]>
<[email-masked]>
<[email-masked]>
<[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 21 Nov 2001 00:16:23 +0300
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
Lines: 16
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Dmitry <[email-masked]> writes:

> Fellows!
>
> The code is Ok, but it seems to me, that I got an interrupt on the SP update.
>
> But anyway I think that lines out __SREG__,__tmp_reg__ and out
> __SP_L__,r28 should be swapped.

I'm agree this seems strange, but ...

It's a specific point of avr architecture.
Interrupts will be enabled only after the next instruction (after out
__SREG__) will be executed.

Denis.

From [email-masked] Wed Nov 21 19:05:55 2001
Received: from sense-smead-139.oz.net ([216.39.162.139] helo=henry.amplepower.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 166QWA-0000Wi-00
for <[email-masked]>; Wed, 21 Nov 2001 19:05:55 +1300
Received: from mail.amplepower.com ([email-masked] [192.168.8.220])
by henry.amplepower.com (8.8.7/8.8.7) with ESMTP id WAA02410
for <[email-masked]>; Tue, 20 Nov 2001 22:08:48 -0800
Date: Tue, 20 Nov 2001 22:08:47 -0800 (PST)
From: David Smead <[email-masked]>
To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] gcc problems
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I installed the latest gcc tools for avr, but must have configured
something wrong because it has the wrong path to some expected files.
Here is what I'm running and the errors.

[smead@feynman demo]$ make
avr-gcc -I/usr/local/avr/include -MM simple-demo.c > simple-demo.d
avr-gcc -I/usr/local/avr/include -mmcu=at90s2333 -g -O0 -Wall -c
simple-demo.c -o simple-demo.o
simple-demo.c:82: warning: return type of `main' is not `int'
avr-gcc -o demo simple-demo.o -mmcu=at90s2333
/usr/local/avr/lib/gcc-lib/avr/3.0.2/../../../../avr/bin/ld: cannot open
crts2333.o: No such file or directory
make: *** [demo] Error 1

[smead@feynman demo]$ locate crts2333.o
/home/smead/upload/avr/src/avr-libc-20011029/src/crts2333.o
/usr/local/avr/lib/crts2333.o

Can someone tell me what I need to do to point avr-gcc -o to the correst
crts.o? Thanks.

--
Sincerely,

David Smead
http://www.amplepower.com.

From [email-masked] Thu Nov 22 01:22:06 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 166WOD-0000qi-00
for <[email-masked]>; Thu, 22 Nov 2001 01:22:05 +1300
Received: from otris.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id NAA10840
for <[email-masked]>; Wed, 21 Nov 2001 13:25:06 +0100
Message-ID: <[email-masked]>
Date: Wed, 21 Nov 2001 13:31:56 +0100
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] GCC 3.0.2 binutils 2.11.2 avr-libc-20011029 available for windows &
linux
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I have built new binaries from the current release versions of the
development tools.

Although 'elfcoff' works fine, the patch for the avrobj target is
included.
With elfcoff you are able to use the variable watch of avrstudio (tested
with 3.53).

There are Win32 and linux versions of the binaries. The linux version is
also available as a convenient ready-to-run RPM.
The windows binaries are compiled with Mingw32 1.1 and do not need any
additional DLLs.

You'll find all this on my download page:
http://www.combio.de/avr/index.html

I am willing to build an avr-gdb, but do not really know, what versions
are there around, how complete they are and whether they are simulators
or are connected to some hardware.

If there is any volunteer, who can build a nice installer round my
windows binaries und strip the unneeded stuff, I will place it on my
download page, too.

Regards

Gunnar

From [email-masked] Thu Nov 22 01:23:59 2001
Received: from challenger.osl.ttyl.com ([148.122.208.20] helo=fep2.mta.online.no)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 166WQ3-0000rA-00
for <[email-masked]>; Thu, 22 Nov 2001 01:23:59 +1300
Received: from acpfire.at ([195.70.106.130]) by fep2.mta.online.no
(InterMail vM.4.01.03.23 201-229-121-123-20010418) with SMTP
id <[email-masked]>;
Wed, 21 Nov 2001 13:27:00 +0100
From: refr <[email-masked]>
Date: Wed, 21 Nov 2001 12:20:03 GMT
Message-ID: <[email-masked]>
Subject: Re: [avr-gcc-list] IDE
To: Bart McCoard <[email-masked]>
CC: [email-masked]
In-Reply-To:
<[email-masked]>
References: <[email-masked]>
X-Mailer: Mozilla/3.0 (compatible; StarOffice/5.2;Win32)
X-Priority: 3 (Normal)
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,
You can try it with Grasp. It is a graphical Editor for C/C++, Java, ADA=
,=20
..., usw.
You can find it at http://www.eng.auburn.edu/grasp
Franz Reich

Urspr=FCngliche Nachricht vom 19.11.2001, 19:14:40
Autor: Bart McCoard <[email-masked]>
Thema: [avr-gcc-list] IDE

Does anyone know of a good IDE that can be used to edit C code and=20
execute command line batch files for use with AVR-GCC and Windows? I've=
=20
been using multi-edit, but its not free. I need something that can pipe=
=20
compiler, assembler and linker information to a window. I've also used =

the free IAR IDE that comes with the IAR assembler, but I dont like it.=

Thanks=20
Bart=20

From [email-masked] Thu Nov 22 05:44:15 2001
Received: from fepc.post.tele.dk ([195.41.46.147])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 166aTv-00015q-00
for <[email-masked]>; Thu, 22 Nov 2001 05:44:15 +1300
Received: from noa6 ([80.63.234.164]) by fepC.post.tele.dk
(InterMail vM.4.01.03.23 201-229-121-123-20010418) with SMTP
id <20011121164716.FCVD11568.fepC.post.tele.dk@noa6>;
Wed, 21 Nov 2001 17:47:16 +0100
Message-ID: <006601c172ac$2fd6eb40$7000a8c0@noa6>
From: "Kasper Pedersen" <[email-masked]>
To: "Gunnar Henne" <[email-masked]>,
"AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] GCC 3.0.2 binutils 2.11.2 avr-libc-20011029 available for windows & linux
Date: Wed, 21 Nov 2001 17:47:20 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Another of those install builds:
http://kkp.dhs.org
or directly
http://kkp.dhs.org/avr/antivirusfriendly-release-avrgcc20011121a.exe

/Kasper

----- Original Message -----
From: "Gunnar Henne" <[email-masked]>
Subject: [avr-gcc-list] GCC 3.0.2 binutils 2.11.2 avr-libc-20011029
available for windows & linux

<snip>>
> I have built new binaries from the current release versions of the
> development tools.

<snip>
> If there is any volunteer, who can build a nice installer round my
> windows binaries und strip the unneeded stuff, I will place it on my
> download page, too.

Done. It isn't nice (I know of annoying sluggishness on XP), but it works.

From [email-masked] Thu Nov 22 07:52:48 2001
Received: from mx04.nexgo.de ([151.189.8.80])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 166cUI-0001H6-00
for <[email-masked]>; Thu, 22 Nov 2001 07:52:47 +1300
Received: from kleinertiga.local (dialin-145-254-117-177.arcor-ip.net [145.254.117.177])
by mx04.nexgo.de (Postfix) with ESMTP
id AE85A37F2B; Wed, 21 Nov 2001 19:55:49 +0100 (CET)
Received: from gmx.de (localhost [127.0.0.1])
by kleinertiga.local (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id fALIrnt04683;
Wed, 21 Nov 2001 19:53:54 +0100
X-Authentication-Warning: kleinertiga.local: Host localhost [127.0.0.1] claimed to be gmx.de
Message-ID: <[email-masked]>
Date: Wed, 21 Nov 2001 19:53:49 +0100
From: Klaus Rudolph <[email-masked]>
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Uwe Bonnes <[email-masked]>,
[email-masked], [email-masked]
Subject: Re: [avr-gcc-list] uisp with segmentation fault
References: <[email-masked]>
<[email-masked]>
<[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> Recompile uisp with debug symbold and run in gdb. When the crash happen=
s,
> type "bt" and post the backtrace.
Line 191 : strcmp(val, "........

val is a char * which gives a value from getCmdParm. The needed
parameter
is the dprog from the comandline. I have used the old syntac with
-dstk200
while the new is -dprog=3Dstk200. After use uisp with -dprog
all is running now. But the GetCmdParam should give an error but don=B4t!=

Segmentation fault is not the correct answer for stupied users :-)
It is some kind of mystyrious, cause on the newer linux box the uisp
returns with error message: =

Programming method is not selected.

But the program is static linked, so there is no library problem.

I used latest version downloaded yesterday uisp-20011025.tgz

Thanks and Bye
Klaus

From [email-masked] Fri Nov 23 08:46:23 2001
Received: from sttlpop8.sttl.uswest.net ([206.81.192.9])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 166zni-0002de-00
for <[email-masked]>; Fri, 23 Nov 2001 08:46:23 +1300
Received: (qmail 63432 invoked by uid 0); 22 Nov 2001 19:49:32 -0000
Received: from pdslppp77.sttl.uswest.net (HELO dell) (63.224.33.77)
by sttlpop8.sttl.uswest.net with SMTP; 22 Nov 2001 19:49:32 -0000
Date: Thu, 22 Nov 2001 11:46:53 -0800
Message-ID: <01cb01c1738e$caffda40$3300000a@dell>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] GCC 3.0.2 binutils 2.11.2 avr-libc-20011029 available for windows & linux
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

So, what does avr-gcc 3.02 give me that the June release doesn't?

----- Original Message -----
From: "Gunnar Henne" <[email-masked]>

> Hello,
>
> I have built new binaries from the current release versions of
the
> development tools.
>
> Although 'elfcoff' works fine, the patch for the avrobj target
is
> included.
> With elfcoff you are able to use the variable watch of
avrstudio (tested
> with 3.53).
>

From [email-masked] Sat Nov 24 09:28:19 2001
Received: from smtp2.polbox.com ([213.241.3.136])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 167Mvp-0003yl-00
for <[email-masked]>; Sat, 24 Nov 2001 09:28:18 +1300
Received: from uranos (host246-101.datastar.pl [62.89.101.246] (may be forged))
by smtp2.polbox.com (8.9.2/8.9.2) with SMTP id UAA09969
for <[email-masked]>; Fri, 23 Nov 2001 20:32:02 GMT
Message-ID: <[email-masked]>
From: =?iso-8859-2?Q?Artur_Zi=F3=B3kowski?= <[email-masked]>
To: <[email-masked]>
Date: Fri, 23 Nov 2001 21:31:57 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_002B_01C17466.470CEC40"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] elfcoff
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_002B_01C17466.470CEC40
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

Hello everybody,

By the way of new binaries ,where can i get elfcoff.exe ?. I 've tried =
to compile sources of ElfCoff with VC6.0 but it doesen't work.
Can anybody help?
Greetings,
Artur=20

------=_NextPart_000_002B_01C17466.470CEC40
Content-Type: text/html;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-2">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3D"Arial CE" size=3D2>&nbsp;&nbsp;&nbsp; <FONT =
face=3D"Arial CE">Hello=20
everybody,</FONT></FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>By the way of new binaries ,where can i get =
elfcoff.exe ?. I=20
've tried to compile sources of ElfCoff with VC6.0&nbsp;but it doesen't=20
work.</FONT></DIV>
<DIV><FONT size=3D2>Can anybody help?</FONT></DIV>
<DIV><FONT size=3D2>Greetings,</FONT></DIV>
<DIV><FONT size=3D2>Artur</FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_002B_01C17466.470CEC40--

---------------------- [POLBOX - REKLAMA] --------------------------
ZOBACZ http://www.FILMWEB.PL/ - portal filmowy nr 1 w Polsce Wladca
pierscieni, Star Wars-II, Harry Potter oraz 11443 inne filmy!
--------------------------------------------------------------------

From [email-masked] Sat Nov 24 20:23:39 2001
Received: from usc.edu ([128.125.253.136] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 167XA2-0004Wr-00
for <[email-masked]>; Sat, 24 Nov 2001 20:23:38 +1300
Received: from aludra.usc.edu ([email-masked] [128.125.253.184])
by usc.edu (8.9.3.1/8.9.3/usc) with ESMTP
id XAA04242 for <[email-masked]>; Fri, 23 Nov 2001 23:27:07 -0800 (PST)
Received: from localhost (mediratt@localhost)
by aludra.usc.edu (8.10.1/8.10.1/usc) with ESMTP
id fAO7R7l02970 for <[email-masked]>; Fri, 23 Nov 2001 23:27:07 -0800 (PST)
Date: Fri, 23 Nov 2001 23:27:07 -0800 (PST)
From: Rohit Mediratta <[email-masked]>
To: <[email-masked]>
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] Viewing Assembly code for C prg.
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,
I use avr-gcc on Redhat 7.1

I want to be able to view the assembly code (Mnemonics preferably)
for my C prg. I am not sure what flags will i have to give to avr-gcc so
that i can generate a readable assembly language file.

Could someone please help me.

thanks
rohit

From [email-masked] Sat Nov 24 22:32:55 2001
Received: from sense-smead-139.oz.net ([216.39.162.139] helo=henry.amplepower.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 167ZB8-0004dx-00
for <[email-masked]>; Sat, 24 Nov 2001 22:32:54 +1300
Received: from mail.amplepower.com ([email-masked] [192.168.8.220])
by henry.amplepower.com (8.8.7/8.8.7) with ESMTP id BAA01607;
Sat, 24 Nov 2001 01:35:10 -0800
Date: Sat, 24 Nov 2001 01:35:09 -0800 (PST)
From: David Smead <[email-masked]>
To: Rohit Mediratta <[email-masked]>
cc: <[email-masked]>
Subject: Re: [avr-gcc-list] Viewing Assembly code for C prg.
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Rohit,

You want the -S option which will stop gcc after it produces the assembly
language.

--
Sincerely,

David Smead
http://www.amplepower.com.

On Fri, 23 Nov 2001, Rohit Mediratta wrote:

> Hi,
> I use avr-gcc on Redhat 7.1
>
> I want to be able to view the assembly code (Mnemonics preferably)
> for my C prg. I am not sure what flags will i have to give to avr-gcc so
> that i can generate a readable assembly language file.
>
> Could someone please help me.
>
> thanks
> rohit
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Mon Nov 26 11:19:15 2001
Received: from dragon.actrix.co.nz ([203.96.26.131])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1687cJ-00088H-00
for <[email-masked]>; Mon, 26 Nov 2001 11:19:15 +1300
Received: from sony (wakelins.actrix.co.nz [203.96.27.215])
by dragon.actrix.co.nz (Postfix) with ESMTP id 2671F14CC
for <[email-masked]>; Mon, 26 Nov 2001 11:20:45 +1300 (NZDT)
Reply-To: <[email-masked]>
From: "Ross Wakelin" <[email-masked]>
To: <[email-masked]>
Date: Mon, 26 Nov 2001 11:20:31 +1300
Organization: iITc
Message-ID: <008d01c175ff$68d69c50$0307a8c0@sony>
MIME-Version: 1.0
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.3311
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Importance: Normal
Subject: [avr-gcc-list] debugger info
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I'm just starting with the Atmel line of chips, and
have an ABC maxi as my test bed. I am using the latest
GCC tool chain downloaded from AVR freaks.

How are you supposed to do debugging, especially
in circuit debugging, in this sort of environment?

Thanks

----------
Ross Wakelin - Independent Information Technology Consultant
Tel: +64 (0)3 3433186 Fax: +64 (0)3 3433196
Cell: +64 (0)21 334380

From [email-masked] Mon Nov 26 11:37:37 2001
Received: from [203.24.179.147] (helo=smartcontainer.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 1687u4-00089F-00
for <[email-masked]>; Mon, 26 Nov 2001 11:37:36 +1300
Received: (qmail 24963 invoked by uid 8); 25 Nov 2001 22:41:00 -0000
Received: from link.smartcontainer.net (20.20.20.53, claiming to be "smartcontainer.net")
by smarty with SMTP id smtpdSB5wgY; Sun, 25 Nov 2001 17:40:52 EST
Message-ID: <[email-masked]>
Date: Mon, 26 Nov 2001 09:40:54 +1100
From: Scott Finneran <[email-masked]>
Organization: Smart Container
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2.1) Gecko/20010901
X-Accept-Language: en-us
MIME-Version: 1.0
To: [email-masked]
CC: [email-masked]
Subject: Re: [avr-gcc-list] debugger info
References: <008d01c175ff$68d69c50$0307a8c0@sony>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Ross,

Check out AVaRICE(http://avarice.sourceforge.net). It is free(GPL) and
allows you to interface the Atmel AVR JTAG ICE with gdb.

Regards,

Scott Finneran

Ross Wakelin wrote:

> Hi,
>
> I'm just starting with the Atmel line of chips, and
> have an ABC maxi as my test bed. I am using the latest
> GCC tool chain downloaded from AVR freaks.
>
> How are you supposed to do debugging, especially
> in circuit debugging, in this sort of environment?
>
> Thanks
>
> ----------
> Ross Wakelin - Independent Information Technology Consultant
> Tel: +64 (0)3 3433186 Fax: +64 (0)3 3433196
> Cell: +64 (0)21 334380

From [email-masked] Mon Nov 26 14:20:48 2001
Received: from dragon.actrix.co.nz ([203.96.26.131])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 168AS0-0008IF-00
for <[email-masked]>; Mon, 26 Nov 2001 14:20:48 +1300
Received: from sony (wakelins.actrix.co.nz [203.96.27.215])
by dragon.actrix.co.nz (Postfix) with ESMTP
id 227D41C23; Mon, 26 Nov 2001 14:21:57 +1300 (NZDT)
Reply-To: <[email-masked]>
From: "Ross Wakelin" <[email-masked]>
To: "'Scott Finneran'" <[email-masked]>
Cc: <[email-masked]>
Subject: RE: [avr-gcc-list] debugger info
Date: Mon, 26 Nov 2001 14:21:26 +1300
Organization: iITc
Message-ID: <008e01c17618$b0a6f930$0307a8c0@sony>
MIME-Version: 1.0
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.3311
In-reply-to: <[email-masked]>
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Importance: Normal
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Ooookay, so where do I get one of these JTAG thingies,
and how much does it cost......

Thanks

----------
Ross Wakelin - Independent Information Technology Consultant
Tel: +64 (0)3 3433186 Fax: +64 (0)3 3433196
Cell: +64 (0)21 334380

-----Original Message-----
From: Scott Finneran [mailto:[email-masked]]
Sent: Monday, 26 November 2001 11:41
To: [email-masked]
Cc: [email-masked]
Subject: Re: [avr-gcc-list] debugger info

Hello Ross,

Check out AVaRICE(http://avarice.sourceforge.net). It is free(GPL) and
allows you to interface the Atmel AVR JTAG ICE with gdb.

Regards,

Scott Finneran

Ross Wakelin wrote:

> Hi,
>
> I'm just starting with the Atmel line of chips, and
> have an ABC maxi as my test bed. I am using the latest
> GCC tool chain downloaded from AVR freaks.
>
> How are you supposed to do debugging, especially
> in circuit debugging, in this sort of environment?
>
> Thanks
>
> ----------
> Ross Wakelin - Independent Information Technology Consultant
> Tel: +64 (0)3 3433186 Fax: +64 (0)3 3433196
> Cell: +64 (0)21 334380

From [email-masked] Mon Nov 26 14:51:28 2001
Received: from [203.24.179.147] (helo=smartcontainer.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 168Avg-0008KC-00
for <[email-masked]>; Mon, 26 Nov 2001 14:51:28 +1300
Received: (qmail 27089 invoked by uid 8); 26 Nov 2001 01:54:52 -0000
Received: from link.smartcontainer.net (20.20.20.53, claiming to be "smartcontainer.net")
by smarty with SMTP id smtpdI0X9Hu; Sun, 25 Nov 2001 20:54:50 EST
Message-ID: <[email-masked]>
Date: Mon, 26 Nov 2001 12:54:51 +1100
From: Scott Finneran <[email-masked]>
Organization: Smart Container
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2.1) Gecko/20010901
X-Accept-Language: en-us
MIME-Version: 1.0
To: [email-masked]
CC: [email-masked]
Subject: Re: [avr-gcc-list] debugger info
References: <008e01c17618$b0a6f930$0307a8c0@sony>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Ross,

There is a link on the website to the Atmel site. It is their product. I
believe that it retails for around US$250 (quite reasonable for a JTAG
box in my limited experience).

A review of it should be on avrfreaks (http://www.avrfreaks.net). note:
This review deals deals with the Atmel JTAG ICE being used with AVR Studio.

Cheers,

scott Finneran

Ross Wakelin wrote:

> Ooookay, so where do I get one of these JTAG thingies,
> and how much does it cost......
>
> Thanks
>
> ----------
> Ross Wakelin - Independent Information Technology Consultant
> Tel: +64 (0)3 3433186 Fax: +64 (0)3 3433196
> Cell: +64 (0)21 334380
>
> -----Original Message-----
> From: Scott Finneran [mailto:[email-masked]]
> Sent: Monday, 26 November 2001 11:41
> To: [email-masked]
> Cc: [email-masked]
> Subject: Re: [avr-gcc-list] debugger info
>
>
> Hello Ross,
>
> Check out AVaRICE(http://avarice.sourceforge.net). It is free(GPL) and
> allows you to interface the Atmel AVR JTAG ICE with gdb.
>
> Regards,
>
> Scott Finneran
>
> Ross Wakelin wrote:
>
>
>>Hi,
>>
>>I'm just starting with the Atmel line of chips, and
>>have an ABC maxi as my test bed. I am using the latest
>>GCC tool chain downloaded from AVR freaks.
>>
>>How are you supposed to do debugging, especially
>>in circuit debugging, in this sort of environment?
>>
>>Thanks
>>

From [email-masked] Mon Nov 26 20:19:17 2001
Received: from r220-1.rz.rwth-aachen.de ([134.130.3.31])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 168G2u-00008e-00
for <[email-masked]>; Mon, 26 Nov 2001 20:19:16 +1300
Received: from r220-1.rz.RWTH-Aachen.DE (relay2.RWTH-Aachen.DE [134.130.3.1])
by r220-1.rz.RWTH-Aachen.DE (8.10.1/8.11.3-2) with ESMTP id fAQ7MbV17445
for <[email-masked]>; Mon, 26 Nov 2001 08:22:38 +0100 (MET)
Received: from Ostermann-net.de (pD952CF85.dip.t-dialin.net [217.82.207.133])
by r220-1.rz.RWTH-Aachen.DE (8.10.1/8.11.3/6) with SMTP id fAQ7MaX17439
for <[email-masked]>; Mon, 26 Nov 2001 08:22:37 +0100 (MET)
Message-Id: <[email-masked]>
Date: Mon, 26 Nov 2001 07:31:14 +0100
From: Thorsten Ostermann <[email-masked]>
To: [email-masked]
X-Mailer: Thorsten Ostermann's registered AK-Mail 3.1 publicbeta2a [ger]
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] I2C Routines?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all!

Has anyone done an I2C implementation (master or slave) with avr-gcc? If
there are sources for free I would reinvent the wheel...

Best regards
Thorsten
--
PGP welcome!
Thorsten online: http://www.ostermann-net.de/electronic/
Rund um Schrittmotor, Fr=E4s-Bohr-Plotter & Mikrocontroller

From [email-masked] Tue Nov 27 01:02:35 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 168KT4-0000My-00
for <[email-masked]>; Tue, 27 Nov 2001 01:02:34 +1300
Received: (from j@localhost)
by ida.interface-business.de id fAQC5uc44641;
Mon, 26 Nov 2001 13:05:56 +0100 (MET)
Date: Mon, 26 Nov 2001 13:05:56 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] Using .data & bss
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Klaus Rudolph <[email-masked]> wrote:

> But there is no .bss in avr-gcc. What is the solution.

RTFinfo.

The simplest way to find about it is to declare a BSS variable inside
a C program snippet, and have avr-gcc compile it into a .s file. Then
you'll notice that the GNU assembler uses the .comm pseudo-op to
declare BSS variables:

.comm foo,2,1

Here's the part of the respective section of the gas info file:

File: as.info, Node: Comm, Next: Data, Prev: Byte, Up: Pseudo Ops

`.comm SYMBOL , LENGTH '
========================

`.comm' declares a common symbol named SYMBOL. When linking, a
common symbol in one object file may be merged with a defined or common
symbol of the same name in another object file. If `ld' does not see a
definition for the symbol-just one or more common symbols-then it will
allocate LENGTH bytes of uninitialized memory. LENGTH must be an
absolute expression. If `ld' sees multiple common symbols with the
same name, and they do not all have the same size, it will allocate
space using the largest size.

When using ELF, the `.comm' directive takes an optional third
argument. This is the desired alignment of the symbol, specified as a
byte boundary (for example, an alignment of 16 means that the least
significant 4 bits of the address should be zero). The alignment must
be an absolute expression, and it must be a power of two. If `ld'
allocates uninitialized memory for the common symbol, it will use the
alignment when placing the symbol. If no alignment is specified, `as'
will set the alignment to the largest power of two less than or equal
to the size of the symbol, up to a maximum of 16.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Tue Nov 27 04:37:42 2001
Received: from [209.235.58.166] (helo=artemisgroup.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 168NpF-0000Yt-00
for <[email-masked]>; Tue, 27 Nov 2001 04:37:42 +1300
Received: from c11030-a.scllg1.pa.home.com (c11030-a.scllg1.pa.home.com [24.15.29.78])
by artemisgroup.com (Postfix) with ESMTP id E46387BC1
for <[email-masked]>; Mon, 26 Nov 2001 10:40:35 -0500 (EST)
Date: Mon, 26 Nov 2001 10:40:01 -0500 (EST)
From: Patrick Lanphier <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] GCC Functions
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

It appears that when I start using functions the code stops working. Why?

/*
*************************************************************************
avr-gcc -O0 -Wall -mmcu=at90s2313 -c demo2c.c -o demo1.o
avr-gcc -o demo1.elf demo1.o
avr-objcopy -O ihex demo1.elf demo1.hex
**************************************************************************
*/

#include <io2313.h>
#include <interrupt.h>

void led1(void);
int ledlight;

int main(void) {
outp(0xff, DDRB); // port B all outputs
outp(0xff, PORTB); // turn all leds off
led1();
for(;;){
outp(ledlight, PORTB); // turn led on
}
}

void led1(void){
ledlight = 0x0;
};

Patrick Lanphier
The Artemis Group
http://www.artemisgroup.com
phone: 814-235-0444
fax: 800-582-9710

From [email-masked] Tue Nov 27 08:52:39 2001
Received: from relay02.cablecom.net ([62.2.33.102])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 168Rny-0000qq-00
for <[email-masked]>; Tue, 27 Nov 2001 08:52:38 +1300
Received: from mail.swissonline.ch (mail.swissonline.ch [62.2.32.83])
by relay02.cablecom.net (8.11.6/8.11.4/SOL/AWF/MXRELAY/06072001) with ESMTP id fAQJtXc27122
for <[email-masked]>; Mon, 26 Nov 2001 20:55:33 +0100 (CET)
Received: from homepc (dclient217-162-105-72.hispeed.ch [217.162.105.72])
by mail.swissonline.ch (8.11.4/8.11.4/MSOL-2.30/21-Dec-2000) with SMTP id fAQJtGD15037
for <[email-masked]>; Mon, 26 Nov 2001 20:55:16 +0100 (MET)
Message-ID: <[email-masked]>
From: "Peter Fleury" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] I2C Routines?
Date: Mon, 26 Nov 2001 20:55:57 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I have written a I2C library for AVR-GCC, check my home page
http://jump.to/fleury -> AVR-Software.

Regards
Peter Fleury

From [email-masked] Tue Nov 27 09:33:54 2001
Received: from mail.fri.uni-lj.si ([193.2.72.126])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 168SRt-0000sl-00
for <[email-masked]>; Tue, 27 Nov 2001 09:33:53 +1300
Received: from smtp-scan (orchid.fri.uni-lj.si [193.2.76.102])
by virus-relay.fe.uni-lj.si (Postfix) with SMTP id 0961A23EF8
for <[email-masked]>; Mon, 26 Nov 2001 21:41:16 +0100 (CET)
Received: from [193.2.72.126]:1505 (HELO mail.fri.uni-lj.si)
by SMTP-SCAN ([192.168.100.3]:25) (F-Secure Anti-Virus for Internet Mail 6.0.34 Release)
with SMTP; Sun, 25 Nov 2001 20:37:29 -0000
Received: from center.fri.uni-lj.si (center.fri.uni-lj.si [193.2.72.5])
by mail.fri.uni-lj.si (Postfix) with ESMTP id B0C5823EF8
for <[email-masked]>; Mon, 26 Nov 2001 21:41:14 +0100 (CET)
Received: from robikranj ([193.2.76.192]) by center.fri.uni-lj.si
(Netscape Mail Server v2.02) with SMTP id AAA2878
for <[email-masked]>; Mon, 26 Nov 2001 21:23:28 +0100
Message-ID: <002f01c176bd$305c0cc0$0200a8c0@robikranj>
From: [email-masked] (Robert Rozman)
To: <[email-masked]>
References: <008e01c17618$b0a6f930$0307a8c0@sony> <[email-masked]>
Subject: Re: [avr-gcc-list] debugger info
Date: Mon, 26 Nov 2001 21:59:06 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

nobody mentioned low cost in circuit debugging via stk 200 dongle in -Linux
with help of avrmon. Anyone using that ?

Regards,

Robert Rozman
[email-masked]
----- Original Message -----
From: "Scott Finneran" <[email-masked]>
To: <[email-masked]>
Cc: <[email-masked]>
Sent: 26. november 2001 2:54
Subject: Re: [avr-gcc-list] debugger info

> Ross,
>
> There is a link on the website to the Atmel site. It is their product. I
> believe that it retails for around US$250 (quite reasonable for a JTAG
> box in my limited experience).
>
> A review of it should be on avrfreaks (http://www.avrfreaks.net). note:
> This review deals deals with the Atmel JTAG ICE being used with AVR
Studio.
>
> Cheers,
>
> scott Finneran
>
> Ross Wakelin wrote:
>
> > Ooookay, so where do I get one of these JTAG thingies,
> > and how much does it cost......
> >
> > Thanks
> >
> > ----------
> > Ross Wakelin - Independent Information Technology Consultant
> > Tel: +64 (0)3 3433186 Fax: +64 (0)3 3433196
> > Cell: +64 (0)21 334380
> >
> > -----Original Message-----
> > From: Scott Finneran [mailto:[email-masked]]
> > Sent: Monday, 26 November 2001 11:41
> > To: [email-masked]
> > Cc: [email-masked]
> > Subject: Re: [avr-gcc-list] debugger info
> >
> >
> > Hello Ross,
> >
> > Check out AVaRICE(http://avarice.sourceforge.net). It is free(GPL) and
> > allows you to interface the Atmel AVR JTAG ICE with gdb.
> >
> > Regards,
> >
> > Scott Finneran
> >
> > Ross Wakelin wrote:
> >
> >
> >>Hi,
> >>
> >>I'm just starting with the Atmel line of chips, and
> >>have an ABC maxi as my test bed. I am using the latest
> >>GCC tool chain downloaded from AVR freaks.
> >>
> >>How are you supposed to do debugging, especially
> >>in circuit debugging, in this sort of environment?
> >>
> >>Thanks
> >>
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Tue Nov 27 11:04:46 2001
Received: from dragon.actrix.co.nz ([203.96.26.131])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 168Trq-0000zC-00
for <[email-masked]>; Tue, 27 Nov 2001 11:04:46 +1300
Received: from sony (wakelins.actrix.co.nz [203.96.27.215])
by dragon.actrix.co.nz (Postfix) with ESMTP
id 83D361C78; Tue, 27 Nov 2001 11:06:15 +1300 (NZDT)
Reply-To: <[email-masked]>
From: "Ross Wakelin" <[email-masked]>
To: "'Robert Rozman'" <[email-masked]>,
<[email-masked]>
Subject: RE: [avr-gcc-list] debugger info
Date: Tue, 27 Nov 2001 11:05:57 +1300
Organization: iITc
Message-ID: <00da01c176c6$8a77be30$0307a8c0@sony>
MIME-Version: 1.0
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.3311
In-reply-to: <002f01c176bd$305c0cc0$0200a8c0@robikranj>
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Importance: Normal
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

no, but I would like to know about it...

----------
Ross Wakelin - Independent Information Technology Consultant
Tel: +64 (0)3 3433186 Fax: +64 (0)3 3433196
Cell: +64 (0)21 334380

-----Original Message-----
From: [email-masked]
[mailto:[email-masked]] On Behalf Of Robert Rozman
Sent: Tuesday, 27 November 2001 09:59
To: [email-masked]
Subject: Re: [avr-gcc-list] debugger info

Hello,

nobody mentioned low cost in circuit debugging via stk 200 dongle in
-Linux with help of avrmon. Anyone using that ?

Regards,

Robert Rozman
[email-masked]
----- Original Message -----
From: "Scott Finneran" <[email-masked]>
To: <[email-masked]>
Cc: <[email-masked]>
Sent: 26. november 2001 2:54
Subject: Re: [avr-gcc-list] debugger info

> Ross,
>
> There is a link on the website to the Atmel site. It is their product.

> I believe that it retails for around US$250 (quite reasonable for a
> JTAG box in my limited experience).
>
> A review of it should be on avrfreaks (http://www.avrfreaks.net).
> note: This review deals deals with the Atmel JTAG ICE being used with
> AVR
Studio.
>
> Cheers,
>
> scott Finneran
>
> Ross Wakelin wrote:
>
> > Ooookay, so where do I get one of these JTAG thingies,
> > and how much does it cost......
> >
> > Thanks
> >
> > ----------
> > Ross Wakelin - Independent Information Technology Consultant
> > Tel: +64 (0)3 3433186 Fax: +64 (0)3 3433196
> > Cell: +64 (0)21 334380
> >
> > -----Original Message-----
> > From: Scott Finneran [mailto:[email-masked]]
> > Sent: Monday, 26 November 2001 11:41
> > To: [email-masked]
> > Cc: [email-masked]
> > Subject: Re: [avr-gcc-list] debugger info
> >
> >
> > Hello Ross,
> >
> > Check out AVaRICE(http://avarice.sourceforge.net). It is free(GPL)
> > and allows you to interface the Atmel AVR JTAG ICE with gdb.
> >
> > Regards,
> >
> > Scott Finneran
> >
> > Ross Wakelin wrote:
> >
> >
> >>Hi,
> >>
> >>I'm just starting with the Atmel line of chips, and
> >>have an ABC maxi as my test bed. I am using the latest
> >>GCC tool chain downloaded from AVR freaks.
> >>
> >>How are you supposed to do debugging, especially
> >>in circuit debugging, in this sort of environment?
> >>
> >>Thanks
> >>
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

_______________________________________________
avr-gcc-list mailing list
[email-masked]
http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Tue Nov 27 21:47:34 2001
Received: from mx0.gmx.net ([213.165.64.100])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 168dtt-0001Th-00
for <[email-masked]>; Tue, 27 Nov 2001 21:47:33 +1300
Received: (qmail 23608 invoked by uid 0); 27 Nov 2001 08:50:29 -0000
Date: Tue, 27 Nov 2001 09:50:29 +0100 (MET)
From: Victor Sluiter <[email-masked]>
To: [email-masked]
MIME-Version: 1.0
References: <[email-masked]>
Subject: Re: [avr-gcc-list] GCC Functions
X-Priority: 3 (Normal)
X-Authenticated-Sender: [email-masked]
X-Authenticated-IP: [212.136.198.145]
Message-ID: <[email-masked]>
X-Mailer: WWW-Mail 1.5 (Global Message Exchange)
X-Flags: 0001
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Patrick!

First of all some notes on your code... When you end a function it is at
least unusual to end it with a semicolon (might even be erronous - I've never
tried). The second thing is the use of '0x0', which would stand for binary
'0000'. Nothing wrong with four bits, but since the AVRs are 8-bit
microcontrollers it is better to always use 8-bit numbers, so that will be two hexadecimal
characters, ranging from 0x00 to 0xFF. You can of course use decimal numbers
from 0 to 255! By the way, you declared 'ledlight' as an integerer (int),
which is a 16-bit number. it is better to use an unsigned char, which is an
8-bit number, from 0 to 255. When I program something I start with 'typedef
unsigned char BYTE', so I only have to write 'BYTE' if I want to use an unsigned
char.

So much for the grammar :-).... The 'error' in your code, is that 'ledlight'
never gets a value higher than zero. That means, that the value on PORTB
never gets higher than zero, and the LEDs won't turn on..... A simple 'ledlight
= 0x01' in your led1() function will turn on the first LED on PORTB...

By the way, including interrupt.h has no use in this program, but it won't
harm it ...

Greetings, Victor

#include <io2313.h>

void led1(void);
unsigned char ledlight;

int main(void) {
outp(0xff, DDRB); // port B all outputs
outp(0xff, PORTB); // turn all leds off
led1();
for(;;){
outp(ledlight, PORTB); // turn led on
}
}

void led1(void){
ledlight = 0x01;
}

> It appears that when I start using functions the code stops working. Why?
>
> /*
> *************************************************************************
> avr-gcc -O0 -Wall -mmcu=at90s2313 -c demo2c.c -o demo1.o
> avr-gcc -o demo1.elf demo1.o
> avr-objcopy -O ihex demo1.elf demo1.hex
> **************************************************************************
> */
>
> #include <io2313.h>
> #include <interrupt.h>
>
> void led1(void);
> int ledlight;
>
> int main(void) {
> outp(0xff, DDRB); // port B all outputs
> outp(0xff, PORTB); // turn all leds off
> led1();
> for(;;){
> outp(ledlight, PORTB); // turn led on
> }
> }
>
> void led1(void){
> ledlight = 0x0;
> };
>
>
> Patrick Lanphier
> The Artemis Group
> http://www.artemisgroup.com
> phone: 814-235-0444
> fax: 800-582-9710
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

--
-------------------------------------------------------
Een gewaarschuwd schizofreen telt voor vier.
- Fons Jansen
-------------------------------------------------------

GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

From [email-masked] Tue Nov 27 22:56:29 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 168eya-0001XB-00
for <[email-masked]>; Tue, 27 Nov 2001 22:56:29 +1300
Received: (from j@localhost)
by ida.interface-business.de id fAR9xqd69009;
Tue, 27 Nov 2001 10:59:52 +0100 (MET)
Date: Tue, 27 Nov 2001 10:59:52 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] GCC Functions
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Patrick Lanphier <[email-masked]> wrote:

> void led1(void);
> int ledlight;
>
> int main(void) {
> outp(0xff, DDRB); // port B all outputs
> outp(0xff, PORTB); // turn all leds off
> led1();

What happens if you don't call led1(), but just continue?

> for(;;){
> outp(ledlight, PORTB); // turn led on
> }
> }
>
> void led1(void){
> ledlight = 0x0;
> };

This is basically a do-nothing, since ledlight is already 0x0 (per
definition, since it's a global variable).

I can't see anything that would be wrong with the code though.

What would be more interesting is:

void led1(void) {
ledlight ^= 0xff;
}

....
for (;;) {
led1();
outp(ledlight, PORTB);
}

This should make all pins on Port B oscillate with the same frequency.
Alternatively, make led1() count ledlight up:

void led1(void) {
ledlight++;
}

This should make all pins oscillate with frequencies divided by 2
each.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Tue Nov 27 23:34:58 2001
Received: from [212.113.174.249] (helo=smtp.netcabo.pt)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 168fZq-0001ZH-00
for <[email-masked]>; Tue, 27 Nov 2001 23:34:58 +1300
Received: from pama ([213.22.9.210]) by smtp.netcabo.pt with Microsoft SMTPSVC(5.0.2195.3779);
Tue, 27 Nov 2001 10:37:21 +0000
From: Paulo Abreu <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] GCC Functions
Date: Tue, 27 Nov 2001 10:44:21 +0000
Message-ID: <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]>
In-Reply-To: <[email-masked]>
X-Mailer: Forte Agent 1.8/32.548 trialware
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-OriginalArrivalTime: 27 Nov 2001 10:37:21.0525 (UTC) FILETIME=[7EA8E250:01C1772F]
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>This is basically a do-nothing, since ledlight is already 0x0 (per
>definition, since it's a global variable).

An opinion: initializing a variable to 0 is not a C standard. So, it
is not a good approach assuming that all compilers will act as you
state. Code will be more portable if you follow standards.

Regards,

Paulo Abreu

From [email-masked] Wed Nov 28 01:35:28 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 168hSR-0001fQ-00
for <[email-masked]>; Wed, 28 Nov 2001 01:35:27 +1300
Received: (from j@localhost)
by ida.interface-business.de id fARCctD76556;
Tue, 27 Nov 2001 13:38:55 +0100 (MET)
Date: Tue, 27 Nov 2001 13:38:55 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
<[email-masked]>
<[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] GCC Functions
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Paulo Abreu <[email-masked]> wrote:

>>This is basically a do-nothing, since ledlight is already 0x0 (per
>>definition, since it's a global variable).
>
> An opinion: initializing a variable to 0 is not a C standard.

You are wrong: it is. Please go and read the standard before telling
wrong things ;-), reading the second edition of K&R would already do.

> So, it is not a good approach assuming that all compilers will act
> as you state. Code will be more portable if you follow standards.

It will only be portable to very non-standard compilers. But even
pre-ANSI compilers that adhere to the old K&R standard (could mostly
be found on very old Unixen) already followed the convention to zero
out global storage. Any compiler that declares __STDC__ (to the value
1) /must/ care to initialize global variables, otherwise it's broken.

As already explained here, this "be safe and initialize it manually to
0" habit has a very negative impact, in particular in MCU environments
where often each byte counts. They cause the variable to leave the
..bss section (uninitialized data that will be zeroed at program
startup), and move it into the .data section (initialized data), and
thus make it consume space in your flash ROM, whereas .bss doesn't.
(In environments like Unix, the negative impact is smaller but still
measurable: .bss doesn't cost file space, while .data does. Also,
program startup becomes less efficient, since zeroing entire pages for
..bss can often be handled more effectively than having to load the
..data pages from the file... But that's getting off-topic here.)

So unless you really want to initialize the variable to something else
than 0, don't do it.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Wed Nov 28 01:45:09 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 168hbn-0001gG-00
for <[email-masked]>; Wed, 28 Nov 2001 01:45:08 +1300
Received: (from j@localhost)
by ida.interface-business.de id fARCmbN76596;
Tue, 27 Nov 2001 13:48:37 +0100 (MET)
Date: Tue, 27 Nov 2001 13:48:37 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] GCC Functions
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Victor Sluiter <[email-masked]> wrote:

> First of all some notes on your code... When you end a function it
> is at least unusual to end it with a semicolon (might even be
> erronous - I've never tried).

It's causing a global null declaration. But you're right, it's bad
style, i didn't spot this.

> The second thing is the use of '0x0', which would stand for binary
> '0000'.

Nope. 0x0 is another expression for the integer constant 0, as well
as 0x0000 or 000 would be. Syntactically, it has the size of a
default integer for the target machine, 16 bits in our case.

There's no way to express a »plain« 4-bit constant or variable in
avr-gcc. (You can declare a bit field variable that is four bits
wide, but that looks quite more complicated.)

> By the way, you declared 'ledlight' as an integerer (int), which is
> a 16-bit number. it is better to use an unsigned char, which is an
> 8-bit number, from 0 to 255.

That's basically right, however. Btw., the avr-gcc header files
declare the type "uint8_t", it's certainly good practice to use it.
Unlike BYTE (which can have a meaning other than 8 bits for some
people -- ever wondered why all the network standards talk about
"octets", not "bytes"?), it immediately tells the reader something
about the implied bit width of the variable.

> So much for the grammar :-).... The 'error' in your code, is that
> 'ledlight' never gets a value higher than zero. That means, that the
> value on PORTB never gets higher than zero, and the LEDs won't turn
> on.

No, that wasn't an error. PORTB has been sent out a 0xff initially,
so the first outp(0, PORTB) changes this to 0. Of course, whether
this turns the LEDs on or off depends on whether the LED is connected
between the output pin and Vcc or the output pin and GND.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Wed Nov 28 19:26:13 2001
Received: from [203.24.179.147] (helo=smartcontainer.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 168yAf-0002YD-00
for <[email-masked]>; Wed, 28 Nov 2001 19:26:13 +1300
Received: (qmail 15539 invoked by uid 8); 28 Nov 2001 06:29:46 -0000
Received: from link.smartcontainer.net (20.20.20.12, claiming to be "smartcontainer.net")
by smarty with SMTP id smtpdnV17r0; Wed, 28 Nov 2001 01:29:42 EST
Message-ID: <[email-masked]>
Date: Wed, 28 Nov 2001 17:29:37 +1100
From: Scott Finneran <[email-masked]>
Organization: Smart Container
X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.7-10 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: "[email-masked]" <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] GDB gets line numbers wrong. Help!
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello everyone,

Apologies if this seems a little off-topic. I am currently experiencing
a problem with gdb-5.0 (patched for the AVR). It seems that GDB is
unable to correctly align program space addresses with source lines.
Running with -O0 does of course help a little but certainly does not fix
the problem entirely.

We are not talking about minor errors either. Quite often, GDB will say
that a program address corresponds to a line number > the length of the
source file. This also occurs regardless of whether the source contains
C or C++ or a combination of the two.

Even some help determining if the fault lies in GCC/G++ producing the
elf files or in GDB reading them would be greatly appreciated.
(avr-objdump isn't really appropriate for this as it may contain the
same bug!)

In case my mistake lies in a selection of my cmd-line args, source file
compilations look like this:
cook: avr-gcc -I./library/hdr -Ibl/library/hdr -Iblbl/library/hdr
-Iblblbl/library/hdr -I/usr/local/include -I. -Ibl -Iblbl -Iblblbl
-I./flasher/hdr -Ibl/flasher/hdr -Iblbl/flasher/hdr
-Iblblbl/flasher/hdr -I./ucosii/hdr -Ibl/ucosii/hdr -Iblbl/ucosii/hdr
-Iblblbl/ucosii/hdr -I/usr/local/avr/include -D__AVR_ATmega128__
-DOS_UCOSII -Wa,-gstabs -mmcu=atmega128 -g -O0 -Wall -Werror
-save-temps -c flasher/src/main.c
-Wa,-ahl=flasher/src/ATmega128-ucos/main.lst -o
flasher/src/ATmega128-ucos/main.o

...and linker command-line looks like this:
cook: avr-g++ -Wl,--cref -mmcu=atmega128 --verbose -t -fno-rtti
-fno-exceptions
-T flasher/script/avrmega128.x -L./ucosii/ATmega128-ucos
-Lbl/ucosii/ATmega128-ucos -Lblbl/ucosii/ATmega128-ucos
-Lblblbl/ucosii/ATmega128-ucos -L./avr/ATmega128-ucos
-Lbl/avr/ATmega128-ucos -Lblbl/avr/ATmega128-ucos
-Lblblbl/avr/ATmega128-ucos -L./ucosii/ATmega128-ucos
-Lbl/ucosii/ATmega128-ucos -Lblbl/ucosii/ATmega128-ucos
-Lblblbl/ucosii/ATmega128-ucos -L./library/ATmega128-ucos
-Lbl/library/ATmega128-ucos -Lblbl/library/ATmega128-ucos
-Lblblbl/library/ATmega128-ucos -L./smartcpp/ATmega128-ucos
-Lbl/smartcpp/ATmega128-ucos -Lblbl/smartcpp/ATmega128-ucos
-Lblblbl/smartcpp/ATmega128-ucos -L/usr/local/avr/lib/avr5
/usr/local/avr/lib/avr5/crtm128.o flasher/src/ATmega128-ucos/main.o
-lavr -lucosii -llibrary -lsmartcpp -lucosii -lavr -lucosii -llibrary
-lsmartcpp -lc -lgcc -nostdlib
-Wl,-Map,bin/flasher/ATmega128-ucos/rom.map
-obin/flasher/ATmega128-ucos/rom.elf

Thanks in advance,

Scott

From [email-masked] Thu Nov 29 03:05:44 2001
Received: from [209.235.58.166] (helo=artemisgroup.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1695LL-0002u6-00
for <[email-masked]>; Thu, 29 Nov 2001 03:05:43 +1300
Received: from c11030-a.scllg1.pa.home.com (c11030-a.scllg1.pa.home.com [24.15.29.78])
by artemisgroup.com (Postfix) with ESMTP id BE89E7BC7
for <[email-masked]>; Wed, 28 Nov 2001 09:08:43 -0500 (EST)
Date: Wed, 28 Nov 2001 09:08:05 -0500 (EST)
From: Patrick Lanphier <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] GCC Functions
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Thanks everyone for the help but things are still not working. It has to
do with the function or the global variable. If you toggle between the
lines you will see this. Thank you very much for your help.

led1();
//ledlight = 0

/*
*************************************************************************
avr-gcc -O0 -Wall -mmcu=at90s2313 -c demo2c.c -o demo1.o
avr-gcc -o demo1.elf demo1.o
avr-objcopy -O ihex demo1.elf demo1.hex
**************************************************************************
*/

#include <io2313.h>
#include <interrupt.h>
typedef unsigned char BYTE;

void led1(void);
BYTE ledlight;

void led1(void){
ledlight = 0;// = 0x00;
}

int main(void) {
outp(255, DDRB); // port B all outputs
outp(255, PORTB); // turn all leds off

led1();
//ledlight = 0;

for(;;){
outp(ledlight, PORTB); // turn led on
}
}

Patrick Lanphier
The Artemis Group
http://www.artemisgroup.com
phone: 814-235-0444
fax: 800-582-9710

From [email-masked] Thu Nov 29 03:49:25 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16961c-0002wl-00
for <[email-masked]>; Thu, 29 Nov 2001 03:49:24 +1300
Received: (from j@localhost)
by ida.interface-business.de id fASEquw90990;
Wed, 28 Nov 2001 15:52:56 +0100 (MET)
Date: Wed, 28 Nov 2001 15:52:56 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] GCC Functions
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Cc: Patrick Lanphier <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Patrick Lanphier <[email-masked]> wrote:

> Thanks everyone for the help but things are still not working. It
> has to do with the function or the global variable. If you toggle
> between the lines you will see this.

What will we see? Can you elaborate more?

Generating assembler code shows that both statements create
identical lines of the form:

sts ledlight,__zero_reg__

Unless you tell us a bit more, there's probably not much help. Your
code /is/ correct (assuming your LEDs are connected between port B and
Vcc).

Also, why don't you try one of my suggestions about implementing a
somewhat more sophisticated logic inside led1() (like counting the
variable ledlight up)? This would allow you a few more hardware
tests, like connecting an oscilloscope to the various output lines of
port B. This will help you find out whether the output lines are
actually toggling at some frequency, are "floating", or maybe just one
of the output drivers has been damaged by your experiments.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Thu Nov 29 04:16:02 2001
Received: from mx0.gmx.net ([213.165.64.100])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 1696RN-0002yp-00
for <[email-masked]>; Thu, 29 Nov 2001 04:16:01 +1300
Received: (qmail 7804 invoked by uid 0); 28 Nov 2001 15:19:03 -0000
Date: Wed, 28 Nov 2001 16:19:03 +0100 (MET)
From: Victor Sluiter <[email-masked]>
To: [email-masked]
MIME-Version: 1.0
References: <[email-masked]>
Subject: Re: [avr-gcc-list] GCC Functions
X-Priority: 3 (Normal)
X-Authenticated-Sender: [email-masked]
X-Authenticated-IP: [212.136.198.145]
Message-ID: <[email-masked]>
X-Mailer: WWW-Mail 1.5 (Global Message Exchange)
X-Flags: 0001
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Patrick,

I tried to compile and test your program on my ATMega103, and everything
worked fine..... I also compiled for 2313, and tested the program in AVRStudio,
and everything went OK! What happens if you test under AVRStudio? I am using
the latest AVR-GCC from www.avrfreaks.net.......

Succes!

P.S.: This is my compiler output:
C:\ux\avrgcc\vic\tst>make
avr-gcc -c -g -O3 -Wall -Wstrict-prototypes -Wa,-ahlms=tst.lst
-mmcu=at90s2313 -
I. tst.c -o tst.o
avr-gcc tst.o -Wl,-Map=tst.map,--cref -mmcu=at90s2313 -o tst.elf
avr-objcopy -O ihex -R .eeprom tst.elf tst.rom
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load"
--change-section
-lma .eeprom=0 -O ihex tst.elf tst.eep

> Thanks everyone for the help but things are still not working. It has to
> do with the function or the global variable. If you toggle between the
> lines you will see this. Thank you very much for your help.
>
> led1();
> //ledlight = 0
>
>
> /*
> *************************************************************************
> avr-gcc -O0 -Wall -mmcu=at90s2313 -c demo2c.c -o demo1.o
> avr-gcc -o demo1.elf demo1.o
> avr-objcopy -O ihex demo1.elf demo1.hex
> **************************************************************************
> */
>
> #include <io2313.h>
> #include <interrupt.h>
> typedef unsigned char BYTE;
>
> void led1(void);
> BYTE ledlight;
>
> void led1(void){
> ledlight = 0;// = 0x00;
> }
>
> int main(void) {
> outp(255, DDRB); // port B all outputs
> outp(255, PORTB); // turn all leds off
>
> led1();
> //ledlight = 0;
>
> for(;;){
> outp(ledlight, PORTB); // turn led on
> }
> }
>
> Patrick Lanphier
> The Artemis Group
> http://www.artemisgroup.com
> phone: 814-235-0444
> fax: 800-582-9710
>
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

--
-------------------------------------------------------
Een gewaarschuwd schizofreen telt voor vier.
- Fons Jansen
-------------------------------------------------------

GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

From [email-masked] Thu Nov 29 04:16:22 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1696Rh-0002yw-00
for <[email-masked]>; Thu, 29 Nov 2001 04:16:21 +1300
Received: (from j@localhost)
by ida.interface-business.de id fASFJsH91143;
Wed, 28 Nov 2001 16:19:54 +0100 (MET)
Date: Wed, 28 Nov 2001 16:19:54 +0100
From: Joerg Wunsch <[email-masked]>
To: [email-masked]
Cc: Patrick Lanphier <[email-masked]>
Subject: Re: [avr-gcc-list] GCC Functions
Message-ID: <[email-masked]>
Reply-To: Joerg Wunsch <[email-masked]>
References: <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Wed, Nov 28, 2001 at 09:56:40AM -0500
X-Phone: +49-351-31809-14
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
Organization: interface systems GmbH, Dresden
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

As Patrick Lanphier wrote:

> Well the lights do not turn on when using the function when they do with
> the simple assignment statement.

They would even turn on without the assignment statement. ;-)

Again, the generated code looks OK. If this is actually your entire
program, something in your AVR must be broken. The only other option
is that something is wrong with the stack (in which case the function
call would never return), but normally, the framework of avr-gcc
handles the stack initialization etc. automatically. (If you look
into the generated assembler code, you can easily spot this.)

You can easily verify the result by running "avr-objdump --disassemble
demo1.elf":

Disassembly of section .text:

00000000 <.__start_of_init__>:
0: 0a c0 rjmp .+20 ; 0x16
...
0000004a <led1>:
4a: cf 93 push r28
4c: df 93 push r29
4e: cd b7 in r28, 0x3d ; 61
50: de b7 in r29, 0x3e ; 62
52: 10 92 60 00 sts 0x0060, r1
56: df 91 pop r29
58: cf 91 pop r28
5a: 08 95 ret

Register r1 contains always the constant 0 in avr-gcc.
The variable at 0x60 is "ledlight".
Note that all the fiddling with the frame pointer in r28/r29
is moot; if you use -O2, avr-gcc omits it.

0000005c <main>:
5c: cf ed ldi r28, 0xDF ; 223
5e: d0 e0 ldi r29, 0x00 ; 0
60: de bf out 0x3e, r29 ; 62
62: cd bf out 0x3d, r28 ; 61

This is the initialization of the stack pointer, pointing to the top
of RAM. avr-gcc always generates code for a 16-bit stack pointer,
although the '2313 only uses the lower stack pointer (register 0x3d).
Obviously :), there should be no program variables located at the top
of RAM.

64: 8f ef ldi r24, 0xFF ; 255
66: 87 bb out 0x17, r24 ; 23
68: 8f ef ldi r24, 0xFF ; 255
6a: 88 bb out 0x18, r24 ; 24

These are the outputs to DDRB and PORTB.

6c: ee df rcall .-36 ; 0x4a

The call to led1().

6e: 10 92 60 00 sts 0x0060, r1

The same as inline code inside main().

72: 80 91 60 00 lds r24, 0x0060
76: 88 bb out 0x18, r24 ; 24
78: fc cf rjmp .-8 ; 0x72

Your loop.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Thu Nov 29 04:37:53 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1696mX-00030N-00
for <[email-masked]>; Thu, 29 Nov 2001 04:37:53 +1300
Received: from 199.182.92.154.ras04.den.iras.frii.net (199.182.92.154.ras04.den.iras.frii.net [199.182.92.154])
by deimos.frii.net (8.12.1/8.12.1) with ESMTP id fASFfObn064024
for <[email-masked]>; Wed, 28 Nov 2001 08:41:25 -0700 (MST)
Date: Wed, 28 Nov 2001 08:43:33 -0700 (MST)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
cc: "[email-masked]" <[email-masked]>
Subject: Re: [avr-gcc-list] GDB gets line numbers wrong. Help!
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Scott,

Have you tried comiling without the -O? option? If I'm not mistaken, when
you tell the compiler to optimize, it takes liberties and changes code
behind the scenes, thus making the symbol table in the elf file not quite
right.

From my experience, using only -g and not using -O? is what you should do
when you have to go into debugger. Besides, in the debugger, optimizing
your program is a moot point.

Ted Roth

On Wed, 28 Nov 2001, Scott Finneran wrote:

:)Hello everyone,
:)
:)Apologies if this seems a little off-topic. I am currently experiencing
:)a problem with gdb-5.0 (patched for the AVR). It seems that GDB is
:)unable to correctly align program space addresses with source lines.
:)Running with -O0 does of course help a little but certainly does not fix
:)the problem entirely.
:)
:)We are not talking about minor errors either. Quite often, GDB will say
:)that a program address corresponds to a line number > the length of the
:)source file. This also occurs regardless of whether the source contains
:)C or C++ or a combination of the two.
:)
:)Even some help determining if the fault lies in GCC/G++ producing the
:)elf files or in GDB reading them would be greatly appreciated.
:)(avr-objdump isn't really appropriate for this as it may contain the
:)same bug!)
:)
:)In case my mistake lies in a selection of my cmd-line args, source file
:)compilations look like this:
:)cook: avr-gcc -I./library/hdr -Ibl/library/hdr -Iblbl/library/hdr
:) -Iblblbl/library/hdr -I/usr/local/include -I. -Ibl -Iblbl -Iblblbl
:) -I./flasher/hdr -Ibl/flasher/hdr -Iblbl/flasher/hdr
:) -Iblblbl/flasher/hdr -I./ucosii/hdr -Ibl/ucosii/hdr -Iblbl/ucosii/hdr
:) -Iblblbl/ucosii/hdr -I/usr/local/avr/include -D__AVR_ATmega128__
:) -DOS_UCOSII -Wa,-gstabs -mmcu=atmega128 -g -O0 -Wall -Werror
:) -save-temps -c flasher/src/main.c
:) -Wa,-ahl=flasher/src/ATmega128-ucos/main.lst -o
:) flasher/src/ATmega128-ucos/main.o
:)
:)...and linker command-line looks like this:
:)cook: avr-g++ -Wl,--cref -mmcu=atmega128 --verbose -t -fno-rtti
:)-fno-exceptions
:) -T flasher/script/avrmega128.x -L./ucosii/ATmega128-ucos
:) -Lbl/ucosii/ATmega128-ucos -Lblbl/ucosii/ATmega128-ucos
:) -Lblblbl/ucosii/ATmega128-ucos -L./avr/ATmega128-ucos
:) -Lbl/avr/ATmega128-ucos -Lblbl/avr/ATmega128-ucos
:) -Lblblbl/avr/ATmega128-ucos -L./ucosii/ATmega128-ucos
:) -Lbl/ucosii/ATmega128-ucos -Lblbl/ucosii/ATmega128-ucos
:) -Lblblbl/ucosii/ATmega128-ucos -L./library/ATmega128-ucos
:) -Lbl/library/ATmega128-ucos -Lblbl/library/ATmega128-ucos
:) -Lblblbl/library/ATmega128-ucos -L./smartcpp/ATmega128-ucos
:) -Lbl/smartcpp/ATmega128-ucos -Lblbl/smartcpp/ATmega128-ucos
:) -Lblblbl/smartcpp/ATmega128-ucos -L/usr/local/avr/lib/avr5
:) /usr/local/avr/lib/avr5/crtm128.o flasher/src/ATmega128-ucos/main.o
:) -lavr -lucosii -llibrary -lsmartcpp -lucosii -lavr -lucosii -llibrary
:) -lsmartcpp -lc -lgcc -nostdlib
:) -Wl,-Map,bin/flasher/ATmega128-ucos/rom.map
:) -obin/flasher/ATmega128-ucos/rom.elf
:)
:)Thanks in advance,
:)
:)Scott
:)
:)_______________________________________________
:)avr-gcc-list mailing list
:)[email-masked]
:)http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
:)

From [email-masked] Thu Nov 29 05:32:33 2001
Received: from cmailg5.svr.pol.co.uk ([195.92.195.175])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1697dQ-00034D-00
for <[email-masked]>; Thu, 29 Nov 2001 05:32:33 +1300
Received: from modem-3763.lynx.dialup.pol.co.uk ([217.135.206.179] helo=there)
by cmailg5.svr.pol.co.uk with smtp (Exim 3.13 #0)
id 1697gs-0006JS-00
for [email-masked]; Wed, 28 Nov 2001 16:36:07 +0000
Content-Type: text/plain;
charset="iso-8859-15"
From: Peter Theobald <[email-masked]>
To: [email-masked]
Date: Wed, 28 Nov 2001 16:35:16 +0000
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Message-Id: <[email-masked]>
Subject: [avr-gcc-list] Programming AVR chips from a linux box
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

hi

I'm just about to get started on programming an AVR system and would prefer
to use my linux IDE rather than having to go and use the AVR environment
under windows. Does anyone have a solution for programming the AVR using an
ISP and the standard ATMEL ISP programmer from a linux box.

Any help would be appreciated.

Pete Theobald
UK

From [email-masked] Thu Nov 29 03:54:16 2001
Received: from [209.235.58.166] (helo=artemisgroup.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16966K-0002xI-00
for <[email-masked]>; Thu, 29 Nov 2001 03:54:16 +1300
Received: from c11030-a.scllg1.pa.home.com (c11030-a.scllg1.pa.home.com [24.15.29.78])
by artemisgroup.com (Postfix) with ESMTP
id 253DE7BC7; Wed, 28 Nov 2001 09:57:19 -0500 (EST)
Date: Wed, 28 Nov 2001 09:56:40 -0500 (EST)
From: Patrick Lanphier <[email-masked]>
X-X-Sender: <[email-masked]>
To: Joerg Wunsch <[email-masked]>
Cc: <[email-masked]>
Subject: Re: [avr-gcc-list] GCC Functions
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Well the lights do not turn on when using the function when they do with
the simple assignment statement. As you can see this is a very simple
test. I could put more in the function, however, I would then have to
implement this in the main also. I was attempting find the problem with
the simplest possible test.

Patrick Lanphier
The Artemis Group
http://www.artemisgroup.com
phone: 814-235-0444
fax: 800-582-9710

On Wed, 28 Nov 2001, Joerg Wunsch wrote:

> Patrick Lanphier <[email-masked]> wrote:
>
> > Thanks everyone for the help but things are still not working. It
> > has to do with the function or the global variable. If you toggle
> > between the lines you will see this.
>
> What will we see? Can you elaborate more?
>
> Generating assembler code shows that both statements create
> identical lines of the form:
>
> sts ledlight,__zero_reg__
>
> Unless you tell us a bit more, there's probably not much help. Your
> code /is/ correct (assuming your LEDs are connected between port B and
> Vcc).
>
> Also, why don't you try one of my suggestions about implementing a
> somewhat more sophisticated logic inside led1() (like counting the
> variable ledlight up)? This would allow you a few more hardware
> tests, like connecting an oscilloscope to the various output lines of
> port B. This will help you find out whether the output lines are
> actually toggling at some frequency, are "floating", or maybe just one
> of the output drivers has been damaged by your experiments.
>
>

From [email-masked] Thu Nov 29 05:29:27 2001
Received: from cmailg5.svr.pol.co.uk ([195.92.195.175])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 1697aR-00033p-00
for <[email-masked]>; Thu, 29 Nov 2001 05:29:27 +1300
Received: from modem-3763.lynx.dialup.pol.co.uk ([217.135.206.179] helo=there)
by cmailg5.svr.pol.co.uk with smtp (Exim 3.13 #0)
id 1697dr-0005Ur-00
for [email-masked]; Wed, 28 Nov 2001 16:32:59 +0000
Content-Type: text/plain;
charset="iso-8859-15"
From: Peter Theobald <[email-masked]>
To: [email-masked]
Date: Wed, 28 Nov 2001 16:31:27 +0000
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Message-Id: <[email-masked]>
Subject: [avr-gcc-list] Can anyone tell me about how to get an AVR programmer working under linux
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

hi

I'm just about to get started on programming an AVR system and would prefer
to use my linux IDE rather than having to go and use the AVR environment
under windows. Does anyone have a solution for programming the AVR using an
ISP and the standard ATMEL ISP programmer from a linux box.

Any help would be appreciated.

Pete Theobald
UK

From [email-masked] Thu Nov 29 09:37:15 2001
Received: from tomts14.bellnexxia.net ([209.226.175.35] helo=tomts14-srv.bellnexxia.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 169BSF-0003LB-00
for <[email-masked]>; Thu, 29 Nov 2001 09:37:15 +1300
Received: from valery ([65.92.203.56]) by tomts14-srv.bellnexxia.net
(InterMail vM.4.01.03.16 201-229-121-116-20010115) with SMTP
id <20011128204019.UBUB21779.tomts14-srv.bellnexxia.net@valery>
for <[email-masked]>; Wed, 28 Nov 2001 15:40:19 -0500
Message-ID: <00c901c1784b$dcfd6980$95f5fea9@valery>
From: =?iso-8859-1?Q?Val=E9ry_Florimond?= <[email-masked]>
To: "GNU Dsiscussion Group" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] GCC Functions
Date: Wed, 28 Nov 2001 15:32:56 -0500
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I never met your issue and don't use your micro but to set register
dynamically, I use
"__mmio" instead of "outp"

Replace in your code:
outp(ledlight, PORTB);

with:
__mmio(PORTB) = ledlight;

I don't know if it will fix your problem, just an idea.

Valery.

----- Original Message -----
From: "Patrick Lanphier" <[email-masked]>
To: "Joerg Wunsch" <[email-masked]>
Cc: <[email-masked]>
Sent: Wednesday, November 28, 2001 9:56 AM
Subject: Re: [avr-gcc-list] GCC Functions

> Well the lights do not turn on when using the function when they do with
> the simple assignment statement. As you can see this is a very simple
> test. I could put more in the function, however, I would then have to
> implement this in the main also. I was attempting find the problem with
> the simplest possible test.
>
> Patrick Lanphier
> The Artemis Group
> http://www.artemisgroup.com
> phone: 814-235-0444
> fax: 800-582-9710
>
> On Wed, 28 Nov 2001, Joerg Wunsch wrote:
>
> > Patrick Lanphier <[email-masked]> wrote:
> >
> > > Thanks everyone for the help but things are still not working. It
> > > has to do with the function or the global variable. If you toggle
> > > between the lines you will see this.
> >
> > What will we see? Can you elaborate more?
> >
> > Generating assembler code shows that both statements create
> > identical lines of the form:
> >
> > sts ledlight,__zero_reg__
> >
> > Unless you tell us a bit more, there's probably not much help. Your
> > code /is/ correct (assuming your LEDs are connected between port B and
> > Vcc).
> >
> > Also, why don't you try one of my suggestions about implementing a
> > somewhat more sophisticated logic inside led1() (like counting the
> > variable ledlight up)? This would allow you a few more hardware
> > tests, like connecting an oscilloscope to the various output lines of
> > port B. This will help you find out whether the output lines are
> > actually toggling at some frequency, are "floating", or maybe just one
> > of the output drivers has been damaged by your experiments.
> >
> >
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Thu Nov 29 10:31:26 2001
Received: from varis.cs.tut.fi
([130.230.4.42] helo=cs.tut.fi ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 169CIf-0003Ob-00
for <[email-masked]>; Thu, 29 Nov 2001 10:31:25 +1300
Received: from kaarne.cs.tut.fi ([email-masked] [130.230.4.11])
by cs.tut.fi (8.8.8/8.8.8) with ESMTP id XAA25238;
Wed, 28 Nov 2001 23:34:49 +0200 (EET)
From: Kujala Matti <[email-masked]>
Received: (from ear@localhost)
by kaarne.cs.tut.fi (8.8.5/8.8.4)
id XAA01906; Wed, 28 Nov 2001 23:34:49 +0200 (EET)
Message-Id: <[email-masked]>
Subject: Re: [avr-gcc-list] GCC Functions
In-Reply-To: <[email-masked]> from Patrick Lanphier at "Nov 28, 2001 09:08:05 am"
To: [email-masked] (Patrick Lanphier)
Date: Wed, 28 Nov 2001 23:34:49 +0200 (EET)
Cc: [email-masked]
X-Mailer: ELM [version 2.4ME+ PL49 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> Thanks everyone for the help but things are still not working. It has to
> do with the function or the global variable. If you toggle between the
> lines you will see this. Thank you very much for your help.
>
> led1();
> //ledlight = 0
>
>
> /*
> *************************************************************************
> avr-gcc -O0 -Wall -mmcu=at90s2313 -c demo2c.c -o demo1.o
> avr-gcc -o demo1.elf demo1.o
> avr-objcopy -O ihex demo1.elf demo1.hex
> **************************************************************************
> */

I still use very old version of avr-gcc and may be totally lost with this,
but is the crt1.o linked with the code if you compile with the commands
above?

--
What sorcery, what spells, have brought thee here?

From [email-masked] Thu Nov 29 10:44:40 2001
Received: from [209.218.190.5] (helo=mail.compuweb.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 169CVU-0003PW-00
for <[email-masked]>; Thu, 29 Nov 2001 10:44:40 +1300
Received: from mail.compuweb.com [24.187.38.148] by mail.compuweb.com
(SMTPD32-7.04) id ACBC82014E; Wed, 28 Nov 2001 16:53:00 -0500
Date: Wed, 28 Nov 2001 16:56:21 -0500
From: Ormund Williams <[email-masked]>
To: Peter Theobald <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Can anyone tell me about how to get an AVR programmer working under linux
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
In-Reply-To: <[email-masked]>; from [email-masked] on Wed, Nov 28, 2001 at 11:31:27 -0500
X-Mailer: Balsa 1.1.1
Content-Length: 493
Lines: 23
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On 2001.11.28 11:31 Peter Theobald wrote:
> hi
>
> I'm just about to get started on programming an AVR system and would
> prefer
> to use my linux IDE rather than having to go and use the AVR
> environment
> under windows. Does anyone have a solution for programming the AVR
> using an
> ISP and the standard ATMEL ISP programmer from a linux box.
>
> Any help would be appreciated.
>
> Pete Theobald
> UK
>

This is what I use on Linux:

http://www.amelek.gda.pl/avr/uisp/

--
Ormund

From [email-masked] Thu Nov 29 17:23:06 2001
Received: from [209.235.58.166] (helo=artemisgroup.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 169Ij4-0003kv-00
for <[email-masked]>; Thu, 29 Nov 2001 17:23:06 +1300
Received: from c11030-a.scllg1.pa.home.com (c11030-a.scllg1.pa.home.com [24.15.29.78])
by artemisgroup.com (Postfix) with ESMTP id 3BBFA7BC7
for <[email-masked]>; Wed, 28 Nov 2001 23:26:10 -0500 (EST)
Date: Wed, 28 Nov 2001 23:25:30 -0500 (EST)
From: Patrick Lanphier <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] GCC Functions
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Thank you all very much for the help. I (we) figured out the problem. New
to AVR GCC and C, I don't know why but the last two lines work and the
first three do not when compiling for the chip? Thank you all again.

#avr-gcc -O0 -Wall -mmcu=at90s2313 -c demo2c.c -o demo1.o
#avr-gcc -o demo1.elf demo1.o
#avr-objcopy -O ihex demo1.elf demo1.hex

avr-gcc -O0 -mmcu=at90s2313 -Wall -o demo1 demo2c.c
avr-objcopy -O ihex demo1 demo1.hex

Patrick Lanphier
The Artemis Group
http://www.artemisgroup.com
phone: 814-235-0444
fax: 800-582-9710

From [email-masked] Thu Nov 29 21:35:09 2001
Received: from challenger.osl.ttyl.com ([148.122.208.20] helo=fep2.mta.online.no)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 169Mey-0003xo-00
for <[email-masked]>; Thu, 29 Nov 2001 21:35:08 +1300
Received: from acpfire.at ([195.70.106.130]) by fep2.mta.online.no
(InterMail vM.4.01.03.23 201-229-121-123-20010418) with SMTP
id <[email-masked]>
for <[email-masked]>; Thu, 29 Nov 2001 09:38:40 +0100
From: franz r <[email-masked]>
Date: Thu, 29 Nov 2001 08:31:20 GMT
Message-ID: <[email-masked]>
Subject: RE: [avr-gcc-list] debugger info
To: <[email-masked]>
In-Reply-To: <00da01c176c6$8a77be30$0307a8c0@sony>
References: <00da01c176c6$8a77be30$0307a8c0@sony>
X-Mailer: Mozilla/3.0 (compatible; StarOffice/5.2;Win32)
X-Priority: 3 (Normal)
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I found it on=20
http://www.pvv.ntnu.no/~torhr/avrmon-stk200/

Regards,
Franz Reich

>>>>>>>>>>>>>>>>>> Urspr=FCngliche Nachricht <<<<<<<<<<<<<<<<<<

Am 26.11.2001, 23:05:57, schrieb "Ross Wakelin" <[email-masked]> z=
um=20
Thema RE: [avr-gcc-list] debugger info:

> no, but I would like to know about it...

> ----------
> Ross Wakelin - Independent Information Technology Consultant
> Tel: +64 (0)3 3433186 Fax: +64 (0)3 3433196
> Cell: +64 (0)21 334380

> -----Original Message-----
> From: [email-masked]
> [mailto:[email-masked]] On Behalf Of Robert Rozman
> Sent: Tuesday, 27 November 2001 09:59
> To: [email-masked]
> Subject: Re: [avr-gcc-list] debugger info

> Hello,

> nobody mentioned low cost in circuit debugging via stk 200 dongle in
> -Linux with help of avrmon. Anyone using that ?

> Regards,

> Robert Rozman
> [email-masked]
> ----- Original Message -----
> From: "Scott Finneran" <[email-masked]>
> To: <[email-masked]>
> Cc: <[email-masked]>
> Sent: 26. november 2001 2:54
> Subject: Re: [avr-gcc-list] debugger info

> > Ross,
> >
> > There is a link on the website to the Atmel site. It is their produc=
t.

> > I believe that it retails for around US$250 (quite reasonable for a=

> > JTAG box in my limited experience).
> >
> > A review of it should be on avrfreaks (http://www.avrfreaks.net).
> > note: This review deals deals with the Atmel JTAG ICE being used wit=
h
> > AVR
> Studio.
> >
> > Cheers,
> >
> > scott Finneran
> >
> > Ross Wakelin wrote:
> >
> > > Ooookay, so where do I get one of these JTAG thingies,
> > > and how much does it cost......
> > >
> > > Thanks
> > >
> > > ----------
> > > Ross Wakelin - Independent Information Technology Consultant
> > > Tel: +64 (0)3 3433186 Fax: +64 (0)3 3433196
> > > Cell: +64 (0)21 334380
> > >
> > > -----Original Message-----
> > > From: Scott Finneran [mailto:[email-masked]]
> > > Sent: Monday, 26 November 2001 11:41
> > > To: [email-masked]
> > > Cc: [email-masked]
> > > Subject: Re: [avr-gcc-list] debugger info
> > >
> > >
> > > Hello Ross,
> > >
> > > Check out AVaRICE(http://avarice.sourceforge.net). It is free(GPL)=

> > > and allows you to interface the Atmel AVR JTAG ICE with gdb.
> > >
> > > Regards,
> > >
> > > Scott Finneran
> > >
> > > Ross Wakelin wrote:
> > >
> > >
> > >>Hi,
> > >>
> > >>I'm just starting with the Atmel line of chips, and
> > >>have an ABC maxi as my test bed. I am using the latest
> > >>GCC tool chain downloaded from AVR freaks.
> > >>
> > >>How are you supposed to do debugging, especially
> > >>in circuit debugging, in this sort of environment?
> > >>
> > >>Thanks
> > >>
> >
> >
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > [email-masked]
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Thu Nov 29 23:08:47 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 169O7a-00043Y-00
for <[email-masked]>; Thu, 29 Nov 2001 23:08:46 +1300
Received: (from j@localhost)
by ida.interface-business.de id fATACFV99021;
Thu, 29 Nov 2001 11:12:15 +0100 (MET)
Date: Thu, 29 Nov 2001 11:12:15 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] GCC Functions
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Patrick Lanphier <[email-masked]> wrote:

> ..., I don't know why but the last two lines work and the
> first three do not when compiling for the chip?
>
> #avr-gcc -O0 -Wall -mmcu=at90s2313 -c demo2c.c -o demo1.o
> #avr-gcc -o demo1.elf demo1.o
> #avr-objcopy -O ihex demo1.elf demo1.hex
>
> avr-gcc -O0 -mmcu=at90s2313 -Wall -o demo1 demo2c.c
> avr-objcopy -O ihex demo1 demo1.hex

Both versions are supposed to work identically (with the exception
that the second one doesn't store demo1.o permanently, of course). If
one works and the other doesn't, i suppose your gcc installation is
broken. You could do two things to analyze the situation:

.. disassemble both resulting ELF files (demo1.elf / demo1), and
compare the result; maybe even running avr-nm on them already
would make the difference obvious

.. include -v to all compiler command lines; this will show you
the command-line calls to the backend tools avr-gcc is issuing;
somehow, they must be different between both versions

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Thu Nov 29 23:35:59 2001
Received: from mail2.alphalink.com.au ([202.161.124.58])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 169OXu-00044q-00
for <[email-masked]>; Thu, 29 Nov 2001 23:35:59 +1300
Received: from research (d44-ps3-mel.alphalink.com.au [202.161.108.172])
by mail2.alphalink.com.au (8.11.4/8.9.3) with SMTP id fATAdWs21050
for <[email-masked]>; Thu, 29 Nov 2001 21:39:32 +1100
From: "Ron Kreymborg" <[email-masked]>
To: <[email-masked]>
Subject: RE: [avr-gcc-list] GCC Functions
Date: Thu, 29 Nov 2001 21:40:01 +1100
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
In-Reply-To: <[email-masked]>
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Importance: Normal
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Have a look at page 40 of K&R Ansi C: "External and static variables are
initialised to zero by default".

-------------------------------------------
Ron Kreymborg
Jennaron Research
Melbourne, Australia

> -----Original Message-----
> From: [email-masked]
> [mailto:[email-masked]]On Behalf Of Paulo Abreu
> Sent: Tuesday, 27 November 2001 9:44 PM
> To: [email-masked]
> Subject: Re: [avr-gcc-list] GCC Functions
>
>
>
> >This is basically a do-nothing, since ledlight is already 0x0 (per
> >definition, since it's a global variable).
>
> An opinion: initializing a variable to 0 is not a C standard. So, it
> is not a good approach assuming that all compilers will act as you
> state. Code will be more portable if you follow standards.
>
> Regards,
>
> Paulo Abreu
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Fri Nov 30 02:07:36 2001
Received: from fire.otris.de ([62.159.151.210] helo=o3s.o3s.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 169Qud-0004DG-00
for <[email-masked]>; Fri, 30 Nov 2001 02:07:35 +1300
Received: from otris.de (DHCP13.o3s.de [192.168.2.112])
by o3s.o3s.de (8.9.3/8.9.3) with ESMTP id OAA10438
for <[email-masked]>; Thu, 29 Nov 2001 14:11:10 +0100
Message-ID: <[email-masked]>
Date: Thu, 29 Nov 2001 14:18:07 +0100
From: Gunnar Henne <[email-masked]>
Organization: oTRIs GmbH
X-Mailer: Mozilla 4.73 [de] (Windows NT 5.0; U)
X-Accept-Language: de
MIME-Version: 1.0
To: AVR GCC List <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Problems building gdb (with gdbserver-patch) under mingw
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I tried to compile a patched gdb-5.0 under mingw.
I got following errors during configure:

checking for cygwin... no
checking for tgetent in -lncurses... no
checking for tgetent in -lHcurses... no
checking for tgetent in -ltermlib... no
checking for tgetent in -ltermcap... no
checking for tgetent in -lcurses... no
checking for tgetent in -lterminfo... no
configure: error: Could not find a term library

I found a package pdcrses for mingw and renamed the lib to libcurses.a.
-> no change :-(

Can someone give me a hint?

simulavr configures fine under mingw but is not compileable due to heavy
unixish programming.
Under cygwin everything is OK.

Regards

Gunnar

From [email-masked] Fri Nov 30 02:36:19 2001
Received: from varis.cs.tut.fi
([130.230.4.42] helo=cs.tut.fi ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 169RMQ-0004FZ-00
for <[email-masked]>; Fri, 30 Nov 2001 02:36:19 +1300
Received: from orfeuskerttu.cs.tut.fi ([email-masked] [130.230.2.34])
by cs.tut.fi (8.8.8/8.8.8) with ESMTP id PAA15820
for <[email-masked]>; Thu, 29 Nov 2001 15:39:55 +0200 (EET)
From: Kujala Matti <[email-masked]>
Received: (from ear@localhost)
by orfeuskerttu.cs.tut.fi (8.8.5/8.8.4)
id PAA13931 for [email-masked]; Thu, 29 Nov 2001 15:39:54 +0200 (EET)
Message-Id: <[email-masked]>
Subject: Re: [avr-gcc-list] GCC Functions
In-Reply-To: <[email-masked]> from Joerg Wunsch at "Nov 29, 2001 11:12:15 am"
Date: Thu, 29 Nov 2001 15:39:54 +0200 (EET)
Cc: [email-masked]
X-Mailer: ELM [version 2.4ME+ PL49 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> Patrick Lanphier <[email-masked]> wrote:
>
> > ..., I don't know why but the last two lines work and the
> > first three do not when compiling for the chip?
> >
> > #avr-gcc -O0 -Wall -mmcu=at90s2313 -c demo2c.c -o demo1.o
> > #avr-gcc -o demo1.elf demo1.o
> > #avr-objcopy -O ihex demo1.elf demo1.hex
> >
> > avr-gcc -O0 -mmcu=at90s2313 -Wall -o demo1 demo2c.c
> > avr-objcopy -O ihex demo1 demo1.hex
>
> Both versions are supposed to work identically (with the exception
> that the second one doesn't store demo1.o permanently, of course).

When you are compiling in the first way, are you not supposed to
explicitly link crt1.o if you want it put into the program?
--
What sorcery, what spells, have brought thee here?

From [email-masked] Fri Nov 30 03:45:45 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 169SRc-0004KU-00
for <[email-masked]>; Fri, 30 Nov 2001 03:45:44 +1300
Received: (from j@localhost)
by ida.interface-business.de id fATEnBU99996;
Thu, 29 Nov 2001 15:49:11 +0100 (MET)
Date: Thu, 29 Nov 2001 15:49:11 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] GCC Functions
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Kujala Matti <[email-masked]> wrote:

>> > #avr-gcc -O0 -Wall -mmcu=at90s2313 -c demo2c.c -o demo1.o
>> > #avr-gcc -o demo1.elf demo1.o
>> > #avr-objcopy -O ihex demo1.elf demo1.hex

> When you are compiling in the first way, are you not supposed to
> explicitly link crt1.o if you want it put into the program?

Yes, you are not supposed to ever handle crtX.o manually when using
avr-gcc. Only if you decide to handle the entire linkage step
manually by explicitly calling avr-ld, this will pass any and all
responsibilites to you.

Again, you can easily watch all this by calling avr-gcc with the -v
flag: it'll tell you about which backend command it's calling, and
which arguments to call them with.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Fri Nov 30 04:34:37 2001
Received: from usc.edu ([128.125.253.136] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 169TCu-0004N6-00
for <[email-masked]>; Fri, 30 Nov 2001 04:34:37 +1300
Received: from aludra.usc.edu ([email-masked] [128.125.253.184])
by usc.edu (8.9.3.1/8.9.3/usc) with ESMTP
id HAA23781; Thu, 29 Nov 2001 07:34:56 -0800 (PST)
Received: from localhost (mediratt@localhost)
by aludra.usc.edu (8.10.1/8.10.1/usc) with ESMTP
id fATFYtd11492; Thu, 29 Nov 2001 07:34:55 -0800 (PST)
Date: Thu, 29 Nov 2001 07:34:54 -0800 (PST)
From: Rohit Mediratta <[email-masked]>
To: Peter Theobald <[email-masked]>
cc: <[email-masked]>
Subject: Re: [avr-gcc-list] Can anyone tell me about how to get an AVR
programmer working under linux
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

uisp and avr-gcc is all that you need for linux.
You could get it from AvrFreaks.org

rohit

On Wed, 28 Nov 2001, Peter Theobald wrote:

> hi
>
> I'm just about to get started on programming an AVR system and would prefer
> to use my linux IDE rather than having to go and use the AVR environment
> under windows. Does anyone have a solution for programming the AVR using an
> ISP and the standard ATMEL ISP programmer from a linux box.
>
> Any help would be appreciated.
>
> Pete Theobald
> UK
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Sat Dec 01 01:28:16 2001
Received: from ms.prism.co.za ([196.34.63.68] helo=mailsweeper.prism.co.za)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 169mm7-0005Z2-00
for <[email-masked]>; Sat, 01 Dec 2001 01:28:16 +1300
Received: from exchange.prism.co.za (unverified) by mailsweeper.prism.co.za
(Content Technologies SMTPRS 4.2.5) with ESMTP id <[email-masked]> for <[email-masked]>;
Fri, 30 Nov 2001 14:24:57 +0200
Received: from heinrichv.prism.co.za (10.5.3.50 [10.5.3.50]) by exchange.prism.co.za with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13)
id XARR44DP; Fri, 30 Nov 2001 14:21:34 +0200
Content-Type: text/plain;
charset="iso-8859-1"
From: Heinrich Vermeulen <[email-masked]>
Reply-To: [email-masked]
Organization: Prism
To: [email-masked]
Date: Fri, 30 Nov 2001 14:20:09 +0200
X-Mailer: KMail [version 1.2]
References: <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Message-Id: <[email-masked]>
Content-Transfer-Encoding: 8bit
Subject: [avr-gcc-list] ATMega128 AVR-GCC support
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi

1) Are there any compiler support for the ATMega128?

2) Are there any support for the JTAG interface on Linux? If not, how far is
it as this stage?

Thanks

Heinrich Vermeulen
Linux fan
[email-masked]

From [email-masked] Sat Dec 01 09:08:22 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 169txM-0006XI-00
for <[email-masked]>; Sat, 01 Dec 2001 09:08:21 +1300
Received: (from rneswold@localhost)
by DrMemory.fnal.GOV (8.11.6/8.11.6) id fAUKBqW91198;
Fri, 30 Nov 2001 14:11:52 -0600 (CST)
(envelope-from rneswold)
Date: Fri, 30 Nov 2001 14:11:52 -0600
From: Rich Neswold <[email-masked]>
To: Joerg Wunsch <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] GCC Functions
Message-ID: <[email-masked]>
Reply-To: Rich Neswold <[email-masked]>
References: <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="ZPt4rx8FFjLCG7dd"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Thu, Nov 29, 2001 at 11:12:15AM +0100
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.4-RELEASE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--ZPt4rx8FFjLCG7dd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Wasn't it 29-Nov-2001, at 11:12AM, when Joerg Wunsch said:
> Patrick Lanphier <[email-masked]> wrote:
>=20
> > ..., I don't know why but the last two lines work and the
> > first three do not when compiling for the chip?
> >=20
> > #avr-gcc -O0 -Wall -mmcu=3Dat90s2313 -c demo2c.c -o demo1.o
> > #avr-gcc -o demo1.elf demo1.o
> > #avr-objcopy -O ihex demo1.elf demo1.hex
> >=20
> > avr-gcc -O0 -mmcu=3Dat90s2313 -Wall -o demo1 demo2c.c
> > avr-objcopy -O ihex demo1 demo1.hex
>=20
> Both versions are supposed to work identically (with the exception
> that the second one doesn't store demo1.o permanently, of course). If
> one works and the other doesn't, i suppose your gcc installation is
> broken. You could do two things to analyze the situation:

Actually, the first example links without specifying the MCU type, so it is
(possibly) getting linked with the wrong crt.o. (What is the default MCU
type?)

--=20
Rich Neswold

efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

--ZPt4rx8FFjLCG7dd
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE8B+gIZmE+i9FKxdwRApyIAJ4kVDj2+2Y7Xs8+u0kpd4s7iy/CuwCfaqPi
Y+TPN7Oe7fNzxkzVXNLlYa8=
=gpDY
-----END PGP SIGNATURE-----

--ZPt4rx8FFjLCG7dd--

From [email-masked] Fri Nov 30 16:31:35 2001
Received: from gamayun.cs.ucla.edu ([131.179.144.103])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 169eOl-00054t-00
for <[email-masked]>; Fri, 30 Nov 2001 16:31:35 +1300
Received: from localhost (jelson@localhost)
by Gamayun.CS.UCLA.EDU (8.11.6/8.11.6) with ESMTP id fAU3ZpA10678
for <[email-masked]>; Thu, 29 Nov 2001 19:35:51 -0800
X-Authentication-Warning: Gamayun.CS.UCLA.EDU: jelson owned process doing -bs
Date: Thu, 29 Nov 2001 19:35:51 -0800 (PST)
From: Jeremy Elson <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="-1283233904-1312726953-1007091351=:10664"
Subject: [avr-gcc-list] gcc 3.02 patches for uisp
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to [email-masked] for more info.

---1283233904-1312726953-1007091351=:10664
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hi,

I tried to compile the latest UISP (1.0b) with gcc 3.02 and against Linux
2.4 kernel header files, and ran into some minor snags. The attached
patch seems to fix them. If there's somewhere else they should be sent,
please let me know.

Best,
Jeremy

---1283233904-1312726953-1007091351=:10664
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=uisp-patch
Content-Transfer-Encoding: BASE64
Content-ID: <[email-masked]>
Content-Description:
Content-Disposition: attachment; filename=uisp-patch

ZGlmZiAtdSAtLXJlY3Vyc2l2ZSB1aXNwLTEuMGIvc3JjL0F2ci5oIHVpc3At
MS4wYi1uZXcvc3JjL0F2ci5oDQotLS0gdWlzcC0xLjBiL3NyYy9BdnIuaAlU
dWUgQXVnIDI5IDEwOjA4OjI4IDIwMDANCisrKyB1aXNwLTEuMGItbmV3L3Ny
Yy9BdnIuaAlUaHUgTm92IDI5IDE4OjU1OjMzIDIwMDENCkBAIC0xNiw4ICsx
Niw3IEBADQogI2RlZmluZSBBVlJfVk9MVEFHRV9TUFJBTkdFCSg1LjAgLSAz
LjIpCS8qIFYgKi8NCiANCiBjbGFzcyBUQXZyOiBwdWJsaWMgVERldmljZXsN
Ci1wcml2YXRlOg0KLQ0KK3B1YmxpYzoNCiAgIC8qIFRoZSBmb2xsb3dpbmcg
c3RydWN0dXJlIGRlc2NyaWJlcyB0aGUgRlVTRSBzZWdtZW50Lg0KICAgICAg
VGhlIGZ1c2VfZGVzY1tiaXRfbnVtYmVyXSBjYW4gYmUgZWl0aGVyOg0KICAg
ICAgICBTVFJJTkcgTkFNRSAJbGlrZSAiQ0xLMCIgZXRjLg0KQEAgLTM3LDYg
KzM2LDcgQEANCiAgICAgY2hhciogZnVzZV9kZXNjX3dyIFs4XTsNCiAgIH07
DQogDQorcHJpdmF0ZToNCiAgIC8qIEFWUiBGYW1pbHkgRGV2aWNlIExpc3Qg
DQogICAqLw0KICAgc3RydWN0IFRQYXJ0IHsNCkBAIC04NCw3ICs4NCw3IEBA
DQogICBUQnl0ZSBwYXJ0X251bWJlcjsNCiAgIA0KICAgdm9pZCBJZGVudGlm
eSgpOw0KLSAgaW5saW5lIGNvbnN0IGNoYXIqIEdldFBhcnROYW1lKCk7ICAN
CisgIGNvbnN0IGNoYXIqIEdldFBhcnROYW1lKCk7ICANCiAgIHZvaWQgQ2hl
Y2tNZW1vcnlSYW5nZShUQWRkciBhZGRyKTsgIA0KICAgbG9uZyBHZXRfdF93
ZF9mbGFzaCgpIGNvbnN0Ow0KICAgbG9uZyBHZXRfdF93ZF9lZXByb20oKSBj
b25zdDsgICAgDQpPbmx5IGluIHVpc3AtMS4wYi1uZXcvc3JjOiBBdnIubw0K
T25seSBpbiB1aXNwLTEuMGItbmV3L3NyYzogQXZyQXRtZWwubw0KT25seSBp
biB1aXNwLTEuMGItbmV3L3NyYzogQXZyRHVtbXkubw0KZGlmZiAtdSAtLXJl
Y3Vyc2l2ZSB1aXNwLTEuMGIvc3JjL0RBUEEuQyB1aXNwLTEuMGItbmV3L3Ny
Yy9EQVBBLkMNCi0tLSB1aXNwLTEuMGIvc3JjL0RBUEEuQwlUdWUgQXVnIDI5
IDEwOjA4OjI4IDIwMDANCisrKyB1aXNwLTEuMGItbmV3L3NyYy9EQVBBLkMJ
VGh1IE5vdiAyOSAxODo1Mjo1MSAyMDAxDQpAQCAtNDAsNiArNDAsOCBAQA0K
ICNpZmRlZiBESVJUWUhBQ0sNCiAjZGVmaW5lIF9fS0VSTkVMX18NCiAjZW5k
aWYNCit0eXBlZGVmIGludCB3YWl0X3F1ZXVlX2hlYWRfdDsNCitzdHJ1Y3Qg
c2VtYXBob3JlIHtpbnQgZHVtbXk7IH07DQogI2luY2x1ZGUgPGxpbnV4L2xw
Lmg+DQogI2lmZGVmIERJUlRZSEFDSw0KICN1bmRlZiBfX0tFUk5FTF9fDQpP
bmx5IGluIHVpc3AtMS4wYi1uZXcvc3JjOiBEQVBBLm8NCmRpZmYgLXUgLS1y
ZWN1cnNpdmUgdWlzcC0xLjBiL3NyYy9HbG9iYWwuaCB1aXNwLTEuMGItbmV3
L3NyYy9HbG9iYWwuaA0KLS0tIHVpc3AtMS4wYi9zcmMvR2xvYmFsLmgJVHVl
IEF1ZyAyOSAxMDowODoyOCAyMDAwDQorKysgdWlzcC0xLjBiLW5ldy9zcmMv
R2xvYmFsLmgJVGh1IE5vdiAyOSAxODo0OToyNyAyMDAxDQpAQCAtODksNyAr
ODksNyBAQA0KICAgVERldmljZSgpOkNSZWYoMCl7fQ0KICAgdmlydHVhbCB+
VERldmljZSgpe30NCiAgIA0KLSAgZnJpZW5kIFRQdDxURGV2aWNlPjsNCisg
IGZyaWVuZCBjbGFzcyBUUHQ8VERldmljZT47DQogfTsNCiANCiB0eXBlZGVm
IFRQdDxURGV2aWNlPiBQRGV2aWNlOw0KT25seSBpbiB1aXNwLTEuMGItbmV3
L3NyYzogTWFpbi5vDQpPbmx5IGluIHVpc3AtMS4wYi1uZXcvc3JjOiBNb3RJ
bnRsLm8NCk9ubHkgaW4gdWlzcC0xLjBiLW5ldy9zcmM6IFNlcmlhbC5vDQpk
aWZmIC11IC0tcmVjdXJzaXZlIHVpc3AtMS4wYi9zcmMvVGVybWluYWwuQyB1
aXNwLTEuMGItbmV3L3NyYy9UZXJtaW5hbC5DDQotLS0gdWlzcC0xLjBiL3Ny
Yy9UZXJtaW5hbC5DCVR1ZSBBdWcgMjkgMTA6MDg6MjggMjAwMA0KKysrIHVp
c3AtMS4wYi1uZXcvc3JjL1Rlcm1pbmFsLkMJVGh1IE5vdiAyOSAxODo0Njoz
NSAyMDAxDQpAQCAtNyw2ICs3LDcgQEANCiANCiAjaW5jbHVkZSA8aW9zdHJl
YW0uaD4NCiAjaW5jbHVkZSA8c3RkaW8uaD4NCisjaW5jbHVkZSA8c3RyaW5n
Lmg+DQogI2luY2x1ZGUgIkdsb2JhbC5oIg0KICNpbmNsdWRlICJFcnJvci5o
Ig0KICNpbmNsdWRlICJUZXJtaW5hbC5oIg0KT25seSBpbiB1aXNwLTEuMGIt
bmV3L3NyYzogVGVybWluYWwubw0KT25seSBpbiB1aXNwLTEuMGItbmV3L3Ny
YzogdWlzcA0K
---1283233904-1312726953-1007091351=:10664--

From [email-masked] Mon Dec 03 11:30:48 2001
Received: from [203.24.179.147] (helo=smartcontainer.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 16Af8J-0002PJ-00
for <[email-masked]>; Mon, 03 Dec 2001 11:30:48 +1300
Received: (qmail 17197 invoked by uid 8); 2 Dec 2001 22:34:41 -0000
Received: from link.smartcontainer.net (20.20.20.12, claiming to be "smartcontainer.net")
by smarty with SMTP id smtpdZEuUfO; Sun, 02 Dec 2001 17:34:40 EST
Message-ID: <[email-masked]>
Date: Mon, 03 Dec 2001 09:34:35 +1100
From: Scott Finneran <[email-masked]>
Organization: Smart Container
X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.7-10 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
CC: [email-masked]
Subject: Re: [avr-gcc-list] ATMega128 AVR-GCC support
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Heinrich Vermeulen wrote:
>
> Hi
Hello.

> 1) Are there any compiler support for the ATMega128?
We are currently compiling C++, C and assembler for the ATMega128. Peter Jansen submitted patches for this in the past few weeks. I believe that at least some of this is in
the CVS tree for GCC and binutils.
The same patches were also sent to this mailing list around the same time so check out the list archive. If you want to play things on the safe side, ask the GCC and
binutils maintainers and wait for the next release.

> 2) Are there any support for the JTAG interface on Linux? If not, how far is
> it as this stage?
http://avarice.sourceforge.net. Status: It works. The only major feature which needs to be added (as soon as I get a spare hour or two) is data space breakpoints.

Cheers,

Scott

From [email-masked] Mon Dec 03 23:28:30 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16AqKq-00032o-00
for <[email-masked]>; Mon, 03 Dec 2001 23:28:29 +1300
Received: (from j@localhost)
by ida.interface-business.de id fB3AWI832108;
Mon, 3 Dec 2001 11:32:18 +0100 (MET)
Date: Mon, 3 Dec 2001 11:32:18 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
<[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] GCC Functions
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Rich Neswold <[email-masked]> wrote:

>> Both versions are supposed to work identically (with the exception
>> that the second one doesn't store demo1.o permanently, of course).

> Actually, the first example links without specifying the MCU type,
> so it is (possibly) getting linked with the wrong crt.o. (What is
> the default MCU type?)

Well spotted, Rich, you win the prize. :-)

% avr-gcc -v -o foo1 foo.o
Reading specs from /usr/local/lib/gcc-lib/avr/3.0.1/specs
Configured with: ./configure --target=avr --prefix=/usr/local i386--freebsd4.4
Thread model: single
gcc version 3.0.1
/usr/local/lib/gcc-lib/avr/3.0.1/../../../../avr/bin/ld -m avr85xx -o foo1 /usr/local/lib/gcc-lib/avr/3.0.1/../../../../avr/lib/crts8515.o -L/usr/local/lib/gcc-lib/avr/3.0.1 -L/usr/local/lib/gcc-lib/avr/3.0.1/../../../../avr/lib foo.o -lgcc -lc -lgcc

So the default is an AT90S8515. This explains why it doesn't work for
Patrick:

% avr-nm foo1 | fgrep stack
0000025f W __stack

The stack is initialized far beyond what is viable for the AT90S2313.
OK, the '2313 ignores the upper byte of the stack pointer, but then,
this yields a stack below 0x5f which is below the bottom of RAM (the
stack is going to overwrite the memory-mapped hardware registers).

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Tue Dec 04 13:49:35 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16B3mA-0003lF-00
for <[email-masked]>; Tue, 04 Dec 2001 13:49:34 +1300
Received: from ari-co2d-153.rasserver.net (ari-co2d-153.rasserver.net [207.92.202.153])
by deimos.frii.net (8.12.1/8.12.1) with ESMTP id fB40rTYY064441;
Mon, 3 Dec 2001 17:53:29 -0700 (MST)
Date: Mon, 3 Dec 2001 17:55:40 -0700 (MST)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>,
AVR GCC List <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] gdb-5.1 patch pre-release
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi All,

I've ported the gdb-5.0-avr-patch-0.1 patch to gdb-5.1 and am looking for
some kind soles to stress test it for me before I make a real release. The
changes from the original patch were mostly straight forward, but the
avr_xfer_memory() function in avr-rom.c needs to be looked at by someone
with more gdb know-how than me.

I ran the patched gdb-5.1 with it talking to my simulavr program and got
the same results as with the patched gdb-5.0.

If you're interested, here's where you can grab the patch:

http://www.frii.com/~troth/gdb-patches/gdb-5.1-avr-patch-0.0-pre2

Ted Roth

From [email-masked] Tue Dec 04 20:22:21 2001
Received: from 208-58-86-11.c3-0.sfo-ubr1.sfrn-sfo.ca.cable.rcn.com ([208.58.86.11] helo=bc.home.246gt.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16B9uH-00043A-00
for <[email-masked]>; Tue, 04 Dec 2001 20:22:21 +1300
Received: from fred.home.246gt.com (fred.home.246gt.com [10.0.0.74])
by bc.home.246gt.com (8.11.3/8.11.3) with ESMTP id fB47QOX70691
for <[email-masked]>; Mon, 3 Dec 2001 23:26:24 -0800 (PST)
(envelope-from [email-masked])
Received: (from ken@localhost)
by fred.home.246gt.com (8.11.2/8.11.2) id fB47QJe09242
for [email-masked]; Mon, 3 Dec 2001 23:26:19 -0800
X-Authentication-Warning: fred.home.246gt.com: ken set sender to [email-masked] using -f
Date: Mon, 3 Dec 2001 23:26:17 -0800
From: ken restivo <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: application/pgp; x-action=sign; format=text
Content-Disposition: inline; filename="msg.pgp"
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Fri, Nov 09, 2001 at 01:22:13PM +1300
Subject: [avr-gcc-list] The "Temporary Buffer"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I am writing a little boot loader for an ATmega163. I have implemented a modified version of the page write routine from the data book, in assembler. So far so good.

I am concerned about the mention in the databook of a "temporary buffer". The docs claim that the SPM instruction reads and writes a temporary buffer. However, a search through the docs for the text "temporary buffer" didn't turn up any description of *what* exactly this "temporary buffer" is, or where it is located.

I have also read the AVR109 app note and looked through Atmel's sample bootloader source code as well, with no answers found there.

This worries me. For example, I may want to load more than one page at a time of app code into RAM from my serial port, do a crc check, etc, and only then start iteratively calling the page write routine, but I don't want to stomp on anything inadvertently.

Any ideas what/where this "temporary buffer" actually is so I can stay out of its way?

- -ken

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8DHqYe8HF+6xeOIcRAqhqAKDrYSRCxj2ep8nRwAH9XIIt4S754wCfVefy
Hvjm3XZ/7o0LXEPONV6k7mU=
=WIcQ
-----END PGP SIGNATURE-----

From [email-masked] Tue Dec 04 20:37:17 2001
Received: from creative.actrix.co.nz ([203.96.26.135])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16BA8j-000444-00
for <[email-masked]>; Tue, 04 Dec 2001 20:37:17 +1300
Received: from sony (wakelins.actrix.co.nz [203.96.27.215])
by creative.actrix.co.nz (Postfix) with ESMTP id 40D7314E9
for <[email-masked]>; Tue, 4 Dec 2001 20:36:16 +1300 (NZDT)
Reply-To: <[email-masked]>
From: "Ross Wakelin" <[email-masked]>
To: <[email-masked]>
Date: Tue, 4 Dec 2001 20:38:57 +1300
Organization: iITc
Message-ID: <017301c17c96$bc222ee0$0307a8c0@sony>
MIME-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.3311
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Importance: Normal
Subject: [avr-gcc-list] debugging with GDB and STK500
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I have seen people talking about using a small monitor
program loaded in the STK200, and GDB to do real
in circuit debugging.

Has this technology been extended to the STK500, now that
the 200/300 is no longer available.

Thanks

----------
Ross Wakelin - Independent Information Technology Consultant
Tel: +64 (0)3 3433186 Fax: +64 (0)3 3433196
Cell: +64 (0)21 334380

From [email-masked] Tue Dec 04 19:13:48 2001
Received: from [203.24.179.147] (helo=smartcontainer.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 16B8pu-0003zh-00
for <[email-masked]>; Tue, 04 Dec 2001 19:13:46 +1300
Received: (qmail 30885 invoked by uid 8); 4 Dec 2001 06:17:44 -0000
Received: from peter.smartcontainer.net (20.20.20.13, claiming to be "smartcontainer.net")
by smarty with SMTP id smtpdegIykO; Tue, 04 Dec 2001 01:17:35 EST
Message-ID: <[email-masked]>
Date: Tue, 04 Dec 2001 17:17:35 +1100
From: Peter Jansen <[email-masked]>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: [email-masked]
CC: [email-masked]
Subject: Re: [avr-gcc-list] ATMega128 AVR-GCC support
References: <[email-masked]> <[email-masked]>
Content-Type: multipart/mixed;
boundary="------------090301000309070107070409"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.
--------------090301000309070107070409
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

> 1) Are there any compiler support for the ATMega128?

Not in the current releases, attached are patches for avr-libc, gcc, and
binutils if you want to re-build the tools. Some of this is in the
binutils and gcc cvs tree already.

Their are some changes in the way avr-libc defines and uses the vector
table, but I think it should be compatiable with the previous versions.
Also I did some mods to the way Data space and IO space addresses are
defined in the iom128.h file.

Regards,

--
Peter Jansen
Smart Container
Level 1, NIC Building
Eveleigh
NSW 1430
AUSTRALIA

--------------090301000309070107070409
Content-Type: text/plain;
name="avr-libc-20011029-patch-0.2"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="avr-libc-20011029-patch-0.2"

diff -rc3P avr-libc-20011029/include/ctype.h avr-libc-20011029-patch-0.2/include/ctype.h
*** avr-libc-20011029/include/ctype.h Sun Oct 7 02:53:36 2001
--- avr-libc-20011029-patch-0.2/include/ctype.h Wed Nov 7 17:38:50 2001
***************
*** 12,17 ****
--- 12,21 ----
#define __ATTR_CONST__ __attribute__((__const__))
#endif

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
extern int isalnum(int __c) __ATTR_CONST__;
extern int isalpha(int __c) __ATTR_CONST__;
extern int isascii(int __c) __ATTR_CONST__;
***************
*** 29,32 ****
--- 33,40 ----
extern int tolower(int __c) __ATTR_CONST__;
extern int toupper(int __c) __ATTR_CONST__;

+ #ifdef __cplusplus
+ }
+ #endif
+
#endif
diff -rc3P avr-libc-20011029/include/eeprom.h avr-libc-20011029-patch-0.2/include/eeprom.h
*** avr-libc-20011029/include/eeprom.h Sun Oct 29 04:19:50 2000
--- avr-libc-20011029-patch-0.2/include/eeprom.h Wed Nov 7 17:42:43 2001
***************
*** 26,31 ****
--- 26,35 ----
/* return 1 if EEPROM is ready for a new read/write operation, 0 if not */
#define eeprom_is_ready() bit_is_clear(EECR, EEWE)

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
/* read one byte from EEPROM address ADDR */
extern unsigned char eeprom_rb(unsigned int addr);

***************
*** 38,43 ****
--- 42,52 ----
/* read a block of SIZE bytes from EEPROM address ADDR to BUF */
extern void eeprom_read_block(void *buf, unsigned int addr, size_t n);

+
+ #ifdef __cplusplus
+ }
+ #endif
+
/* IAR C compatibility defines */
#define _EEPUT(addr, val) eeprom_wb(addr, val)
#define _EEGET(var, addr) (var) = eeprom_rb(addr)
diff -rc3P avr-libc-20011029/include/errno.h avr-libc-20011029-patch-0.2/include/errno.h
*** avr-libc-20011029/include/errno.h Mon Jun 5 02:53:57 2000
--- avr-libc-20011029-patch-0.2/include/errno.h Wed Nov 7 17:43:35 2001
***************
*** 3,10 ****
--- 3,18 ----
#ifndef __ERRNO_H_
#define __ERRNO_H_ 1

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
extern int errno;

+ #ifdef __cplusplus
+ }
+ #endif
+
#define EDOM 33
#define ERANGE 34

diff -rc3P avr-libc-20011029/include/interrupt.h avr-libc-20011029-patch-0.2/include/interrupt.h
*** avr-libc-20011029/include/interrupt.h Mon Feb 12 06:18:05 2001
--- avr-libc-20011029-patch-0.2/include/interrupt.h Wed Nov 7 17:40:30 2001
***************
*** 6,11 ****
--- 6,15 ----
#define sei() __asm__ __volatile__ ("sei" ::)
#define cli() __asm__ __volatile__ ("cli" ::)

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
extern inline void enable_external_int (unsigned char ints)
{
#ifdef EIMSK
***************
*** 24,27 ****
--- 28,35 ----
#endif
}

+ #ifdef __cplusplus
+ }
+ #endif
+
#endif
diff -rc3P avr-libc-20011029/include/io-avr.h avr-libc-20011029-patch-0.2/include/io-avr.h
*** avr-libc-20011029/include/io-avr.h Sun Oct 29 04:19:35 2000
--- avr-libc-20011029-patch-0.2/include/io-avr.h Tue Nov 6 19:06:14 2001
***************
*** 22,27 ****
--- 22,29 ----
# include <ioat94k.h>
#elif defined (__AVR_ATmega103__)
# include <iom103.h>
+ #elif defined (__AVR_ATmega128__)
+ # include <iom128.h>
#elif defined (__AVR_ATmega603__)
# include <iom603.h>
#elif defined (__AVR_ATmega32__)
diff -rc3P avr-libc-20011029/include/io.h avr-libc-20011029-patch-0.2/include/io.h
*** avr-libc-20011029/include/io.h Sat Apr 1 23:07:05 2000
--- avr-libc-20011029-patch-0.2/include/io.h Wed Nov 7 17:37:23 2001
***************
*** 13,19 ****
--- 13,27 ----

#define outb outp

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
#include <io-avr.h>
#include <iomacros.h>

+ #ifdef __cplusplus
+ }
+ #endif
+
#endif /* _IO_H_ */
diff -rc3P avr-libc-20011029/include/io1200.h avr-libc-20011029-patch-0.2/include/io1200.h
*** avr-libc-20011029/include/io1200.h Sun Oct 29 04:18:09 2000
--- avr-libc-20011029-patch-0.2/include/io1200.h Mon Nov 19 14:49:38 2001
***************
*** 80,90 ****
#define SREG 0x3F

/* Interrupt vectors (byte addresses) */
- #define RESET_vect (0x00)
- #define INT0_vect (0x02)
- #define TIMER0_OVF_vect (0x04)
- #define ANA_COMP_vect (0x06)

#define INT_VECT_SIZE (0x08)

/* Bit numbers */
--- 80,91 ----
#define SREG 0x3F

/* Interrupt vectors (byte addresses) */

+ #define SIG_INTERRUPT0 _vector_1
+ #define SIG_OVERFLOW0 _vector_2
+ #define SIG_ADC _vector_3
+
+ #define END_VECTOR (3)
#define INT_VECT_SIZE (0x08)

/* Bit numbers */
diff -rc3P avr-libc-20011029/include/io2313.h avr-libc-20011029-patch-0.2/include/io2313.h
*** avr-libc-20011029/include/io2313.h Tue Jun 13 03:44:20 2000
--- avr-libc-20011029-patch-0.2/include/io2313.h Mon Nov 19 14:50:10 2001
***************
*** 106,130 ****
/* Interrupt Vector Definitions */
/*==============================*/

! /* NB! vectors are specified as byte addresses */
!
! #define RESET_vect (0x00)
! #define INT0_vect (0x02)
! #define INT1_vect (0x04)
! #define TIMER1_CAPT_vect (0x06)
! #define TIMER1_COMPA_vect (0x08)
! #define TIMER1_OVF_vect (0x0A)
! #define TIMER0_OVF_vect (0x0C)
! #define UART_RX_vect (0x0E)
! #define UART_UDRE_vect (0x10)
! #define UART_TX_vect (0x12)
! #define ANA_COMP_vect (0x14)

#define INT_VECT_SIZE (0x16)
!
/*
! The Register Bit names are represented by their bit number (0-7).
! */

/* General Interrupt MaSK register */
#define INT1 7
--- 106,128 ----
/* Interrupt Vector Definitions */
/*==============================*/

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_INTERRUPT1 _vector_2
! #define SIG_INPUT_CAPTURE1 _vector_3
! #define SIG_OUTPUT_COMPARE1A _vector_4
! #define SIG_OVERFLOW1 _vector_5
! #define SIG_OVERFLOW0 _vector_6
! #define SIG_UART_RECV _vector_7
! #define SIG_UART_DATA _vector_8
! #define SIG_UART_TRANS _vector_9
! #define SIG_COMPARATOR _vector_10

+ #define END_VECTOR (10)
#define INT_VECT_SIZE (0x16)
!
/*
! * The Register Bit names are represented by their bit number (0-7).
! */

/* General Interrupt MaSK register */
#define INT1 7
diff -rc3P avr-libc-20011029/include/io2323.h avr-libc-20011029-patch-0.2/include/io2323.h
*** avr-libc-20011029/include/io2323.h Wed Jul 19 20:53:37 2000
--- avr-libc-20011029-patch-0.2/include/io2323.h Mon Nov 19 14:51:06 2001
***************
*** 67,78 ****
/* Interrupt Vector Definitions */
/*==============================*/

! /* NB! vectors are specified as byte addresses */
!
! #define RESET_vect (0x00)
! #define INT0_vect (0x02)
! #define TIMER0_OVF_vect (0x04)

#define INT_VECT_SIZE (0x06)

/*
--- 67,76 ----
/* Interrupt Vector Definitions */
/*==============================*/

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_OVERFLOW0 _vector_2

+ #define END_VECTOR (2)
#define INT_VECT_SIZE (0x06)

/*
diff -rc3P avr-libc-20011029/include/io2333.h avr-libc-20011029-patch-0.2/include/io2333.h
*** avr-libc-20011029/include/io2333.h Tue Jun 13 03:44:44 2000
--- avr-libc-20011029-patch-0.2/include/io2333.h Mon Nov 19 14:51:32 2001
***************
*** 140,163 ****
/* Interrupt Vector Definitions */
/* */

! /* NB! vectors are specified as byte addresses */

! #define RESET_vect (0x00)
! #define INT0_vect (0x02)
! #define INT1_vect (0x04)
! #define TIMER1_CAPT_vect (0x06)
! #define TIMER1_COMPA_vect (0x08)
! #define TIMER1_OVF_vect (0x0A)
! #define TIMER0_OVF_vect (0x0C)
! #define SPI_STC_vect (0x0E)
! #define UART_RX_vect (0x10)
! #define UART_UDRE_vect (0x12)
! #define UART_TX_vect (0x14)
! #define ADC_vect (0x16)
! #define EE_RDY_vect (0x18)
! #define ANA_COMP_vect (0x1A)
!
! #define INT_VECT_SIZE (0x1C)

/*
The Register Bit names are represented by their bit number (0-7).
--- 140,161 ----
/* Interrupt Vector Definitions */
/* */

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_INTERRUPT1 _vector_2
! #define SIG_OUTPUT_CAPTURE1 _vector_3
! #define SIG_OUTPUT_COMPARE1A _vector_4
! #define SIG_OVERFLOW1 _vector_5
! #define SIG_OVERFLOW0 _vector_6
! #define SIG_SPI _vector_7
! #define SIG_UART0_RECV _vector_8
! #define SIG_UART0_DATA _vector_9
! #define SIG_UART0_TRANS _vector_10
! #define SIG_ADC _vector_11
! #define SIG_EEPROM_READY _vector_12
! #define SIG_COMPARATOR _vector_13

! #define END_VECTOR (34)
! #define INT_VECT_SIZE (0x1c)

/*
The Register Bit names are represented by their bit number (0-7).
diff -rc3P avr-libc-20011029/include/io2343.h avr-libc-20011029-patch-0.2/include/io2343.h
*** avr-libc-20011029/include/io2343.h Mon Nov 19 14:51:53 2001
--- avr-libc-20011029-patch-0.2/include/io2343.h Mon Nov 19 14:51:51 2001
***************
*** 67,78 ****
/* Interrupt Vector Definitions */
/*==============================*/

! /* NB! vectors are specified as byte addresses */
!
! #define RESET_vect (0x00)
! #define INT0_vect (0x02)
! #define TIMER0_OVF_vect (0x04)

#define INT_VECT_SIZE (0x06)

/*
--- 67,76 ----
/* Interrupt Vector Definitions */
/*==============================*/

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_OVERFLOW0 _vector_2

+ #define END_VECTOR (2)
#define INT_VECT_SIZE (0x06)

/*
diff -rc3P avr-libc-20011029/include/io4414.h avr-libc-20011029-patch-0.2/include/io4414.h
*** avr-libc-20011029/include/io4414.h Tue Jun 13 03:46:14 2000
--- avr-libc-20011029-patch-0.2/include/io4414.h Mon Nov 19 14:52:12 2001
***************
*** 138,160 ****
/* Interrupt Vector Definitions */
/*==============================*/

! /* NB! vectors are specified as byte addresses */

! #define RESET_vect (0x00)
! #define INT0_vect (0x02)
! #define INT1_vect (0x04)
! #define TIMER1_CAPT_vect (0x06)
! #define TIMER1_COMPA_vect (0x08)
! #define TIMER1_COMPB_vect (0x0A)
! #define TIMER1_OVF_vect (0x0C)
! #define TIMER0_OVF_vect (0x0E)
! #define SPI_STC_vect (0x10)
! #define UART_RX_vect (0x12)
! #define UART_UDRE_vect (0x14)
! #define UART_TX_vect (0x16)
! #define ANA_COMP_vect (0x18)
!
! #define INT_VECT_SIZE (0x1A)

/*
The Register Bit names are represented by their bit number (0-7).
--- 138,158 ----
/* Interrupt Vector Definitions */
/*==============================*/

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_INTERRUPT1 _vector_2
! #define SIG_INPUT_CAPTURE1 _vector_3
! #define SIG_OUTPUT_COMPARE1A _vector_4
! #define SIG_OUTPUT_COMPARE1B _vector_5
! #define SIG_OVERFLOW1 _vector_6
! #define SIG_OVERFLOW0 _vector_7
! #define SIG_SPI _vector_8
! #define SIG_UART_RECV _vector_9
! #define SIG_UART_DATA _vector_10
! #define SIG_UART_TRANS _vector_11
! #define SIG_ADC _vector_12

! #define END_VECTOR (12)
! #define INT_VECT_SIZE (0x1a)

/*
The Register Bit names are represented by their bit number (0-7).
diff -rc3P avr-libc-20011029/include/io4433.h avr-libc-20011029-patch-0.2/include/io4433.h
*** avr-libc-20011029/include/io4433.h Tue Jun 13 03:46:04 2000
--- avr-libc-20011029-patch-0.2/include/io4433.h Mon Nov 19 14:52:29 2001
***************
*** 140,163 ****
/* Interrupt Vector Definitions */
/* */

! /* NB! vectors are specified as byte addresses */

! #define RESET_vect (0x00)
! #define INT0_vect (0x02)
! #define INT1_vect (0x04)
! #define TIMER1_CAPT_vect (0x06)
! #define TIMER1_COMPA_vect (0x08)
! #define TIMER1_OVF_vect (0x0A)
! #define TIMER0_OVF_vect (0x0C)
! #define SPI_STC_vect (0x0E)
! #define UART_RX_vect (0x10)
! #define UART_UDRE_vect (0x12)
! #define UART_TX_vect (0x14)
! #define ADC_vect (0x16)
! #define EE_RDY_vect (0x18)
! #define ANA_COMP_vect (0x1A)
!
! #define INT_VECT_SIZE (0x1C)

/*
The Register Bit names are represented by their bit number (0-7).
--- 140,161 ----
/* Interrupt Vector Definitions */
/* */

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_INTERRUPT1 _vector_2
! #define SIG_INPUT_CAPTURE1 _vector_3
! #define SIG_OUTPUT_COMPARE1A _vector_4
! #define SIG_OVERFLOW1 _vector_5
! #define SIG_OVERFLOW0 _vector_6
! #define SIG_SPI _vector_7
! #define SIG_UART_RECV _vector_8
! #define SIG_UART_DATA _vector_9
! #define SIG_UART_TRANS _vector_10
! #define SIG_ADC _vector_11
! #define SIG_EEPROM_READY _vector_12
! #define SIG_COMPARATOR _vector_13

! #define END_VECTOR (13)
! #define INT_VECT_SIZE (0x1c)

/*
The Register Bit names are represented by their bit number (0-7).
diff -rc3P avr-libc-20011029/include/io4434.h avr-libc-20011029-patch-0.2/include/io4434.h
*** avr-libc-20011029/include/io4434.h Tue Jun 13 03:46:37 2000
--- avr-libc-20011029-patch-0.2/include/io4434.h Mon Nov 19 14:52:42 2001
***************
*** 164,189 ****
/* Interrupt Vector Definitions */
/* */

! /* NB! vectors are specified as byte addresses */
!
! #define RESET_vect (0x00)
! #define INT0_vect (0x02)
! #define INT1_vect (0x04)
! #define TIMER2_COMP_vect (0x06)
! #define TIMER2_OVF_vect (0x08)
! #define TIMER1_CAPT_vect (0x0A)
! #define TIMER1_COMPA_vect (0x0C)
! #define TIMER1_COMPB_vect (0x0E)
! #define TIMER1_OVF_vect (0x10)
! #define TIMER0_OVF_vect (0x12)
! #define SPI_STC_vect (0x14)
! #define UART_RX_vect (0x16)
! #define UART_UDRE_vect (0x18)
! #define UART_TX_vect (0x1A)
! #define ADC_vect (0x1C)
! #define EE_RDY_vect (0x1E)
! #define ANA_COMP_vect (0x20)

#define INT_VECT_SIZE (0x22)

/*
--- 164,187 ----
/* Interrupt Vector Definitions */
/* */

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_INTERRUPT1 _vector_2
! #define SIG_OUTPUT_COMPARE2 _vector_3
! #define SIG_OVERFLOW2 _vector_4
! #define SIG_INPUT_CAPTURE1 _vector_5
! #define SIG_OUTPUT_COMPARE1A _vector_6
! #define SIG_OUTPUT_COMPARE1B _vector_7
! #define SIG_OVERFLOW1 _vector_8
! #define SIG_OVERFLOW0 _vector_9
! #define SIG_SPI _vector_10
! #define SIG_UART_RECV _vector_11
! #define SIG_UART_DATA _vector_12
! #define SIG_UART_TRANS _vector_13
! #define SIG_ADC _vector_14
! #define SIG_EEPROM_READY _vector_15
! #define SIG_COMPARATOR _vector_16

+ #define END_VECTOR (16)
#define INT_VECT_SIZE (0x22)

/*
diff -rc3P avr-libc-20011029/include/io76c711.h avr-libc-20011029-patch-0.2/include/io76c711.h
*** avr-libc-20011029/include/io76c711.h Thu Nov 2 05:17:00 2000
--- avr-libc-20011029-patch-0.2/include/io76c711.h Mon Nov 19 14:52:59 2001
***************
*** 106,128 ****
the entire program memory address space.
Assuming JMP for now - could be wrong, ask Atmel to be sure... */

! #define RESET_vect (0x00)
! #define SUSP_RESM_vect (0x04)
! #define INT0_vect (0x08)
! #define TIMER1_CAPT_vect (0x0C)
! #define TIMER1_COMPA_vect (0x10)
! #define TIMER1_COMPB_vect (0x14)
! #define TIMER1_OVF_vect (0x18)
! #define TIMER0_OVF_vect (0x1C)
! #define SPI_STC_vect (0x20)
! #define TDMAC_vect (0x24)
! #define UART0_vect (0x28)
! #define RDMAC_vect (0x2C)
! #define USB_HW_vect (0x30)
! #define UART1_vect (0x34)
! #define INT1_vect (0x38)

! #define INT_VECT_SIZE (0x3C)

/* Bit numbers */

--- 106,127 ----
the entire program memory address space.
Assuming JMP for now - could be wrong, ask Atmel to be sure... */

! #define SIG_SUSPEND_RESUME _vector_1
! #define SIG_INTERRUPT0 _vector_2
! #define SIG_INPUT_CAPTURE1 _vector_3
! #define SIG_OUTPUT_COMPARE1A _vector_4
! #define SIG_OUTPUT_COMPARE1B _vector_5
! #define SIG_OVERFLOW1 _vector_6
! #define SIG_OVERFLOW0 _vector_7
! #define SIG_SPI _vector_8
! #define SIG_TDMAC _vector_9
! #define SIG_UART0 _vector_10
! #define SIG_RDMAC _vector_11
! #define SIG_UART1 _vector_12
! #define SIG_INTERRUPT0 _vector_13

! #define END_VECTOR (13)
! #define INT_VECT_SIZE (0x3c)

/* Bit numbers */

diff -rc3P avr-libc-20011029/include/io8515.h avr-libc-20011029-patch-0.2/include/io8515.h
*** avr-libc-20011029/include/io8515.h Tue Jun 13 03:46:54 2000
--- avr-libc-20011029-patch-0.2/include/io8515.h Mon Nov 19 14:53:49 2001
***************
*** 138,160 ****
/* Interrupt Vector Definitions */
/*==============================*/

! /* NB! vectors are specified as byte addresses */

! #define RESET_vect (0x00)
! #define INT0_vect (0x02)
! #define INT1_vect (0x04)
! #define TIMER1_CAPT_vect (0x06)
! #define TIMER1_COMPA_vect (0x08)
! #define TIMER1_COMPB_vect (0x0A)
! #define TIMER1_OVF_vect (0x0C)
! #define TIMER0_OVF_vect (0x0E)
! #define SPI_STC_vect (0x10)
! #define UART_RX_vect (0x12)
! #define UART_UDRE_vect (0x14)
! #define UART_TX_vect (0x16)
! #define ANA_COMP_vect (0x18)
!
! #define INT_VECT_SIZE (0x1A)

/*
The Register Bit names are represented by their bit number (0-7).
--- 138,158 ----
/* Interrupt Vector Definitions */
/*==============================*/

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_INTERRUPT1 _vector_2
! #define SIG_INPUT_CAPTURE1 _vector_3
! #define SIG_OUTPUT_COMPARE1A _vector_4
! #define SIG_OUTPUT_COMPARE1B _vector_5
! #define SIG_OVERFLOW1 _vector_6
! #define SIG_OVERFLOW0 _vector_7
! #define SIG_SPI _vector_8
! #define SIG_UART_RECV _vector_9
! #define SIG_UART_DATA _vector_10
! #define SIG_UART_TRANS _vector_11
! #define SIG_COMPARATOR _vector_12

! #define END_VECTOR (12)
! #define INT_VECT_SIZE (0x1a)

/*
The Register Bit names are represented by their bit number (0-7).
diff -rc3P avr-libc-20011029/include/io8534.h avr-libc-20011029-patch-0.2/include/io8534.h
*** avr-libc-20011029/include/io8534.h Sun Oct 29 04:18:41 2000
--- avr-libc-20011029-patch-0.2/include/io8534.h Mon Nov 19 14:54:03 2001
***************
*** 104,119 ****

/* Interrupt vectors (byte addresses) */

! #define RESET_vect (0x00)
! #define INT0_vect (0x02)
! #define INT1_vect (0x04)
! #define TIMER1_OVF_vect (0x06)
! #define TIMER0_OVF_vect (0x08)
! #define ADC_vect (0x0A)
! #define EE_RDY_vect (0x0C)

! #define INT_VECT_SIZE (0x0E)

/* Bit numbers */

/* GIMSK */
--- 104,120 ----

/* Interrupt vectors (byte addresses) */

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_INTERRUPT1 _vector_2
! #define SIG_OVERFLOW1 _vector_3
! #define SIG_OVERFLOW0 _vector_4
! #define SIG_ADC _vector_5
! #define SIG_EEPROM_READY _vector_6

! #define END_VECTOR (6)
! #define INT_VECT_SIZE (0x0e)

+ /*
/* Bit numbers */

/* GIMSK */
diff -rc3P avr-libc-20011029/include/io8535.h avr-libc-20011029-patch-0.2/include/io8535.h
*** avr-libc-20011029/include/io8535.h Mon Nov 19 14:54:16 2001
--- avr-libc-20011029-patch-0.2/include/io8535.h Mon Nov 19 14:54:14 2001
***************
*** 164,189 ****
/* Interrupt Vector Definitions */
/* */

! /* NB! vectors are specified as byte addresses */
!
! #define RESET_vect (0x00)
! #define INT0_vect (0x02)
! #define INT1_vect (0x04)
! #define TIMER2_COMP_vect (0x06)
! #define TIMER2_OVF_vect (0x08)
! #define TIMER1_CAPT_vect (0x0A)
! #define TIMER1_COMPA_vect (0x0C)
! #define TIMER1_COMPB_vect (0x0E)
! #define TIMER1_OVF_vect (0x10)
! #define TIMER0_OVF_vect (0x12)
! #define SPI_STC_vect (0x14)
! #define UART_RX_vect (0x16)
! #define UART_UDRE_vect (0x18)
! #define UART_TX_vect (0x1A)
! #define ADC_vect (0x1C)
! #define EE_RDY_vect (0x1E)
! #define ANA_COMP_vect (0x20)

#define INT_VECT_SIZE (0x22)

/*
--- 164,187 ----
/* Interrupt Vector Definitions */
/* */

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_INTERRUPT1 _vector_2
! #define SIG_OUTPUT_COMPARE2 _vector_3
! #define SIG_OVERFLOW2 _vector_4
! #define SIG_INPUT_CAPTURE1 _vector_5
! #define SIG_OUTPUT_COMPARE1A _vector_6
! #define SIG_OUTPUT_COMPARE1B _vector_7
! #define SIG_OVERFLOW1 _vector_8
! #define SIG_OVERFLOW0 _vector_9
! #define SIG_SPI _vector_10
! #define SIG_UART_RECV _vector_11
! #define SIG_UART_DATA _vector_12
! #define SIG_UART_TRANS _vector_13
! #define SIG_ADC _vector_14
! #define SIG_EEPROM_READY _vector_15
! #define SIG_COMPARATOR _vector_16

+ #define END_VECTOR (16)
#define INT_VECT_SIZE (0x22)

/*
diff -rc3P avr-libc-20011029/include/ioat94k.h avr-libc-20011029-patch-0.2/include/ioat94k.h
*** avr-libc-20011029/include/ioat94k.h Sun Oct 29 04:19:13 2000
--- avr-libc-20011029-patch-0.2/include/ioat94k.h Mon Nov 19 14:54:27 2001
***************
*** 193,235 ****

/* Interrupt vectors (byte addresses) */

- #define RESET_vect (0x00)
- #define FPGA_INT0_vect (0x04)
- #define INT0_vect (0x08)
- #define FPGA_INT1_vect (0x0C)
- #define INT1_vect (0x10)
- #define FPGA_INT2_vect (0x14)
- #define INT2_vect (0x18)
- #define FPGA_INT3_vect (0x1C)
- #define INT3_vect (0x20)
- #define TIMER2_COMP_vect (0x24)
- #define TIMER2_OVF_vect (0x28)
- #define TIMER1_CAPT_vect (0x2C)
- #define TIMER1_COMPA_vect (0x30)
- #define TIMER1_COMPB_vect (0x34)
- #define TIMER1_OVF_vect (0x38)
- #define TIMER0_COMP_vect (0x3C)
- #define TIMER0_OVF_vect (0x40)
- #define FPGA_INT4_vect (0x44)
- #define FPGA_INT5_vect (0x48)
- #define FPGA_INT6_vect (0x4C)
- #define FPGA_INT7_vect (0x50)
- #define UART_RX_vect (0x54)
- #define UART_UDRE_vect (0x58)
- #define UART_TX_vect (0x5C)
- #define FPGA_INT8_vect (0x60)
- #define FPGA_INT9_vect (0x64)
- #define FPGA_INT10_vect (0x68)
- #define FPGA_INT11_vect (0x6C)
- #define UART1_RX_vect (0x70)
- #define UART1_UDRE_vect (0x74)
- #define UART1_TX_vect (0x78)
- #define FPGA_INT12_vect (0x7C)
- #define FPGA_INT13_vect (0x80)
- #define FPGA_INT14_vect (0x84)
- #define FPGA_INT15_vect (0x88)
- #define TWI_INT_vect (0x8C)

#define INT_VECT_SIZE (0x90)

/* Bit numbers - XXX not here yet */
--- 193,236 ----

/* Interrupt vectors (byte addresses) */

+ #define SIG_INTERRUPT0 _vector_1
+ #define SIG_FPGA_INTERRUPT0 _vector_2
+ #define SIG_INTERRUPT1 _vector_3
+ #define SIG_FPGA_INTERRUPT1 _vector_4
+ #define SIG_INTERRUPT2 _vector_5
+ #define SIG_FPGA_INTERRUPT2 _vector_6
+ #define SIG_INTERRUPT3 _vector_7
+ #define SIG_FPGA_INTERRUPT3 _vector_8
+ #define SIG_OUTPUT_COMPARE2 _vector_9
+ #define SIG_OVERFLOW2 _vector_10
+ #define SIG_INPUT_CAPTURE1 _vector_11
+ #define SIG_OUTPUT_COMPARE1A _vector_12
+ #define SIG_OUTPUT_COMPARE1B _vector_13
+ #define SIG_OVERFLOW1 _vector_14
+ #define SIG_OUTPUT_COMPARE0 _vector_15
+ #define SIG_OVERFLOW0 _vector_16
+ #define SIG_FPGA_INTERRUPT4 _vector_17
+ #define SIG_FPGA_INTERRUPT5 _vector_18
+ #define SIG_FPGA_INTERRUPT6 _vector_19
+ #define SIG_FPGA_INTERRUPT7 _vector_20
+ #define SIG_UART0_RECV _vector_21
+ #define SIG_UART0_DATA _vector_22
+ #define SIG_UART0_TRANS _vector_23
+ #define SIG_FPGA_INTERRUPT8 _vector_24
+ #define SIG_FPGA_INTERRUPT9 _vector_25
+ #define SIG_FPGA_INTERRUPT10 _vector_26
+ #define SIG_FPGA_INTERRUPT11 _vector_27
+ #define SIG_UART1_RECV _vector_28
+ #define SIG_UART1_DATA _vector_29
+ #define SIG_UART1_TRANS _vector_30
+ #define SIG_FPGA_INTERRUPT11 _vector_31
+ #define SIG_FPGA_INTERRUPT12 _vector_32
+ #define SIG_FPGA_INTERRUPT13 _vector_33
+ #define SIG_FPGA_INTERRUPT14 _vector_34
+ #define SIG_2WIRE_SERIAL _vector_35
+
+ #define END_VECTOR (35)
#define INT_VECT_SIZE (0x90)

/* Bit numbers - XXX not here yet */
diff -rc3P avr-libc-20011029/include/iom103.h avr-libc-20011029-patch-0.2/include/iom103.h
*** avr-libc-20011029/include/iom103.h Tue Jun 13 03:48:31 2000
--- avr-libc-20011029-patch-0.2/include/iom103.h Mon Nov 19 14:54:41 2001
***************
*** 185,215 ****

/* NB! vectors are specified as byte addresses */

! #define RESET_vect (0x00)
! #define INT0_vect (0x04)
! #define INT1_vect (0x08)
! #define INT2_vect (0x0C)
! #define INT3_vect (0x10)
! #define INT4_vect (0x14)
! #define INT5_vect (0x18)
! #define INT6_vect (0x1C)
! #define INT7_vect (0x20)
! #define TIMER2_COMP_vect (0x24)
! #define TIMER2_OVF_vect (0x28)
! #define TIMER1_CAPT_vect (0x2C)
! #define TIMER1_COMPA_vect (0x30)
! #define TIMER1_COMPB_vect (0x34)
! #define TIMER1_OVF_vect (0x38)
! #define TIMER0_COMP_vect (0x3C)
! #define TIMER0_OVF_vect (0x40)
! #define SPI_STC_vect (0x44)
! #define UART_RX_vect (0x48)
! #define UART_UDRE_vect (0x4C)
! #define UART_TX_vect (0x50)
! #define ADC_vect (0x54)
! #define EE_RDY_vect (0x58)
! #define ANA_COMP_vect (0x5C)

#define INT_VECT_SIZE (0x60)

/*
--- 185,215 ----

/* NB! vectors are specified as byte addresses */

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_INTERRUPT1 _vector_2
! #define SIG_INTERRUPT2 _vector_3
! #define SIG_INTERRUPT3 _vector_4
! #define SIG_INTERRUPT4 _vector_5
! #define SIG_INTERRUPT5 _vector_6
! #define SIG_INTERRUPT6 _vector_7
! #define SIG_INTERRUPT7 _vector_8
! #define SIG_OUTPUT_COMPARE2 _vector_9
! #define SIG_OVERFLOW2 _vector_10
! #define SIG_INPUT_CAPTURE1 _vector_11
! #define SIG_OUTPUT_COMPARE1A _vector_12
! #define SIG_OUTPUT_COMPARE1B _vector_13
! #define SIG_OVERFLOW1 _vector_14
! #define SIG_OUTPUT_COMPARE0 _vector_15
! #define SIG_OVERFLOW0 _vector_16
! #define SIG_SPI _vector_17
! #define SIG_UART_RECV _vector_18
! #define SIG_UART_DATA _vector_19
! #define SIG_UART_TRANS _vector_20
! #define SIG_ADC _vector_21
! #define SIG_EEPROM_READY _vector_22
! #define SIG_COMPARATOR _vector_23

+ #define END_VECTOR (23)
#define INT_VECT_SIZE (0x60)

/*
diff -rc3P avr-libc-20011029/include/iom128.h avr-libc-20011029-patch-0.2/include/iom128.h
*** avr-libc-20011029/include/iom128.h Thu Jan 1 10:00:00 1970
--- avr-libc-20011029-patch-0.2/include/iom128.h Tue Nov 27 13:10:48 2001
***************
*** 0 ****
--- 1,754 ----
+ /*
+ iom128.h - AVR ATmega128 defines
+
+ Contributors:
+ Created by Peter Jansen <[email-masked]>
+
+ THIS SOFTWARE IS NOT COPYRIGHTED
+
+ This source code is offered for use in the public domain. You may
+ use, modify or distribute it freely.
+
+ This code is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
+ DISCLAIMED. This includes but is not limited to warranties of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ */
+
+ #ifndef __IOM128
+ #define __IOM128 1
+
+ #define AVR_MEGA 1
+ #define AVR_ENHANCED 1
+
+ /*
+ * Predefined SFR Addresses.
+ * NOTE: These addresses will be either DATA MEMORY or I/O MEMORY addresses,
+ * depending on how you define __SFR_OFFSET (0x0 for I/O, 0x20 for DATA).
+ * For accesses to memory locations 0x20 through to 0x5F, gcc subtracts
+ * 0x20 from the address supplied and uses an I/O instruction, rather than
+ * a data memory access instruction (I/O instructions can only address the
+ * first 64 I/O memory locations).
+ * By using the __SFR_OFFSET symbol defined as 0x20 in the header file, all
+ * special file registers (data memory addresses 0x00--0x1F), all I/O
+ * registers (data memory address 0x20--0x5F, I/O memory address 0x00--0x3F)
+ * and all extended I/O registers (data memory address 0x60--0xFF) can be
+ * used as is, without being wrapped in macros to adjust the address.
+ */
+ /* #define __SFR_OFFSET 0x0 */
+ #define __SFR_OFFSET 0x20
+
+ /* Input Pins, Port F */
+ #define PINF (0x0 + __SFR_OFFSET)
+
+ /* Input Pins, Port E */
+ #define PINE (0x1 + __SFR_OFFSET)
+
+ /* Data Direction Register, Port E */
+ #define DDRE (0x2 + __SFR_OFFSET)
+
+ /* Data Register, Port E */
+ #define PORTE (0x3 + __SFR_OFFSET)
+
+ /* ADC Low Byte */
+ #define ADCL (0x4 + __SFR_OFFSET)
+
+ /* ADC High Byte */
+ #define ADCH (0x5 + __SFR_OFFSET)
+
+ /* ADC Control and status register */
+ #define ADCSR (0x6 + __SFR_OFFSET)
+
+ /* ADC Multiplexer select */
+ #define ADMUX (0x7 + __SFR_OFFSET)
+
+ /* Analog Comparator Control and Status Register */
+ #define ACSR (0x8 + __SFR_OFFSET)
+
+ /* USART0 Baud Rate Register Low */
+ #define UBRR0L (0x9 + __SFR_OFFSET)
+
+ /* USART0 Control and Status Register B */
+ #define UCSR0B (0xA + __SFR_OFFSET)
+
+ /* USART0 Control and Status Register A */
+ #define UCSR0A (0xB + __SFR_OFFSET)
+
+ /* USART I/O Data Register */
+ #define UDR0 (0xC + __SFR_OFFSET)
+
+ /* SPI Control Register */
+ #define SPCR (0xD + __SFR_OFFSET)
+
+ /* SPI Status Register */
+ #define SPSR (0xE + __SFR_OFFSET)
+
+ /* SPI I/O Data Register */
+ #define SPDR (0xF + __SFR_OFFSET)
+
+ /* Input Pins, Port D */
+ #define PIND (0x10 + __SFR_OFFSET)
+
+ /* Data Direction Register, Port D */
+ #define DDRD (0x11 + __SFR_OFFSET)
+
+ /* Data Register, Port D */
+ #define PORTD (0x12 + __SFR_OFFSET)
+
+ /* Input Pins, Port C */
+ #define PINC (0x13 + __SFR_OFFSET)
+
+ /* Data Direction Register, Port C */
+ #define DDRC (0x14 + __SFR_OFFSET)
+
+ /* Data Register, Port C */
+ #define PORTC (0x15 + __SFR_OFFSET)
+
+ /* Input Pins, Port B */
+ #define PINB (0x16 + __SFR_OFFSET)
+
+ /* Data Direction Register, Port B */
+ #define DDRB (0x17 + __SFR_OFFSET)
+
+ /* Data Register, Port B */
+ #define PORTB (0x18 + __SFR_OFFSET)
+
+ /* Input Pins, Port A */
+ #define PINA (0x19 + __SFR_OFFSET)
+
+ /* Data Direction Register, Port A */
+ #define DDRA (0x1A + __SFR_OFFSET)
+
+ /* Data Register, Port A */
+ #define PORTA (0x1B + __SFR_OFFSET)
+
+ /* EEPROM Control Register */
+ #define EECR (0x1C + __SFR_OFFSET)
+
+ /* EEPROM Data Register */
+ #define EEDR (0x1D + __SFR_OFFSET)
+
+ /* EEPROM Address Register Low */
+ #define EEARL (0x1E + __SFR_OFFSET)
+
+ /* EEPROM Address Register High */
+ #define EEARH (0x1F + __SFR_OFFSET)
+
+ /* Special Function I/O Register */
+ #define SFIOR (0x20 + __SFR_OFFSET)
+
+ /* Watchdog Timer Control Register */
+ #define WDTCR (0x21 + __SFR_OFFSET)
+
+ /* On-chip Debug Register */
+ #define OCDR (0x22 + __SFR_OFFSET)
+
+ /* Timer2 Output Compare Register */
+ #define OCR2 (0x23 + __SFR_OFFSET)
+
+ /* Timer/Counter 2 */
+ #define TCNT2 (0x24 + __SFR_OFFSET)
+
+ /* Timer/Counter 2 Control register */
+ #define TCCR2 (0x25 + __SFR_OFFSET)
+
+ /* T/C 1 Input Capture Register Low */
+ #define ICR1L (0x26 + __SFR_OFFSET)
+
+ /* T/C 1 Input Capture Register High */
+ #define ICR1H (0x27 + __SFR_OFFSET)
+
+ /* Timer/Counter1 Output Compare Register B Low */
+ #define OCR1BL (0x28 + __SFR_OFFSET)
+
+ /* Timer/Counter1 Output Compare Register B High */
+ #define OCR1BH (0x29 + __SFR_OFFSET)
+
+ /* Timer/Counter1 Output Compare Register A Low */
+ #define OCR1AL (0x2A + __SFR_OFFSET)
+
+ /* Timer/Counter1 Output Compare Register A High */
+ #define OCR1AH (0x2B + __SFR_OFFSET)
+
+ /* Timer/Counter 1 Low */
+ #define TCNT1L (0x2C + __SFR_OFFSET)
+
+ /* Timer/Counter 1 High */
+ #define TCNT1H (0x2D + __SFR_OFFSET)
+
+ /* Timer/Counter 1 Control and Status Register */
+ #define TCCR1B (0x2E + __SFR_OFFSET)
+
+ /* Timer/Counter 1 Control Register */
+ #define TCCR1A (0x2F + __SFR_OFFSET)
+
+ /* Timer/Counter 0 Asynchronous Control & Status Register */
+ #define ASSR (0x30 + __SFR_OFFSET)
+
+ /* Output Compare Register 0 */
+ #define OCR0 (0x31 + __SFR_OFFSET)
+
+ /* Timer/Counter 0 */
+ #define TCNT0 (0x32 + __SFR_OFFSET)
+
+ /* Timer/Counter 0 Control Register */
+ #define TCCR0 (0x33 + __SFR_OFFSET)
+
+ /* MCU Status Register */
+ #define MCUSR (0x34 + __SFR_OFFSET)
+
+ /* MCU general Control Register */
+ #define MCUCR (0x35 + __SFR_OFFSET)
+
+ /* Timer/Counter Interrupt Flag Register */
+ #define TIFR (0x36 + __SFR_OFFSET)
+
+ /* Timer/Counter Interrupt MaSK register */
+ #define TIMSK (0x37 + __SFR_OFFSET)
+
+ /* External Interrupt Flag Register */
+ #define EIFR (0x38 + __SFR_OFFSET)
+
+ /* External Interrupt MaSK register */
+ #define EIMSK (0x39 + __SFR_OFFSET)
+
+ /* External Interrupt Control Register B */
+ #define EICRB (0x3A + __SFR_OFFSET)
+
+ /* RAM Page Z select register */
+ #define RAMPZ (0x3B + __SFR_OFFSET)
+
+ /* XDIV Divide control register */
+ #define XDIV (0x3C + __SFR_OFFSET)
+
+ /* Stack Pointer Low */
+ #define SPL (0x3D + __SFR_OFFSET)
+
+ /* Stack Pointer High */
+ #define SPH (0x3E + __SFR_OFFSET)
+
+ /* Status REGister */
+ #define SREG (0x3F + __SFR_OFFSET)
+
+ /* Data Direction Register, Port F */
+ #define DDRF (0x61)
+
+ /* Data Register, Port F */
+ #define PORTF (0x62)
+
+ /* Input Pins, Port G */
+ #define PING (0x63)
+
+ /* Data Direction Register, Port G */
+ #define DDRG (0x64)
+
+ /* Data Register, Port G */
+ #define PORTG (0x65)
+
+ /* Store Program Memory Control Register */
+ #define SPMCR (0x68)
+
+ /* External Interrupt Control Register A */
+ #define EICRA (0x6A)
+
+ /* External Memory Control Register B */
+ #define XMCRB (0x6C)
+
+ /* External Memory Control Register A */
+ #define XMCRA (0x6D)
+
+ /* Oscillator Calibration Register */
+ #define OSCCAL (0x6F)
+
+ /* 2-wire Serial Interface Bit Rate Register */
+ #define TWBR (0x70)
+
+ /* 2-wire Serial Interface Status Register */
+ #define TWSR (0x71)
+
+ /* 2-wire Serial Interface Address Register */
+ #define TWAR (0x72)
+
+ /* 2-wire Serial Interface Data Register */
+ #define TWDR (0x73)
+
+ /* 2-wire Serial Interface Control Register */
+ #define TWCR (0x74)
+
+ /* Time Counter 1 Output Compare Register C Low */
+ #define OCR1CL (0x78)
+
+ /* Time Counter 1 Output Compare Register C High */
+ #define OCR1CH (0x79)
+
+ /* Timer/Counter 1 Control Register C */
+ #define TCCR1C (0x7A)
+
+ /* Extended Timer Interrupt Flag Register */
+ #define ETIFR (0x7C)
+
+ /* Extended Timer Interrupt Mask Register */
+ #define ETIMSK (0x7D)
+
+ /* Timer/Counter 3 Input Capture Register Low */
+ #define ICR3L (0x80)
+
+ /* Timer/Counter 3 Input Capture Register High */
+ #define ICR3H (0x81)
+
+ /* Timer/Counter 3 Output Compare Register C Low */
+ #define OCR3CL (0x82)
+
+ /* Timer/Counter 3 Output Compare Register C High */
+ #define OCR3CH (0x83)
+
+ /* Timer/Counter 3 Output Compare Register B Low */
+ #define OCR3BL (0x84)
+
+ /* Timer/Counter 3 Output Compare Register B High */
+ #define OCR3BH (0x85)
+
+ /* Timer/Counter 3 Output Compare Register A Low */
+ #define OCR3AL (0x86)
+
+ /* Timer/Counter 3 Output Compare Register A High */
+ #define OCR3AH (0x87)
+
+ /* Timer/Counter 3 Counter Register High */
+ #define TCNT3L (0x88)
+
+ /* Timer/Counter 3 Counter Register High */
+ #define TCNT3H (0x89)
+
+ /* Timer/Counter 3 Control Register B */
+ #define TCCR3B (0x8A)
+
+ /* Timer/Counter 3 Control Register A */
+ #define TCCR3A (0x8B)
+
+ /* Timer/Counter 3 Control Register C */
+ #define TCCR3C (0x8C)
+
+ /* USART0 Baud Rate Register High */
+ #define UBRR0H (0x90)
+
+ /* USART0 Control and Status Register C */
+ #define UCSR0C (0x95)
+
+ /* USART1 Baud Rate Register High */
+ #define UBRR1H (0x98)
+
+ /* USART1 Baud Rate Register Low*/
+ #define UBRR1L (0x99)
+
+ /* USART1 Control and Status Register B */
+ #define UCSR1B (0x9A)
+
+ /* USART1 Control and Status Register A */
+ #define UCSR1A (0x9B)
+
+ /* USART1 I/O Data Register */
+ #define UDR1 (0x9C)
+
+ /* USART1 Control and Status Register C */
+ #define UCSR1C (0x9D)
+
+ /*
+ * Interrupt Vector Definitions
+ */
+
+ #define SIG_INTERRUPT0 _vector_1
+ #define SIG_INTERRUPT1 _vector_2
+ #define SIG_INTERRUPT2 _vector_3
+ #define SIG_INTERRUPT3 _vector_4
+ #define SIG_INTERRUPT4 _vector_5
+ #define SIG_INTERRUPT5 _vector_6
+ #define SIG_INTERRUPT6 _vector_7
+ #define SIG_INTERRUPT7 _vector_8
+ #define SIG_OUTPUT_COMPARE2 _vector_9
+ #define SIG_OVERFLOW2 _vector_10
+ #define SIG_INPUT_CAPTURE1 _vector_11
+ #define SIG_OUTPUT_COMPARE1A _vector_12
+ #define SIG_OUTPUT_COMPARE1B _vector_13
+ #define SIG_OVERFLOW1 _vector_14
+ #define SIG_OUTPUT_COMPARE0 _vector_15
+ #define SIG_OVERFLOW0 _vector_16
+ #define SIG_SPI _vector_17
+ #define SIG_UART0_RECV _vector_18
+ #define SIG_UART0_DATA _vector_19
+ #define SIG_UART0_TRANS _vector_20
+ #define SIG_ADC _vector_21
+ #define SIG_EEPROM_READY _vector_22
+ #define SIG_COMPARATOR _vector_23
+ #define SIG_OUTPUT_COMPARE1C _vector_24
+ #define SIG_INPUT_CAPTURE3 _vector_25
+ #define SIG_OUTPUT_COMPARE3A _vector_26
+ #define SIG_OUTPUT_COMPARE3B _vector_27
+ #define SIG_OUTPUT_COMPARE3C _vector_28
+ #define SIG_OVERFLOW3 _vector_29
+ #define SIG_UART1_RECV _vector_30
+ #define SIG_UART1_DATA _vector_31
+ #define SIG_UART1_TRANS _vector_32
+ #define SIG_2WIRE_SERIAL _vector_33
+ #define SIG_SPM_READY _vector_34
+
+ #define END_VECTOR (34)
+ #define INT_VECT_SIZE (0x8a)
+
+ /*
+ The Register Bit names are represented by their bit number (0-7).
+ */
+
+ /* 2-wire Control Register */
+ #define TWINT 7
+ #define TWEA 6
+ #define TWSTA 5
+ #define TWSTO 4
+ #define TWWC 3
+ #define TWEN 2
+ #define TWIE 0
+
+ /* 2-wire Address Register */
+ #define TWA6 7
+ #define TWA5 6
+ #define TWA4 5
+ #define TWA3 4
+ #define TWA2 3
+ #define TWA1 2
+ #define TWA0 1
+ #define TWGCE 0
+
+ /* 2-wire Status Register */
+ #define TWS7 7
+ #define TWS6 6
+ #define TWS5 5
+ #define TWS4 4
+ #define TWS3 3
+ #define TWPS1 1
+ #define TWPS0 0
+
+ /* External Memory Control Register A */
+ #define SRL2 6
+ #define SRL1 5
+ #define SRL0 4
+ #define SRW01 3
+ #define SRW00 2
+ #define SRW11 1
+
+ /* External Memory Control Register B */
+ #define XMBK 7
+ #define XMM2 2
+ #define XMM1 1
+ #define XMM0 0
+
+ /* XDIV Divide control register*/
+ #define XDIVEN 7
+ #define XDIV6 6
+ #define XDIV5 5
+ #define XDIV4 4
+ #define XDIV3 3
+ #define XDIV2 2
+ #define XDIV1 1
+ #define XDIV0 0
+
+ /* RAM Page Z select register */
+ #define RAMPZ0 0
+
+ /* External Interrupt Control Register A */
+ #define ISC31 7
+ #define ISC30 6
+ #define ISC21 5
+ #define ISC20 4
+ #define ISC11 3
+ #define ISC10 2
+ #define ISC01 1
+ #define ISC00 0
+
+ /* External Interrupt Control Register B */
+ #define ISC71 7
+ #define ISC70 6
+ #define ISC61 5
+ #define ISC60 4
+ #define ISC51 3
+ #define ISC50 2
+ #define ISC41 1
+ #define ISC40 0
+
+ /* Store Program Memory Control Register */
+ #define SPMIE 7
+ #define RWWSB 6
+ #define RWWSRE 4
+ #define BLBSET 3
+ #define PGWRT 2
+ #define PGERS 1
+ #define SPMEN 0
+
+ /* External Interrupt MaSK register */
+ #define INT7 7
+ #define INT6 6
+ #define INT5 5
+ #define INT4 4
+ #define INT3 3
+ #define INT2 2
+ #define INT1 1
+ #define INT0 0
+
+ /* External Interrupt Flag Register */
+ #define INTF7 7
+ #define INTF6 6
+ #define INTF5 5
+ #define INTF4 4
+
+ /* Timer/Counter Interrupt MaSK register */
+ #define OCIE2 7
+ #define TOIE2 6
+ #define TICIE1 5
+ #define OCIE1A 4
+ #define OCIE1B 3
+ #define TOIE1 2
+ #define OCIE0 1
+ #define TOIE0 0
+
+ /* Timer/Counter Interrupt Flag Register */
+ #define OCF2 7
+ #define TOV2 6
+ #define ICF1 5
+ #define OCF1A 4
+ #define OCF1B 3
+ #define TOV1 2
+ #define OCF0 1
+ #define TOV0 0
+
+ /* Extended Timer Interrupt MaSK register */
+ #define TICIE3 5
+ #define OCIE3A 4
+ #define OCIE3B 3
+ #define TOIE3 2
+ #define OCIE3C 1
+ #define OCIE1C 0
+
+ /* Extended Timer Interrupt Flag Register */
+ #define ICF3 5
+ #define OCF3A 4
+ #define OCF3B 3
+ #define TOV3 2
+ #define OCF3C 1
+ #define OCF1C 0
+
+ /* MCU general Control Register */
+ #define SRE 7
+ #define SRW 6
+ #define SE 5
+ #define SM1 4
+ #define SM0 3
+ #define SM2 2
+ #define IVSEL 1
+ #define IVCE 0
+
+ /* MCU Status Register */
+ #define JTD 7
+ #define JTRF 4
+ #define WDRF 3
+ #define BORF 2
+ #define EXTRF 1
+ #define PORF 0
+
+ /* Timer/Counter Control Register */
+ #define FOC 7
+ #define WGM0 6
+ #define COM1 5
+ #define COM0 4
+ #define WGM1 3
+ #define CS2 2
+ #define CS1 1
+ #define CS0 0
+
+ /* Timer/Counter 0 Asynchronous Control & Status Register */
+ #define AS0 3
+ #define TCN0UB 2
+ #define OCR0UB 1
+ #define TCR0UB 0
+
+ /* Timer/Counter Control Register A */
+ #define COMA1 7
+ #define COMA0 6
+ #define COMB1 5
+ #define COMB0 4
+ #define COMC1 3
+ #define COMC0 2
+ #define WGMA1 1
+ #define WGMA0 0
+
+ /* Timer/Counter Control and Status Register B */
+ #define ICNC 7
+ #define ICES 6
+ #define WGMB3 4
+ #define WGMB2 3
+ #define CSB2 2
+ #define CSB1 1
+ #define CSB0 0
+
+ /* Timer/Counter Control Register C */
+ #define FOCA 7
+ #define FOCB 6
+ #define FOCC 5
+
+ /* On-chip Debug Register */
+ #define OCDR7 7
+ #define OCDR6 6
+ #define OCDR5 5
+ #define OCDR4 4
+ #define OCDR3 3
+ #define OCDR2 2
+ #define OCDR1 1
+ #define OCDR0 0
+
+ /* Watchdog Timer Control Register */
+ #define WDCE 4
+ #define WDE 3
+ #define WDP2 2
+ #define WDP1 1
+ #define WDP0 0
+
+ /* Special Function I/O Register */
+ #define TSM 7
+ #define ADHSM 4
+ #define ACME 3
+ #define PUD 2
+ #define PSR0 1
+ #define PSR321 0
+
+ /* EEPROM Control Register */
+ #define EERIE 3
+ #define EEMWE 2
+ #define EEWE 1
+ #define EERE 0
+
+ /* Port Data Register */
+ #define PORT7 7
+ #define PORT6 6
+ #define PORT5 5
+ #define PORT4 4
+ #define PORT3 3
+ #define PORT2 2
+ #define PORT1 1
+ #define PORT0 0
+
+ /* Port Data Direction Register */
+ #define DD7 7
+ #define DD6 6
+ #define DD5 5
+ #define DD4 4
+ #define DD3 3
+ #define DD2 2
+ #define DD1 1
+ #define DD0 0
+
+ /* Port Input Pins */
+ #define PIN7 7
+ #define PIN6 6
+ #define PIN5 5
+ #define PIN4 4
+ #define PIN3 3
+ #define PIN2 2
+ #define PIN1 1
+ #define PIN0 0
+
+ /* Status Register */
+ #define SREG_I 7
+ #define SREG_T 6
+ #define SREG_H 5
+ #define SREG_S 4
+ #define SREG_V 3
+ #define SREG_N 2
+ #define SREG_Z 1
+ #define SREG_C 0
+
+ /* SPI Status Register */
+ #define SPIF 7
+ #define WCOL 6
+ #define SPI2X 0
+
+ /* SPI Control Register */
+ #define SPIE 7
+ #define SPE 6
+ #define DORD 5
+ #define MSTR 4
+ #define CPOL 3
+ #define CPHA 2
+ #define SPR1 1
+ #define SPR0 0
+
+ /* USART Register C */
+ #define UMSEL 6
+ #define UPM1 5
+ #define UPM0 4
+ #define USBS 3
+ #define UCSZ1 2
+ #define UCSZ0 1
+ #define UCPOL 0
+
+ /* USART Status Register A */
+ #define RXC 7
+ #define TXC 6
+ #define UDRE 5
+ #define FE 4
+ #define OVR 3 /* This definition differs from the databook */
+ /*definition to avoid problems with the OR instruction */
+
+ /* USART Control Register */
+ #define RXCIE 7
+ #define TXCIE 6
+ #define UDRIE 5
+ #define RXEN 4
+ #define TXEN 3
+ #define UCSZ 2
+ #define RXB8 1
+ #define TXB8 0
+
+ /* Analog Comparator Control and Status Register */
+ #define ACD 7
+ #define ACBG 6
+ #define ACO 5
+ #define ACI 4
+ #define ACIE 3
+ #define ACIC 2
+ #define ACIS1 1
+ #define ACIS0 0
+
+ /* ADC Control and status register */
+ #define ADEN 7
+ #define ADSC 6
+ #define ADFR 5
+ #define ADIF 4
+ #define ADIE 3
+ #define ADPS2 2
+ #define ADPS1 1
+ #define ADPS0 0
+
+ /* ADC Multiplexer select */
+ #define REFS1 7
+ #define REFS0 6
+ #define ADLAR 5
+ #define MUX4 4
+ #define MUX3 3
+ #define MUX2 2
+ #define MUX1 1
+ #define MUX0 0
+
+ /* Pointer definition */
+ #define XL r26
+ #define XH r27
+ #define YL r28
+ #define YH r29
+ #define ZL r30
+ #define ZH r31
+
+ /* Constants */
+ #define RAMEND 0x10FF /* Last On-Chip SRAM Location */
+ #define XRAMEND 0xFFFF
+ #define E2END 0x0FFF
+ #define FLASHEND 0x1FFFF
+
+ #endif /* __IOM128 */
diff -rc3P avr-libc-20011029/include/iom128.h~ avr-libc-20011029-patch-0.2/include/iom128.h~
*** avr-libc-20011029/include/iom128.h~ Thu Jan 1 10:00:00 1970
--- avr-libc-20011029-patch-0.2/include/iom128.h~ Tue Nov 20 12:39:15 2001
***************
*** 0 ****
--- 1,751 ----
+ /*
+ iom128.h - AVR ATmega128 defines
+
+ Contributors:
+ Created by Peter Jansen <[email-masked]>
+
+ THIS SOFTWARE IS NOT COPYRIGHTED
+
+ This source code is offered for use in the public domain. You may
+ use, modify or distribute it freely.
+
+ This code is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
+ DISCLAIMED. This includes but is not limited to warranties of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ */
+
+ #ifndef __IOM128
+ #define __IOM128 1
+
+ #define AVR_MEGA 1
+ #define AVR_ENHANCED 1
+
+ /*
+ * Predefined SFR Addresses.
+ * NOTE: These addresses will be either DATA MEMORY or I/O MEMORY addresses,
+ * depending on how you define __SFR_OFFSET (0x0 for I/O, 0x20 for DATA).
+ * For accesses to memory locations 0x20 through to 0x5F, gcc subtracts
+ * 0x20 from the address supplied and uses an I/O instruction, rather than
+ * a data memory access instruction (I/O instructions can only address the
+ * first 64 I/O memory locations).
+ * By using the __SFR_OFFSET symbol defined as 0x20 in the header file, all
+ * special file registers (data memory addresses 0x00--0x1F), all I/O
+ * registers (data memory address 0x20--0x5F, I/O memory address 0x00--0x3F)
+ * and all extended I/O registers (data memory address 0x60--0xFF) can be
+ * used as is, without being wrapped in macros to adjust the address.
+ */
+ /* #define __SFR_OFFSET 0x0 */
+ #define __SFR_OFFSET 0x20
+
+ /* Input Pins, Port F */
+ #define PINF (0x0 + __SFR_OFFSET)
+
+ /* Input Pins, Port E */
+ #define PINE (0x1 + __SFR_OFFSET)
+
+ /* Data Direction Register, Port E */
+ #define DDRE (0x2 + __SFR_OFFSET)
+
+ /* Data Register, Port E */
+ #define PORTE (0x3 + __SFR_OFFSET)
+
+ /* ADC Low Byte */
+ #define ADCL (0x4 + __SFR_OFFSET)
+
+ /* ADC High Byte */
+ #define ADCH (0x5 + __SFR_OFFSET)
+
+ /* ADC Control and status register */
+ #define ADCSR (0x6 + __SFR_OFFSET)
+
+ /* ADC Multiplexer select */
+ #define ADMUX (0x7 + __SFR_OFFSET)
+
+ /* Analog Comparator Control and Status Register */
+ #define ACSR (0x8 + __SFR_OFFSET)
+
+ /* USART0 Baud Rate Register Low */
+ #define UBRR0L (0x9 + __SFR_OFFSET)
+
+ /* USART0 Control and Status Register B */
+ #define UCSR0B (0xA + __SFR_OFFSET)
+
+ /* USART0 Control and Status Register A */
+ #define UCSR0A (0xB + __SFR_OFFSET)
+
+ /* USART I/O Data Register */
+ #define UDR0 (0xC + __SFR_OFFSET)
+
+ /* SPI Control Register */
+ #define SPCR (0xD + __SFR_OFFSET)
+
+ /* SPI Status Register */
+ #define SPSR (0xE + __SFR_OFFSET)
+
+ /* SPI I/O Data Register */
+ #define SPDR (0xF + __SFR_OFFSET)
+
+ /* Input Pins, Port D */
+ #define PIND (0x10 + __SFR_OFFSET)
+
+ /* Data Direction Register, Port D */
+ #define DDRD (0x11 + __SFR_OFFSET)
+
+ /* Data Register, Port D */
+ #define PORTD (0x12 + __SFR_OFFSET)
+
+ /* Input Pins, Port C */
+ #define PINC (0x13 + __SFR_OFFSET)
+
+ /* Data Direction Register, Port C */
+ #define DDRC (0x14 + __SFR_OFFSET)
+
+ /* Data Register, Port C */
+ #define PORTC (0x15 + __SFR_OFFSET)
+
+ /* Input Pins, Port B */
+ #define PINB (0x16 + __SFR_OFFSET)
+
+ /* Data Direction Register, Port B */
+ #define DDRB (0x17 + __SFR_OFFSET)
+
+ /* Data Register, Port B */
+ #define PORTB (0x18 + __SFR_OFFSET)
+
+ /* Input Pins, Port A */
+ #define PINA (0x19 + __SFR_OFFSET)
+
+ /* Data Direction Register, Port A */
+ #define DDRA (0x1A + __SFR_OFFSET)
+
+ /* Data Register, Port A */
+ #define PORTA (0x1B + __SFR_OFFSET)
+
+ /* EEPROM Control Register */
+ #define EECR (0x1C + __SFR_OFFSET)
+
+ /* EEPROM Data Register */
+ #define EEDR (0x1D + __SFR_OFFSET)
+
+ /* EEPROM Address Register Low */
+ #define EEARL (0x1E + __SFR_OFFSET)
+
+ /* EEPROM Address Register High */
+ #define EEARH (0x1F + __SFR_OFFSET)
+
+ /* Special Function I/O Register */
+ #define SFIOR (0x20 + __SFR_OFFSET)
+
+ /* Watchdog Timer Control Register */
+ #define WDTCR (0x21 + __SFR_OFFSET)
+
+ /* On-chip Debug Register */
+ #define OCDR (0x22 + __SFR_OFFSET)
+
+ /* Timer2 Output Compare Register */
+ #define OCR2 (0x23 + __SFR_OFFSET)
+
+ /* Timer/Counter 2 */
+ #define TCNT2 (0x24 + __SFR_OFFSET)
+
+ /* Timer/Counter 2 Control register */
+ #define TCCR2 (0x25 + __SFR_OFFSET)
+
+ /* T/C 1 Input Capture Register Low */
+ #define ICR1L (0x26 + __SFR_OFFSET)
+
+ /* T/C 1 Input Capture Register High */
+ #define ICR1H (0x27 + __SFR_OFFSET)
+
+ /* Timer/Counter1 Output Compare Register B Low */
+ #define OCR1BL (0x28 + __SFR_OFFSET)
+
+ /* Timer/Counter1 Output Compare Register B High */
+ #define OCR1BH (0x29 + __SFR_OFFSET)
+
+ /* Timer/Counter1 Output Compare Register A Low */
+ #define OCR1AL (0x2A + __SFR_OFFSET)
+
+ /* Timer/Counter1 Output Compare Register A High */
+ #define OCR1AH (0x2B + __SFR_OFFSET)
+
+ /* Timer/Counter 1 Low */
+ #define TCNT1L (0x2C + __SFR_OFFSET)
+
+ /* Timer/Counter 1 High */
+ #define TCNT1H (0x2D + __SFR_OFFSET)
+
+ /* Timer/Counter 1 Control and Status Register */
+ #define TCCR1B (0x2E + __SFR_OFFSET)
+
+ /* Timer/Counter 1 Control Register */
+ #define TCCR1A (0x2F + __SFR_OFFSET)
+
+ /* Timer/Counter 0 Asynchronous Control & Status Register */
+ #define ASSR (0x30 + __SFR_OFFSET)
+
+ /* Output Compare Register 0 */
+ #define OCR0 (0x31 + __SFR_OFFSET)
+
+ /* Timer/Counter 0 */
+ #define TCNT0 (0x32 + __SFR_OFFSET)
+
+ /* Timer/Counter 0 Control Register */
+ #define TCCR0 (0x33 + __SFR_OFFSET)
+
+ /* MCU Status Register */
+ #define MCUSR (0x34 + __SFR_OFFSET)
+
+ /* MCU general Control Register */
+ #define MCUCR (0x35 + __SFR_OFFSET)
+
+ /* Timer/Counter Interrupt Flag Register */
+ #define TIFR (0x36 + __SFR_OFFSET)
+
+ /* Timer/Counter Interrupt MaSK register */
+ #define TIMSK (0x37 + __SFR_OFFSET)
+
+ /* External Interrupt Flag Register */
+ #define EIFR (0x38 + __SFR_OFFSET)
+
+ /* External Interrupt MaSK register */
+ #define EIMSK (0x39 + __SFR_OFFSET)
+
+ /* External Interrupt Control Register B */
+ #define EICRB (0x3A + __SFR_OFFSET)
+
+ /* RAM Page Z select register */
+ #define RAMPZ (0x3B + __SFR_OFFSET)
+
+ /* XDIV Divide control register */
+ #define XDIV (0x3C + __SFR_OFFSET)
+
+ /* Stack Pointer Low */
+ #define SPL (0x3D + __SFR_OFFSET)
+
+ /* Stack Pointer High */
+ #define SPH (0x3E + __SFR_OFFSET)
+
+ /* Status REGister */
+ #define SREG (0x3F + __SFR_OFFSET)
+
+ /* Data Direction Register, Port F */
+ #define DDRF (0x61)
+
+ /* Data Register, Port F */
+ #define PORTF (0x62)
+
+ /* Input Pins, Port G */
+ #define PING (0x63)
+
+ /* Data Direction Register, Port G */
+ #define DDRG (0x64)
+
+ /* Data Register, Port G */
+ #define PORTG (0x65)
+
+ /* Store Program Memory Control Register */
+ #define SPMCR (0x68)
+
+ /* External Interrupt Control Register A */
+ #define EICRA (0x6A)
+
+ /* External Memory Control Register B */
+ #define XMCRB (0x6C)
+
+ /* External Memory Control Register A */
+ #define XMCRA (0x6D)
+
+ /* Oscillator Calibration Register */
+ #define OSCCAL (0x6F)
+
+ /* 2-wire Serial Interface Bit Rate Register */
+ #define TWBR (0x70)
+
+ /* 2-wire Serial Interface Status Register */
+ #define TWSR (0x71)
+
+ /* 2-wire Serial Interface Address Register */
+ #define TWAR (0x72)
+
+ /* 2-wire Serial Interface Data Register */
+ #define TWDR (0x73)
+
+ /* 2-wire Serial Interface Control Register */
+ #define TWCR (0x74)
+
+ /* Time Counter 1 Output Compare Register C Low */
+ #define OCR1CL (0x78)
+
+ /* Time Counter 1 Output Compare Register C High */
+ #define OCR1CH (0x79)
+
+ /* Timer/Counter 1 Control Register C */
+ #define TCCR1C (0x7A)
+
+ /* Extended Timer Interrupt Flag Register */
+ #define ETIFR (0x7C)
+
+ /* Extended Timer Interrupt Mask Register */
+ #define ETIMSK (0x7D)
+
+ /* Timer/Counter 3 Input Capture Register Low */
+ #define ICR3L (0x80)
+
+ /* Timer/Counter 3 Input Capture Register High */
+ #define ICR3H (0x81)
+
+ /* Timer/Counter 3 Output Compare Register C Low */
+ #define OCR3CL (0x82)
+
+ /* Timer/Counter 3 Output Compare Register C High */
+ #define OCR3CH (0x83)
+
+ /* Timer/Counter 3 Output Compare Register B Low */
+ #define OCR3BL (0x84)
+
+ /* Timer/Counter 3 Output Compare Register B High */
+ #define OCR3BH (0x85)
+
+ /* Timer/Counter 3 Output Compare Register A Low */
+ #define OCR3AL (0x86)
+
+ /* Timer/Counter 3 Output Compare Register A High */
+ #define OCR3AH (0x87)
+
+ /* Timer/Counter 3 Counter Register High */
+ #define TCNT3L (0x88)
+
+ /* Timer/Counter 3 Counter Register High */
+ #define TCNT3H (0x89)
+
+ /* Timer/Counter 3 Control Register B */
+ #define TCCR3B (0x8A)
+
+ /* Timer/Counter 3 Control Register A */
+ #define TCCR3A (0x8B)
+
+ /* Timer/Counter 3 Control Register C */
+ #define TCCR3C (0x8C)
+
+ /* USART0 Baud Rate Register High */
+ #define UBRR0H (0x90)
+
+ /* USART0 Control and Status Register C */
+ #define UCSR0C (0x95)
+
+ /* USART1 Baud Rate Register High */
+ #define UBRR1H (0x98)
+
+ /* USART1 Baud Rate Register Low*/
+ #define UBRR1L (0x99)
+
+ /* USART1 Control and Status Register B */
+ #define UCSR1B (0x9A)
+
+ /* USART1 Control and Status Register A */
+ #define UCSR1A (0x9B)
+
+ /* USART1 I/O Data Register */
+ #define UDR1 (0x9C)
+
+ /*
+ * Interrupt Vector Definitions
+ */
+
+ #define SIG_INTERRUPT0 _vector_1
+ #define SIG_INTERRUPT1 _vector_2
+ #define SIG_INTERRUPT2 _vector_3
+ #define SIG_INTERRUPT3 _vector_4
+ #define SIG_INTERRUPT4 _vector_5
+ #define SIG_INTERRUPT5 _vector_6
+ #define SIG_INTERRUPT6 _vector_7
+ #define SIG_INTERRUPT7 _vector_8
+ #define SIG_OUTPUT_COMPARE2 _vector_9
+ #define SIG_OVERFLOW2 _vector_10
+ #define SIG_INPUT_CAPTURE1 _vector_11
+ #define SIG_OUTPUT_COMPARE1A _vector_12
+ #define SIG_OUTPUT_COMPARE1B _vector_13
+ #define SIG_OVERFLOW1 _vector_14
+ #define SIG_OUTPUT_COMPARE0 _vector_15
+ #define SIG_OVERFLOW0 _vector_16
+ #define SIG_SPI _vector_17
+ #define SIG_UART0_RECV _vector_18
+ #define SIG_UART0_DATA _vector_19
+ #define SIG_UART0_TRANS _vector_20
+ #define SIG_ADC _vector_21
+ #define SIG_EEPROM_READY _vector_22
+ #define SIG_COMPARATOR _vector_23
+ #define SIG_OUTPUT_COMPARE1C _vector_24
+ #define SIG_INPUT_CAPTURE3 _vector_25
+ #define SIG_OUTPUT_COMPARE3A _vector_26
+ #define SIG_OUTPUT_COMPARE3B _vector_27
+ #define SIG_OUTPUT_COMPARE3C _vector_28
+ #define SIG_OVERFLOW3 _vector_29
+ #define SIG_UART1_RECV _vector_30
+ #define SIG_UART1_DATA _vector_31
+ #define SIG_UART1_TRANS _vector_32
+ #define SIG_2WIRE_SERIAL _vector_33
+ #define SIG_SPM_READY _vector_34
+
+ #define END_VECTOR (34)
+ #define INT_VECT_SIZE (0x8a)
+
+ /*
+ The Register Bit names are represented by their bit number (0-7).
+ */
+
+ /* 2-wire Control Register */
+ #define TWINT 7
+ #define TWEA 6
+ #define TWSTA 5
+ #define TWSTO 4
+ #define TWWC 3
+ #define TWEN 2
+ #define TWIE 0
+
+ /* 2-wire Address Register */
+ #define TWA6 7
+ #define TWA5 6
+ #define TWA4 5
+ #define TWA3 4
+ #define TWA2 3
+ #define TWA1 2
+ #define TWA0 1
+ #define TWGCE 0
+
+ /* 2-wire Status Register */
+ #define TWS7 7
+ #define TWS6 6
+ #define TWS5 5
+ #define TWS4 4
+ #define TWS3 3
+ #define TWPS1 1
+ #define TWPS0 0
+
+ /* External Memory Control Register A */
+ #define SRL2 6
+ #define SRL1 5
+ #define SRL0 4
+ #define SRW01 3
+ #define SRW00 2
+ #define SRW11 1
+
+ /* External Memory Control Register B */
+ #define XMBK 7
+ #define XMM2 2
+ #define XMM1 1
+ #define XMM0 0
+
+ /* XDIV Divide control register*/
+ #define XDIVEN 7
+ #define XDIV6 6
+ #define XDIV5 5
+ #define XDIV4 4
+ #define XDIV3 3
+ #define XDIV2 2
+ #define XDIV1 1
+ #define XDIV0 0
+
+ /* RAM Page Z select register */
+ #define RAMPZ0 0
+
+ /* External Interrupt Control Register A */
+ #define ISC31 7
+ #define ISC30 6
+ #define ISC21 5
+ #define ISC20 4
+ #define ISC11 3
+ #define ISC10 2
+ #define ISC01 1
+ #define ISC00 0
+
+ /* External Interrupt Control Register B */
+ #define ISC71 7
+ #define ISC70 6
+ #define ISC61 5
+ #define ISC60 4
+ #define ISC51 3
+ #define ISC50 2
+ #define ISC41 1
+ #define ISC40 0
+
+ /* Store Program Memory Control Register */
+ #define SPMIE 7
+ #define RWWSB 6
+ #define RWWSRE 4
+ #define BLBSET 3
+ #define PGWRT 2
+ #define PGERS 1
+ #define SPMEN 0
+
+ /* External Interrupt MaSK register */
+ #define INT7 7
+ #define INT6 6
+ #define INT5 5
+ #define INT4 4
+ #define INT3 3
+ #define INT2 2
+ #define INT1 1
+ #define INT0 0
+
+ /* External Interrupt Flag Register */
+ #define INTF7 7
+ #define INTF6 6
+ #define INTF5 5
+ #define INTF4 4
+
+ /* Timer/Counter Interrupt MaSK register */
+ #define OCIE2 7
+ #define TOIE2 6
+ #define TICIE1 5
+ #define OCIE1A 4
+ #define OCIE1B 3
+ #define TOIE1 2
+ #define OCIE0 1
+ #define TOIE0 0
+
+ /* Timer/Counter Interrupt Flag Register */
+ #define OCF2 7
+ #define TOV2 6
+ #define ICF1 5
+ #define OCF1A 4
+ #define OCF1B 3
+ #define TOV1 2
+ #define OCF0 1
+ #define TOV0 0
+
+ /* Extended Timer Interrupt MaSK register */
+ #define TICIE3 5
+ #define OCIE3A 4
+ #define OCIE3B 3
+ #define TOIE3 2
+ #define OCIE3C 1
+ #define OCIE1C 0
+
+ /* Extended Timer Interrupt Flag Register */
+ #define ICF3 5
+ #define OCF3A 4
+ #define OCF3B 3
+ #define TOV3 2
+ #define OCF3C 1
+ #define OCF1C 0
+
+ /* MCU general Control Register */
+ #define SRE 7
+ #define SRW 6
+ #define SE 5
+ #define SM1 4
+ #define SM0 3
+ #define SM2 2
+ #define IVSEL 1
+ #define IVCE 0
+
+ /* MCU Status Register */
+ #define JTD 7
+ #define JTRF 4
+ #define WDRF 3
+ #define BORF 2
+ #define EXTRF 1
+ #define PORF 0
+
+ /* Timer/Counter Control Register */
+ #define FOC 7
+ #define WGM0 6
+ #define COM1 5
+ #define COM0 4
+ #define WGM1 3
+ #define CS2 2
+ #define CS1 1
+ #define CS0 0
+
+ /* Timer/Counter 0 Asynchronous Control & Status Register */
+ #define AS0 3
+ #define TCN0UB 2
+ #define OCR0UB 1
+ #define TCR0UB 0
+
+ /* Timer/Counter Control Register A */
+ #define COMA1 7
+ #define COMA0 6
+ #define COMB1 5
+ #define COMB0 4
+ #define COMC1 3
+ #define COMC0 2
+ #define WGMA1 1
+ #define WGMA0 0
+
+ /* Timer/Counter Control and Status Register B */
+ #define ICNC 7
+ #define ICES 6
+ #define WGMB3 4
+ #define WGMB2 3
+ #define CSB2 2
+ #define CSB1 1
+ #define CSB0 0
+
+ /* Timer/Counter Control Register C */
+ #define FOCA 7
+ #define FOCB 6
+ #define FOCC 5
+
+ /* On-chip Debug Register */
+ #define OCDR7 7
+ #define OCDR6 6
+ #define OCDR5 5
+ #define OCDR4 4
+ #define OCDR3 3
+ #define OCDR2 2
+ #define OCDR1 1
+ #define OCDR0 0
+
+ /* Watchdog Timer Control Register */
+ #define WDCE 4
+ #define WDE 3
+ #define WDP2 2
+ #define WDP1 1
+ #define WDP0 0
+
+ /* Special Function I/O Register */
+ #define TSM 7
+ #define ADHSM 4
+ #define ACME 3
+ #define PUD 2
+ #define PSR0 1
+ #define PSR321 0
+
+ /* EEPROM Control Register */
+ #define EERIE 3
+ #define EEMWE 2
+ #define EEWE 1
+ #define EERE 0
+
+ /* Port Data Register */
+ #define PORT7 7
+ #define PORT6 6
+ #define PORT5 5
+ #define PORT4 4
+ #define PORT3 3
+ #define PORT2 2
+ #define PORT1 1
+ #define PORT0 0
+
+ /* Port Data Direction Register */
+ #define DD7 7
+ #define DD6 6
+ #define DD5 5
+ #define DD4 4
+ #define DD3 3
+ #define DD2 2
+ #define DD1 1
+ #define DD0 0
+
+ /* Port Input Pins */
+ #define PIN7 7
+ #define PIN6 6
+ #define PIN5 5
+ #define PIN4 4
+ #define PIN3 3
+ #define PIN2 2
+ #define PIN1 1
+ #define PIN0 0
+
+ /* Status Register */
+ #define SREG_I 7
+ #define SREG_T 6
+ #define SREG_H 5
+ #define SREG_S 4
+ #define SREG_V 3
+ #define SREG_N 2
+ #define SREG_Z 1
+ #define SREG_C 0
+
+ /* SPI Status Register */
+ #define SPIF 7
+ #define WCOL 6
+ #define SPI2X 0
+
+ /* SPI Control Register */
+ #define SPIE 7
+ #define SPE 6
+ #define DORD 5
+ #define MSTR 4
+ #define CPOL 3
+ #define CPHA 2
+ #define SPR1 1
+ #define SPR0 0
+
+ /* USART Register C */
+ #define UMSEL 6
+ #define UPM1 5
+ #define UPM0 4
+ #define USBS 3
+ #define UCSZ1 2
+ #define UCSZ0 1
+ #define UCPOL 0
+
+ /* USART Status Register A */
+ #define RXC 7
+ #define TXC 6
+ #define UDRE 5
+ #define FE 4
+ #define OVR 3 /* This definition differs from the databook */
+ /*definition to avoid problems with the OR instruction */
+
+ /* USART Control Register */
+ #define RXCIE 7
+ #define TXCIE 6
+ #define UDRIE 5
+ #define RXEN 4
+ #define TXEN 3
+ #define UCSZ 2
+ #define RXB8 1
+ #define TXB8 0
+
+ /* Analog Comparator Control and Status Register */
+ #define ACD 7
+ #define ACBG 6
+ #define ACO 5
+ #define ACI 4
+ #define ACIE 3
+ #define ACIC 2
+ #define ACIS1 1
+ #define ACIS0 0
+
+ /* ADC Control and status register */
+ #define ADEN 7
+ #define ADSC 6
+ #define ADFR 5
+ #define ADIF 4
+ #define ADIE 3
+ #define ADPS2 2
+ #define ADPS1 1
+ #define ADPS0 0
+
+ /* ADC Multiplexer select */
+ #define REFS1 7
+ #define REFS0 6
+ #define ADLAR 5
+ #define MUX4 4
+ #define MUX3 3
+ #define MUX2 2
+ #define MUX1 1
+ #define MUX0 0
+
+ /* Pointer definition */
+ #define XL r26
+ #define XH r27
+ #define YL r28
+ #define YH r29
+ #define ZL r30
+ #define ZH r31
+
+ /* Constants */
+ #define RAMEND 0x10FF /* Last On-Chip SRAM Location */
+ #define XRAMEND 0xFFFF
+ #define E2END 0x0FFF
+ #define FLASHEND 0x1FFFF
+
+ #endif /* __IOM128 */
diff -rc3P avr-libc-20011029/include/iom161.h avr-libc-20011029-patch-0.2/include/iom161.h
*** avr-libc-20011029/include/iom161.h Sun Oct 29 04:17:54 2000
--- avr-libc-20011029-patch-0.2/include/iom161.h Mon Nov 19 14:57:00 2001
***************
*** 213,240 ****

/* Interrupt vectors (byte addresses) */

! #define RESET_vect (0x00)
! #define INT0_vect (0x04)
! #define INT1_vect (0x08)
! #define INT2_vect (0x0C)
! #define TIMER2_COMP_vect (0x10)
! #define TIMER2_OVF_vect (0x14)
! #define TIMER1_CAPT_vect (0x18)
! #define TIMER1_COMPA_vect (0x1C)
! #define TIMER1_COMPB_vect (0x20)
! #define TIMER1_OVF_vect (0x24)
! #define TIMER0_COMP_vect (0x28)
! #define TIMER0_OVF_vect (0x2C)
! #define SPI_STC_vect (0x30)
! #define UART_RX_vect (0x34)
! #define UART1_RX_vect (0x38)
! #define UART_UDRE_vect (0x3C)
! #define UART1_UDRE_vect (0x40)
! #define UART_TX_vect (0x44)
! #define UART1_TX_vect (0x48)
! #define EE_RDY_vect (0x4C)
! #define ANA_COMP_vect (0x50)

#define INT_VECT_SIZE (0x54)

/* Bit numbers */
--- 213,240 ----

/* Interrupt vectors (byte addresses) */

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_INTERRUPT1 _vector_2
! #define SIG_INTERRUPT2 _vector_3
! #define SIG_OUTPUT_COMPARE2 _vector_4
! #define SIG_OVERFLOW2 _vector_5
! #define SIG_INPUT_CAPTURE1 _vector_6
! #define SIG_OUTPUT_COMPARE1A _vector_7
! #define SIG_OUTPUT_COMPARE1B _vector_8
! #define SIG_OVERFLOW1 _vector_9
! #define SIG_OUTPUT_COMPARE0 _vector_10
! #define SIG_OVERFLOW0 _vector_11
! #define SIG_SPI _vector_12
! #define SIG_UART0_RECV _vector_13
! #define SIG_UART1_RECV _vector_14
! #define SIG_UART0_DATA _vector_15
! #define SIG_UART1_DATA _vector_16
! #define SIG_UART0_TRANS _vector_17
! #define SIG_UART1_TRANS _vector_18
! #define SIG_EEPROM_READY _vector_19
! #define SIG_COMPARATOR _vector_20

+ #define END_VECTOR (20)
#define INT_VECT_SIZE (0x54)

/* Bit numbers */
diff -rc3P avr-libc-20011029/include/iom163.h avr-libc-20011029-patch-0.2/include/iom163.h
*** avr-libc-20011029/include/iom163.h Sun Nov 19 01:02:01 2000
--- avr-libc-20011029-patch-0.2/include/iom163.h Mon Nov 19 14:57:38 2001
***************
*** 129,153 ****

/* Interrupt vectors (byte addresses) */

! #define RESET_vect (0x00)
! #define INT0_vect (0x04)
! #define INT1_vect (0x08)
! #define TIMER2_COMP_vect (0x0C)
! #define TIMER2_OVF_vect (0x10)
! #define TIMER1_CAPT_vect (0x14)
! #define TIMER1_COMPA_vect (0x18)
! #define TIMER1_COMPB_vect (0x1C)
! #define TIMER1_OVF_vect (0x20)
! #define TIMER0_OVF_vect (0x24)
! #define SPI_STC_vect (0x28)
! #define UART_RX_vect (0x2C)
! #define UART_UDRE_vect (0x30)
! #define UART_TX_vect (0x34)
! #define ADC_vect (0x38)
! #define EE_RDY_vect (0x3C)
! #define ANA_COMP_vect (0x40)
! #define TWI_INT_vect (0x44)

#define INT_VECT_SIZE (0x48)

/* Bit numbers */
--- 129,152 ----

/* Interrupt vectors (byte addresses) */

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_INTERRUPT1 _vector_2
! #define SIG_OUTPUT_COMPARE2 _vector_3
! #define SIG_OVERFLOW2 _vector_4
! #define SIG_INPUT_CAPTURE1 _vector_5
! #define SIG_OUTPUT_COMPARE1A _vector_6
! #define SIG_OUTPUT_COMPARE1B _vector_7
! #define SIG_OVERFLOW1 _vector_8
! #define SIG_OVERFLOW0 _vector_9
! #define SIG_SPI _vector_10
! #define SIG_UART_RECV _vector_11
! #define SIG_UART_DATA _vector_12
! #define SIG_UART_TRANS _vector_13
! #define SIG_ADC _vector_14
! #define SIG_EEPROM_READY _vector_15
! #define SIG_2WIRE_SERIAL _vector_16

+ #define END_VECTOR (16)
#define INT_VECT_SIZE (0x48)

/* Bit numbers */
diff -rc3P avr-libc-20011029/include/iom32.h avr-libc-20011029-patch-0.2/include/iom32.h
*** avr-libc-20011029/include/iom32.h Sun Oct 29 04:23:54 2000
--- avr-libc-20011029-patch-0.2/include/iom32.h Mon Nov 19 14:59:01 2001
***************
*** 136,162 ****

/* Interrupt vectors (byte addresses) */

! #define RESET_vect (0x00)
! #define INT0_vect (0x04)
! #define INT1_vect (0x08)
! #define INT2_vect (0x0C)
! #define TIMER2_COMP_vect (0x10)
! #define TIMER2_OVF_vect (0x14)
! #define TIMER1_CAPT_vect (0x18)
! #define TIMER1_COMPA_vect (0x1C)
! #define TIMER1_COMPB_vect (0x20)
! #define TIMER1_OVF_vect (0x24)
! #define TIMER0_COMP_vect (0x28)
! #define TIMER0_OVF_vect (0x2C)
! #define SPI_STC_vect (0x30)
! #define UART_RX_vect (0x34)
! #define UART_UDRE_vect (0x38)
! #define UART_TX_vect (0x3C)
! #define ADC_vect (0x40)
! #define EE_RDY_vect (0x44)
! #define ANA_COMP_vect (0x48)
! #define TWI_INT_vect (0x4C)

#define INT_VECT_SIZE (0x50)

/* Bit numbers */
--- 136,162 ----

/* Interrupt vectors (byte addresses) */

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_INTERRUPT1 _vector_2
! #define SIG_INTERRUPT3 _vector_3
! #define SIG_OUTPUT_COMPARE2 _vector_4
! #define SIG_OVERFLOW2 _vector_5
! #define SIG_INPUT_CAPTURE1 _vector_6
! #define SIG_OUTPUT_COMPARE1A _vector_7
! #define SIG_OUTPUT_COMPARE1B _vector_8
! #define SIG_OVERFLOW1 _vector_9
! #define SIG_OUTPUT_COMPARE0 _vector_10
! #define SIG_OVERFLOW0 _vector_11
! #define SIG_SPI _vector_12
! #define SIG_UART_RECV _vector_13
! #define SIG_UART_DATA _vector_14
! #define SIG_UART_TRANS _vector_15
! #define SIG_ADC _vector_16
! #define SIG_EEPROM_READY _vector_17
! #define SIG_COMPARATOR _vector_18
! #define SIG_2WIRE_SERIAL _vector_19

+ #define END_VECTOR (19)
#define INT_VECT_SIZE (0x50)

/* Bit numbers */
diff -rc3P avr-libc-20011029/include/iom603.h avr-libc-20011029-patch-0.2/include/iom603.h
*** avr-libc-20011029/include/iom603.h Fri Jul 21 16:20:57 2000
--- avr-libc-20011029-patch-0.2/include/iom603.h Mon Nov 19 14:59:13 2001
***************
*** 183,215 ****
/* Interrupt Vector Definitions */
/*==============================*/

! /* NB! vectors are specified as byte addresses */
!
! #define RESET_vect (0x00)
! #define INT0_vect (0x04)
! #define INT1_vect (0x08)
! #define INT2_vect (0x0C)
! #define INT3_vect (0x10)
! #define INT4_vect (0x14)
! #define INT5_vect (0x18)
! #define INT6_vect (0x1C)
! #define INT7_vect (0x20)
! #define TIMER2_COMP_vect (0x24)
! #define TIMER2_OVF_vect (0x28)
! #define TIMER1_CAPT_vect (0x2C)
! #define TIMER1_COMPA_vect (0x30)
! #define TIMER1_COMPB_vect (0x34)
! #define TIMER1_OVF_vect (0x38)
! #define TIMER0_COMP_vect (0x3C)
! #define TIMER0_OVF_vect (0x40)
! #define SPI_STC_vect (0x44)
! #define UART_RX_vect (0x48)
! #define UART_UDRE_vect (0x4C)
! #define UART_TX_vect (0x50)
! #define ADC_vect (0x54)
! #define EE_RDY_vect (0x58)
! #define ANA_COMP_vect (0x5C)

#define INT_VECT_SIZE (0x60)

/*
--- 183,213 ----
/* Interrupt Vector Definitions */
/*==============================*/

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_INTERRUPT1 _vector_2
! #define SIG_INTERRUPT2 _vector_3
! #define SIG_INTERRUPT3 _vector_4
! #define SIG_INTERRUPT4 _vector_5
! #define SIG_INTERRUPT5 _vector_6
! #define SIG_INTERRUPT6 _vector_7
! #define SIG_INTERRUPT7 _vector_8
! #define SIG_OUTPUT_COMPARE2 _vector_9
! #define SIG_OVERFLOW2 _vector_10
! #define SIG_INPUT_CAPTURE1 _vector_11
! #define SIG_OUTPUT_COMPARE1A _vector_12
! #define SIG_OUTPUT_COMPARE1B _vector_13
! #define SIG_OVERFLOW1 _vector_14
! #define SIG_OUTPUT_COMPARE0 _vector_15
! #define SIG_OVERFLOW0 _vector_16
! #define SIG_SPI _vector_17
! #define SIG_UART_RECV _vector_18
! #define SIG_UART_DATA _vector_19
! #define SIG_UART_TRANS _vector_20
! #define SIG_ADC _vector_21
! #define SIG_EEPROM_READY _vector_22
! #define SIG_COMPARATOR _vector_23

+ #define END_VECTOR (23)
#define INT_VECT_SIZE (0x60)

/*
diff -rc3P avr-libc-20011029/include/iom83.h avr-libc-20011029-patch-0.2/include/iom83.h
*** avr-libc-20011029/include/iom83.h Sun Oct 29 04:24:38 2000
--- avr-libc-20011029-patch-0.2/include/iom83.h Mon Nov 19 14:59:26 2001
***************
*** 130,154 ****

/* Interrupt vectors (byte addresses) */

! #define RESET_vect (0x00)
! #define INT0_vect (0x02)
! #define INT1_vect (0x04)
! #define TIMER2_COMP_vect (0x06)
! #define TIMER2_OVF_vect (0x08)
! #define TIMER1_CAPT_vect (0x0A)
! #define TIMER1_COMPA_vect (0x0C)
! #define TIMER1_COMPB_vect (0x0E)
! #define TIMER1_OVF_vect (0x10)
! #define TIMER0_OVF_vect (0x12)
! #define SPI_STC_vect (0x14)
! #define UART_RX_vect (0x16)
! #define UART_UDRE_vect (0x18)
! #define UART_TX_vect (0x1A)
! #define ADC_vect (0x1C)
! #define EE_RDY_vect (0x1E)
! #define ANA_COMP_vect (0x20)
! #define TWI_INT_vect (0x22)

#define INT_VECT_SIZE (0x24)

/* Bit numbers */
--- 130,154 ----

/* Interrupt vectors (byte addresses) */

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_INTERRUPT1 _vector_2
! #define SIG_OUTPUT_COMPARE2 _vector_3
! #define SIG_OVERFLOW2 _vector_4
! #define SIG_INPUT_CAPTURE1 _vector_5
! #define SIG_OUTPUT_COMPARE1A _vector_6
! #define SIG_OUTPUT_COMPARE1B _vector_7
! #define SIG_OVERFLOW1 _vector_8
! #define SIG_OVERFLOW0 _vector_9
! #define SIG_SPI _vector_10
! #define SIG_UART_RECV _vector_11
! #define SIG_UART_DATA _vector_12
! #define SIG_UART_TRANS _vector_13
! #define SIG_ADC _vector_14
! #define SIG_EEPROM_READY _vector_15
! #define SIG_COMPARATOR _vector_16
! #define SIG_2WIRE_SERIAL _vector_17

+ #define END_VECTOR (17)
#define INT_VECT_SIZE (0x24)

/* Bit numbers */
diff -rc3P avr-libc-20011029/include/iomacros.h avr-libc-20011029-patch-0.2/include/iomacros.h
*** avr-libc-20011029/include/iomacros.h Sun Jul 8 04:08:41 2001
--- avr-libc-20011029-patch-0.2/include/iomacros.h Fri Nov 16 16:56:57 2001
***************
*** 24,32 ****
#define BV(x) (1 << (x))
#endif

/* Memory mapped I/O - use for non-constant I/O space addresses. */

! #define __mmio(port) (*((volatile uint8_t *)((uint8_t)(port) + 0x20)))

/* Macros for access to 8-bit I/O registers with constant address. */

--- 24,36 ----
#define BV(x) (1 << (x))
#endif

+ #ifndef __SFR_OFFSET
+ #define __SFR_OFFSET 0
+ #endif /* !__SFR_OFFSET */
+
/* Memory mapped I/O - use for non-constant I/O space addresses. */

! #define __mmio(port) (*((volatile uint8_t *)((uint8_t)(port-__SFR_OFFSET) + 0x20)))

/* Macros for access to 8-bit I/O registers with constant address. */

***************
*** 35,41 ****
__asm__ __volatile__ ( \
"in %0,%1" \
: "=r" (__t) \
! : "I" ((uint8_t)(port)) \
); \
__t; \
})
--- 39,45 ----
__asm__ __volatile__ ( \
"in %0,%1" \
: "=r" (__t) \
! : "I" ((uint8_t)(port-__SFR_OFFSET)) \
); \
__t; \
})
***************
*** 49,62 ****
"out %1,%0" \
: /* no outputs */ \
: "r" ((uint8_t)(val)), \
! "I" ((uint8_t)(port)) \
)

#define __outb_zero(port) \
__asm__ __volatile__ ( \
"out %0,__zero_reg__" \
: /* no outputs */ \
! : "I" ((uint8_t)(port)) \
)

/* Macros for access to 8-bit I/O registers (auto detect const address). */
--- 53,66 ----
"out %1,%0" \
: /* no outputs */ \
: "r" ((uint8_t)(val)), \
! "I" ((uint8_t)(port-__SFR_OFFSET)) \
)

#define __outb_zero(port) \
__asm__ __volatile__ ( \
"out %0,__zero_reg__" \
: /* no outputs */ \
! : "I" ((uint8_t)(port-__SFR_OFFSET)) \
)

/* Macros for access to 8-bit I/O registers (auto detect const address). */
***************
*** 86,92 ****
"in %A0,%1" "\n\t" \
"in %B0,(%1)+1" \
: "=r" (__t) \
! : "I" ((uint8_t)(port)) \
); \
__t; \
})
--- 90,96 ----
"in %A0,%1" "\n\t" \
"in %B0,(%1)+1" \
: "=r" (__t) \
! : "I" ((uint8_t)(port-__SFR_OFFSET)) \
); \
__t; \
})
***************
*** 100,106 ****
"out __SREG__,__tmp_reg__" "\n\t" \
"in %B0,(%1)+1" \
: "=r" (__t) \
! : "I" ((uint8_t)(port)) \
: "r0" \
); \
__t; \
--- 104,110 ----
"out __SREG__,__tmp_reg__" "\n\t" \
"in %B0,(%1)+1" \
: "=r" (__t) \
! : "I" ((uint8_t)(port-__SFR_OFFSET)) \
: "r0" \
); \
__t; \
***************
*** 112,118 ****
"out %1,%A0" \
: /* no outputs */ \
: "r" ((uint16_t)(val)), \
! "I" ((uint8_t)(port)) \
)

#define __outw_atomic(val, port) \
--- 116,122 ----
"out %1,%A0" \
: /* no outputs */ \
: "r" ((uint16_t)(val)), \
! "I" ((uint8_t)(port-__SFR_OFFSET)) \
)

#define __outw_atomic(val, port) \
***************
*** 124,140 ****
"out %1,%A0" \
: /* no outputs */ \
: "r" ((uint16_t)(val)), \
! "I" ((uint8_t)(port)) \
: "r0" \
)

! /* __cbi / __sbi require constant port < 0x20 and constant bit */

#define __cbi(port, bit) \
__asm__ __volatile__ ( \
"cbi %0,%1" \
: /* no outputs */ \
! : "I" ((uint8_t)(port)), \
"I" ((uint8_t)(bit)) \
)

--- 128,144 ----
"out %1,%A0" \
: /* no outputs */ \
: "r" ((uint16_t)(val)), \
! "I" ((uint8_t)(port-__SFR_OFFSET)) \
: "r0" \
)

! /* __cbi / __sbi require constant port-__SFR_OFFSET < 0x20 and constant bit */

#define __cbi(port, bit) \
__asm__ __volatile__ ( \
"cbi %0,%1" \
: /* no outputs */ \
! : "I" ((uint8_t)(port-__SFR_OFFSET)), \
"I" ((uint8_t)(bit)) \
)

***************
*** 142,148 ****
__asm__ __volatile__ ( \
"sbi %0,%1" \
: /* no outputs */ \
! : "I" ((uint8_t)(port)), \
"I" ((uint8_t)(bit)) \
)

--- 146,152 ----
__asm__ __volatile__ ( \
"sbi %0,%1" \
: /* no outputs */ \
! : "I" ((uint8_t)(port-__SFR_OFFSET)), \
"I" ((uint8_t)(bit)) \
)

***************
*** 154,160 ****
"and __tmp_reg__,%1" "\n\t" \
"out %0,__tmp_reg__" \
: /* no outputs */ \
! : "I" ((uint8_t)(port)), \
"r" ((uint8_t)(val)) \
: "r0" \
)
--- 158,164 ----
"and __tmp_reg__,%1" "\n\t" \
"out %0,__tmp_reg__" \
: /* no outputs */ \
! : "I" ((uint8_t)(port-__SFR_OFFSET)), \
"r" ((uint8_t)(val)) \
: "r0" \
)
***************
*** 165,171 ****
"or __tmp_reg__,%1" "\n\t" \
"out %0,__tmp_reg__" \
: /* no outputs */ \
! : "I" ((uint8_t)(port)), \
"r" ((uint8_t)(val)) \
: "r0" \
)
--- 169,175 ----
"or __tmp_reg__,%1" "\n\t" \
"out %0,__tmp_reg__" \
: /* no outputs */ \
! : "I" ((uint8_t)(port-__SFR_OFFSET)), \
"r" ((uint8_t)(val)) \
: "r0" \
)
***************
*** 217,223 ****
"sbis %1,%2" "\n\t" \
"inc %0" \
: "=r" (__t) \
! : "I" ((uint8_t)(port)), \
"I" ((uint8_t)(bit)) \
); \
__t; \
--- 221,227 ----
"sbis %1,%2" "\n\t" \
"inc %0" \
: "=r" (__t) \
! : "I" ((uint8_t)(port-__SFR_OFFSET)), \
"I" ((uint8_t)(bit)) \
); \
__t; \
***************
*** 230,236 ****
"sbic %1,%2" "\n\t" \
"inc %0" \
: "=r" (__t) \
! : "I" ((uint8_t)(port)), \
"I" ((uint8_t)(bit)) \
); \
__t; \
--- 234,240 ----
"sbic %1,%2" "\n\t" \
"inc %0" \
: "=r" (__t) \
! : "I" ((uint8_t)(port-__SFR_OFFSET)), \
"I" ((uint8_t)(bit)) \
); \
__t; \
***************
*** 243,249 ****
"L_%=: " "sbis %0,%1" "\n\t" \
"rjmp L_%=" \
: /* no outputs */ \
! : "I" ((uint8_t)(port)), \
"I" ((uint8_t)(bit)) \
)

--- 247,253 ----
"L_%=: " "sbis %0,%1" "\n\t" \
"rjmp L_%=" \
: /* no outputs */ \
! : "I" ((uint8_t)(port-__SFR_OFFSET)), \
"I" ((uint8_t)(bit)) \
)

***************
*** 252,258 ****
"L_%=: " "sbic %0,%1" "\n\t" \
"rjmp L_%=" \
: /* no outputs */ \
! : "I" ((uint8_t)(port)), \
"I" ((uint8_t)(bit)) \
)

--- 256,262 ----
"L_%=: " "sbic %0,%1" "\n\t" \
"rjmp L_%=" \
: /* no outputs */ \
! : "I" ((uint8_t)(port-__SFR_OFFSET)), \
"I" ((uint8_t)(bit)) \
)

diff -rc3P avr-libc-20011029/include/iotn11.h avr-libc-20011029-patch-0.2/include/iotn11.h
*** avr-libc-20011029/include/iotn11.h Sun Oct 29 04:26:19 2000
--- avr-libc-20011029-patch-0.2/include/iotn11.h Mon Nov 19 14:59:44 2001
***************
*** 83,95 ****

/* Interrupt vectors (byte addresses) */

! #define RESET_vect (0x00)
! #define INT0_vect (0x02)
! #define PIN_vect (0x04)
! #define TIMER0_OVF_vect (0x06)
! #define ANA_COMP_vect (0x08)

! #define INT_VECT_SIZE (0x0A)

/* Bit numbers */

--- 83,95 ----

/* Interrupt vectors (byte addresses) */

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_PIN _vector_2
! #define SIG_OVERFLOW0 _vector_3
! #define SIG_COMPARATOR _vector_4

! #define END_VECTOR (5)
! #define INT_VECT_SIZE (0x0a)

/* Bit numbers */

diff -rc3P avr-libc-20011029/include/iotn12.h avr-libc-20011029-patch-0.2/include/iotn12.h
*** avr-libc-20011029/include/iotn12.h Sun Oct 29 04:26:41 2000
--- avr-libc-20011029-patch-0.2/include/iotn12.h Mon Nov 19 14:59:55 2001
***************
*** 96,109 ****

/* Interrupt vectors (byte addresses) */

! #define RESET_vect (0x00)
! #define INT0_vect (0x02)
! #define PIN_vect (0x04)
! #define TIMER0_OVF_vect (0x06)
! #define EE_RDY_vect (0x08)
! #define ANA_COMP_vect (0x0A)

! #define INT_VECT_SIZE (0x0C)

/* Bit numbers */

--- 96,109 ----

/* Interrupt vectors (byte addresses) */

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_PIN _vector_2
! #define SIG_OVERFLOW0 _vector_3
! #define SIG_EEPROM_READY _vector_4
! #define SIG_COMPARATOR _vector_5

! #define END_VECTOR (5)
! #define INT_VECT_SIZE (0x0c)

/* Bit numbers */

diff -rc3P avr-libc-20011029/include/iotn15.h avr-libc-20011029-patch-0.2/include/iotn15.h
*** avr-libc-20011029/include/iotn15.h Sun Apr 1 01:56:44 2001
--- avr-libc-20011029-patch-0.2/include/iotn15.h Mon Nov 19 15:00:08 2001
***************
*** 106,122 ****
#define SREG 0x3F

/* Interrupt vectors (byte addresses) */
- /* Warning: different order (ADC is before EE_RDY in other devices) */
- #define RESET_vect (0x00)
- #define INT0_vect (0x02)
- #define PIN_vect (0x04)
- #define TIMER1_COMPA_vect (0x06)
- #define TIMER1_OVF_vect (0x08)
- #define TIMER0_OVF_vect (0x0A)
- #define EE_RDY_vect (0x0C)
- #define ANA_COMP_vect (0x0E)
- #define ADC_vect (0x10)

#define INT_VECT_SIZE (0x12)

/* Bit numbers */
--- 106,122 ----
#define SREG 0x3F

/* Interrupt vectors (byte addresses) */

+ #define SIG_INTERRUPT0 _vector_1
+ #define SIG_PIN _vector_2
+ #define SIG_OUTPUT_COMPARE1A _vector_3
+ #define SIG_OVERFLOW1 _vector_4
+ #define SIG_OVERFLOW0 _vector_5
+ #define SIG_EEPROM_READY _vector_6
+ #define SIG_COMPARATOR _vector_7
+ #define SIG_ADC _vector_8
+
+ #define END_VECTOR (9)
#define INT_VECT_SIZE (0x12)

/* Bit numbers */
diff -rc3P avr-libc-20011029/include/iotn22.h avr-libc-20011029-patch-0.2/include/iotn22.h
*** avr-libc-20011029/include/iotn22.h Wed Jul 19 20:53:48 2000
--- avr-libc-20011029-patch-0.2/include/iotn22.h Mon Nov 19 15:00:29 2001
***************
*** 69,78 ****

/* NB! vectors are specified as byte addresses */

! #define RESET_vect (0x00)
! #define INT0_vect (0x02)
! #define TIMER0_OVF_vect (0x04)

#define INT_VECT_SIZE (0x06)

/*
--- 69,78 ----

/* NB! vectors are specified as byte addresses */

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_OVERFLOW0 _vector_2

+ #define END_VECTOR (2)
#define INT_VECT_SIZE (0x06)

/*
diff -rc3P avr-libc-20011029/include/iotn28.h avr-libc-20011029-patch-0.2/include/iotn28.h
*** avr-libc-20011029/include/iotn28.h Sun Oct 29 04:27:21 2000
--- avr-libc-20011029-patch-0.2/include/iotn28.h Mon Nov 19 15:00:47 2001
***************
*** 64,77 ****

/* Interrupt vectors (byte addresses) */

! #define RESET_vect (0x00)
! #define INT0_vect (0x02)
! #define INT1_vect (0x04)
! #define PIN_vect (0x06)
! #define TIMER0_OVF_vect (0x08)
! #define ANA_COMP_vect (0x0A)

! #define INT_VECT_SIZE (0x0C)

/* Bit numbers */

--- 64,77 ----

/* Interrupt vectors (byte addresses) */

! #define SIG_INTERRUPT0 _vector_1
! #define SIG_INTERRUPT1 _vector_2
! #define SIG_PIN _vector_3
! #define SIG_OVERFLOW0 _vector_4
! #define SIG_COMPARATOR _vector_5

! #define END_VECTOR (5)
! #define INT_VECT_SIZE (0x0c)

/* Bit numbers */

diff -rc3P avr-libc-20011029/include/math.h avr-libc-20011029-patch-0.2/include/math.h
*** avr-libc-20011029/include/math.h Mon Aug 20 23:24:30 2001
--- avr-libc-20011029-patch-0.2/include/math.h Wed Nov 7 17:37:59 2001
***************
*** 19,24 ****
--- 19,28 ----
#define __ATTR_CONST__ __attribute__((__const__))
#endif

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
extern double cos(double) __ATTR_CONST__;
extern double fabs(double) __ATTR_CONST__;
#if 0
***************
*** 56,60 ****
--- 60,68 ----
extern double square(double) __ATTR_CONST__;
extern double inverse(double) __ATTR_CONST__;

+ #ifdef __cplusplus
+ }
+ #endif
+
#endif /* _MATH_H */

diff -rc3P avr-libc-20011029/include/pgmspace.h avr-libc-20011029-patch-0.2/include/pgmspace.h
*** avr-libc-20011029/include/pgmspace.h Sun Jul 1 23:52:36 2001
--- avr-libc-20011029-patch-0.2/include/pgmspace.h Wed Nov 7 17:39:46 2001
***************
*** 44,49 ****
--- 44,53 ----

#define PROGMEM __ATTR_PROGMEM__

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
typedef void prog_void PROGMEM;
typedef char prog_char PROGMEM;
typedef unsigned char prog_uchar PROGMEM;
***************
*** 110,114 ****
--- 114,122 ----
extern PGM_P strerror_P(int);
#endif

+ #ifdef __cplusplus
+ }
+ #endif
+
#endif /* __PGMSPACE_H_ */

diff -rc3P avr-libc-20011029/include/sig-avr.h avr-libc-20011029-patch-0.2/include/sig-avr.h
*** avr-libc-20011029/include/sig-avr.h Wed May 3 22:13:09 2000
--- avr-libc-20011029-patch-0.2/include/sig-avr.h Fri Nov 16 16:43:25 2001
***************
*** 3,92 ****
#ifndef _SIG_AVR_H_
#define _SIG_AVR_H_

! /* External Interrupt0 Function name */
! #define SIG_INTERRUPT0 _interrupt0_
!
! /* External Interrupt1 Function name */
! #define SIG_INTERRUPT1 _interrupt1_
!
! /* External Interrupt2 Function name (ATmega) */
! #define SIG_INTERRUPT2 _interrupt2_
!
! /* External Interrupt3 Function name (ATmega[16]03)*/
! #define SIG_INTERRUPT3 _interrupt3_
!
! /* External Interrupt4 Function name (ATmega[16]03) */
! #define SIG_INTERRUPT4 _interrupt4_
!
! /* External Interrupt5 Function name (ATmega[16]03) */
! #define SIG_INTERRUPT5 _interrupt5_
!
! /* External Interrupt6 Function name (ATmega[16]03) */
! #define SIG_INTERRUPT6 _interrupt6_
!
! /* External Interrupt7 Function name (ATmega[16]03) */
! #define SIG_INTERRUPT7 _interrupt7_
!
! /* Output Compare2 Interrupt Function name */
! #define SIG_OUTPUT_COMPARE2 _output_compare2_
!
! /* Overflow2 Interrupt Function name */
! #define SIG_OVERFLOW2 _overflow2_
!
! /* Input Capture1 Interrupt Function name */
! #define SIG_INPUT_CAPTURE1 _input_capture1_
!
! /* Output Compare1(A) Interrupt Function name */
! #define SIG_OUTPUT_COMPARE1A _output_compare1a_
!
! /* Output Compare1B Interrupt Function name */
! #define SIG_OUTPUT_COMPARE1B _output_compare1b_
!
! /* Overflow1 Interrupt Function name */
! #define SIG_OVERFLOW1 _overflow1_
!
! /* Output Compare0 Interrupt Function name */
! #define SIG_OUTPUT_COMPARE0 _output_compare0_
!
! /* Overflow0 Interrupt Function name */
! #define SIG_OVERFLOW0 _overflow0_
!
! /* SPI Interrupt Function name */
! #define SIG_SPI _spi_
!
! /* UART(0) Receive Complete Interrupt Function name */
! #define SIG_UART_RECV _uart_recv_
!
! /* UART1 Receive Complete Interrupt Function name (ATmega161) */
! #define SIG_UART1_RECV _uart1_recv_
!
! /* UART(0) Data Register Empty Interrupt Function name */
! #define SIG_UART_DATA _uart_data_
!
! /* UART1 Data Register Empty Interrupt Function name (ATmega161) */
! #define SIG_UART1_DATA _uart1_data_
!
! /* UART(0) Transmit Complete Interrupt Function name */
! #define SIG_UART_TRANS _uart_trans_
!
! /* UART1 Transmit Complete Interrupt Function name (ATmega161) */
! #define SIG_UART1_TRANS _uart1_trans_
!
! /* ADC Conversion complete */
! #define SIG_ADC _adc_
!
! /* Eeprom ready */
! #define SIG_EEPROM _eeprom_ready_
!
! /* Analog Comparator Interrupt Function name */
! #define SIG_COMPARATOR _comparator_
!
#define SIGNAL(signame) \
void signame (void) __attribute__ ((signal)); \
void signame (void)

#define INTERRUPT(signame) \
void signame (void) __attribute__ ((interrupt)); \
void signame (void)

#endif /* _SIG_AVR_H_ */
--- 3,28 ----
#ifndef _SIG_AVR_H_
#define _SIG_AVR_H_

! #ifdef __cplusplus
! #define SIGNAL(signame) \
! extern "C" void signame(void); \
! void signame (void) __attribute__ ((signal)); \
! void signame (void)
! #else
#define SIGNAL(signame) \
void signame (void) __attribute__ ((signal)); \
void signame (void)
+ #endif

+ #ifdef __cplusplus
+ #define INTERRUPT(signame) \
+ extern "C" void signame(void); \
+ void signame (void) __attribute__ ((interrupt)); \
+ void signame (void)
+ #else
#define INTERRUPT(signame) \
void signame (void) __attribute__ ((interrupt)); \
void signame (void)
+ #endif

#endif /* _SIG_AVR_H_ */
diff -rc3P avr-libc-20011029/include/stdlib.h avr-libc-20011029-patch-0.2/include/stdlib.h
*** avr-libc-20011029/include/stdlib.h Sun Jul 8 04:51:27 2001
--- avr-libc-20011029-patch-0.2/include/stdlib.h Wed Nov 7 17:36:18 2001
***************
*** 10,15 ****
--- 10,19 ----
#define __ptr_t void *
#endif

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
typedef struct {
int quot;
int rem;
***************
*** 112,115 ****
--- 116,123 ----
extern void srand(unsigned int);
#endif

+ #ifdef __cplusplus
+ }
+ #endif
+
#endif /* _STDLIB_H_ */
diff -rc3P avr-libc-20011029/include/string-avr.h avr-libc-20011029-patch-0.2/include/string-avr.h
*** avr-libc-20011029/include/string-avr.h Sat Apr 1 23:07:05 2000
--- avr-libc-20011029-patch-0.2/include/string-avr.h Wed Nov 7 17:45:51 2001
***************
*** 36,41 ****
--- 36,45 ----
#define __const const
#define __string_h_int__ char

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
/* Copy N bytes of SRC to DEST. */
extern inline __ptr_t memcpy(__ptr_t __to, const void *__from, size_t __n)
{
***************
*** 361,366 ****
--- 365,374 ----
return __end ? __end - __string : __maxlen;
}

+ #ifdef __cplusplus
+ }
+ #endif
+
#endif /* string-avr.h */

diff -rc3P avr-libc-20011029/include/string.h avr-libc-20011029-patch-0.2/include/string.h
*** avr-libc-20011029/include/string.h Sun Jul 1 23:18:11 2001
--- avr-libc-20011029-patch-0.2/include/string.h Wed Nov 7 17:35:44 2001
***************
*** 26,31 ****
--- 26,35 ----
#define __ATTR_PURE__ __attribute__((__pure__))
#endif

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
extern void *memccpy(void *, const void *, int, size_t);
extern void *memchr(const void *, int, size_t) __ATTR_PURE__;
extern int memcmp(const void *, const void *, size_t) __ATTR_PURE__;
***************
*** 49,53 ****
--- 53,61 ----
extern char *strstr(const char *, const char *) __ATTR_PURE__;
extern char *strupr(char *);

+ #ifdef __cplusplus
+ }
+ #endif
+
#endif /* _STRING_H_ */

diff -rc3P avr-libc-20011029/include/timer.h avr-libc-20011029-patch-0.2/include/timer.h
*** avr-libc-20011029/include/timer.h Sat Apr 1 23:07:05 2000
--- avr-libc-20011029-patch-0.2/include/timer.h Wed Nov 7 17:44:33 2001
***************
*** 3,8 ****
--- 3,12 ----

#include <io.h>

+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
enum {
STOP = 0,
CK = 1,
***************
*** 29,32 ****
--- 33,40 ----
outb (0x1, TCNT0);
}

+ #ifdef __cplusplus
+ }
+ #endif
+
#endif /* _TIMER_H_ */
diff -rc3P avr-libc-20011029/src/Makefile avr-libc-20011029-patch-0.2/src/Makefile
*** avr-libc-20011029/src/Makefile Tue Oct 30 02:11:25 2001
--- avr-libc-20011029-patch-0.2/src/Makefile Fri Nov 16 16:54:02 2001
***************
*** 92,98 ****

crt_avr4_mega = crtm83.o # crtm85.o

! crt_avr5_mega = crtm161.o crtm163.o crtm32.o

crt_avr5_other = crtat94k.o

--- 92,98 ----

crt_avr4_mega = crtm83.o # crtm85.o

! crt_avr5_mega = crtm161.o crtm163.o crtm32.o crtm128.o

crt_avr5_other = crtat94k.o

diff -rc3P avr-libc-20011029/src/gcrt1.S avr-libc-20011029-patch-0.2/src/gcrt1.S
*** avr-libc-20011029/src/gcrt1.S Sun Oct 29 05:43:32 2000
--- avr-libc-20011029-patch-0.2/src/gcrt1.S Tue Nov 20 12:40:11 2001
***************
*** 36,43 ****
.extern __bss_end

; Stack init in main() (can override with avr-ld --defsym __stack=...)
! .weak __stack
! __stack = RAMEND

; These too can be set with the avr-ld --defsym name=value option
; (MCUCR must be set up correctly to enable external SRAM).
--- 36,44 ----
.extern __bss_end

; Stack init in main() (can override with avr-ld --defsym __stack=...)
! ; .weak __stack
! ;__stack = RAMEND
! .extern __stack

; These too can be set with the avr-ld --defsym name=value option
; (MCUCR must be set up correctly to enable external SRAM).
***************
*** 55,70 ****
; after reset, without any initialization at all. When done,
; it should jump to _real_init_.
.weak _U(_init_)
!
! .macro VEC name def
! .if . - .__start_of_init__ - \def
! .err
! .endif
! .weak _U(\name)
! #if !defined (__AVR_ASM_ONLY__)
! .set _U(\name), _unexpected_1_
! #endif
! XJMP _U(\name)
.endm

; reset and interrupt vectors, starting at absolute address 0
--- 56,74 ----
; after reset, without any initialization at all. When done,
; it should jump to _real_init_.
.weak _U(_init_)
! ;
! ; Vector table macros
! ;
! .set no_vect, 0
! .macro VEC name
! .if (END_VECTOR > no_vect)
! .weak _U(\name)
! #if !defined (__AVR_ASM_ONLY__)
! .set _U(\name), _unexpected_1_
! #endif
! XJMP _U(\name)
! .endif
! .set no_vect, no_vect + 1
.endm

; reset and interrupt vectors, starting at absolute address 0
***************
*** 73,216 ****
.func .__start_of_init__
.__start_of_init__:
XJMP _U(_init_)
! /* some devices have interrupt vectors in different order */
! #if defined (__AVR_AT94K__)
! /* many more interrupt vectors (some in different order) than other devices */
! VEC _fpga_int0_, FPGA_INT0_vect
! VEC _interrupt0_, INT0_vect
! VEC _fpga_int1_, FPGA_INT1_vect
! VEC _interrupt1_, INT1_vect
! VEC _fpga_int2_, FPGA_INT2_vect
! VEC _interrupt2_, INT2_vect
! VEC _fpga_int3_, FPGA_INT3_vect
! VEC _interrupt3_, INT3_vect
! VEC _output_compare2_, TIMER2_COMP_vect
! VEC _overflow2_, TIMER2_OVF_vect
! VEC _input_capture1_, TIMER1_CAPT_vect
! VEC _output_compare1a_, TIMER1_COMPA_vect
! VEC _output_compare1b_, TIMER1_COMPB_vect
! VEC _overflow1_, TIMER1_OVF_vect
! VEC _output_compare0_, TIMER0_COMP_vect
! VEC _overflow0_, TIMER0_OVF_vect
! VEC _fpga_int4_, FPGA_INT4_vect
! VEC _fpga_int5_, FPGA_INT5_vect
! VEC _fpga_int6_, FPGA_INT6_vect
! VEC _fpga_int7_, FPGA_INT7_vect
! VEC _uart_recv_, UART_RX_vect
! VEC _uart_data_, UART_UDRE_vect
! VEC _uart_trans_, UART_TX_vect
! VEC _fpga_int8_, FPGA_INT8_vect
! VEC _fpga_int9_, FPGA_INT9_vect
! VEC _fpga_int10_, FPGA_INT10_vect
! VEC _fpga_int11_, FPGA_INT11_vect
! VEC _uart1_recv_, UART1_RX_vect
! VEC _uart1_data_, UART1_UDRE_vect
! VEC _uart1_trans_, UART1_TX_vect
! VEC _fpga_int12_, FPGA_INT12_vect
! VEC _fpga_int13_, FPGA_INT13_vect
! VEC _fpga_int14_, FPGA_INT14_vect
! VEC _fpga_int15_, FPGA_INT15_vect
! VEC _twi_, TWI_INT_vect
! #elif defined (__AVR_ATtiny15__)
! VEC _interrupt0_, INT0_vect
! VEC _pin_change_, PIN_vect
! VEC _output_compare1a_, TIMER1_COMPA_vect
! VEC _overflow1_, TIMER1_OVF_vect
! VEC _overflow0_, TIMER0_OVF_vect
! VEC _eeprom_ready_, EE_RDY_vect
! VEC _comparator_, ANA_COMP_vect
! VEC _adc_, ADC_vect /* below _eeprom_ready_ in other devices */
! #else /* most other devices (not AT94K, not ATtiny15) */
! #ifdef INT0_vect
! VEC _interrupt0_, INT0_vect
! #endif
! #ifdef INT1_vect
! VEC _interrupt1_, INT1_vect
! #endif
! #ifdef INT2_vect
! VEC _interrupt2_, INT2_vect
! #endif
! #ifdef INT3_vect
! VEC _interrupt3_, INT3_vect
! #endif
! #ifdef INT4_vect
! VEC _interrupt4_, INT4_vect
! #endif
! #ifdef INT5_vect
! VEC _interrupt5_, INT5_vect
! #endif
! #ifdef INT6_vect
! VEC _interrupt6_, INT6_vect
! #endif
! #ifdef INT7_vect
! VEC _interrupt7_, INT7_vect
! #endif
! #ifdef PIN_vect
! VEC _pin_change_, PIN_vect
! #endif
! #ifdef TIMER2_COMP_vect
! VEC _output_compare2_, TIMER2_COMP_vect
! #endif
! #ifdef TIMER2_OVF_vect
! VEC _overflow2_, TIMER2_OVF_vect
! #endif
! #ifdef TIMER1_CAPT_vect
! VEC _input_capture1_, TIMER1_CAPT_vect
! #endif
! #ifdef TIMER1_COMPA_vect
! VEC _output_compare1a_, TIMER1_COMPA_vect
! #endif
! #ifdef TIMER1_COMPB_vect
! VEC _output_compare1b_, TIMER1_COMPB_vect
! #endif
! #ifdef TIMER1_OVF_vect
! VEC _overflow1_, TIMER1_OVF_vect
! #endif
! #ifdef TIMER0_COMP_vect
! VEC _output_compare0_, TIMER0_COMP_vect
! #endif
! #ifdef TIMER0_OVF_vect
! VEC _overflow0_, TIMER0_OVF_vect
! #endif
! #ifdef SPI_STC_vect
! VEC _spi_, SPI_STC_vect
! #endif
! #ifdef UART_RX_vect
! VEC _uart_recv_, UART_RX_vect
! #endif
! #ifdef UART1_RX_vect
! VEC _uart1_recv_, UART1_RX_vect
! #endif
! #ifdef UART_UDRE_vect
! VEC _uart_data_, UART_UDRE_vect
! #endif
! #ifdef UART1_UDRE_vect
! VEC _uart1_data_, UART1_UDRE_vect
! #endif
! #ifdef UART_TX_vect
! VEC _uart_trans_, UART_TX_vect
! #endif
! #ifdef UART1_TX_vect
! VEC _uart1_trans_, UART1_TX_vect
! #endif
! #ifdef ADC_vect
! VEC _adc_, ADC_vect
! #endif
! #ifdef EE_RDY_vect
! VEC _eeprom_ready_, EE_RDY_vect
! #endif
! #ifdef ANA_COMP_vect
! VEC _comparator_, ANA_COMP_vect
! #endif
! #ifdef TWI_INT_vect
! VEC _twi_, TWI_INT_vect
! #endif
! #endif /* most other devices (not AT94K, not ATtiny15) */

/* extra check */
! .if . - .__start_of_init__ - INT_VECT_SIZE
! .err
! .endif

.endfunc

--- 77,127 ----
.func .__start_of_init__
.__start_of_init__:
XJMP _U(_init_)
!
! VEC _vector_1
! VEC _vector_2
! VEC _vector_3
! VEC _vector_4
! VEC _vector_5
! VEC _vector_6
! VEC _vector_7
! VEC _vector_8
! VEC _vector_9
! VEC _vector_10
! VEC _vector_11
! VEC _vector_12
! VEC _vector_13
! VEC _vector_14
! VEC _vector_15
! VEC _vector_16
! VEC _vector_17
! VEC _vector_18
! VEC _vector_19
! VEC _vector_20
! VEC _vector_21
! VEC _vector_22
! VEC _vector_23
! VEC _vector_24
! VEC _vector_25
! VEC _vector_26
! VEC _vector_27
! VEC _vector_28
! VEC _vector_29
! VEC _vector_30
! VEC _vector_31
! VEC _vector_32
! VEC _vector_33
! VEC _vector_34
! VEC _vector_35
! VEC _vector_36
! VEC _vector_37
! VEC _vector_38
! VEC _vector_39

/* extra check */
! ; .if . - .__start_of_init__ - INT_VECT_SIZE
! ; .err
! ; .endif

.endfunc

***************
*** 222,244 ****
#define r_tmp1 r18
#define r_tmp2 r19

.global _U(_real_init_)
_U(_real_init_):
_U(_init_):
clr __zero_reg__
! out SREG, __zero_reg__
#ifdef WDTCR
ldi r_tmp1, lo8(__init_wdtcr__)
wdr
! out WDTCR, r_tmp1
#endif
#ifdef MCUCR
ldi r_tmp1, lo8(__init_mcucr__)
! out MCUCR, r_tmp1
#endif
#ifdef EMCUCR
ldi r_tmp1, lo8(__init_emcucr__)
! out EMCUCR, r_tmp1
#endif
; XXX should we also read, save and clear MCUSR (if present) here?
; (datasheets suggest to do it as soon as possible after reset)
--- 133,164 ----
#define r_tmp1 r18
#define r_tmp2 r19

+ /*
+ * I/O instructions below (out) require an address < 0x40.
+ * If an SFR offset is being used, the register address needs to be
+ * scaled back from its DATA memory address to its I/O memory address.
+ */
+ #ifndef __SFR_OFFSET
+ #define __SFR_OFFSET 0
+ #endif /* !__SFR_OFFSET */
+
.global _U(_real_init_)
_U(_real_init_):
_U(_init_):
clr __zero_reg__
! out (SREG - __SFR_OFFSET), __zero_reg__
#ifdef WDTCR
ldi r_tmp1, lo8(__init_wdtcr__)
wdr
! out (WDTCR - __SFR_OFFSET), r_tmp1
#endif
#ifdef MCUCR
ldi r_tmp1, lo8(__init_mcucr__)
! out (MCUCR - __SFR_OFFSET), r_tmp1
#endif
#ifdef EMCUCR
ldi r_tmp1, lo8(__init_emcucr__)
! out (EMCUCR - __SFR_OFFSET), r_tmp1
#endif
; XXX should we also read, save and clear MCUSR (if present) here?
; (datasheets suggest to do it as soon as possible after reset)
***************
*** 294,297 ****

.endfunc
#endif /* if !defined (__AVR_ASM_ONLY__) */
-
--- 214,216 ----
diff -rc3P avr-libc-20011029/src/macros.inc avr-libc-20011029-patch-0.2/src/macros.inc
*** avr-libc-20011029/src/macros.inc Sun Oct 29 04:43:24 2000
--- avr-libc-20011029-patch-0.2/src/macros.inc Sun Nov 11 11:29:21 2001
***************
*** 17,22 ****
--- 17,26 ----

#include <io-avr.h>

+ #ifndef __SFR_OFFSET
+ #define __SFR_OFFSET 0
+ #endif
+
/* if not defined, assume old version with underscores */
#ifndef __USER_LABEL_PREFIX__
#define __USER_LABEL_PREFIX__ _
***************
*** 161,167 ****
.macro LPM_R0_ZPLUS_INIT hhi
#if __AVR_ENHANCED__
#if BIG_CODE
! out RAMPZ, \hhi
#endif
#endif
.endm
--- 165,171 ----
.macro LPM_R0_ZPLUS_INIT hhi
#if __AVR_ENHANCED__
#if BIG_CODE
! out (RAMPZ-__SFR_OFFSET), \hhi
#endif
#endif
.endm
***************
*** 178,184 ****
#else
#if BIG_CODE
/* ELPM without post-increment, load RAMPZ each time (ATmega103) */
! out RAMPZ, \hhi
elpm
adiw ZL, 1
adc \hhi, __zero_reg__
--- 182,188 ----
#else
#if BIG_CODE
/* ELPM without post-increment, load RAMPZ each time (ATmega103) */
! out (RAMPZ-__SFR_OFFSET), \hhi
elpm
adiw ZL, 1
adc \hhi, __zero_reg__

--------------090301000309070107070409
Content-Type: text/plain;
name="binutils-2.11.2-patch-0.1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="binutils-2.11.2-patch-0.1"

diff -rc3P binutils-2.11.2/gas/config/tc-avr.c binutils-2.11.2-patch-0.1/gas/config/tc-avr.c
*** binutils-2.11.2/gas/config/tc-avr.c Thu Jun 7 13:15:28 2001
--- binutils-2.11.2-patch-0.1/gas/config/tc-avr.c Tue Nov 6 18:58:48 2001
***************
*** 87,92 ****
--- 87,93 ----
{"atmega163", AVR_ISA_M161, bfd_mach_avr5},
{"atmega32", AVR_ISA_M161, bfd_mach_avr5},
{"at94k", AVR_ISA_94K, bfd_mach_avr5},
+ {"atmega128", AVR_ISA_M128, bfd_mach_avr5},
{NULL, 0, 0}
};

***************
*** 258,264 ****
" avr2 - AT90S2xxx, AT90S4xxx, AT90S8xxx, ATtiny22\n"
" avr3 - ATmega103, ATmega603\n"
" avr4 - ATmega83, ATmega85\n"
! " avr5 - ATmega161, ATmega163, ATmega32, AT94K\n"
" or immediate microcontroller name.\n"));
fprintf (stream,
_(" -mall-opcodes accept all AVR opcodes, even if not supported by MCU\n"
--- 259,265 ----
" avr2 - AT90S2xxx, AT90S4xxx, AT90S8xxx, ATtiny22\n"
" avr3 - ATmega103, ATmega603\n"
" avr4 - ATmega83, ATmega85\n"
! " avr5 - ATmega161, ATmega163, ATmega32, AT94K, ATmega128\n"
" or immediate microcontroller name.\n"));
fprintf (stream,
_(" -mall-opcodes accept all AVR opcodes, even if not supported by MCU\n"
diff -rc3P binutils-2.11.2/include/opcode/avr.h binutils-2.11.2-patch-0.1/include/opcode/avr.h
*** binutils-2.11.2/include/opcode/avr.h Mon Aug 7 00:09:14 2000
--- binutils-2.11.2-patch-0.1/include/opcode/avr.h Wed Nov 7 12:26:47 2001
***************
*** 34,39 ****
--- 34,40 ----
#define AVR_ISA_M83 (AVR_ISA_2xxx | AVR_ISA_MUL | AVR_ISA_LPMX | AVR_ISA_SPM)
#define AVR_ISA_M603 (AVR_ISA_2xxx | AVR_ISA_MEGA)
#define AVR_ISA_M103 (AVR_ISA_M603 | AVR_ISA_ELPM)
+ #define AVR_ISA_M128 (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_LPMX | AVR_ISA_ELPMX )
#define AVR_ISA_M161 (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_LPMX | AVR_ISA_SPM)
#define AVR_ISA_94K (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_LPMX)

diff -rc3P binutils-2.11.2/ld/Makefile.am binutils-2.11.2-patch-0.1/ld/Makefile.am
*** binutils-2.11.2/ld/Makefile.am Mon Jun 11 20:05:07 2001
--- binutils-2.11.2-patch-0.1/ld/Makefile.am Wed Nov 7 13:43:15 2001
***************
*** 119,124 ****
--- 119,125 ----
eavr44x4.o \
eavr85xx.o \
eavrmega103.o \
+ eavrmega128.o \
eavrmega161.o \
eavrmega603.o \
ecoff_sparc.o \
***************
*** 380,385 ****
--- 381,390 ----
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avrmega103 "$(tdir_avr85xx)"
+ eavrmega128.c: $(srcdir)/emulparams/avrmega128.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avrmega128 "$(tdir_avr85xx)"
eavrmega161.c: $(srcdir)/emulparams/avrmega161.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
${GEN_DEPENDS}
diff -rc3P binutils-2.11.2/ld/Makefile.in binutils-2.11.2-patch-0.1/ld/Makefile.in
*** binutils-2.11.2/ld/Makefile.in Mon Jun 11 20:05:07 2001
--- binutils-2.11.2-patch-0.1/ld/Makefile.in Wed Nov 7 13:43:48 2001
***************
*** 227,232 ****
--- 227,233 ----
eavr44x4.o \
eavr85xx.o \
eavrmega103.o \
+ eavrmega128.o \
eavrmega161.o \
eavrmega603.o \
ecoff_sparc.o \
***************
*** 1094,1099 ****
--- 1095,1104 ----
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avrmega103 "$(tdir_avr85xx)"
+ eavrmega128.c: $(srcdir)/emulparams/avrmega128.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avrmega128 "$(tdir_avr85xx)"
eavrmega161.c: $(srcdir)/emulparams/avrmega161.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
${GEN_DEPENDS}
diff -rc3P binutils-2.11.2/ld/configure.tgt binutils-2.11.2-patch-0.1/ld/configure.tgt
*** binutils-2.11.2/ld/configure.tgt Mon Jun 11 20:05:08 2001
--- binutils-2.11.2-patch-0.1/ld/configure.tgt Wed Nov 7 13:44:17 2001
***************
*** 22,28 ****
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
arc-*-elf*) targ_emul=arcelf ;;
avr-*-*) targ_emul=avr85xx
! targ_extra_emuls="avr1200 avr23xx avr44x4 avr4433 avrmega603 avrmega103 avrmega161" ;;
cris-*-*aout*) targ_emul=crisaout
targ_extra_emuls="criself crislinux"
targ_extra_libpath=$targ_extra_emuls ;;
--- 22,28 ----
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
arc-*-elf*) targ_emul=arcelf ;;
avr-*-*) targ_emul=avr85xx
! targ_extra_emuls="avr1200 avr23xx avr44x4 avr4433 avrmega603 avrmega103 avrmega128 avrmega161" ;;
cris-*-*aout*) targ_emul=crisaout
targ_extra_emuls="criself crislinux"
targ_extra_libpath=$targ_extra_emuls ;;
diff -rc3P binutils-2.11.2/ld/emulparams/avr1200.sh binutils-2.11.2-patch-0.1/ld/emulparams/avr1200.sh
*** binutils-2.11.2/ld/emulparams/avr1200.sh Sun May 28 01:36:58 2000
--- binutils-2.11.2-patch-0.1/ld/emulparams/avr1200.sh Sun Nov 11 08:57:42 2001
***************
*** 7,12 ****
--- 7,13 ----
TEMPLATE_NAME=generic

TEXT_LENGTH=1K
+ DATA_START=0x60
DATA_LENGTH=0
EEPROM_LENGTH=64
STACK=0
diff -rc3P binutils-2.11.2/ld/emulparams/avr23xx.sh binutils-2.11.2-patch-0.1/ld/emulparams/avr23xx.sh
*** binutils-2.11.2/ld/emulparams/avr23xx.sh Sun May 28 01:36:58 2000
--- binutils-2.11.2-patch-0.1/ld/emulparams/avr23xx.sh Sun Nov 11 08:57:51 2001
***************
*** 7,12 ****
--- 7,13 ----
TEMPLATE_NAME=generic

TEXT_LENGTH=2K
+ DATA_START=0x60
DATA_LENGTH=128
EEPROM_LENGTH=128
STACK=0x0DF
diff -rc3P binutils-2.11.2/ld/emulparams/avr4433.sh binutils-2.11.2-patch-0.1/ld/emulparams/avr4433.sh
*** binutils-2.11.2/ld/emulparams/avr4433.sh Sun May 28 01:36:58 2000
--- binutils-2.11.2-patch-0.1/ld/emulparams/avr4433.sh Sun Nov 11 08:58:00 2001
***************
*** 7,12 ****
--- 7,13 ----
TEMPLATE_NAME=generic

TEXT_LENGTH=4K
+ DATA_START=0x60
DATA_LENGTH=128
EEPROM_LENGTH=256
STACK=0x0DF
diff -rc3P binutils-2.11.2/ld/emulparams/avr44x4.sh binutils-2.11.2-patch-0.1/ld/emulparams/avr44x4.sh
*** binutils-2.11.2/ld/emulparams/avr44x4.sh Sun May 28 01:36:58 2000
--- binutils-2.11.2-patch-0.1/ld/emulparams/avr44x4.sh Sun Nov 11 08:58:10 2001
***************
*** 7,12 ****
--- 7,13 ----
TEMPLATE_NAME=generic

TEXT_LENGTH=4K
+ DATA_START=0x60
DATA_LENGTH=256
EEPROM_LENGTH=256
STACK=0x15F
diff -rc3P binutils-2.11.2/ld/emulparams/avr85xx.sh binutils-2.11.2-patch-0.1/ld/emulparams/avr85xx.sh
*** binutils-2.11.2/ld/emulparams/avr85xx.sh Sun May 28 01:36:58 2000
--- binutils-2.11.2-patch-0.1/ld/emulparams/avr85xx.sh Sun Nov 11 08:58:16 2001
***************
*** 7,12 ****
--- 7,13 ----
TEMPLATE_NAME=generic

TEXT_LENGTH=8K
+ DATA_START=0x60
DATA_LENGTH=512
EEPROM_LENGTH=512
STACK=0x25F
diff -rc3P binutils-2.11.2/ld/emulparams/avrmega103.sh binutils-2.11.2-patch-0.1/ld/emulparams/avrmega103.sh
*** binutils-2.11.2/ld/emulparams/avrmega103.sh Sun May 28 01:36:58 2000
--- binutils-2.11.2-patch-0.1/ld/emulparams/avrmega103.sh Sun Nov 11 08:58:24 2001
***************
*** 7,12 ****
--- 7,13 ----
TEMPLATE_NAME=generic

TEXT_LENGTH=128K
+ DATA_START=0x60
DATA_LENGTH=4000
EEPROM_LENGTH=4K
STACK=0x0FFF
diff -rc3P binutils-2.11.2/ld/emulparams/avrmega128.sh binutils-2.11.2-patch-0.1/ld/emulparams/avrmega128.sh
*** binutils-2.11.2/ld/emulparams/avrmega128.sh Thu Jan 1 10:00:00 1970
--- binutils-2.11.2-patch-0.1/ld/emulparams/avrmega128.sh Sun Nov 11 09:00:44 2001
***************
*** 0 ****
--- 1,13 ----
+ ARCH=avr:5
+ MACHINE=
+ SCRIPT_NAME=elf32avr
+ OUTPUT_FORMAT="elf32-avr"
+ MAXPAGESIZE=1
+ EMBEDDED=yes
+ TEMPLATE_NAME=generic
+
+ TEXT_LENGTH=128K
+ DATA_START=0x100
+ DATA_LENGTH=4096
+ EEPROM_LENGTH=4K
+ STACK=0x10FF
diff -rc3P binutils-2.11.2/ld/emulparams/avrmega161.sh binutils-2.11.2-patch-0.1/ld/emulparams/avrmega161.sh
*** binutils-2.11.2/ld/emulparams/avrmega161.sh Tue Jun 27 11:45:30 2000
--- binutils-2.11.2-patch-0.1/ld/emulparams/avrmega161.sh Sun Nov 11 09:00:50 2001
***************
*** 7,12 ****
--- 7,13 ----
TEMPLATE_NAME=generic

TEXT_LENGTH=16K
+ DATA_START=0x60
DATA_LENGTH=1K
EEPROM_LENGTH=512
STACK=0x45F
diff -rc3P binutils-2.11.2/ld/emulparams/avrmega603.sh binutils-2.11.2-patch-0.1/ld/emulparams/avrmega603.sh
*** binutils-2.11.2/ld/emulparams/avrmega603.sh Sun May 28 01:36:58 2000
--- binutils-2.11.2-patch-0.1/ld/emulparams/avrmega603.sh Sun Nov 11 09:01:01 2001
***************
*** 7,12 ****
--- 7,13 ----
TEMPLATE_NAME=generic

TEXT_LENGTH=64K
+ DATA_START=0x60
DATA_LENGTH=4000
EEPROM_LENGTH=2K
STACK=0x0FFF
diff -rc3P binutils-2.11.2/ld/scripttempl/elf32avr.sc binutils-2.11.2-patch-0.1/ld/scripttempl/elf32avr.sc
*** binutils-2.11.2/ld/scripttempl/elf32avr.sc Tue Nov 14 09:26:38 2000
--- binutils-2.11.2-patch-0.1/ld/scripttempl/elf32avr.sc Sun Nov 11 09:55:07 2001
***************
*** 5,11 ****
MEMORY
{
text (rx) : ORIGIN = 0, LENGTH = $TEXT_LENGTH
! data (rw!x) : ORIGIN = 0x800060, LENGTH = $DATA_LENGTH
eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = $EEPROM_LENGTH
}

--- 5,11 ----
MEMORY
{
text (rx) : ORIGIN = 0, LENGTH = $TEXT_LENGTH
! data (rw!x) : ORIGIN = (0x800000 + $DATA_START), LENGTH = $DATA_LENGTH
eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = $EEPROM_LENGTH
}

***************
*** 101,106 ****
--- 101,107 ----
*(.bss)
*(COMMON)
${RELOCATING+ PROVIDE (__bss_end = .) ; }
+ ${RELOCATING+ PROVIDE (end = .);}
${RELOCATING+ _end = . ; }
} ${RELOCATING+ > data}

--------------090301000309070107070409
Content-Type: text/plain;
name="gcc-3.0.2-patch-0.1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="gcc-3.0.2-patch-0.1"

diff -rc3P gcc-3.0.2/gcc/ChangeLog gcc-3.0.2-patch-0.1/gcc/ChangeLog
*** gcc-3.0.2/gcc/ChangeLog Wed Oct 24 03:19:18 2001
--- gcc-3.0.2-patch-0.1/gcc/ChangeLog Wed Nov 7 14:57:55 2001
***************
*** 1,3 ****
--- 1,9 ----
+ 2001-11-07 Peter Jansen <[email-masked]>
+
+ * gcc/config/avr/avr.c - added mega128 to list of avr5 types
+ * gcc/config/avr/avr/h - Ditto
+
+
2001-10-23 Release Manager

* GCC 3.0.2 Released.
diff -rc3P gcc-3.0.2/gcc/config/avr/avr.c gcc-3.0.2-patch-0.1/gcc/config/avr/avr.c
*** gcc-3.0.2/gcc/config/avr/avr.c Thu Jun 28 07:35:37 2001
--- gcc-3.0.2-patch-0.1/gcc/config/avr/avr.c Tue Nov 6 18:35:24 2001
***************
*** 153,158 ****
--- 153,159 ----
{ "atmega163", AVR5 },
{ "atmega32", AVR5 },
{ "at94k", AVR5 },
+ { "atmega128", AVR5 },
/* Assembler only. */
{ "avr1", AVR1 },
{ "at90s1200", AVR1 },
***************
*** 1164,1170 ****
/* Choose mode for jump insn:
1 - relative jump in range -63 <= x <= 62 ;
2 - relative jump in range -2046 <= x <= 2045 ;
! 3 - absolute jump (only for ATmega[16]03). */

int
avr_jump_mode (x, insn)
--- 1165,1171 ----
/* Choose mode for jump insn:
1 - relative jump in range -63 <= x <= 62 ;
2 - relative jump in range -2046 <= x <= 2045 ;
! 3 - absolute jump (only for ATmega1[6][03][28]). */

int
avr_jump_mode (x, insn)
diff -rc3P gcc-3.0.2/gcc/config/avr/avr.h gcc-3.0.2-patch-0.1/gcc/config/avr/avr.h
*** gcc-3.0.2/gcc/config/avr/avr.h Tue Apr 17 04:25:42 2001
--- gcc-3.0.2-patch-0.1/gcc/config/avr/avr.h Tue Nov 6 17:59:26 2001
***************
*** 2973,2978 ****
--- 2973,2979 ----
%{mmcu=avr3:%(cpp_avr3)} \
%{mmcu=atmega603:%(cpp_avr3) -D__AVR_ATmega603__} \
%{mmcu=atmega103:%(cpp_avr3) -D__AVR_ATmega103__} \
+ %{mmcu=atmega128:%(cpp_avr5) -D__AVR_ATmega128__} \
%{mmcu=avr4:%(cpp_avr4)} \
%{mmcu=atmega83: %(cpp_avr4) -D__AVR_ATmega83__} \
%{mmcu=atmega85: %(cpp_avr4) -D__AVR_ATmega85__} \
***************
*** 3051,3056 ****
--- 3052,3058 ----
%{!mmcu*:-m avr85xx} \
%{mmcu=atmega603:-m avrmega603} \
%{mmcu=atmega103:-m avrmega103} \
+ %{mmcu=atmega128:-m avrmega128} \
%{mmcu=atmega161:-m avrmega161} \
%{mmcu=atmega163:-m avrmega161} \
%{mmcu=atmega32:-m avr5} \
***************
*** 3130,3135 ****
--- 3132,3138 ----
%{mmcu=at90c8534:crtc8534.o%s} \
%{mmcu=at90s8535:crts8535.o%s} \
%{mmcu=atmega103|mmcu=avr3:crtm103.o%s} \
+ %{mmcu=atmega128|mmcu=avr5:crtm128.o%s} \
%{mmcu=atmega603:crtm603.o%s} \
%{mmcu=atmega83|mmcu=avr4:crtm83.o%s} \
%{mmcu=atmega85:crtm85.o%s} \
diff -rc3P gcc-3.0.2/gcc/config/avr/t-avr gcc-3.0.2-patch-0.1/gcc/config/avr/t-avr
*** gcc-3.0.2/gcc/config/avr/t-avr Sun Jan 21 03:49:01 2001
--- gcc-3.0.2-patch-0.1/gcc/config/avr/t-avr Tue Nov 6 18:02:33 2001
***************
*** 49,55 ****
mmcu?avr3=mmcu?atmega103 mmcu?avr3=mmcu?atmega603 \
mmcu?avr4=mmcu?atmega83 mmcu?avr4=mmcu?atmega85 \
mmcu?avr5=mmcu?atmega161 mmcu?avr5=mmcu?atmega163 \
! mmcu?avr5=mmcu?atmega32 mmcu?avr5=mmcu?at94k

MULTILIB_EXCEPTIONS =

--- 49,56 ----
mmcu?avr3=mmcu?atmega103 mmcu?avr3=mmcu?atmega603 \
mmcu?avr4=mmcu?atmega83 mmcu?avr4=mmcu?atmega85 \
mmcu?avr5=mmcu?atmega161 mmcu?avr5=mmcu?atmega163 \
! mmcu?avr5=mmcu?atmega32 mmcu?avr5=mmcu?at94k \
! mmcu?avr5=mmcu?atmega128

MULTILIB_EXCEPTIONS =

--------------090301000309070107070409--

From [email-masked] Tue Dec 04 22:05:25 2001
Received: from atusks01.alcatel.at ([212.183.9.130] helo=mail-u.alcatel.at)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16BBW0-0004AO-00
for <[email-masked]>; Tue, 04 Dec 2001 22:05:24 +1300
Received: from alcatel.at (atusel33.aut.alcatel.at [146.112.129.215])
by mail-u.alcatel.at (8.9.3/8.9.3/1.21 01/27/01 21:43:09) with ESMTP id KAA02030;
Tue, 4 Dec 2001 10:09:08 +0100 (MET)
Message-ID: <[email-masked]>
Date: Tue, 04 Dec 2001 10:09:08 +0100
From: Christoph Plattner <[email-masked]>
Organization: AAA
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.8 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
To: ken restivo <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] The "Temporary Buffer"
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello !

I don't know anything about the architecture of the write
algorism and the SPM structure, but I really think, that
such a buffer is implemented as a separate area in the
chip, not colliding to any part of RAM or ROM. But this
depends on the size of it.
Dependent on the page-size (sector size), there a flash
(eeprom) chips, where the user has to write without
interruption bytes in the programming algorithm for one
sector. Perhaps the buffer has the size of such one sector ...

Sorry, that the answer is so weak here.

Bye
Christoph P.

ken restivo wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I am writing a little boot loader for an ATmega163. I have implemented a modified version of the page write routine from the data book, in assembler. So far so good.
>
> I am concerned about the mention in the databook of a "temporary buffer". The docs claim that the SPM instruction reads and writes a temporary buffer. However, a search through the docs for the text "temporary buffer" didn't turn up any description of *what* exactly this "temporary buffer" is, or where it is located.
>
> I have also read the AVR109 app note and looked through Atmel's sample bootloader source code as well, with no answers found there.
>
> This worries me. For example, I may want to load more than one page at a time of app code into RAM from my serial port, do a crc check, etc, and only then start iteratively calling the page write routine, but I don't want to stomp on anything inadvertently.
>
> Any ideas what/where this "temporary buffer" actually is so I can stay out of its way?
>
> - -ken
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iD8DBQE8DHqYe8HF+6xeOIcRAqhqAKDrYSRCxj2ep8nRwAH9XIIt4S754wCfVefy
> Hvjm3XZ/7o0LXEPONV6k7mU=
> =WIcQ
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

------------------------------------------------------------------
private: [email-masked]
company: [email-masked]

From [email-masked] Wed Dec 05 03:16:07 2001
Received: from mailout01.sul.t-online.com ([194.25.134.80] helo=mailout01.sul.t-online.de)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16BGMg-0004O7-00
for <[email-masked]>; Wed, 05 Dec 2001 03:16:07 +1300
Received: from fwd07.sul.t-online.de
by mailout01.sul.t-online.de with smtp
id 16BGQW-00072p-07; Tue, 04 Dec 2001 15:20:04 +0100
Received: from linux_bbg.hkr-lan.de (320067163664-0001@[80.128.31.50]) by fmrl07.sul.t-online.com
with esmtp id 16BGQK-13Zt8yC; Tue, 4 Dec 2001 15:19:52 +0100
Received: from zenker (Zenker.hkr-lan.de [192.168.34.22])
by linux_bbg.hkr-lan.de (8.11.2/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id fB4EJng10628
for <[email-masked]>; Tue, 4 Dec 2001 15:19:49 +0100
From: "Olaf Zenker" <[email-masked]>
To: [email-masked]
Date: Tue, 4 Dec 2001 15:19:48 +0100
MIME-Version: 1.0
Message-ID: <3C0CE994.12091.154B1DF@localhost>
Priority: normal
X-mailer: Pegasus Mail for Windows (v4.01)
Content-type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: Quoted-printable
Content-description: Mail message body
X-Sender: [email-masked]
Subject: [avr-gcc-list] avr-objcopy.exe
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

I'm using avrgcc, binutils an lib together with avr-studio 3.52. I'm writi=
ng C as well as
assemler sources (not inline). They get seperatly assemled in the makefile=
by:

$(AS) -c $(ASFLAGS) -I$(INCDIR) $< -o $@

where
AS =3D avr-gcc -x assembler-with-cpp
ASFLAGS=3D -Wa,-gstabs -mmcu=3D$(MCU)

The problem I have, is, that avrstudio shows the wrong sourcelines as soon=
as I
invoke my .asm files source. C files are referenced correctly. I'm using a=
vr-objcopy to
generate the .obj file for avr-studio. The strange thing is, that assemble=
r source files
form the lib are correctly reference. A look at the makefile for generatio=
n of the
libfiles shows no other compilerswitches than I have used. So what is goin=
g wrong or
what do I do the wrong way.

Thanks in advance
Olaf

+++ neue Adresse +++ neue Adresse +++

HKR Sensorsysteme GmbH
Frauenstr. 22 - 80469 M=FCnchen
Tel.: +49 89 242416-0
Fax: +49 89 242416-55

mail: [email-masked]
http://www.hkr-sensor.de

From [email-masked] Wed Dec 05 05:38:48 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16BIal-0004Ul-00
for <[email-masked]>; Wed, 05 Dec 2001 05:38:48 +1300
Received: from 199.182.90.175.ras04.den.iras.frii.net (199.182.90.175.ras04.den.iras.frii.net [199.182.90.175])
by deimos.frii.net (8.12.1/8.12.1) with ESMTP id fB4Ggj2d019624
for <[email-masked]>; Tue, 4 Dec 2001 09:42:46 -0700 (MST)
Date: Tue, 4 Dec 2001 09:44:57 -0700 (MST)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
cc: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] The "Temporary Buffer"
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is mostly true. It depends on whether Atmel based the flash core on
the 29xxx or the 49xxx flash devices.

For the 29xxx, to program a page, you write a special data/address
sequence and then clock in a pages worth data (and you must give all data
for the page). The data is stored in temporary data buffer the size of the
page and the entire page is written to the flash at once. If I remember
rightly, the buffer is implemented with sram. Erasing of the page in flash
is handled by internal logic when you enter programming mode via the
special sequence.

For the 49xxx, you must first erase the page, then you can write a byte at
a time. You still need to give a special sequence for each byte and the
erase.

If you need to know more, check the data sheets for the 29lv512 and the
49bv512 and compare.

As for eeprom, you write a byte, wait, write a byte, wait, etc.

The megas hide the special sequence stuff from you via the spm
instruction.

Hope this helps.

Ted Roth

On Tue, 4 Dec 2001, Christoph Plattner wrote:

:)Hello !
:)
:)I don't know anything about the architecture of the write
:)algorism and the SPM structure, but I really think, that
:)such a buffer is implemented as a separate area in the
:)chip, not colliding to any part of RAM or ROM. But this
:)depends on the size of it.
:)Dependent on the page-size (sector size), there a flash
:)(eeprom) chips, where the user has to write without
:)interruption bytes in the programming algorithm for one
:)sector. Perhaps the buffer has the size of such one sector ...
:)
:)Sorry, that the answer is so weak here.
:)
:)Bye
:)Christoph P.
:)
:)ken restivo wrote:
:)>
:)> -----BEGIN PGP SIGNED MESSAGE-----
:)> Hash: SHA1
:)>
:)> I am writing a little boot loader for an ATmega163. I have
:)> implemented a modified version of the page write routine from the data
:)> book, in assembler. So far so good.
:)>
:)> I am concerned about the mention in the databook of a "temporary
:)> buffer". The docs claim that the SPM instruction reads and writes a
:)> temporary buffer. However, a search through the docs for the text
:)> "temporary buffer" didn't turn up any description of *what* exactly
:)> this "temporary buffer" is, or where it is located.
:)>
:)> I have also read the AVR109 app note and looked through Atmel's
:)> sample bootloader source code as well, with no answers found there.
:)>
:)> This worries me. For example, I may want to load more than one page
:)> at a time of app code into RAM from my serial port, do a crc check,
:)> etc, and only then start iteratively calling the page write routine,
:)> but I don't want to stomp on anything inadvertently.
:)>
:)> Any ideas what/where this "temporary buffer" actually is so I can
:)> stay out of its way?
:)>

From [email-masked] Wed Dec 05 06:40:09 2001
Received: from cluster1.tfb.com ([204.212.132.101])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16BJY8-0004br-00
for <[email-masked]>; Wed, 05 Dec 2001 06:40:09 +1300
Received: from jaz.tfb.com (204-216-234-239.dsl.cust.tfb.com [204.216.234.239])
by cluster1.tfb.com (8.11.0/8.11.0) with ESMTP id fB4Hi6215497;
Tue, 4 Dec 2001 09:44:06 -0800
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Tue, 04 Dec 2001 09:46:26 -0800
To: "Theodore A. Roth" <[email-masked]>
From: ChristoGeo <[email-masked]>
Subject: Re: [avr-gcc-list] The "Temporary Buffer"
Cc: AVR GCC List <[email-masked]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

It is important to note that flash always is programmed in pages even if it
looks like a single byte!

At 09:44 AM 12/4/2001 -0700, Theodore A. Roth wrote:
>This is mostly true. It depends on whether Atmel based the flash core on
>the 29xxx or the 49xxx flash devices.
>
>For the 29xxx, to program a page, you write a special data/address
>sequence and then clock in a pages worth data (and you must give all data
>for the page). The data is stored in temporary data buffer the size of the
>page and the entire page is written to the flash at once. If I remember
>rightly, the buffer is implemented with sram. Erasing of the page in flash
>is handled by internal logic when you enter programming mode via the
>special sequence.
>
>For the 49xxx, you must first erase the page, then you can write a byte at
>a time. You still need to give a special sequence for each byte and the
>erase.
>
>If you need to know more, check the data sheets for the 29lv512 and the
>49bv512 and compare.
>
>As for eeprom, you write a byte, wait, write a byte, wait, etc.
>
>The megas hide the special sequence stuff from you via the spm
>instruction.
>
>Hope this helps.
>
>Ted Roth
>
>
>
>On Tue, 4 Dec 2001, Christoph Plattner wrote:
>
>:)Hello !
>:)
>:)I don't know anything about the architecture of the write
>:)algorism and the SPM structure, but I really think, that
>:)such a buffer is implemented as a separate area in the
>:)chip, not colliding to any part of RAM or ROM. But this
>:)depends on the size of it.
>:)Dependent on the page-size (sector size), there a flash
>:)(eeprom) chips, where the user has to write without
>:)interruption bytes in the programming algorithm for one
>:)sector. Perhaps the buffer has the size of such one sector ...
>:)
>:)Sorry, that the answer is so weak here.
>:)
>:)Bye
>:)Christoph P.
>:)
>:)ken restivo wrote:
>:)>
>:)> -----BEGIN PGP SIGNED MESSAGE-----
>:)> Hash: SHA1
>:)>
>:)> I am writing a little boot loader for an ATmega163. I have
>:)> implemented a modified version of the page write routine from the data
>:)> book, in assembler. So far so good.
>:)>
>:)> I am concerned about the mention in the databook of a "temporary
>:)> buffer". The docs claim that the SPM instruction reads and writes a
>:)> temporary buffer. However, a search through the docs for the text
>:)> "temporary buffer" didn't turn up any description of *what* exactly
>:)> this "temporary buffer" is, or where it is located.
>:)>
>:)> I have also read the AVR109 app note and looked through Atmel's
>:)> sample bootloader source code as well, with no answers found there.
>:)>
>:)> This worries me. For example, I may want to load more than one page
>:)> at a time of app code into RAM from my serial port, do a crc check,
>:)> etc, and only then start iteratively calling the page write routine,
>:)> but I don't want to stomp on anything inadvertently.
>:)>
>:)> Any ideas what/where this "temporary buffer" actually is so I can
>:)> stay out of its way?
>:)>
>
>
>
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Wed Dec 05 10:48:36 2001
Received: from a1as05-p84.hh.tli.de
([195.252.133.84] helo=pluto ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16BNQW-0004mp-00
for <[email-masked]>; Wed, 05 Dec 2001 10:48:34 +1300
Received: from Informatik.Uni-Oldenburg.DE ([127.0.0.1]) by pluto
with esmtp (ident beth using rfc1413) id m16BNTr-000yEEC
(Debian Smail-3.2.0.102 1998-Aug-2 #2); Tue, 4 Dec 2001 22:51:59 +0100 (CET)
Message-ID: <[email-masked]>
Date: Tue, 04 Dec 2001 22:51:57 +0100
From: Carsten Beth <[email-masked]>
Organization: C.v.Ossietzky =?iso-8859-1?Q?Universit=E4t?= Oldenburg - Fachbereich
Informatik
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.15 i586)
X-Accept-Language: German, de, English, en, en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Two interrupts with same handlers
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi there,

I have written an application with avr-gcc which uses two interrupt
sources (analog compare match and timer0 overflow). Both interrupts have
the same handler. So I wrote something like this:

#include <sig-avr.h>

void interrupt_handler( void )
{
...
}

// Timer0Overflow Interrupt Function
SIGNAL( SIG_OVERFLOW0 )
{
interrupt_handler();
}

// Analog Comparator Interrupt Function
SIGNAL( SIG_COMPARATOR )
{
interrupt_handler();
}

All is working very fine, but the compiler wastes a lot of programm
memory. He generates two interrupt vectors which point to different
functions and both functions make a lot of push and pop with a rcall
interrupt_handler in between. Actualy both function do the same thing,
so the interrupt vectors could point to the same function.

Is there any way to manipulate the code, so no or less memory is wasted?

From [email-masked] Wed Dec 05 11:34:05 2001
Received: from sttlpop3.sttl.uswest.net ([206.81.192.3])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 16BO8a-0004pX-00
for <[email-masked]>; Wed, 05 Dec 2001 11:34:05 +1300
Received: (qmail 21116 invoked by alias); 4 Dec 2001 22:38:05 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 21111 invoked by uid 0); 4 Dec 2001 22:38:05 -0000
Received: from pdslppp77.sttl.uswest.net (HELO larry) (63.224.33.77)
by sttlpop3.sttl.uswest.net with SMTP; 4 Dec 2001 22:38:05 -0000
Message-ID: <02bf01c17d14$40427680$3300000a@larry>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Two interrupts with same handlers
Date: Tue, 4 Dec 2001 14:36:06 -0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Easy: write one interrupt handler in assembly and just have it
jump to the real handler. Say your overflow handler is the real
one, then make a new file with the following:.

.func myfunc
.global _comparator_

_comparator_:
rjmp _overflow0_

.endfunc

Assemble it (no headers needed) and include it in the list of
stuff to be linked. NB the *real* handler symbolic names can be
found in "sig-avr.h"

Cheers!

----- Original Message -----
From: "Carsten Beth" <[email-masked]>

> Hi there,
>
> I have written an application with avr-gcc which uses two
interrupt
> sources (analog compare match and timer0 overflow). Both
interrupts have
> the same handler. So I wrote something like this:
...
>
> All is working very fine, but the compiler wastes a lot of
programm
> memory. He generates two interrupt vectors which point to
different
> functions and both functions make a lot of push and pop with a
rcall
> interrupt_handler in between. Actualy both function do the same
thing,
> so the interrupt vectors could point to the same function.
>
> Is there any way to manipulate the code, so no or less memory
is wasted?

From [email-masked] Wed Dec 05 16:04:31 2001
Received: from viefep15-int.chello.at ([213.46.255.19])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16BSMI-000533-00
for <[email-masked]>; Wed, 05 Dec 2001 16:04:30 +1300
Received: from gmx.at ([62.178.92.247]) by viefep15-int.chello.at
(InterMail vM.5.01.03.06 201-253-122-118-106-20010523) with ESMTP
id <[email-masked]>;
Wed, 5 Dec 2001 04:07:54 +0100
Message-ID: <[email-masked]>
Date: Wed, 05 Dec 2001 04:07:53 +0100
From: Christoph Plattner <[email-masked]>
Organization: private
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.6 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: "Theodore A. Roth" <[email-masked]>
CC: AVR GCC List <[email-masked]>, [email-masked],
[email-masked]
Subject: Re: [avr-gcc-list] The "Temporary Buffer" (back to the key qeustion)
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Back to the key question !

Ken wanted to know, where this buffer space is, and if he must be
careful
not to overwrite is. My idea was (I don't know it), that this memory is
an
additional isolated one, not beeing used for other stuff.

So try to find out that fact for Ken.

With friendly regards
Christoph P.

"Theodore A. Roth" wrote:
>
> This is mostly true. It depends on whether Atmel based the flash core on
> the 29xxx or the 49xxx flash devices.
>
> For the 29xxx, to program a page, you write a special data/address
> sequence and then clock in a pages worth data (and you must give all data
> for the page). The data is stored in temporary data buffer the size of the
> page and the entire page is written to the flash at once. If I remember
> rightly, the buffer is implemented with sram. Erasing of the page in flash
> is handled by internal logic when you enter programming mode via the
> special sequence.
>
> For the 49xxx, you must first erase the page, then you can write a byte at
> a time. You still need to give a special sequence for each byte and the
> erase.
>
> If you need to know more, check the data sheets for the 29lv512 and the
> 49bv512 and compare.
>
> As for eeprom, you write a byte, wait, write a byte, wait, etc.
>
> The megas hide the special sequence stuff from you via the spm
> instruction.
>
> Hope this helps.
>
> Ted Roth
>
> On Tue, 4 Dec 2001, Christoph Plattner wrote:
>
> :)Hello !
> :)
> :)I don't know anything about the architecture of the write
> :)algorism and the SPM structure, but I really think, that
> :)such a buffer is implemented as a separate area in the
> :)chip, not colliding to any part of RAM or ROM. But this
> :)depends on the size of it.
> :)Dependent on the page-size (sector size), there a flash
> :)(eeprom) chips, where the user has to write without
> :)interruption bytes in the programming algorithm for one
> :)sector. Perhaps the buffer has the size of such one sector ...
> :)
> :)Sorry, that the answer is so weak here.
> :)
> :)Bye
> :)Christoph P.
> :)
> :)ken restivo wrote:
> :)>
> :)> -----BEGIN PGP SIGNED MESSAGE-----
> :)> Hash: SHA1
> :)>
> :)> I am writing a little boot loader for an ATmega163. I have
> :)> implemented a modified version of the page write routine from the data
> :)> book, in assembler. So far so good.
> :)>
> :)> I am concerned about the mention in the databook of a "temporary
> :)> buffer". The docs claim that the SPM instruction reads and writes a
> :)> temporary buffer. However, a search through the docs for the text
> :)> "temporary buffer" didn't turn up any description of *what* exactly
> :)> this "temporary buffer" is, or where it is located.
> :)>
> :)> I have also read the AVR109 app note and looked through Atmel's
> :)> sample bootloader source code as well, with no answers found there.
> :)>
> :)> This worries me. For example, I may want to load more than one page
> :)> at a time of app code into RAM from my serial port, do a crc check,
> :)> etc, and only then start iteratively calling the page write routine,
> :)> but I don't want to stomp on anything inadvertently.
> :)>
> :)> Any ideas what/where this "temporary buffer" actually is so I can
> :)> stay out of its way?
> :)>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

--
-------------------------------------------------------
private: [email-masked]
company: [email-masked]

From [email-masked] Wed Dec 05 18:41:37 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16BUoI-0005AZ-00
for <[email-masked]>; Wed, 05 Dec 2001 18:41:36 +1300
Received: (from rneswold@localhost)
by DrMemory.fnal.GOV (8.11.6/8.11.6) id fB55jGU08720;
Tue, 4 Dec 2001 23:45:16 -0600 (CST)
(envelope-from rneswold)
Date: Tue, 4 Dec 2001 23:45:16 -0600
From: Rich Neswold <[email-masked]>
To: Larry Barello <[email-masked]>
Cc: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Two interrupts with same handlers
Message-ID: <[email-masked]>
Reply-To: Rich Neswold <[email-masked]>
References: <[email-masked]> <02bf01c17d14$40427680$3300000a@larry>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="VrqPEDrXMn8OVzN4"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <02bf01c17d14$40427680$3300000a@larry>; from [email-masked] on Tue, Dec 04, 2001 at 02:36:06PM -0800
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.4-RELEASE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--VrqPEDrXMn8OVzN4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Wasn't it 4-Dec-2001, at 02:36PM, when Larry Barello said:
> Easy: write one interrupt handler in assembly and just have it
> jump to the real handler. Say your overflow handler is the real
> one, then make a new file with the following:.
>=20
> .func myfunc
> .global _comparator_
>=20
> _comparator_:
> rjmp _overflow0_
>=20
> .endfunc

Or use "--defsym _overflow0_=3D_comparator_" when linking, which essentially
gives the one routine two labels. For instance, if you link with the
compiler, you could do something like this:

$ avr-gcc \
-mmcu=3Dat90s2313 \
-Wl,--defsym,_comparator_=3D_overflow0_ \
-o prog.bin \
file1.o file2.o file3.o

The "-Wl" option specifies options to pass to the linker. The "defsym"
option tells the linker to create a new symbol and set its value -- in this
case, we create a symbol "_comparator_" and set it equal to "_overflow0_".
If you use avr-objdump on the resulting "prog.bin" file, you'll see the
vector table will have two entries pointing to the same routine.

--=20
Rich Neswold

efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

--VrqPEDrXMn8OVzN4
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE8DbRrZmE+i9FKxdwRApGzAJ9eJXWmx8ncO0xfiuVsa3JjgoieDwCg9Yf1
PhIxm9YV6kaTzal0ZW1upqA=
=uZG1
-----END PGP SIGNATURE-----

--VrqPEDrXMn8OVzN4--

From [email-masked] Wed Dec 05 21:15:29 2001
Received: from fep01.tuttopmi.it ([212.131.248.100] helo=fep01-svc.flexmail.it)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16BXDE-0005I1-00
for <[email-masked]>; Wed, 05 Dec 2001 21:15:28 +1300
Received: from 192 ([217.58.81.206]) by fep01-svc.flexmail.it
(InterMail vM.5.01.03.08 201-253-122-118-108-20010628) with SMTP
id <20011205081856.EGWF11467.fep01-svc.flexmail.it@192>
for <[email-masked]>; Wed, 5 Dec 2001 09:18:56 +0100
Message-ID: <[email-masked]>
From: "Matteo" <[email-masked]>
To: <[email-masked]>
Date: Wed, 5 Dec 2001 09:16:15 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Subject: [avr-gcc-list] comunication fali
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,
I've build a Alex's direct paralell port programmer for program a
AT90S8515, but I can't connect whith it.
I use a RedHat 7.1 and uisp (latest version).
With the command:

uisp -v=3 -dlpt=0x378 -dprog=dapa --download of=file

the 1st line of the result is:

AVR Direct Parallel Access failed after 32 retries.

Someone can help me? Tanks, Matteo.

From [email-masked] Wed Dec 05 23:17:09 2001
Received: from hertz.ikp.physik.tu-darmstadt.de ([130.83.24.91])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16BZ6w-0005OI-00
for <[email-masked]>; Wed, 05 Dec 2001 23:17:07 +1300
Received: (from bon@localhost)
by hertz.ikp.physik.tu-darmstadt.de (8.11.6/8.11.2/SuSE Linux 8.11.1-0.5) id fB5AKtV26305;
Wed, 5 Dec 2001 11:20:55 +0100
X-Authentication-Warning: hertz.ikp.physik.tu-darmstadt.de: bon set sender to [email-masked] using -f
From: Uwe Bonnes <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <[email-masked]>
Date: Wed, 5 Dec 2001 11:20:55 +0100
To: "Matteo" <[email-masked]>
Cc: <[email-masked]>
Subject: Re: [avr-gcc-list] comunication fali
In-Reply-To: <[email-masked]>
References: <[email-masked]>
X-Mailer: VM 6.90 under Emacs 20.7.1
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>>>>> "Matteo" == Matteo <[email-masked]> writes:

Matteo> Hi all, I've build a Alex's direct paralell port programmer for
Matteo> program a AT90S8515, but I can't connect whith it. I use a
Matteo> RedHat 7.1 and uisp (latest version). With the command:

Matteo> uisp -v=3 -dlpt=0x378 -dprog=dapa --download of=file

Matteo> the 1st line of the result is:

Matteo> AVR Direct Parallel Access failed after 32 retries.

Matteo> Someone can help me? Tanks, Matteo.

Check with an oscilloscope that the signals are visible on the port pins and
are visible at the avr pins with the right phase and polarity.

Bye
--
Uwe Bonnes [email-masked]

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

From [email-masked] Thu Dec 06 05:43:12 2001
Received: from mx04.nexgo.de ([151.189.8.80])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16Bf8Y-0005gs-00
for <[email-masked]>; Thu, 06 Dec 2001 05:43:11 +1300
Received: from kleinertiga.local (dialin-145-254-118-008.arcor-ip.net [145.254.118.8])
by mx04.nexgo.de (Postfix) with ESMTP id 93E7D37BFD
for <[email-masked]>; Wed, 5 Dec 2001 17:41:26 +0100 (CET)
Received: from gmx.de (localhost [127.0.0.1])
by kleinertiga.local (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id fB5GeTN01060
for <[email-masked]>; Wed, 5 Dec 2001 17:40:34 +0100
X-Authentication-Warning: kleinertiga.local: Host localhost [127.0.0.1] claimed to be gmx.de
Message-ID: <[email-masked]>
Date: Wed, 05 Dec 2001 17:40:29 +0100
From: Klaus Rudolph <[email-masked]>
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] gdb5.1 & patch & simulator
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi all,

after searching through a hundred of mails searching for simulator tools
i found
the avrsim and a patch for gdb5.0.

The actuall version of gdb found on an german mirror is gdb5.1. Is also
a patch =

for that version available? What=B4s the differnce 5.0->5.1? No more patc=
h
need? :-)

There are some new tools for simulatiing and debugging available?

My current link list give me:
gdb-5.0-avr-patch-0.0.gz =

from
http://avr.jpk.co.nz/gdb-5.0-avr-patch-0.0.gz

and for simulation tools
http://www-ivs.cs.uni-magdeburg.de/bs/lehre/wise0001/es/seminare.shtml
http://www-ivs.cs.uni-magdeburg.de/bs/lehre/wise0001/es/download/avrsim.t=
ar.gz

English page can be found here:
http://wwwivs.cs.uni-magdeburg.de/~gal/avr-manual.html

From [email-masked] Thu Dec 06 06:16:05 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16BfeO-0005j3-00
for <[email-masked]>; Thu, 06 Dec 2001 06:16:04 +1300
Received: from 199.182.92.201.ras04.den.iras.frii.net (199.182.92.201.ras04.den.iras.frii.net [199.182.92.201])
by deimos.frii.net (8.12.1/8.12.1) with ESMTP id fB5HK6kU055504
for <[email-masked]>; Wed, 5 Dec 2001 10:20:07 -0700 (MST)
Date: Wed, 5 Dec 2001 10:22:16 -0700 (MST)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
cc: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] gdb5.1 & patch & simulator
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by deimos.frii.net id fB5HK6kU055504
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I've got the beginnings of a simulator here:

http://res099095.halls.colostate.edu/programs/simulavr

I'll be putting version 0.0.10 up later today so wait for that.
(There's a link there to gdb-5.0-avr-patch-0.1.)

I'm working on a patch for gdb-5.1 right now. I've been doing a lot of=20
digging in the gdb-5.0 avr patch (latest is 0.1) and have a patch to appl=
y=20
on top of that in my simulavr project's source. In my opinion, all the=20
patches out there for gdb are broken for use with any simulator. I'm=20
working on fixing this right now, but it's going to take some time.

Ted Roth

On Wed, 5 Dec 2001, Klaus Rudolph wrote:

:)Hi all,
:)
:)after searching through a hundred of mails searching for simulator tool=
s
:)i found
:)the avrsim and a patch for gdb5.0.
:)
:)The actuall version of gdb found on an german mirror is gdb5.1. Is also
:)a patch=20
:)for that version available? What=B4s the differnce 5.0->5.1? No more pa=
tch
:)need? :-)
:)
:)
:)There are some new tools for simulatiing and debugging available?
:)
:)My current link list give me:
:) gdb-5.0-avr-patch-0.0.gz=20
:)from
:) http://avr.jpk.co.nz/gdb-5.0-avr-patch-0.0.gz
:)
:)and for simulation tools
:)http://www-ivs.cs.uni-magdeburg.de/bs/lehre/wise0001/es/seminare.shtml
:)http://www-ivs.cs.uni-magdeburg.de/bs/lehre/wise0001/es/download/avrsim=
.tar.gz
:)
:)English page can be found here:
:)http://wwwivs.cs.uni-magdeburg.de/~gal/avr-manual.html
:)
:)_______________________________________________
:)avr-gcc-list mailing list
:)[email-masked]
:)http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
:)

From [email-masked] Thu Dec 06 09:53:56 2001
Received: from mx04.nexgo.de ([151.189.8.80])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16Bj3C-0005y8-00
for <[email-masked]>; Thu, 06 Dec 2001 09:53:55 +1300
Received: from kleinertiga.local (dialin-145-254-115-104.arcor-ip.net [145.254.115.104])
by mx04.nexgo.de (Postfix) with ESMTP id BA1FE37BE9
for <[email-masked]>; Wed, 5 Dec 2001 21:36:21 +0100 (CET)
Received: from gmx.de (localhost [127.0.0.1])
by kleinertiga.local (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id fB5KZOh01417
for <[email-masked]>; Wed, 5 Dec 2001 21:35:29 +0100
X-Authentication-Warning: kleinertiga.local: Host localhost [127.0.0.1] claimed to be gmx.de
Message-ID: <[email-masked]>
Date: Wed, 05 Dec 2001 21:35:24 +0100
From: Klaus Rudolph <[email-masked]>
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Subject: Re: [avr-gcc-list] gdb5.1 & patch & simulator
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Theodore,

> I've got the beginnings of a simulator here:
>
> http://res099095.halls.colostate.edu/programs/simulavr
>
> I'll be putting version 0.0.10 up later today so wait for that.
> (There's a link there to gdb-5.0-avr-patch-0.1.)
>
> I'm working on a patch for gdb-5.1 right now. I've been doing a lot of
> digging in the gdb-5.0 avr patch (latest is 0.1) and have a patch to apply
> on top of that in my simulavr project's source. In my opinion, all the
> patches out there for gdb are broken for use with any simulator. I'm
> working on fixing this right now, but it's going to take some time.

Thanks for information, can you please continue to inform us over your
simulavr
project.

Can you also send a message if the patch for 5.1 gdb is ready?

Will you also apply the peripherals in your simulator? especially for
interrupt generation?

Thanks
Klaus

From [email-masked] Thu Dec 06 18:48:48 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16BrOp-0006O7-00
for <[email-masked]>; Thu, 06 Dec 2001 18:48:48 +1300
Received: from ari-co2b-101.rasserver.net (ari-co2b-101.rasserver.net [207.92.200.229])
by deimos.frii.net (8.12.1/8.12.1) with ESMTP id fB65qpkV013976
for <[email-masked]>; Wed, 5 Dec 2001 22:52:52 -0700 (MST)
Date: Wed, 5 Dec 2001 22:55:03 -0700 (MST)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: AVR GCC List <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] simulavr-0.0.10
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Howdy Y'all,

I've just released simulavr-0.0.10.

It includes more documentation updates, some code cleanups and a
totally revamped interface to gdb which no longer uses the gdbserver
program.

Still included are the patches for gdb-5.0, although I consider them
broken. I'll be spending the next few weeks focusing on fixing the gdb
patches so hopefully we'll all be able to do some real debugging with gdb
soon.

Here's the link for those that don't have it:

http://res099095.halls.colostate.edu/programs/simulavr/

Ted Roth

From [email-masked] Fri Dec 07 05:53:26 2001
Received: from nebulus.tfb.com ([204.212.132.16])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16C1m1-0006tF-00
for <[email-masked]>; Fri, 07 Dec 2001 05:53:25 +1300
Received: from jaz.tfb.com (204-216-234-239.dsl.cust.tfb.com [204.216.234.239])
by nebulus.tfb.com (8.9.3/8.11.3) with ESMTP id IAA03109;
Thu, 6 Dec 2001 08:57:32 -0800
X-Authentication-Warning: nebulus.tfb.com: Host 204-216-234-239.dsl.cust.tfb.com [204.216.234.239] claimed to be jaz.tfb.com
Message-Id: <[email-masked]>
X-Sender: [email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Thu, 06 Dec 2001 08:17:40 -0800
To: "Theodore A. Roth" <[email-masked]>,
AVR GCC List <[email-masked]>
From: ChristoGeo <[email-masked]>
Subject: Re: [avr-gcc-list] simulavr-0.0.10
In-Reply-To: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

i cant get to this server?

At 10:55 PM 12/5/2001 -0700, Theodore A. Roth wrote:
>Howdy Y'all,
>
>I've just released simulavr-0.0.10.
>
>It includes more documentation updates, some code cleanups and a
>totally revamped interface to gdb which no longer uses the gdbserver
>program.
>
>Still included are the patches for gdb-5.0, although I consider them
>broken. I'll be spending the next few weeks focusing on fixing the gdb
>patches so hopefully we'll all be able to do some real debugging with gdb
>soon.
>
>Here's the link for those that don't have it:
>
> http://res099095.halls.colostate.edu/programs/simulavr/
>
>
>Ted Roth
>
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Fri Dec 07 15:53:13 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16CB8S-0007QW-00
for <[email-masked]>; Fri, 07 Dec 2001 15:53:12 +1300
Received: from ari-co2b-78.rasserver.net (ari-co2b-78.rasserver.net [207.92.200.206])
by deimos.frii.net (8.12.1/8.12.1) with ESMTP id fB72vMEJ007602
for <[email-masked]>; Thu, 6 Dec 2001 19:57:22 -0700 (MST)
Date: Thu, 6 Dec 2001 19:59:33 -0700 (MST)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: AVR GCC List <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] simulavr-0.0.10 bug
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi All,

I just found out that my simulavr-0.0.10 has a nice bug in the new linked
list code.

Ted Roth

Here's a patch with the fix:

Index: simulavr/src/utils.c
diff -u simulavr/src/utils.c:1.4 simulavr/src/utils.c:1.5
--- simulavr/src/utils.c:1.4 Wed Dec 5 12:26:35 2001
+++ simulavr/src/utils.c Thu Dec 6 19:17:20 2001
@@ -1,5 +1,5 @@
/*
- * $Id: utils.c,v 1.4 2001/12/05 19:26:35 troth Exp $
+ * $Id: utils.c,v 1.5 2001/12/07 02:17:20 troth Exp $
*

****************************************************************************
*
@@ -161,6 +161,7 @@
/* at the tail */
node->next = dlist_new_node( data );
node->next->prev = node;
+ break;
}

/* move on to next node */

From [email-masked] Sat Dec 08 07:14:24 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16CPVu-0008Ct-00
for <[email-masked]>; Sat, 08 Dec 2001 07:14:23 +1300
Received: (from rneswold@localhost)
by DrMemory.fnal.GOV (8.11.6/8.11.6) id fB7IITu18610
for [email-masked]; Fri, 7 Dec 2001 12:18:29 -0600 (CST)
(envelope-from rneswold)
Date: Fri, 7 Dec 2001 12:18:29 -0600
From: Rich Neswold <[email-masked]>
To: AVR Mailing List <[email-masked]>
Message-ID: <[email-masked]>
Reply-To: Rich Neswold <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="uZ3hkaAS1mZxFaxD"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.4-RELEASE
Subject: [avr-gcc-list] Updated documents...
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--uZ3hkaAS1mZxFaxD
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello,

I've finished converting the AVR document to DocBook and have updated all
the function references for avr-libc-20011007. I still need to finish the
installation instructions and to document Joerg Wunsch's demo project
(although his schematic and source code is included.) I also added an
appendix containing command line options for the assembler and compiler. A
PDF file is also available.

You can find the stuff here:

http://www.enteract.com/~rneswold/avr/

Comments, questions, improvements welcome...

--=20
Rich Neswold
=20
efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

--uZ3hkaAS1mZxFaxD
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE8EQf0ZmE+i9FKxdwRAgH/AJ44Rb1KYCWGwkdKIlENMHBuMRjB8QCffiXL
8iWAWtuhmHE4WLG7QjNssic=
=zN4j
-----END PGP SIGNATURE-----

--uZ3hkaAS1mZxFaxD--

From [email-masked] Sun Dec 09 10:15:23 2001
Received: from swan.mail.pas.earthlink.net ([207.217.120.123] helo=swan.prod.itd.earthlink.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16Cood-0002gH-00
for <[email-masked]>; Sun, 09 Dec 2001 10:15:23 +1300
Received: from 1cust118.tnt1.brownwood.tx.da.uu.net ([67.202.2.118] helo=earthlink.net)
by swan.prod.itd.earthlink.net with esmtp (Exim 3.33 #1)
id 16Cosn-00063H-00
for [email-masked]; Sat, 08 Dec 2001 13:19:41 -0800
Message-ID: <[email-masked]>
Date: Sat, 08 Dec 2001 15:19:52 -0600
From: Dale Seaburg <[email-masked]>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: avg-gcc list <[email-masked]>
Content-Type: multipart/mixed;
boundary="------------020703040205000303050308"
Subject: [avr-gcc-list] uisp-20010701 Compile problems
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.
--------------020703040205000303050308
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

I'm finally getting around to setting up my avr-gcc environment on a new
Linux box (Mandrake 8.1 - Linux 2.4.x). I downloaded Gunnar's tarball
for the libc and avr-gcc, and they appear to be working OK.

But, when I tried to compile the uisp-20010701, I get an error (see
attached log file). What might I be doing wrong? My gcc is version 2.96

Thanks,

Dale Seaburg

--------------020703040205000303050308
Content-Type: text/plain;
name="make_uisp.log"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="make_uisp.log"

g++ -Wall -O3 -g -c -o Main.o Main.C
g++ -Wall -O3 -g -c -o Terminal.o Terminal.C
Terminal.C: In method `void TTerminal::Run ()':
Terminal.C:32: `strcmp' undeclared (first use this function)
Terminal.C:32: (Each undeclared identifier is reported only once for
each function it appears in.)
make: *** [Terminal.o] Error 1

--------------020703040205000303050308--

From [email-masked] Sun Dec 09 12:24:21 2001
Received: from deimos.frii.com
([216.17.128.2] helo=deimos.frii.net ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16CqpQ-0002ny-00
for <[email-masked]>; Sun, 09 Dec 2001 12:24:21 +1300
Received: from 199.182.90.217.ras04.den.iras.frii.net (199.182.90.217.ras04.den.iras.frii.net [199.182.90.217])
by deimos.frii.net (8.12.1/8.12.1) with ESMTP id fB8NSaCg075399
for <[email-masked]>; Sat, 8 Dec 2001 16:28:37 -0700 (MST)
Date: Sat, 8 Dec 2001 16:30:48 -0700 (MST)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
cc: avg-gcc list <[email-masked]>
Subject: Re: [avr-gcc-list] uisp-20010701 Compile problems
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

You need to "#include <string.h>" in Terminal.C.

You might also want to get a newer release of the usip source.
uisp-20011025.tar.gz is the latest I've found from:

http://www.amelek.gda.pl/avr

uisp-20011025 compiles fine on my Redhat 7.2 system.

Ted Roth

On Sat, 8 Dec 2001, Dale Seaburg wrote:

:)I'm finally getting around to setting up my avr-gcc environment on a new
:)Linux box (Mandrake 8.1 - Linux 2.4.x). I downloaded Gunnar's tarball
:)for the libc and avr-gcc, and they appear to be working OK.
:)
:)But, when I tried to compile the uisp-20010701, I get an error (see
:)attached log file). What might I be doing wrong? My gcc is version 2.96
:)
:)Thanks,
:)
:)Dale Seaburg
:)

From [email-masked] Sun Dec 09 21:09:41 2001
Received: from mid-mail-01.intekom.com ([196.25.69.44] helo=mail.intekom.com)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 16Cz1o-0003EZ-00
for <[email-masked]>; Sun, 09 Dec 2001 21:09:41 +1300
Received: (qmail 24177 invoked from network); 9 Dec 2001 08:13:29 -0000
Received: from bnb53-01-p105.nt.saix.net (HELO scorpio) ([155.239.180.105]) (envelope-sender <[email-masked]>)
by intekom.com (qmail-ldap-1.03) with SMTP
for <[email-masked]>; 9 Dec 2001 08:13:29 -0000
X-vSMTP: intekom.com
From: "Anton Erasmus" <[email-masked]>
Organization: Home
To: [email-masked]
Date: Sun, 9 Dec 2001 10:22:45 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Message-ID: <3C133B75.3346.5D53A@localhost>
Priority: normal
X-mailer: Pegasus Mail for Win32 (v3.12c)
Subject: [avr-gcc-list] avr-gcc binaries for Windows with ATMega128 Support ?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

Is there somewhere I can download avr-gcc binaries for windows
that has the patches for ATMega128 support already applied ?

Alternatively where can I get instructions on how to download the
CVS source, apply the patches and compile avr-gcc under Cygwin
?

Regards
Anton

From [email-masked] Mon Dec 10 13:49:09 2001
Received: from [203.24.179.147] (helo=smartcontainer.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 16DEd3-000456-00
for <[email-masked]>; Mon, 10 Dec 2001 13:49:09 +1300
Received: (qmail 3979 invoked by uid 8); 10 Dec 2001 00:53:22 -0000
Received: from pc-00075 (20.20.20.75, claiming to be "smartcontainer.net")
by smarty.smartcontainer.net with SMTP id smtpdxixjDZ; Sun, 09 Dec 2001 19:53:20 EST
Message-ID: <[email-masked]>
Date: Mon, 10 Dec 2001 11:53:07 +1100
From: Scott Finneran <[email-masked]>
Organization: Smart Container
X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.7-10 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: "[email-masked]" <[email-masked]>
Subject: Re: [avr-gcc-list] avr-gcc binaries for Windows with ATMega128 Support ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Anton

Unfortunately not at this time. As you may have seen in the list
archives, some of the patches have been included in the CVS tree for
binutils and GCC, some have not. We are expecting the next official
releases of these to include 128 support.

Cheers,

Scott

Anton Erasmus wrote:
>
> Hi,
>
> Is there somewhere I can download avr-gcc binaries for windows
> that has the patches for ATMega128 support already applied ?
>
> Alternatively where can I get instructions on how to download the
> CVS source, apply the patches and compile avr-gcc under Cygwin
> ?
>
> Regards
> Anton
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Tue Dec 11 00:55:46 2001
Received: from mail3.alphalink.com.au ([202.161.124.59])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16DP29-0004ZQ-00
for <[email-masked]>; Tue, 11 Dec 2001 00:55:45 +1300
Received: from research (d08-ps0-mel.alphalink.com.au [202.161.104.8])
by mail3.alphalink.com.au (8.11.4/8.9.3) with SMTP id fBAC00U18965;
Mon, 10 Dec 2001 23:00:01 +1100
From: "Ron Kreymborg" <[email-masked]>
To: "Scott Finneran" <[email-masked]>, <[email-masked]>
Subject: RE: [avr-gcc-list] avr-gcc binaries for Windows with ATMega128 Support ?
Date: Mon, 10 Dec 2001 23:00:35 +1100
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Importance: Normal
In-Reply-To: <[email-masked]>
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

G'Day Group

Can someone confirm that the latest avrgcc supports the ATmega16? I haven't
downloaded it yet and have a customer wanting to use that chip.

Thanks
Ron

-------------------------------------------
Ron Kreymborg
Jennaron Research
Melbourne, Australia

> -----Original Message-----
> From: [email-masked]
> [mailto:[email-masked]]On Behalf Of Scott Finneran
> Sent: Monday, 10 December 2001 11:53 AM
> To: [email-masked]
> Subject: Re: [avr-gcc-list] avr-gcc binaries for Windows with ATMega128
> Support ?
>
>
>
> Hi Anton
>
> Unfortunately not at this time. As you may have seen in the list
> archives, some of the patches have been included in the CVS tree for
> binutils and GCC, some have not. We are expecting the next official
> releases of these to include 128 support.
>
> Cheers,
>
> Scott
>
> Anton Erasmus wrote:
> >
> > Hi,
> >
> > Is there somewhere I can download avr-gcc binaries for windows
> > that has the patches for ATMega128 support already applied ?
> >
> > Alternatively where can I get instructions on how to download the
> > CVS source, apply the patches and compile avr-gcc under Cygwin
> > ?
> >
> > Regards
> > Anton
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > [email-masked]
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Tue Dec 11 07:04:55 2001
Received: from mid-mail-02.intekom.com ([196.25.69.45] helo=mail.intekom.com)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 16DUnO-0004tc-00
for <[email-masked]>; Tue, 11 Dec 2001 07:04:55 +1300
Received: (qmail 16290 invoked from network); 10 Dec 2001 18:08:46 -0000
Received: from bnb53-01-p137.nt.saix.net (HELO scorpio) ([155.239.180.137]) (envelope-sender <[email-masked]>)
by intekom.com (qmail-ldap-1.03) with SMTP
for <[email-masked]>; 10 Dec 2001 18:08:46 -0000
X-vSMTP: intekom.com
From: "Anton Erasmus" <[email-masked]>
Organization: Home
To: [email-masked],
[email-masked]
Date: Mon, 10 Dec 2001 20:18:39 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: Re: [avr-gcc-list] avr-gcc binaries for Windows with ATMega128 Support ?
Message-ID: <3C15189F.4854.A7765@localhost>
Priority: normal
In-reply-to: <[email-masked]>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

When is the next official release due ?

Cheers
Anton

>
> Hi Anton
>
> Unfortunately not at this time. As you may have seen in the list
> archives, some of the patches have been included in the CVS tree for
> binutils and GCC, some have not. We are expecting the next official
> releases of these to include 128 support.
>
> Cheers,
>
> Scott
>
> Anton Erasmus wrote:
> >
> > Hi,
> >
> > Is there somewhere I can download avr-gcc binaries for windows
> > that has the patches for ATMega128 support already applied ?
> >
> > Alternatively where can I get instructions on how to download the
> > CVS source, apply the patches and compile avr-gcc under Cygwin ?
> >
> > Regards
> > Anton
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > [email-masked]
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Tue Dec 11 09:21:33 2001
Received: from verden.pvv.ntnu.no ([129.241.210.224])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 16DWvc-00050Q-00
for <[email-masked]>; Tue, 11 Dec 2001 09:21:32 +1300
Received: (qmail 23355 invoked by uid 21029); 10 Dec 2001 20:25:56 -0000
To: [email-masked]
References: <017301c17c96$bc222ee0$0307a8c0@sony>
From: Tor Ringstad <[email-masked]>
Date: 10 Dec 2001 21:25:56 +0100
In-Reply-To: "Ross Wakelin"'s message of "Tue, 4 Dec 2001 20:38:57 +1300"
Message-ID: <[email-masked]>
Lines: 14
X-Mailer: Gnus v5.7/Emacs 20.7
Subject: [avr-gcc-list] Re: debugging with GDB and STK500
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Ross Wakelin" <[email-masked]> writes:

> I have seen people talking about using a small monitor program
> loaded in the STK200, and GDB to do real in circuit debugging.
>
> Has this technology been extended to the STK500, now that the
> 200/300 is no longer available.

I did port Denis Chertykov's monitor system to the STK200; it's
available as "avrmon-stk200". It's not ported to STK500, though. At
least not yet.

- Tor Ringstad -

From [email-masked] Tue Dec 11 12:02:13 2001
Received: from mail.ripnet.com ([206.47.98.3])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16DZR6-00057t-00
for <[email-masked]>; Tue, 11 Dec 2001 12:02:12 +1300
Received: from A1-P054.RipNET.com ([email-masked] [207.236.51.55])
by mail.ripnet.com (8.12.0.Beta12/8.11.1) with ESMTP id fBAN6YV7005499
for <[email-masked]>; Mon, 10 Dec 2001 18:06:35 -0500
Date: Mon, 10 Dec 2001 18:07:59 -0500 (EST)
From: RogerB <[email-masked]>
X-X-Sender: [email-masked]
To: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] uisp programming problem
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi. I'm using uisp ver1.0b in the parallel mode and I
seem to be getting a strange error. If I burn a small file
(into a at90S2313) everything is ok but if it's larger than
150 or so bytes memory location 0 and 1 alway end up zero.
I'm getting good signals to the chip, checked them
with a scope and they all looked good. The power supply is
regulated (5V)and the chips have bypass caps so there's
no noise.
I added more delay but that didn't seem to do
anything. So here's what I've been doing
/opt/avrgcc/bin/uisp -dapa -v=3 --upload whatever.hex
or I add the -dno-poll if that doesn't work
/opt/avrgcc/bin/uisp -dapa -v=3 --verify whatever.hex
and I get back from the verify command
Number of delay loops per 100 millisecond: 89687
port access granted, dropping permissions...
AVR Direct Parallel Access succeeded after 0 retries.
Vendor Code: 1e
Part Family: 91
Part Number: 1
Atmel AVR AT90S2313 is found.
Page Mode Enabled: No
FLASH Write Delay (t_wd_flash): 17444 us
EEPROM Write Delay (t_wd_eeprom): 8722 us
Verifing: flash
#flash error at address 0: file=ab, mem=0
flash error at address 1: file=c0, mem=0
############################
(total 898 bytes transfered in 0.54 s min/avg/max = 1366/1673/1730
bytes/s)

Any help would be welcomed

From [email-masked] Tue Dec 11 13:18:31 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16Dacx-0005C3-00
for <[email-masked]>; Tue, 11 Dec 2001 13:18:31 +1300
Received: from cel1.jpk.co.nz (adsl-179.world-net.co.nz [210.55.228.179])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id fBB0Msm29376;
Tue, 11 Dec 2001 13:22:54 +1300
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Tue, 11 Dec 2001 13:23:06 +1300
To: RogerB <[email-masked]>, AVR GCC List <[email-masked]>
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] uisp programming problem
In-Reply-To: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Check http://www.amelek.gda.pl/avr/uisp/ for the latest uisp version.

Jason Kyle

At 12:07 11/12/2001, RogerB wrote:
> Hi. I'm using uisp ver1.0b in the parallel mode and I
>seem to be getting a strange error. If I burn a small file

From [email-masked] Tue Dec 11 13:46:55 2001
Received: from mail.ripnet.com ([206.47.98.3])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16Db4Q-0005Dr-00
for <[email-masked]>; Tue, 11 Dec 2001 13:46:54 +1300
Received: from linux ([email-masked] [206.47.207.216])
by mail.ripnet.com (8.12.0.Beta12/8.11.1) with SMTP id fBB0pKV6000819
for <[email-masked]>; Mon, 10 Dec 2001 19:51:20 -0500
Date: Mon, 10 Dec 2001 19:52:45 -0500
From: rogerb <[email-masked]>
To: avr-gcc-list <[email-masked]>
Subject: Fw: Re: [avr-gcc-list] uisp programming problem
Message-Id: <[email-masked]>
Organization: none
X-Mailer: Sylpheed version 0.6.5 (GTK+ 1.2.8; i586-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Begin forwarded message:

Date: Tue, 11 Dec 2001 13:23:06 +1300
From: Jason Kyle <[email-masked]>
To: RogerB <[email-masked]>, AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] uisp programming problem

I tried a new one but it segment faulted do I need to
patch the kernel with them or can I just build uisp.

Check http://www.amelek.gda.pl/avr/uisp/ for the latest uisp version.

Jason Kyle

At 12:07 11/12/2001, RogerB wrote:
> Hi. I'm using uisp ver1.0b in the parallel mode and I
>seem to be getting a strange error. If I burn a small file

From [email-masked] Wed Dec 12 18:19:24 2001
Received: from sys32.hou.wt.net ([205.230.159.32])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16E1nf-0006Xb-00
for <[email-masked]>; Wed, 12 Dec 2001 18:19:23 +1300
Received: from mjones700 (216-119-128-116.ipset8.wt.net [216.119.128.116])
by sys32.hou.wt.net (8.9.1/8.9.1) with SMTP id XAA15540
for <[email-masked]>; Tue, 11 Dec 2001 23:23:50 -0600 (CST)
Message-ID: <000c01c182cd$7aeacf80$0100c0a8@mjones700>
From: "Mike Jones" <[email-masked]>
To: "AVR GCC mail list" <[email-masked]>
References: <[email-masked]>
Date: Tue, 11 Dec 2001 23:25:37 -0600
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] Needed: 4-bit LCD source
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I have finally gotten an LCD attached to my Dev board and I would like to
use it with GCC. Has anyone written a 4-bit (Hitachi controller) interface
routine for GCC that they would like to share? I have one in Assembly but
would rather not tackle interfacing an Assembly routine to GCC just yet.

Mike

From [email-masked] Wed Dec 12 23:25:22 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16E6Zl-0006lc-00
for <[email-masked]>; Wed, 12 Dec 2001 23:25:21 +1300
Received: (from j@localhost)
by ida.interface-business.de id fBCATlU48616;
Wed, 12 Dec 2001 11:29:47 +0100 (MET)
Date: Wed, 12 Dec 2001 11:29:47 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <000c01c182cd$7aeacf80$0100c0a8@mjones700>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] Needed: 4-bit LCD source
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

[Your References header is referencing an unrelated article, this
sorts your mail into an unrelated thread. Btw., your message-id is
also wrong (no domain name).]

"Mike Jones" <[email-masked]> wrote:

> I have finally gotten an LCD attached to my Dev board and I would
> like to use it with GCC. Has anyone written a 4-bit (Hitachi
> controller) interface routine for GCC that they would like to share?

I've finally put my test file under

http://www.ifbus.de/~j/hd44780drv.c

It's really only a simple test, but should contain all functions that
are needed. It assumes an fully-connected HD44780 where the busy flag
can be polled.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Fri Dec 14 00:52:36 2001
Received: from 1200.avrfreaks.net ([195.139.52.229])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16EUPj-0007yP-00
for <[email-masked]>; Fri, 14 Dec 2001 00:52:35 +1300
Received: from ostattin (gw.atmel.no [195.139.52.210])
by 1200.avrfreaks.net (8.11.1/8.11.0) with SMTP id fBDBuYb47644
for <[email-masked]>; Thu, 13 Dec 2001 12:56:41 +0100 (CET)
(envelope-from [email-masked])
Message-ID: <[email-masked]>
From: "webmaster" <[email-masked]>
To: <[email-masked]>
References: <3C15189F.4854.A7765@localhost>
Subject: Re: [avr-gcc-list] avr-gcc binaries for Windows with ATMega128 Support ?
Date: Thu, 13 Dec 2001 12:59:53 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I spoke to Peter Jansen and have a feeling it will be ready in short time.

Eivind

----- Original Message -----
From: "Anton Erasmus" <[email-masked]>
To: <[email-masked]>; <[email-masked]>
Sent: Monday, December 10, 2001 7:18 PM
Subject: Re: [avr-gcc-list] avr-gcc binaries for Windows with ATMega128
Support ?

> Hi,
>
> When is the next official release due ?
>
> Cheers
> Anton
>
> >
> > Hi Anton
> >
> > Unfortunately not at this time. As you may have seen in the list
> > archives, some of the patches have been included in the CVS tree for
> > binutils and GCC, some have not. We are expecting the next official
> > releases of these to include 128 support.
> >
> > Cheers,
> >
> > Scott
> >
> > Anton Erasmus wrote:
> > >
> > > Hi,
> > >
> > > Is there somewhere I can download avr-gcc binaries for windows
> > > that has the patches for ATMega128 support already applied ?
> > >
> > > Alternatively where can I get instructions on how to download the
> > > CVS source, apply the patches and compile avr-gcc under Cygwin ?
> > >
> > > Regards
> > > Anton
> > >
> > > _______________________________________________
> > > avr-gcc-list mailing list
> > > [email-masked]
> > > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > [email-masked]
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
> >
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Fri Dec 14 12:26:15 2001
Received: from a1as17-p10.hh.tli.de
([195.252.139.10] helo=pluto ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16EfEw-00006W-00
for <[email-masked]>; Fri, 14 Dec 2001 12:26:12 +1300
Received: from Informatik.Uni-Oldenburg.DE ([127.0.0.1]) by pluto
with esmtp (ident beth using rfc1413) id m16EfFs-000yEDC
(Debian Smail-3.2.0.102 1998-Aug-2 #2); Fri, 14 Dec 2001 00:27:08 +0100 (CET)
Message-ID: <[email-masked]>
Date: Thu, 13 Dec 2001 15:01:47 +0100
From: Carsten Beth <[email-masked]>
Organization: C.v.Ossietzky =?iso-8859-1?Q?Universit=E4t?= Oldenburg - Fachbereich
Informatik
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.15 i586)
X-Accept-Language: German, de, English, en, en
MIME-Version: 1.0
To: [email-masked]
Subject: Re: [avr-gcc-list] Needed: 4-bit LCD source
References: <[email-masked]> <000c01c182cd$7aeacf80$0100c0a8@mjones700>
Content-Type: multipart/mixed;
boundary="------------32236114FE194ACAABA54FEE"
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.
--------------32236114FE194ACAABA54FEE
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi Mike,

you can share my code.

Carsten

Mike Jones wrote:

> I have finally gotten an LCD attached to my Dev board and I would like to
> use it with GCC. Has anyone written a 4-bit (Hitachi controller) interface
> routine for GCC that they would like to share? I have one in Assembly but
> would rather not tackle interfacing an Assembly routine to GCC just yet.
>
> Mike

--------------32236114FE194ACAABA54FEE
Content-Type: application/x-gtar;
name="display.tgz"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="display.tgz"

H4sIAOuzGDwAA+1Z62/byBHPV/OvmPrSs4TqQerpiyKjkeQ0Rs9JYPsuKFBAoKiVtQhFsuTS
tnK+/tn93N/ukhRlSX4c6qTXcgDay533zuzscDXlUeDay/qLZwTTbDW67Tb+m1a3beb/p/DC
7LbMjtW0ug3QWZbVab2g9nMalUIcCTskejFhYn4f3UP43ylMk/gn/2vOM+gwLdPstFo74m9Z
7W4ni3/DBJ3V6HYbL8h8Bls24P88/vU6Ad7EYu6HrzAa2mEkmEcDuEul5K0m3/584s38cGEL
/rn2k8erH9wp8yZxeFkbHZcNLWdkCyalEF3MYxoxh6wmWa1XbeuV+QMNjy+ogYAbxnfcc9x4
yug192vzo9X7fpqH830DMh8BUvPb2HME971I8tC1zUVEsJVaZq3bpjgyrnw+VfMtM45KZeMX
gyg+JN4zMABliTj16e14+PEnqpNlNtqdVg9zR2TiX7VKZUM65flBqdwzfr2jBul9V8/7G0xC
ldTynrYpVNADUul4n+nYsKZpmt32FmPumBMxMdJrh6E3jUjMGcVBwELy+GTiMvJndIAA2Qck
fIVN11qbvRLwznZnyvKh74nQdytyLDlXjohFoFxxXC5NIDkBm7kXlD5+OLsYlel7+udorMbj
0zfnf+0RbDxj9pQCPxQ0ItubUsiglGzXTU2hgHtRDeL8WASlVD/dSvEVUtKo3FPOQ9xHSBpB
69BfLCDO2DBjkDNjsM2MwaPMUK7nbBikNqzMGECrJANPxNSSyNGEl7TRFRqNj8eDk4scZ8J9
DtXMs2WAZC7ZglxmR4JabZO0ETrMdA9ATINuJCHNZFIivi06ffclY5aReowxZ2oljpU5tV2J
9bgkui+B7qZaRqZpeg+SvH4NBxXdalOnGyHwo2EcRlhLyNDbwNHvsPjgox9xWSoOEoMzamVv
itVmQtjQdp3YRVVTcuwpUiWia47aiFHAHHFXKBGHtekEHfXpMNmv2VyfStm4SodlpJZ545jS
m2z+to+5Q1OnUW5NzcqKJvPYccM0Qu6/ImcuaMpcJhhCNfRjTxxkee36jq0KJc1CfyF5k+UJ
mSfSZQoSBbWMfW6rnJowcu3wEhUFXB6ZyRKu1CcxB8/WksfVXgV2SzXLO2lV4HzDhIN7sFAN
+3RAB2lCzv3r96qkffCyzMTclpKXennws+3G7ICwaltydlOeckTxJI7o8fcyKuZMeSTDrGeP
6IfECf3+J0XV7RlrE83NYMLPREcv59pgKTYce9D+NaYN67d6mBh/lO6ke4i0fcZ3UzbjHkP5
+Mvxxfjs+JRKv+zt/d3Yi7knDseCxmPRUxPjsR0txmNMXPnYPdxleClJzN7+wr+iP5qVsNHY
VxOvaL8f7lMJzGU5gagnMoQe0a/lbHFG7Atf2G4u3lPmqJmQBbKOe0IluDzs7gs8UBd4D5nM
eX7FKPLdOGUUc44NkvQUxCPvQNAVC5fEZjPucOio1XJrn9iEVW821pYdUThjC+5NWahiD6Wf
GHmMTZUxMDd2RXICgQxpq5TLg8B1/WvuXZLmgtwJl7v6ikdqY577dI19K48svQYaATcdJgVq
tsvQDhJN2gq1HwgrX4P38DEIbfjoqNbA8bESLFEI3Jxfzt0lphcBwhdCR4DqL32nLLEB/WRY
pxLcL1uqjKVey0MxzZU7m+YP2BPp1s+vYZZwuzIyk50kJaw98VCvbJd/0aFXnV9VLpiPUqDm
JFX/QUizYuFPYxSPwL9mYYSCgn6CDpVAYFiNFBHXSkl+Pog4kLxoGkQY606U7JDJ81KsM1f0
4SGD4krxMDYOZXAjKaB0PefOXLF6Puqx73k4Yti0LAPEbKByKghFeerL3HTAEKmcfjMTujor
uWKNHqqV9AgWOHOmd0/iqmwYpI1SRrZoFX04JD3YZCkPlMwr6Acmwv4RcvvoDkYdRkvHBWHJ
8+UphAqGXArZP2IeIu3xEXXNcHR4SxnVqIy1PPXR7ET80uPYW7anTACLUjLj+PyoJNsB7Hyx
YFOO0xiJOVkmjVKON5Gb7E0ZoTRtsgP9E/oFstqLKOkdskbdaptJ2sk+6JzO6p9oNOji6eBp
42nhaeJp4LHwmMjd0lp0y8n2kZj8Y+nHqztrj5rpr0W6Ig+InETa0grhcDEr6kTRhTv1qlWz
Nt1qWV/fq9/ugjJ6IzK/Jw++RRDMXS7crYK73WiYm+20Vvh6EEdLeuval6gznkzWiTxQbLmZ
UWmZPi0DHy3A0b0eKodaj3NoHSWn3uK5SZ5Nt0Bs1a0OTWOx1BWoQm/7M5SuCrjlgdC+sSyU
S+i2Rchv4HMyfZibvdtsp4tz+GD4tvuSPpvu5LGU9nr+bFZJm3A1nrjc+yyHOwwzHzTsqXbJ
Z4hnQBl6ZR5OhGFfL2dqJaYGyZQyVvYsGrfL5Nl/dC1Tu0/wnOdsPlm3Ez0nSz9YQzQ2SIuT
vs4Al81EwnSeMEVzPhNpr1jBtKbEiaYxu1zrKNekpNxXpdpYci7/mWR1dPvyrW//Nu9/n+OO
8/77X7PZ6Kzuf5sdef/bxGxx//s14Fvd/87Qw89odHL+8cc3fxu/W31bZjPGEy6Ah2hFBRrA
aPWRqq9PWzrFsguuFp3Ov6g9+ib5dkruAeWNH63a7ziS3epy/aNx9f07MtX9mYZWHmHlEO08
opFDdPKIZg7RNdaVyCtLjRn8XFrpLa9r3KCyNqkam1SNTarmJlUzocqRra5TqZSz8zZnzW1O
521Ocnlz7UdPXPuz89yCmTnEcW4eS7zOctevREp5jX9FlFAdb3d+tHI+FX27ElB+UupeLIMp
c1xb9zLMMwyxDJjcHLEnP22wFs5cVqj4sJehiNZQUQ6VceHrGasbW50tbBoX5XEZn+vjDJd3
GVv4NC6SuKf4eGo7oZ/bm+pSGlK3XxPtA72/Coz6iWE3MdA5YnX5vpsY6Dyxy5g0ZBexRO+r
aP6mn6LWf3Qi9YpTf9dvRD3jCb/D9B553d6795a7d98Fbu9Rt6O9R9xB9u6/K+ttfq5niyVv
HZk35TNZvFdnw7c+Nf93IO3/Tu3P2BQuew4dD/R/ZqvdyPq/TqMjf//vNMyi//sasHDi5MTr
ky1+MKMGenCDe042W4+jsC5/OHLr9lVYT36prxsun+yiAapuzFz7MkrwL0vyslBEZaqe4AUy
MPoRI1BitIAV/Zcl/MXLhwZVP8mb7eqnCB/ljqgGoS98eRZFZAyHtLL3KqxeOg5qRNom+K+y
jsHJRnNj72VpOIRoh6qXUKosK0stlao9dxdRPyV1I5ETUPWzF98oak4BBRRQQAEFFFBAAQUU
UEABBRRQQAEFFFBAAQUUUEABBRRQQAEFFFBAAQUUUEABBRRQQAH/BfBvpp1B9QBQAAA=
--------------32236114FE194ACAABA54FEE--

From [email-masked] Sat Dec 15 02:00:55 2001
Received: from merkur.hrz.tu-freiberg.de ([139.20.64.28])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16ErxO-0000hf-00
for <[email-masked]>; Sat, 15 Dec 2001 02:00:54 +1300
Received: from there (cobain.exphys.tu-freiberg.de [139.20.13.66])
by merkur.hrz.tu-freiberg.de (8.11.6/8.11.6) with SMTP id fBED73r11946
for <[email-masked]>; Fri, 14 Dec 2001 14:07:03 +0100 (CET)
(envelope-from [email-masked])
Message-Id: <[email-masked]>
Content-Type: text/plain;
charset="iso-8859-15"
From: Torsten Hahn <[email-masked]>
To: "AVR GCC List" <[email-masked]>
Date: Fri, 14 Dec 2001 14:18:47 +0100
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by merkur.hrz.tu-freiberg.de id fBED73r11946
Subject: [avr-gcc-list] Interrupt Handling
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

can i write my own function with all the things that an interrupt handler=
=20
makes (save the SREG etc.) ?
I want to have something like:

SIGNAL(SIG_OVERFOLW0) { ... code ...}
SIGNAL(MySignal){... other code ...}

wich results in an function with all the stuff a "normal" interrupt handl=
er=20
does. And then, in the programm, "switch" from one handler for the=20
SIG_OVERFOLW0 interrupt to the other one by writing the address of MySign=
al=20
to the interrupt vector table;

Is this possible ? And how i have to define MySignal ?

CU,
Torsten.
--=20
Torsten Hahn=20
TU Bergakademie Freiberg - Institut f=FCr Experimentelle Physik=20
Silbermannstra=DFe 1, 09596 Freiberg
mail: [email-masked]
phone: +49 3731 392670=20

From [email-masked] Sat Dec 15 03:46:39 2001
Received: from [158.116.149.132] (helo=smtphost.smartm.com)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 16Etbj-0000oQ-00
for <[email-masked]>; Sat, 15 Dec 2001 03:46:39 +1300
Received: by smtphost.smartm.com(Lotus SMTP MTA v4.6.7 (934.1 12-30-1999)) id 88256B22.005642C0 ; Fri, 14 Dec 2001 07:42:11 -0800
X-Lotus-FromDomain: SMART MODULAR@APEX DATA INC
From: [email-masked]
To: [email-masked]
Message-ID: <[email-masked]>
Date: Fri, 14 Dec 2001 14:48:33 +0000
Mime-Version: 1.0
Content-type: text/plain; charset=us-ascii
Content-Disposition: inline
Subject: [avr-gcc-list] ATMega323L Support
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Will there be support for the ATMEGA323L, or does it already exist by using one
of the other options ??

Thanks

Iain

From [email-masked] Sat Dec 15 05:35:21 2001
Received: from tet1.eltrans.pub.ro ([141.85.252.123] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16EvIp-0000ty-00
for <[email-masked]>; Sat, 15 Dec 2001 05:35:16 +1300
Received: from localhost (florinel@localhost)
by tet1.eltrans.pub.ro (8.10.2/8.10.2) with ESMTP id fBEGdgY04105
for <[email-masked]>; Fri, 14 Dec 2001 18:39:42 +0200
Date: Fri, 14 Dec 2001 18:39:42 +0200 (EET)
From: Florin Birnescu <[email-masked]>
To: LISTA DISCUTI AVR-GCC <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] Newbie
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello everyone,
I am new with avr-gcc and I ask for a little help from you. I'have some
experience with AVRs (have made a frequency synthesis using a at90s1200
and mc145170, and also an encoder using at90s2313) but I only used AVR
Studio's Assembler; I also know some C/C++ programming and a little Linux
(user level mostly). I have downloaded and installed avr-gcc and now I
would be very happy if you could guide me a little. Tell me where I could
find some getting started instructions and some explained examples of
avr-gcc programms.
Thanks,
Florin Birnescu

From [email-masked] Sat Dec 15 05:59:00 2001
Received: from tomts20.bellnexxia.net ([209.226.175.74] helo=tomts20-srv.bellnexxia.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16Evfo-0000vd-00
for <[email-masked]>; Sat, 15 Dec 2001 05:59:00 +1300
Received: from valery ([65.92.200.232]) by tomts20-srv.bellnexxia.net
(InterMail vM.4.01.03.16 201-229-121-116-20010115) with SMTP
id <20011214170311.DFBZ14593.tomts20-srv.bellnexxia.net@valery>
for <[email-masked]>; Fri, 14 Dec 2001 12:03:11 -0500
Message-ID: <003801c184c0$01def220$3700000a@valery>
From: =?iso-8859-1?Q?Val=E9ry_Florimond?= <[email-masked]>
To: "GNU Dsiscussion Group" <[email-masked]>
Subject: Re: [avr-gcc-list] Newbie
Date: Fri, 14 Dec 2001 11:54:29 -0500
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Florin,

have a look on avrfreaks.net (http://www.avrfreaks.net/AVRGCC/coding.php),
there are very interesting documents (getting started notes!) with code
examples.

Valery

----- Original Message -----
From: "Florin Birnescu" <[email-masked]>
To: "LISTA DISCUTI AVR-GCC" <[email-masked]>
Sent: Friday, December 14, 2001 11:39 AM
Subject: [avr-gcc-list] Newbie

> Hello everyone,
> I am new with avr-gcc and I ask for a little help from you. I'have some
> experience with AVRs (have made a frequency synthesis using a at90s1200
> and mc145170, and also an encoder using at90s2313) but I only used AVR
> Studio's Assembler; I also know some C/C++ programming and a little Linux
> (user level mostly). I have downloaded and installed avr-gcc and now I
> would be very happy if you could guide me a little. Tell me where I could
> find some getting started instructions and some explained examples of
> avr-gcc programms.
> Thanks,
> Florin Birnescu
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Sat Dec 15 08:44:52 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16EyGI-00018k-00
for <[email-masked]>; Sat, 15 Dec 2001 08:44:51 +1300
Received: (from rneswold@localhost)
by DrMemory.fnal.GOV (8.11.6/8.11.6) id fBEJnJo62875;
Fri, 14 Dec 2001 13:49:19 -0600 (CST)
(envelope-from rneswold)
Date: Fri, 14 Dec 2001 13:49:19 -0600
From: Rich Neswold <[email-masked]>
To: Torsten Hahn <[email-masked]>
Cc: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Interrupt Handling
Message-ID: <[email-masked]>
Reply-To: Rich Neswold <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="ADZbWkCsHQ7r3kzd"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Fri, Dec 14, 2001 at 02:18:47PM +0100
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.4-RELEASE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--ADZbWkCsHQ7r3kzd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Wasn't it 14-Dec-2001, at 02:18PM, when Torsten Hahn said:
> can i write my own function with all the things that an interrupt handler=
=20
> makes (save the SREG etc.) ?
> I want to have something like:
>=20
> SIGNAL(SIG_OVERFOLW0) { ... code ...}
> SIGNAL(MySignal){... other code ...}
>=20
> wich results in an function with all the stuff a "normal" interrupt handl=
er=20
> does. And then, in the programm, "switch" from one handler for the=20
> SIG_OVERFOLW0 interrupt to the other one by writing the address of MySign=
al=20
> to the interrupt vector table;
>=20
> Is this possible ? And how i have to define MySignal ?

Nope. The interrupt table is in FLASH, so it can't be modified while the
processor is running. How about this psudo-code:

static void func_a(void)
{
... do something here ...
}

static void func_b(void)
{
... do another thing here ...
}

SIGNAL(SIG_OVERFLOW0)
{
if (some state)
func_a();
else
func_b();
}

If you don't want to waste the stack space for the function calls, you
could simply inline the function at the appropriate spot.

--=20
Rich Neswold
=20
efax: 1.240.536.7092
web: www.enteract.com/~rneswold/
=20
rand: b03a8a99b6f8b3a5036df3bb

--ADZbWkCsHQ7r3kzd
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE8Gle/ZmE+i9FKxdwRAlbXAJ0fZCrkbnVdIJMVlnBP50YKE8rlzACgw336
GE11J1N+7IKdcn1xeEP04Po=
=pjlD
-----END PGP SIGNATURE-----

--ADZbWkCsHQ7r3kzd--

From [email-masked] Mon Dec 17 17:19:27 2001
Received: from mail.vasnet.net.in ([202.4.160.7])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16FpFM-0005FC-00
for <[email-masked]>; Mon, 17 Dec 2001 17:19:25 +1300
Received: from zygal ([202.4.161.32])
by mail.vasnet.net.in (8.9.3/8.9.3) with SMTP id JAA03791
for <[email-masked]>; Mon, 17 Dec 2001 09:46:26 -0500
Reply-To: <[email-masked]>
From: "Panther" <[email-masked]>
To: <[email-masked]>
Date: Mon, 17 Dec 2001 09:52:55 +0530
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
In-Reply-To: <[email-masked]>
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] RE: avr-gcc-list digest, Vol 1 #280 - 6 msgs
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

hi,

have been following this list for long, but could not contribute because i
am not familair with unix and the installation of avr_gcc.

I have downloaded the
1. avrgcc_freaks20011214a.exe and
2. AVR Studio 3.53 and also the
3. avrgcc_studio.pdf

Have installed the studio 3.53, avrgcc. everthing worked perfectly and the
installation completed without any problem. made the gcc_cmp.bat for win98.

The test project doesnot build the avr Studio says "ERROR DETECTED DURING
LINK STAGE" "STOPPED". what is the problem? everything has been done as per
the avrgcc_studio.pdf and the default directory in install have been used.

Thanks in advance

Srikanth Kamath T

From [email-masked] Tue Dec 18 09:01:15 2001
Received: from nic-118-c200-127.mn.mediaone.net ([24.118.200.127] helo=whimpy.n0jcf.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16G3wo-0005yV-00
for <[email-masked]>; Tue, 18 Dec 2001 09:01:14 +1300
Received: (from chrise@localhost)
by whimpy.n0jcf.net (8.11.6/8.11.6) id fBHK6AF08636
for [email-masked]; Mon, 17 Dec 2001 14:06:10 -0600
Date: Mon, 17 Dec 2001 14:06:09 -0600
From: Chris Elmquist <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Subject: [avr-gcc-list] GCC 3.0.2 unsigned int bug?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I'm new here... just playing around with avr-gcc 3.0.2 on
Linux.

I'm having trouble understanding this:

void delay(void)
{
unsigned int d;

d = 0x1000;
while (d) d--;
}

generates this code (using avr-objdump --disassemble):

0000004a <delay>:
4a: 80 e0 ldi r24, 0x00 ; 0
4c: 90 e1 ldi r25, 0x10 ; 16
4e: 80 50 subi r24, 0x00 ; 0
50: 94 40 sbci r25, 0x04 ; 4
52: e9 f7 brne .-6 ; 0x4e
54: 08 95 ret

I can clearly see that the MSB goes in r25 and the LSB in r24
but then why does it subtract 0x04 from the MSB each iteration?

Suspecting maybe a disassembler problem, the '94 40' opcode
indeed would subtract 0x40 from the MSB wouldn't it?

Am I missing something obvious here or is this a bug?

Chris
--
Chris Elmquist mailto:[email-masked] http://www.pobox.com/~chrise

From [email-masked] Tue Dec 18 10:25:03 2001
Received: from dt083nf7.san.rr.com ([204.210.26.247] helo=mail.lightner.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16G5Fu-00063D-00
for <[email-masked]>; Tue, 18 Dec 2001 10:25:02 +1300
Received: from lightner.net (dhcp34.networkcar.com [168.143.116.94])
by mail.lightner.net (8.8.7/8.8.6) with ESMTP id NAA24686;
Mon, 17 Dec 2001 13:29:45 -0800
Message-ID: <[email-masked]>
Date: Mon, 17 Dec 2001 13:29:07 -0800
From: "Bruce D. Lightner" <[email-masked]>
X-Mailer: Mozilla 4.74 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Chris Elmquist <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] GCC 3.0.2 unsigned int bug?
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Chris,

> I'm new here... just playing around with avr-gcc 3.0.2 on
> Linux.
>
> I'm having trouble understanding this:
>
> void delay(void)
> {
> unsigned int d;
>
> d = 0x1000;
> while (d) d--;
> }
>
> generates this code (using avr-objdump --disassemble):
>
> 0000004a <delay>:
> 4a: 80 e0 ldi r24, 0x00 ; 0
> 4c: 90 e1 ldi r25, 0x10 ; 16
> 4e: 80 50 subi r24, 0x00 ; 0
> 50: 94 40 sbci r25, 0x04 ; 4
> 52: e9 f7 brne .-6 ; 0x4e
> 54: 08 95 ret
>
> I can clearly see that the MSB goes in r25 and the LSB in r24
> but then why does it subtract 0x04 from the MSB each iteration?
>
> Suspecting maybe a disassembler problem, the '94 40' opcode
> indeed would subtract 0x40 from the MSB wouldn't it?
>
> Am I missing something obvious here or is this a bug?

Apparently, this is a "feature", not a bug. You no doubt have the "avr-gcc"
optimizer turned on (e.g., "-Os) and thereby gave it free license to do
anthing it wants to your loop code. The newest releases of "avr-gcc" does
just that. I would expect the optimizer to remove the loop completely, but
instead it decrements the loop count by a seemingly arbitrary large number
on each iteration.

You can probably fix the problem by either declaring "d" volatile, but you
won't believe big the code gets that "avr-gcc" generates in that case!
Also, you can make "d" global by moving it outside the delay() routine,
which gives you tight code, but costs a couple of bytes of RAM.

I just "got bit" by this one myself when re-compiling some old AVR C-code
under the new "improved" version of "avr-gcc". This comes up so often in
this discussion list that I'm tempted to hunt this one down and fix it!

Here's what I ended up doing...

static void dummy(void) { }

void delay(void)
{
unsigned short count = 25000;

while(--count) dummy();
}

This gives one a little better AVR code (and the correct behavior even with
the "optimizer" turned on). But I can't promise that sometime in the future
that "gcc" might force one to move "dummy()" to a separately compiled
module!

Best regards,

Bruce

--
Bruce D. Lightner
La Jolla, California
Email: [email-masked]
URL: http://www.lightner.net/lightner/bruce/

From [email-masked] Tue Dec 18 10:57:45 2001
Received: from firewall.dalsa.com ([207.176.180.114] helo=dalsa.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16G5lY-00065C-00
for <[email-masked]>; Tue, 18 Dec 2001 10:57:44 +1300
Received: by firewall.dalsa.com id <119056>; Mon, 17 Dec 2001 17:02:44 -0500
Subject: Re: [avr-gcc-list] GCC 3.0.2 unsigned int bug?
To: [email-masked]
X-Mailer: Lotus Notes Release 5.0.1a (Intl) 17 August 1999
Message-Id: <[email-masked]>
From: [email-masked]
Date: Mon, 17 Dec 2001 17:00:19 -0500
X-MIMETrack: Serialize by Router on Wat/Dalsa(Release 5.0.5 |September 22, 2000) at 12/17/2001
05:00:19 PM
MIME-Version: 1.0
Content-type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

As I am "lurking" and do not (yet) have avr-gcc installed, please forgive
me for asking:

1: are there compiler directives available similar to #OPTIMIZE and
#NOOPTIMIZE which would selectively enable and disable optimization around
defined source code segments (ref: Intel PL/M 80 circa 1980-1989)?

2: is there a compiler directive available like #INLINE which would let one
code a "function" but would compiler as in-line code eliminating the
overhead of the function call and return?

3: is there a version of avr-gcc available for WinNT (or any Win32 OS)?

Thanks,
John Johnson

"Bruce D. Lightner"
<[email-masked] To: Chris Elmquist <[email-masked]>
> cc: [email-masked]
Sent by: Subject: Re: [avr-gcc-list] GCC 3.0.2 unsigned int bug?
avr-gcc-list-admin@avr
.jpk.co.nz

2001-12-17 16:29

Chris,

> I'm new here... just playing around with avr-gcc 3.0.2 on
> Linux.
>
> I'm having trouble understanding this:
>
> void delay(void)
> {
> unsigned int d;
>
> d = 0x1000;
> while (d) d--;
> }
>
> generates this code (using avr-objdump --disassemble):
>
> 0000004a <delay>:
> 4a: 80 e0 ldi r24, 0x00 ; 0
> 4c: 90 e1 ldi r25, 0x10 ; 16
> 4e: 80 50 subi r24, 0x00 ; 0
> 50: 94 40 sbci r25, 0x04 ; 4
> 52: e9 f7 brne .-6 ; 0x4e
> 54: 08 95 ret
>
> I can clearly see that the MSB goes in r25 and the LSB in r24
> but then why does it subtract 0x04 from the MSB each iteration?
>
> Suspecting maybe a disassembler problem, the '94 40' opcode
> indeed would subtract 0x40 from the MSB wouldn't it?
>
> Am I missing something obvious here or is this a bug?

Apparently, this is a "feature", not a bug. You no doubt have the
"avr-gcc"
optimizer turned on (e.g., "-Os) and thereby gave it free license to do
anthing it wants to your loop code. The newest releases of "avr-gcc" does
just that. I would expect the optimizer to remove the loop completely, but
instead it decrements the loop count by a seemingly arbitrary large number
on each iteration.

You can probably fix the problem by either declaring "d" volatile, but you
won't believe big the code gets that "avr-gcc" generates in that case!
Also, you can make "d" global by moving it outside the delay() routine,
which gives you tight code, but costs a couple of bytes of RAM.

I just "got bit" by this one myself when re-compiling some old AVR C-code
under the new "improved" version of "avr-gcc". This comes up so often in
this discussion list that I'm tempted to hunt this one down and fix it!

Here's what I ended up doing...

static void dummy(void) { }

void delay(void)
{
unsigned short count = 25000;

while(--count) dummy();
}

This gives one a little better AVR code (and the correct behavior even with
the "optimizer" turned on). But I can't promise that sometime in the
future
that "gcc" might force one to move "dummy()" to a separately compiled
module!

Best regards,

Bruce

--
Bruce D. Lightner
La Jolla, California
Email: [email-masked]
URL: http://www.lightner.net/lightner/bruce/

_______________________________________________
avr-gcc-list mailing list
[email-masked]
http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Tue Dec 18 12:56:23 2001
Received: from nic-118-c200-127.mn.mediaone.net ([24.118.200.127] helo=whimpy.n0jcf.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16G7cM-0006Bv-00
for <[email-masked]>; Tue, 18 Dec 2001 12:56:23 +1300
Received: (from chrise@localhost)
by whimpy.n0jcf.net (8.11.6/8.11.6) id fBI01EF09783;
Mon, 17 Dec 2001 18:01:14 -0600
Date: Mon, 17 Dec 2001 18:01:14 -0600
From: Chris Elmquist <[email-masked]>
To: "Bruce D. Lightner" <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] GCC 3.0.2 unsigned int bug?
Message-ID: <[email-masked]>
References: <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Mon, Dec 17, 2001 at 01:29:07PM -0800
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Monday (12/17/2001 at 01:29PM -0800), Bruce D. Lightner wrote:
>
> Apparently, this is a "feature", not a bug. You no doubt have the "avr-gcc"
> optimizer turned on (e.g., "-Os) and thereby gave it free license to do
> anthing it wants to your loop code. The newest releases of "avr-gcc" does
> just that. I would expect the optimizer to remove the loop completely, but
> instead it decrements the loop count by a seemingly arbitrary large number
> on each iteration.
>
> You can probably fix the problem by either declaring "d" volatile, but you
> won't believe big the code gets that "avr-gcc" generates in that case!
> Also, you can make "d" global by moving it outside the delay() routine,
> which gives you tight code, but costs a couple of bytes of RAM.
>
> I just "got bit" by this one myself when re-compiling some old AVR C-code
> under the new "improved" version of "avr-gcc". This comes up so often in
> this discussion list that I'm tempted to hunt this one down and fix it!
>
> Here's what I ended up doing...
>
> static void dummy(void) { }
>
> void delay(void)
> {
> unsigned short count = 25000;
>
> while(--count) dummy();
> }
>
> This gives one a little better AVR code (and the correct behavior even with
> the "optimizer" turned on). But I can't promise that sometime in the future
> that "gcc" might force one to move "dummy()" to a separately compiled
> module!

Hi Bruce... thanks for the reply. Sure enough, the -Os was in effect and
it was optimizing the thing down to uselessness :-) Of course, I have
bigger plans for the lousy loop but had never seen GCC so that kind of
"random" thing to me before.

In any case, here's my "improved" loop, suitable for fooling the optimizer
today:

void delay(void)
{
unsigned int d;

for (d=0x1000; d; d--)
__asm__ __volatile__ ( "nop" : : );
}

0000004a <delay>:
4a: 80 e0 ldi r24, 0x00 ; 0
4c: 90 e1 ldi r25, 0x10 ; 16
4e: 00 00 nop
50: 01 97 sbiw r24, 0x01 ; 1
52: e9 f7 brne .-6 ; 0x4e
54: 08 95 ret

which is more like what I was expecting.

Thanks for the help.

Regards,

Chris

--
Chris Elmquist mailto:[email-masked] http://www.pobox.com/~chrise

From [email-masked] Tue Dec 18 13:08:55 2001
Received: from nic-118-c200-127.mn.mediaone.net ([24.118.200.127] helo=whimpy.n0jcf.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16G7oU-0006D0-00
for <[email-masked]>; Tue, 18 Dec 2001 13:08:54 +1300
Received: (from chrise@localhost)
by whimpy.n0jcf.net (8.11.6/8.11.6) id fBI0DnD09839;
Mon, 17 Dec 2001 18:13:49 -0600
Date: Mon, 17 Dec 2001 18:13:49 -0600
From: Chris Elmquist <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Subject: Re: [avr-gcc-list] GCC 3.0.2 unsigned int bug?
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Mon, Dec 17, 2001 at 05:00:19PM -0500
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Monday (12/17/2001 at 05:00PM -0500), [email-masked] wrote:
>
> As I am "lurking" and do not (yet) have avr-gcc installed, please forgive
> me for asking:
>
> 1: are there compiler directives available similar to #OPTIMIZE and
> #NOOPTIMIZE which would selectively enable and disable optimization around
> defined source code segments (ref: Intel PL/M 80 circa 1980-1989)?

I'm still researching this one. Normally, one would expect some kind
of #pragma to control this but I don't see any GCC pragmas that relate
to optimization.

Here's the best GCC online reference that I know:

http://gcc.gnu.org/onlinedocs/

> 2: is there a compiler directive available like #INLINE which would let one
> code a "function" but would compiler as in-line code eliminating the
> overhead of the function call and return?

I think you're looking for the __inline__ directive. I've used this with
other processors but not yet with the AVR. YMMV :-)

> 3: is there a version of avr-gcc available for WinNT (or any Win32 OS)?

Yup:

http://combio.de/avr/index.html

cje

--
Chris Elmquist mailto:[email-masked] http://www.pobox.com/~chrise

From [email-masked] Tue Dec 18 13:52:57 2001
Received: from [66.96.232.55] (helo=host.hostseguro.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16G8V6-0006G4-00
for <[email-masked]>; Tue, 18 Dec 2001 13:52:56 +1300
Received: from digitus by host.hostseguro.com with local (Exim 3.33 #1)
id 16G8YU-0007BB-00
for [email-masked]; Mon, 17 Dec 2001 22:56:26 -0200
From: "Francisco T. A. Silva" <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] GCC 3.0.2 unsigned int bug?
X-Mailer: NeoMail 1.25
X-IPAddress: 200.167.241.208
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Message-Id: <[email-masked]>
Date: Mon, 17 Dec 2001 22:56:26 -0200
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - host.hostseguro.com
X-AntiAbuse: Original Domain - avr.jpk.co.nz
X-AntiAbuse: Originator/Caller UID/GID - [32403 909] / [32403 909]
X-AntiAbuse: Sender Address Domain - host.hostseguro.com
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Chris,

You may even substitute ";" for "nop" and you gain one word.
BTW asm(";"); also works and spare your fingers some work :)

Regards,
--
Francisco

> In any case, here's my "improved" loop, suitable for fooling the
optimizer
> today:
>
> void delay(void)
> {
> unsigned int d;
>
> for (d=0x1000; d; d--)
> __asm__ __volatile__ ( "nop" : : );
> }

From [email-masked] Tue Dec 18 16:44:08 2001
Received: from sys32.hou.wt.net ([205.230.159.32])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GBAl-0006Oc-00
for <[email-masked]>; Tue, 18 Dec 2001 16:44:08 +1300
Received: from mjones700 (216-119-128-154.ipset8.wt.net [216.119.128.154])
by sys32.hou.wt.net (8.9.1/8.9.1) with SMTP id VAA20627
for <[email-masked]>; Mon, 17 Dec 2001 21:49:10 -0600 (CST)
Message-ID: <001101c18777$3bda3a20$0100c0a8@mjones700>
From: "Mike Jones" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]>
Date: Mon, 17 Dec 2001 21:51:10 -0600
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] 4-bit LCD source
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

For anyone that is interested...

I followed the link on AVR-Freaks to Peter Feury's site and am using his
code which is a derivative of O. Volker. I have modified the code slightly
to work with the FUTURLEC 8535 development board (cheap but nice).

Peter, if you are listening, I have added the changes such that a #define
FUTURLEC turns on the right code, otherwise it leaves your code alone. Would
you like a copy of the LCD.c and LCD.h files as an update to those on your
website? One of the big differences was that your interface uses bits 0-3
for the datalines and mine needed bits 4-7.

I did have to make a slight hardware change to the Futurlec board because
they over-simplified the interface by forcing the R/W line to be Write-Only.
The fix to this is to cut the trace to the R/W pin on the LCD interface and
then run a jumper wire from Port C/bit 2 to the R/W pin. Otherwise, things
went pretty smoothly. My board is running at 8 Mhz but didn't seem to be any
problem even though the code looks like it was designed around a 4 Mhz
board.

Mike

>There is some LCD stuff at AVRfreaks.net...don't know if you can use it
but:
>
>http://www.avrfreaks.net/Freaks/freakshow.php?action=2&projectid=11
>
>
> Eivind
>
>
>----- Original Message -----
>From: "Mike Jones" <[email-masked]>
>To: "AVR GCC mail list" <[email-masked]>
>Sent: Wednesday, December 12, 2001 6:25 AM
>Subject: [avr-gcc-list] Needed: 4-bit LCD source
>
>
>> I have finally gotten an LCD attached to my Dev board and I would like
to
>> use it with GCC. Has anyone written a 4-bit (Hitachi controller)
interface

>> routine for GCC that they would like to share? I have one in Assembly
but
>> would rather not tackle interfacing an Assembly routine to GCC just
yet.
>>
>> Mike

----- Original Message -----
From: "Chris Elmquist" <[email-masked]>
To: <[email-masked]>
Sent: Monday, December 17, 2001 2:06 PM
Subject: [avr-gcc-list] GCC 3.0.2 unsigned int bug?

>
> I'm new here... just playing around with avr-gcc 3.0.2 on
> Linux.
>
> I'm having trouble understanding this:
>
> void delay(void)
> {
> unsigned int d;
>
> d = 0x1000;
> while (d) d--;
> }
>
> generates this code (using avr-objdump --disassemble):
>
> 0000004a <delay>:
> 4a: 80 e0 ldi r24, 0x00 ; 0
> 4c: 90 e1 ldi r25, 0x10 ; 16
> 4e: 80 50 subi r24, 0x00 ; 0
> 50: 94 40 sbci r25, 0x04 ; 4
> 52: e9 f7 brne .-6 ; 0x4e
> 54: 08 95 ret
>
> I can clearly see that the MSB goes in r25 and the LSB in r24
> but then why does it subtract 0x04 from the MSB each iteration?
>
> Suspecting maybe a disassembler problem, the '94 40' opcode
> indeed would subtract 0x40 from the MSB wouldn't it?
>
> Am I missing something obvious here or is this a bug?
>
> Chris
> --
> Chris Elmquist mailto:[email-masked]
http://www.pobox.com/~chrise
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Tue Dec 18 21:08:11 2001
Received: from for.spb.ru ([195.201.69.16] helo=cyclone.eis.ru)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 16GFIH-0006cI-00
for <[email-masked]>; Tue, 18 Dec 2001 21:08:10 +1300
Received: (qmail 62571 invoked from network); 18 Dec 2001 08:12:59 -0000
Received: from good.for.spb.ru (HELO eis.ru) (195.201.69.80)
by for.spb.ru with SMTP; 18 Dec 2001 08:12:59 -0000
Date: Tue, 18 Dec 2001 11:10:19 +0300
From: Dmitry <[email-masked]>
To: Chris Elmquist <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] GCC 3.0.2 unsigned int bug?
Message-Id: <[email-masked]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
Organization: eis.ru
X-Mailer: Sylpheed version 0.5.3 (GTK+ 1.2.8; i386-unknown-freebsd5.0)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

The compiler does the right thing on the loop unrolling pass.
It does 32 iterations where it can reach the value of 1024.

try to recompile this file with d less than 1024 and d=1024+something.

have fun,
D.

On Mon, 17 Dec 2001 14:06:09 -0600
Chris Elmquist <[email-masked]> wrote:

>
> I'm new here... just playing around with avr-gcc 3.0.2 on
> Linux.
>
> I'm having trouble understanding this:
>
> void delay(void)
> {
> unsigned int d;
>
> d = 0x1000;
> while (d) d--;
> }
>
> generates this code (using avr-objdump --disassemble):
>
> 0000004a <delay>:
> 4a: 80 e0 ldi r24, 0x00 ; 0
> 4c: 90 e1 ldi r25, 0x10 ; 16
> 4e: 80 50 subi r24, 0x00 ; 0
> 50: 94 40 sbci r25, 0x04 ; 4
> 52: e9 f7 brne .-6 ; 0x4e
> 54: 08 95 ret
>
> I can clearly see that the MSB goes in r25 and the LSB in r24
> but then why does it subtract 0x04 from the MSB each iteration?
>
> Suspecting maybe a disassembler problem, the '94 40' opcode
> indeed would subtract 0x40 from the MSB wouldn't it?
>
> Am I missing something obvious here or is this a bug?
>
> Chris
> --
> Chris Elmquist mailto:[email-masked] http://www.pobox.com/~chrise
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

*********************************************************************
("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ
`6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys
(_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44
_..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia
(il),-'' (li),' ((!.-' +7 (812) 314-8860, 5585314
*********************************************************************

From [email-masked] Tue Dec 18 22:08:08 2001
Received: from 1200.avrfreaks.net ([195.139.52.229])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GGEJ-0006g4-00
for <[email-masked]>; Tue, 18 Dec 2001 22:08:07 +1300
Received: from ostattin (gw.atmel.no [195.139.52.210])
by 1200.avrfreaks.net (8.11.1/8.11.0) with SMTP id fBI9CSb88101
for <[email-masked]>; Tue, 18 Dec 2001 10:12:28 +0100 (CET)
(envelope-from [email-masked])
Message-ID: <[email-masked]>
From: "webmaster" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]> <[email-masked]>
Date: Tue, 18 Dec 2001 10:15:56 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] GNU Development Environment for the AVR Microcontroller
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Does anybody know the whereabouts of this document:

"GNU Development Environment for the AVR Microcontroller [221k] "
Rich Neswold's guide describes some functions and macros for access to
memory, interrupts, I/O and the start-up sequence.

It used to be here:

http://www.enteract.com/~rneswold/avr/avr-lib-beta.pdf

I'd appreciate any feedback resolving this!

Best regards,

Eivind

From [email-masked] Wed Dec 19 01:48:25 2001
Received: from merkur.hrz.tu-freiberg.de ([139.20.64.28])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GJfU-0006t1-00
for <[email-masked]>; Wed, 19 Dec 2001 01:48:24 +1300
Received: from there (cobain.exphys.tu-freiberg.de [139.20.13.66])
by merkur.hrz.tu-freiberg.de (8.11.6/8.11.6) with SMTP id fBICsvr89439
for <[email-masked]>; Tue, 18 Dec 2001 13:54:57 +0100 (CET)
(envelope-from [email-masked])
Message-Id: <[email-masked]>
Content-Type: text/plain;
charset="iso-8859-15"
From: Torsten Hahn <[email-masked]>
To: <[email-masked]>
Date: Tue, 18 Dec 2001 14:07:14 +0100
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by merkur.hrz.tu-freiberg.de id fBICsvr89439
Subject: [avr-gcc-list] memory organization
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

im using an atmega103. I need to "reserve" 3kb of the internal sram for d=
atas=20
comming from an ad-converter. Where does avr-gcc place the global vars in=
the=20
sram (beginning or end) ? What is the best way, to reserve such a large d=
ata=20
segment ?

CU,
Torsten.

--=20
Torsten Hahn=20
TU Bergakademie Freiberg - Institut f=FCr Experimentelle Physik=20
Silbermannstra=DFe 1, 09596 Freiberg
mail: [email-masked]
phone: +49 3731 392670=20

From [email-masked] Wed Dec 19 02:05:22 2001
Received: from merkur.hrz.tu-freiberg.de ([139.20.64.28])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GJvt-0006u4-00
for <[email-masked]>; Wed, 19 Dec 2001 02:05:21 +1300
Received: from there (cobain.exphys.tu-freiberg.de [139.20.13.66])
by merkur.hrz.tu-freiberg.de (8.11.6/8.11.6) with SMTP id fBIDBur90169
for <[email-masked]>; Tue, 18 Dec 2001 14:11:56 +0100 (CET)
(envelope-from [email-masked])
Message-Id: <[email-masked]>
Content-Type: text/plain;
charset="iso-8859-15"
From: Torsten Hahn <[email-masked]>
To: <[email-masked]>
Date: Tue, 18 Dec 2001 14:24:13 +0100
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by merkur.hrz.tu-freiberg.de id fBIDBur90169
Subject: [avr-gcc-list] strange c
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

im a bit new to low-level c, but what does e.g 1<<TOIE1 do ?
From the languege reference i know the shift operator to use like value<<=
1=20
but not the other way around.

CU,
Torsten.=20
--=20
Torsten Hahn=20
TU Bergakademie Freiberg - Institut f=FCr Experimentelle Physik=20
Silbermannstra=DFe 1, 09596 Freiberg
mail: [email-masked]
phone: +49 3731 392670=20

From [email-masked] Wed Dec 19 02:49:40 2001
Received: from tvout.mail.uk.easynet.net ([194.6.96.5])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GKcl-0006xQ-00
for <[email-masked]>; Wed, 19 Dec 2001 02:49:39 +1300
Received: from phoenix.lab (unknown [212.135.186.70])
by tvout.mail.uk.easynet.net (Postfix) with SMTP id 2A7BE62D62
for <[email-masked]>; Tue, 18 Dec 2001 13:54:30 +0000 (GMT)
Date: Tue, 18 Dec 2001 13:45:57 +0000
From: Christian Ludlam <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] strange c
Message-ID: <[email-masked]>
In-Reply-To: <[email-masked]>
X-Mailer: Messenger v1.41d for RISC OS
X-Editor: Zap 1.44 (14 Dec 2001) [TEST 8], ZapEmail 0.26 (28 Nov 2001) test-3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Posting-Agent: RISC OS Newsbase 0.66b
User-Agent: POPstar/2.02
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On 18 Dec Torsten Hahn wrote:

> Hi,
>
> im a bit new to low-level c, but what does e.g 1<<TOIE1 do ?
> From the languege reference i know the shift operator to use like value<<1
> but not the other way around.

It converts a bit /number/ into a bit /mask/. TOIE1 is defined as 7 (for an
AVR 2313), but to set bit 7 in the TIMSK register you need to OR it with the
value 0x80, or 1<<7. So you have

TIMSK |= (1<<TOIE1)

to enable the Timer1 interrupt.

C
--
Christian Ludlam
[email-masked]

From [email-masked] Wed Dec 19 02:54:06 2001
Received: from sys32.hou.wt.net ([205.230.159.32])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GKh3-0006yI-00
for <[email-masked]>; Wed, 19 Dec 2001 02:54:06 +1300
Received: from wt.net (wm.hou.wt.net [216.119.141.200])
by sys32.hou.wt.net (8.9.1/8.9.1) with SMTP id HAA05201;
Tue, 18 Dec 2001 07:59:04 -0600 (CST)
From: "Mike Jones" <[email-masked]>
Reply-to: [email-masked]
To: Torsten Hahn <[email-masked]>, <[email-masked]>
Date: Tue, 18 Dec 2001 07:59:01 +0600
Subject: Re: [avr-gcc-list] strange c
X-Mailer: DMailWeb Web to Mail Gateway 2.4e, http://netwinsite.com/top_mail.htm
Message-id: <[email-masked]>
X-User-Info: 149.58.101.253
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

That should shift a single 1 to the left the number of bits that TOIE1 is
valued. Your example shifts all the bits in a variable a fixed number of
places to the left. The question's example takes a value of 1 ( a single
1-bit in the bit 0 position) and shifts it to the left TOIE1 times. You
can also just think of it as setting bit number TOIE1 to a 1.

Mike

>Hi,
>
>im a bit new to low-level c, but what does e.g 1<<TOIE1 do ?
>>From the languege reference i know the shift operator to use like value<<1

>but not the other way around.
>
>CU,
>Torsten.
>--
>Torsten Hahn
>TU Bergakademie Freiberg - Institut f=FCr Experimentelle Physik
>Silbermannstra=DFe 1, 09596 Freiberg
>mail: [email-masked]
>phone: +49 3731 392670
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
>

From [email-masked] Wed Dec 19 02:56:17 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GKjA-0006yt-00
for <[email-masked]>; Wed, 19 Dec 2001 02:56:17 +1300
Received: (from j@localhost)
by ida.interface-business.de id fBIE1Cc17728;
Tue, 18 Dec 2001 15:01:12 +0100 (MET)
Date: Tue, 18 Dec 2001 15:01:12 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]> <[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] GCC 3.0.2 unsigned int bug?
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Cc: Chris Elmquist <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Chris Elmquist <[email-masked]> wrote:

> In any case, here's my "improved" loop, suitable for fooling the optimizer
> today:
>
> void delay(void)
> {
> unsigned int d;
>
> for (d=0x1000; d; d--)
> __asm__ __volatile__ ( "nop" : : );
> }

If you already know about the volatile keyword, why don't you use it
just right?

void delay(void)
{
volatile unsigned int d;

for (d = 0x1000; d; d--)
;
}

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Wed Dec 19 03:14:58 2001
Received: from sys27.hou.wt.net ([205.230.159.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GL1F-00070Q-00
for <[email-masked]>; Wed, 19 Dec 2001 03:14:57 +1300
Received: from wt.net (wm.hou.wt.net [216.119.141.200])
by sys27.hou.wt.net (8.9.3/8.9.3) with SMTP id IAA65418;
Tue, 18 Dec 2001 08:19:51 -0600 (CST)
From: "Mike Jones" <[email-masked]>
Reply-to: [email-masked]
To: "webmaster" <[email-masked]>, <[email-masked]>
Date: Tue, 18 Dec 2001 08:19:52 +0600
Subject: Re: [avr-gcc-list] GNU Development Environment for the AVR Microcontroller
X-Mailer: DMailWeb Web to Mail Gateway 2.4e, http://netwinsite.com/top_mail.htm
Message-id: <[email-masked]>
X-User-Info: 149.58.101.253
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Try removing the pdf file name from the URL and it will take you to a page
which has this link on it:

http://www.enteract.com/~rneswold/avr/avr-tools.pdf

Mike

>Does anybody know the whereabouts of this document:
>
>"GNU Development Environment for the AVR Microcontroller [221k] "
>Rich Neswold's guide describes some functions and macros for access to

>memory, interrupts, I/O and the start-up sequence.
>
>It used to be here:
>
>http://www.enteract.com/~rneswold/avr/avr-lib-beta.pdf
>
>
>I'd appreciate any feedback resolving this!
>
>Best regards,
>
> Eivind
>
>
>
>_______________________________________________
>avr-gcc-list mailing list
>[email-masked]
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
>

From [email-masked] Wed Dec 19 04:22:13 2001
Received: from nic-118-c200-127.mn.mediaone.net ([24.118.200.127] helo=whimpy.n0jcf.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GM4K-00076A-00
for <[email-masked]>; Wed, 19 Dec 2001 04:22:13 +1300
Received: (from chrise@localhost)
by whimpy.n0jcf.net (8.11.6/8.11.6) id fBIFR8b14074;
Tue, 18 Dec 2001 09:27:08 -0600
Date: Tue, 18 Dec 2001 09:27:08 -0600
From: Chris Elmquist <[email-masked]>
To: Joerg Wunsch <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] GCC 3.0.2 unsigned int bug?
Message-ID: <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Tue, Dec 18, 2001 at 03:01:12PM +0100
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Tuesday (12/18/2001 at 03:01PM +0100), Joerg Wunsch wrote:
> Chris Elmquist <[email-masked]> wrote:
>
> > In any case, here's my "improved" loop, suitable for fooling the optimizer
> > today:
> >
> > void delay(void)
> > {
> > unsigned int d;
> >
> > for (d=0x1000; d; d--)
> > __asm__ __volatile__ ( "nop" : : );
> > }
>
> If you already know about the volatile keyword, why don't you use it
> just right?
>
> void delay(void)
> {
> volatile unsigned int d;
>
> for (d = 0x1000; d; d--)
> ;
> }

well, it seems there is a radical difference in the size and complexity
of the code it produces then. ie,

this code,

void delay(void)
{
volatile unsigned int d;

for (d=0x1000; d; d--)
asm(";");
}

yields,

0000004a <delay>:
4a: a2 e0 ldi r26, 0x02 ; 2
4c: b0 e0 ldi r27, 0x00 ; 0
4e: ea e2 ldi r30, 0x2A ; 42
50: f0 e0 ldi r31, 0x00 ; 0
52: 54 c0 rjmp .+168 ; 0xfc
54: 80 e0 ldi r24, 0x00 ; 0
56: 90 e1 ldi r25, 0x10 ; 16
58: 03 c0 rjmp .+6 ; 0x60
5a: 89 81 ldd r24, Y+1 ; 0x01
5c: 9a 81 ldd r25, Y+2 ; 0x02
5e: 01 97 sbiw r24, 0x01 ; 1
60: 89 83 std Y+1, r24 ; 0x01
62: 9a 83 std Y+2, r25 ; 0x02
64: 89 81 ldd r24, Y+1 ; 0x01
66: 9a 81 ldd r25, Y+2 ; 0x02
68: 89 2b or r24, r25
6a: b9 f7 brne .-18 ; 0x5a
6c: e2 e0 ldi r30, 0x02 ; 2
6e: ce 5f subi r28, 0xFE ; 254
70: 61 c0 rjmp .+194 ; 0x134

which of course keeps 'd' in ram (ie, on the "stack") and calls all of
the prolog and epilog functions when entering and leaving the function.

Yet this code:

void delay(void)
{
unsigned int d;

for (d=0x1000; d; d--)
asm(";");
}

produces,

0000004a <delay>:
4a: 80 e0 ldi r24, 0x00 ; 0
4c: 90 e1 ldi r25, 0x10 ; 16
4e: 01 97 sbiw r24, 0x01 ; 1
50: f1 f7 brne .-4 ; 0x4e
52: 08 95 ret

I suppose it would be more correct to declare 'd' a type "register"
above to ensure it always stays that way.

It's all moot though in the end, as I don't intend to perform my delays
with spin loops for very long :-) But it has been an interesting
exercise for me to see how GCC (w/ -Os) deals with this simple case on
the AVR.

Regards,

Chris

--
Chris Elmquist mailto:[email-masked] http://www.pobox.com/~chrise

From [email-masked] Wed Dec 19 04:37:04 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GMIh-000778-00
for <[email-masked]>; Wed, 19 Dec 2001 04:37:03 +1300
Received: (from j@localhost)
by ida.interface-business.de id fBIFfwZ18192;
Tue, 18 Dec 2001 16:41:58 +0100 (MET)
Date: Tue, 18 Dec 2001 16:41:58 +0100
From: Joerg Wunsch <[email-masked]>
To: Chris Elmquist <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] GCC 3.0.2 unsigned int bug?
Message-ID: <[email-masked]>
Reply-To: Joerg Wunsch <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Tue, Dec 18, 2001 at 09:27:08AM -0600
X-Phone: +49-351-31809-14
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
Organization: interface systems GmbH, Dresden
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

As Chris Elmquist wrote:

> well, it seems there is a radical difference in the size and complexity
> of the code it produces then. ie,

Yep, you're right.

> I suppose it would be more correct to declare 'd' a type "register"
> above to ensure it always stays that way.

register and volatile are basically mutually exclusive.

> But it has been an interesting exercise for me to see how GCC (w/
> -Os) deals with this simple case on the AVR.

It's a general gcc feature, so other architectures should rather
experience similar behaviour.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Wed Dec 19 04:47:29 2001
Received: from 1200.avrfreaks.net ([195.139.52.229])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GMSl-000791-00
for <[email-masked]>; Wed, 19 Dec 2001 04:47:28 +1300
Received: from ostattin (gw.atmel.no [195.139.52.210])
by 1200.avrfreaks.net (8.11.1/8.11.0) with SMTP id fBIFplb08294;
Tue, 18 Dec 2001 16:51:47 +0100 (CET)
(envelope-from [email-masked])
Message-ID: <[email-masked]>
From: "webmaster" <[email-masked]>
To: <[email-masked]>, <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] GNU Development Environment for the AVR Microcontroller
Date: Tue, 18 Dec 2001 16:55:11 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Thanks, I found it now!

Best regards,

Eivind

From [email-masked] Wed Dec 19 06:09:07 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GNjm-0007EQ-00
for <[email-masked]>; Wed, 19 Dec 2001 06:09:07 +1300
Received: (from j@localhost)
by ida.interface-business.de id fBIHE2F18501;
Tue, 18 Dec 2001 18:14:02 +0100 (MET)
Date: Tue, 18 Dec 2001 18:14:02 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] memory organization
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Torsten Hahn <[email-masked]> wrote:

> im using an atmega103. I need to "reserve" 3kb of the internal sram
> for datas comming from an ad-converter. Where does avr-gcc place the
> global vars in the sram (beginning or end) ?

It's actually the linker, not the compiler. They are filled up from
the beginning, while the stack is by default set to the top of RAM.
You need to make sure both parts will never overlap, since there's no
chance the compiler can test this, and no runtime support (like the
MMU you might be used to from a more complex CPU) that could issue a
trap or something else when the stack overflows. It'll just destroy
the last of your variables then.

> What is the best way,
> to reserve such a large data segment ?

#define BUFSIZE 3*1024
uint8_t buffer[BUFSIZE];

(at the global level)

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Wed Dec 19 06:10:29 2001
Received: from ida.interface-business.de ([193.101.57.9])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GNl5-0007Em-00
for <[email-masked]>; Wed, 19 Dec 2001 06:10:28 +1300
Received: (from j@localhost)
by ida.interface-business.de id fBIHFQJ18513;
Tue, 18 Dec 2001 18:15:26 +0100 (MET)
Date: Tue, 18 Dec 2001 18:15:26 +0100 (MET)
Message-Id: <[email-masked]>
Mime-Version: 1.0
X-Newsreader: knews 1.0b.1
Reply-To: [email-masked] (Joerg Wunsch)
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
References: <[email-masked]>
<[email-masked]>
From: [email-masked] (Joerg Wunsch)
Subject: Re: [avr-gcc-list] strange c
X-Original-Newsgroups: local.avr.gcc
To: [email-masked]
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Christian Ludlam <[email-masked]> wrote:

> It converts a bit /number/ into a bit /mask/. TOIE1 is defined as 7
> (for an AVR 2313), but to set bit 7 in the TIMSK register you need
> to OR it with the value 0x80, or 1<<7.

Btw., the "politically correct" method in avr-gcc would be to write

BV(TOIE1)

instead. Makes the code better readable.

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/

From [email-masked] Wed Dec 19 06:42:20 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GOFt-0007M5-00
for <[email-masked]>; Wed, 19 Dec 2001 06:42:18 +1300
Received: (from rneswold@localhost)
by DrMemory.fnal.GOV (8.11.6/8.11.6) id fBIHl4844051;
Tue, 18 Dec 2001 11:47:04 -0600 (CST)
(envelope-from rneswold)
Date: Tue, 18 Dec 2001 11:47:04 -0600
From: Rich Neswold <[email-masked]>
To: webmaster <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] GNU Development Environment for the AVR Microcontroller
Message-ID: <[email-masked]>
Reply-To: Rich Neswold <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="Xm/fll+QQv+hsKip"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Tue, Dec 18, 2001 at 10:15:56AM +0100
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.4-RELEASE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--Xm/fll+QQv+hsKip
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Wasn't it 18-Dec-2001, at 10:15AM, when webmaster said:
> Does anybody know the whereabouts of this document:
>=20
> "GNU Development Environment for the AVR Microcontroller [221k] "
> Rich Neswold's guide describes some functions and macros for access to
> memory, interrupts, I/O and the start-up sequence.
>=20
> It used to be here:
>=20
> http://www.enteract.com/~rneswold/avr/avr-lib-beta.pdf

Just look in

http://www.enteract.com/~rneswold/avr/

I've converted it to DocBook (SGML). The HTML pages have links to PDF and
PS versions. The current document references a much more recent version of
avr-libc than the one you specified.

Hope this helps...

--=20
Rich Neswold
=20
efax: 1.240.536.7092
web: www.enteract.com/~rneswold/
=20
rand: 51c640e6ba165f823065b2

--Xm/fll+QQv+hsKip
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD4DBQE8H4EYZmE+i9FKxdwRArrrAKCAuK6ZpNrMQX1Glt53qw7NI3ezhwCVGgey
99fW73ZTF8zlTuVVApiD1w==
=bgWh
-----END PGP SIGNATURE-----

--Xm/fll+QQv+hsKip--

From [email-masked] Wed Dec 19 07:04:51 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GObh-0007NQ-00
for <[email-masked]>; Wed, 19 Dec 2001 07:04:49 +1300
Received: (from rneswold@localhost)
by DrMemory.fnal.GOV (8.11.6/8.11.6) id fBII9eg44334;
Tue, 18 Dec 2001 12:09:40 -0600 (CST)
(envelope-from rneswold)
Date: Tue, 18 Dec 2001 12:09:40 -0600
From: Rich Neswold <[email-masked]>
To: Torsten Hahn <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] strange c
Message-ID: <[email-masked]>
Reply-To: Rich Neswold <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="mR8QP4gmHujQHb1c"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Tue, Dec 18, 2001 at 02:24:13PM +0100
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.4-RELEASE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--mR8QP4gmHujQHb1c
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Wasn't it 18-Dec-2001, at 02:24PM, when Torsten Hahn said:
> im a bit new to low-level c, but what does e.g 1<<TOIE1 do ? From the
> languege reference i know the shift operator to use like value<<1 but not
> the other way around.

1 << n

Creates a value that has the n'th bit set (the lowest bit is the 0th bit.)
So:

1 << 0 gives 0x01
1 << 1 gives 0x02
1 << 2 gives 0x04

The IO headers files in avr-libc define all the bits in the I/O registers
in terms of their position (i.e. 0-7 values). This works well when using
the cbi()/sbi() macros. If you want to load several bits at the same time
(using outp()), you could use the BV() macro, which computes the formula (1
<< arg). By ORing together several BV() instances, you build up a value
with several bits:

outp(BV(first_bit_of_interest) | BV(second_bit), target_register);

The previous statement will generate one line of assembly (as long as
"target_register" is an I/O register.)

Hope this helps...

--=20
Rich Neswold
=20
efax: 1.240.536.7092
web: www.enteract.com/~rneswold/
=20
rand: 439099df4a7197c92c7a3de1aaae16

--mR8QP4gmHujQHb1c
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE8H4ZkZmE+i9FKxdwRAsImAJ42QYyaWL5soXaFY4hhTryDZ9uGbACfRslM
UbVQCtcfDmezfGGobxdwExY=
=YoFU
-----END PGP SIGNATURE-----

--mR8QP4gmHujQHb1c--

From [email-masked] Wed Dec 19 07:34:05 2001
Received: from drmemory.fnal.gov ([131.225.105.170])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GP3z-0007P7-00
for <[email-masked]>; Wed, 19 Dec 2001 07:34:04 +1300
Received: (from rneswold@localhost)
by DrMemory.fnal.GOV (8.11.6/8.11.6) id fBIId0p44412
for [email-masked]; Tue, 18 Dec 2001 12:39:00 -0600 (CST)
(envelope-from rneswold)
Date: Tue, 18 Dec 2001 12:39:00 -0600
From: Rich Neswold <[email-masked]>
To: AVR Mailing List <[email-masked]>
Subject: Re: [avr-gcc-list] GNU Development Environment for the AVR Microcontroller
Message-ID: <[email-masked]>
Reply-To: Rich Neswold <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="KJY2Ze80yH5MUxol"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Tue, Dec 18, 2001 at 11:47:04AM -0600
X-GnuPG-Fingerprint: 289D B71D 1FE0 6D71 8ACC 3494 6661 3E8B D14A C5DC
X-GnuPG-PubKey: ftp://ftp.enteract.com/users/rneswold/pub.key
X-Operating-System: FreeBSD 4.4-RELEASE
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--KJY2Ze80yH5MUxol
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Wasn't it 18-Dec-2001, at 11:47AM, when Rich Neswold said:
> Just look in
>=20
> http://www.enteract.com/~rneswold/avr/
>=20
> I've converted it to DocBook (SGML). The HTML pages have links to PDF and
> PS versions. The current document references a much more recent version of
> avr-libc than the one you specified.

I've just updated the documents. Chapter 2 (the demo project) has much more
information. I must apologize to Joerg Wunsch because I couldn't figure out
how to get his schematic incorporated into the document without it getting
clipped. I finally gave up and created it on the Eagle CAD package.

One small caveat: for some reason, the Postscript version prints with
virtually no top margin. I don't know why this happens, but I'm looking
into it.

Thanks to everyone that pointed out bugs in earlier versions. Comments,
corrections, and critiques are welcomed...

--=20
Rich Neswold
=20
efax: 1.240.536.7092
web: www.enteract.com/~rneswold/

--KJY2Ze80yH5MUxol
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE8H41EZmE+i9FKxdwRAv14AKD/OX2IyUSOymZqgxA/hJ2+cBAtpQCeMALM
JHcMoZ2LTxLSZqRdcnzHbeg=
=AKfr
-----END PGP SIGNATURE-----

--KJY2Ze80yH5MUxol--

From [email-masked] Wed Dec 19 11:21:46 2001
Received: from a1as12-p182.hh.tli.de
([195.252.136.182] helo=pluto ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GScB-0007ff-00
for <[email-masked]>; Wed, 19 Dec 2001 11:21:40 +1300
Received: from Informatik.Uni-Oldenburg.DE ([127.0.0.1]) by pluto
with esmtp (ident beth using rfc1413) id m16G5mF-000yCzC
(Debian Smail-3.2.0.102 1998-Aug-2 #2); Mon, 17 Dec 2001 22:58:27 +0100 (CET)
Message-ID: <[email-masked]>
Date: Mon, 17 Dec 2001 22:58:26 +0100
From: Carsten Beth <[email-masked]>
Organization: C.v.Ossietzky =?iso-8859-1?Q?Universit=E4t?= Oldenburg - Fachbereich
Informatik
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.15 i586)
X-Accept-Language: German, de, English, en, en
MIME-Version: 1.0
To: [email-masked]
Subject: Re: [avr-gcc-list] GCC 3.0.2 unsigned int bug?
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Chris!

Maybe you are compiling with optimization switch on. Then the compiler shortens
the loop, actualy the following program do (except from the timing) the same
thing:

void delay(void)
{
unsigned int d;

d = 0x1000;
d = 0;
}

and also

void delay(void)
{
unsigned int d;

d = 0;
}

do the same.

You can try something like this:

#define nop() __asm__ __volatile__ ("nop")

void delay(void)
{
unsigned int d;

for( d = 0; d < 0x1000; d++ )
nop();
}

Carsten

Chris Elmquist wrote:

>
> I'm having trouble understanding this:
>
> void delay(void)
> {
> unsigned int d;
>
> d = 0x1000;
> while (d) d--;
> }
>
> generates this code (using avr-objdump --disassemble):
>
> 0000004a <delay>:
> 4a: 80 e0 ldi r24, 0x00 ; 0
> 4c: 90 e1 ldi r25, 0x10 ; 16
> 4e: 80 50 subi r24, 0x00 ; 0
> 50: 94 40 sbci r25, 0x04 ; 4
> 52: e9 f7 brne .-6 ; 0x4e
> 54: 08 95 ret
>
> I can clearly see that the MSB goes in r25 and the LSB in r24
> but then why does it subtract 0x04 from the MSB each iteration?
>
> Suspecting maybe a disassembler problem, the '94 40' opcode
> indeed would subtract 0x40 from the MSB wouldn't it?
>
> Am I missing something obvious here or is this a bug?

From [email-masked] Wed Dec 19 13:28:28 2001
Received: from mail-vie-pub-p.1012internet.at ([212.95.31.10])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GUaw-0007od-00
for <[email-masked]>; Wed, 19 Dec 2001 13:28:27 +1300
Received: from telering.at (dis212095026092.vie.telering.at [212.95.26.92])
by mail-vie-pub-p.1012internet.at (8.9.3/8.9.3) with SMTP id BAA00975
for <[email-masked]>; Wed, 19 Dec 2001 01:33:21 +0100 (MET)
Received: (qmail 18941 invoked by uid 501); 19 Dec 2001 00:29:40 -0000
From: [email-masked]
Reply-To: [email-masked]
To: [email-masked], [email-masked]
Date: Wed, 19 Dec 2001 00:46:19 +0100
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
MIME-Version: 1.0
Message-Id: <[email-masked]>
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] Some gcc avr questions?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello everybody!
I am new to the avr-gcc list and now I have some questions.

I am working on a Linux host and I have maintained a cross compiler scrip=
t for
the gcc win32 port in the past. Now I started to work with the avr
microcontrollers. I will prepare a script to build the gcc avr tool chain=
very
easy. This will include the building of the libc.

I used the official versions of binutils (2.11.2) and gcc (3.0.2).
I have started with the binutils followed by gcc (C only).
There were no problems until now except for some warnings in binutils and=
gcc.

First question:
Shall I fix this warnings or are they already fixed in CVS (havent' looke=
d
there) or is someone else working on this subject?

Then I tried to configure gcc for C++, but I got problems during the targ=
et
libiberty configuration. I know that this configuration needs libc and I
haven't build it until now. I don't thing it makes sense to build libiber=
ty for
the target. So I will remove it from the configuration for avr.

But before I start with this, I have the next questions:
How far is the C++ part for avr?
I am not so familar with the compiler internals, but I think if the backe=
nd=20
for C is ready it is possible to use also C++. Maybe the startup code mus=
t be
changed to call all con/destructors of global objects. But I don't know i=
t in
detail. Maybe it is already done in libgcc.

Is there a gnu simulator available for the avr or is someone working on i=
t?

I know about avr-gdb-4.18. Shall I try to port gdb-5.0 for avr or is some=
one
working on it?

Regards,
Reinhard

--=20
Ing. Reinhard Jessich mailto: [email-masked]
A-1190 Vienna, Goergengasse 2/2/1 phone: +43/1/3692600
http://members.telering.at/jessich mobile: +43/664/1735439

From [email-masked] Wed Dec 19 19:58:12 2001
Received: from [195.246.29.156] (helo=metrel.si)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16Gag2-0008Gq-00
for <[email-masked]>; Wed, 19 Dec 2001 19:58:10 +1300
Message-Id: <[email-masked]>
Date: Wed, 19 Dec 2001 08:01:26 +0100
TO: [email-masked]
From: =?iso-8859-1?Q?Ale=9A?= Rosman <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: [avr-gcc-list] avrfreaks GCC
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi!

I downloaded AvrFreaks installation of Avr-Gcc succesfuly installed it in
c:\avrgcc as suggested and tried to compile the included examples (at least
gcctest 1 and 2).I was surprised... it worked with no problems... but..

Then I made new directory in D: called D:\GccProjects wrote my first gcc
program and gues what... errors... I thought it was my mistake so I copied
gcctest1 to that directory and tried to build it... nope... errors... first
the cp didn't want to copy coff files from /coff then make reported
gcctest1.eep couldn't be found.

I know it is stupid but it seems that make only works if project files are
on C:... anybody had the same problem... any idea how to solve this, couse
I realy like to have all my project on D: for easy backup-ing :)

Alex

From [email-masked] Wed Dec 19 22:59:15 2001
Received: from maild.telia.com ([194.22.190.101] ident=root)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GdVK-0008TB-00
for <[email-masked]>; Wed, 19 Dec 2001 22:59:15 +1300
Received: from d1o926.telia.com (d1o926.telia.com [213.66.172.241])
by maild.telia.com (8.11.6/8.11.6) with ESMTP id fBJA4A213175;
Wed, 19 Dec 2001 11:04:11 +0100 (CET)
Received: from jesper (h169n2fls34o926.telia.com [217.208.35.169])
by d1o926.telia.com (8.10.2/8.10.1) with SMTP id fBJA4AA24664;
Wed, 19 Dec 2001 11:04:10 +0100 (CET)
Message-ID: <004501c18874$80c9d7a0$65656565@jesper>
From: "Jesper Hansen" <[email-masked]>
To: <[email-masked]>,
=?iso-8859-1?Q?Ales_Rosman?= <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] avrfreaks GCC
Date: Wed, 19 Dec 2001 11:03:53 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Alex,

Yes, there seem to be a problem with some of the tools in
the installation. It's beeing looked into.

However, you can fix the copying by replacing the double
backslashes in the CP commands for *sym and *S with triple
backslashes.

/Jesper

----- Original Message -----
From: "Ales Rosman" <[email-masked]>
To: <[email-masked]>
Sent: Wednesday, December 19, 2001 8:01 AM
Subject: [avr-gcc-list] avrfreaks GCC

> Hi!
>
> I downloaded AvrFreaks installation of Avr-Gcc succesfuly installed it in
> c:\avrgcc as suggested and tried to compile the included examples (at
least
> gcctest 1 and 2).I was surprised... it worked with no problems... but..
>
> Then I made new directory in D: called D:\GccProjects wrote my first gcc
> program and gues what... errors... I thought it was my mistake so I copied
> gcctest1 to that directory and tried to build it... nope... errors...
first
> the cp didn't want to copy coff files from /coff then make reported
> gcctest1.eep couldn't be found.
>
> I know it is stupid but it seems that make only works if project files are
> on C:... anybody had the same problem... any idea how to solve this, couse
> I realy like to have all my project on D: for easy backup-ing :)
>
> Alex
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Thu Dec 20 02:22:44 2001
Received: from mx0.gmx.de ([213.165.64.100] helo=mx0.gmx.net)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 16GggF-0000Gu-00
for <[email-masked]>; Thu, 20 Dec 2001 02:22:43 +1300
Received: (qmail 19788 invoked by uid 0); 19 Dec 2001 13:27:13 -0000
Date: Wed, 19 Dec 2001 14:27:13 +0100 (MET)
From: Victor Sluiter <[email-masked]>
To: [email-masked]
MIME-Version: 1.0
References: <004501c18874$80c9d7a0$65656565@jesper>
X-Priority: 3 (Normal)
X-Authenticated-Sender: [email-masked]
X-Authenticated-IP: [212.136.198.145]
Message-ID: <[email-masked]>
X-Mailer: WWW-Mail 1.5 (Global Message Exchange)
X-Flags: 0001
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: [avr-gcc-list] Dynamic memory
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello everybody,

For some days I've been trying to use dynamic memory allocation on an
ATMEGA103. The first tests looked promising, but now I'm stuck. I have something
like this structure:

struct test{
char a1;
char a2;
struct test *nxt;
struct test *prv;
};
I can link structures by making new structs with malloc(), and linking the
'prv' from the new struct to the last in the line, and the 'nxt' from this
last to the new one. If I take a look at things like pTest->a1, or
pTest->prv->prv->a1 (where pTest is a struct test *)everything works right, so the
'structures' are properly linked! The problem is: I would like to scroll through
this list, but when I try to do something like pTest = pTest->prv , the result
is that pTest stays exactly the same....
Anyone got an idea what might be going on? Thanks in advance for any help at
all!

Greetings, Victor

--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

From [email-masked] Thu Dec 20 03:31:29 2001
Received: from merkur.hrz.tu-freiberg.de ([139.20.64.28])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16Ghkm-0000MI-00
for <[email-masked]>; Thu, 20 Dec 2001 03:31:28 +1300
Received: from there (cobain.exphys.tu-freiberg.de [139.20.13.66])
by merkur.hrz.tu-freiberg.de (8.11.6/8.11.6) with SMTP id fBJEc8r50006
for <[email-masked]>; Wed, 19 Dec 2001 15:38:08 +0100 (CET)
(envelope-from [email-masked])
Message-Id: <[email-masked]>
Content-Type: text/plain;
charset="iso-8859-15"
From: Torsten Hahn <[email-masked]>
To: [email-masked]
Date: Wed, 19 Dec 2001 15:50:34 +0100
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by merkur.hrz.tu-freiberg.de id fBJEc8r50006
Subject: [avr-gcc-list] add with carry
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

has somebody a little macro to add to uint8_t numbers together and add th=
e=20
carry (if there is one) to another uint8_t ?

I tried to take a macro from iomacros.h and modify it, but i didnt get it=
=20
running.

Thanks for help,
TH.
--=20
Torsten Hahn=20
TU Bergakademie Freiberg - Institut f=FCr Experimentelle Physik=20
Silbermannstra=DFe 1, 09596 Freiberg
mail: [email-masked]
phone: +49 3731 392670=20

From [email-masked] Thu Dec 20 10:08:03 2001
Received: from mail-vie-pub-p.1012internet.at ([212.95.31.10])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GnwY-0000s3-00
for <[email-masked]>; Thu, 20 Dec 2001 10:08:02 +1300
Received: from telering.at (dis212067236110.vie.telering.at [212.67.236.110])
by mail-vie-pub-p.1012internet.at (8.9.3/8.9.3) with SMTP id WAA22967
for <[email-masked]>; Wed, 19 Dec 2001 22:13:01 +0100 (MET)
Received: (qmail 885 invoked by uid 501); 19 Dec 2001 20:13:10 -0000
From: [email-masked]
Reply-To: [email-masked]
To: "Michael Pont" <[email-masked]>, <[email-masked]>,
<[email-masked]>
Date: Wed, 19 Dec 2001 21:10:41 +0100
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
References: <[email-masked]> <00a701c18881$1819fe80$7f478cd4@oemcomputer>
In-Reply-To: <00a701c18881$1819fe80$7f478cd4@oemcomputer>
MIME-Version: 1.0
Message-Id: <[email-masked]>
Content-Transfer-Encoding: quoted-printable
Subject: [avr-gcc-list] Re: Some gcc avr questions?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Wed, 19 Dec 2001, Michael Pont wrote:
> Reinhard,
>=20
> I received this recently on another e-mail list.
>=20
> It may be relevant?
>=20
> Michael.
>=20
> --- BEGIN avrfreaks ---
>=20
> ***********************************************************************
> 1) Brand new win32 package of avr-gcc available from AVRfreaks!
<snip>
Thank you, but this is Windows SW. I work on Linux!

Reinhard

--=20
Ing. Reinhard Jessich mailto: [email-masked]
A-1190 Vienna, Goergengasse 2/2/1 phone: +43/1/3692600
http://members.telering.at/jessich mobile: +43/664/1735439

From [email-masked] Thu Dec 20 00:30:35 2001
Received: from trolley.tesco.net ([194.73.73.166])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16Gevj-00008u-00
for <[email-masked]>; Thu, 20 Dec 2001 00:30:35 +1300
Received: from [212.140.70.138] (helo=oemcomputer)
by trolley.tesco.net with esmtp (Exim 2.05 #1)
id 16Gf0Q-0004ZE-00; Wed, 19 Dec 2001 11:35:27 +0000
Message-ID: <00a701c18881$1819fe80$7f478cd4@oemcomputer>
From: "Michael Pont" <[email-masked]>
To: <[email-masked]>,
<[email-masked]>,
<[email-masked]>
References: <[email-masked]>
Date: Wed, 19 Dec 2001 11:22:00 -0000
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [avr-gcc-list] Re: Some gcc avr questions?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Reinhard,

I received this recently on another e-mail list.

It may be relevant?

Michael.

--- BEGIN avrfreaks ---

***********************************************************************
1) Brand new win32 package of avr-gcc available from AVRfreaks!
-----------------------------------------------------------------------

We have prepared our own installer package of avr-gcc, which includes
some additional items:

- Flavio Gobber's Elf2Coff converter
- Volker Oth's gcctest1-9 test projects
- slightly altered makefiles, and additional .bat files for better
integration with AVRstudio on both Win9x and Win2000 platforms.

Also updated is the avr-libc library: avr-libc-20011126 (nov.26, 2001)

This means you now have a COMPLETE and TOTALLY FREE development/debugging
suite
available, at this location:

http://www.avrfreaks.net/AVRGCC/index.php

--- END avrfreaks ---

----- Original Message -----
From: <[email-masked]>
To: <[email-masked]>; <[email-masked]>
Sent: Tuesday, December 18, 2001 11:46 PM
Subject: Some gcc avr questions?

Hello everybody!
I am new to the avr-gcc list and now I have some questions.

I am working on a Linux host and I have maintained a cross compiler script
for
the gcc win32 port in the past. Now I started to work with the avr
microcontrollers. I will prepare a script to build the gcc avr tool chain
very
easy. This will include the building of the libc.

I used the official versions of binutils (2.11.2) and gcc (3.0.2).
I have started with the binutils followed by gcc (C only).
There were no problems until now except for some warnings in binutils and
gcc.

First question:
Shall I fix this warnings or are they already fixed in CVS (havent' looked
there) or is someone else working on this subject?

Then I tried to configure gcc for C++, but I got problems during the target
libiberty configuration. I know that this configuration needs libc and I
haven't build it until now. I don't thing it makes sense to build libiberty
for
the target. So I will remove it from the configuration for avr.

But before I start with this, I have the next questions:
How far is the C++ part for avr?
I am not so familar with the compiler internals, but I think if the backend
for C is ready it is possible to use also C++. Maybe the startup code must
be
changed to call all con/destructors of global objects. But I don't know it
in
detail. Maybe it is already done in libgcc.

Is there a gnu simulator available for the avr or is someone working on it?

I know about avr-gdb-4.18. Shall I try to port gdb-5.0 for avr or is someone
working on it?

Regards,
Reinhard

--
Ing. Reinhard Jessich mailto: [email-masked]
A-1190 Vienna, Goergengasse 2/2/1 phone: +43/1/3692600
http://members.telering.at/jessich mobile: +43/664/1735439

------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to [email-masked]

From [email-masked] Thu Dec 20 10:42:55 2001
Received: from conn.mc.mpls.visi.com ([208.42.156.2])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16GoUI-0000vq-00
for <[email-masked]>; Thu, 20 Dec 2001 10:42:55 +1300
Received: from grante.comtrol.com (grante.dsl.visi.com [208.42.141.248])
by conn.mc.mpls.visi.com (Postfix) with SMTP id 7DCB48160
for <[email-masked]>; Wed, 19 Dec 2001 15:47:57 -0600 (CST)
Received: (qmail 23461 invoked by uid 500); 19 Dec 2001 21:54:28 -0000
Date: Wed, 19 Dec 2001 15:54:28 -0600
From: Grant Edwards <[email-masked]>
To: [email-masked]
Cc: Michael Pont <[email-masked]>,
[email-masked], [email-masked]
Message-ID: <[email-masked]>
References: <[email-masked]> <00a701c18881$1819fe80$7f478cd4@oemcomputer> <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <[email-masked]>; from [email-masked] on Wed, Dec 19, 2001 at 09:10:41PM +0100
Subject: [avr-gcc-list] Re: Some gcc avr questions?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Wed, Dec 19, 2001 at 09:10:41PM +0100, [email-masked] wrote:

> Thank you, but this is Windows SW. I work on Linux!

I've found that writing an RPM spec file and creating a source
RPM is a very handy way to capture the recipe for building
cross development tools on Unix systems.

--
Grant Edwards
[email-masked]

From [email-masked] Thu Dec 20 15:24:22 2001
Received: from mail.vasnet.net.in ([202.4.160.7])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16Gsse-0001IV-00
for <[email-masked]>; Thu, 20 Dec 2001 15:24:21 +1300
Received: from zygal ([202.4.161.57])
by mail.vasnet.net.in (8.9.3/8.9.3) with SMTP id HAA10655
for <[email-masked]>; Thu, 20 Dec 2001 07:50:45 -0500
Reply-To: <[email-masked]>
From: "Panther" <[email-masked]>
To: <[email-masked]>
Date: Thu, 20 Dec 2001 07:57:51 +0530
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
In-Reply-To: <[email-masked]>
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Subject: [avr-gcc-list] avrFreak GCC
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I would not get it to work even in the default C:\avrgcc,

I downloaded the files yesterday 12/16. I have taken care of the to keep all
thing as default as mentioned in the pdf file. trg=gcctest1 (without
extension) the gcc_cmp.bat in the path but still i am not able to get it to
work?

I have a Celron 333Mhz with 128MB Ram OS win98 Second edition ( final )
1. The installation of avrgcc is c:\avrgcc
2. The avr studio is installed e:\atmel\AVR Studio353 and
3. The gcc_cmp.bat is in the C:\
2. The Compiler output Says "Error Detected during link stage. Stopped"

All help to get this working would be a great help, thanks in advance

Srikanth Kamath T

Message: 2
Date: Wed, 19 Dec 2001 08:01:26 +0100
TO: [email-masked]
From: =?iso-8859-1?Q?Ale=9A?= Rosman <[email-masked]>
Subject: [avr-gcc-list] avrfreaks GCC

Hi!

I downloaded AvrFreaks installation of Avr-Gcc succesfuly installed it in
c:\avrgcc as suggested and tried to compile the included examples (at least
gcctest 1 and 2).I was surprised... it worked with no problems... but..

Then I made new directory in D: called D:\GccProjects wrote my first gcc
program and gues what... errors... I thought it was my mistake so I copied
gcctest1 to that directory and tried to build it... nope... errors... first
the cp didn't want to copy coff files from /coff then make reported
gcctest1.eep couldn't be found.

I know it is stupid but it seems that make only works if project files are
on C:... anybody had the same problem... any idea how to solve this, couse
I realy like to have all my project on D: for easy backup-ing :)

Alex

From [email-masked] Thu Dec 20 16:02:31 2001
Received: from [203.24.179.147] (helo=smartcontainer.net ident=qmailr)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 16GtTb-0001LU-00
for <[email-masked]>; Thu, 20 Dec 2001 16:02:31 +1300
Received: (qmail 22867 invoked by uid 8); 20 Dec 2001 03:07:27 -0000
Received: from moki.smartcontainer.net (20.20.20.13, claiming to be "smartcontainer.net")
by smarty.smartcontainer.net with SMTP id smtpd2b5jNA; Wed, 19 Dec 2001 22:07:19 EST
Message-ID: <[email-masked]>
Date: Thu, 20 Dec 2001 14:07:19 +1100
From: Peter Jansen <[email-masked]>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: [email-masked]
CC: [email-masked]
Subject: Re: [avr-gcc-list] avrFreak GCC
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> I would not get it to work even in the default C:\avrgcc,
>
> I downloaded the files yesterday 12/16. I have taken care of the to keep all
> thing as default as mentioned in the pdf file. trg=gcctest1 (without
> extension) the gcc_cmp.bat in the path but still i am not able to get it to
> work?
>
> I have a Celron 333Mhz with 128MB Ram OS win98 Second edition ( final )
> 1. The installation of avrgcc is c:\avrgcc
> 2. The avr studio is installed e:\atmel\AVR Studio353 and
> 3. The gcc_cmp.bat is in the C:\
> 2. The Compiler output Says "Error Detected during link stage. Stopped"
>
> All help to get this working would be a great help, thanks in advance

It will be something with the pathing in the compiler.

Try the '-t -v --verbose' options to the compiler to figure out which
files it is finding and using. Your will probably need the '-L' option
to tell the compiler where its specs/include/library files are.

--
Peter Jansen
Smart Container
Level 1, NIC Building
Eveleigh
NSW 1430
AUSTRALIA

From [email-masked] Thu Dec 20 21:05:05 2001
Received: from [213.47.210.148] (helo=mail.frequentis.com)
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 16GyCO-0001jn-00
for <[email-masked]>; Thu, 20 Dec 2001 21:05:04 +1300
Received: from FRQVIE-EXT-Message_Server by mail.frequentis.com
with Novell_GroupWise; Thu, 20 Dec 2001 09:09:27 +0100
Message-Id: <[email-masked]>
X-Mailer: Novell GroupWise Internet Agent 5.5.5.1
Date: Thu, 20 Dec 2001 09:09:17 +0100
From: "Reinhard JESSICH" <[email-masked]>
To: <[email-masked]>
Cc: <[email-masked]>,<[email-masked]>,
<[email-masked]>, <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Subject: [avr-gcc-list] Re: Some gcc avr questions?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

If you receive this message from the avr-gcc list, please reply also to =
this address,
because it is not on the avr-gcc mailing list.

>>> Grant Edwards <[email-masked]> 12/19/01 10:54pm >>>
> I've found that writing an RPM spec file and creating a source
> RPM is a very handy way to capture the recipe for building
> cross development tools on Unix systems.
Yes that's true, I will think about it.
But before I can make RPMs I need to write the needed patches and for this
I need the answers to my original questions.

In the meantime I have a c++ compiler, but I haven't tested it (libc and =
startup file still missing).
There was a small patch necessary to tell configure not to build libiberty,=
but this was simple.

Tomorrow I will not try to build the avr libc. I have seen that this is =
not build with the auto tools.
So I think I will write the autoconf/automake scripts, if nobody else has =
done this until now.

Here are some parts of the original message again:

I used the official versions of binutils (2.11.2) and gcc (3.0.2).
I have started with the binutils followed by gcc (C and C++).
There were no problems until now except for some warnings in binutils and =
gcc.

First question:
Shall I fix this warnings or are they already fixed in CVS (havent' looked
there) or is someone else working on this subject?

Next questions:
How far is the C++ part for avr?
I am not so familar with the compiler internals, but I think if the =
backend=20
for C is ready it is possible to use also C++. Maybe the startup code must =
be
changed to call all con/destructors of global objects. But I don't know it =
in
detail. Maybe it is already done in libgcc. Any hints?

Is there a gnu simulator available for the avr or is someone working on =
it?

I know about avr-gdb-4.18. Shall I try to port gdb-5.0 for avr or is =
someone
else working on it?

Regards,
Reinhard

From [email-masked] Sat Dec 22 07:30:28 2001
Received: from [63.79.198.105] (helo=dalexcp02.ultrak.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16HURA-0000xX-00
for <[email-masked]>; Sat, 22 Dec 2001 07:30:28 +1300
Received: by DALEXCP02 with Internet Mail Service (5.5.2653.19)
id <ZBCDS6S9>; Fri, 21 Dec 2001 12:32:41 -0600
Message-ID: <D1CC8B096143D211BC7D00805F655E5CAC8E14@DEI>
From: "Jim Benson (Ohio)" <[email-masked]>
To: [email-masked]
Date: Fri, 21 Dec 2001 12:18:26 -0600
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain
Subject: [avr-gcc-list] Possible Bug in elfcoff.exe
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Howdy folks,

I think I may have found a bug in the Elfcoff.exe utility. I use a lot of
enums in my code. I like to use the compiler option "-fshort-enums" to make
the space required to store enums as small as possible. However, when I use
this option, I get this error:

Error on parsing symbol 143 -> Type : 804x Desc :
:T(9,1)=@s8;eFALSE:0,TRUE:1,;
Ended

The offending enumeration is as follows:

*** Code snippet ***

/*
@enum Boolean | This enumerated list gives a Boolean type.
*/
typedef enum
{
FALSE = 0, //@emem FALSE condition, evaluates to 0
TRUE = 1 //@emem TRUE condition, evaluates to 1
} Boolean;

*** End code snippet ***

This is the first enum the compiler comes accross -- if I change the order
of declarations, the build will break on whatever enum is put first.

If I get rid of the "-fshort-enums" option, everything works fine, but the
code size and data region size both increase.

Does anyone know what I might be doing wrong, or is this a real bug?

Thanks,

Jim

CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents, files
or previous e-mail messages attached to it may contain confidential and
proprietary material for the sole use of the intended recipient(s). Do not
read this e-mail if you are not the intended recipient. Any review, use,
distribution or disclosure by others is strictly prohibited. If you are not
the intended recipient (or authorized to receive for the recipient), you are
hereby notified that any disclosure, copying, distribution or use of any of
the information contained in or attached to this transmission is STRICTLY
PROHIBITED and you should delete all copies of this message and its
attachments without reading or saving in any manner. Thank you. Ultrak,
Inc.

From [email-masked] Sat Dec 22 17:38:14 2001
Received: from 208-58-86-11.c3-0.sfo-ubr1.sfrn-sfo.ca.cable.rcn.com ([208.58.86.11] helo=bc.home.246gt.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16HdvJ-0001oH-00
for <[email-masked]>; Sat, 22 Dec 2001 17:38:13 +1300
Received: from fred.home.246gt.com (fred.home.246gt.com [10.0.0.74])
by bc.home.246gt.com (8.11.3/8.11.3) with ESMTP id fBM4daX19764
for <[email-masked]>; Fri, 21 Dec 2001 20:39:36 -0800 (PST)
(envelope-from [email-masked])
Received: (from ken@localhost)
by fred.home.246gt.com (8.11.2/8.11.2) id fBM4djQ21177
for [email-masked]; Fri, 21 Dec 2001 20:39:45 -0800
X-Authentication-Warning: fred.home.246gt.com: ken set sender to [email-masked] using -f
Date: Fri, 21 Dec 2001 20:39:45 -0800
From: ken restivo <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: application/pgp; x-action=sign; format=text
Content-Disposition: inline; filename="msg.pgp"
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Wed, Dec 19, 2001 at 04:39:12AM +1300
Subject: [avr-gcc-list] Why only registers 18-31?
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have noticed that avr-gcc uses registers 18-31 for most of its work, and registers 0-1, but seems to ignore the other registers 2-17, though they are available. The avr-gcc register usage FAQ seems to confirm this. I also notice that avr-gcc-generated assembler code spends a little bit of its time shuffling these registers around, which seems like it uses up a few processor cycles, which might be saved if it had the other registers available to use.

Is there some reason why avr-gcc only uses 18-31 for most of its work? Is there a way to get avr-gcc to use the rest of the registers? Would that even be a worthwhile thing to do or would it cause other problems? My apologies if this is a dumb question; I'm fairly new to microcontrollers.

Thanks!

- -ken

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8JA6Pe8HF+6xeOIcRAnrwAKDJDGPcs8FFqKom1aL48b5HFB/XHwCdFIsF
U0Rp23WlnK9miHD+nPywww0=
=+AXo
-----END PGP SIGNATURE-----

From [email-masked] Sun Dec 23 08:03:12 2001
Received: from deimos.frii.com ([216.17.128.2] helo=deimos.frii.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16HrQN-0004P7-00
for <[email-masked]>; Sun, 23 Dec 2001 08:03:12 +1300
Received: from ari-co2c-121.rasserver.net (ari-co2c-121.rasserver.net [207.92.201.121])
by deimos.frii.net (8.12.1/8.12.1) with ESMTP id fBMJ4W1O073240
for <[email-masked]>; Sat, 22 Dec 2001 12:04:33 -0700 (MST)
Date: Sat, 22 Dec 2001 12:06:50 -0700 (MST)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: AVR GCC List <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [avr-gcc-list] simulavr-0.0.11
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi All,

I've just released version 0.0.11 of my avr simulator, Simulavr.

With this release, I've added a curses based display coprocess which gives
the user a near real time look at the registers and sram while running an
avr program. I've also fixed a few bugs in the instruction processing and
redesigned some of the internals to make adding new features easier.

I'm using the simulator as a remote target for avr-gdb in my quest to get
avr support for gdb working. The simulator seems to be holding up rather
nicely so far. I've been able to expose some problems with the existing
avr-gdb patches.

Here's where you can get simulavr and my current gdb patches:

http://res099095.halls.colostate.edu/programs/simulavr

Hope that this is useful for someone out there.

If anyone is interested in helping me sort out the avr-gdb problems I've
found, please contact me. I can use all the help I can get on this since
I'm still pretty low on a rather steep learning curve with gdb internals.

Enjoy the holidays.

Ted Roth

From [email-masked] Sun Dec 23 10:32:46 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16Htl8-0004YE-00
for <[email-masked]>; Sun, 23 Dec 2001 10:32:46 +1300
Received: from jpk1.jpk.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id fBMLYAl11337
for <[email-masked]>; Sun, 23 Dec 2001 10:34:11 +1300
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Sun, 23 Dec 2001 10:34:20 +1300
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] Why only registers 18-31?
In-Reply-To: <[email-masked]>
References: <[email-masked]>
<[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

At 20:39 21/12/2001 -0800, you wrote:
>I have noticed that avr-gcc uses registers 18-31 for most of its work, and
>registers 0-1, but seems to ignore the other registers 2-17, though they
>are available. The avr-gcc register usage FAQ seems to confirm this. I
>also notice that avr-gcc-generated assembler code spends a little bit of
>its time shuffling these registers around, which seems like it uses up a
>few processor cycles, which might be saved if it had the other registers
>available to use.
>
>Is there some reason why avr-gcc only uses 18-31 for most of its work? Is
>there a way to get avr-gcc to use the rest of the registers? Would that
>even be a worthwhile thing to do or would it cause other problems? My
>apologies if this is a dumb question; I'm fairly new to microcontrollers.

Certain opcodes can only use the upper 16 registers, for example a load
immediate instruction (LDI Rd,K). Have a look through the instruction set
documentation from Atmel. A while back someone made a big table of all the
instructions which helps in understanding some of those why Atmel did this
and that questions.

Cheers,

Jason Kyle

PS You post arrived as an attached pgp file, please post plain text without
attachments.

>Thanks!
>
>- -ken

From [email-masked] Sun Dec 23 10:43:35 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16Htvb-0004Zy-00
for <[email-masked]>; Sun, 23 Dec 2001 10:43:35 +1300
Received: from jpk1.jpk.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id fBMLipl12099;
Sun, 23 Dec 2001 10:44:52 +1300
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Sun, 23 Dec 2001 10:45:00 +1300
To: "Reinhard JESSICH" <[email-masked]>, <[email-masked]>
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] Re: Some gcc avr questions?
Cc: <[email-masked]>, <[email-masked]>,
<[email-masked]>, <[email-masked]>
In-Reply-To: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

At 09:09 20/12/2001 +0100, Reinhard JESSICH wrote:
>If you receive this message from the avr-gcc list, please reply also to
>this address,
>because it is not on the avr-gcc mailing list.
>
> >>> Grant Edwards <[email-masked]> 12/19/01 10:54pm >>>
> > I've found that writing an RPM spec file and creating a source
> > RPM is a very handy way to capture the recipe for building
> > cross development tools on Unix systems.
>Yes that's true, I will think about it.
>But before I can make RPMs I need to write the needed patches and for this
>I need the answers to my original questions.
>
>In the meantime I have a c++ compiler, but I haven't tested it (libc and
>startup file still missing).
>There was a small patch necessary to tell configure not to build
>libiberty, but this was simple.
>
>Tomorrow I will not try to build the avr libc. I have seen that this is
>not build with the auto tools.
>So I think I will write the autoconf/automake scripts, if nobody else has
>done this until now.

Contact Marek Michalkiewicz [email-masked] regarding avr-libc as he
is the maintainer. The site below is the official source for avr-libc and
uisp, note there is also an avr patch for gdb5.0

http://www.amelek.gda.pl/avr/

>Here are some parts of the original message again:
>
>I used the official versions of binutils (2.11.2) and gcc (3.0.2).
>I have started with the binutils followed by gcc (C and C++).
>There were no problems until now except for some warnings in binutils and gcc.
>
>First question:
>Shall I fix this warnings or are they already fixed in CVS (havent' looked
>there) or is someone else working on this subject?
>
>Next questions:
>How far is the C++ part for avr?
>I am not so familar with the compiler internals, but I think if the backend
>for C is ready it is possible to use also C++. Maybe the startup code must be
>changed to call all con/destructors of global objects. But I don't know it in
>detail. Maybe it is already done in libgcc. Any hints?
>
>Is there a gnu simulator available for the avr or is someone working on it?

See Ted Roth's [email-masked] simulavr
http://res099095.halls.colostate.edu/programs/simulavr , note he is also
looking for some help with fixing up some problems with the current gdb5.0
patch.

Cheers,

Jason Kyle

>I know about avr-gdb-4.18. Shall I try to port gdb-5.0 for avr or is someone
>else working on it?

See above, Marek's site.

>Regards,
> Reinhard

From [email-masked] Sun Dec 23 12:12:14 2001
Received: from sttlpop5.sttl.uswest.net ([206.81.192.5])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 16HvJN-0004gc-00
for <[email-masked]>; Sun, 23 Dec 2001 12:12:13 +1300
Received: (qmail 17213 invoked by alias); 22 Dec 2001 23:13:38 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 17206 invoked by uid 0); 22 Dec 2001 23:13:37 -0000
Received: from sttldslgw5poole72.sttl.uswest.net (HELO lbarello) (63.224.47.72)
by sttlpop5.sttl.uswest.net with SMTP; 22 Dec 2001 23:13:37 -0000
Message-ID: <009e01c18b3d$4e625e60$0700000a@lbarello>
From: "Larry Barello" <[email-masked]>
To: "AVR GCC List" <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]>
Subject: Re: [avr-gcc-list] Why only registers 18-31?
Date: Sat, 22 Dec 2001 14:59:15 -0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

R18-25 are used for parameter passing between procedures. R0 &
R1 are temp and zero respectively. *everything* else is fair
game for GCC temporary storage (pointers, locals, intermediates).
R28, R29 is the frame pointer if needed (gross allocation of
locals, or > four parameter, or > 8 bytes of parameters being
passed ) 26,27 and R30,31 are used as pointers. R2-R17 are used
as locals. Parameters are often copied into those because the
parameter passing registers are used to, well, pass parameters to
the next routine. Routines that don't call anything often leave
parameters in their registers and work on them in-place, unless
they are a pointer and then they get moved to X, Y or Z.

Because anywhere on the call chain R18-25 can be used AND they
are not saved by the called procedure, you can't store *anything*
in them. That is why GCC shuffles stuff into low registers upon
entry into a procedure that calls other procedures. It is smart,
though, it doesn't shuffle unless it needs to remember something
*after* a call.

So, allocate a bunch (8 bytes) of locals and observe what happens
in the asm. Then do it for 16 bytes. Pass 8 bytes of stuff and
observe what happens. Pass 8 bytes AND allocate 8 bytes of
locals and observe what happens.

You will soon start writing code to optimize code generation on
the AVR!

----- Original Message -----
From: "Jason Kyle" <[email-masked]>
...
> >Is there some reason why avr-gcc only uses 18-31 for most of
its work? Is
> >there a way to get avr-gcc to use the rest of the registers?
Would that
> >even be a worthwhile thing to do or would it cause other
problems? My
> >apologies if this is a dumb question; I'm fairly new to
microcontrollers.
>
> Certain opcodes can only use the upper 16 registers, for
example a load
> immediate instruction (LDI Rd,K). Have a look through the
instruction set
> documentation from Atmel. A while back someone made a big
table of all the
> instructions which helps in understanding some of those why
Atmel did this
> and that questions.
>
> Cheers,
>
> Jason Kyle
>

From [email-masked] Sun Dec 23 21:38:39 2001
Received: from mail-vie-pub-p.1012internet.at ([212.95.31.10])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16I49V-0005GL-00
for <[email-masked]>; Sun, 23 Dec 2001 21:38:38 +1300
Received: from telering.at (dis212067236064.vie.telering.at [212.67.236.64])
by mail-vie-pub-p.1012internet.at (8.9.3/8.9.3) with SMTP id JAA09838
for <[email-masked]>; Sun, 23 Dec 2001 09:39:58 +0100 (MET)
Received: (qmail 7556 invoked by uid 501); 23 Dec 2001 08:38:03 -0000
From: [email-masked]
Reply-To: [email-masked]
To: "Theodore A. Roth" <[email-masked]>,
AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] simulavr-0.0.11
Date: Sun, 23 Dec 2001 09:26:30 +0100
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
References: <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Message-Id: <[email-masked]>
Content-Transfer-Encoding: quoted-printable
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Sat, 22 Dec 2001, Theodore A. Roth wrote:
> Hi All,
>=20
> I've just released version 0.0.11 of my avr simulator, Simulavr.
I didn't know that someone has already done the work. I am suprised and h=
appy!!!
Because I a haven't a target hardware until now (only the parts) and no
programmer (only parts and ideas suggested by ponyprog and other), I need
something to play with avr-gcc. I thought to write the simulator on my ow=
n, but
now I can help and thats much less work.

> If anyone is interested in helping me sort out the avr-gdb problems I'v=
e=20
> found, please contact me. I can use all the help I can get on this sinc=
e=20
> I'm still pretty low on a rather steep learning curve with gdb internal=
s.
I will first make the autoconf/automake for avr-libc. Then I will update =
my
avr-cross script to build the complete toolchain in one step.
Then I will start playing with gdb and the simulator. At this point I wil=
l
contact you.
I plan to do this all during my christmas vacation until the 7.1.2001. Bu=
t
there is my son and my wife and ... (you all know this, I think).

Marry Christmas.
Reinhard

--=20
Ing. Reinhard Jessich mailto: [email-masked]
A-1190 Vienna, Goergengasse 2/2/1 phone: +43/1/3692600
http://members.telering.at/jessich mobile: +43/664/1735439

From [email-masked] Mon Dec 24 00:51:51 2001
Received: from mail.forpost.ru ([217.23.68.3] helo=overta.ru)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16I7AV-0005Ro-00
for <[email-masked]>; Mon, 24 Dec 2001 00:51:51 +1300
Received: from [195.151.217.156] (HELO localhost.localdomain)
by overta.ru (CommuniGate Pro SMTP 3.4.7)
with ESMTP id 1303955; Sun, 23 Dec 2001 14:52:44 +0300
To: "Theodore A. Roth" <[email-masked]>
Cc: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] simulavr-0.0.11
References: <[email-masked]>
From: Denis Chertykov <[email-masked]>
Date: 23 Dec 2001 14:51:30 +0300
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
Lines: 31
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

"Theodore A. Roth" <[email-masked]> writes:

> Hi All,
>
> I've just released version 0.0.11 of my avr simulator, Simulavr.
>
> With this release, I've added a curses based display coprocess which gives
> the user a near real time look at the registers and sram while running an
> avr program. I've also fixed a few bugs in the instruction processing and
> redesigned some of the internals to make adding new features easier.
>
> I'm using the simulator as a remote target for avr-gdb in my quest to get
> avr support for gdb working. The simulator seems to be holding up rather
> nicely so far. I've been able to expose some problems with the existing
> avr-gdb patches.
>
> Here's where you can get simulavr and my current gdb patches:
>
> http://res099095.halls.colostate.edu/programs/simulavr
>
> Hope that this is useful for someone out there.
>
> If anyone is interested in helping me sort out the avr-gdb problems I've
> found, please contact me. I can use all the help I can get on this since
> I'm still pretty low on a rather steep learning curve with gdb internals.

I will try to help you.
You can send me a questions about the gdb.
But, I'm very busy.

Denis.

From [email-masked] Mon Dec 24 06:46:57 2001
Received: from dsl2-242.greenmountainaccess.net ([207.40.138.242] helo=xena)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16ICi8-0005q2-00
for <[email-masked]>; Mon, 24 Dec 2001 06:46:56 +1300
Received: from xena ([127.0.0.1] ident=matt)
by xena with smtp (Exim 3.12 #1 (Debian))
id 16ICjy-0007cU-00
for <[email-masked]>; Sun, 23 Dec 2001 12:48:50 -0500
Content-Type: text/plain;
charset="euc-kr"
From: Matthew Welland <[email-masked]>
To: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] simulavr-0.0.11
Date: Sun, 23 Dec 2001 12:48:49 -0500
X-Mailer: KMail [version 1.2]
References: <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Message-Id: <01122312484901.24654@xena>
Content-Transfer-Encoding: 8bit
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Does anyone on this list have an opinion on whether it might be feasible to
hook this simulator into icarus verilog? I would like to be able to simulate
with external circuitry and would like to avoid writing a behavoural model of
the micro.

Thanks for any thoughts, opinions etc.

Matt
--

On Saturday 22 December 2001 02:06 pm, Theodore A. Roth wrote:
> Hi All,
>
> I've just released version 0.0.11 of my avr simulator, Simulavr.
>
> With this release, I've added a curses based display coprocess which gives
> the user a near real time look at the registers and sram while running an
> avr program. I've also fixed a few bugs in the instruction processing and
> redesigned some of the internals to make adding new features easier.
>
> I'm using the simulator as a remote target for avr-gdb in my quest to get
> avr support for gdb working. The simulator seems to be holding up rather
> nicely so far. I've been able to expose some problems with the existing
> avr-gdb patches.
>
> Here's where you can get simulavr and my current gdb patches:
>
> http://res099095.halls.colostate.edu/programs/simulavr
>
> Hope that this is useful for someone out there.
>
> If anyone is interested in helping me sort out the avr-gdb problems I've
> found, please contact me. I can use all the help I can get on this since
> I'm still pretty low on a rather steep learning curve with gdb internals.
>
> Enjoy the holidays.
>
>
> Ted Roth
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

From [email-masked] Mon Dec 24 07:00:44 2001
Received: from deimos.frii.com ([216.17.128.2] helo=deimos.frii.net)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16ICvT-0005rV-00
for <[email-masked]>; Mon, 24 Dec 2001 07:00:43 +1300
Received: from ari-co2c-06.rasserver.net (ari-co2c-06.rasserver.net [207.92.201.6])
by deimos.frii.net (8.12.1/8.12.1) with ESMTP id fBNI2Awv006569
for <[email-masked]>; Sun, 23 Dec 2001 11:02:10 -0700 (MST)
Date: Sun, 23 Dec 2001 11:04:19 -0700 (MST)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
cc: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] simulavr-0.0.11
In-Reply-To: <01122312484901.24654@xena>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I've never used icarus verilog before. I'll have to look into it and get
back to you.

Ted

On Sun, 23 Dec 2001, Matthew Welland wrote:

:)Does anyone on this list have an opinion on whether it might be feasible to
:)hook this simulator into icarus verilog? I would like to be able to simulate
:)with external circuitry and would like to avoid writing a behavoural model of
:)the micro.
:)
:)Thanks for any thoughts, opinions etc.
:)
:)Matt
:)--
:)

From [email-masked] Mon Dec 24 07:18:34 2001
Received: from mail.vasnet.net.in ([202.4.160.7])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16IDCh-0005sq-00
for <[email-masked]>; Mon, 24 Dec 2001 07:18:32 +1300
Received: from zygal ([202.4.161.137])
by mail.vasnet.net.in (8.9.3/8.9.3) with SMTP id XAA21159
for <[email-masked]>; Sun, 23 Dec 2001 23:53:03 -0500
Reply-To: <[email-masked]>
From: "Panther" <[email-masked]>
To: <[email-masked]>
Date: Sun, 23 Dec 2001 23:47:58 +0530
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Importance: Normal
In-Reply-To: <[email-masked]>
Subject: [avr-gcc-list] Did any One get the GCC_AVR to work Under Win98
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

Wishing you a Merry Xmas,

Did any one get to work the "AvrFreaks installation of Avr-Gcc" under win98.
I have tried all possible but still not able to get the build work. it says
Says "Error Detected during link stage. Stopped".

I hope atleast some one on this has got it working? any help would be thank

Srikanth Kamath T

From [email-masked] Mon Dec 24 07:43:31 2001
Received: from sys32.hou.wt.net ([205.230.159.32])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16IDas-0005vJ-00
for <[email-masked]>; Mon, 24 Dec 2001 07:43:31 +1300
Received: from mjones700 (216-119-139-60.ipset19.wt.net [216.119.139.60])
by sys32.hou.wt.net (8.9.1/8.9.1) with SMTP id MAA04366;
Sun, 23 Dec 2001 12:44:58 -0600 (CST)
Message-ID: <001001c18be2$46223040$0100c0a8@mjones700>
From: "Mike Jones" <[email-masked]>
To: <[email-masked]>, <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Did any One get the GCC_AVR to work Under Win98
Date: Sun, 23 Dec 2001 12:47:28 -0600
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I have it working under Win 98. I got a similar message but then just ran
the run.bat per the instructions and everything went just fine.

Mike
----- Original Message -----
From: "Panther" <[email-masked]>
To: <[email-masked]>
Sent: Sunday, December 23, 2001 12:17 PM
Subject: [avr-gcc-list] Did any One get the GCC_AVR to work Under Win98

> Hi,
>
> Wishing you a Merry Xmas,
>
> Did any one get to work the "AvrFreaks installation of Avr-Gcc" under
win98.
> I have tried all possible but still not able to get the build work. it
says
> Says "Error Detected during link stage. Stopped".
>
> I hope atleast some one on this has got it working? any help would be
thank
>
> Srikanth Kamath T
>
>
> _______________________________________________
> avr-gcc-list mailing list
> [email-masked]
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>

From [email-masked] Mon Dec 24 10:14:11 2001
Received: from 207-172-166-56.s56.tnt1.sfrn.ca.dialup.rcn.com ([207.172.166.56] helo=bc.home.246gt.com)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16IFwg-00064s-00
for <[email-masked]>; Mon, 24 Dec 2001 10:14:10 +1300
Received: from fred.home.246gt.com (fred.home.246gt.com [10.0.0.74])
by bc.home.246gt.com (8.11.3/8.11.3) with ESMTP id fBNLFct12943
for <[email-masked]>; Sun, 23 Dec 2001 13:15:38 -0800 (PST)
(envelope-from [email-masked])
Received: (from ken@localhost)
by fred.home.246gt.com (8.11.2/8.11.2) id fBNLFqK07941
for [email-masked]; Sun, 23 Dec 2001 13:15:52 -0800
X-Authentication-Warning: fred.home.246gt.com: ken set sender to [email-masked] using -f
Date: Sun, 23 Dec 2001 13:15:52 -0800
From: ken restivo <[email-masked]>
To: [email-masked]
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: application/pgp; x-action=sign; format=text
Content-Disposition: inline; filename="msg.pgp"
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Wed, Dec 19, 2001 at 04:39:12AM +1300
Subject: [avr-gcc-list] Re: nevermind, re register usage
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

nevermind my last question about register usage. turns out, it *was* a dumb question, and i figured out the answer: using the "register" keyword in my c code did more what i was looking to do.

sorry for wasting bandwidth.

- -ken

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8JkmHe8HF+6xeOIcRAp7YAJ9E1eRnmXC6RpzAcpwHpXO4/9Rq7gCeNmKT
Alu1mvQLsFtDHOhYm639jGg=
=EpVe
-----END PGP SIGNATURE-----

From [email-masked] Wed Dec 26 21:07:54 2001
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16J96Q-0000fM-00
for <[email-masked]>; Wed, 26 Dec 2001 21:07:54 +1300
Received: from jpk1.jpk.co.nz (adsl-200.world-net.co.nz [210.55.228.200])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id fBQ89Wl21188
for <[email-masked]>; Wed, 26 Dec 2001 21:09:32 +1300
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Wed, 26 Dec 2001 21:09:43 +1300
To: [email-masked]
From: Jason Kyle <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: [avr-gcc-list] avr-gcc-list on the move!
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi everyone,

The avr-gcc-list has moved to a new domain, it is now at avr1.org. Send
your posts to [email-masked]

I'm moving house at the end of January and there is no DSL service at the
new place so I can no longer keep avr.jpk.co.nz in it's present form, hence
the changes. Unfortunately I couldn't find a service provider that ran GNU
Mailman so have had to settle for Majordomo which, from an admin
perspective, really sucks by the way.

You should have received a welcome message from Majordomo himself but if
you missed it I have appended the text to this message along with the help
text. Out of the 540 or so subscribers a few will experence some minor
issues such as no digests and multiple copies of list mail, email me at
[email-masked] or alternatively send a few commands to
[email-masked] (not in the subject line!).

At present the Majordomo thing isn't doing archives properly so I am going
to keep avr.jpk.co.nz doing this and ftp'ing the html to avr1.org
periodicly, net result will be achives exactly as you see them now but on
the new domain. My long term goal is to get some form of fixed IP fast
internet service at the new house and change back to Mailman.

Cheers,

Jason Kyle
avr-gcc-list admin

--

Welcome to the avr-gcc-list mailing list!

Please save this message for future reference. Thank you.

If you ever want to remove yourself from this mailing list,
you can send mail to <[email-masked]> with the following
command in the body of your email message:

unsubscribe avr-gcc-list

or from another account, besides [email-masked]:

unsubscribe avr-gcc-list [email-masked]

If you ever need to get in contact with the owner of the list,
(if you have trouble unsubscribing, or have questions about the
list itself) send email to <[email-masked]> .
This is the general rule for most mailing lists when you need
to contact a human.

Here's the general information for the list you've subscribed to,
in case you don't already have it:

END>>>>>

-----

**** Help for [email-masked]:

This help message is being sent to you from the Majordomo mailing list
management system at [email-masked].

This is version 1.94.3 of Majordomo.

If you're familiar with mail servers, an advanced user's summary of
Majordomo's commands appears at the end of this message.

Majordomo is an automated system which allows users to subscribe
and unsubscribe to mailing lists, and to retrieve files from list
archives.

You can interact with the Majordomo software by sending it commands
in the body of mail messages addressed to "[email-masked]".
Please do not put your commands on the subject line; Majordomo does
not process commands in the subject line.

You may put multiple Majordomo commands in the same mail message.
Put each command on a line by itself.

If you use a "signature block" at the end of your mail, Majordomo may
mistakenly believe each line of your message is a command; you will
then receive spurious error messages. To keep this from happening,
either put a line starting with a hyphen ("-") before your signature,
or put a line with just the word

end

on it in the same place. This will stop the Majordomo software from
processing your signature as bad commands.

Here are some of the things you can do using Majordomo:

I. FINDING OUT WHICH LISTS ARE ON THIS SYSTEM

To get a list of publicly-available mailing lists on this system, put the
following line in the body of your mail message to [email-masked]:

lists

Each line will contain the name of a mailing list and a brief description
of the list.

To get more information about a particular list, use the "info" command,
supplying the name of the list. For example, if the name of the list
about which you wish information is "demo-list", you would put the line

info demo-list

in the body of the mail message.

II. SUBSCRIBING TO A LIST

Once you've determined that you wish to subscribe to one or more lists on
this system, you can send commands to Majordomo to have it add you to the
list, so you can begin receiving mailings.

To receive list mail at the address from which you're sending your mail,
simply say "subscribe" followed by the list's name:

subscribe demo-list

If for some reason you wish to have the mailings go to a different address
(a friend's address, a specific other system on which you have an account,
or an address which is more correct than the one that automatically appears
in the "From:" header on the mail you send), you would add that address to
the command. For instance, if you're sending a request from your work
account, but wish to receive "demo-list" mail at your personal account
(for which we will use "[email-masked]" as an example), you'd put
the line

subscribe demo-list [email-masked]

in the mail message body.

Based on configuration decisions made by the list owners, you may be added
to the mailing list automatically. You may also receive notification
that an authorization key is required for subscription. Another message
will be sent to the address to be subscribed (which may or may not be the
same as yours) containing the key, and directing the user to send a
command found in that message back to [email-masked]. (This can be
a bit of extra hassle, but it helps keep you from being swamped in extra
email by someone who forged requests from your address.) You may also
get a message that your subscription is being forwarded to the list owner
for approval; some lists have waiting lists, or policies about who may
subscribe. If your request is forwarded for approval, the list owner
should contact you soon after your request.

Upon subscribing, you should receive an introductory message, containing
list policies and features. Save this message for future reference; it
will also contain exact directions for unsubscribing. If you lose the
intro mail and would like another copy of the policies, send this message
to [email-masked]:

intro demo-list

(substituting, of course, the real name of your list for "demo-list").

III. UNSUBSCRIBING FROM MAILING LISTS

Your original intro message contains the exact command which should be
used to remove your address from the list. However, in most cases, you
may simply send the command "unsubscribe" followed by the list name:

unsubscribe demo-list

(This command may fail if your provider has changed the way your
address is shown in your mail.)

To remove an address other than the one from which you're sending
the request, give that address in the command:

unsubscribe demo-list [email-masked]

In either of these cases, you can tell [email-masked] to remove
the address in question from all lists on this server by using "*"
in place of the list name:

unsubscribe *
unsubscribe * [email-masked]

IV. FINDING THE LISTS TO WHICH AN ADDRESS IS SUBSCRIBED

To find the lists to which your address is subscribed, send this command
in the body of a mail message to [email-masked]:

which

You can look for other addresses, or parts of an address, by specifying
the text for which Majordomo should search. For instance, to find which
users at my-isp.com are subscribed to which lists, you might send the
command

which my-isp.com

Note that many list owners completely or fully disable the "which"
command, considering it a privacy violation.

V. FINDING OUT WHO'S SUBSCRIBED TO A LIST

To get a list of the addresses on a particular list, you may use the
"who" command, followed by the name of the list:

who demo-list

Note that many list owners allow only a list's subscribers to use the
"who" command, or disable it completely, believing it to be a privacy
violation.

VI. RETRIEVING FILES FROM A LIST'S ARCHIVES

Many list owners keep archives of files associated with a list. These
may include:
- back issues of the list
- help files, user profiles, and other documents associated with the list
- daily, monthly, or yearly archives for the list

To find out if a list has any files associated with it, use the "index"
command:

index demo-list

If you see files in which you're interested, you may retrieve them by
using the "get" command and specifying the list name and archive filename.
For instance, to retrieve the files called "profile.form" (presumably a
form to fill out with your profile) and "demo-list.9611" (presumably the
messages posted to the list in November 1996), you would put the lines

get demo-list profile.form
get demo-list demo-list.9611

in your mail to [email-masked].

VII. GETTING MORE HELP

To contact a human site manager, send mail to [email-masked].
To contact the owner of a specific list, send mail to that list's
approval address, which is formed by adding "-approval" to the user-name
portion of the list's address. For instance, to contact the list owner
for [email-masked], you would send mail to [email-masked].

To get another copy of this help message, send mail to [email-masked]
with a line saying

help

in the message body.

VIII. COMMAND SUMMARY FOR ADVANCED USERS

In the description below items contained in []'s are optional. When
providing the item, do not include the []'s around it. Items in angle
brackets, such as <address>, are meta-symbols that should be replaced
by appropriate text without the angle brackets.

It understands the following commands:

subscribe <list> [<address>]
Subscribe yourself (or <address> if specified) to the named <list>.

unsubscribe <list> [<address>]
Unsubscribe yourself (or <address> if specified) from the named <list>.
"unsubscribe *" will remove you (or <address>) from all lists. This
_may not_ work if you have subscribed using multiple addresses.

get <list> <filename>
Get a file related to <list>.

index <list>
Return an index of files you can "get" for <list>.

which [<address>]
Find out which lists you (or <address> if specified) are on.

who <list>
Find out who is on the named <list>.

info <list>
Retrieve the general introductory information for the named <list>.

intro <list>
Retrieve the introductory message sent to new users. Non-subscribers
may not be able to retrieve this.

lists
Show the lists served by this Majordomo server.

help
Retrieve this message.

end
Stop processing commands (useful if your mailer adds a signature).

Commands should be sent in the body of an email message to
"[email-masked]". Multiple commands can be processed provided
each occurs on a separate line.

Commands in the "Subject:" line are NOT processed.

If you have any questions or problems, please contact
"[email-masked]".

From [email-masked] Mon Dec 31 22:58:31 2001
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16KzDD-0007Qd-00
for <avrgcclist@localhost>; Mon, 31 Dec 2001 22:58:31 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Mon, 31 Dec 2001 22:58:31 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBQKFhg07241
for <[email-masked]>; Wed, 26 Dec 2001 14:15:43 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id fBQJ5C430508
for avr-gcc-list-list.japetos; Wed, 26 Dec 2001 13:05:12 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id fBQJ5BB30505
for <[email-masked]>; Wed, 26 Dec 2001 13:05:11 -0600
Received: from smtp.wp.pl (smtp.wp.pl [212.77.101.161])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBQJ5X013026
for <[email-masked]>; Wed, 26 Dec 2001 13:05:33 -0600
Received: (WP-smtpd 9500 invoked from network); 26 Dec 2001 19:04:49 -0000
Received: from unknown (HELO m1p6d4) ([217.30.154.139]) (envelope-sender <kubus???[email-masked]>)
by smtp.wp.pl (WP-smtpd) with SMTP
for <[email-masked]>; 26 Dec 2001 19:04:49 -0000
Message-ID: <002301c18e3f$cbffb020$8b9a1ed9@m1p6d4>
From: =?iso-8859-2?Q?Kubu=B6_Puchatek?= <[email-masked]>
To: <[email-masked]>
Date: Wed, 26 Dec 2001 20:01:59 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0020_01C18E48.2D3DD120"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2479.0006
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2479.0006
Precedence: bulk
Subject: [avr-gcc-list] (no subject)
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.

------=_NextPart_000_0020_01C18E48.2D3DD120
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

------=_NextPart_000_0020_01C18E48.2D3DD120
Content-Type: text/html;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-2">
<META content=3D"MSHTML 6.00.2479.6" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0020_01C18E48.2D3DD120--

From [email-masked] Mon Dec 31 22:58:32 2001
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16KzDE-0007Qd-00
for <avrgcclist@localhost>; Mon, 31 Dec 2001 22:58:32 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Mon, 31 Dec 2001 22:58:32 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBR6o1S25270
for <[email-masked]>; Thu, 27 Dec 2001 00:50:01 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id fBR5Wtb02850
for avr-gcc-list-list.japetos; Wed, 26 Dec 2001 23:32:55 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id fBR5WsB02847
for <[email-masked]>; Wed, 26 Dec 2001 23:32:54 -0600
Received: from mailout08.sul.t-online.com (mailout08.sul.t-online.com [194.25.134.20])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBR5XD201644
for <[email-masked]>; Wed, 26 Dec 2001 23:33:13 -0600
Received: from fwd04.sul.t-online.de
by mailout08.sul.t-online.de with smtp
id 16JT9r-0006F9-01; Thu, 27 Dec 2001 06:32:47 +0100
Received: from vivaldi (520013112276-0001@[217.228.137.171]) by fwd04.sul.t-online.com
with smtp id 16JT9e-2AugiGC; Thu, 27 Dec 2001 06:32:34 +0100
Reply-To: <[email-masked]>
From: [email-masked] (Nicolas Nickisch)
To: <[email-masked]>
Subject: [avr-gcc-list] WG: Searching for a ltoa()-function
Date: Thu, 27 Dec 2001 06:33:30 +0100
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Importance: Normal
X-Sender: [email-masked]
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

-----Ursprüngliche Nachricht-----
Von: Nicolas Nickisch [mailto:[email-masked]]
Gesendet: Mittwoch, 26. Dezember 2001 14:17
An: [email-masked]'
Betreff: Searching for a ltoa()-function

hi,
I am looking for a ltoa-function, similar to the itoa-function.

Does anybody have these functions for the AVRGCC

Merry Christmas, Nicolas Nickisch

avr-gcc-list at http://avr1.org

From [email-masked] Mon Dec 31 22:58:33 2001
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16KzDE-0007Qd-01
for <avrgcclist@localhost>; Mon, 31 Dec 2001 22:58:32 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Mon, 31 Dec 2001 22:58:32 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBT1Lk117474
for <[email-masked]>; Fri, 28 Dec 2001 19:21:46 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id fBT0Upt24824
for avr-gcc-list-list.japetos; Fri, 28 Dec 2001 18:30:51 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id fBT0UoB24821
for <[email-masked]>; Fri, 28 Dec 2001 18:30:50 -0600
Received: from bc.home.246gt.com (208-58-86-11.c3-0.sfo-ubr1.sfrn-sfo.ca.cable.rcn.com [208.58.86.11])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBT0VMu07415
for <[email-masked]>; Fri, 28 Dec 2001 18:31:22 -0600
Received: from fred.home.246gt.com (fred.home.246gt.com [10.0.0.74])
by bc.home.246gt.com (8.11.3/8.11.3) with ESMTP id fBT0Un717441
for <[email-masked]>; Fri, 28 Dec 2001 16:30:49 -0800 (PST)
(envelope-from [email-masked])
Received: (from ken@localhost)
by fred.home.246gt.com (8.11.2/8.11.2) id fBT0V8528711
for [email-masked]; Fri, 28 Dec 2001 16:31:08 -0800
X-Authentication-Warning: fred.home.246gt.com: ken set sender to [email-masked] using -f
Date: Fri, 28 Dec 2001 16:31:07 -0800
From: ken restivo <[email-masked]>
To: [email-masked]
Subject: [avr-gcc-list] avr-gcc generating ldd r31, Z+
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: application/pgp; x-action=sign; format=text
Content-Disposition: inline; filename="msg.pgp"
User-Agent: Mutt/1.2.5i
In-Reply-To: <[email-masked]>; from [email-masked] on Sat, Dec 29, 2001 at 12:33:07PM +1300
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I seem to have found an avr-gcc/as bug, or perhaps I am doing something wrong here.

Here is the relevant section of disassembly:

t = t->next;
152: 07 80 ldd r0, Z+7 ; 0x07
154: f0 85 ldd r31, Z+8 ; 0x08
156: e0 2d mov r30, r0

The databook states that ldd r31, Z+ is undefined, and simulavr is honoring that and halting at instruction 0x154.

But t = t->next seems like a straightforward idiom. It works fine with gcc on i386, of course, and even works in avr-gcc in a simple test program, if the X and Z registers are free for use. But not here, though, for some reason I don't understand.

At this point in the function's execution, most of the call-used registers are in use, and a few of the call-saved registers too... there aren't a lot of free registers floating around. So I could understand if there was simply no place else to put this except to over-use the Z register. But why would avr-gcc use the LDD instruction in a way that is undefined? I would guess that it would move the items in the Z reg out of the way, save stuff onto the stack, or at least fail to compile with an error? I wonder if I am not doing something that I shouldn't be?

Any help or clues would be appreciated.

- -ken

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8LQ7Ke8HF+6xeOIcRArZMAKCdKmRMKTWx3P2DIzah2SCxXQJ1tACfVgkf
q5IXRUWT9woYHnR0fyspRfM=
=cpWJ
-----END PGP SIGNATURE-----
avr-gcc-list at http://avr1.org

From [email-masked] Mon Dec 31 22:58:34 2001
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16KzDF-0007Qd-00
for <avrgcclist@localhost>; Mon, 31 Dec 2001 22:58:33 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Mon, 31 Dec 2001 22:58:33 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBT4L1422541
for <[email-masked]>; Fri, 28 Dec 2001 22:21:01 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id fBT3YET26325
for avr-gcc-list-list.japetos; Fri, 28 Dec 2001 21:34:14 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id fBT3YDB26322
for <[email-masked]>; Fri, 28 Dec 2001 21:34:13 -0600
Received: from fe070.worldonline.dk (fe070.worldonline.dk [212.54.64.208])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id fBT3YkH12560
for <[email-masked]>; Fri, 28 Dec 2001 21:34:46 -0600
Received: (qmail 15185 invoked by uid 0); 29 Dec 2001 03:34:05 -0000
Received: from unknown (HELO worldonline.dk) (212.54.68.169)
by fe070.worldonline.dk with SMTP; 29 Dec 2001 03:34:05 -0000
Message-ID: <[email-masked]>
Date: Sat, 29 Dec 2001 04:32:35 +0100
From: Jens Andersen <[email-masked]>
X-Mailer: Mozilla 4.08 [en] (Win98; I)
MIME-Version: 1.0
To: ken restivo <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] avr-gcc generating ldd r31, Z+
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Ken

I have checked the Atmel instruction set document, and to me it
seems that the gcc generated code is ok.

As i read it, it says that if you load (Z) r30,r31 using the
Z+ (post-increment) or -Z (pre-decrement) form the result is undefined.

The gcc code uses the Z+q (displacement) form of the ldd instruction
which leaves Z unchanged, so it should be ok.

I hope this helps you.

Jens Andersen

ken restivo wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I seem to have found an avr-gcc/as bug, or perhaps I am doing something wrong here.
>
> Here is the relevant section of disassembly:
>
> t = t->next;
> 152: 07 80 ldd r0, Z+7 ; 0x07
> 154: f0 85 ldd r31, Z+8 ; 0x08
> 156: e0 2d mov r30, r0
>
> The databook states that ldd r31, Z+ is undefined, and simulavr is honoring that and halting at instruction 0x154.
>
> But t = t->next seems like a straightforward idiom. It works fine with gcc on i386, of course, and even works in avr-gcc in a simple test program, if the X and Z registers are free for use. But not here, though, for some reason I don't understand.
>
> At this point in the function's execution, most of the call-used registers are in use, and a few of the call-saved registers too... there aren't a lot of free registers floating around. So I could understand if there was simply no place else to put this except to over-use the Z register. But why would avr-gcc use the LDD instruction in a way that is undefined? I would guess that it would move the items in the Z reg out of the way, save stuff onto the stack, or at least fail to compile with an error? I wonder if I am not doing something that I shouldn't be?
>
> Any help or clues would be appreciated.
>
> - -ken
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iD8DBQE8LQ7Ke8HF+6xeOIcRArZMAKCdKmRMKTWx3P2DIzah2SCxXQJ1tACfVgkf
> q5IXRUWT9woYHnR0fyspRfM=
> =cpWJ
> -----END PGP SIGNATURE-----
> avr-gcc-list at http://avr1.org
avr-gcc-list at http://avr1.org

From [email-masked] Mon Dec 31 22:58:35 2001
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16KzDG-0007Qd-00
for <avrgcclist@localhost>; Mon, 31 Dec 2001 22:58:34 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Mon, 31 Dec 2001 22:58:34 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBT4lo127869
for <[email-masked]>; Fri, 28 Dec 2001 22:47:50 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id fBT3u8P26494
for avr-gcc-list-list.japetos; Fri, 28 Dec 2001 21:56:08 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id fBT3u7B26482
for <[email-masked]>; Fri, 28 Dec 2001 21:56:07 -0600
Received: from bc.home.246gt.com (208-58-86-11.c3-0.sfo-ubr1.sfrn-sfo.ca.cable.rcn.com [208.58.86.11])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBT3ue517303
for <[email-masked]>; Fri, 28 Dec 2001 21:56:40 -0600
Received: from fred.home.246gt.com (fred.home.246gt.com [10.0.0.74])
by bc.home.246gt.com (8.11.3/8.11.3) with ESMTP id fBT3u7718670;
Fri, 28 Dec 2001 19:56:07 -0800 (PST)
(envelope-from [email-masked])
Received: (from ken@localhost)
by fred.home.246gt.com (8.11.2/8.11.2) id fBT3uQw30939;
Fri, 28 Dec 2001 19:56:26 -0800
X-Authentication-Warning: fred.home.246gt.com: ken set sender to [email-masked] using -f
Date: Fri, 28 Dec 2001 19:56:26 -0800
From: ken restivo <[email-masked]>
To: Kasper Pedersen <[email-masked]>
Cc: [email-masked], [email-masked]
Subject: Re: [avr-gcc-list] avr-gcc generating ldd r31, Z+
Message-ID: <[email-masked]>
References: <[email-masked]> <[email-masked]> <01e301c19003$de92d170$7000a8c0@noa6>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <01e301c19003$de92d170$7000a8c0@noa6>; from [email-masked] on Sat, Dec 29, 2001 at 01:58:03AM +0100
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Yep, that's exactly the problem.

Ted and I both missed the distinction between Z+ and Z+d, and he's provided a patch to handle LDD correctly.

You are correct, there was nothing wrong with the avr-gcc-generated code.

Thanks for the explanation!

-ken
----------
On Sat, Dec 29, 2001 at 04:32:35AM +0100, Jens Andersen wrote:
> Hi Ken
>
> I have checked the Atmel instruction set document, and to me it
> seems that the gcc generated code is ok.
>
> As i read it, it says that if you load (Z) r30,r31 using the
> Z+ (post-increment) or -Z (pre-decrement) form the result is undefined.
>
> The gcc code uses the Z+q (displacement) form of the ldd instruction
> which leaves Z unchanged, so it should be ok.
>
> I hope this helps you.
>
> Jens Andersen
>
On Sat, Dec 29, 2001 at 01:58:03AM +0100, Kasper Pedersen wrote:
> >I seem to have found an avr-gcc/as bug, or perhaps I am doing something wrong here.
> >Here is the relevant section of disassembly:
> >t = t->next;
> >152: 07 80 ldd r0, Z+7 ; 0x07
> >154: f0 85 ldd r31, Z+8 ; 0x08
> >156: e0 2d mov r30, r0
> >The databook states that ldd r31, Z+ is undefined, and simulavr is honoring that and halting at instruction 0x154.
>
> It makes sense that LD pointer-half,pointer+/-pointer could be undefined as it has two results for one register(and IS specified as
> undefined in the
> datasheet), however "ldd pointer-half,pointer+displacement" at 0x154 in your code has only one result, and IS valid/defined..
>
> So I would guess there's a fluke in simulavr.
>
> /Kasper
>
avr-gcc-list at http://avr1.org

From [email-masked] Mon Dec 31 22:58:36 2001
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16KzDH-0007Qd-00
for <avrgcclist@localhost>; Mon, 31 Dec 2001 22:58:35 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Mon, 31 Dec 2001 22:58:35 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBT5SKx03423
for <[email-masked]>; Fri, 28 Dec 2001 23:28:20 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id fBT4aKk26839
for avr-gcc-list-list.japetos; Fri, 28 Dec 2001 22:36:20 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id fBT4aKB26836
for <[email-masked]>; Fri, 28 Dec 2001 22:36:20 -0600
Received: from deimos.frii.net (deimos.frii.com [216.17.128.2])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBT4arc25698
for <[email-masked]>; Fri, 28 Dec 2001 22:36:53 -0600
Received: from ari-co2c-150.rasserver.net (ari-co2c-150.rasserver.net [207.92.201.150])
by deimos.frii.net (8.12.1/8.12.1) with ESMTP id fBT4aHNC032138
for <[email-masked]>; Fri, 28 Dec 2001 21:36:18 -0700 (MST)
Date: Fri, 28 Dec 2001 21:38:42 -0700 (MST)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>
Subject: Re: [avr-gcc-list] avr-gcc generating ldd r31, Z+
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Just to clarify:

I misread the data sheets. simulavr had the bug, not gcc. I've fixed it.

Ted

On Fri, 28 Dec 2001, ken restivo wrote:

:)Yep, that's exactly the problem.
:)
:)Ted and I both missed the distinction between Z+ and Z+d, and he's
:)provided a patch to handle LDD correctly.
:)
:)You are correct, there was nothing wrong with the avr-gcc-generated code.
:)
:)Thanks for the explanation!
:)
:)-ken

avr-gcc-list at http://avr1.org

From [email-masked] Mon Dec 31 22:58:37 2001
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16KzDI-0007Qd-00
for <avrgcclist@localhost>; Mon, 31 Dec 2001 22:58:36 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Mon, 31 Dec 2001 22:58:36 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBT6iVr18226
for <[email-masked]>; Sat, 29 Dec 2001 00:44:31 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id fBT5wXS27495
for avr-gcc-list-list.japetos; Fri, 28 Dec 2001 23:58:33 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id fBT5wWB27492
for <[email-masked]>; Fri, 28 Dec 2001 23:58:32 -0600
Received: from cpimssmtpu10.email.msn.com (cpimssmtpu10.email.msn.com [207.46.181.85])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBT5x5G09590
for <[email-masked]>; Fri, 28 Dec 2001 23:59:06 -0600
Received: from computer ([63.29.95.228]) by cpimssmtpu10.email.msn.com with Microsoft SMTPSVC(5.0.2195.4617);
Fri, 28 Dec 2001 21:57:26 -0800
Message-ID: <001a01c1902d$d444eee0$e45f1d3f@computer>
From: "Michael Henning" <[email-masked]>
To: <[email-masked]>
Subject: [avr-gcc-list] call and rcall
Date: Sat, 29 Dec 2001 00:58:21 -0500
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-OriginalArrivalTime: 29 Dec 2001 05:57:27.0066 (UTC) FILETIME=[B199CFA0:01C1902D]
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

When compiling programs for the mega series, functions always seem to use
call instead of rcall even though it is still in reach. Is there a way to
have gcc use rcall when appropriate?

Thanks,
Mike H.

avr-gcc-list at http://avr1.org

From [email-masked] Mon Dec 31 22:58:39 2001
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16KzDJ-0007Qd-00
for <avrgcclist@localhost>; Mon, 31 Dec 2001 22:58:37 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Mon, 31 Dec 2001 22:58:37 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBTGP3a20601
for <[email-masked]>; Sat, 29 Dec 2001 10:25:03 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id fBTFeWc32340
for avr-gcc-list-list.japetos; Sat, 29 Dec 2001 09:40:32 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id fBTFeUB32337
for <[email-masked]>; Sat, 29 Dec 2001 09:40:30 -0600
Received: from mail-vie-pub-p.1012internet.at (mail-vie-pub-p.1012internet.at [212.95.31.10])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBTFf5R11512
for <[email-masked]>; Sat, 29 Dec 2001 09:41:06 -0600
Received: from telering.at (dis212067236208.vie.telering.at [212.67.236.208])
by mail-vie-pub-p.1012internet.at (8.9.3/8.9.3) with SMTP id QAA13047
for <[email-masked]>; Sat, 29 Dec 2001 16:40:27 +0100 (MET)
Received: (qmail 1525 invoked by uid 501); 29 Dec 2001 15:38:29 -0000
From: [email-masked]
Reply-To: [email-masked]
To: [email-masked]
Subject: [avr-gcc-list] avr-libc new package with autoconf/automake ready for review.
Date: Sat, 29 Dec 2001 15:42:42 +0100
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
Cc: [email-masked]
MIME-Version: 1.0
Message-Id: <[email-masked]>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by majordomo2.host4u.net id fBTFeVB32338
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I have finsished my work to implement autoconf/automake to the avr-libc.
I have used the last official package avr-libc-20011208.tar.gz.
I have added the autoconf/automake input files and have created a new package.

This is the first version and should be reviewed by the avr-libc maintainers.

THIS PACKAGE IS NOT FOR PUBLIC USE!!!
First it must be accepted by the maintainers.

I hope my changes are acceptable.
I needed to restructure the package according to the autoconf structure.
I haven't changed any source files.
Please read the new files AUTHORS, ChangeLog, install, ... .

I have compared the created object files from the original Makefile and the
ones created by the new Makefiles. There is a small difference in the symbols
section. I couldn't find the reason, but I thing it is because of the
different build methods (with subdirectories or without).

I have compiled the package on my Linux machine. No problems there.
I expect that it would build on any Unix machine. Maybe someone else can test
it on a non Linux machine.

I have no Windows PC. Maybe someone else can test, if the package can be
compiled on Windows, too. It should compile without problems, but maybe I have
forgotten to add some Windows specific autoconf/automake macros.

Any comments are welcome.

You can download the package from my homepage at
http://members.telering.at/jessich/reinhard/avr/avrcross/avr-libc-20011229.tar.gz

Regards,
Reinhard

--
Ing. Reinhard Jessich mailto: [email-masked]
A-1190 Vienna, Goergengasse 2/2/1 phone: +43/1/3692600
http://members.telering.at/jessich mobile: +43/664/1735439
avr-gcc-list at http://avr1.org

From [email-masked] Mon Dec 31 22:58:41 2001
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16KzDK-0007Qd-00
for <avrgcclist@localhost>; Mon, 31 Dec 2001 22:58:38 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Mon, 31 Dec 2001 22:58:38 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBU3LcO24658
for <[email-masked]>; Sat, 29 Dec 2001 21:21:38 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id fBU2j2v05482
for avr-gcc-list-list.japetos; Sat, 29 Dec 2001 20:45:02 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id fBU2j2B05479
for <[email-masked]>; Sat, 29 Dec 2001 20:45:02 -0600
Received: from deimos.frii.net (deimos.frii.com [216.17.128.2])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBU2jdQ17115
for <[email-masked]>; Sat, 29 Dec 2001 20:45:39 -0600
Received: from ari-co2c-30.rasserver.net (ari-co2c-30.rasserver.net [207.92.201.30])
by deimos.frii.net (8.12.1/8.12.1) with ESMTP id fBU2ix5w073670
for <[email-masked]>; Sat, 29 Dec 2001 19:45:00 -0700 (MST)
Date: Sat, 29 Dec 2001 19:47:29 -0700 (MST)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: AVR GCC List <[email-masked]>
Subject: [avr-gcc-list] gdb-5.1 patch 0.0-pre7 available
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi All,

I've got a new gdb-5.1 patch available for mass consumption. It's been
rewritten to use the gdbarch facilities. This looks to be the direction
that gdb is headed, so it might make it easier to get this patch merged in
when it ready.

This is still a pre-release patch. There's still a few little details that
need to be cleaned, but overall it seems to be working extremely well. I
know of at least one person that is using it with my simulator to do real
debugging work on his project.

Now I need people to try it out and review it so I can find/fix any
remaining bugs I haven't come across yet.

For those of you still using avrmon-stk200, this patch will not work for
you. I had to remove the avrmon parts due to them using deprecated stuff.
This isn't as bad as it seems though. I've looked at the avrmon-stk200
host program code and I don't see why it couldn't be re-worked to use
gdb's remote serial protocol. I think in the long run that might be the
better approach. I'm interested in exactly how many people are still using
avrmon. Please email me. If enough of you ask, I might try to do the work
on avrmon myself (although I'd rather the avrmon maintainer did it).

For those of you using Scott Finneran's Avarice program, this patch should
work for you. Please note though that Scott is having some problems with
it. I've not had any problems myself except with a rather large program he
sent me. Except for the program he sent me, I haven't been able to
duplicate the problem. I'd would really help us for avarice users to try
this patch and let me know how it works for you.

Here's where you can get the patch:

http://res099095.halls.colostate.edu/programs/simulavr/gdb-patches/
gdb-5.1-avr-patch-0.0-pre7

Ted Roth

avr-gcc-list at http://avr1.org

From [email-masked] Mon Dec 31 22:58:44 2001
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16KzDM-0007Qd-00
for <avrgcclist@localhost>; Mon, 31 Dec 2001 22:58:40 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Mon, 31 Dec 2001 22:58:40 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBUJN0K07715
for <[email-masked]>; Sun, 30 Dec 2001 13:23:00 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id fBUIf0a16013
for avr-gcc-list-list.japetos; Sun, 30 Dec 2001 12:41:00 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id fBUIf0B16006
for <[email-masked]>; Sun, 30 Dec 2001 12:41:00 -0600
Received: from deimos.frii.net (deimos.frii.com [216.17.128.2])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBUIfek32213
for <[email-masked]>; Sun, 30 Dec 2001 12:41:40 -0600
Received: from ari-co2b-14.rasserver.net (ari-co2b-14.rasserver.net [207.92.200.142])
by deimos.frii.net (8.12.1/8.12.1) with ESMTP id fBUIevEt058334
for <[email-masked]>; Sun, 30 Dec 2001 11:40:58 -0700 (MST)
Date: Sun, 30 Dec 2001 11:43:27 -0700 (MST)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: AVR GCC List <[email-masked]>
Subject: [avr-gcc-list] simulavr-0.0.12 released
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi All,

I just released simulavr-0.0.12.

This fixes a few bugs in instruction handlers and has few code and
documentation cleanups.

This release seems to work pretty well with my latest gdb-5.1 patch.

Here's the url:

http://res099095.halls.colostate.edu/programs/simulavr/

Ted

avr-gcc-list at http://avr1.org

From [email-masked] Mon Dec 31 22:58:41 2001
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16KzDL-0007Qd-00
for <avrgcclist@localhost>; Mon, 31 Dec 2001 22:58:39 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Mon, 31 Dec 2001 22:58:39 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBUFF9507335
for <[email-masked]>; Sun, 30 Dec 2001 09:15:09 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id fBUEX9014030
for avr-gcc-list-list.japetos; Sun, 30 Dec 2001 08:33:09 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id fBUEX8B14027
for <[email-masked]>; Sun, 30 Dec 2001 08:33:08 -0600
Received: from mail-vie-pub-p.1012internet.at (mail-vie-pub-p.1012internet.at [212.95.31.10])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBUEXlA16989
for <[email-masked]>; Sun, 30 Dec 2001 08:33:47 -0600
Received: from telering.at (dis212095026118.vie.telering.at [212.95.26.118])
by mail-vie-pub-p.1012internet.at (8.9.3/8.9.3) with SMTP id PAA11013
for <[email-masked]>; Sun, 30 Dec 2001 15:33:01 +0100 (MET)
Received: (qmail 12897 invoked by uid 501); 30 Dec 2001 14:31:00 -0000
From: [email-masked]
Reply-To: [email-masked]
To: [email-masked]
Subject: [avr-gcc-list] AVR-gcc cross compiler script
Date: Sun, 30 Dec 2001 15:15:24 +0100
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
MIME-Version: 1.0
Message-Id: <[email-masked]>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by majordomo2.host4u.net id fBUEX8B14028
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is the announcement of my new cross compiler script to build the avr-gcc
on any Unix machine. I have tested it only Linux, but I have added some
Solaris specifc parts.

Why this script?
I tried to build the C++ compiler, but this failed.
I have done such a script some months ago for a MinGW cross compiler and now it
is used from many people.
There are some people on the net, which are not familar with building
compilers and all the necessary options.

The script is dummy proof and does really all, including the loading of the
sources from the net and the build of the avr-libc.
Have a look to may hompage and read more details there.

You can find the description and the script at:
http://members.telering.at/jessich/reinhard/avr/index.html
-> AVR Cross Compiler

I have done only a few compile tests. It would be nice if someone can check the
new cross compiler with a bigger project.

Any comments are welcome.

Regards,
Reinhard

--
Ing. Reinhard Jessich mailto: [email-masked]
A-1190 Vienna, Goergengasse 2/2/1 phone: +43/1/3692600
http://members.telering.at/jessich mobile: +43/664/1735439
avr-gcc-list at http://avr1.org

From [email-masked] Mon Dec 31 22:58:44 2001
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16KzDN-0007Qd-00
for <avrgcclist@localhost>; Mon, 31 Dec 2001 22:58:41 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Mon, 31 Dec 2001 22:58:41 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBUKcxC22750
for <[email-masked]>; Sun, 30 Dec 2001 14:38:59 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id fBUJwvo16599
for avr-gcc-list-list.japetos; Sun, 30 Dec 2001 13:58:57 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id fBUJwuB16596
for <[email-masked]>; Sun, 30 Dec 2001 13:58:56 -0600
Received: from mail-vie-pub-p.1012internet.at (mail-vie-pub-p.1012internet.at [212.95.31.10])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBUJxa014802
for <[email-masked]>; Sun, 30 Dec 2001 13:59:36 -0600
Received: from telering.at (dis212067236111.vie.telering.at [212.67.236.111])
by mail-vie-pub-p.1012internet.at (8.9.3/8.9.3) with SMTP id UAA01706
for <[email-masked]>; Sun, 30 Dec 2001 20:58:53 +0100 (MET)
Received: (qmail 950 invoked by uid 501); 30 Dec 2001 19:56:54 -0000
From: [email-masked]
Reply-To: [email-masked]
To: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] simulavr-0.0.12 released
Date: Sun, 30 Dec 2001 20:53:24 +0100
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
References: <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Message-Id: <[email-masked]>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by majordomo2.host4u.net id fBUJwuB16597
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Sun, 30 Dec 2001, Theodore A. Roth wrote:
> Here's the url:
>
> http://res099095.halls.colostate.edu/programs/simulavr/
I haven't found it on the page, but I could load it with
wget http://res099095.halls.colostate.edu/programs/simulavr/simulavr-0.0.12.tar.gz
Maybe you could add it to the page.

Regards,
Reinhard

--
Ing. Reinhard Jessich mailto: [email-masked]
A-1190 Vienna, Goergengasse 2/2/1 phone: +43/1/3692600
http://members.telering.at/jessich mobile: +43/664/1735439
avr-gcc-list at http://avr1.org

From [email-masked] Mon Dec 31 22:58:46 2001
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16KzDP-0007Qd-00
for <avrgcclist@localhost>; Mon, 31 Dec 2001 22:58:43 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Mon, 31 Dec 2001 22:58:43 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBV1MX630252
for <[email-masked]>; Sun, 30 Dec 2001 19:22:33 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id fBV0oIl19271
for avr-gcc-list-list.japetos; Sun, 30 Dec 2001 18:50:18 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id fBV0oHB19268
for <[email-masked]>; Sun, 30 Dec 2001 18:50:17 -0600
Received: from mail-vie-pub-p.1012internet.at (mail-vie-pub-p.1012internet.at [212.95.31.10])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBV0ovK13806
for <[email-masked]>; Sun, 30 Dec 2001 18:50:57 -0600
Received: from telering.at (dis212095024035.vie.telering.at [212.95.24.35])
by mail-vie-pub-p.1012internet.at (8.9.3/8.9.3) with SMTP id BAA21856
for <[email-masked]>; Mon, 31 Dec 2001 01:50:12 +0100 (MET)
Received: (qmail 24057 invoked by uid 501); 31 Dec 2001 00:46:41 -0000
From: [email-masked]
Reply-To: [email-masked]
To: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] simulavr-0.0.12 released
Date: Mon, 31 Dec 2001 01:14:36 +0100
X-Mailer: KMail [version 1.0.29.2]
Content-Type: Multipart/Mixed;
boundary="Boundary-=_zOwKkYHIDdqSCDXrJmOWFrxsjyBl"
References: <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Message-Id: <[email-masked]>
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--Boundary-=_zOwKkYHIDdqSCDXrJmOWFrxsjyBl
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

> This release seems to work pretty well with my latest gdb-5.1 patch.

I have compiled gdb -> no problems.
I have compiled simulavr -> small problems, because I am building in a
subdirectory build and this is not fully supported by the package. I have
attached a patch to allow this type of build.
I had a problem with the html toc file. The patch will fix also this one.=
I
think this is because I am using a Mandrake Linux 7.1 system. My tex2html
produces the toc file with a different name. It should still run on your =
system.
I have also added the target pdf in the main Makefile.am to allow the bui=
ld of
the pdf documentation from the main directory.

Then I run simulavr in gdbmode and avr-gdb with the demo.c program.
I could load it, set a break point and step through the loop. Then I cont=
inued
without a breakpoint. The program runs to into the endless loop.
Then I tried to interrupt gdb <cntrl-c>. This worked (after a while), but=
I
couldn't run the program again.

Please tell me how to restart a simulation session without restarting sim=
ulavr
and reloading the program.

At this early point it is impressive for me how far the simulator and the=
gdb
support is.
I will now start to do some test with ddd, avr-gdb and simulavr.

You have done a good job, thank you!!!

Regards,
Reinhard

--=20
Ing. Reinhard Jessich mailto: [email-masked]
A-1190 Vienna, Goergengasse 2/2/1 phone: +43/1/3692600
http://members.telering.at/jessich mobile: +43/664/1735439

--Boundary-=_zOwKkYHIDdqSCDXrJmOWFrxsjyBl
Content-Type: text/x-makefile;
name="simulavr-0.0.12.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="simulavr-0.0.12.patch"

ZGlmZiAtTmF1ciBzaW11bGF2ci0wLjAuMTIub3JpL01ha2VmaWxlLmFtIHNpbXVsYXZyLTAuMC4x
Mi9NYWtlZmlsZS5hbQotLS0gc2ltdWxhdnItMC4wLjEyLm9yaS9NYWtlZmlsZS5hbQlUdWUgRGVj
IDExIDAxOjMxOjA3IDIwMDEKKysrIHNpbXVsYXZyLTAuMC4xMi9NYWtlZmlsZS5hbQlNb24gRGVj
IDMxIDAwOjUwOjQ5IDIwMDEKQEAgLTQ2LDMgKzQ2LDYgQEAKIAlmb3IgZmlsZSBpbiAkKEFVWF9E
SVNUKSAkKEFVWF9ESVNUX0VYVFJBKTsgZG8gXAogCQljcCAkJGZpbGUgJChkaXN0ZGlyKS8kJGZp
bGU7IFwKIAlkb25lCisKK3BkZjoKKwkoY2QgZG9jICYmICQoTUFLRSkgJChBTV9NQUtFRkxBR1Mp
IHBkZikKZGlmZiAtTmF1ciBzaW11bGF2ci0wLjAuMTIub3JpL01ha2VmaWxlX0FWUl9SdWxlcyBz
aW11bGF2ci0wLjAuMTIvTWFrZWZpbGVfQVZSX1J1bGVzCi0tLSBzaW11bGF2ci0wLjAuMTIub3Jp
L01ha2VmaWxlX0FWUl9SdWxlcwlTdW4gRGVjIDMwIDE5OjA2OjI0IDIwMDEKKysrIHNpbXVsYXZy
LTAuMC4xMi9NYWtlZmlsZV9BVlJfUnVsZXMJU3VuIERlYyAzMCAyMzo0MzoyMyAyMDAxCkBAIC0y
Nyw3ICsyNyw3IEBACiAKIERFRlMgICAgICAgICAgICAgICAgID0KIENGTEFHUyAgICAgICAgICAg
ICAgID0gLWcgLVdhbGwgJChBVlJfVEFSR0VUKQotSU5DTFVERVMgICAgICAgICAgICAgPSAkKEFW
Ul9JTkNfRElSKQorSU5DTFVERVMgICAgICAgICAgICAgPSAtSSQoc3JjZGlyKSAkKEFWUl9JTkNf
RElSKQogQ0MgICAgICAgICAgICAgICAgICAgPSAkKEFWUl9DQykKIAogLmVsZi5oZXg6CkBAIC00
MCw3ICs0MCw3IEBACiAJJChBVlJfT0JKRFVNUCkgLWggLVMgLUQgLS1zdGFicyAtLWRpc2Fzc2Vt
YmxlLXplcm9lcyAkPCA+ICRACiAKIC5hc20uZWxmOgotCSQoQVZSX0FTKSAkKEFWUl9UQVJHRVQp
IC1vICRAICQ8CisJJChBVlJfQVMpICQoQVZSX1RBUkdFVCkgJChJTkNMVURFUykgLW8gJEAgJDwK
IAogU1VGRklYRVMgPSAuYXNtIC5lbGYgLmhleCAuYmluIC5sc3QKIApkaWZmIC1OYXVyIHNpbXVs
YXZyLTAuMC4xMi5vcmkvZG9jL01ha2VmaWxlLmFtIHNpbXVsYXZyLTAuMC4xMi9kb2MvTWFrZWZp
bGUuYW0KLS0tIHNpbXVsYXZyLTAuMC4xMi5vcmkvZG9jL01ha2VmaWxlLmFtCVRodSBEZWMgIDYg
MDI6MzQ6NTUgMjAwMQorKysgc2ltdWxhdnItMC4wLjEyL2RvYy9NYWtlZmlsZS5hbQlNb24gRGVj
IDMxIDAwOjM5OjU2IDIwMDEKQEAgLTE4LDkgKzE4LDE1IEBACiAjIFJ1bGUgZm9yIGdlbmVyYXRp
bmcgaHRtbCBvdXRwdXQuCiBodG1sOiAkKGluZm9fVEVYSU5GT1MpCiAJbWtkaXIgLXAgaHRtbAot
CXRleGkyaHRtbCAtc3BsaXRfbm9kZSAkKGluZm9fVEVYSU5GT1MpCisJdGV4aTJodG1sIC1zcGxp
dF9ub2RlICQoc3JjZGlyKS8kKGluZm9fVEVYSU5GT1MpCiAJbXYgKi5odG1sIGh0bWwKLQljcCBo
dG1sL3NpbXVsYXZyLmh0bWwgaHRtbC9pbmRleC5odG1sCisJaWYgdGVzdCAtZiBodG1sL3NpbXVs
YXZyLmh0bWwgOyB0aGVuIFwKKwkgICBjcCBodG1sL3NpbXVsYXZyLmh0bWwgaHRtbC9pbmRleC5o
dG1sIDsgXAorCWVsc2UgXAorCSAgIGlmIHRlc3QgLWYgaHRtbC9zaW11bGF2cl90b2MuaHRtbCA7
IHRoZW4gXAorCSAgICAgIGNwIGh0bWwvc2ltdWxhdnJfdG9jLmh0bWwgaHRtbC9pbmRleC5odG1s
IDsgXAorCSAgIGZpIFwKKwlmaQogCiAjCiAjIEknbSBub3QgZ2VuZXJhdGluZyBQREYgZmlsZXMg
YnkgZGVmYXVsdC4gcGRmdGV4IHNlZW1zIHRvCg==

--Boundary-=_zOwKkYHIDdqSCDXrJmOWFrxsjyBl--
avr-gcc-list at http://avr1.org

From [email-masked] Mon Dec 31 22:58:46 2001
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16KzDO-0007Qd-00
for <avrgcclist@localhost>; Mon, 31 Dec 2001 22:58:42 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Mon, 31 Dec 2001 22:58:42 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBUKiPC23787
for <[email-masked]>; Sun, 30 Dec 2001 14:44:25 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id fBUK1Q416651
for avr-gcc-list-list.japetos; Sun, 30 Dec 2001 14:01:26 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id fBUK1PB16648
for <[email-masked]>; Sun, 30 Dec 2001 14:01:25 -0600
Received: from mail-vie-pub-p.1012internet.at (mail-vie-pub-p.1012internet.at [212.95.31.10])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBUK26g15640
for <[email-masked]>; Sun, 30 Dec 2001 14:02:06 -0600
Received: from telering.at (dis212067236111.vie.telering.at [212.67.236.111])
by mail-vie-pub-p.1012internet.at (8.9.3/8.9.3) with SMTP id VAA02616
for <[email-masked]>; Sun, 30 Dec 2001 21:01:23 +0100 (MET)
Received: (qmail 953 invoked by uid 501); 30 Dec 2001 19:59:25 -0000
From: [email-masked]
Reply-To: [email-masked]
To: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] simulavr-0.0.12 released
Date: Sun, 30 Dec 2001 20:53:24 +0100
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
References: <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Message-Id: <[email-masked]>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by majordomo2.host4u.net id fBUK1PB16649
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Sun, 30 Dec 2001, Theodore A. Roth wrote:

Sorry, my browser didn't reload the page.
I have found it after a shift reload.

Regards,
Reinhard

--
Ing. Reinhard Jessich mailto: [email-masked]
A-1190 Vienna, Goergengasse 2/2/1 phone: +43/1/3692600
http://members.telering.at/jessich mobile: +43/664/1735439
avr-gcc-list at http://avr1.org

From [email-masked] Thu Jan 03 11:29:26 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16Ltt0-0001VD-00
for <avrgcclist@localhost>; Thu, 03 Jan 2002 11:29:26 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Thu, 03 Jan 2002 11:29:26 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBVC41026910
for <[email-masked]>; Mon, 31 Dec 2001 06:04:01 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id fBVBRan23973
for avr-gcc-list-list.japetos; Mon, 31 Dec 2001 05:27:36 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id fBVBRaB23970
for <[email-masked]>; Mon, 31 Dec 2001 05:27:36 -0600
Received: from mail-vie-pub-p.1012internet.at (mail-vie-pub-p.1012internet.at [212.95.31.10])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBVBSJk20047
for <[email-masked]>; Mon, 31 Dec 2001 05:28:19 -0600
Received: from telering.at (dis212067236056.vie.telering.at [212.67.236.56])
by mail-vie-pub-p.1012internet.at (8.9.3/8.9.3) with SMTP id MAA25679
for <[email-masked]>; Mon, 31 Dec 2001 12:27:33 +0100 (MET)
Received: (qmail 1018 invoked by uid 501); 31 Dec 2001 11:25:34 -0000
From: [email-masked]
Reply-To: [email-masked]
To: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] simulavr-0.0.12 released
Date: Sun, 30 Dec 2001 20:53:24 +0100
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
References: <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Message-Id: <[email-masked]>
Cc: <[email-masked]>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by majordomo2.host4u.net id fBVBRaB23971
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Sun, 30 Dec 2001, Theodore A. Roth wrote:

Sorry, my browser didn't reload the page.
I have found it after a shift reload.

Regards,
Reinhard

--
Ing. Reinhard Jessich mailto: [email-masked]
A-1190 Vienna, Goergengasse 2/2/1 phone: +43/1/3692600
http://members.telering.at/jessich mobile: +43/664/1735439
avr-gcc-list at http://avr1.org

From [email-masked] Thu Jan 03 11:29:27 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16Ltt1-0001VD-00
for <avrgcclist@localhost>; Thu, 03 Jan 2002 11:29:27 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Thu, 03 Jan 2002 11:29:27 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBVLdOk10804
for <[email-masked]>; Mon, 31 Dec 2001 15:39:24 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id fBVKKtL28325
for avr-gcc-list-list.japetos; Mon, 31 Dec 2001 14:20:55 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id fBVKKsB28322
for <[email-masked]>; Mon, 31 Dec 2001 14:20:54 -0600
Received: from bc.home.246gt.com (208-58-86-11.c3-0.sfo-ubr1.sfrn-sfo.ca.cable.rcn.com [208.58.86.11])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBVKLdt24047
for <[email-masked]>; Mon, 31 Dec 2001 14:21:39 -0600
Received: from fred.home.246gt.com (fred.home.246gt.com [10.0.0.74])
by bc.home.246gt.com (8.11.3/8.11.3) with ESMTP id fBVKKs777659
for <[email-masked]>; Mon, 31 Dec 2001 12:20:54 -0800 (PST)
(envelope-from [email-masked])
Received: (from ken@localhost)
by fred.home.246gt.com (8.11.2/8.11.2) id fBVKLEf32483
for [email-masked]; Mon, 31 Dec 2001 12:21:14 -0800
X-Authentication-Warning: fred.home.246gt.com: ken set sender to [email-masked] using -f
Date: Mon, 31 Dec 2001 12:21:14 -0800
From: ken restivo <[email-masked]>
To: [email-masked]
Subject: [avr-gcc-list] Strange printf_P behaviour
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: application/pgp; x-action=sign; format=text
Content-Disposition: inline; filename="msg.pgp"
User-Agent: Mutt/1.2.5i
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I am trying to use the printf_P code that came in the contrib directory of avr-libc, and am seeing some very odd behaviour that is breaking my app. It looks like this code has been out for a while, so I'm posting to find out if anyone has also seen it, or knows of fixes or workarounds, before I start working on fixing it myself. It is also possible I'm doing something wrong.

This works just fine...

printf("this is not %d broken.\n", 2);
sei();
while(1);

... although it performs a bunch of pop's after the sei and before the while(1) loop, which doesn't cause problems here, but it does later.

But the problem is that this turns interrupts OFF:
printf("why is %d this %d broken?\n", 2, 3);
sei();
while(1);

The disassembly shows that avr-gcc is disabling interrupts AFTER the sei instruction, probably in an attempt to clean up the stack, which is full of leftover mung from having called printf with a couple args.

sei();
94: 78 94 sei

while(1);
96: ad b7 in r26, 0x3d ; 61
98: be b7 in r27, 0x3e ; 62
9a: 16 96 adiw r26, 0x06 ; 6
9c: 0f b6 in r0, 0x3f ; 63
9e: f8 94 cli
a0: be bf out 0x3e, r27 ; 62
a2: 0f be out 0x3f, r0 ; 63
a4: ad bf out 0x3d, r26 ; 61
a6: ff cf rjmp .-2 ; 0xa6

What I don't understand, is why the optimizer put all this stuff after the sei call? Am I doing something wrong? Is there a workaround?

- -ken
- --
- ------------------
One world. Many gods. Plenty for everyone.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8MMi5e8HF+6xeOIcRAilRAJ9Rapx4VmuELjDZofCRDaroHrSi9ACgvOy1
DNlxfezteaRDcHx1eIWHByQ=
=YdS4
-----END PGP SIGNATURE-----
avr-gcc-list at http://avr1.org

From [email-masked] Thu Jan 03 11:29:28 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16Ltt2-0001VD-00
for <avrgcclist@localhost>; Thu, 03 Jan 2002 11:29:28 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Thu, 03 Jan 2002 11:29:28 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBVNJd031194
for <[email-masked]>; Mon, 31 Dec 2001 17:19:39 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id fBVMYQl29288
for avr-gcc-list-list.japetos; Mon, 31 Dec 2001 16:34:26 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id fBVMYQB29285
for <[email-masked]>; Mon, 31 Dec 2001 16:34:26 -0600
Received: from henry.amplepower.com (sense-smead-139.oz.net [216.39.162.139])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id fBVMZAv23061
for <[email-masked]>; Mon, 31 Dec 2001 16:35:10 -0600
Received: from mail.amplepower.com ([email-masked] [192.168.8.220])
by henry.amplepower.com (8.8.7/8.8.7) with ESMTP id OAA19381;
Mon, 31 Dec 2001 14:33:09 -0800
Date: Mon, 31 Dec 2001 14:33:09 -0800 (PST)
From: David Smead <[email-masked]>
To: ken restivo <[email-masked]>
cc: <[email-masked]>
Subject: Re: [avr-gcc-list] Strange printf_P behaviour
In-Reply-To: <[email-masked]>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Does this really require PGP attachments?

--
Sincerely,

David Smead
http://www.amplepower.com.

On Mon, 31 Dec 2001, ken restivo wrote:

[NON-Text Body part not included]

avr-gcc-list at http://avr1.org

From [email-masked] Thu Jan 03 11:29:30 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16Ltt3-0001VD-00
for <avrgcclist@localhost>; Thu, 03 Jan 2002 11:29:29 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Thu, 03 Jan 2002 11:29:29 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g022uCl06049
for <[email-masked]>; Tue, 1 Jan 2002 20:56:12 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g022DjJ09461
for avr-gcc-list-list.japetos; Tue, 1 Jan 2002 20:13:45 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g022DiB09458
for <[email-masked]>; Tue, 1 Jan 2002 20:13:44 -0600
Received: from deimos.frii.net (deimos.frii.com [216.17.128.2])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g022EZ719639
for <[email-masked]>; Tue, 1 Jan 2002 20:14:35 -0600
Received: from falcon.frii.com (ari-co2b-46.rasserver.net [207.92.200.174])
by deimos.frii.net (8.12.1/8.12.1) with SMTP id g022DflA082143;
Tue, 1 Jan 2002 19:13:42 -0700 (MST)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <[email-masked]>
Date: Tue, 1 Jan 2002 19:14:02 -0700 (MST)
From: Daniel Herrington <[email-masked]>
To: AVR-GCC Mailing List <[email-masked]>
Subject: [avr-gcc-list] atmega163 support in avr-gcc?
X-Mailer: VM 6.75 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I'm brand new to avr-gcc, and I'm wondering... does it support the
ATmega163?

Thanks,
Daniel

Daniel Herrington, KC0IFV
http://www.frii.com/~dclrh
Home of Herky, my robot.

avr-gcc-list at http://avr1.org

From [email-masked] Thu Jan 03 11:29:31 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16Ltt5-0001VD-00
for <avrgcclist@localhost>; Thu, 03 Jan 2002 11:29:31 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Thu, 03 Jan 2002 11:29:31 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g024il701712
for <[email-masked]>; Tue, 1 Jan 2002 22:44:48 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0245fv10448
for avr-gcc-list-list.japetos; Tue, 1 Jan 2002 22:05:41 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0245eB10445
for <[email-masked]>; Tue, 1 Jan 2002 22:05:40 -0600
Received: from cpimssmtpu02.email.msn.com (cpimssmtpu02.email.msn.com [207.46.181.78])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0246V008452
for <[email-masked]>; Tue, 1 Jan 2002 22:06:31 -0600
Received: from computer ([63.29.96.14]) by cpimssmtpu02.email.msn.com with Microsoft SMTPSVC(5.0.2195.4617);
Tue, 1 Jan 2002 20:04:33 -0800
Message-ID: <001701c19342$b9d42fe0$0e601d3f@computer>
From: "Michael Henning" <[email-masked]>
To: "Daniel Herrington" <[email-masked]>,
"AVR-GCC Mailing List" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] atmega163 support in avr-gcc?
Date: Tue, 1 Jan 2002 23:05:30 -0500
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-OriginalArrivalTime: 02 Jan 2002 04:04:34.0411 (UTC) FILETIME=[966FABB0:01C19342]
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

----- Original Message -----
From: "Daniel Herrington" <[email-masked]>
To: "AVR-GCC Mailing List" <[email-masked]>
Sent: Tuesday, January 01, 2002 9:14 PM
Subject: [avr-gcc-list] atmega163 support in avr-gcc?

> I'm brand new to avr-gcc, and I'm wondering... does it support the
> ATmega163?

Yes, it does.

Mike H.

avr-gcc-list at http://avr1.org

From [email-masked] Thu Jan 03 11:34:22 2002
Received: from web12305.mail.yahoo.com ([216.136.173.103])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 16Ltxl-0001Wq-00
for <[email-masked]>; Thu, 03 Jan 2002 11:34:22 +1300
Message-ID: <[email-masked]>
Received: from [66.32.78.192] by web12305.mail.yahoo.com via HTTP; Wed, 02 Jan 2002 14:36:33 PST
Date: Wed, 2 Jan 2002 14:36:33 -0800 (PST)
From: Steve Joiner <[email-masked]>
Reply-To: [email-masked]
Subject: Re: [avr-gcc-list] atmega163 support in avr-gcc?
To: [email-masked]
In-Reply-To: <001701c19342$b9d42fe0$0e601d3f@computer>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Actually, I was wondering this too. More specifically, does it support
the hardware multiplier?

(1) if I do z = x * y; will it use the multiplier?
(2) is the math library set up to use the multiplier (e.g., sin(),
cos())?

Thanks,
Steve Joiner
[email-masked]

--- Michael Henning <[email-masked]> wrote:
>
> ----- Original Message -----
> From: "Daniel Herrington" <[email-masked]>
> To: "AVR-GCC Mailing List" <[email-masked]>
> Sent: Tuesday, January 01, 2002 9:14 PM
> Subject: [avr-gcc-list] atmega163 support in avr-gcc?
>
>
> > I'm brand new to avr-gcc, and I'm wondering... does it support the
> > ATmega163?
>
> Yes, it does.
>
> Mike H.
>
> avr-gcc-list at http://avr1.org

__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

From [email-masked] Wed Jan 09 22:36:40 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFA0-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:36:40 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:36:40 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g060ubr28855
for <[email-masked]>; Sat, 5 Jan 2002 18:56:37 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g060HsK26139
for avr-gcc-list-list.japetos; Sat, 5 Jan 2002 18:17:54 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g060HrB26136
for <[email-masked]>; Sat, 5 Jan 2002 18:17:53 -0600
Received: from mail-vie-pub-p.1012internet.at (mail-vie-pub-p.1012internet.at [212.95.31.10])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g060J1p21264
for <[email-masked]>; Sat, 5 Jan 2002 18:19:01 -0600
Received: from telering.at (dis212095009188.vie.telering.at [212.95.9.188])
by mail-vie-pub-p.1012internet.at (8.9.3/8.9.3) with SMTP id BAA08199
for <[email-masked]>; Sun, 6 Jan 2002 01:17:49 +0100 (MET)
Received: (qmail 28693 invoked by uid 501); 6 Jan 2002 00:15:48 -0000
From: [email-masked]
Reply-To: [email-masked]
To: [email-masked], [email-masked]
Subject: [avr-gcc-list] avr-gcc, avr-gdb and simulavr building scripts
Date: Sun, 6 Jan 2002 00:55:37 +0100
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
MIME-Version: 1.0
Message-Id: <[email-masked]>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by majordomo2.host4u.net id g060HrB26137
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is the announcement of the newest versions of my scripts to build the
avr-gcc, avr-gdb and simulavr.

The scripts should run on any Unix machine. I have tested it only Linux, but I
have added some Solaris specifc parts.

The avr-gcc script is dummy proof and does really all, including the loading of
the sources from the net and the build of the avr-libc.

For those of you which have already loaded a previouse version of the
avr-gcc script:
I have changed some options see the ChangeLog.
It is not necessary to update to the newest version. I build now libc with
the -g option for C files. That't the only real change.

The avr-gdb and simulavr scripts are completely new.
The will also load the sources and patching them.
I expect a newer version in some days, because there is heavy developing in
avr-gdb and simulavr. The current version of simulavr includes all known
changes and patches mentioned on the simulavr-devel list.

Have a look to my hompage and read more details there.

You can find the description and the scripts at:
http://members.telering.at/jessich/reinhard/avr/index.html
-> AVR GCC
-> AVR GDB
-> AVR Simulator

I have compiled the libc and the test programs of simulavr with the avr-gcc.
avr-g++ is currently not working. I need to track down why, the old version
worked.

It would be nice if someone can check the new scripts on other Unixes.
I am interrested to hear if it works on Solaris.

Any comments are welcome.

Regards,
Reinhard

--
Ing. Reinhard Jessich mailto: [email-masked]
A-1190 Vienna, Goergengasse 2/2/1 phone: +43/1/3692600
http://members.telering.at/jessich mobile: +43/664/1735439
avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:36:42 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFA2-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:36:42 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:36:42 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0642W732686
for <[email-masked]>; Sat, 5 Jan 2002 22:02:32 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0638PV27501
for avr-gcc-list-list.japetos; Sat, 5 Jan 2002 21:08:25 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0638PB27498
for <[email-masked]>; Sat, 5 Jan 2002 21:08:25 -0600
Received: from mail.netic.de (mail.s.netic.de [212.9.160.11])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0639XN22131
for <[email-masked]>; Sat, 5 Jan 2002 21:09:34 -0600
Received: by mail.netic.de (Smail3.2.0.111/mail.s.netic.de)
via LF.net GmbH Internet Services
via remoteip 212.9.162.62
via remotehost schleim.qwe.de with esmtp
for mail.avr1.org
id m16N3fa-001XBPC; Sun, 6 Jan 2002 04:08:22 +0100 (CET)
Received: from localhost (localhost [[UNIX: localhost]])
by schleim.qwe.de (8.11.6/8.11.6/SuSE Linux 0.5) id g0647o419711
for [email-masked]; Sun, 6 Jan 2002 05:07:50 +0100
Message-Id: <[email-masked]>
Content-Type: text/plain;
charset="iso-8859-15"
From: Torsten Mohr <[email-masked]>
To: avr <[email-masked]>
Subject: [avr-gcc-list] Searching for Ethernet Chip
Date: Sun, 6 Jan 2002 05:07:50 +0100
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

does anybody know of a project or some schematics where an
Ethernet Chip is attached directly to an address/data/control bus?
If the Chip could switch between 10/100MBit this would be so very
great.

I'm very interested in the schematics and some test software.
An AVR or ARM based project would be just great.

Thanks for any hints,
Torsten.

www.s.netic.de/tmohr/linux.html
avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:36:44 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFA3-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:36:43 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:36:43 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g065iiK19934
for <[email-masked]>; Sat, 5 Jan 2002 23:44:44 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0655t728411
for avr-gcc-list-list.japetos; Sat, 5 Jan 2002 23:05:55 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0655sB28408
for <[email-masked]>; Sat, 5 Jan 2002 23:05:54 -0600
Received: from mail.netic.de (mail.s.netic.de [212.9.160.11])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g06573913052
for <[email-masked]>; Sat, 5 Jan 2002 23:07:03 -0600
Received: by mail.netic.de (Smail3.2.0.111/mail.s.netic.de)
via LF.net GmbH Internet Services
via remoteip 212.9.162.99
via remotehost schleim.qwe.de with esmtp
for mail.avr1.org
id m16N5VG-001XBPC; Sun, 6 Jan 2002 06:05:50 +0100 (CET)
Received: from localhost (localhost [[UNIX: localhost]])
by schleim.qwe.de (8.11.6/8.11.6/SuSE Linux 0.5) id g0663pX23980
for [email-masked]; Sun, 6 Jan 2002 07:03:51 +0100
Message-Id: <[email-masked]>
Content-Type: text/plain;
charset="iso-8859-15"
From: Torsten Mohr <[email-masked]>
To: avr <[email-masked]>
Subject: [avr-gcc-list] AVR JTAG debugging
Date: Sun, 6 Jan 2002 07:03:51 +0100
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi everybody,

is it possible to debug an AVR via JTAG using gdb?
Maybe connected to the parallel port?
If not (yet), is the specification available?
Is somebody working on it?

Thanks,
Torsten.

http://www.s.netic.de/tmohr/linux.html
avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:36:46 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFA6-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:36:46 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:36:46 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0661IS23546
for <[email-masked]>; Sun, 6 Jan 2002 00:01:18 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g065QiH28587
for avr-gcc-list-list.japetos; Sat, 5 Jan 2002 23:26:44 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g065QiB28584
for <[email-masked]>; Sat, 5 Jan 2002 23:26:44 -0600
Received: from smartcontainer.net (IDENT:qmailr@[203.24.179.147])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g065RqK16925
for <[email-masked]>; Sat, 5 Jan 2002 23:27:52 -0600
Received: (qmail 28864 invoked by uid 100); 6 Jan 2002 05:26:39 -0000
To: avr <[email-masked]>
Subject: Re: [avr-gcc-list] AVR JTAG debugging
Message-ID: <[email-masked]>
Date: Sun, 06 Jan 2002 16:26:39 +1100 (EST)
From: [email-masked]
References: <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: IMP/PHP IMAP webmail program 2.2.7
X-Originating-IP: 203.45.99.45
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Torsten,

Please check out AVaRICE at http://avarice.sourceforge.net.

It is a package for connecting the Atmel AVR JTAG ICE to avr-gdb.

We are currently using it to debug a serious c/c++ application (>10,000 NCSL)
for the ATMega128.

Please read the doco about obtaining Ted Roth's latest patches for avr-gdb
otherwise you won't have much success!

Regards,

Scott Finneran

Quoting Torsten Mohr <[email-masked]>:

> Hi everybody,
>
> is it possible to debug an AVR via JTAG using gdb?
> Maybe connected to the parallel port?
> If not (yet), is the specification available?
> Is somebody working on it?
>
>
> Thanks,
> Torsten.
>
>
> http://www.s.netic.de/tmohr/linux.html
> avr-gcc-list at http://avr1.org
>
avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:36:48 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFA7-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:36:47 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:36:47 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g06C1Jj15452
for <[email-masked]>; Sun, 6 Jan 2002 06:01:19 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g06BUY702222
for avr-gcc-list-list.japetos; Sun, 6 Jan 2002 05:30:34 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g06BUXB02219
for <[email-masked]>; Sun, 6 Jan 2002 05:30:33 -0600
Received: from mail.netic.de (mail.s.netic.de [212.9.160.11])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g06BViI09838
for <[email-masked]>; Sun, 6 Jan 2002 05:31:44 -0600
Received: by mail.netic.de (Smail3.2.0.111/mail.s.netic.de)
via LF.net GmbH Internet Services
via remoteip 212.9.162.233
via remotehost schleim.qwe.de with esmtp
for mail.avr1.org
id m16NBVV-001XBnC; Sun, 6 Jan 2002 12:30:29 +0100 (CET)
Received: from there (localhost [127.0.0.1])
by schleim.qwe.de (8.11.6/8.11.6/SuSE Linux 0.5) with SMTP id g06CTFO02644
for <[email-masked]>; Sun, 6 Jan 2002 13:29:15 +0100
Message-Id: <[email-masked]>
Content-Type: text/plain;
charset="iso-8859-15"
From: Torsten Mohr <[email-masked]>
To: avr <[email-masked]>
Subject: [avr-gcc-list] Access to avr1.org
Date: Sun, 6 Jan 2002 13:29:15 +0100
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

i hope this one isn't sent twice, it seems i have mail problems.

I also can't access http://avr1.org, it seems i don't have proper
access rights?!?

Has anybody got the same problem?

Where can i access the eAVR project?

Regards,
Torsten.
avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:36:49 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFA8-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:36:48 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:36:48 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g06C9VS16565
for <[email-masked]>; Sun, 6 Jan 2002 06:09:31 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g06BiYR02331
for avr-gcc-list-list.japetos; Sun, 6 Jan 2002 05:44:34 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g06BiXB02328
for <[email-masked]>; Sun, 6 Jan 2002 05:44:34 -0600
Received: from mailg.telia.com (mailg.telia.com [194.22.194.26])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g06BjiI12537
for <[email-masked]>; Sun, 6 Jan 2002 05:45:44 -0600
Received: from d1o926.telia.com (d1o926.telia.com [213.66.172.241])
by mailg.telia.com (8.11.6/8.11.6) with ESMTP id g06BiVh15611;
Sun, 6 Jan 2002 12:44:32 +0100 (CET)
Received: from jesper (h169n2fls34o926.telia.com [217.208.35.169])
by d1o926.telia.com (8.10.2/8.10.1) with SMTP id g06BiVA26694;
Sun, 6 Jan 2002 12:44:31 +0100 (CET)
Message-ID: <002c01c196a7$80cd7d60$65656565@jesper>
From: "Jesper Hansen" <[email-masked]>
To: "Torsten Mohr" <[email-masked]>, "avr" <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] Searching for Ethernet Chip
Date: Sun, 6 Jan 2002 12:44:11 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Torsten,

> does anybody know of a project or some schematics where an
> Ethernet Chip is attached directly to an address/data/control bus?

Well, they normally are.

> If the Chip could switch between 10/100MBit this would be so very
> great.

Normally the 10 MBit chips Cirrus 8900 or Realtek 8019 is the most popular,
as they interface easily to an 8-bit uC bus.
Cirrus also have a 10/100 MBit chip, it may possibly be used too.

> I'm very interested in the schematics and some test software.
> An AVR or ARM based project would be just great.

http://www.ethernut.de
http://www.atmel.com/atmel/acrobat/doc2396.pdf
http://avr.jpk.co.nz/eavr/eavr.html
http://ucip.sourceforge.net/
http://www.hrz.de/ee8515.htm
http://www.iready.com/

/Jesper
http://www.yampp.com

avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:36:50 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAA-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:36:50 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:36:50 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g06CABS17218
for <[email-masked]>; Sun, 6 Jan 2002 06:10:11 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g06BUWp02212
for avr-gcc-list-list.japetos; Sun, 6 Jan 2002 05:30:32 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g06BUVB02209
for <[email-masked]>; Sun, 6 Jan 2002 05:30:31 -0600
Received: from mail.netic.de (mail.s.netic.de [212.9.160.11])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g06BVfI09830
for <[email-masked]>; Sun, 6 Jan 2002 05:31:42 -0600
Received: by mail.netic.de (Smail3.2.0.111/mail.s.netic.de)
via LF.net GmbH Internet Services
via remoteip 212.9.162.233
via remotehost schleim.qwe.de with esmtp
for mail.avr1.org
id m16NBVV-001XBmC; Sun, 6 Jan 2002 12:30:29 +0100 (CET)
Received: from there (localhost [127.0.0.1])
by schleim.qwe.de (8.11.6/8.11.6/SuSE Linux 0.5) with SMTP id g06Bugj06392
for <[email-masked]>; Sun, 6 Jan 2002 12:56:42 +0100
Message-Id: <[email-masked]>
Content-Type: text/plain;
charset="iso-8859-15"
From: Torsten Mohr <[email-masked]>
To: avr <[email-masked]>
Subject: [avr-gcc-list] Access to avr1.org
Date: Sun, 6 Jan 2002 12:55:18 +0100
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi everybody,

it seems i can't access http://avr1.org, it says i don't have
proper access rights. What is wrong?

Regards,
Torsten.

avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:36:53 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAC-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:36:52 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:36:52 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g06LqwK10353
for <[email-masked]>; Sun, 6 Jan 2002 15:52:58 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g06LCdM06615
for avr-gcc-list-list.japetos; Sun, 6 Jan 2002 15:12:39 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g06LCcB06612
for <[email-masked]>; Sun, 6 Jan 2002 15:12:38 -0600
Received: from mail.world-net.co.nz (mail.world-net.co.nz [203.96.119.27])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g06LDo924330
for <[email-masked]>; Sun, 6 Jan 2002 15:13:50 -0600
Received: from cel1.jpk.co.nz (adsl-179.world-net.co.nz [210.55.228.179])
by mail.world-net.co.nz (8.11.2/8.9.3) with ESMTP id g06LCK217108;
Mon, 7 Jan 2002 10:12:21 +1300
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Mon, 07 Jan 2002 10:14:05 +1300
To: Torsten Mohr <[email-masked]>, avr <[email-masked]>
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] Access to avr1.org
In-Reply-To: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

At 01:27 7/01/2002, Torsten Mohr wrote:
>Hi,
>
>i hope this one isn't sent twice, it seems i have mail problems.

Nope, we hit 3 times!

>I also can't access http://avr1.org, it seems i don't have proper
>access rights?!?

Still getting it sorted out, should be up and running in about 2 weeks
time. The site will primarily have information and files related to free
tools for the AVR. The current avr-gcc-list archives will be transfered
and continued on avr1.org

>Has anybody got the same problem?
>
>Where can i access the eAVR project?

The avr.jpk.co.nz site is still operational but will eventually point to
the same place as avr1.org , this change will occur around in about 2 weeks
also. My projects will also move to avr1.org

If anyone has spare time to help out with website design etc please get in
touch with me [email-masked]

Jason Kyle
avr1.org / avr-gcc list admin

>Regards,
>Torsten.
>avr-gcc-list at http://avr1.org

avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:36:54 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAD-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:36:53 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:36:53 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g06NkKQ02576
for <[email-masked]>; Sun, 6 Jan 2002 17:46:20 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g06NDoe07618
for avr-gcc-list-list.japetos; Sun, 6 Jan 2002 17:13:50 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g06NDnB07615
for <[email-masked]>; Sun, 6 Jan 2002 17:13:49 -0600
Received: from smartcontainer.net (IDENT:qmailr@[203.24.179.147])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g06NF2a22432
for <[email-masked]>; Sun, 6 Jan 2002 17:15:02 -0600
Received: (qmail 315 invoked by uid 8); 6 Jan 2002 23:13:46 -0000
Received: from moki.smartcontainer.net (20.20.20.13, claiming to be "smartcontainer.net")
by smarty.smartcontainer.net with SMTP id smtpdVZF48P; Sun, 06 Jan 2002 18:13:45 EST
Message-ID: <[email-masked]>
Date: Mon, 07 Jan 2002 10:13:45 +1100
From: Peter Jansen <[email-masked]>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: Avr Gcc List <[email-masked]>
Subject: [avr-gcc-list] [Fwd: building gcc/g++]
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi All,

In answer to the questions about compiling gcc etc for the AVR.

Here is how I compiled avr-gcc etc for Linux this seems to work ok.

Sometimes this falls over with the g++ compile, if it does its missing
some of the include files that are required. Do a make install after it
fails compiling g++ and it should go on ok.

This installs newlib for the avr and the standard c++ libraries for the
AVR which most people wont need because of code bloat. The newlib
versions of libc are bigger that the avr-libc ones. You can replace
newlib-libc with the avr-libc once libc++ has been compiled.

in some source directory:

(for bin utils)

tar xvzf binutils-2.11.2.tar.gz
mkdir binobj
cd binobj
../binutils-2.11.2/configure --target=avr
make
make install (by default installs to /usr/local)

(now gcc)

tar xvzf gcc-3.0.2.tar.gz
mkdir gccobj
cd gccobj
../gcc-3.0.2/configure --target=avr --enable-languages=c
make
make install

(now newlib)

tar xvzf newlib-1.9.0.tar.gz
mkdir newlibobj
cd newlibobj
../newlib-1.9.0/configure --target=avr
make
make install

(now g++)

mkdir g++obj
cd g++obj
../gcc-3.0.2/configure --target=avr --enable-languages=c,c++

(in the file libstdc++/avr/src/makefile remove the references to
building misc-inst, their are two of these a .cc file and a .lo file)

make
make install

and their you have it.

If you use the --prefix option for the configure lines, then make sure
that you use it in every place and don't have any old
avr-as/avr-gcc/avr-libraries around.

When compiling use you don't need -nostdlib, it picks the correct one
when you specify -mmcu=avr3. Also if you include <io.h> this defines
-D__AVR_ATmega103__ and the correct defines registers are included from
<iom103.h>. Compiling with -mcu=avr3 includes a default linker script.

I have posted patches for the ATmega128 for the above sources if you
want ATmega128 support. Some of this support is already built into the
CVS trees for gcc, binutils already for those who like like on the edge.

Regards,

--
Peter Jansen
Smart Container
Level 2, NIC Building
Eveleigh
NSW 1430
AUSTRALIA

avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:36:57 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAF-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:36:55 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:36:55 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0735Rb05944
for <[email-masked]>; Sun, 6 Jan 2002 21:05:27 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g072Zlc09522
for avr-gcc-list-list.japetos; Sun, 6 Jan 2002 20:35:47 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g072ZlB09519
for <[email-masked]>; Sun, 6 Jan 2002 20:35:47 -0600
Received: from smartcontainer.net (IDENT:qmailr@[203.24.179.147])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g072ax530366
for <[email-masked]>; Sun, 6 Jan 2002 20:37:00 -0600
Received: (qmail 2141 invoked by uid 8); 7 Jan 2002 02:35:44 -0000
Received: from link.smartcontainer.net (20.20.20.12, claiming to be "smartcontainer.net")
by smarty.smartcontainer.net with SMTP id smtpdM2PL2J; Sun, 06 Jan 2002 21:35:34 EST
Message-ID: <[email-masked]>
Date: Mon, 07 Jan 2002 13:33:05 +1100
From: Scott Finneran <[email-masked]>
Organization: Smart Container
X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.7-10 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: avr-gcc-list <[email-masked]>
Subject: [avr-gcc-list] Query regarding hard located variables
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello All,

I would have thought that the following would be a more commonly asked
(and therefore answered) question. I can only assume that I am searching
for the info in the wrong place or using the wrong keywords. If so, then
I apologise in advance.

I would like to know how to hard locate a variable using gcc and/or the
gnu linker. The hardware that I am using has a number of memory mapped
hardware registers. Obviously I would like to avoid having the linker
drop variables into memory addresses where these registers live. It
would also be nice to be able have variables (of my choosing) be located
at these addresses. Of course the latter can be easily achieved with a
pointer. Many commercial embedded compilers provide a compiler specific
directive such as:
eg int reg1 _at(0x4000);

Others simply allow you to specify the location of specific variables in
linker scripts.

I have seen many websites and articles (eg from embedded.com) talk about
doing this. Many more say that it is possible. None of them (that I have
found) say how, or even better give an example.

Can anyone point me to some info or alternatively show me how this is
done?

Kind Regards,

Scott Finneran
avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:36:55 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAE-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:36:54 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:36:54 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g071MG224029
for <[email-masked]>; Sun, 6 Jan 2002 19:22:16 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g070bbd08243
for avr-gcc-list-list.japetos; Sun, 6 Jan 2002 18:37:37 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g070baB08240
for <[email-masked]>; Sun, 6 Jan 2002 18:37:36 -0600
Received: from smartcontainer.net (IDENT:qmailr@[203.24.179.147])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g070clP31922
for <[email-masked]>; Sun, 6 Jan 2002 18:38:48 -0600
Received: (qmail 1108 invoked by uid 8); 7 Jan 2002 00:37:31 -0000
Received: from moki.smartcontainer.net (20.20.20.13, claiming to be "smartcontainer.net")
by smarty.smartcontainer.net with SMTP id smtpdXv93N9; Sun, 06 Jan 2002 19:37:30 EST
Message-ID: <[email-masked]>
Date: Mon, 07 Jan 2002 11:37:29 +1100
From: Peter Jansen <[email-masked]>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: [email-masked]
CC: Avr Gcc List <[email-masked]>
Subject: Re: [avr-gcc-list] [Fwd: building gcc/g++]
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

> Is this really necessary?
> I have patched the makefiles, so that libiberty and libstdc++ isn't build.
> Then I have patched gcc, so that it not requires libc++.
> Was this the wrong approach?

That approach is ok I preferred to keep the mods to a minimum and I
needed g++ so had to get it to compile.

> The problem is, that the resulting g++ will not work correctly.
> It tells me always, that I have no input files and that ':' will not exist.
> Any hints about this?

I have g++ working, although I make libstc++, we are not using it.

> If no, I can try your method.
> What's the reason to build newlib?
> Is it possible to use the resulting libc++?
> I don't think libc++ is required by g++ for a correct compile.

Yes you are correct newlib is not required to make the compiler, however
when the configure script runs it tries to compile a test program which
needs stdio.h to compile which is only in newlib.

I figured that I had libstdc++ compiling without much effort I might as
well not modify it and let it compile.

> <snip>
>
>>I have posted patches for the ATmega128 for the above sources if you
>>want ATmega128 support. Some of this support is already built into the
>>CVS trees for gcc, binutils already for those who like like on the edge.
>>
> Are there some parts in which would be necessary for the other CPUs also?
> Maybe some patches to Makefiles?

The patches are quite simple, I thought people working on the other
processors could add them to the list I have not looked into the other
processors and don't know their quirks.

Regards,

Peter Jansen

avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:36:59 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAH-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:36:57 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:36:57 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g07BB6J03381
for <[email-masked]>; Mon, 7 Jan 2002 05:11:06 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g07ATEe14002
for avr-gcc-list-list.japetos; Mon, 7 Jan 2002 04:29:14 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g07ATDB13999
for <[email-masked]>; Mon, 7 Jan 2002 04:29:13 -0600
Received: from gold.uni-miskolc.hu (gold.uni-miskolc.hu [193.6.10.1])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g07AURu27515
for <[email-masked]>; Mon, 7 Jan 2002 04:30:27 -0600
Received: from gold.uni-miskolc.hu (muszer.alt.uni-miskolc.hu [193.6.3.15])
by gold.uni-miskolc.hu (8.11.2/8.11.2) with ESMTP id g07BUBl21908;
Mon, 7 Jan 2002 11:30:12 GMT
Message-ID: <[email-masked]>
Date: Mon, 07 Jan 2002 11:31:50 +0100
From: Peter Bozzay <[email-masked]>
Organization: University of Miskolc, Educ. Dept. of Material Handling and Logistics
X-Mailer: Mozilla 4.75 [en] (Win95; U)
X-Accept-Language: hu,en
MIME-Version: 1.0
CC: Torsten Mohr <[email-masked]>, avr <[email-masked]>
Subject: Re: [avr-gcc-list] Searching for Ethernet Chip
References: <[email-masked]> <002c01c196a7$80cd7d60$65656565@jesper>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

> > An AVR or ARM based project would be just great.
>
> http://www.ethernut.de
> http://www.atmel.com/atmel/acrobat/doc2396.pdf
> http://avr.jpk.co.nz/eavr/eavr.html
> http://ucip.sourceforge.net/
> http://www.hrz.de/ee8515.htm
> http://www.iready.com/

And
http://www.embeddedethernet.com
http://www.embeddedether.net

Peter
avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:37:00 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAI-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:36:58 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:36:58 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g07HEPU16294
for <[email-masked]>; Mon, 7 Jan 2002 11:14:25 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g07GJFH17263
for avr-gcc-list-list.japetos; Mon, 7 Jan 2002 10:19:15 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g07GJEB17260
for <[email-masked]>; Mon, 7 Jan 2002 10:19:14 -0600
Received: from mail.intekom.com (mid-mail-02.intekom.com [196.25.69.45])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g07GKUu19656
for <[email-masked]>; Mon, 7 Jan 2002 10:20:30 -0600
Received: (qmail 26175 invoked from network); 7 Jan 2002 16:18:56 -0000
Received: from bnb53-01-p140.nt.saix.net (HELO scorpio) ([155.239.180.140]) (envelope-sender <[email-masked]>)
by intekom.com (qmail-ldap-1.03) with SMTP
for <[email-masked]>; 7 Jan 2002 16:18:56 -0000
X-vSMTP: intekom.com
From: "Anton Erasmus" <[email-masked]>
Organization: Home
To: [email-masked], Scott Finneran <[email-masked]>
Date: Mon, 7 Jan 2002 18:30:40 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: Re: [avr-gcc-list] Query regarding hard located variables
Message-ID: <3C39E950.28477.E694B6@localhost>
In-reply-to: <[email-masked]>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Date sent: Mon, 07 Jan 2002 13:33:05 +1100
From: Scott Finneran <[email-masked]>
Organization: Smart Container
To: avr-gcc-list <[email-masked]>
Subject: [avr-gcc-list] Query regarding hard located variables

> Hello All,
>
> I would have thought that the following would be a more commonly asked
> (and therefore answered) question. I can only assume that I am
> searching for the info in the wrong place or using the wrong keywords.
> If so, then I apologise in advance.
>
> I would like to know how to hard locate a variable using gcc and/or
> the gnu linker. The hardware that I am using has a number of memory
> mapped hardware registers. Obviously I would like to avoid having the
> linker drop variables into memory addresses where these registers
> live. It would also be nice to be able have variables (of my choosing)
> be located at these addresses. Of course the latter can be easily
> achieved with a pointer. Many commercial embedded compilers provide a
> compiler specific directive such as: eg int reg1 _at(0x4000);
>
> Others simply allow you to specify the location of specific variables
> in linker scripts.
>
> I have seen many websites and articles (eg from embedded.com) talk
> about doing this. Many more say that it is possible. None of them
> (that I have found) say how, or even better give an example.
>
> Can anyone point me to some info or alternatively show me how this is
> done?
>

Hi,

You can put each variable in it's own named section with the
"attribute section" command of gcc. In your linker script you can
define the address of each section. I am not sure how many
sections the linker can handle.

Regards
Anton

avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:37:04 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAJ-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:36:59 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:36:59 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g07MWUK22513
for <[email-masked]>; Mon, 7 Jan 2002 16:32:30 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g07LJ7g20983
for avr-gcc-list-list.japetos; Mon, 7 Jan 2002 15:19:07 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g07LJ6B20980
for <[email-masked]>; Mon, 7 Jan 2002 15:19:06 -0600
Received: from mail.netic.de (mail.s.netic.de [212.9.160.11])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g07LKMh03566
for <[email-masked]>; Mon, 7 Jan 2002 15:20:23 -0600
Received: by mail.netic.de (Smail3.2.0.111/mail.s.netic.de)
via LF.net GmbH Internet Services
via remoteip 212.9.162.103
via remotehost schleim.qwe.de with esmtp
for mail.avr1.org
id m16NhAd-001XBkC; Mon, 7 Jan 2002 22:19:03 +0100 (CET)
Received: from there (localhost [127.0.0.1])
by schleim.qwe.de (8.11.6/8.11.6/SuSE Linux 0.5) with SMTP id g07Hk9b03597
for <[email-masked]>; Mon, 7 Jan 2002 18:46:09 +0100
Message-Id: <[email-masked]>
Content-Type: text/plain;
charset="iso-8859-1"
From: Torsten Mohr <[email-masked]>
To: avr <[email-masked]>
Subject: Fwd: [avr-gcc-list] Query regarding hard located variables
Date: Mon, 7 Jan 2002 18:46:09 +0100
X-Mailer: KMail [version 1.3.1]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

normally this is not the way to declare HW registers
at fixed addresses, i know it ike this:

#define HW_REGISTER (*((char*)0xff1234))

Now you can access HW_REGISTER and read/write from/to it.

Take the address of the register, cast it to a pointer to
a char (if the register size is 8 bit) and dereference it
with a "*".

Regards,
Torsten.

---------- Weitergeleitete Nachricht ----------

Subject: [avr-gcc-list] Query regarding hard located variables
Date: Mon, 07 Jan 2002 13:33:05 +1100
From: Scott Finneran <[email-masked]>
To: avr-gcc-list <[email-masked]>

Hello All,

I would have thought that the following would be a more commonly asked
(and therefore answered) question. I can only assume that I am searching
for the info in the wrong place or using the wrong keywords. If so, then
I apologise in advance.

I would like to know how to hard locate a variable using gcc and/or the
gnu linker. The hardware that I am using has a number of memory mapped
hardware registers. Obviously I would like to avoid having the linker
drop variables into memory addresses where these registers live. It
would also be nice to be able have variables (of my choosing) be located
at these addresses. Of course the latter can be easily achieved with a
pointer. Many commercial embedded compilers provide a compiler specific
directive such as:
eg int reg1 _at(0x4000);

Others simply allow you to specify the location of specific variables in
linker scripts.

I have seen many websites and articles (eg from embedded.com) talk about
doing this. Many more say that it is possible. None of them (that I have
found) say how, or even better give an example.

Can anyone point me to some info or alternatively show me how this is
done?

Kind Regards,

Scott Finneran
avr-gcc-list at http://avr1.org

-------------------------------------------------------
avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:37:04 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAL-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:37:01 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:37:01 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g07NLtW02074
for <[email-masked]>; Mon, 7 Jan 2002 17:21:55 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g07MK3V21721
for avr-gcc-list-list.japetos; Mon, 7 Jan 2002 16:20:03 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g07MK2B21718
for <[email-masked]>; Mon, 7 Jan 2002 16:20:02 -0600
Received: from smartcontainer.net (IDENT:qmailr@[203.24.179.147])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g07MLIK19945
for <[email-masked]>; Mon, 7 Jan 2002 16:21:18 -0600
Received: (qmail 7767 invoked by uid 8); 7 Jan 2002 22:19:58 -0000
Received: from link.smartcontainer.net (20.20.20.12, claiming to be "smartcontainer.net")
by smarty.smartcontainer.net with SMTP id smtpdnLtxik; Mon, 07 Jan 2002 17:19:50 EST
Message-ID: <[email-masked]>
Date: Tue, 08 Jan 2002 09:17:22 +1100
From: Scott Finneran <[email-masked]>
Organization: Smart Container
X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.7-10 i686)
X-Accept-Language: en
MIME-Version: 1.0
CC: avr <[email-masked]>
Subject: Re: Fwd: [avr-gcc-list] Query regarding hard located variables
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Torsten,

Thankyou for your suggestion, unfortunately it does not answer my
question. What you have suggested will work but has problems.

Perhaps I did not explain my problem well enough. I have a hardware
register which is in data memory space. It overlays a single memory
location. It is not at the begining or end of memory, so I cannot simply
change the MEMORY section of linker script to begin after it or stop
just before it (I would lose approx 20% of my RAM doing this). Accessing
the location is not a problem, it is a simple pointer operation (as you
have indicated). However, as the register lives in the middle of my data
space (ie it overlays one location of my external SRAM device), it is
quite likely that the linker will assign the memory address to an
unrelated variable. As you can imagine, this will cause all kinds of
mysterious behaviour of the system when I modify this variable.

What I would like to do is either:
A) Assign a specific variable to this memory location (which I can then
use to access the register).

or

B) Reserve the memory location so that the linker does not use it. I can
then safely access it with a pointer as you have suggested.

Does anyone know how to do either of these things?

Thanks in advance,

Scott

Torsten Mohr wrote:
>
> Hi,
>
> normally this is not the way to declare HW registers
> at fixed addresses, i know it ike this:
>
> #define HW_REGISTER (*((char*)0xff1234))
>
> Now you can access HW_REGISTER and read/write from/to it.
>
> Take the address of the register, cast it to a pointer to
> a char (if the register size is 8 bit) and dereference it
> with a "*".
>
> Regards,
> Torsten.
>
> ---------- Weitergeleitete Nachricht ----------
>
> Subject: [avr-gcc-list] Query regarding hard located variables
> Date: Mon, 07 Jan 2002 13:33:05 +1100
> From: Scott Finneran <[email-masked]>
> To: avr-gcc-list <[email-masked]>
>
> Hello All,
>
> I would have thought that the following would be a more commonly asked
> (and therefore answered) question. I can only assume that I am searching
> for the info in the wrong place or using the wrong keywords. If so, then
> I apologise in advance.
>
> I would like to know how to hard locate a variable using gcc and/or the
> gnu linker. The hardware that I am using has a number of memory mapped
> hardware registers. Obviously I would like to avoid having the linker
> drop variables into memory addresses where these registers live. It
> would also be nice to be able have variables (of my choosing) be located
> at these addresses. Of course the latter can be easily achieved with a
> pointer. Many commercial embedded compilers provide a compiler specific
> directive such as:
> eg int reg1 _at(0x4000);
>
> Others simply allow you to specify the location of specific variables in
> linker scripts.
>
> I have seen many websites and articles (eg from embedded.com) talk about
> doing this. Many more say that it is possible. None of them (that I have
> found) say how, or even better give an example.
>
> Can anyone point me to some info or alternatively show me how this is
> done?
>
> Kind Regards,
>
> Scott Finneran
> avr-gcc-list at http://avr1.org
>
> -------------------------------------------------------
> avr-gcc-list at http://avr1.org
avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:37:08 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAN-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:37:03 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:37:03 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g07NYbf05183
for <[email-masked]>; Mon, 7 Jan 2002 17:34:37 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g07Ml4X21936
for avr-gcc-list-list.japetos; Mon, 7 Jan 2002 16:47:04 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g07Ml3B21933
for <[email-masked]>; Mon, 7 Jan 2002 16:47:03 -0600
Received: from smartcontainer.net (IDENT:qmailr@[203.24.179.147])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g07MmJh26286
for <[email-masked]>; Mon, 7 Jan 2002 16:48:19 -0600
Received: (qmail 7946 invoked by uid 8); 7 Jan 2002 22:47:00 -0000
Received: from link.smartcontainer.net (20.20.20.12, claiming to be "smartcontainer.net")
by smarty.smartcontainer.net with SMTP id smtpdsIibBH; Mon, 07 Jan 2002 17:46:59 EST
Message-ID: <[email-masked]>
Date: Tue, 08 Jan 2002 09:44:21 +1100
From: Scott Finneran <[email-masked]>
Organization: Smart Container
X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.7-10 i686)
X-Accept-Language: en
MIME-Version: 1.0
CC: [email-masked]
Subject: Re: [avr-gcc-list] Query regarding hard located variables
References: <3C39E950.28477.E694B6@localhost>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Anton,

Yes, this is the kind of thing that I am after. However I am unable to
find any examples or doumentation on how to do this. Specifically, I
cannot find examples or instructions on how to do this for a single
variable (or even a single file... I can put the "magic" variable in a
file on it's own).

Does anyone have an example that they can point me towards (or send)
which shows how to put a variable or a file into a specific section in
RAM?

Kind Regards,

Scott

Anton Erasmus wrote:
>
> Date sent: Mon, 07 Jan 2002 13:33:05 +1100
> From: Scott Finneran <[email-masked]>
> Organization: Smart Container
> To: avr-gcc-list <[email-masked]>
> Subject: [avr-gcc-list] Query regarding hard located variables
>
> > Hello All,
> >
> > I would have thought that the following would be a more commonly asked
> > (and therefore answered) question. I can only assume that I am
> > searching for the info in the wrong place or using the wrong keywords.
> > If so, then I apologise in advance.
> >
> > I would like to know how to hard locate a variable using gcc and/or
> > the gnu linker. The hardware that I am using has a number of memory
> > mapped hardware registers. Obviously I would like to avoid having the
> > linker drop variables into memory addresses where these registers
> > live. It would also be nice to be able have variables (of my choosing)
> > be located at these addresses. Of course the latter can be easily
> > achieved with a pointer. Many commercial embedded compilers provide a
> > compiler specific directive such as: eg int reg1 _at(0x4000);
> >
> > Others simply allow you to specify the location of specific variables
> > in linker scripts.
> >
> > I have seen many websites and articles (eg from embedded.com) talk
> > about doing this. Many more say that it is possible. None of them
> > (that I have found) say how, or even better give an example.
> >
> > Can anyone point me to some info or alternatively show me how this is
> > done?
> >
>
> Hi,
>
> You can put each variable in it's own named section with the
> "attribute section" command of gcc. In your linker script you can
> define the address of each section. I am not sure how many
> sections the linker can handle.
>
> Regards
> Anton
avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:37:11 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAR-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:37:07 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:37:07 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g087huR02177
for <[email-masked]>; Tue, 8 Jan 2002 01:43:57 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g087Cpt27034
for avr-gcc-list-list.japetos; Tue, 8 Jan 2002 01:12:51 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g087CoB27031
for <[email-masked]>; Tue, 8 Jan 2002 01:12:50 -0600
Received: from mail.intekom.com (mid-mail-01.intekom.com [196.25.69.44])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g087E8j08227
for <[email-masked]>; Tue, 8 Jan 2002 01:14:09 -0600
Received: (qmail 4156 invoked from network); 8 Jan 2002 07:11:13 -0000
Received: from bnb53-01-p21.nt.saix.net (HELO scorpio) ([155.239.180.21]) (envelope-sender <[email-masked]>)
by intekom.com (qmail-ldap-1.03) with SMTP
for <[email-masked]>; 8 Jan 2002 07:11:13 -0000
X-vSMTP: intekom.com
From: "Anton Erasmus" <[email-masked]>
Organization: Home
To: [email-masked]
Date: Tue, 8 Jan 2002 09:23:43 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: [avr-gcc-list] Specifying crt*.o file
Message-ID: <3C3ABA9F.256.5C52EC@localhost>
In-reply-to: <[email-masked]>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I am trying to use a custom start-up file with avr-gcc. How does
one force the linker to link with a specified crt file in stead of the
default crt*.o file ?

Regards
Anton

avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:37:08 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAP-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:37:05 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:37:05 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g080kTY06531
for <[email-masked]>; Mon, 7 Jan 2002 18:46:29 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g07Nstn22634
for avr-gcc-list-list.japetos; Mon, 7 Jan 2002 17:54:55 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g07NssB22631
for <[email-masked]>; Mon, 7 Jan 2002 17:54:54 -0600
Received: from mail-vie-pub-p.1012internet.at (mail-vie-pub-p.1012internet.at [212.95.31.10])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g07NuBI12235
for <[email-masked]>; Mon, 7 Jan 2002 17:56:12 -0600
Received: from telering.at (dis212095024040.vie.telering.at [212.95.24.40])
by mail-vie-pub-p.1012internet.at (8.9.3/8.9.3) with SMTP id AAA04884
for <[email-masked]>; Tue, 8 Jan 2002 00:54:47 +0100 (MET)
Received: (qmail 28008 invoked by uid 501); 7 Jan 2002 23:51:57 -0000
From: [email-masked]
Reply-To: [email-masked]
To: Peter Jansen <[email-masked]>
Subject: Re: [avr-gcc-list] [Fwd: building gcc/g++]
Date: Tue, 8 Jan 2002 00:32:20 +0100
X-Mailer: KMail [version 1.0.29.2]
Content-Type: Multipart/Mixed;
boundary="Boundary-=_arzOwKkYHIDdqSCDXrJmOWFrxsjy"
Cc: Avr Gcc List <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Message-Id: <[email-masked]>
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--Boundary-=_arzOwKkYHIDdqSCDXrJmOWFrxsjy
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Mon, 07 Jan 2002, Peter Jansen wrote:
> Hi,
>=20
>=20
> > Is this really necessary?
> > I have patched the makefiles, so that libiberty and libstdc++ isn't b=
uild.
> > Then I have patched gcc, so that it not requires libc++.
> > Was this the wrong approach?
>=20
>=20
> That approach is ok I preferred to keep the mods to a minimum and I=20
> needed g++ so had to get it to compile.
I did a little mistake with my patches. Now I can build avr-g++ without h=
aving
to deal with newlib and libstdc++. They are simply not build.
The patches are for gcc-3.0.2. Attached you will find them. I think they =
can
be sent to the gcc team, but I haven't done it until now, because of the
following problem.

After writing a small c++ test program, simulating it in simulavr and ana=
lysing
the generated asm file, I discovered that nobody is calling the
con/destructors of global variables.

I have found the __CTOR_LIST__ in the asm output.

Is anybody working on a solution of this problem?
I am not so familar with gcc, that I can quickly implement this.
I have started to analyse how the m68hc11 port does this. I think it can =
be
used as a pattern. Currently I am not sure if we need to change gcrt1.S f=
rom
libc. I think it is possible to configure gcc, that it will emit the need=
ed
calls to the functions to walk through the list of con/destructors.
The next problem is, that I am not familar with the avr assembler. I need=
to
learn it.

> >>I have posted patches for the ATmega128 for the above sources if you=20
> >>want ATmega128 support. Some of this support is already built into th=
e=20
> >>CVS trees for gcc, binutils already for those who like like on the ed=
ge.
Maybe you can send me the patches. Then I will integrae them into my buil=
d
script.

Regards,
Reinhard

--=20
Ing. Reinhard Jessich mailto: [email-masked]
A-1190 Vienna, Goergengasse 2/2/1 phone: +43/1/3692600
http://members.telering.at/jessich mobile: +43/664/1735439

--Boundary-=_arzOwKkYHIDdqSCDXrJmOWFrxsjy
Content-Type: text/english;
name="gcc-patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="gcc-patch"

IwojIFRoaXMgcGF0Y2ggaXMgbm90IG5lY2Vzc2FyeSwgaWYgeW91IGNvbmZpZ3VyZSBnY2MgZm9y
IEMuIEl0IGlzCiMgbmVjZXNzYXJ5IG9ubHksIGlmIGdjYyBpcyBjb25maWd1cmVkIGZvciBDKysu
IEl0IGluaGliaXRzIHRoZSBidWlsZGluZyBvZgojIGxpYmliZXJ0eSBhbmQgbGlic3RkYysrIGZv
ciB0aGUgdGFyZ2V0IGFuZCByZW1vdmVzIHRoZSBuZWVkIG9mIGxpYnN0ZGMrKy5hCiMgd2hlbiBs
aW5raW5nIHdpdGggYXZyLWcrKy4KIwpkaWZmIC1OYXVyIGdjYy0zLjAuMi5vcmkvY29uZmlndXJl
LmluIGdjYy0zLjAuMi9jb25maWd1cmUuaW4KLS0tIGdjYy0zLjAuMi5vcmkvY29uZmlndXJlLmlu
CU1vbiBBdWcgMTMgMTg6MTQ6NDkgMjAwMQorKysgZ2NjLTMuMC4yL2NvbmZpZ3VyZS5pbglUaHUg
RGVjIDIwIDAwOjM3OjMyIDIwMDEKQEAgLTcxMyw2ICs3MTMsOSBAQAogICBhcm0tKi1yaXNjaXgq
KQogICAgIG5vY29uZmlnZGlycz0iJG5vY29uZmlnZGlycyBsZCB0YXJnZXQtbGliZ2xvc3MgJHts
aWJnY2p9IgogICAgIDs7CisgIGF2ci0qLSopCisgICAgbm9jb25maWdkaXJzPSIkbm9jb25maWdk
aXJzIHRhcmdldC1saWJpYmVydHkgJHtsaWJzdGRjeHhfdmVyc2lvbn0gJHtsaWJnY2p9IgorICAg
IDs7CiAgIGQxMHYtKi0qKQogICAgIG5vY29uZmlnZGlycz0iJG5vY29uZmlnZGlycyB0YXJnZXQt
bGlicnggJHtsaWJzdGRjeHhfdmVyc2lvbn0gdGFyZ2V0LWxpYmdsb3NzICR7bGliZ2NqfSIKICAg
ICA7OwpkaWZmIC1OYXVyIGdjYy0zLjAuMi5vcmkvZ2NjL2NvbmZpZy9hdnIvYXZyLmggZ2NjLTMu
MC4yL2djYy9jb25maWcvYXZyL2F2ci5oCi0tLSBnY2MtMy4wLjIub3JpL2djYy9jb25maWcvYXZy
L2F2ci5oCU1vbiBBcHIgMTYgMjA6MjU6NDIgMjAwMQorKysgZ2NjLTMuMC4yL2djYy9jb25maWcv
YXZyL2F2ci5oCU1vbiBKYW4gIDcgMjM6MTg6MjcgMjAwMgpAQCAtMzA4Niw2ICszMDg2LDExIEBA
CiAgICBJZiB0aGlzIG1hY3JvIGlzIG5vdCBkZWZpbmVkLCBhIGRlZmF1bHQgaXMgcHJvdmlkZWQg
dGhhdCBsb2FkcyB0aGUKICAgIHN0YW5kYXJkIEMgbGlicmFyeSBmcm9tIHRoZSB1c3VhbCBwbGFj
ZS4gIFNlZSBgZ2NjLmMnLiAgKi8KIAorI2RlZmluZSBMSUJTVERDWFggIiIKKy8qIFRoZXJlIGlz
IG5vIGxpYnN0ZGMrKy5hIGF2YWlsYWJsZSBmb3IgdGhlIEFWUiB1bnRpbCBub3cuIFNvIGl0Cisg
ICBtdXN0IGJlIGRlZmluZWQgYXMgbm90aGluZywgdGhhdCBpdCBpcyBub3QgYWRkZWQgdG8gdGhl
IGxpbmtlcgorICAgY29tbWFuZC4gICovCisKICNkZWZpbmUgTElCR0NDX1NQRUMgXAogICAiJXsh
bW1jdT1hdDkwczEqOiV7IW1tY3U9YXR0aW55MSo6JXshbW1jdT1hdHRpbnkyODogLWxnY2MgfX19
IgogLyogQW5vdGhlciBDIHN0cmluZyBjb25zdGFudCB0aGF0IHRlbGxzIHRoZSBHTlUgQ0MgZHJp
dmVyIHByb2dyYW0gaG93CmRpZmYgLU5hdXIgZ2NjLTMuMC4yLm9yaS9nY2MvY3AvZysrc3BlYy5j
IGdjYy0zLjAuMi9nY2MvY3AvZysrc3BlYy5jCi0tLSBnY2MtMy4wLjIub3JpL2djYy9jcC9nKytz
cGVjLmMJRnJpIEZlYiAgMiAxODo0MTo1NyAyMDAxCisrKyBnY2MtMy4wLjIvZ2NjL2NwL2crK3Nw
ZWMuYwlNb24gSmFuICA3IDIzOjEyOjUxIDIwMDIKQEAgLTI1NSw4ICsyNTUsOSBAQAogICAgICAg
aisrOwogICAgIH0KIAotICAvKiBBZGQgYC1sc3RkYysrJyBpZiB3ZSBoYXZlbid0IGFscmVhZHkg
ZG9uZSBzby4gICovCi0gIGlmIChsaWJyYXJ5KQorICAvKiBBZGQgYC1sc3RkYysrJyBpZiB3ZSBo
YXZlbid0IGFscmVhZHkgZG9uZSBzbyBhbmQgaWYgdGhlIGxpYnJhcnkKKyAgICogbmFtZSBpcyBk
ZWZpbmVkLiAgKi8KKyAgaWYgKGxpYnJhcnkpICYmIChzdHJsZW4gKExJQlNURENYWCkgPiAwKQog
ICAgIHsKICAgICAgIGFyZ2xpc3RbaisrXSA9IExJQlNURENYWDsKICAgICAgIGFkZGVkX2xpYnJh
cmllcysrOwo=

--Boundary-=_arzOwKkYHIDdqSCDXrJmOWFrxsjy--
avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:37:15 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAV-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:37:11 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:37:11 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g08Li7Y13088
for <[email-masked]>; Tue, 8 Jan 2002 15:44:07 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g08KTGD02318
for avr-gcc-list-list.japetos; Tue, 8 Jan 2002 14:29:16 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g08KTFB02308
for <[email-masked]>; Tue, 8 Jan 2002 14:29:15 -0600
Received: from smartcontainer.net (IDENT:qmailr@[203.24.179.147])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g08KUZS27749
for <[email-masked]>; Tue, 8 Jan 2002 14:30:35 -0600
Received: (qmail 15068 invoked by uid 100); 8 Jan 2002 20:29:11 -0000
To: avr <[email-masked]>
Subject: Re: [avr-gcc-list] Query regarding hard located variables
Message-ID: <[email-masked]>
Date: Wed, 09 Jan 2002 07:29:11 +1100 (EST)
From: [email-masked]
Cc: avr <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: IMP/PHP IMAP webmail program 2.2.7
X-Originating-IP: 203.45.97.22
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Rich,

Thanks for your reply.

Quoting Rich Neswold <[email-masked]>:

> Wasn't it 8-Jan-2002, at 09:17AM, when Scott Finneran said:
> > Perhaps I did not explain my problem well enough. I have a hardware
> > register which is in data memory space. It overlays a single memory
> > location.
>
> Stop right there. Your hardware engineer mapped a register right smack
> dab
> in the middle of the system RAM? Since the RAM is external, you need
> some
> ugly addressing hardware to make sure this *one* location didn't reach
> the
> RAM.

Not really, it reaches both. All you need is a comparator with enough address
bits (to avoid the aliasing).

> I'm not familiar with *every* AVR processor and its hardware register
> mappings. Which processor are you using, and which register are you
> trying
> to access?
ATMega128. This register which I am discussing is not internal to the processor.
It is a bank switching register for the second half of the ATMega128 data space
(ie addresses > 0x7fff can be bank switched). Basically, it is located at
0x7fff. We still want to be able to use addresses > 0x7fff for data (and can
guarantee that the correct page will be swithed in when necessary)

>
> If your hardware register is to an external peripheral, you need to
> have
> the design fixed.
I may have mislead with my description. The peripheral (ie the bank switch
register) is hard located at 0x7fff).

> > B) Reserve the memory location so that the linker does not use it. I
> can
> > then safely access it with a pointer as you have suggested.
>
> Even if you could break the data section into two sections, the
> startup
> code considers the data (and bss) section to be contiguous and so your
> hardware address will get written to during the boot process (either
> with
> 0, if it is in the bss section, or random data if it is in the data
> section.)
Not if I can force a variable to be located at this address (which I can
initialise to zero. Actually, if I can just force the thing to be in the bss
(which will have the same effect) , I'll be happy. Can you tell me how to do
this?

> Again, I'd fix the hardware.
I do understand what you are saying, however as IO space is not available on the
external bus, can you suggest how we can map in an external peripheral into data
space without using the scheme that I describe above? note: If we put the
register at the start of external data memory, we will still (due to the
contiguous sections that you describe above), lose the availability of the
internal data memory (~4k on the mega128).

Many thanks,

Scott
avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:37:11 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAS-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:37:08 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:37:08 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0881kl06023
for <[email-masked]>; Tue, 8 Jan 2002 02:01:46 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g087GCc27060
for avr-gcc-list-list.japetos; Tue, 8 Jan 2002 01:16:12 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g087GBB27057
for <[email-masked]>; Tue, 8 Jan 2002 01:16:11 -0600
Received: from mail.intekom.com (mid-mail-02.intekom.com [196.25.69.45])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g087HTj10914
for <[email-masked]>; Tue, 8 Jan 2002 01:17:29 -0600
Received: (qmail 19809 invoked from network); 8 Jan 2002 07:15:45 -0000
Received: from bnb53-01-p21.nt.saix.net (HELO scorpio) ([155.239.180.21]) (envelope-sender <[email-masked]>)
by intekom.com (qmail-ldap-1.03) with SMTP
for <[email-masked]>; 8 Jan 2002 07:15:45 -0000
X-vSMTP: intekom.com
From: "Anton Erasmus" <[email-masked]>
Organization: Home
To: Scott Finneran <[email-masked]>
Date: Tue, 8 Jan 2002 09:28:13 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: Re: [avr-gcc-list] Query regarding hard located variables
CC: [email-masked]
Message-ID: <3C3ABBAD.25385.607267@localhost>
In-reply-to: <[email-masked]>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Scott,

The following C Code will put variable gTestVar into section
"no_init". The relevent linker script commands you will need to put
this section at a specific address, I do not know.

int gTestVar __attribute__((section ("no_init");

Regards
Anton

> Hello Anton,
>
> Yes, this is the kind of thing that I am after. However I am unable to
> find any examples or doumentation on how to do this. Specifically, I
> cannot find examples or instructions on how to do this for a single
> variable (or even a single file... I can put the "magic" variable in a
> file on it's own).
>
> Does anyone have an example that they can point me towards (or send)
> which shows how to put a variable or a file into a specific section in
> RAM?
>
>
> Kind Regards,
>
> Scott
>
> Anton Erasmus wrote:
> >
> > Date sent: Mon, 07 Jan 2002 13:33:05 +1100
> > From: Scott Finneran <[email-masked]>
> > Organization: Smart Container To:
> > avr-gcc-list <[email-masked]> Subject:
> > [avr-gcc-list] Query regarding hard located variables
> >
> > > Hello All,
> > >
> > > I would have thought that the following would be a more commonly
> > > asked (and therefore answered) question. I can only assume that I
> > > am searching for the info in the wrong place or using the wrong
> > > keywords. If so, then I apologise in advance.
> > >
> > > I would like to know how to hard locate a variable using gcc
> > > and/or the gnu linker. The hardware that I am using has a number
> > > of memory mapped hardware registers. Obviously I would like to
> > > avoid having the linker drop variables into memory addresses where
> > > these registers live. It would also be nice to be able have
> > > variables (of my choosing) be located at these addresses. Of
> > > course the latter can be easily achieved with a pointer. Many
> > > commercial embedded compilers provide a compiler specific
> > > directive such as: eg int reg1 _at(0x4000);
> > >
> > > Others simply allow you to specify the location of specific
> > > variables in linker scripts.
> > >
> > > I have seen many websites and articles (eg from embedded.com) talk
> > > about doing this. Many more say that it is possible. None of them
> > > (that I have found) say how, or even better give an example.
> > >
> > > Can anyone point me to some info or alternatively show me how this
> > > is done?
> > >
> >
> > Hi,
> >
> > You can put each variable in it's own named section with the
> > "attribute section" command of gcc. In your linker script you can
> > define the address of each section. I am not sure how many sections
> > the linker can handle.
> >
> > Regards
> > Anton
> avr-gcc-list at http://avr1.org
>

avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:37:19 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAY-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:37:14 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:37:14 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g08MBQm20351
for <[email-masked]>; Tue, 8 Jan 2002 16:11:26 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g08Ks8T02556
for avr-gcc-list-list.japetos; Tue, 8 Jan 2002 14:54:08 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g08Ks6B02553
for <[email-masked]>; Tue, 8 Jan 2002 14:54:06 -0600
Received: from mx04.nexgo.de (mx04.nexgo.de [151.189.8.80])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g08KtRd01628
for <[email-masked]>; Tue, 8 Jan 2002 14:55:27 -0600
Received: from kleinertiga.local (dialin-145-254-112-111.arcor-ip.net [145.254.112.111])
by mx04.nexgo.de (Postfix) with ESMTP
id B746E37C3E; Tue, 8 Jan 2002 21:54:03 +0100 (CET)
Received: from gmx.de (localhost [127.0.0.1])
by kleinertiga.local (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id g08Kq7M03227;
Tue, 8 Jan 2002 21:52:12 +0100
X-Authentication-Warning: kleinertiga.local: Host localhost [127.0.0.1] claimed to be gmx.de
Message-ID: <[email-masked]>
Date: Tue, 08 Jan 2002 21:52:07 +0100
From: Klaus Rudolph <[email-masked]>
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Scott Finneran <[email-masked]>
Cc: avr <[email-masked]>
Subject: Re: Fwd: [avr-gcc-list] Query regarding hard located variables
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Scott Finneran wrote:
>
> Hello Torsten,
>
> Thankyou for your suggestion, unfortunately it does not answer my
> question. What you have suggested will work but has problems.
>
> Perhaps I did not explain my problem well enough. I have a hardware
> register which is in data memory space. It overlays a single memory
> location. It is not at the begining or end of memory, so I cannot simply
> change the MEMORY section of linker script to begin after it or stop
> just before it (I would lose approx 20% of my RAM doing this). Accessing
> the location is not a problem, it is a simple pointer operation (as you
> have indicated). However, as the register lives in the middle of my data
> space (ie it overlays one location of my external SRAM device), it is
> quite likely that the linker will assign the memory address to an
> unrelated variable. As you can imagine, this will cause all kinds of
> mysterious behaviour of the system when I modify this variable.
>
> What I would like to do is either:
> A) Assign a specific variable to this memory location (which I can then
> use to access the register).
>
> or
>
> B) Reserve the memory location so that the linker does not use it. I can
> then safely access it with a pointer as you have suggested.
>
> Does anyone know how to do either of these things?
>

I would build a second data section in the linker script after your
hard located register. You can use this data2 section through the
normal section statements from assembler or C with pragma.

There is no way from linker scripts to reserve a varible in the
address space of the section for other use i think.

What you want to have is one section (data) and reserve there one
address with one, lets say static c variable, so the compiler
can decide where the compiler generated vars should go. Mmmh.
No idea.
Is that what you really mean?
avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:37:25 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAZ-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:37:15 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:37:15 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g08NCUX31856
for <[email-masked]>; Tue, 8 Jan 2002 17:12:30 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g08MVx603516
for avr-gcc-list-list.japetos; Tue, 8 Jan 2002 16:31:59 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g08MVxB03513
for <[email-masked]>; Tue, 8 Jan 2002 16:31:59 -0600
Received: from smartcontainer.net (IDENT:qmailr@[203.24.179.147])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g08MXIx00578
for <[email-masked]>; Tue, 8 Jan 2002 16:33:19 -0600
Received: (qmail 15901 invoked by uid 8); 8 Jan 2002 22:31:54 -0000
Received: from link.smartcontainer.net (20.20.20.12, claiming to be "smartcontainer.net")
by smarty.smartcontainer.net with SMTP id smtpdFvsyGU; Tue, 08 Jan 2002 17:31:45 EST
Message-ID: <[email-masked]>
Date: Wed, 09 Jan 2002 09:29:01 +1100
From: Scott Finneran <[email-masked]>
Organization: Smart Container
X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.7-10 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: avr-gcc-list <[email-masked]>
Subject: Re: [avr-gcc-list] Specifying crt*.o file
References: <3C3ABA9F.256.5C52EC@localhost>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Anton,

Just specify the crt*.o file on the linker command line. The important
thing to remember is to PUT IT FIRST (ie before any other .o files).
This will ensure (I only say this from experience) that the contents are
put at address zero.

Regards,

Scott

Anton Erasmus wrote:
>
> Hi,
>
> I am trying to use a custom start-up file with avr-gcc. How does
> one force the linker to link with a specified crt file in stead of the
> default crt*.o file ?
>
> Regards
> Anton
>
> avr-gcc-list at http://avr1.org
avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:37:26 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAb-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:37:17 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:37:17 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g096MTl09182
for <[email-masked]>; Wed, 9 Jan 2002 00:22:29 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g095P3C07597
for avr-gcc-list-list.japetos; Tue, 8 Jan 2002 23:25:03 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g095P2B07594
for <[email-masked]>; Tue, 8 Jan 2002 23:25:02 -0600
Received: from deimos.frii.net (deimos.frii.com [216.17.128.2])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g095QPS29236
for <[email-masked]>; Tue, 8 Jan 2002 23:26:25 -0600
Received: from ari-co2d-60.rasserver.net (ari-co2d-60.rasserver.net [207.92.202.60])
by deimos.frii.net (8.12.1/8.12.1) with ESMTP id g095Oxvs091016;
Tue, 8 Jan 2002 22:25:00 -0700 (MST)
Date: Tue, 8 Jan 2002 22:27:25 -0700 (MST)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: AVR GCC List <[email-masked]>,
<[email-masked]>,
<[email-masked]>
Subject: [avr-gcc-list] gdb-5.1-avr-patch-0.0-pre8
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi All,

I've just released my gdb-5.1-avr-patch-0.0-pre8 patch. The only
significant difference between pre7 and pre8 is a change to allow the
disassemble command to work correctly. Thanks to Tak Auyeung for the fix.

Both Scott Finneran's AVaRICE project and my simulavr project are
compatible with this patch and both projects seem to be reaching points
where they are usable for real debugging work.

I have contacted Tor Ringstad about updating the avrmon-stk200 project to
work with this patch and he seems to be interested in making the changes.
I'm sure Tor would be more interested if avrmon-stk200 users were to
contact him with requests to continue.

My patch looks to be reaching feature completeness now. I would really
appreciate email from anyone using the patch telling me how well it works
or doesn't work for you. I'd like to try to get this merged into the gdb
source tree before gdb-5.2 comes out, so I need all the feed back I can
get.

Please note that the home for my patches has moved to a permanent site.
Here's the new address:

http://freesoftware.fsf.org/download/simulavr/gdb-patches/

Enjoy.

Ted Roth

avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:37:18 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAW-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:37:12 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:37:12 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g08LlHY14129
for <[email-masked]>; Tue, 8 Jan 2002 15:47:17 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g08KTGN02319
for avr-gcc-list-list.japetos; Tue, 8 Jan 2002 14:29:16 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g08KTFB02309
for <[email-masked]>; Tue, 8 Jan 2002 14:29:15 -0600
Received: from smartcontainer.net (IDENT:qmailr@[203.24.179.147])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g08KUZS27748
for <[email-masked]>; Tue, 8 Jan 2002 14:30:35 -0600
Received: (qmail 15068 invoked by uid 100); 8 Jan 2002 20:29:11 -0000
To: avr <[email-masked]>
Subject: Re: [avr-gcc-list] Query regarding hard located variables
Message-ID: <[email-masked]>
Date: Wed, 09 Jan 2002 07:29:11 +1100 (EST)
From: [email-masked]
Cc: avr <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: IMP/PHP IMAP webmail program 2.2.7
X-Originating-IP: 203.45.97.22
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Rich,

Thanks for your reply.

Quoting Rich Neswold <[email-masked]>:

> Wasn't it 8-Jan-2002, at 09:17AM, when Scott Finneran said:
> > Perhaps I did not explain my problem well enough. I have a hardware
> > register which is in data memory space. It overlays a single memory
> > location.
>
> Stop right there. Your hardware engineer mapped a register right smack
> dab
> in the middle of the system RAM? Since the RAM is external, you need
> some
> ugly addressing hardware to make sure this *one* location didn't reach
> the
> RAM.

Not really, it reaches both. All you need is a comparator with enough address
bits (to avoid the aliasing).

> I'm not familiar with *every* AVR processor and its hardware register
> mappings. Which processor are you using, and which register are you
> trying
> to access?
ATMega128. This register which I am discussing is not internal to the processor.
It is a bank switching register for the second half of the ATMega128 data space
(ie addresses > 0x7fff can be bank switched). Basically, it is located at
0x7fff. We still want to be able to use addresses > 0x7fff for data (and can
guarantee that the correct page will be swithed in when necessary)

>
> If your hardware register is to an external peripheral, you need to
> have
> the design fixed.
I may have mislead with my description. The peripheral (ie the bank switch
register) is hard located at 0x7fff).

> > B) Reserve the memory location so that the linker does not use it. I
> can
> > then safely access it with a pointer as you have suggested.
>
> Even if you could break the data section into two sections, the
> startup
> code considers the data (and bss) section to be contiguous and so your
> hardware address will get written to during the boot process (either
> with
> 0, if it is in the bss section, or random data if it is in the data
> section.)
Not if I can force a variable to be located at this address (which I can
initialise to zero. Actually, if I can just force the thing to be in the bss
(which will have the same effect) , I'll be happy. Can you tell me how to do
this?

> Again, I'd fix the hardware.
I do understand what you are saying, however as IO space is not available on the
external bus, can you suggest how we can map in an external peripheral into data
space without using the scheme that I describe above? note: If we put the
register at the start of external data memory, we will still (due to the
contiguous sections that you describe above), lose the availability of the
internal data memory (~4k on the mega128).

Many thanks,

Scott
avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:37:27 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAd-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:37:19 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:37:19 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g098mHm31017
for <[email-masked]>; Wed, 9 Jan 2002 02:48:17 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0982JD09245
for avr-gcc-list-list.japetos; Wed, 9 Jan 2002 02:02:19 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0982IB09242
for <[email-masked]>; Wed, 9 Jan 2002 02:02:18 -0600
Received: from smartcontainer.net (IDENT:qmailr@[203.24.179.147])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g0983e321792
for <[email-masked]>; Wed, 9 Jan 2002 02:03:41 -0600
Received: (qmail 20522 invoked by uid 8); 9 Jan 2002 08:02:14 -0000
Received: from moki.smartcontainer.net (20.20.20.13, claiming to be "smartcontainer.net")
by smarty.smartcontainer.net with SMTP id smtpdYdlYuj; Wed, 09 Jan 2002 03:02:10 EST
Message-ID: <[email-masked]>
Date: Wed, 09 Jan 2002 19:02:11 +1100
From: Peter Jansen <[email-masked]>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: [email-masked]
CC: Avr Gcc List <[email-masked]>
Subject: Re: [avr-gcc-list] [Fwd: building gcc/g++]
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

> I did a little mistake with my patches. Now I can build avr-g++ without having
> to deal with newlib and libstdc++. They are simply not build.
> The patches are for gcc-3.0.2. Attached you will find them. I think they can
> be sent to the gcc team, but I haven't done it until now, because of the
> following problem.
>
> After writing a small c++ test program, simulating it in simulavr and analysing
> the generated asm file, I discovered that nobody is calling the
> con/destructors of global variables.
>
> I have found the __CTOR_LIST__ in the asm output.
>
> Is anybody working on a solution of this problem?

Yes we have just come across this problem, today we have fixed g++ to
make this all work om the mega128 (which is what we are using).

It required the following fixes,

1. Put the con/destructor table in .ctors/.dtors sections, and make the
linker script handle them.

2. Write a do_global_constructors function.

3. Call the do_global_constructors from the startup code.

I'm quite busy at the moment, but I will try and make patches for this,
I still have to do something for the other avr's (unless you would like to)

>>I have posted patches for the ATmega128 for the above sources if you
>>want ATmega128 support. Some of this support is already built into the
>>CVS trees for gcc, binutils already for those who like like on the edge.
>>

> Maybe you can send me the patches. Then I will integrae them into my build

> script.

here are the two messages to avr-gcc-list with the 3.0.2 patches for the
mega128 support, these wont patch againsed the current CVS tree I don't
think.

http://avr.jpk.co.nz/pipermail/avr-gcc-list/2001-November/001048.html
http://avr.jpk.co.nz/pipermail/avr-gcc-list/2001-November/001049.html

When I finish the constructor/destructor stuff, Ill get the latest CVS
source update the patches and send them to the gcc/binutils maintainers.

The stuff for avr-libc is already in the latest avr-libc for the
ATmega128 at

http://www.amelek.gda.pl/avr/libc/

Regards,

--
Peter Jansen
Smart Container
Level 1, NIC Building
Eveleigh
NSW 1430
AUSTRALIA

avr-gcc-list at http://avr1.org

From [email-masked] Wed Jan 09 22:37:30 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16OFAh-0000oK-00
for <avrgcclist@localhost>; Wed, 09 Jan 2002 22:37:23 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Wed, 09 Jan 2002 22:37:23 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g098sen32189
for <[email-masked]>; Wed, 9 Jan 2002 02:54:40 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0982IL09240
for avr-gcc-list-list.japetos; Wed, 9 Jan 2002 02:02:18 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0982IB09237
for <[email-masked]>; Wed, 9 Jan 2002 02:02:18 -0600
Received: from mail.intekom.com (mid-mail-02.intekom.com [196.25.69.45])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g0983e321791
for <[email-masked]>; Wed, 9 Jan 2002 02:03:40 -0600
Received: (qmail 19876 invoked from network); 9 Jan 2002 08:02:02 -0000
Received: from bnb53-01-p198.nt.saix.net (HELO scorpio) ([155.239.180.198]) (envelope-sender <[email-masked]>)
by intekom.com (qmail-ldap-1.03) with SMTP
for <[email-masked]>; 9 Jan 2002 08:02:02 -0000
X-vSMTP: intekom.com
From: "Anton Erasmus" <[email-masked]>
Organization: Home
To: [email-masked]
Date: Wed, 9 Jan 2002 10:14:32 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: Re: [avr-gcc-list] Query regarding hard located variables
CC: [email-masked]
Message-ID: <3C3C1808.26629.66C16C@localhost>
In-reply-to: <3C3ABBAD.25385.607267@localhost>
References: <[email-masked]>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello Scott,

You can of course also define the variable in the linker script, and
force it to be at the address you want.

If you define a variable
unsigned char _PageReg
in the linker file, you add the line

extern unsigned char PageReg in your C file, and you can then
access it, directly.

As far as I can see, the RAM below this address, and the RAM
above this address will have to be different sections.

I have used this method to define variables in code space, that
contains information that only the linker can provide.

Hope this helps

Regards
Anton

> Hello Scott,
>
> The following C Code will put variable gTestVar into section
> "no_init". The relevent linker script commands you will need to put
> this section at a specific address, I do not know.
>
> int gTestVar __attribute__((section ("no_init");
>
> Regards
> Anton
>
> > Hello Anton,
> >
> > Yes, this is the kind of thing that I am after. However I am unable
> > to find any examples or doumentation on how to do this.
> > Specifically, I cannot find examples or instructions on how to do
> > this for a single variable (or even a single file... I can put the
> > "magic" variable in a file on it's own).
> >
> > Does anyone have an example that they can point me towards (or send)
> > which shows how to put a variable or a file into a specific section
> > in RAM?
> >
> >
> > Kind Regards,
> >
> > Scott
> >
> > Anton Erasmus wrote:
> > >
> > > Date sent: Mon, 07 Jan 2002 13:33:05 +1100
> > > From: Scott Finneran <[email-masked]>
> > > Organization: Smart Container To:
> > > avr-gcc-list <[email-masked]> Subject:
> > > [avr-gcc-list] Query regarding hard located variables
> > >
> > > > Hello All,
> > > >
> > > > I would have thought that the following would be a more commonly
> > > > asked (and therefore answered) question. I can only assume that
> > > > I am searching for the info in the wrong place or using the
> > > > wrong keywords. If so, then I apologise in advance.
> > > >
> > > > I would like to know how to hard locate a variable using gcc
> > > > and/or the gnu linker. The hardware that I am using has a number
> > > > of memory mapped hardware registers. Obviously I would like to
> > > > avoid having the linker drop variables into memory addresses
> > > > where these registers live. It would also be nice to be able
> > > > have variables (of my choosing) be located at these addresses.
> > > > Of course the latter can be easily achieved with a pointer. Many
> > > > commercial embedded compilers provide a compiler specific
> > > > directive such as: eg int reg1 _at(0x4000);
> > > >
> > > > Others simply allow you to specify the location of specific
> > > > variables in linker scripts.
> > > >
> > > > I have seen many websites and articles (eg from embedded.com)
> > > > talk about doing this. Many more say that it is possible. None
> > > > of them (that I have found) say how, or even better give an
> > > > example.
> > > >
> > > > Can anyone point me to some info or alternatively show me how
> > > > this is done?
> > > >
> > >
> > > Hi,
> > >
> > > You can put each variable in it's own named section with the
> > > "attribute section" command of gcc. In your linker script you can
> > > define the address of each section. I am not sure how many
> > > sections the linker can handle.
> > >
> > > Regards
> > > Anton
> > avr-gcc-list at http://avr1.org
> >
>
>
> avr-gcc-list at http://avr1.org
>

avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:07:41 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM0j-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:07:41 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:07:41 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g09H7fw30970
for <[email-masked]>; Wed, 9 Jan 2002 11:07:41 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g09FFN914300
for avr-gcc-list-list.japetos; Wed, 9 Jan 2002 09:15:23 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g09FFMB14297
for <[email-masked]>; Wed, 9 Jan 2002 09:15:22 -0600
Received: from dalsa.com (firewall.dalsa.com [207.176.180.114])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g09FGlO16857
for <[email-masked]>; Wed, 9 Jan 2002 09:16:47 -0600
Received: by firewall.dalsa.com id <119069>; Wed, 9 Jan 2002 10:14:00 -0500
Subject: Re: Fwd: [avr-gcc-list] Query regarding hard located variables
To: <[email-masked]>
X-Mailer: Lotus Notes Release 5.0.6a January 17, 2001
Message-Id: <[email-masked]>
From: [email-masked]
Date: Wed, 9 Jan 2002 10:06:13 -0500
X-MIMETrack: Serialize by Router on Wat/Dalsa(Release 5.0.5 |September 22, 2000) at 01/09/2002
10:14:06 AM
MIME-Version: 1.0
Content-type: text/plain; charset=us-ascii
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

To Klaus Rudolph, Scott Finneran, Anton Erasmus, et al.

While I have not (yet) used avr-gcc I have used another compiler for the
AVR uC for code with similar requirements though I have not
yet implemented a bank switching mechanism as described.

I have used a mechanism like that proposed by Scott Finneran but note that
I think you will wind up with three memory "segments",
one before the address or addresses you want to specifically locate, the
area where you want to specifically locate, i.e. the bank switching
register,
and the area above the specifically located segment.

Only one will be used by the compiler as "data space" to freely assign to
variables. I assume this will be the region below the bank switching
register.
The variables (or variable) required to be located at the reserved
location(s) will in the area reserved for this purpose i.e. the one address
segment reserved for the bank switching register.

But now you will have to find a way to make use of the third memory area
which will not be used for freely assigned variables.

In my designs I have "hard" located buffer space and other large structures
in this type of region so as to move these structures out of the area to be
used for freely assigned variables.

Linker control files were used to locate and name the memory segments.
Compiler controls were used to identify the named segments into which
certain variables were assigned.
And, to break all rules, I have also used direct pointer address
assignments such as those described previously in this discussion series.

John Johnson

Klaus Rudolph
<lts-rudolph@gmx. To: Scott Finneran <[email-masked]>
de> cc: avr <[email-masked]>
Sent by: Subject: Re: Fwd: [avr-gcc-list] Query regarding hard located
owner-avr-gcc-lis variables
[email-masked]

2002-01-08 15:52

Scott Finneran wrote:
>
> Hello Torsten,
>
> Thankyou for your suggestion, unfortunately it does not answer my
> question. What you have suggested will work but has problems.
>
> Perhaps I did not explain my problem well enough. I have a hardware
> register which is in data memory space. It overlays a single memory
> location. It is not at the begining or end of memory, so I cannot simply
> change the MEMORY section of linker script to begin after it or stop
> just before it (I would lose approx 20% of my RAM doing this). Accessing
> the location is not a problem, it is a simple pointer operation (as you
> have indicated). However, as the register lives in the middle of my data
> space (ie it overlays one location of my external SRAM device), it is
> quite likely that the linker will assign the memory address to an
> unrelated variable. As you can imagine, this will cause all kinds of
> mysterious behaviour of the system when I modify this variable.
>
> What I would like to do is either:
> A) Assign a specific variable to this memory location (which I can then
> use to access the register).
>
> or
>
> B) Reserve the memory location so that the linker does not use it. I can
> then safely access it with a pointer as you have suggested.
>
> Does anyone know how to do either of these things?
>

I would build a second data section in the linker script after your
hard located register. You can use this data2 section through the
normal section statements from assembler or C with pragma.

There is no way from linker scripts to reserve a varible in the
address space of the section for other use i think.

What you want to have is one section (data) and reserve there one
address with one, lets say static c variable, so the compiler
can decide where the compiler generated vars should go. Mmmh.
No idea.
Is that what you really mean?
avr-gcc-list at http://avr1.org

avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:07:42 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM0j-0003wo-01
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:07:41 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:07:41 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g09JYIj22805
for <[email-masked]>; Wed, 9 Jan 2002 13:34:18 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g09H52w16952
for avr-gcc-list-list.japetos; Wed, 9 Jan 2002 11:05:02 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g09H51B16949
for <[email-masked]>; Wed, 9 Jan 2002 11:05:01 -0600
Received: from ida.interface-business.de (ida.interface-business.de [193.101.57.9])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g09H6Pw30552
for <[email-masked]>; Wed, 9 Jan 2002 11:06:26 -0600
Received: (from j@localhost)
by ida.interface-business.de id g09H4xl28826
for [email-masked]; Wed, 9 Jan 2002 18:04:59 +0100 (MET)
Date: Wed, 9 Jan 2002 18:04:59 +0100
From: [email-masked]
To: [email-masked]
Subject: Re: [avr-gcc-list] Query regarding hard located variables
Message-ID: <[email-masked]>
Reply-To: Joerg Wunsch <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
User-Agent: Mutt/1.2.5i
X-Newsreader: knews 1.0b.1
Organization: interface systems GmbH, Dresden
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
X-Original-Newsgroups: local.avr.gcc
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

[email-masked] wrote:

> ATMega128. This register which I am discussing is not internal to
> the processor. It is a bank switching register for the second half
> of the ATMega128 data space (ie addresses > 0x7fff can be bank
> switched). Basically, it is located at 0x7fff. We still want to be
> able to use addresses > 0x7fff for data (and can guarantee that the
> correct page will be swithed in when necessary)

In that case, write a linker script of your own. Decrease the amount
of available RAM by one byte, so it'll end up right before 0x7fff.
Invent a hardware memory section and an ELF section of your own for
the single address 0x7fff in the linker script. Then place your
variable to access the bank switching register into that section.

You need to initialize this variable to your desired value manually at
program startup, gcc's framework will only handle the initialization
of the .bss (to 0) and .data sections (to the values provided as
initializers in the C program).

--
J"org Wunsch Unix support engineer
[email-masked] http://www.interface-systems.de/~j/
avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:07:43 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM0k-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:07:42 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:07:42 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g09LEoJ15273
for <[email-masked]>; Wed, 9 Jan 2002 15:14:50 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g09IgRI18022
for avr-gcc-list-list.japetos; Wed, 9 Jan 2002 12:42:27 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g09IgQB18019
for <[email-masked]>; Wed, 9 Jan 2002 12:42:26 -0600
Received: from weak.org ([email-masked] [216.103.110.222])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g09Ihpr10319
for <[email-masked]>; Wed, 9 Jan 2002 12:43:51 -0600
Received: (from jammer@localhost)
by weak.org (8.9.3/8.9.3/Debian 8.9.3-21) id KAA18548
for [email-masked]; Wed, 9 Jan 2002 10:42:24 -0800
From: Jon McClintock <[email-masked]>
Date: Wed, 9 Jan 2002 10:42:24 -0800
To: [email-masked]
Subject: [avr-gcc-list] Does uisp support the Atmel ATAVRISP programmer?
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello,

I'm looking for an ISP programmer and can't figure out if the ATAVRISP that
Atmel makes is supported by uisp. Has anyone had any success with it?

Thanks,

-Jon
avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:07:44 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM0l-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:07:43 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:07:43 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g09LjEa23381
for <[email-masked]>; Wed, 9 Jan 2002 15:45:14 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g09Jb3718684
for avr-gcc-list-list.japetos; Wed, 9 Jan 2002 13:37:03 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g09Jb2B18681
for <[email-masked]>; Wed, 9 Jan 2002 13:37:02 -0600
Received: from mail.intekom.com (mid-mail-01.intekom.com [196.25.69.44])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g09JcOj23811
for <[email-masked]>; Wed, 9 Jan 2002 13:38:25 -0600
Received: (qmail 20395 invoked from network); 9 Jan 2002 19:35:42 -0000
Received: from bnb53-01-p102.nt.saix.net (HELO scorpio) ([155.239.180.102]) (envelope-sender <[email-masked]>)
by intekom.com (qmail-ldap-1.03) with SMTP
for <[email-masked]>; 9 Jan 2002 19:35:42 -0000
X-vSMTP: intekom.com
From: "Anton Erasmus" <[email-masked]>
Organization: Home
To: [email-masked]
Date: Wed, 9 Jan 2002 21:48:11 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: Re: [avr-gcc-list] Specifying crt*.o file
Message-ID: <3C3CBA9B.6380.2E1E8DF@localhost>
In-reply-to: <[email-masked]>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

If I specify the crt file explicittely on the command line, I get
"Duplicate Symbol" errors. It seems that the default crt file is still
linked in as well. I cannot find the option, that tells gcc not to link
in the default crt file.

The -nostartfiles option that reinhard jessich suggested, gives the
warning "unknown option nostartfiles".

For the moment I have edited the specs file to change the name of
the default crt file, but this is a complete hack.

Regards
Anton

> Hello Anton,
>
> Just specify the crt*.o file on the linker command line. The important
> thing to remember is to PUT IT FIRST (ie before any other .o files).
> This will ensure (I only say this from experience) that the contents
> are put at address zero.
>
> Regards,
>
> Scott
>
> Anton Erasmus wrote:
> >
> > Hi,
> >
> > I am trying to use a custom start-up file with avr-gcc. How does one
> > force the linker to link with a specified crt file in stead of the
> > default crt*.o file ?
> >
> > Regards
> > Anton
> >
> > avr-gcc-list at http://avr1.org
> avr-gcc-list at http://avr1.org
>

avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:07:45 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM0m-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:07:44 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:07:44 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g09MH2j09053
for <[email-masked]>; Wed, 9 Jan 2002 16:17:02 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g09LLpA21676
for avr-gcc-list-list.japetos; Wed, 9 Jan 2002 15:21:51 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g09LLpB21673
for <[email-masked]>; Wed, 9 Jan 2002 15:21:51 -0600
Received: from smartcontainer.net (IDENT:qmailr@[203.24.179.147])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g09LNFJ17563
for <[email-masked]>; Wed, 9 Jan 2002 15:23:16 -0600
Received: (qmail 24451 invoked by uid 8); 9 Jan 2002 21:21:43 -0000
Received: from zoot.smartcontainer.net (20.20.20.14, claiming to be "smartcontainer.net")
by smarty.smartcontainer.net with SMTP id smtpdoYC2Rj; Wed, 09 Jan 2002 16:21:39 EST
Message-ID: <[email-masked]>
Date: Thu, 10 Jan 2002 08:21:39 +1100
From: Matthew Lee <[email-masked]>
Organization: Smart Container
X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.7-10 i686)
X-Accept-Language: en, de-DE
MIME-Version: 1.0
To: Anton Erasmus <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] Specifying crt*.o file
References: <3C3CBA9B.6380.2E1E8DF@localhost>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Anton,

As far as I remember, if you compile and link in one step (with
avr-gcc), it will automatically include crt*.o at the linking stage. If
you've specified crt*.o on the gcc command line as well, it will attempt
to link it twice (and thus the duplicate symbol error you are seeing).

If you don't do the linking step with avr-gcc but with avr-ld, then you
can specify the crt*.o file on the linker command line (as Scott
suggested below) and you shouldn't get your duplicate symbol problem.

Regards,
Matt

Anton Erasmus wrote:
>
> Hi,
>
> If I specify the crt file explicittely on the command line, I get
> "Duplicate Symbol" errors. It seems that the default crt file is still
> linked in as well. I cannot find the option, that tells gcc not to link
> in the default crt file.
>
> The -nostartfiles option that reinhard jessich suggested, gives the
> warning "unknown option nostartfiles".
>
> For the moment I have edited the specs file to change the name of
> the default crt file, but this is a complete hack.
>
> Regards
> Anton
>
> > Hello Anton,
> >
> > Just specify the crt*.o file on the linker command line. The important
> > thing to remember is to PUT IT FIRST (ie before any other .o files).
> > This will ensure (I only say this from experience) that the contents
> > are put at address zero.
> >
> > Regards,
> >
> > Scott
> >
> > Anton Erasmus wrote:
> > >
> > > Hi,
> > >
> > > I am trying to use a custom start-up file with avr-gcc. How does one
> > > force the linker to link with a specified crt file in stead of the
> > > default crt*.o file ?
> > >
> > > Regards
> > > Anton
> > >
> > > avr-gcc-list at http://avr1.org
> > avr-gcc-list at http://avr1.org
> >
>
> avr-gcc-list at http://avr1.org
avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:07:46 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM0n-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:07:45 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:07:45 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g09Mxih20034
for <[email-masked]>; Wed, 9 Jan 2002 16:59:44 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g09Lqmh22054
for avr-gcc-list-list.japetos; Wed, 9 Jan 2002 15:52:48 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g09LqlB22051
for <[email-masked]>; Wed, 9 Jan 2002 15:52:47 -0600
Received: from mail-vie-pub-p.1012internet.at (mail-vie-pub-p.1012internet.at [212.95.31.10])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g09LsDa26523
for <[email-masked]>; Wed, 9 Jan 2002 15:54:13 -0600
Received: from telering.at (dis212095026241.vie.telering.at [212.95.26.241])
by mail-vie-pub-p.1012internet.at (8.9.3/8.9.3) with SMTP id WAA20730
for <[email-masked]>; Wed, 9 Jan 2002 22:52:44 +0100 (MET)
Received: (qmail 4327 invoked by uid 501); 9 Jan 2002 21:50:42 -0000
From: [email-masked]
Reply-To: [email-masked]
To: [email-masked]
Subject: Re: [avr-gcc-list] Specifying crt*.o file
Date: Wed, 9 Jan 2002 22:27:09 +0100
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
References: <3C3CBA9B.6380.2E1E8DF@localhost>
In-Reply-To: <3C3CBA9B.6380.2E1E8DF@localhost>
MIME-Version: 1.0
Message-Id: <[email-masked]>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by majordomo2.host4u.net id g09LqlB22052
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Wed, 09 Jan 2002, Anton Erasmus wrote:
> Hi,
>
> If I specify the crt file explicittely on the command line, I get
> "Duplicate Symbol" errors. It seems that the default crt file is still
> linked in as well. I cannot find the option, that tells gcc not to link
> in the default crt file.
>
> The -nostartfiles option that reinhard jessich suggested, gives the
> warning "unknown option nostartfiles".

First I do only compile:
/usr/local/cross-tools/bin/avr-gcc -v -c test.c
nothing special in the output, so I will not send it.

The output of a normal link command:
/usr/local/cross-tools/bin/avr-gcc -v test.o
Reading specs from /usr/local/cross-tools/lib/gcc-lib/avr/3.0.2/specs
Configured with: /opt/avr/gcc/source/gcc-3.0.2/configure -v --target=avr
--prefix=/usr/local/cross-tools --with-gnu-ld --with-gnu-as --disable-nls
Thread model: single gcc version 3.0.2
/usr/local/cross-tools/lib/gcc-lib/avr/3.0.2/../../../../avr/bin/ld
-m avr85xx
/usr/local/cross-tools/lib/gcc-lib/avr/3.0.2/../../../../avr/lib/crts8515.o
-L/usr/local/cross-tools/lib/gcc-lib/avr/3.0.2
-L/usr/local/cross-tools/lib/gcc-lib/avr/3.0.2/../../../../avr/lib test.o -lgcc
-lc -lgcc

The output of the special link command:
/usr/local/cross-tools/bin/avr-gcc -v -nostartfiles test.o
Reading specs from /usr/local/cross-tools/lib/gcc-lib/avr/3.0.2/specs
Configured with: /opt/avr/gcc/source/gcc-3.0.2/configure -v --target=avr
--prefix=/usr/local/cross-tools --with-gnu-ld --with-gnu-as --disable-nls
Thread model: single gcc version 3.0.2
/usr/local/cross-tools/lib/gcc-lib/avr/3.0.2/../../../../avr/bin/ld -m avr85xx
-L/usr/local/cross-tools/lib/gcc-lib/avr/3.0.2
-L/usr/local/cross-tools/lib/gcc-lib/avr/3.0.2/../../../../avr/lib test.o -lgcc
-lc -lgcc

Then I have tried:
/usr/local/cross-tools/bin/avr-gcc -v test.o
/usr/local/cross-tools/avr/lib/crts8515.o

and got:
<snip>
/usr/local/cross-tools/avr/lib/crts8515.o: In function `__c_startup__':
/opt/avr/gcc/source/avr-libc-20020106/libc/gcrt1.S:148: multiple definition of
`_real_init_'
<snip>

Then I tried:
/usr/local/cross-tools/bin/avr-gcc -nostartfiles -v test.o
/usr/local/cross-tools/avr/lib/crts8515.o

and got:
<snip>
/usr/local/cross-tools/lib/gcc-lib/avr/3.0.2/../../../../avr/bin/ld -m avr85xx
-L/usr/local/cross-tools/lib/gcc-lib/avr/3.0.2
-L/usr/local/cross-tools/lib/gcc-lib/avr/3.0.2/../../../../avr/lib test.o
/usr/local/cross-tools/avr/lib/crts8515.o -lgcc -lc -lgcc

So you can see the option is understand and the gcc will do exactly what I told
it. I have tested your special case with the crtxxx.o on the command line and
it worked, too!

Check the gcc command that you are using. Maybe you have forgot to add
something or maybe you have an other version of the compiler?

Reinhard

--
Ing. Reinhard Jessich mailto: [email-masked]
A-1190 Vienna, Goergengasse 2/2/1 phone: +43/1/3692600
http://members.telering.at/jessich mobile: +43/664/1735439
avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:07:47 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM0o-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:07:46 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:07:46 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g09NSdl26852
for <[email-masked]>; Wed, 9 Jan 2002 17:28:39 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g09MXkK22511
for avr-gcc-list-list.japetos; Wed, 9 Jan 2002 16:33:46 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g09MXjB22508
for <[email-masked]>; Wed, 9 Jan 2002 16:33:45 -0600
Received: from mail-vie-pub-p.1012internet.at (mail-vie-pub-p.1012internet.at [212.95.31.10])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g09MZBI14794
for <[email-masked]>; Wed, 9 Jan 2002 16:35:11 -0600
Received: from telering.at (dis212095026241.vie.telering.at [212.95.26.241])
by mail-vie-pub-p.1012internet.at (8.9.3/8.9.3) with SMTP id XAA05120
for <[email-masked]>; Wed, 9 Jan 2002 23:33:41 +0100 (MET)
Received: (qmail 4383 invoked by uid 501); 9 Jan 2002 22:31:39 -0000
From: [email-masked]
Reply-To: [email-masked]
To: Peter Jansen <[email-masked]>
Subject: Re: [avr-gcc-list] [Fwd: building gcc/g++]
Date: Wed, 9 Jan 2002 22:58:28 +0100
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
References: <[email-masked]> <[email-masked]> <[email-masked]>
In-Reply-To: <[email-masked]>
Cc: [email-masked]
MIME-Version: 1.0
Message-Id: <[email-masked]>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by majordomo2.host4u.net id g09MXjB22509
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Wed, 09 Jan 2002, Peter Jansen wrote:
<snip>
> > I have found the __CTOR_LIST__ in the asm output.
> >
> > Is anybody working on a solution of this problem?
>
>
> Yes we have just come across this problem, today we have fixed g++ to
> make this all work om the mega128 (which is what we are using).
>
> It required the following fixes,
>
> 1. Put the con/destructor table in .ctors/.dtors sections, and make the
> linker script handle them.
I did:

Changes to avr.h:
I have added the definitions of ASM_OUTPUT_CONSTRUCTOR,
ASM_OUTPUT_DESTRUCTOR and added in_ctors, in_dtors to
EXTRA_SECTIONS. In EXTRA_SECTION_FUNCTIONS I added the
functions to emit the ctors and dtors sections.
I got them from elfos.h.

> 2. Write a do_global_constructors function.
I defined __do_global_ctors and __do_global_dtors functions in libgcc.S.

> 3. Call the do_global_constructors from the startup code.
I don't know where and how to add this? I am analysing how the m86hc11 does
this. As far as I have understand this, it uses a .global with the function
name in the file where it defines the constructor table. For the do_global_xxx
funktions it defines a new section in the linke script, so that the are
inserted just befor the main code.
I like this solution, because it needs no changes to the startup code in the
libc. How have you solved the problem?

As I linked a program I got the error that the data section and the ctors do
overlay. I am not familar with the linker scripts, but maybe you have a hint?

Maybe it's better to wait until you are ready and then try it with the smaller
avr's?

> I'm quite busy at the moment, but I will try and make patches for this,
> I still have to do something for the other avr's (unless you would like to)
As I wrote in one of my previous mails, I am not so familar with the avr. I
still have to learn the assember.

> here are the two messages to avr-gcc-list with the 3.0.2 patches for the
> mega128 support, these wont patch againsed the current CVS tree I don't
> think.
>
> http://avr.jpk.co.nz/pipermail/avr-gcc-list/2001-November/001048.html
> http://avr.jpk.co.nz/pipermail/avr-gcc-list/2001-November/001049.html
Thank you!

> When I finish the constructor/destructor stuff, Ill get the latest CVS
> source update the patches and send them to the gcc/binutils maintainers.
>
> The stuff for avr-libc is already in the latest avr-libc for the
> ATmega128 at

Reinhard

--
Ing. Reinhard Jessich mailto: [email-masked]
A-1190 Vienna, Goergengasse 2/2/1 phone: +43/1/3692600
http://members.telering.at/jessich mobile: +43/664/1735439
avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:07:50 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM0q-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:07:48 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:07:48 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0A0jGg12531
for <[email-masked]>; Wed, 9 Jan 2002 18:45:16 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g09NduO23723
for avr-gcc-list-list.japetos; Wed, 9 Jan 2002 17:39:56 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g09NdtB23720
for <[email-masked]>; Wed, 9 Jan 2002 17:39:55 -0600
Received: from deimos.frii.net (deimos.frii.com [216.17.128.2])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g09NfLe30153
for <[email-masked]>; Wed, 9 Jan 2002 17:41:21 -0600
Received: from ari-co2c-197.rasserver.net (ari-co2c-197.rasserver.net [207.92.201.197])
by deimos.frii.net (8.12.1/8.12.1) with ESMTP id g09NdlrE060876;
Wed, 9 Jan 2002 16:39:48 -0700 (MST)
Date: Wed, 9 Jan 2002 16:42:22 -0700 (MST)
From: "Theodore A. Roth" <[email-masked]>
X-X-Sender: <[email-masked]>
To: <[email-masked]>,
AVR GCC List <[email-masked]>
Subject: [avr-gcc-list] simulavr-0.0.13 released
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

I have just released simulavr-0.0.13. This release contains more bug
fixes, more documentation, improved gdb interface, improved display
interface, improved build system and a few other minor changes.

The home for the project has moved to a permanent site:

http://savannah.gnu.org/projects/simulavr/

The official 0.0.13 source tar file can be found here:

http://freesoftware.fsf.org/download/simulavr/

The latest changes can also be obtained via anonymous cvs now.

Please try it out and if you break it, send me a bug report!

Ted Roth

avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:07:48 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM0p-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:07:47 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:07:47 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0A0chq10584
for <[email-masked]>; Wed, 9 Jan 2002 18:38:43 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g09Nmv923815
for avr-gcc-list-list.japetos; Wed, 9 Jan 2002 17:48:57 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g09NmuB23812
for <[email-masked]>; Wed, 9 Jan 2002 17:48:56 -0600
Received: from mail.ripnet.com (mail.ripnet.com [206.47.98.3])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g09NoMr32288
for <[email-masked]>; Wed, 9 Jan 2002 17:50:22 -0600
Received: from A2-P246.RipNET.com ([email-masked] [206.47.206.247])
by mail.ripnet.com (8.12.0.Beta12/8.11.1) with ESMTP id g09NmrDv003449
for <[email-masked]>; Wed, 9 Jan 2002 18:48:54 -0500
Date: Wed, 9 Jan 2002 18:49:02 -0500 (EST)
From: RogerB <[email-masked]>
X-X-Sender: <[email-masked]>
To: AVR GCC List <[email-masked]>
Subject: [avr-gcc-list] Big end little end thingie
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

When I build a srec or ihex file on my linux box
with avr-gcc it seems to produce bigend files but if
I make one with avr studio it's the other way. The
file will start as E0C0 on the linux and C0E0 with avr
studio. I can only program the chips from my linux box
so I don't know what the rom image looks like.
I'm using avr-gcc version 3.0.2 and uisp version
20011025 and to build a file I do it this way
avr-gcc -O0 -Wall -mmcu=at90s2313 -c demo.c -o demo.o
avr-gcc -mmcu=at90s2313 -o demo.elf demo.o
avr-objcopy -O ihex demo.elf demo1.hex
Am I missing somethig the list file from
avrstudio shows the first instruction to be a jump
relative but the list file for avr-gcc show it to
be 14 0000 C0E0 ldi r28,lo8(__stack - 0)

avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:07:54 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM0r-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:07:49 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:07:49 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0A1OAN20821
for <[email-masked]>; Wed, 9 Jan 2002 19:24:10 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0A0ZKx24275
for avr-gcc-list-list.japetos; Wed, 9 Jan 2002 18:35:20 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0A0ZJB24272
for <[email-masked]>; Wed, 9 Jan 2002 18:35:19 -0600
Received: from smartcontainer.net (IDENT:qmailr@[203.24.179.147])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g0A0ahq10375
for <[email-masked]>; Wed, 9 Jan 2002 18:36:43 -0600
Received: (qmail 26324 invoked by uid 8); 10 Jan 2002 00:35:13 -0000
Received: from moki.smartcontainer.net (20.20.20.13, claiming to be "smartcontainer.net")
by smarty.smartcontainer.net with SMTP id smtpdV3KW7T; Wed, 09 Jan 2002 19:35:11 EST
Message-ID: <[email-masked]>
Date: Thu, 10 Jan 2002 11:35:11 +1100
From: Peter Jansen <[email-masked]>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: [email-masked]
CC: [email-masked]
Subject: Re: [avr-gcc-list] [Fwd: building gcc/g++]
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
Content-Type: multipart/mixed;
boundary="------------020008020101040109050209"
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.
--------------020008020101040109050209
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Reinhard,

Sorry I had done that work, attached is my patch, including the mega128
support.

Also attached is a new piece of startup code, and linker script.

[email-masked] wrote:

> On Wed, 09 Jan 2002, Peter Jansen wrote:
> <snip>
>
>>>I have found the __CTOR_LIST__ in the asm output.
>>>
>>>Is anybody working on a solution of this problem?
>>>
>>
>>Yes we have just come across this problem, today we have fixed g++ to
>>make this all work om the mega128 (which is what we are using).
>>
>>It required the following fixes,
>>
>>1. Put the con/destructor table in .ctors/.dtors sections, and make the
>>linker script handle them.
>>
> I did:
>
> Changes to avr.h:
> I have added the definitions of ASM_OUTPUT_CONSTRUCTOR,
> ASM_OUTPUT_DESTRUCTOR and added in_ctors, in_dtors to
> EXTRA_SECTIONS. In EXTRA_SECTION_FUNCTIONS I added the
> functions to emit the ctors and dtors sections.
> I got them from elfos.h.
>
>
>>2. Write a do_global_constructors function.
>>
> I defined __do_global_ctors and __do_global_dtors functions in libgcc.S.
>
>
>>3. Call the do_global_constructors from the startup code.
>>
> I don't know where and how to add this? I am analysing how the m86hc11 does
> this. As far as I have understand this, it uses a .global with the function
> name in the file where it defines the constructor table. For the do_global_xxx
> funktions it defines a new section in the linke script, so that the are
> inserted just befor the main code.
> I like this solution, because it needs no changes to the startup code in the
> libc. How have you solved the problem?
>
> As I linked a program I got the error that the data section and the ctors do
> overlay. I am not familar with the linker scripts, but maybe you have a hint?

This may be that you have run out of space in the one of the sections.

> Maybe it's better to wait until you are ready and then try it with the smaller
> avr's?

Attached is a start, I have changes to binutils to undate the linker
scripts, and avr-lib to update the startup code.

The startup code does not load the stack pointer, which is fixed in the
attached start up code attached.

>
>>I'm quite busy at the moment, but I will try and make patches for this,
>>I still have to do something for the other avr's (unless you would like to)
>>
> As I wrote in one of my previous mails, I am not so familar with the avr. I
> still have to learn the assember.
>
>
>>here are the two messages to avr-gcc-list with the 3.0.2 patches for the
>>mega128 support, these wont patch againsed the current CVS tree I don't
>>think.
>>
>>http://avr.jpk.co.nz/pipermail/avr-gcc-list/2001-November/001048.html
>>http://avr.jpk.co.nz/pipermail/avr-gcc-list/2001-November/001049.html
>>
> Thank you!
>
>
>>When I finish the constructor/destructor stuff, Ill get the latest CVS
>>source update the patches and send them to the gcc/binutils maintainers.
>>
>>The stuff for avr-libc is already in the latest avr-libc for the
>>ATmega128 at
>>
>
> Reinhard
>
>

--
Peter Jansen
Smart Container
Level 1, NIC Building
Eveleigh
NSW 1430
AUSTRALIA

--------------020008020101040109050209
Content-Type: text/plain;
name="gcc-3.0.2-patch-0.2"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="gcc-3.0.2-patch-0.2"

diff -c3Pr gcc-3.0.2/gcc/ChangeLog gcc-3.0.2-patch-0.2/gcc/ChangeLog
*** gcc-3.0.2/gcc/ChangeLog Wed Oct 24 03:19:18 2001
--- gcc-3.0.2-patch-0.2/gcc/ChangeLog Thu Jan 10 09:57:38 2002
***************
*** 1,3 ****
--- 1,11 ----
+ 2001-11-07 Peter Jansen <[email-masked]>
+
+ * gcc/config/avr/avr.c - added mega128 to list of avr5 types
+ * gcc/config/avr/avr.h - Ditto, Added C++ constructor stuff
+ * gcc/config/avr/libgcc.S - added C++ constructor functions
+ * gcc/config/avr/t-avr - added C++ object compile
+
+
2001-10-23 Release Manager

* GCC 3.0.2 Released.
diff -c3Pr gcc-3.0.2/gcc/config/avr/avr.c gcc-3.0.2-patch-0.2/gcc/config/avr/avr.c
*** gcc-3.0.2/gcc/config/avr/avr.c Thu Jun 28 07:35:37 2001
--- gcc-3.0.2-patch-0.2/gcc/config/avr/avr.c Wed Jan 9 12:31:04 2002
***************
*** 153,158 ****
--- 153,159 ----
{ "atmega163", AVR5 },
{ "atmega32", AVR5 },
{ "at94k", AVR5 },
+ { "atmega128", AVR5 },
/* Assembler only. */
{ "avr1", AVR1 },
{ "at90s1200", AVR1 },
***************
*** 1164,1170 ****
/* Choose mode for jump insn:
1 - relative jump in range -63 <= x <= 62 ;
2 - relative jump in range -2046 <= x <= 2045 ;
! 3 - absolute jump (only for ATmega[16]03). */

int
avr_jump_mode (x, insn)
--- 1165,1171 ----
/* Choose mode for jump insn:
1 - relative jump in range -63 <= x <= 62 ;
2 - relative jump in range -2046 <= x <= 2045 ;
! 3 - absolute jump (only for ATmega1[6][03][28]). */

int
avr_jump_mode (x, insn)
diff -c3Pr gcc-3.0.2/gcc/config/avr/avr.h gcc-3.0.2-patch-0.2/gcc/config/avr/avr.h
*** gcc-3.0.2/gcc/config/avr/avr.h Tue Apr 17 04:25:42 2001
--- gcc-3.0.2-patch-0.2/gcc/config/avr/avr.h Wed Jan 9 14:11:19 2002
***************
*** 1981,1987 ****
scheduling priorities of insns. */

! #define TEXT_SECTION_ASM_OP "\t.text"
/* A C expression whose value is a string containing the assembler
operation that should precede instructions and read-only data.
Normally `"\t.text"' is right. */
--- 1981,1987 ----
scheduling priorities of insns. */

! #define TEXT_SECTION_ASM_OP "\t.text\t"
/* A C expression whose value is a string containing the assembler
operation that should precede instructions and read-only data.
Normally `"\t.text"' is right. */
***************
*** 1991,2003 ****
operation to identify the following data as writable initialized
data. Normally `"\t.data"' is right. */

! #define EXTRA_SECTIONS in_progmem
/* A list of names for sections other than the standard two, which are
`in_text' and `in_data'. You need not define this macro on a
system with no other sections (that GCC needs to use). */

! #define EXTRA_SECTION_FUNCTIONS \
! \
void \
progmem_section (void) \
{ \
--- 1991,2059 ----
operation to identify the following data as writable initialized
data. Normally `"\t.data"' is right. */

! #define CONST_SECTION_ASM_OP "\t.section\t.rodata"
!
! /* Define the pseudo-ops used to switch to the .ctors and .dtors sections.
!
! Note that we want to give these sections the SHF_WRITE attribute
! because these sections will actually contain data (i.e. tables of
! addresses of functions in the current root executable or shared library
! file) and, in the case of a shared library, the relocatable addresses
! will have to be properly resolved/relocated (and then written into) by
! the dynamic linker when it actually attaches the given shared library
! to the executing process. (Note that on SVR4, you may wish to use the
! `-z text' option to the ELF linker, when building a shared library, as
! an additional check that you are doing everything right. But if you do
! use the `-z text' option when building a shared library, you will get
! errors unless the .ctors and .dtors sections are marked as writable
! via the SHF_WRITE attribute.) */
!
! #define CTORS_SECTION_ASM_OP "\t.section\t.ctors,\"aw\""
! #define DTORS_SECTION_ASM_OP "\t.section\t.dtors,\"aw\""
!
! /* On svr4, we *do* have support for the .init and .fini sections, and we
! can put stuff in there to be executed before and after `main'. We let
! crtstuff.c and other files know this by defining the following symbols.
! The definitions say how to change sections to the .init and .fini
! sections. This is the same for all known svr4 assemblers. */
!
! #define INIT_SECTION_ASM_OP "\t.section\t.init"
! #define FINI_SECTION_ASM_OP "\t.section\t.fini"
!
! #define CTORS_SECTION_FUNCTION \
! void \
! ctors_section () \
! { \
! if (in_section != in_ctors) \
! { \
! fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \
! in_section = in_ctors; \
! } \
! }
!
! #define DTORS_SECTION_FUNCTION \
! void \
! dtors_section () \
! { \
! if (in_section != in_dtors) \
! { \
! fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \
! in_section = in_dtors; \
! } \
! }
!
! #define EXTRA_SECTIONS in_progmem, in_ctors, in_dtors
/* A list of names for sections other than the standard two, which are
`in_text' and `in_data'. You need not define this macro on a
system with no other sections (that GCC needs to use). */

! #undef EXTRA_SECTION_FUNCTIONS
! #define EXTRA_SECTION_FUNCTIONS \
! PROGMEM_SECTION_FUNCTION \
! CTORS_SECTION_FUNCTION \
! DTORS_SECTION_FUNCTION
!
! #define PROGMEM_SECTION_FUNCTION \
void \
progmem_section (void) \
{ \
***************
*** 2011,2016 ****
--- 2067,2111 ----
in_section = in_progmem; \
} \
}
+
+ /* This is the pseudo-op used to generate a reference to a specific
+ symbol in some section. It is only used in machine-specific
+ configuration files, typically only in ASM_OUTPUT_CONSTRUCTOR and
+ ASM_OUTPUT_DESTRUCTOR. This is the same for all known svr4
+ assemblers, except those in targets that don't use 32-bit pointers.
+ Those should override INT_ASM_OP. Yes, the name of the macro is
+ misleading. */
+
+ #ifndef INT_ASM_OP
+ #define INT_ASM_OP "\t.short\t"
+ #endif
+
+
+ /* A C statement (sans semicolon) to output an
+ element in the table of global constructors. */
+ #define ASM_OUTPUT_CONSTRUCTOR(FILE, NAME) \
+ do \
+ { \
+ ctors_section (); \
+ fprintf (FILE, "%spm(", INT_ASM_OP); \
+ assemble_name (FILE, NAME); \
+ fprintf (FILE, ")\t;; constructor is a word address\n"); \
+ } \
+ while (0)
+
+ /* A C statement (sans semicolon) to output an
+ element in the table of global destructors. */
+ #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
+ do \
+ { \
+ dtors_section (); \
+ fprintf (FILE, "%spm(", INT_ASM_OP); \
+ assemble_name (FILE, NAME); \
+ fprintf (FILE, ")\t;; destructor is a word address\n"); \
+ } \
+ while (0)
+
+
/* `EXTRA_SECTION_FUNCTIONS'
One or more functions to be defined in `varasm.c'. These
functions should do jobs analogous to those of `text_section' and
***************
*** 2973,2978 ****
--- 3068,3074 ----
%{mmcu=avr3:%(cpp_avr3)} \
%{mmcu=atmega603:%(cpp_avr3) -D__AVR_ATmega603__} \
%{mmcu=atmega103:%(cpp_avr3) -D__AVR_ATmega103__} \
+ %{mmcu=atmega128:%(cpp_avr5) -D__AVR_ATmega128__} \
%{mmcu=avr4:%(cpp_avr4)} \
%{mmcu=atmega83: %(cpp_avr4) -D__AVR_ATmega83__} \
%{mmcu=atmega85: %(cpp_avr4) -D__AVR_ATmega85__} \
***************
*** 3051,3056 ****
--- 3147,3153 ----
%{!mmcu*:-m avr85xx} \
%{mmcu=atmega603:-m avrmega603} \
%{mmcu=atmega103:-m avrmega103} \
+ %{mmcu=atmega128:-m avrmega128} \
%{mmcu=atmega161:-m avrmega161} \
%{mmcu=atmega163:-m avrmega161} \
%{mmcu=atmega32:-m avr5} \
***************
*** 3130,3135 ****
--- 3227,3233 ----
%{mmcu=at90c8534:crtc8534.o%s} \
%{mmcu=at90s8535:crts8535.o%s} \
%{mmcu=atmega103|mmcu=avr3:crtm103.o%s} \
+ %{mmcu=atmega128|mmcu=avr5:crtm128.o%s} \
%{mmcu=atmega603:crtm603.o%s} \
%{mmcu=atmega83|mmcu=avr4:crtm83.o%s} \
%{mmcu=atmega85:crtm85.o%s} \
diff -c3Pr gcc-3.0.2/gcc/config/avr/libgcc.S gcc-3.0.2-patch-0.2/gcc/config/avr/libgcc.S
*** gcc-3.0.2/gcc/config/avr/libgcc.S Wed Jan 9 11:25:27 2002
--- gcc-3.0.2-patch-0.2/gcc/config/avr/libgcc.S Wed Jan 9 18:22:32 2002
***************
*** 31,36 ****
--- 31,37 ----
#define __SREG__ 0x3f
#define __SP_H__ 0x3e
#define __SP_L__ 0x3d
+ #define __RAMPZ__ 0x3b

/* Most of the functions here are called directly from avr.md
patterns, instead of using the standard libcall mechanisms.
***************
*** 75,90 ****
add r_res,r_arg2
add r_arg2,r_arg2 ; shift multiplicand
breq __mulqi3_exit ; while multiplicand != 0
! lsr r_arg1 ;
brne __mulqi3_loop ; exit if multiplier = 0
! __mulqi3_exit:
mov r_arg1,r_res ; result to return register
ret

! #undef r_arg2
! #undef r_arg1
! #undef r_res
!
.endfunc
#endif /* defined (L_mulqi3) */

--- 76,91 ----
add r_res,r_arg2
add r_arg2,r_arg2 ; shift multiplicand
breq __mulqi3_exit ; while multiplicand != 0
! lsr r_arg1 ;
brne __mulqi3_loop ; exit if multiplier = 0
! __mulqi3_exit:
mov r_arg1,r_res ; result to return register
ret

! #undef r_arg2
! #undef r_arg1
! #undef r_res
!
.endfunc
#endif /* defined (L_mulqi3) */

***************
*** 133,139 ****
rjmp __mulhi3_skip1
add r_resL,r_arg2L ; result + multiplicand
adc r_resH,r_arg2H
! __mulhi3_skip1:
add r_arg2L,r_arg2L ; shift multiplicand
adc r_arg2H,r_arg2H

--- 134,140 ----
rjmp __mulhi3_skip1
add r_resL,r_arg2L ; result + multiplicand
adc r_resH,r_arg2H
! __mulhi3_skip1:
add r_arg2L,r_arg2L ; shift multiplicand
adc r_arg2H,r_arg2H

***************
*** 154,161 ****
#undef r_arg1H
#undef r_arg2L
#undef r_arg2H
! #undef r_resL
! #undef r_resH

.endfunc
#endif /* defined (L_mulhi3) */
--- 155,162 ----
#undef r_arg1H
#undef r_arg2L
#undef r_arg2H
! #undef r_resL
! #undef r_resH

.endfunc
#endif /* defined (L_mulhi3) */
***************
*** 204,219 ****

#define r_arg2L r18 /* multiplicand Low */
! #define r_arg2H r19
#define r_arg2HL r20
#define r_arg2HH r21 /* multiplicand High */
!
#define r_resL r26 /* result Low */
#define r_resH r27
#define r_resHL r30
#define r_resHH r31 /* result High */

!
.global __mulsi3
.func __mulsi3
__mulsi3:
--- 205,220 ----

#define r_arg2L r18 /* multiplicand Low */
! #define r_arg2H r19
#define r_arg2HL r20
#define r_arg2HH r21 /* multiplicand High */
!
#define r_resL r26 /* result Low */
#define r_resH r27
#define r_resHL r30
#define r_resHH r31 /* result High */

!
.global __mulsi3
.func __mulsi3
__mulsi3:
***************
*** 266,272 ****
adc r_arg2H,r_arg2H
adc r_arg2HL,r_arg2HL
adc r_arg2HH,r_arg2HH
!
lsr r_arg1HH ; gets LSB of multiplier
ror r_arg1HL
ror r_arg1H
--- 267,273 ----
adc r_arg2H,r_arg2H
adc r_arg2HL,r_arg2HL
adc r_arg2HH,r_arg2HH
!
lsr r_arg1HH ; gets LSB of multiplier
ror r_arg1HL
ror r_arg1H
***************
*** 282,306 ****
mov r_arg1L,r_resL
ret
#endif /* !defined (__AVR_ENHANCED__) */
! #undef r_arg1L
! #undef r_arg1H
#undef r_arg1HL
#undef r_arg1HH
!
!
! #undef r_arg2L
! #undef r_arg2H
#undef r_arg2HL
#undef r_arg2HH
!
! #undef r_resL
! #undef r_resH
! #undef r_resHL
! #undef r_resHH

.endfunc
#endif /* defined (L_mulsi3) */
!
/*******************************************************
Division 8 / 8 => (result + remainder)
*******************************************************/
--- 283,307 ----
mov r_arg1L,r_resL
ret
#endif /* !defined (__AVR_ENHANCED__) */
! #undef r_arg1L
! #undef r_arg1H
#undef r_arg1HL
#undef r_arg1HH
!
!
! #undef r_arg2L
! #undef r_arg2H
#undef r_arg2HL
#undef r_arg2HH
!
! #undef r_resL
! #undef r_resH
! #undef r_resHL
! #undef r_resHH

.endfunc
#endif /* defined (L_mulsi3) */
!
/*******************************************************
Division 8 / 8 => (result + remainder)
*******************************************************/
***************
*** 325,331 ****
rol r_arg1 ; shift dividend (with CARRY)
dec r_cnt ; decrement loop counter
brne __udivmodqi4_loop
! com r_arg1 ; complement result
; because C flag was complemented in loop
ret
.endfunc
--- 326,332 ----
rol r_arg1 ; shift dividend (with CARRY)
dec r_cnt ; decrement loop counter
brne __udivmodqi4_loop
! com r_arg1 ; complement result
; because C flag was complemented in loop
ret
.endfunc
***************
*** 357,364 ****
#undef r_arg1
#undef r_arg2
#undef r_cnt
!
!
/*******************************************************
Division 16 / 16 => (result + remainder)
*******************************************************/
--- 358,365 ----
#undef r_arg1
#undef r_arg2
#undef r_cnt
!
!
/*******************************************************
Division 16 / 16 => (result + remainder)
*******************************************************/
***************
*** 372,378 ****
/* return: quotient */
#define r_arg2L r22 /* divisor Low */
#define r_arg2H r23 /* divisor High */
!
#define r_cnt r21 /* loop count */

#if defined (L_udivmodhi4)
--- 373,379 ----
/* return: quotient */
#define r_arg2L r22 /* divisor Low */
#define r_arg2H r23 /* divisor High */
!
#define r_cnt r21 /* loop count */

#if defined (L_udivmodhi4)
***************
*** 438,454 ****
.endfunc
#endif /* defined (L_divmodhi4) */

! #undef r_remH
! #undef r_remL
!
! #undef r_arg1H
! #undef r_arg1L
!
! #undef r_arg2H
! #undef r_arg2L
!
! #undef r_cnt
!
/*******************************************************
Division 32 / 32 => (result + remainder)
*******************************************************/
--- 439,455 ----
.endfunc
#endif /* defined (L_divmodhi4) */

! #undef r_remH
! #undef r_remL
!
! #undef r_arg1H
! #undef r_arg1L
!
! #undef r_arg2H
! #undef r_arg2L
!
! #undef r_cnt
!
/*******************************************************
Division 32 / 32 => (result + remainder)
*******************************************************/
***************
*** 468,474 ****
#define r_arg2HL r20
#define r_arg2H r19
#define r_arg2L r18 /* divisor Low */
!
#define r_cnt __zero_reg__ /* loop count (0 after the loop!) */

#if defined (L_udivmodsi4)
--- 469,475 ----
#define r_arg2HL r20
#define r_arg2H r19
#define r_arg2L r18 /* divisor Low */
!
#define r_cnt __zero_reg__ /* loop count (0 after the loop!) */

#if defined (L_udivmodsi4)
***************
*** 674,676 ****
--- 675,753 ----
.endfunc
#endif /* defined (L_tablejump) */

+ #ifdef L_ctor
+
+ ; End of constructor table
+ .sect .init,"ax",@progbits
+ .globl __do_global_ctors
+ __do_global_ctors:
+ #if defined (__AVR_ENHANCED__) && defined (__AVR_MEGA__)
+ ldi r28, lo8(__CTOR_LIST__)
+ ldi r29, hi8(__CTOR_LIST__)
+ movw r30, r28
+ ; ldi r16, 0 ; const value of 0
+ ; ldi r17, 0 ; const value of 1
+ ldi r16, hh8(__CTOR_LIST__) ; init the RAMPZ value
+ out __RAMPZ__, r16
+ _ctorsLoop:
+ cpi r30, lo8(__CTOR_END__)
+ brne _do_ctor ; Branch if ZL not equal to low byte of CTOR_END
+ cpi r31, hi8(__CTOR_END__)
+ brne _do_ctor ; Branch if ZH not equal to high byte of CTOR_END
+ jmp _ctors_done
+ _do_ctor:
+ ; out __RAMPZ__, r16
+ ; sbrc r29, 7 ; if msb is set then do the same for RAMPZ
+ ; out __RAMPZ__, r17
+ elpm r26, Z+
+ ; elpm r27, Z
+ elpm r27, Z+ ; post-increment will automatically handle RAMPZ
+ push r30
+ push r31
+ movw r30, r26
+ icall
+ pop r31
+ pop r30
+ ; adiw r28, 2
+ ; movw r30, r28
+ jmp _ctorsLoop
+ #endif
+ _ctors_done:
+ ret
+
+ #endif /* L_ctor */
+
+ #ifdef L_dtor
+
+ .sect .fini,"ax",@progbits
+ .globl __do_global_dtors
+
+ ;;
+ ;; This piece of code is inserted in the _exit() code by the linker.
+ ;;
+ ;; void *p;
+ ;; for (p = __DTOR_LIST__; *p; p++)
+ ;; {
+ ;; (*p)();
+ ;; }
+ __do_global_dtors:
+ push r28
+ push r29
+ ldi r28,lo8(__DTOR_LIST__)
+ ldi r29,hi8(__DTOR_LIST__)
+ lds r30,__DTOR_LIST__
+ lds r31,(__DTOR_LIST__)+1
+ sbiw r30,0
+ breq .dtors_done
+ .dtors_loop:
+ icall
+ adiw r28,2
+ ld r30,Y
+ ldd r31,Y+1
+ sbiw r30,0
+ brne .dtors_loop
+ .dtors_done:
+ pop r29
+ pop r28
+
+ #endif /* L_dtor */
diff -c3Pr gcc-3.0.2/gcc/config/avr/t-avr gcc-3.0.2-patch-0.2/gcc/config/avr/t-avr
*** gcc-3.0.2/gcc/config/avr/t-avr Sun Jan 21 03:49:01 2001
--- gcc-3.0.2-patch-0.2/gcc/config/avr/t-avr Tue Jan 8 19:34:41 2002
***************
*** 18,24 ****
_epilogue \
_exit \
_cleanup \
! _tablejump

# libgcc...
LIBGCC1_TEST =
--- 18,26 ----
_epilogue \
_exit \
_cleanup \
! _tablejump \
! _ctor \
! _dtor

# libgcc...
LIBGCC1_TEST =
***************
*** 49,55 ****
mmcu?avr3=mmcu?atmega103 mmcu?avr3=mmcu?atmega603 \
mmcu?avr4=mmcu?atmega83 mmcu?avr4=mmcu?atmega85 \
mmcu?avr5=mmcu?atmega161 mmcu?avr5=mmcu?atmega163 \
! mmcu?avr5=mmcu?atmega32 mmcu?avr5=mmcu?at94k

MULTILIB_EXCEPTIONS =

--- 51,58 ----
mmcu?avr3=mmcu?atmega103 mmcu?avr3=mmcu?atmega603 \
mmcu?avr4=mmcu?atmega83 mmcu?avr4=mmcu?atmega85 \
mmcu?avr5=mmcu?atmega161 mmcu?avr5=mmcu?atmega163 \
! mmcu?avr5=mmcu?atmega32 mmcu?avr5=mmcu?at94k \
! mmcu?avr5=mmcu?atmega128

MULTILIB_EXCEPTIONS =

Only in gcc-3.0.2/gcc/po: stamp-cat-id
diff -c3Pr gcc-3.0.2/gcc/tm.h gcc-3.0.2-patch-0.2/gcc/tm.h
*** gcc-3.0.2/gcc/tm.h Thu Jan 1 10:00:00 1970
--- gcc-3.0.2-patch-0.2/gcc/tm.h Tue Jan 8 19:04:45 2002
***************
*** 0 ****
--- 1,9 ----
+ #ifdef IN_GCC
+ # include "gansidecl.h"
+ # include "avr/avr.h"
+ # include "defaults.h"
+ #endif
+ #ifndef GENERATOR_FILE
+ #include "insn-codes.h"
+ #include "insn-flags.h"
+ #endif
Only in gcc-3.0.2: libstdc++-v3

--------------020008020101040109050209
Content-Type: text/plain;
name="avrmega128.x"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="avrmega128.x"

/* ---------------------------------------------------------------------
* avrmega128.x
* ---------------------------------------------------------------------
*
* Copyright (C) 2001 Smart Container. All Rights Reserved
*
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF Smart Container.
* The copyright notice above does not evidence any
* actual or intended publication of such source code.
*
* OneLiner: This file is the linker script for the repeater cpu.
*
* DevUnit: flasher/script/avrmega128.x
* Author: Matthew Lee
*/

OUTPUT_FORMAT("elf32-avr","elf32-avr","elf32-avr")
OUTPUT_ARCH(avr:5)
MEMORY
{
text (rx) : ORIGIN = 0, LENGTH = 128K
/* Data space is restricted to first page of external RAM */
data (rw!x) : ORIGIN = 0x800100, LENGTH = 0x07ef8
eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = 4K
}
SECTIONS
{
/* Read-only sections, merged into text segment: */
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.gnu.version : { *(.gnu.version) }
.gnu.version_d : { *(.gnu.version_d) }
.gnu.version_r : { *(.gnu.version_r) }
.rel.init : { *(.rel.init) }
.rela.init : { *(.rela.init) }
.rel.text :
{
*(.rel.text)
*(.rel.text.*)
*(.rel.gnu.linkonce.t*)
}
.rela.text :
{
*(.rela.text)
*(.rela.text.*)
*(.rela.gnu.linkonce.t*)
}
.rel.fini : { *(.rel.fini) }
.rela.fini : { *(.rela.fini) }
.rel.rodata :
{
*(.rel.rodata)
*(.rel.rodata.*)
*(.rel.gnu.linkonce.r*)
}
.rela.rodata :
{
*(.rela.rodata)
*(.rela.rodata.*)
*(.rela.gnu.linkonce.r*)
}
.rel.data :
{
*(.rel.data)
*(.rel.data.*)
*(.rel.gnu.linkonce.d*)
}
.rela.data :
{
*(.rela.data)
*(.rela.data.*)
*(.rela.gnu.linkonce.d*)
}
.rel.ctors : { *(.rel.ctors) }
.rela.ctors : { *(.rela.ctors) }
.rel.dtors : { *(.rel.dtors) }
.rela.dtors : { *(.rela.dtors) }
.rel.got : { *(.rel.got) }
.rela.got : { *(.rela.got) }
.rel.bss : { *(.rel.bss) }
.rela.bss : { *(.rela.bss) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { *(.rela.plt) }
/* Internal text space or external memory */
.text :
{
*(.init)
*(.progmem.gcc*)
*(.progmem*)
. = ALIGN(2);
*(.text)
. = ALIGN(2);
*(.text.*)
. = ALIGN(2);
*(.fini)
. = ALIGN(2);
__CTOR_LIST__ = .;
*(.ctors)
__CTOR_END__ = .;
__DTOR_LIST__ = .;
*(.dtors)
__DTOR_END__ = .;
_etext = . ;
} > text
.data : AT (ADDR (.text) + SIZEOF (.text))
{
PROVIDE (__data_start = .) ;
/* Put bootloader section at start of data */
*(.bootload)
*(.data)
*(.gnu.linkonce.d*)
. = ALIGN(2);
_edata = . ;
} > data
.bss SIZEOF(.data) + ADDR(.data) :
{
PROVIDE (__bss_start = .) ;
*(.bss)
*(COMMON)
PROVIDE (__bss_end = .) ;
_end = . ;
} > data
.eeprom :
AT (ADDR (.text) + SIZEOF (.text) + SIZEOF (.data))
{
*(.eeprom*)
__eeprom_end = . ;
} > eeprom
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
PROVIDE (__stack = 0x7FF7) ;
/* The following enables the external memory bus. */
__init_mcucr__ = 0x80 ;
}

--------------020008020101040109050209
Content-Type: text/plain;
name="gcrt1.S"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="gcrt1.S"

/* Copyright (C) 1999 Denis Chertykov <[email-masked]>

This file is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.

In addition to the permissions in the GNU General Public License, the
author gives you unlimited permission to link the
compiled version of this file into combinations with other programs,
and to distribute those combinations without any restriction coming
from the use of this file. (The General Public License restrictions
do apply in other respects; for example, they cover modification of
the file, and distribution when not linked into a combine
executable.)

This file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details. */

/* Hacked a lot by Marek Michalkiewicz <[email-masked]> to add
support for many MCU types, etc. These changes are public domain. */

;; -*- mode: asm -*-

#include <avr/hdr/macros.inc>

#if !defined (__AVR_ASM_ONLY__)
; not required by gas, but still a nice way to show referenced symbols
.extern _U(main)
.extern _etext
.extern __data_start
.extern _edata
.extern __bss_start
.extern __bss_end

; Stack init in main() (can override with avr-ld --defsym __stack=...)
; .weak __stack
;__stack = RAMEND
.extern __stack

; These too can be set with the avr-ld --defsym name=value option
; (MCUCR must be set up correctly to enable external SRAM).
.weak __init_mcucr__
.weak __init_emcucr__
.weak __init_wdtcr__

; You can plug in your own code to handle unexpected
; interrupts (which usually indicate a bug - if the program
; enables an interrupt for which there is no handler).
.weak _U(_unexpected_)
#endif /* if !defined (__AVR_ASM_ONLY__) */

; You can plug in your own asm code that runs immediately
; after reset, without any initialization at all. When done,
; it should jump to _real_init_.
.weak _U(_init_)
;
; Vector table macros
;
.set no_vect, 0
.macro VEC name
.if (END_VECTOR > no_vect)
.weak _U(\name)
#if !defined (__AVR_ASM_ONLY__)
.set _U(\name), _unexpected_1_
#endif
XJMP _U(\name)
.endif
.set no_vect, no_vect + 1
.endm

; reset and interrupt vectors, starting at absolute address 0

.section .init, "ax", @progbits
.func .__start_of_init__
.__start_of_init__:
XJMP _U(_init_)

VEC _vector_1
VEC _vector_2
VEC _vector_3
VEC _vector_4
VEC _vector_5
VEC _vector_6
VEC _vector_7
VEC _vector_8
VEC _vector_9
VEC _vector_10
VEC _vector_11
VEC _vector_12
VEC _vector_13
VEC _vector_14
VEC _vector_15
VEC _vector_16
VEC _vector_17
VEC _vector_18
VEC _vector_19
VEC _vector_20
VEC _vector_21
VEC _vector_22
VEC _vector_23
VEC _vector_24
VEC _vector_25
VEC _vector_26
VEC _vector_27
VEC _vector_28
VEC _vector_29
VEC _vector_30
VEC _vector_31
VEC _vector_32
VEC _vector_33
VEC _vector_34
VEC _vector_35
VEC _vector_36
VEC _vector_37
VEC _vector_38
VEC _vector_39

/* extra check */
; .if . - .__start_of_init__ - INT_VECT_SIZE
; .err
; .endif

.endfunc

#if !defined (__AVR_ASM_ONLY__)
.section .text, "ax", @progbits
.func .__c_startup__
.__c_startup__:
; two remporary registers (usable with ldi, not pointer registers)
#define r_tmp1 r18
#define r_tmp2 r19

/*
* I/O instructions below (out) require an address < 0x40.
* If an SFR offset is being used, the register address needs to be
* scaled back from its DATA memory address to its I/O memory address.
*/
#ifndef __SFR_OFFSET
#define __SFR_OFFSET 0
#endif /* !__SFR_OFFSET */

.global _U(_real_init_)
_U(_real_init_):
_U(_init_):
clr __zero_reg__
out (SREG - __SFR_OFFSET), __zero_reg__
#ifdef WDTCR
ldi r_tmp1, lo8(__init_wdtcr__)
wdr
out (WDTCR - __SFR_OFFSET), r_tmp1
#endif
#ifdef MCUCR
ldi r_tmp1, lo8(__init_mcucr__)
out (MCUCR - __SFR_OFFSET), r_tmp1
#endif
#ifdef EMCUCR
ldi r_tmp1, lo8(__init_emcucr__)
out (EMCUCR - __SFR_OFFSET), r_tmp1
#endif

;; Set up the stack
ldi r_tmp1, lo8(__stack)
out (SPL - __SFR_OFFSET), r_tmp1
ldi r_tmp1, hi8(__stack)
out (SPH - __SFR_OFFSET), r_tmp1

; XXX should we also read, save and clear MCUSR (if present) here?
; (datasheets suggest to do it as soon as possible after reset)
ldi ZL, lo8(_etext); load the end of .text segment
ldi ZH, hi8(_etext); this is a start of .data image
#if BIG_CODE
ldi r_tmp2, hh8(_etext) ; this will be in RAMPZ for "elpm"
#endif
ldi XL, lo8(__data_start) ; load start of ram
ldi XH, hi8(__data_start)
#if XRAMEND > 0x100 /* don't bother with high byte if we know it must be 0 */
ldi r_tmp1, hi8(_edata)
#endif
LPM_R0_ZPLUS_INIT r_tmp2
rjmp .copy_data_start
.copy_data_loop:
LPM_R0_ZPLUS_NEXT r_tmp2
st X+, r0
.copy_data_start:
cpi XL, lo8(_edata)
#if XRAMEND > 0x100
cpc XH, r_tmp1 ; hi8(_edata)
#endif
brne .copy_data_loop
;; avr-ld always put .bss after .data
; If the above is true, then no need to load X again below.
; But there are two separate symbols _edata and __bss_start
; which seem to have the same value but are initialized
; in two different places in the linker script.
#if 1
ldi XL, lo8(__bss_start)
ldi XH, hi8(__bss_start)
#endif
#if XRAMEND > 0x100
ldi r_tmp1, hi8(__bss_end)
#endif
rjmp .zero_bss_start
.zero_bss_loop:
st X+, __zero_reg__
.zero_bss_start:
cpi XL, lo8(__bss_end)
#if XRAMEND > 0x100
cpc XH, r_tmp1 ; hi8(__bss_end)
#endif
brne .zero_bss_loop
call _U(__do_global_ctors)
XJMP _U(main)

_unexpected_1_:
XJMP _U(_unexpected_)

_U(_unexpected_):
reti

.endfunc
#endif /* if !defined (__AVR_ASM_ONLY__) */

--------------020008020101040109050209--

avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:07:58 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM0w-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:07:54 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:07:54 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0A34Al10566
for <[email-masked]>; Wed, 9 Jan 2002 21:04:10 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0A1p9u25606
for avr-gcc-list-list.japetos; Wed, 9 Jan 2002 19:51:09 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0A1p8B25603
for <[email-masked]>; Wed, 9 Jan 2002 19:51:08 -0600
Received: from mail.ripnet.com (mail.ripnet.com [206.47.98.3])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0A1qYv27579
for <[email-masked]>; Wed, 9 Jan 2002 19:52:35 -0600
Received: from A1-P152.RipNET.com ([email-masked] [207.236.51.153])
by mail.ripnet.com (8.12.0.Beta12/8.11.1) with ESMTP id g0A1p5Dv009587
for <[email-masked]>; Wed, 9 Jan 2002 20:51:06 -0500
Date: Wed, 9 Jan 2002 20:51:14 -0500 (EST)
From: RogerB <[email-masked]>
X-X-Sender: <[email-masked]>
To: AVR GCC List <[email-masked]>
Subject: [avr-gcc-list] Big end little end thingie
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

When I build a srec or ihex file on my linux box
with avr-gcc it seems to produce bigend files but if
I make one with avr studio it's the other way. The
file will start as E0C0 on the linux and C0E0 with avr
studio. I can only program the chips from my linux box
so I don't know what the rom image looks like.
I'm using avr-gcc version 3.0.2 and uisp version
20011025 and to build a file I do it this way
avr-gcc -O0 -Wall -mmcu=at90s2313 -c demo.c -o demo.o
avr-gcc -mmcu=at90s2313 -o demo.elf demo.o
avr-objcopy -O ihex demo.elf demo1.hex
Am I missing somethig the list file from
avrstudio shows the first instruction to be a jump
relative but the list file for avr-gcc show it to
be 14 0000 C0E0 ldi r28,lo8(__stack - 0)

avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:07:58 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM0x-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:07:55 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:07:55 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0A91uj18216
for <[email-masked]>; Thu, 10 Jan 2002 03:01:56 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0A86mJ01272
for avr-gcc-list-list.japetos; Thu, 10 Jan 2002 02:06:48 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0A86lB01269
for <[email-masked]>; Thu, 10 Jan 2002 02:06:47 -0600
Received: from mail.intekom.com (mid-mail-02.intekom.com [196.25.69.45])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g0A88EF06922
for <[email-masked]>; Thu, 10 Jan 2002 02:08:15 -0600
Received: (qmail 22431 invoked from network); 10 Jan 2002 08:05:11 -0000
Received: from bnb53-01-p227.nt.saix.net (HELO scorpio) ([155.239.180.227]) (envelope-sender <[email-masked]>)
by intekom.com (qmail-ldap-1.03) with SMTP
for <[email-masked]>; 10 Jan 2002 08:05:11 -0000
X-vSMTP: intekom.com
From: "Anton Erasmus" <[email-masked]>
Organization: Home
To: RogerB <[email-masked]>
Date: Thu, 10 Jan 2002 10:05:57 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: Re: [avr-gcc-list] Big end little end thingie
CC: [email-masked]
Message-ID: <3C3D6785.27832.13A602@localhost>
In-reply-to: <[email-masked]>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Date sent: Wed, 9 Jan 2002 20:51:14 -0500 (EST)
From: RogerB <[email-masked]>
To: AVR GCC List <[email-masked]>
Subject: [avr-gcc-list] Big end little end thingie

> When I build a srec or ihex file on my linux box
> with avr-gcc it seems to produce bigend files but if
> I make one with avr studio it's the other way. The
> file will start as E0C0 on the linux and C0E0 with avr
> studio. I can only program the chips from my linux box
> so I don't know what the rom image looks like.
> I'm using avr-gcc version 3.0.2 and uisp version
> 20011025 and to build a file I do it this way
> avr-gcc -O0 -Wall -mmcu=at90s2313 -c demo.c -o demo.o
> avr-gcc -mmcu=at90s2313 -o demo.elf demo.o
> avr-objcopy -O ihex demo.elf demo1.hex
> Am I missing somethig the list file from
> avrstudio shows the first instruction to be a jump
u> relative but the list file for avr-gcc show it to
> be 14 0000 C0E0 ldi r28,lo8(__stack - 0)
>
>

Hi,

Atmel stuffed up their S-Record generation and interptretation. If
you want to use any of atmels software u either Intel Hex or
binary. There used to be a hack in avr-gcc to enable it to generate
the incorrect atmel version of S-Records.

Regards
Anton

avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:08:01 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM0y-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:07:56 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:07:56 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0A9Ffj21056
for <[email-masked]>; Thu, 10 Jan 2002 03:15:41 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0A8USj01464
for avr-gcc-list-list.japetos; Thu, 10 Jan 2002 02:30:28 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0A8URB01459
for <[email-masked]>; Thu, 10 Jan 2002 02:30:27 -0600
Received: from mail.intekom.com (mid-mail-01.intekom.com [196.25.69.44])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g0A8VsD11820
for <[email-masked]>; Thu, 10 Jan 2002 02:31:55 -0600
Received: (qmail 11722 invoked from network); 10 Jan 2002 08:29:49 -0000
Received: from bnb53-01-p227.nt.saix.net (HELO scorpio) ([155.239.180.227]) (envelope-sender <[email-masked]>)
by intekom.com (qmail-ldap-1.03) with SMTP
for <[email-masked]>; 10 Jan 2002 08:29:49 -0000
X-vSMTP: intekom.com
From: "Anton Erasmus" <[email-masked]>
Organization: Home
To: [email-masked]
Date: Thu, 10 Jan 2002 10:30:12 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: Re: [avr-gcc-list] Specifying crt*.o file
CC: [email-masked]
Message-ID: <3C3D6D34.2016.29DBCE@localhost>
References: <3C3CBA9B.6380.2E1E8DF@localhost>
In-reply-to: <[email-masked]>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I am using the latest avr-gcc version for windows available on the
avrfreaks.net site. I am using their modified make1 and make2
make files that originated from Volker Oth.

The make files does first do a compile only with the -c swicth, and
then uses avr-gcc to do the linking of all the files.

It seems from the output you get, that it must work, so I will start
with your simplified example and add the extra parameters that is
used in the make files one by one to see if one of them causes the
problem.

Thanks for your help.

Regards
Anton

P.S. Do you have documentation that describes the -nostartfiles
option ? I have downloaded some pdf documents that were
generated from TeX versions of the GNU documentation. This
option is not described in these docs. ld.pdf and gcc.pdf

From: [email-masked]
Send reply to: [email-masked]
To: [email-masked]
Subject: Re: [avr-gcc-list] Specifying crt*.o file
Date sent: Wed, 9 Jan 2002 22:27:09 +0100

> On Wed, 09 Jan 2002, Anton Erasmus wrote:
> > Hi,
> >
> > If I specify the crt file explicittely on the command line, I get
> > "Duplicate Symbol" errors. It seems that the default crt file is
> > still linked in as well. I cannot find the option, that tells gcc
> > not to link in the default crt file.
> >
> > The -nostartfiles option that reinhard jessich suggested, gives the
> > warning "unknown option nostartfiles".
>
> First I do only compile:
> /usr/local/cross-tools/bin/avr-gcc -v -c test.c
> nothing special in the output, so I will not send it.
>
> The output of a normal link command:
> /usr/local/cross-tools/bin/avr-gcc -v test.o
> Reading specs from /usr/local/cross-tools/lib/gcc-lib/avr/3.0.2/specs
> Configured with: /opt/avr/gcc/source/gcc-3.0.2/configure -v
> --target=avr --prefix=/usr/local/cross-tools --with-gnu-ld
> --with-gnu-as --disable-nls Thread model: single gcc version 3.0.2
> /usr/local/cross-tools/lib/gcc-lib/avr/3.0.2/../../../../avr/bin/ld
> -m avr85xx
> /usr/local/cross-tools/lib/gcc-lib/avr/3.0.2/../../../../avr/lib/crts8
> 515.o -L/usr/local/cross-tools/lib/gcc-lib/avr/3.0.2
> -L/usr/local/cross-tools/lib/gcc-lib/avr/3.0.2/../../../../avr/lib
> test.o -lgcc -lc -lgcc
>
> The output of the special link command:
> /usr/local/cross-tools/bin/avr-gcc -v -nostartfiles test.o
> Reading specs from /usr/local/cross-tools/lib/gcc-lib/avr/3.0.2/specs
> Configured with: /opt/avr/gcc/source/gcc-3.0.2/configure -v
> --target=avr --prefix=/usr/local/cross-tools --with-gnu-ld
> --with-gnu-as --disable-nls Thread model: single gcc version 3.0.2
> /usr/local/cross-tools/lib/gcc-lib/avr/3.0.2/../../../../avr/bin/ld -m
> avr85xx -L/usr/local/cross-tools/lib/gcc-lib/avr/3.0.2
> -L/usr/local/cross-tools/lib/gcc-lib/avr/3.0.2/../../../../avr/lib
> test.o -lgcc -lc -lgcc
>
> Then I have tried:
> /usr/local/cross-tools/bin/avr-gcc -v test.o
> /usr/local/cross-tools/avr/lib/crts8515.o
>
> and got:
> <snip>
> /usr/local/cross-tools/avr/lib/crts8515.o: In function
> `__c_startup__':
> /opt/avr/gcc/source/avr-libc-20020106/libc/gcrt1.S:148: multiple
> definition of `_real_init_' <snip>
>
> Then I tried:
> /usr/local/cross-tools/bin/avr-gcc -nostartfiles -v test.o
> /usr/local/cross-tools/avr/lib/crts8515.o
>
> and got:
> <snip>
> /usr/local/cross-tools/lib/gcc-lib/avr/3.0.2/../../../../avr/bin/ld
> -m avr85xx
> -L/usr/local/cross-tools/lib/gcc-lib/avr/3.0.2
> -L/usr/local/cross-tools/lib/gcc-lib/avr/3.0.2/../../../../avr/lib
> test.o /usr/local/cross-tools/avr/lib/crts8515.o -lgcc -lc -lgcc
>
> So you can see the option is understand and the gcc will do exactly
> what I told it. I have tested your special case with the crtxxx.o on
> the command line and it worked, too!
>
> Check the gcc command that you are using. Maybe you have forgot to add
> something or maybe you have an other version of the compiler?
>
> Reinhard
>
> --
> Ing. Reinhard Jessich mailto:
> [email-masked] A-1190 Vienna, Goergengasse 2/2/1
> phone: +43/1/3692600 http://members.telering.at/jessich mobile:
> +43/664/1735439
> avr-gcc-list at http://avr1.org
>

avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:08:01 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM10-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:07:58 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:07:58 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0A9mSi27287
for <[email-masked]>; Thu, 10 Jan 2002 03:48:28 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0A8Uad01465
for avr-gcc-list-list.japetos; Thu, 10 Jan 2002 02:30:36 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0A8URB01457
for <[email-masked]>; Thu, 10 Jan 2002 02:30:27 -0600
Received: from mail.intekom.com (mid-mail-01.intekom.com [196.25.69.44])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g0A8VsD11819
for <[email-masked]>; Thu, 10 Jan 2002 02:31:55 -0600
Received: (qmail 11750 invoked from network); 10 Jan 2002 08:29:51 -0000
Received: from bnb53-01-p227.nt.saix.net (HELO scorpio) ([155.239.180.227]) (envelope-sender <[email-masked]>)
by intekom.com (qmail-ldap-1.03) with SMTP
for <[email-masked]>; 10 Jan 2002 08:29:51 -0000
X-vSMTP: intekom.com
From: "Anton Erasmus" <[email-masked]>
Organization: Home
To: Matthew Lee <[email-masked]>
Date: Thu, 10 Jan 2002 10:30:12 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: Re: [avr-gcc-list] Specifying crt*.o file
CC: [email-masked]
Message-ID: <3C3D6D34.13230.29DBD2@localhost>
In-reply-to: <[email-masked]>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Matt,

Thanks for your reply. I will try both your and reinhards'
suggestions. I will see which one will be the easiest to add to the
Volker Oth make files.

In case anyone was wondering why I want to use my own crt file.

I am using the avr-gcc compiler version without explicit support for
the ATMega128 to generate code for the ATMega128.
I am specifying the MCU as avr5, and adding the -
D__AVR_ATmega128__ option to the command line.
I have assembled the gcrt1.s file with the same option enabled to
generate a suitable crt file for the ATMega128. I have also edited
the ATMega103 linker script file to generate a suitable linker file for
the ATMega128. Some changes to the inp and outp macros in the
iomacros.h file was also neccesary.

Regards
Anton

Date sent: Thu, 10 Jan 2002 08:21:39 +1100
From: Matthew Lee <[email-masked]>
Organization: Smart Container
To: Anton Erasmus <[email-masked]>
Copies to: [email-masked]
Subject: Re: [avr-gcc-list] Specifying crt*.o file

> Anton,
>
> As far as I remember, if you compile and link in one step (with
> avr-gcc), it will automatically include crt*.o at the linking stage.
> If you've specified crt*.o on the gcc command line as well, it will
> attempt to link it twice (and thus the duplicate symbol error you are
> seeing).
>
> If you don't do the linking step with avr-gcc but with avr-ld, then
> you can specify the crt*.o file on the linker command line (as Scott
> suggested below) and you shouldn't get your duplicate symbol problem.
>
> Regards,
> Matt
>
>
> Anton Erasmus wrote:
> >
> > Hi,
> >
> > If I specify the crt file explicittely on the command line, I get
> > "Duplicate Symbol" errors. It seems that the default crt file is
> > still linked in as well. I cannot find the option, that tells gcc
> > not to link in the default crt file.
> >
> > The -nostartfiles option that reinhard jessich suggested, gives the
> > warning "unknown option nostartfiles".
> >
> > For the moment I have edited the specs file to change the name of
> > the default crt file, but this is a complete hack.
> >
> > Regards
> > Anton
> >
> > > Hello Anton,
> > >
> > > Just specify the crt*.o file on the linker command line. The
> > > important thing to remember is to PUT IT FIRST (ie before any
> > > other .o files). This will ensure (I only say this from
> > > experience) that the contents are put at address zero.
> > >
> > > Regards,
> > >
> > > Scott
> > >
> > > Anton Erasmus wrote:
> > > >
> > > > Hi,
> > > >
> > > > I am trying to use a custom start-up file with avr-gcc. How does
> > > > one force the linker to link with a specified crt file in stead
> > > > of the default crt*.o file ?
> > > >
> > > > Regards
> > > > Anton
> > > >
> > > > avr-gcc-list at http://avr1.org
> > > avr-gcc-list at http://avr1.org
> > >
> >
> > avr-gcc-list at http://avr1.org
> avr-gcc-list at http://avr1.org
>

avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:08:04 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM11-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:07:59 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:07:59 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0AFv2t14726
for <[email-masked]>; Thu, 10 Jan 2002 09:57:02 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0AEYBA06068
for avr-gcc-list-list.japetos; Thu, 10 Jan 2002 08:34:11 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0AEYAB06065
for <[email-masked]>; Thu, 10 Jan 2002 08:34:10 -0600
Received: from mail.ripnet.com (mail.ripnet.com [206.47.98.3])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0AEZdG26819
for <[email-masked]>; Thu, 10 Jan 2002 08:35:39 -0600
Received: from A1-P121.RipNET.com ([email-masked] [207.236.51.122])
by mail.ripnet.com (8.12.0.Beta12/8.11.1) with ESMTP id g0AEY7Dv010494
for <[email-masked]>; Thu, 10 Jan 2002 09:34:08 -0500
Date: Thu, 10 Jan 2002 09:34:18 -0500 (EST)
From: RogerB <[email-masked]>
X-X-Sender: <[email-masked]>
To: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Big end little end thingie (fwd)
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

---------- Forwarded message ----------
Date: Thu, 10 Jan 2002 10:05:57 +0200
From: Anton Erasmus <[email-masked]>
To: RogerB <[email-masked]>
Cc: [email-masked]
Subject: Re: [avr-gcc-list] Big end little end thingie

Date sent: Wed, 9 Jan 2002 20:51:14 -0500 (EST)
From: RogerB <[email-masked]>
To: AVR GCC List <[email-masked]>
Subject: [avr-gcc-list] Big end little end thingie

>

Hi,

Atmel stuffed up their S-Record generation and interptretation. If
you want to use any of atmels software u either Intel Hex or
binary. There used to be a hack in avr-gcc to enable it to generate
the incorrect atmel version of S-Records.

Regards
Anton
I'm not making a srec file with studio just a intel hex
file and I'm looking at the list files and the first two used bytes
S11300000AC0 for the srec and :10000000C0A0 for the hex file. The 0A
part might change but it's followed by C0 on the linux box with
srec or ihex code, with studio the ihex file is the other way
around. The flash location 0000 is 0A and 0001 is C0 which the
.lst say is a ld instruction. It should be a jump to the
program start or something similar.
That seems like gcc is building the wrong ended code
if the micro wants little end but I don't see a switch
for that anywhere.

avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:08:04 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM12-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:08:00 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:08:00 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0AMZjr28717
for <[email-masked]>; Thu, 10 Jan 2002 16:35:45 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0ALBYv12830
for avr-gcc-list-list.japetos; Thu, 10 Jan 2002 15:11:34 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0ALBXB12827
for <[email-masked]>; Thu, 10 Jan 2002 15:11:33 -0600
Received: from mail-vie-pub-p.1012internet.at (mail-vie-pub-p.1012internet.at [212.95.31.10])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0ALD3H08030
for <[email-masked]>; Thu, 10 Jan 2002 15:13:03 -0600
Received: from telering.at (dis212095026064.vie.telering.at [212.95.26.64])
by mail-vie-pub-p.1012internet.at (8.9.3/8.9.3) with SMTP id WAA21496
for <[email-masked]>; Thu, 10 Jan 2002 22:11:29 +0100 (MET)
Received: (qmail 2603 invoked by uid 501); 10 Jan 2002 19:55:59 -0000
From: [email-masked]
Reply-To: [email-masked]
To: Peter Jansen <[email-masked]>
Subject: Re: [avr-gcc-list] [Fwd: building gcc/g++]
Date: Thu, 10 Jan 2002 20:41:58 +0100
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
References: <[email-masked]> <[email-masked]> <[email-masked]>
In-Reply-To: <[email-masked]>
Cc: [email-masked]
MIME-Version: 1.0
Message-Id: <[email-masked]>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by majordomo2.host4u.net id g0ALBXB12828
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Thu, 10 Jan 2002, Peter Jansen wrote:
>
> Reinhard,
>
> Sorry I had done that work, attached is my patch, including the mega128
> support.
No problem. I saw that I was on the right way.
I have seen that you have done more than adding the code for the
con/destructors in libgcc.S. So this changes are necessary for all type of
processors.

avr.h:
Are you sure that the sections .ctor/.dtor should have the "aw" flag?
I have done this with the "a" flag only.

avrmega128.x (???):
There is a copyright in. Is this really what you like?
I think this should be GPL'ed as all other linker scripts of the avr-gcc.

I will play with this patches. I will also look to the m86hc11 to compare it.

Then I will try to add the patches to my script to build avr-gcc.

Thank you!

Reinhard

--
Ing. Reinhard Jessich mailto: [email-masked]
A-1190 Vienna, Goergengasse 2/2/1 phone: +43/1/3692600
http://members.telering.at/jessich mobile: +43/664/1735439
avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:08:05 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM13-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:08:01 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:08:01 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0ANSL908909
for <[email-masked]>; Thu, 10 Jan 2002 17:28:21 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0AMnkX14120
for avr-gcc-list-list.japetos; Thu, 10 Jan 2002 16:49:46 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0AMnkB14117
for <[email-masked]>; Thu, 10 Jan 2002 16:49:46 -0600
Received: from smartcontainer.net (IDENT:qmailr@[203.24.179.147])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g0AMpE000313
for <[email-masked]>; Thu, 10 Jan 2002 16:51:15 -0600
Received: (qmail 412 invoked by uid 8); 10 Jan 2002 22:49:40 -0000
Received: from moki.smartcontainer.net (20.20.20.13, claiming to be "smartcontainer.net")
by smarty.smartcontainer.net with SMTP id smtpdI17bGa; Thu, 10 Jan 2002 17:49:35 EST
Message-ID: <[email-masked]>
Date: Fri, 11 Jan 2002 09:49:35 +1100
From: Peter Jansen <[email-masked]>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: Marek Michalkiewicz <[email-masked]>
CC: Avr Gcc List <[email-masked]>
Subject: Re: [avr-gcc-list] [Fwd: building gcc/g++]
References: <[email-masked]>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Marek,

> Good work, thanks. But - please check the latest CVS tree (not the
> GCC 3.0.x stable branch), I'm now slowly adding the missing pieces to
> support all these newly released devices...

Excellent.

>
>>Also attached is a new piece of startup code, and linker script.
>>
>
> Linker scripts are auto-generated and I'd like to do them once for
> all new devices, in the hope to not have to do this too often...
> Besides C++ support, one thing I'd like to add is a new ".noinitdata"
> section, above BSS, for global variables that are not initialized by
> C startup code (for data to survive across external or WDT reset).

I don't have any problems with that and it sounds like a good idea. As
for the new devices its only the small script inputs that need creating,
fixing the script it self is quite easy.

> Some comments about the C++ changes - I don't know much about C++ so
> please don't get too angry at me ;)
>
> - would it be OK to call __do_global_ctors from the main() function
> prologue, after stack initialization, without changing gcrt1.S,
> and do it only for C++ compilation? I think C++ support shouldn't
> bloat ordinary C programs, or force people using only C to upgrade
> everything (gcc, binutils, libc) at once... Mostly a support
> issue - I'm still getting bug reports about latest avr-libc not
> working with gcc 2.95.2, people only read docs if all else fails ;)

When the main function is created its like all other functions as far as
the compiler is concerned, the only thing that makes it special is that
its called from crtx so I cant get the compiler to put a call to the
constructors only in the main function.

Could I have 4 bytes in the startup code to support C++, something like

;; Call any C++ constructors
CALL _U(__do_global_ctors)
.weak _U(__do_global_ctors)

;; Call Main function

> - no need to use RAMPZ (I'd like to make this code work on all
> devices, not just ATmega128) - just put these tables at the lowest
> addresses in the linker script (above ".init" section) so they will
> fit within the lower 64K of program memory. GCC already does this
> with jump tables for "switch", in section ".progmem.gcc_sw_table".
> The whole upper 64K can still be used for normal executable code,
> without any of these inefficient 3-byte addresses...

Is the RAMPZ avaliable on all avr5 devices?

I was going to put some more if's around this for other devices.

The addresses in the table are 16 bit program space word addresses.

The .init and .ctors sections would have to be in the lower 64K which
might be ok, but can we if around the to make it work properly for
anything above 64K?

> - since we have no shared libraries, the ctor tables could be marked
> as read only, they are in flash anyway. Or does it cause problems?

An over sight on my part, its was like that in the code I copied this from.

> - do we need to support destructors too? AVR program never exits,
> main() ends with an infinite loop, where is __do_global_dtors called?

This is always a problem with exit functions in embedded code.

__do_global_dtors should be called from the exit code, I have not put
this in because its not needed in an embedded system, I was going to
clean this up some more, I was just happy that I got it working to start
with :-)

> - GCC maintainers generally like small patches, one patch for each
> logical change. This makes things a lot easier...

Ok, Ill get the CVS, make a patch for the mega128 and then a patch for
the C++ support. This work affects binutils, gcc, and your avr-libc.

Regards,

--
Peter Jansen
Smart Container
Level 1, NIC Building
Eveleigh
NSW 1430
AUSTRALIA

avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:08:08 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM16-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:08:04 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:08:04 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0B0GHw21684
for <[email-masked]>; Thu, 10 Jan 2002 18:16:17 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0AN9Pq14321
for avr-gcc-list-list.japetos; Thu, 10 Jan 2002 17:09:25 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0AN9OB14318
for <[email-masked]>; Thu, 10 Jan 2002 17:09:24 -0600
Received: from smartcontainer.net (IDENT:qmailr@[203.24.179.147])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g0ANAsP04884
for <[email-masked]>; Thu, 10 Jan 2002 17:10:55 -0600
Received: (qmail 623 invoked by uid 8); 10 Jan 2002 23:09:21 -0000
Received: from moki.smartcontainer.net (20.20.20.13, claiming to be "smartcontainer.net")
by smarty.smartcontainer.net with SMTP id smtpdmkHVH9; Thu, 10 Jan 2002 18:09:16 EST
Message-ID: <[email-masked]>
Date: Fri, 11 Jan 2002 10:09:16 +1100
From: Peter Jansen <[email-masked]>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: [email-masked]
CC: [email-masked]
Subject: Re: [avr-gcc-list] [Fwd: building gcc/g++]
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Reinhard,

> avr.h:
> Are you sure that the sections .ctor/.dtor should have the "aw" flag?
> I have done this with the "a" flag only.

Yes "a" would be fine the "w" is not needed it came from where I stole
the code from to get it working, thanks for the review comments :-).

> avrmega128.x (???):
> There is a copyright in. Is this really what you like?
> I think this should be GPL'ed as all other linker scripts of the avr-gcc.

Sorry about that, I pulled that from our project code base as I know it
worked. The project build system puts these on automatically, by all
right they should not be their and I sould have removed them when I sent
them out.

Sorry if I offeneded anyone, the copyright belongs with the binutils/avr
people.

> I will play with this patches. I will also look to the m86hc11 to compare it.
>
> Then I will try to add the patches to my script to build avr-gcc.

Regards,

--
Peter Jansen
Smart Container
Level 1, NIC Building
Eveleigh
NSW 1430
AUSTRALIA

avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:08:08 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM16-0003wo-01
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:08:04 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:08:04 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0B3YJi01881
for <[email-masked]>; Thu, 10 Jan 2002 21:34:19 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0B1u1Y16421
for avr-gcc-list-list.japetos; Thu, 10 Jan 2002 19:56:01 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0B1u0B16418
for <[email-masked]>; Thu, 10 Jan 2002 19:56:00 -0600
Received: from mail.ripnet.com (mail.ripnet.com [206.47.98.3])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0B1vVO13440
for <[email-masked]>; Thu, 10 Jan 2002 19:57:31 -0600
Received: from A3-P227.RipNET.com ([email-masked] [216.208.158.228])
by mail.ripnet.com (8.12.0.Beta12/8.11.1) with ESMTP id g0B1tu0v011324
for <[email-masked]>; Thu, 10 Jan 2002 20:55:58 -0500
Date: Thu, 10 Jan 2002 20:56:09 -0500 (EST)
From: RogerB <[email-masked]>
X-X-Sender: [email-masked]
To: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Big end little end thingie
In-Reply-To: <3C3D6785.27832.13A602@localhost>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Thu, 10 Jan 2002, Anton Erasmus wrote:

>
>
> Hi,
>
> Atmel stuffed up their S-Record generation and interptretation. If
> you want to use any of atmels software u either Intel Hex or
> binary. There used to be a hack in avr-gcc to enable it to generate
> the incorrect atmel version of S-Records.
>
> Regards
> Anton
>
> avr-gcc-list at http://avr1.org
>
I'm not making a srec file with studio just a intel hex
file and I'm looking at the list files and the first two used bytes
S11300000AC0 for the srec and :10000000C0A0 for the hex file. The 0A
part might change but it's followed by C0 on the linux box with
srec or ihex code, with studio the ihex file is the other way
around. The flash location 0000 is 0A and 0001 is C0 which the
.lst say is a ld instruction. It should be a jump to the
program start or something similar.
That seems like gcc is building the wrong ended code
if the micro wants little end but I don't see a switch
for that anywhere.

avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:08:12 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM1A-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:08:08 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:08:08 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0BKtRX16270
for <[email-masked]>; Fri, 11 Jan 2002 14:55:27 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0BJ3l700896
for avr-gcc-list-list.japetos; Fri, 11 Jan 2002 13:03:47 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0BJ3kB00893
for <[email-masked]>; Fri, 11 Jan 2002 13:03:46 -0600
Received: from finch-post-11.mail.demon.net (finch-post-11.mail.demon.net [194.217.242.39])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0BJ5KM15757
for <[email-masked]>; Fri, 11 Jan 2002 13:05:20 -0600
Received: from pcsltd.demon.co.uk ([158.152.225.240] helo=cordelia)
by finch-post-11.mail.demon.net with esmtp (Exim 2.12 #1)
id 16P6xs-000I1o-0B
for [email-masked]; Fri, 11 Jan 2002 19:03:44 +0000
Received: from jd by cordelia with local (Exim 3.33 #1 (Debian))
id 16P6yH-0006Xz-00
for <[email-masked]>; Fri, 11 Jan 2002 19:04:09 +0000
Date: Fri, 11 Jan 2002 19:04:09 +0000
From: John Devereux <[email-masked]>
To: [email-masked]
Subject: [avr-gcc-list] AVR Studio command line programmer very slow
Message-ID: <20020111190409.GA25100@cordelia>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.25i
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello all,

I have just tried using the command line STK500.EXE programming
utility to automate chip programming from a makefile. I have noticed
that it seems very slow compared to the main AVR-Studio program. For
example, a trivial 100 byte program takes 10 seconds from the command
line but less than 1 second from within the Windows software.

Is this normal, is there anything I can do about it, and is there an
alternative under Windows?

I am running V3.2, under Win2k, trying to program the ATmega163.

Regards,

John Devereux
avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:08:11 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM17-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:08:05 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:08:05 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0B6LA523044
for <[email-masked]>; Fri, 11 Jan 2002 00:21:10 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0B5TV719036
for avr-gcc-list-list.japetos; Thu, 10 Jan 2002 23:29:31 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0B5TUB19033
for <[email-masked]>; Thu, 10 Jan 2002 23:29:30 -0600
Received: from smartcontainer.net (IDENT:qmailr@[203.24.179.147])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g0B5V0X27904
for <[email-masked]>; Thu, 10 Jan 2002 23:31:00 -0600
Received: (qmail 7332 invoked by uid 8); 11 Jan 2002 05:29:26 -0000
Received: from moki.smartcontainer.net (20.20.20.13, claiming to be "smartcontainer.net")
by smarty.smartcontainer.net with SMTP id smtpdvUPtBe; Fri, 11 Jan 2002 00:29:23 EST
Message-ID: <[email-masked]>
Date: Fri, 11 Jan 2002 16:29:23 +1100
From: Peter Jansen <[email-masked]>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: Peter Jansen <[email-masked]>
CC: Marek Michalkiewicz <[email-masked]>,
Avr Gcc List <[email-masked]>
Subject: Re: [avr-gcc-list] [Fwd: building gcc/g++]
References: <[email-masked]> <[email-masked]>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Marek,

> Could I have 4 bytes in the startup code to support C++, something like
>
> ;; Call any C++ constructors
> CALL _U(__do_global_ctors)
> .weak _U(__do_global_ctors)
>
> ;; Call Main function

This does not work for several reasons, as I found out today, hmm any ideas?

Regards,

--
Peter Jansen
Smart Container
Level 1, NIC Building
Eveleigh
NSW 1430
AUSTRALIA

avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:08:18 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM1E-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:08:12 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:08:12 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0C050G28916
for <[email-masked]>; Fri, 11 Jan 2002 18:05:00 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0BNEis03775
for avr-gcc-list-list.japetos; Fri, 11 Jan 2002 17:14:44 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0BNEhB03772
for <[email-masked]>; Fri, 11 Jan 2002 17:14:43 -0600
Received: from mail.ripnet.com (mail.ripnet.com [206.47.98.3])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0BNGI817610
for <[email-masked]>; Fri, 11 Jan 2002 17:16:18 -0600
Received: from A3-P220.RipNET.com ([email-masked] [216.208.158.221])
by mail.ripnet.com (8.12.0.Beta12/8.11.1) with ESMTP id g0BNEe0v001514;
Fri, 11 Jan 2002 18:14:41 -0500
Date: Fri, 11 Jan 2002 18:14:56 -0500 (EST)
From: RogerB <[email-masked]>
X-X-Sender: [email-masked]
To: AVR GCC List <[email-masked]>
cc: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Big end little end thingie
In-Reply-To: <3C3F6F94.19863.28EE023@localhost>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

> >
>
> I have found the display of memory in AVR studio to be very
> confusing. When switching between byte and word display - one of
> them is definately in the wrong order.
> What version of avr-gcc are you using? The earlier versions of avr-
> gcc generated "incorrect" (Byte swapped) srec files, so that they
> could be used with the Atmel/Kanda software provided with the
> STK200/300.
>
> With the latest avr-gcc for windows from the avfreaks.net site I get
> the following intel hex file:
>
> :100000000C94A1000C94BF000C94BF000C94BF0092
>
> and the following srec file:
>
> S2140000000C94A1000C94BF000C94BF000C94BF008D
>
> Both are correct and consistent.
>
> Regards
> Anton

I'm using avr-gcc 3.0.2. The results look
like yours but the list file is incorect for the
2313. It say that the first instruction is a load.
I don't have a board right now to test it on.

avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:08:17 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM1B-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:08:09 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:08:09 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0BMCtH02464
for <[email-masked]>; Fri, 11 Jan 2002 16:12:55 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0BL4QZ01985
for avr-gcc-list-list.japetos; Fri, 11 Jan 2002 15:04:26 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0BL4PB01982
for <[email-masked]>; Fri, 11 Jan 2002 15:04:25 -0600
Received: from mail.intekom.com (mid-mail-02.intekom.com [196.25.69.45])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g0BL5xw18844
for <[email-masked]>; Fri, 11 Jan 2002 15:06:00 -0600
Received: (qmail 16247 invoked from network); 11 Jan 2002 21:04:11 -0000
Received: from bnb53-01-p34.nt.saix.net (HELO scorpio) ([155.239.180.34]) (envelope-sender <[email-masked]>)
by intekom.com (qmail-ldap-1.03) with SMTP
for <[email-masked]>; 11 Jan 2002 21:04:11 -0000
X-vSMTP: intekom.com
From: "Anton Erasmus" <[email-masked]>
Organization: Home
To: RogerB <[email-masked]>
Date: Fri, 11 Jan 2002 23:04:52 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: Re: [avr-gcc-list] Big end little end thingie
CC: [email-masked]
Message-ID: <3C3F6F94.19863.28EE023@localhost>
References: <3C3D6785.27832.13A602@localhost>
In-reply-to: <[email-masked]>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Date sent: Thu, 10 Jan 2002 20:56:09 -0500 (EST)
From: RogerB <[email-masked]>
To: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Big end little end thingie

>
>
>
> On Thu, 10 Jan 2002, Anton Erasmus wrote:
>
> >
> >
> > Hi,
> >
> > Atmel stuffed up their S-Record generation and interptretation. If
> > you want to use any of atmels software u either Intel Hex or binary.
> > There used to be a hack in avr-gcc to enable it to generate the
> > incorrect atmel version of S-Records.
> >
> > Regards
> > Anton
> >
> > avr-gcc-list at http://avr1.org
> >
> I'm not making a srec file with studio just a intel hex
> file and I'm looking at the list files and the first two used bytes
> S11300000AC0 for the srec and :10000000C0A0 for the hex file. The 0A
> part might change but it's followed by C0 on the linux box with srec
> or ihex code, with studio the ihex file is the other way around. The
> flash location 0000 is 0A and 0001 is C0 which the .lst say is a ld
> instruction. It should be a jump to the program start or something
> similar.
> That seems like gcc is building the wrong ended code
> if the micro wants little end but I don't see a switch
> for that anywhere.
>
>

I have found the display of memory in AVR studio to be very
confusing. When switching between byte and word display - one of
them is definately in the wrong order.
What version of avr-gcc are you using? The earlier versions of avr-
gcc generated "incorrect" (Byte swapped) srec files, so that they
could be used with the Atmel/Kanda software provided with the
STK200/300.

With the latest avr-gcc for windows from the avfreaks.net site I get
the following intel hex file:

:100000000C94A1000C94BF000C94BF000C94BF0092

and the following srec file:

S2140000000C94A1000C94BF000C94BF000C94BF008D

Both are correct and consistent.

Regards
Anton

avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:08:22 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM1I-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:08:16 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:08:16 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0C3bJm10731
for <[email-masked]>; Fri, 11 Jan 2002 21:37:19 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0C2pHU05708
for avr-gcc-list-list.japetos; Fri, 11 Jan 2002 20:51:17 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0C2pGB05705
for <[email-masked]>; Fri, 11 Jan 2002 20:51:17 -0600
Received: from mail.world-net.co.nz (mail.world-net.co.nz [203.96.119.27])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g0C2qpu01422
for <[email-masked]>; Fri, 11 Jan 2002 20:52:52 -0600
Received: (qmail 10756 invoked from network); 12 Jan 2002 02:51:15 -0000
Received: from adsl-200.world-net.co.nz (HELO jpk1.jpk.co.nz) (210.55.228.200)
by 0 with SMTP; 12 Jan 2002 02:51:15 -0000
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Sat, 12 Jan 2002 15:51:16 +1300
To: [email-masked]
From: Jason Kyle <[email-masked]>
Subject: Re: [avr-gcc-list] AVR Studio command line programmer very slow
In-Reply-To: <20020111190409.GA25100@cordelia>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

At 19:04 11/01/2002 +0000, John Devereux wrote:
>Hello all,
>
>I have just tried using the command line STK500.EXE programming
>utility to automate chip programming from a makefile. I have noticed
>that it seems very slow compared to the main AVR-Studio program. For
>example, a trivial 100 byte program takes 10 seconds from the command
>line but less than 1 second from within the Windows software.

Yuck! Can't think of any reason why it should be so slow, must be how they
have implemented reception of the acknowledge characters sent back from the
programmer. Maybe try setting the FIFO level on the serial port to 1 byte
on receive?

>Is this normal, is there anything I can do about it, and is there an
>alternative under Windows?

I use uisp in a cygwin environment on win2k, you'll need to specify
-dserial=/dev/comX where X = the com port number.

Jason Kyle

>I am running V3.2, under Win2k, trying to program the ATmega163.
>
>Regards,
>
>John Devereux
>avr-gcc-list at http://avr1.org

avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:08:22 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM1K-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:08:18 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:08:18 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0C73sx19846
for <[email-masked]>; Sat, 12 Jan 2002 01:03:54 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0C6BsL07538
for avr-gcc-list-list.japetos; Sat, 12 Jan 2002 00:11:54 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0C6BrB07535
for <[email-masked]>; Sat, 12 Jan 2002 00:11:53 -0600
Received: from sttlpop3.sttl.uswest.net (sttlpop3.sttl.uswest.net [206.81.192.3])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g0C6DU310435
for <[email-masked]>; Sat, 12 Jan 2002 00:13:30 -0600
Received: (qmail 29185 invoked by alias); 12 Jan 2002 06:11:52 -0000
Delivered-To: [email-masked]@fixme
Received: (qmail 29153 invoked by uid 0); 12 Jan 2002 06:11:51 -0000
Received: from sttldslgw5poole179.sttl.uswest.net (HELO lbarello) (63.224.47.179)
by sttlpop3.sttl.uswest.net with SMTP; 12 Jan 2002 06:11:51 -0000
Message-ID: <00b001c19b2f$78a17560$0700000a@lbarello>
From: "Larry Barello" <[email-masked]>
To: <[email-masked]>
References: <[email-masked]>
Subject: Re: [avr-gcc-list] AVR Studio command line programmer very slow
Date: Fri, 11 Jan 2002 21:54:19 -0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

You need to specify the COM port or the program will scan when it
starts up. I bet astudio does the scan while the splash screen
(ladybug) is up.

----- Original Message -----
From: "Jason Kyle" <[email-masked]>
...
> Yuck! Can't think of any reason why it should be so slow, must be
how they
> have implemented reception of the acknowledge characters sent back
from the
> programmer. Maybe try setting the FIFO level on the serial port to
1 byte
> on receive?
>
>
> >Is this normal, is there anything I can do about it, and is there
an
> >alternative under Windows?

avr-gcc-list at http://avr1.org

From [email-masked] Sun Jan 13 00:08:23 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16PM1L-0003wo-00
for <avrgcclist@localhost>; Sun, 13 Jan 2002 00:08:19 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sun, 13 Jan 2002 00:08:19 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0C8Bp325286
for <[email-masked]>; Sat, 12 Jan 2002 02:11:51 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0C7WPb13199
for avr-gcc-list-list.japetos; Sat, 12 Jan 2002 01:32:25 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0C7WOB13196
for <[email-masked]>; Sat, 12 Jan 2002 01:32:24 -0600
Received: from mail.intekom.com (mid-mail-01.intekom.com [196.25.69.44])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g0C7Y0x17937
for <[email-masked]>; Sat, 12 Jan 2002 01:34:01 -0600
Received: (qmail 21901 invoked from network); 12 Jan 2002 07:25:33 -0000
Received: from bnb53-01-p73.nt.saix.net (HELO scorpio) ([155.239.180.73]) (envelope-sender <[email-masked]>)
by intekom.com (qmail-ldap-1.03) with SMTP
for <[email-masked]>; 12 Jan 2002 07:25:33 -0000
X-vSMTP: intekom.com
From: "Anton Erasmus" <[email-masked]>
Organization: Home
To: RogerB <[email-masked]>
Date: Sat, 12 Jan 2002 09:26:19 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: Re: [avr-gcc-list] Big end little end thingie
CC: [email-masked]
Message-ID: <3C40013B.6872.18E925@localhost>
References: <3C3F6F94.19863.28EE023@localhost>
In-reply-to: <[email-masked]>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Date sent: Fri, 11 Jan 2002 18:14:56 -0500 (EST)
From: RogerB <[email-masked]>
To: AVR GCC List <[email-masked]>
Copies to: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Big end little end thingie

>
>
>
> > >
> >
> > I have found the display of memory in AVR studio to be very
> > confusing. When switching between byte and word display - one of
> > them is definately in the wrong order. What version of avr-gcc are
> > you using? The earlier versions of avr- gcc generated "incorrect"
> > (Byte swapped) srec files, so that they could be used with the
> > Atmel/Kanda software provided with the STK200/300.
> >
> > With the latest avr-gcc for windows from the avfreaks.net site I get
> > the following intel hex file:
> >
> > :100000000C94A1000C94BF000C94BF000C94BF0092
> >
> > and the following srec file:
> >
> > S2140000000C94A1000C94BF000C94BF000C94BF008D
> >
> > Both are correct and consistent.
> >
> > Regards
> > Anton
>
> I'm using avr-gcc 3.0.2. The results look
> like yours but the list file is incorect for the
> 2313. It say that the first instruction is a load.
> I don't have a board right now to test it on.
>
>

Hi,

Did you generate the list file for the gcrt1.s assembly file ? In my C
file the first instruction in the list file is a load. (First instruction in
main) The first instruction in the gcrt1.s file is a jump.

Regards
Anton

avr-gcc-list at http://avr1.org

From [email-masked] Sat Jan 19 10:11:57 2002
Received: from mail.world-net.co.nz ([203.96.119.27])
by jpk3.jpk.co.nz with smtp (Exim 3.12 #1 (Debian))
id 16RgIn-0003Q1-00
for <[email-masked]>; Sat, 19 Jan 2002 10:11:57 +1300
Received: (qmail 2840 invoked from network); 18 Jan 2002 21:15:17 -0000
Received: from adsl-200.world-net.co.nz (HELO jpk1.jpk.co.nz) (210.55.228.200)
by 0 with SMTP; 18 Jan 2002 21:15:17 -0000
Message-Id: <[email-masked]>
X-Sender: jpk.co.nz/[email-masked]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Sat, 19 Jan 2002 10:15:19 +1300
To: [email-masked]
From: Jason Kyle <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: [avr-gcc-list] ******* IMPORTANT message to recent subscribers
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

This message will only be received by recent subscribers to the
avr-gcc-list on avr.jpk.co.nz , it will also appear in the list archives.

Late December the avr-gcc-list was moved to a new domain for reasons
explained in
http://avr.jpk.co.nz/pipermail/avr-gcc-list/2001-December/001259.html but
since then I have not had sufficient time to complete the avr1.org site nor
alter the avr.jpk.co.nz site to inform new subscribers of the
changes. Right now I am in the process of sorting out the avr1.org site
and will also change the DNS entires for avr.jpk.co.nz so anyone accessing
that doimain will automatically access avr1.org instead, end of confusion.

Instructions on subscribing to the avr-gcc mailing list will be available
at avr1.org , as you may note from the link above it doesn't run GNU
Mailman and hence is a little different but is none the less still a
functional mailing list.

I have received a few emails over the last week or 2 from subscribers not
getting email from the list, that would be due to this change. Please
subscribe to the avr1.org list instead.

The machine running GNU Mailman at avr.jpk.co.nz will be off line in a week
or 2.

Best Regards,

Jason Kyle

From [email-masked] Sat Jan 19 10:22:03 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16RgSY-0003RZ-00
for <avrgcclist@localhost>; Sat, 19 Jan 2002 10:22:02 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sat, 19 Jan 2002 10:22:02 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0FCGFv28693
for <[email-masked]>; Tue, 15 Jan 2002 06:16:15 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0FBMt631086
for avr-gcc-list-list.japetos; Tue, 15 Jan 2002 05:22:55 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0FBMsB31083
for <[email-masked]>; Tue, 15 Jan 2002 05:22:54 -0600
Received: from alf.amelek.gda.pl (pf107.gdansk.sdi.tpnet.pl [213.77.129.107])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0FBOjO16277
for <[email-masked]>; Tue, 15 Jan 2002 05:24:45 -0600
Received: from marekm by alf.amelek.gda.pl with local (Exim 3.33 #1 (Debian))
id 16QRg3-0000TI-00
for <[email-masked]>; Tue, 15 Jan 2002 12:22:51 +0100
Subject: [avr-gcc-list] avr-libc-20020115
To: [email-masked]
Date: Tue, 15 Jan 2002 12:22:51 +0100 (CET)
X-Mailer: ELM [version 2.4ME+ PL94 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Message-Id: <[email-masked]>
From: Marek Michalkiewicz <[email-masked]>
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

I've just made a new release of avr-libc.
Many thanks to Reinhard Jessich for autoconf/automake support.
Hopefully this will make new releases easier...

http://www.amelek.gda.pl/avr/libc/avr-libc-20020115.tar.gz

Tested only on Linux so far, and the old Makefile hacks for
Windows are gone. Please test more - thanks!

Marek
avr-gcc-list at http://avr1.org

From [email-masked] Sat Jan 19 10:22:27 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16RgSr-0003RZ-00
for <avrgcclist@localhost>; Sat, 19 Jan 2002 10:22:21 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sat, 19 Jan 2002 10:22:21 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0IHSft27052
for <[email-masked]>; Fri, 18 Jan 2002 11:28:42 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0IFqTo17891
for avr-gcc-list-list.japetos; Fri, 18 Jan 2002 09:52:29 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0IFqOB17888
for <[email-masked]>; Fri, 18 Jan 2002 09:52:24 -0600
Received: from alf.amelek.gda.pl (pf107.gdansk.sdi.tpnet.pl [213.77.129.107])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0IFq6H19109
for <[email-masked]>; Fri, 18 Jan 2002 09:52:06 -0600
Received: from marekm by alf.amelek.gda.pl with local (Exim 3.33 #1 (Debian))
id 16RbJ9-0008Lp-00; Fri, 18 Jan 2002 16:51:59 +0100
Subject: [avr-gcc-list] RFC: new AVR devices in binutils
To: [email-masked]
Date: Fri, 18 Jan 2002 16:51:58 +0100 (CET)
CC: [email-masked]
X-Mailer: ELM [version 2.4ME+ PL94 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Message-Id: <[email-masked]>
From: Marek Michalkiewicz <[email-masked]>
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

looking more at adding complete support for all these new devices (not
only ATmega128), I'm not really sure what to do, as there are a few
problems... Basically, Atmel made too many different chips and didn't
tell us (without all this super top secret NDA crap) early enough.

Looking at publicly available datasheets (some of which may describe
non-existent devices... but most of them are real), there are about
20 different combinations of Flash size, SRAM size, EEPROM size, and
start of data memory (0x100 on ATmega64/128, 0x60 otherwise). I don't
think it's a good idea to add so many ld emulations, and add more when
Atmel comes up with even more different chips... So here is the plan,
please tell me if it makes sense :)

- add 5 new emulations, one for each "architecture" avr1 ... avr5
with default linker scripts defining maximum possible memory sizes:

arch flash SRAM EEPROM
avr1 8K* 0 64K
avr2 8K 64K 64K
avr3 128K 64K 64K
avr4 8K 64K 64K
avr5 128K 64K 64K

(* Yes, I know the largest avr1 now has only 2K - ATtiny28 - but who
knows if/when Atmel makes some ATtiny89 or something like that...
the idea is that it is possible to address max 8K of program memory
using the avr1 instruction set.) In linker scripts for these new
emulations, define start of internal SRAM as 0x60, and don't define
__stack at end of SRAM (as we don't know the real size).

- keep the existing avr85xx etc. emulations for now (may be removed
later, when no longer used for a few years...).

- change LINK_SPEC in gcc/config/avr/avr.h to specify -Tdata 0x800100
for ATmega64/128 so variables start above I/O registers. The default
(0x800060) is good for all other devices so there is no problem.

- change avr-libc to define __stack as a weak symbol in gcrt1.S (as
avr-libc has one crt*.o file for each device type anyway). It is
weak so can be redefined - old linker scripts that do will not fail.

- after the next stable release of binutils, change GCC to use the
new avr[1-5] emulations for all devices, not just the new ones.

- then, after the next stable release of GCC, the old avr85xx etc.
emulations may be removed from binutils.

The good thing is that after all this, new devices should not need
big changes in binutils to be well supported. Especially adding
emulations is a pain - I don't have the right combination of
autoconf/automake versions to regenerate all these files correctly.
Makefile.in and configure end up being different in a few other places
where I didn't change anything, and (tested on CVS binutils today)
automake in "gas" subdirectory fails :(

So I guess I'll have to politely ask binutils maintainers to regenerate
these files for me (as they know some magic that I don't know...),
hoping I won't have to do that again too often...

The disadvantage is that we lose size checking (the linker won't detect
that the program is too big for the device). You have to write your
own linker script with correct memory sizes, or look at avr-size output.
But that size checking was not reliable anyway: no error if text < 8K
but text+data > 8K, so looking at avr-size output (or map file) is
necessary anyway...

Basically I try to preserve backwards compatibility between current
stable releases of GCC and binutils. That's why I'd like to add new
emulations soon, but remove the old ones after no one uses them.

Also, there is no need to edit linker scripts for external SRAM support
(how to do this is a Frequently Asked Question). Only set up MCUCR
correctly (avr-gcc -Wl,--defsym,__init_mcucr__=0xC0) and that's all.
(This could probably be done by inserting some "asm" in C source,
which could define that value using symbolic names from <io*.h>.)

It was partially my fault that I didn't expect so many new chips when
making changes to support atmega163 etc. Hopefully I won't make so many
mistakes this time... I'm very busy, but I want to do this so people
stop sending me so much mail about ATmega128 support :)

Comments and suggestions welcome. Could this plan be improved?

Thanks,
Marek
avr-gcc-list at http://avr1.org

From [email-masked] Sat Jan 19 10:21:59 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16RgSV-0003RZ-00
for <avrgcclist@localhost>; Sat, 19 Jan 2002 10:21:59 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sat, 19 Jan 2002 10:21:59 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0CEWm802292
for <[email-masked]>; Sat, 12 Jan 2002 08:32:48 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0CDciR22668
for avr-gcc-list-list.japetos; Sat, 12 Jan 2002 07:38:44 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0CDchB22665
for <[email-masked]>; Sat, 12 Jan 2002 07:38:43 -0600
Received: from mail.ripnet.com (mail.ripnet.com [206.47.98.3])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0CDeLg24574
for <[email-masked]>; Sat, 12 Jan 2002 07:40:21 -0600
Received: from A2-P234.RipNET.com ([email-masked] [206.47.206.235])
by mail.ripnet.com (8.12.0.Beta12/8.11.1) with ESMTP id g0CDcf0v007887;
Sat, 12 Jan 2002 08:38:42 -0500
Date: Sat, 12 Jan 2002 08:38:58 -0500 (EST)
From: RogerB <[email-masked]>
X-X-Sender: [email-masked]
To: AVR GCC List <[email-masked]>
cc: AVR GCC List <[email-masked]>
Subject: Re: [avr-gcc-list] Big end little end thingie
In-Reply-To: <3C40013B.6872.18E925@localhost>
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

>
> Hi,
>
> Did you generate the list file for the gcrt1.s assembly file ? In my C
> file the first instruction in the list file is a load. (First instruction in
> main) The first instruction in the gcrt1.s file is a jump.
>
> Regards
> Anton
>
>
>
> avr-gcc-list at http://avr1.org
>
I need a few parts for my proto board so I'll stick it together
and see it it will make the lights flash.

avr-gcc-list at http://avr1.org

From [email-masked] Sat Jan 19 10:22:00 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16RgSW-0003RZ-00
for <avrgcclist@localhost>; Sat, 19 Jan 2002 10:22:00 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sat, 19 Jan 2002 10:22:00 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0CEqAl06386
for <[email-masked]>; Sat, 12 Jan 2002 08:52:10 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0CECNh22995
for avr-gcc-list-list.japetos; Sat, 12 Jan 2002 08:12:23 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0CECMB22992
for <[email-masked]>; Sat, 12 Jan 2002 08:12:22 -0600
Received: from finch-post-11.mail.demon.net (finch-post-11.mail.demon.net [194.217.242.39])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0CEE0f30734
for <[email-masked]>; Sat, 12 Jan 2002 08:14:00 -0600
Received: from pcsltd.demon.co.uk ([158.152.225.240] helo=cordelia)
by finch-post-11.mail.demon.net with esmtp (Exim 2.12 #1)
id 16POtR-0001LH-0B
for [email-masked]; Sat, 12 Jan 2002 14:12:21 +0000
Received: from jd by cordelia with local (Exim 3.33 #1 (Debian))
id 16POtq-0007hC-00
for <[email-masked]>; Sat, 12 Jan 2002 14:12:46 +0000
Date: Sat, 12 Jan 2002 14:12:45 +0000
From: John Devereux <[email-masked]>
To: [email-masked]
Subject: Re: [avr-gcc-list] AVR Studio command line programmer very slow
Message-ID: <20020112141245.GA29569@cordelia>
Mail-Followup-To: [email-masked]
References: <[email-masked]> <00b001c19b2f$78a17560$0700000a@lbarello>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <00b001c19b2f$78a17560$0700000a@lbarello>
User-Agent: Mutt/1.3.25i
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

* Larry Barello ([email-masked]) wrote:
> You need to specify the COM port or the program will scan when it
> starts up. I bet astudio does the scan while the splash screen
> (ladybug) is up.

I don't think this is the answer, I can see from the program output
that the scan is completed quickly; it pauses on the actual
programming part. I have confirmed this by looking at the serial
traffic, this is what takes the time (up to 23 seconds now BTW).

--
John Devereux
avr-gcc-list at http://avr1.org

From [email-masked] Sat Jan 19 10:22:14 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16RgSi-0003RZ-00
for <avrgcclist@localhost>; Sat, 19 Jan 2002 10:22:12 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sat, 19 Jan 2002 10:22:12 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0HCukM24102
for <[email-masked]>; Thu, 17 Jan 2002 06:56:46 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0HBATw20044
for avr-gcc-list-list.japetos; Thu, 17 Jan 2002 05:10:29 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0HBARB20041
for <[email-masked]>; Thu, 17 Jan 2002 05:10:27 -0600
Received: from smartcontainer.net (IDENT:qmailr@[203.24.179.147])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g0HBANa02409
for <[email-masked]>; Thu, 17 Jan 2002 05:10:24 -0600
Received: (qmail 19777 invoked by uid 100); 17 Jan 2002 11:10:18 -0000
To: Pieter Potgieter <[email-masked]>
Subject: Re: [avr-gcc-list] Latest source
Message-ID: <[email-masked]>
Date: Thu, 17 Jan 2002 22:10:18 +1100 (EST)
From: [email-masked]
Cc: avr-gcc-list <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: IMP/PHP IMAP webmail program 2.2.7
X-Originating-IP: 203.45.96.198
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Quoting Pieter Potgieter <[email-masked]>:

>
[snip]

>
> Regards
> Pieter Potgieter
>
> ps - When will GDB be able to use the JTAG ICE on the Mega128?
> Then I will be able to format my windows PC ;-)

Right now! Download the latest version of AVaRICE (gdb to JTAG ICE interface
program) from http://avarice.sourceforge.net.

You will also need to download Ted Roth's patches for gdb. This patch should be
applied to an official gdb-5.1 release.
His latest can be downloaded from:
http://freesoftware.fsf.org/download/simulavr/gdb-patches/

I am currently using the JTAG ICE with AVaRICE to debug an application with
>10000 lines of asm/c/c++ source and it is working well.

If you have any troubles, feel free to send questions to the AVaRICE mailing
list (there is a link on the website) or email me directly.

Regards,

Scott Finneran
avr-gcc-list at http://avr1.org

From [email-masked] Sat Jan 19 10:22:02 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16RgSX-0003RZ-00
for <avrgcclist@localhost>; Sat, 19 Jan 2002 10:22:01 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sat, 19 Jan 2002 10:22:01 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0EErHF17176
for <[email-masked]>; Mon, 14 Jan 2002 08:53:17 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0EDmp505978
for avr-gcc-list-list.japetos; Mon, 14 Jan 2002 07:48:51 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0EDmoB05973
for <[email-masked]>; Mon, 14 Jan 2002 07:48:50 -0600
Received: from maynard.mail.mindspring.net (maynard.mail.mindspring.net [207.69.200.243])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0EDoco01485
for <[email-masked]>; Mon, 14 Jan 2002 07:50:38 -0600
Received: from pool-63.50.142.139.kgp2.grid.net ([63.50.142.139] helo=wa3ywun0)
by maynard.mail.mindspring.net with smtp (Exim 3.33 #1)
id 16Q7Ti-0007zw-00
for [email-masked]; Mon, 14 Jan 2002 08:48:48 -0500
From: "John Branthoover" <[email-masked]>
To: <[email-masked]>
Subject: [avr-gcc-list] Win32 Build Of The GCC Compiler And ATMEGA128 support
Date: Mon, 14 Jan 2002 08:48:24 -0500
Message-ID: <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
Importance: Normal
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hello All,
Am I to assume that at this time, there is not a Win32 build of the GCC
compiler with support for the AVR ATMEGA128 chip...? Any information that
you can give me will be greatly appreciated. Thank you for your time and
have a nice day.

avr-gcc-list at http://avr1.org

From [email-masked] Sat Jan 19 10:22:04 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16RgSZ-0003RZ-00
for <avrgcclist@localhost>; Sat, 19 Jan 2002 10:22:03 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sat, 19 Jan 2002 10:22:03 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0G04Bm18974
for <[email-masked]>; Tue, 15 Jan 2002 18:04:11 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0FMUOq07896
for avr-gcc-list-list.japetos; Tue, 15 Jan 2002 16:30:24 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0FMUNB07893
for <[email-masked]>; Tue, 15 Jan 2002 16:30:23 -0600
Received: from mail.intekom.com (mid-mail-01.intekom.com [196.25.69.44])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g0FMWA303767
for <[email-masked]>; Tue, 15 Jan 2002 16:32:11 -0600
Received: (qmail 29336 invoked from network); 15 Jan 2002 20:28:05 -0000
Received: from bnb53-01-p22.nt.saix.net (HELO scorpio) ([155.239.180.22]) (envelope-sender <[email-masked]>)
by intekom.com (qmail-ldap-1.03) with SMTP
for <[email-masked]>; 15 Jan 2002 20:28:05 -0000
X-vSMTP: intekom.com
From: "Anton Erasmus" <[email-masked]>
Organization: Home
To: "John Branthoover" <[email-masked]>
Date: Tue, 15 Jan 2002 22:28:56 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: Re: [avr-gcc-list] Win32 Build Of The GCC Compiler And ATMEGA128 support
CC: [email-masked]
Message-ID: <3C44AD28.15672.7DC545@localhost>
In-reply-to: <[email-masked]>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

From: "John Branthoover" <[email-masked]>
To: <[email-masked]>
Subject: [avr-gcc-list] Win32 Build Of The GCC Compiler And ATMEGA128 support
Date sent: Mon, 14 Jan 2002 08:48:24 -0500

> Hello All,
> Am I to assume that at this time, there is not a Win32 build of the
> GCC
> compiler with support for the AVR ATMEGA128 chip...? Any information
> that you can give me will be greatly appreciated. Thank you for your
> time and have a nice day.
>
> avr-gcc-list at http://avr1.org
>

Hi,

I am using the current version of the Win32 binary avr-gcc on
www.avrfreaks.net to compile code for the ATMega128. I had to
assemble a correct version of gcrt1.s for the ATMega128. I then
had to modify the ATMega103 linker script to correctly define the
ATMega128 memory areas. I also modified the iomacros.h file to
update the inp and outp macros, so that they work correctly on the
ATMega128.
With this setup I have succefully generated code for the
ATMega128. I have run the code on an actual ATMega128 - Not
just simulated it.

If you need more detail, or copies of the modified files then I can
email them.

Regards
Anton Erasmus

avr-gcc-list at http://avr1.org

From [email-masked] Sat Jan 19 10:22:07 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16RgSb-0003RZ-00
for <avrgcclist@localhost>; Sat, 19 Jan 2002 10:22:05 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sat, 19 Jan 2002 10:22:05 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0G1pKH13413
for <[email-masked]>; Tue, 15 Jan 2002 19:51:20 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0G0PkA09875
for avr-gcc-list-list.japetos; Tue, 15 Jan 2002 18:25:46 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0G0PkB09872
for <[email-masked]>; Tue, 15 Jan 2002 18:25:46 -0600
Received: from smartcontainer.net (IDENT:qmailr@[203.24.179.147])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g0G0RXs25015
for <[email-masked]>; Tue, 15 Jan 2002 18:27:34 -0600
Received: (qmail 6491 invoked by uid 8); 16 Jan 2002 00:25:36 -0000
Received: from moki.smartcontainer.net (20.20.20.13, claiming to be "smartcontainer.net")
by smarty.smartcontainer.net with SMTP id smtpd33BQkO; Tue, 15 Jan 2002 19:25:26 EST
Message-ID: <[email-masked]>
Date: Wed, 16 Jan 2002 11:25:26 +1100
From: Peter Jansen <[email-masked]>
X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Marek Michalkiewicz <[email-masked]>
CC: [email-masked]
Subject: Re: [avr-gcc-list] avr-libc-20020115
References: <[email-masked]>
Content-Type: multipart/mixed;
boundary="------------D635847580FFF28A83F974B0"
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.
--------------D635847580FFF28A83F974B0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi Marek,

> I've just made a new release of avr-libc.
> Many thanks to Reinhard Jessich for autoconf/automake support.
> Hopefully this will make new releases easier...
>
> http://www.amelek.gda.pl/avr/libc/avr-libc-20020115.tar.gz
>
> Tested only on Linux so far, and the old Makefile hacks for
> Windows are gone. Please test more - thanks!

I found that by doing a "../avr-libc-20020115/configure --target=avr
--host=avr" that it does not pick up the avr gcc compiler. I changed the
configure script to hopefully get this correct (attached the patch).

I had trouble building your library, I'm building it in a different
directory than the source maybe that makes a difference. This was mostly
with the directory structure it creates when building.

If I do the following,

cd source (as an example)
tar xvzf avr-libc-200201015.tar.gz
mkdir build-avr-libc
cd build-avr-libc
../avr-lib-20020115/configure --target=avr --host=avr

I end up with the following directory structure,

source/avr-libc-20020115/.....
source/avr3/build-avr-libc
source/avr4/build-avr-libc
source/avr5/build-avr-libc
source/build-avr-libc

I would have expected the avr3, avr4, avr5 directories to be created
under the build-avr-libc directory.

I could not figure out which part of the configuration system makes this
I assume its something to do with the multilib support stuff but it
seems quite complex.

Regards,

--
Peter Jansen
Smart Container
Level 1, NIC Building
Eveleigh
NSW 1430
AUSTRALIA
--------------D635847580FFF28A83F974B0
Content-Type: text/plain; charset=us-ascii;
name="avr-libc-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="avr-libc-patch"

*** ../avr-libc-20020115/configure Wed Jan 16 10:40:15 2002
--- ../avr-libc-20020115/configure.orig Tue Jan 15 21:42:41 2002
***************
*** 912,922 ****
echo "$ac_t""missing" 1>&6
fi

! #if test $target != $build; then
! ac_tool_prefix=${target_alias}-
! #else
! # ac_tool_prefix=
! #fi

# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
set dummy ${ac_tool_prefix}as; ac_word=$2
--- 912,924 ----
echo "$ac_t""missing" 1>&6
fi

!
!
! if test $host != $build; then
! ac_tool_prefix=${host_alias}-
! else
! ac_tool_prefix=
! fi

# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
set dummy ${ac_tool_prefix}as; ac_word=$2

--------------D635847580FFF28A83F974B0--

avr-gcc-list at http://avr1.org

From [email-masked] Sat Jan 19 10:22:08 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16RgSd-0003RZ-00
for <avrgcclist@localhost>; Sat, 19 Jan 2002 10:22:07 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sat, 19 Jan 2002 10:22:07 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0GJ8AZ11919
for <[email-masked]>; Wed, 16 Jan 2002 13:08:10 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0GG4C225871
for avr-gcc-list-list.japetos; Wed, 16 Jan 2002 10:04:12 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0GG4BB25868
for <[email-masked]>; Wed, 16 Jan 2002 10:04:11 -0600
Received: from tomts19-srv.bellnexxia.net (tomts19.bellnexxia.net [209.226.175.73])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0GG45U04299
for <[email-masked]>; Wed, 16 Jan 2002 10:04:05 -0600
Received: from valery ([65.92.202.36]) by tomts19-srv.bellnexxia.net
(InterMail vM.4.01.03.16 201-229-121-116-20010115) with SMTP
id <20020116160401.OZMZ10563.tomts19-srv.bellnexxia.net@valery>
for <[email-masked]>; Wed, 16 Jan 2002 11:04:01 -0500
Message-ID: <000e01c19ea7$5758f7e0$3700000a@valery>
From: =?iso-8859-1?Q?Val=E9ry_Florimond?= <[email-masked]>
To: <[email-masked]>
References: <3C44AD28.15672.7DC545@localhost>
Subject: Re: [avr-gcc-list] Win32 Build Of The GCC Compiler And ATMEGA128 support
Date: Wed, 16 Jan 2002 11:03:30 -0500
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi Anton,

I will work on ATMEGA128 in a few weeks, so I am very interested by your
work. Can you email me your modified files?

thanks a lot,

Valery.

----- Original Message -----
From: "Anton Erasmus" <[email-masked]>
To: "John Branthoover" <[email-masked]>
Cc: <[email-masked]>
Sent: Tuesday, January 15, 2002 3:28 PM
Subject: Re: [avr-gcc-list] Win32 Build Of The GCC Compiler And ATMEGA128
support

> From: "John Branthoover" <[email-masked]>
> To: <[email-masked]>
> Subject: [avr-gcc-list] Win32 Build Of The GCC Compiler And
ATMEGA128 support
> Date sent: Mon, 14 Jan 2002 08:48:24 -0500
>
> > Hello All,
> > Am I to assume that at this time, there is not a Win32 build of the
> > GCC
> > compiler with support for the AVR ATMEGA128 chip...? Any information
> > that you can give me will be greatly appreciated. Thank you for your
> > time and have a nice day.
> >
> > avr-gcc-list at http://avr1.org
> >
>
> Hi,
>
> I am using the current version of the Win32 binary avr-gcc on
> www.avrfreaks.net to compile code for the ATMega128. I had to
> assemble a correct version of gcrt1.s for the ATMega128. I then
> had to modify the ATMega103 linker script to correctly define the
> ATMega128 memory areas. I also modified the iomacros.h file to
> update the inp and outp macros, so that they work correctly on the
> ATMega128.
> With this setup I have succefully generated code for the
> ATMega128. I have run the code on an actual ATMega128 - Not
> just simulated it.
>
> If you need more detail, or copies of the modified files then I can
> email them.
>
> Regards
> Anton Erasmus
>
>
> avr-gcc-list at http://avr1.org
>

avr-gcc-list at http://avr1.org

From [email-masked] Sat Jan 19 10:22:10 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16RgSd-0003RZ-01
for <avrgcclist@localhost>; Sat, 19 Jan 2002 10:22:07 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sat, 19 Jan 2002 10:22:07 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0GMcdt02499
for <[email-masked]>; Wed, 16 Jan 2002 16:38:39 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0GKmWD06145
for avr-gcc-list-list.japetos; Wed, 16 Jan 2002 14:48:32 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0GKmRB06139
for <[email-masked]>; Wed, 16 Jan 2002 14:48:32 -0600
Received: from mail-vie-pub-p.1012internet.at (mail-vie-pub-p.1012internet.at [212.95.31.10])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0GKmLh07989
for <[email-masked]>; Wed, 16 Jan 2002 14:48:21 -0600
Received: from telering.at (dis212095003121.vie.telering.at [212.95.3.121])
by mail-vie-pub-p.1012internet.at (8.9.3/8.9.3) with SMTP id VAA13691
for <[email-masked]>; Wed, 16 Jan 2002 21:48:17 +0100 (MET)
Received: (qmail 944 invoked by uid 501); 16 Jan 2002 20:45:47 -0000
From: [email-masked]
Reply-To: [email-masked]
To: Peter Jansen <[email-masked]>,
Marek Michalkiewicz <[email-masked]>
Subject: Re: [avr-gcc-list] avr-libc-20020115
Date: Wed, 16 Jan 2002 21:27:53 +0100
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
Cc: [email-masked]
References: <[email-masked]> <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Message-Id: <[email-masked]>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by majordomo2.host4u.net id g0GKmWB06143
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Wed, 16 Jan 2002, Peter Jansen wrote:
>
> Hi Marek,
>
> > I've just made a new release of avr-libc.
> > Many thanks to Reinhard Jessich for autoconf/automake support.
> > Hopefully this will make new releases easier...
> >
> > http://www.amelek.gda.pl/avr/libc/avr-libc-20020115.tar.gz
> >
> > Tested only on Linux so far, and the old Makefile hacks for
> > Windows are gone. Please test more - thanks!
>
> I found that by doing a "../avr-libc-20020115/configure --target=avr
> --host=avr" that it does not pick up the avr gcc compiler. I changed the
> configure script to hopefully get this correct (attached the patch).

!!! STOP STOP STOP !!!

Sorry, but this is the wrong approach!
You can never change a script automaticaly generated by autoconf.
So you have to provide the right options for configure. This are

./configure -v --target=avr --host=avr \
--build=`./config.guess` \
--prefix=the_prefix_you_like

The tricky part is the --build option. If you don't specify this, it is set to
the same as host and this will try to use gcc instead of avr-gcc (see
./confiure --help). If you know your build system you can specify it. For my
Linux machine it is i686-pc-linux-gnu.

As I made the automake/autoconf scripts I have also added a script
./doconf to do the configure command. If you like an other prefix use:
PREFIX=the_prefix_you_like ./doconf

Please read INSTALL you will find it there. Maybe we should add more comments
there?

> I had trouble building your library, I'm building it in a different
> directory than the source maybe that makes a difference. This was mostly
> with the directory structure it creates when building.
>
> If I do the following,
>
> cd source (as an example)
> tar xvzf avr-libc-200201015.tar.gz
> mkdir build-avr-libc
> cd build-avr-libc
All this is done by ./doconf, so PLEASE USE IT!!!
If it will not work on you machine, find the reason and send a patch.

> ../avr-lib-20020115/configure --target=avr --host=avr
>
> I end up with the following directory structure,
>
> source/avr-libc-20020115/.....
> source/avr3/build-avr-libc
> source/avr4/build-avr-libc
> source/avr5/build-avr-libc
> source/build-avr-libc
>
> I would have expected the avr3, avr4, avr5 directories to be created
> under the build-avr-libc directory.
>
> I could not figure out which part of the configuration system makes this
> I assume its something to do with the multilib support stuff but it
> seems quite complex.
I have copied the multilib part from gcc/newlib. It is as it is and I see no
problem with it. If you like to change it, look to config-ml.in.

Regards,
Reinhard

--
Ing. Reinhard Jessich mailto: [email-masked]
A-1190 Vienna, Goergengasse 2/2/1 phone: +43/1/3692600
http://members.telering.at/jessich mobile: +43/664/1735439
avr-gcc-list at http://avr1.org

From [email-masked] Sat Jan 19 10:22:12 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16RgSf-0003RZ-00
for <avrgcclist@localhost>; Sat, 19 Jan 2002 10:22:09 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sat, 19 Jan 2002 10:22:09 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0HCaZf19997
for <[email-masked]>; Thu, 17 Jan 2002 06:36:35 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0HAdMt19653
for avr-gcc-list-list.japetos; Thu, 17 Jan 2002 04:39:22 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0HAdLB19650
for <[email-masked]>; Thu, 17 Jan 2002 04:39:21 -0600
Received: from mailsweeper.prism.co.za (ms.prism.co.za [196.34.63.68])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0HAd6v27929
for <[email-masked]>; Thu, 17 Jan 2002 04:39:08 -0600
Received: from exchange.prism.co.za (unverified) by mailsweeper.prism.co.za
(Content Technologies SMTPRS 4.2.5) with ESMTP id <[email-masked]>;
Thu, 17 Jan 2002 12:38:52 +0200
Message-ID: <[email-masked]>
Received: from there (PIETERP [10.5.3.12]) by exchange.prism.co.za with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13)
id CRVP1FAV; Thu, 17 Jan 2002 12:35:34 +0200
From: Pieter Potgieter <[email-masked]>
Organization: Prism
To: "avr-gcc-list" <[email-masked]>
Subject: [avr-gcc-list] Latest source
Date: Thu, 17 Jan 2002 12:37:57 +0200
X-Mailer: KMail [version 1.3.1]
References: <[email-masked]> <[email-masked]> <[email-masked]>
In-Reply-To: <[email-masked]>
Cc: [email-masked]
MIME-Version: 1.0
Content-Type: Multipart/Mixed;
boundary="------------Boundary-00=_97W2UJZ67BCD04R9DO6X"
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--------------Boundary-00=_97W2UJZ67BCD04R9DO6X
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Hi
I want to use the Mega128, but have the following problem
Can I use Reinhard's script with the following source

1. gcc-3.0.2
2. binutils-2.11.2
3. avr-libc-20020115

I have modified the script to use the following patches instead of the
patches included in the script itself.
(see attachments)
1. gcc-patch
2. binutils-patch

Question:
Is the avr-libc-20020115 patches already applied, and will it support the
Mega128

Any comments on wether I am on the right track?
Are this toolchain proven?

Hi Reinard, your script is VERY COOL, just one suggestion maybe; do not
include the patches in the script itself how about downloading the latest
patches also from some website, this will then ensure that everybody has got
the latest and greatest patches and upgrades without scanning through emails
to get the correct patches.

Thanks for everybodies efforts in making avr-gcc the excellent tool that it is

Regards
Pieter Potgieter

ps - When will GDB be able to use the JTAG ICE on the Mega128?
Then I will be able to format my windows PC ;-)

--------------Boundary-00=_97W2UJZ67BCD04R9DO6X
Content-Type: text/x-diff;
charset="iso-8859-1";
name="gcc-patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="gcc-patch"

ZGlmZiAtcmMzUCBnY2MtMy4wLjIvZ2NjL0NoYW5nZUxvZyBnY2MtMy4wLjItcGF0Y2gtMC4xL2dj
Yy9DaGFuZ2VMb2cKKioqIGdjYy0zLjAuMi9nY2MvQ2hhbmdlTG9nCVdlZCBPY3QgMjQgMDM6MTk6
MTggMjAwMQotLS0gZ2NjLTMuMC4yLXBhdGNoLTAuMS9nY2MvQ2hhbmdlTG9nCVdlZCBOb3YgIDcg
MTQ6NTc6NTUgMjAwMQoqKioqKioqKioqKioqKioKKioqIDEsMyAqKioqCi0tLSAxLDkgLS0tLQor
IDIwMDEtMTEtMDcgUGV0ZXIgSmFuc2VuIDxwZXRlckBzbWFydGNvbnRhaW5lci5uZXQ+CisKKyAJ
KiBnY2MvY29uZmlnL2F2ci9hdnIuYyAtIGFkZGVkIG1lZ2ExMjggdG8gbGlzdCBvZiBhdnI1IHR5
cGVzCisgCSogZ2NjL2NvbmZpZy9hdnIvYXZyL2ggLSBEaXR0bworCisKICAyMDAxLTEwLTIzICBS
ZWxlYXNlIE1hbmFnZXIKCiAgCSogR0NDIDMuMC4yIFJlbGVhc2VkLgpkaWZmIC1yYzNQIGdjYy0z
LjAuMi9nY2MvY29uZmlnL2F2ci9hdnIuYyBnY2MtMy4wLjItcGF0Y2gtMC4xL2djYy9jb25maWcv
YXZyL2F2ci5jCioqKiBnY2MtMy4wLjIvZ2NjL2NvbmZpZy9hdnIvYXZyLmMJVGh1IEp1biAyOCAw
NzozNTozNyAyMDAxCi0tLSBnY2MtMy4wLjItcGF0Y2gtMC4xL2djYy9jb25maWcvYXZyL2F2ci5j
CVR1ZSBOb3YgIDYgMTg6MzU6MjQgMjAwMQoqKioqKioqKioqKioqKioKKioqIDE1MywxNTggKioq
KgotLS0gMTUzLDE1OSAtLS0tCiAgICB7ICJhdG1lZ2ExNjMiLCBBVlI1IH0sCiAgICB7ICJhdG1l
Z2EzMiIsICBBVlI1IH0sCiAgICB7ICJhdDk0ayIsICAgICBBVlI1IH0sCisgICB7ICJhdG1lZ2Ex
MjgiLCBBVlI1IH0sCiAgICAgIC8qIEFzc2VtYmxlciBvbmx5LiAgKi8KICAgIHsgImF2cjEiLCAg
ICAgIEFWUjEgfSwKICAgIHsgImF0OTBzMTIwMCIsIEFWUjEgfSwKKioqKioqKioqKioqKioqCioq
KiAxMTY0LDExNzAgKioqKgogIC8qIENob29zZSBtb2RlIGZvciBqdW1wIGluc246CiAgICAgMSAt
IHJlbGF0aXZlIGp1bXAgaW4gcmFuZ2UgLTYzIDw9IHggPD0gNjIgOwogICAgIDIgLSByZWxhdGl2
ZSBqdW1wIGluIHJhbmdlIC0yMDQ2IDw9IHggPD0gMjA0NSA7CiEgICAgMyAtIGFic29sdXRlIGp1
bXAgKG9ubHkgZm9yIEFUbWVnYVsxNl0wMykuICAqLwoKICBpbnQKICBhdnJfanVtcF9tb2RlICh4
LCBpbnNuKQotLS0gMTE2NSwxMTcxIC0tLS0KICAvKiBDaG9vc2UgbW9kZSBmb3IganVtcCBpbnNu
OgogICAgIDEgLSByZWxhdGl2ZSBqdW1wIGluIHJhbmdlIC02MyA8PSB4IDw9IDYyIDsKICAgICAy
IC0gcmVsYXRpdmUganVtcCBpbiByYW5nZSAtMjA0NiA8PSB4IDw9IDIwNDUgOwohICAgIDMgLSBh
YnNvbHV0ZSBqdW1wIChvbmx5IGZvciBBVG1lZ2ExWzZdWzAzXVsyOF0pLiAgKi8KCiAgaW50CiAg
YXZyX2p1bXBfbW9kZSAoeCwgaW5zbikKZGlmZiAtcmMzUCBnY2MtMy4wLjIvZ2NjL2NvbmZpZy9h
dnIvYXZyLmggZ2NjLTMuMC4yLXBhdGNoLTAuMS9nY2MvY29uZmlnL2F2ci9hdnIuaAoqKiogZ2Nj
LTMuMC4yL2djYy9jb25maWcvYXZyL2F2ci5oCVR1ZSBBcHIgMTcgMDQ6MjU6NDIgMjAwMQotLS0g
Z2NjLTMuMC4yLXBhdGNoLTAuMS9nY2MvY29uZmlnL2F2ci9hdnIuaAlUdWUgTm92ICA2IDE3OjU5
OjI2IDIwMDEKKioqKioqKioqKioqKioqCioqKiAyOTczLDI5NzggKioqKgotLS0gMjk3MywyOTc5
IC0tLS0KICAle21tY3U9YXZyMzolKGNwcF9hdnIzKX0gXAogICV7bW1jdT1hdG1lZ2E2MDM6JShj
cHBfYXZyMykgLURfX0FWUl9BVG1lZ2E2MDNfX30gXAogICV7bW1jdT1hdG1lZ2ExMDM6JShjcHBf
YXZyMykgLURfX0FWUl9BVG1lZ2ExMDNfX30gXAorICV7bW1jdT1hdG1lZ2ExMjg6JShjcHBfYXZy
NSkgLURfX0FWUl9BVG1lZ2ExMjhfX30gXAogICV7bW1jdT1hdnI0OiUoY3BwX2F2cjQpfSBcCiAg
JXttbWN1PWF0bWVnYTgzOiAlKGNwcF9hdnI0KSAtRF9fQVZSX0FUbWVnYTgzX199IFwKICAle21t
Y3U9YXRtZWdhODU6ICUoY3BwX2F2cjQpIC1EX19BVlJfQVRtZWdhODVfX30gXAoqKioqKioqKioq
KioqKioKKioqIDMwNTEsMzA1NiAqKioqCi0tLSAzMDUyLDMwNTggLS0tLQogICV7IW1tY3UqOi1t
IGF2cjg1eHh9IFwKICAle21tY3U9YXRtZWdhNjAzOi1tIGF2cm1lZ2E2MDN9IFwKICAle21tY3U9
YXRtZWdhMTAzOi1tIGF2cm1lZ2ExMDN9IFwKKyAle21tY3U9YXRtZWdhMTI4Oi1tIGF2cm1lZ2Ex
Mjh9IFwKICAle21tY3U9YXRtZWdhMTYxOi1tIGF2cm1lZ2ExNjF9IFwKICAle21tY3U9YXRtZWdh
MTYzOi1tIGF2cm1lZ2ExNjF9IFwKICAle21tY3U9YXRtZWdhMzI6LW0gYXZyNX0gXAoqKioqKioq
KioqKioqKioKKioqIDMxMzAsMzEzNSAqKioqCi0tLSAzMTMyLDMxMzggLS0tLQogICV7bW1jdT1h
dDkwYzg1MzQ6Y3J0Yzg1MzQubyVzfSBcCiAgJXttbWN1PWF0OTBzODUzNTpjcnRzODUzNS5vJXN9
IFwKICAle21tY3U9YXRtZWdhMTAzfG1tY3U9YXZyMzpjcnRtMTAzLm8lc30gXAorICV7bW1jdT1h
dG1lZ2ExMjh8bW1jdT1hdnI1OmNydG0xMjgubyVzfSBcCiAgJXttbWN1PWF0bWVnYTYwMzpjcnRt
NjAzLm8lc30gXAogICV7bW1jdT1hdG1lZ2E4M3xtbWN1PWF2cjQ6Y3J0bTgzLm8lc30gXAogICV7
bW1jdT1hdG1lZ2E4NTpjcnRtODUubyVzfSBcCmRpZmYgLXJjM1AgZ2NjLTMuMC4yL2djYy9jb25m
aWcvYXZyL3QtYXZyIGdjYy0zLjAuMi1wYXRjaC0wLjEvZ2NjL2NvbmZpZy9hdnIvdC1hdnIKKioq
IGdjYy0zLjAuMi9nY2MvY29uZmlnL2F2ci90LWF2cglTdW4gSmFuIDIxIDAzOjQ5OjAxIDIwMDEK
LS0tIGdjYy0zLjAuMi1wYXRjaC0wLjEvZ2NjL2NvbmZpZy9hdnIvdC1hdnIJVHVlIE5vdiAgNiAx
ODowMjozMyAyMDAxCioqKioqKioqKioqKioqKgoqKiogNDksNTUgKioqKgogIAltbWN1P2F2cjM9
bW1jdT9hdG1lZ2ExMDMgbW1jdT9hdnIzPW1tY3U/YXRtZWdhNjAzIFwKICAJbW1jdT9hdnI0PW1t
Y3U/YXRtZWdhODMgIG1tY3U/YXZyND1tbWN1P2F0bWVnYTg1ICBcCiAgCW1tY3U/YXZyNT1tbWN1
P2F0bWVnYTE2MSBtbWN1P2F2cjU9bW1jdT9hdG1lZ2ExNjMgXAohIAltbWN1P2F2cjU9bW1jdT9h
dG1lZ2EzMiAgbW1jdT9hdnI1PW1tY3U/YXQ5NGsKCiAgTVVMVElMSUJfRVhDRVBUSU9OUyA9Cgot
LS0gNDksNTYgLS0tLQogIAltbWN1P2F2cjM9bW1jdT9hdG1lZ2ExMDMgbW1jdT9hdnIzPW1tY3U/
YXRtZWdhNjAzIFwKICAJbW1jdT9hdnI0PW1tY3U/YXRtZWdhODMgIG1tY3U/YXZyND1tbWN1P2F0
bWVnYTg1ICBcCiAgCW1tY3U/YXZyNT1tbWN1P2F0bWVnYTE2MSBtbWN1P2F2cjU9bW1jdT9hdG1l
Z2ExNjMgXAohIAltbWN1P2F2cjU9bW1jdT9hdG1lZ2EzMiAgbW1jdT9hdnI1PW1tY3U/YXQ5NGsg
XAohIAltbWN1P2F2cjU9bW1jdT9hdG1lZ2ExMjgKCiAgTVVMVElMSUJfRVhDRVBUSU9OUyA9Cg==

--------------Boundary-00=_97W2UJZ67BCD04R9DO6X
Content-Type: text/x-diff;
charset="iso-8859-1";
name="binutils-patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="binutils-patch"

CmRpZmYgLXJjM1AgYmludXRpbHMtMi4xMS4yL2dhcy9jb25maWcvdGMtYXZyLmMgYmludXRpbHMt
Mi4xMS4yLXBhdGNoLTAuMS9nYXMvY29uZmlnL3RjLWF2ci5jCioqKiBiaW51dGlscy0yLjExLjIv
Z2FzL2NvbmZpZy90Yy1hdnIuYwlUaHUgSnVuICA3IDEzOjE1OjI4IDIwMDEKLS0tIGJpbnV0aWxz
LTIuMTEuMi1wYXRjaC0wLjEvZ2FzL2NvbmZpZy90Yy1hdnIuYwlUdWUgTm92ICA2IDE4OjU4OjQ4
IDIwMDEKKioqKioqKioqKioqKioqCioqKiA4Nyw5MiAqKioqCi0tLSA4Nyw5MyAtLS0tCiAgICB7
ImF0bWVnYTE2MyIsIEFWUl9JU0FfTTE2MSwgICAgIGJmZF9tYWNoX2F2cjV9LAogICAgeyJhdG1l
Z2EzMiIsICBBVlJfSVNBX00xNjEsICAgICBiZmRfbWFjaF9hdnI1fSwKICAgIHsiYXQ5NGsiLCAg
ICAgQVZSX0lTQV85NEssICAgICAgYmZkX21hY2hfYXZyNX0sCisgICB7ImF0bWVnYTEyOCIsIEFW
Ul9JU0FfTTEyOCwgICAgIGJmZF9tYWNoX2F2cjV9LAogICAge05VTEwsIDAsIDB9CiAgfTsKCioq
KioqKioqKioqKioqKgoqKiogMjU4LDI2NCAqKioqCiAgCSIgICAgICAgICAgICAgICAgICAgYXZy
MiAtIEFUOTBTMnh4eCwgQVQ5MFM0eHh4LCBBVDkwUzh4eHgsIEFUdGlueTIyXG4iCiAgCSIgICAg
ICAgICAgICAgICAgICAgYXZyMyAtIEFUbWVnYTEwMywgQVRtZWdhNjAzXG4iCiAgCSIgICAgICAg
ICAgICAgICAgICAgYXZyNCAtIEFUbWVnYTgzLCBBVG1lZ2E4NVxuIgohIAkiICAgICAgICAgICAg
ICAgICAgIGF2cjUgLSBBVG1lZ2ExNjEsIEFUbWVnYTE2MywgQVRtZWdhMzIsIEFUOTRLXG4iCiAg
CSIgICAgICAgICAgICAgICAgICAgb3IgaW1tZWRpYXRlIG1pY3JvY29udHJvbGxlciBuYW1lLlxu
IikpOwogICAgZnByaW50ZiAoc3RyZWFtLAogICAgICAgIF8oIiAgLW1hbGwtb3Bjb2RlcyAgICBh
Y2NlcHQgYWxsIEFWUiBvcGNvZGVzLCBldmVuIGlmIG5vdCBzdXBwb3J0ZWQgYnkgTUNVXG4iCi0t
LSAyNTksMjY1IC0tLS0KICAJIiAgICAgICAgICAgICAgICAgICBhdnIyIC0gQVQ5MFMyeHh4LCBB
VDkwUzR4eHgsIEFUOTBTOHh4eCwgQVR0aW55MjJcbiIKICAJIiAgICAgICAgICAgICAgICAgICBh
dnIzIC0gQVRtZWdhMTAzLCBBVG1lZ2E2MDNcbiIKICAJIiAgICAgICAgICAgICAgICAgICBhdnI0
IC0gQVRtZWdhODMsIEFUbWVnYTg1XG4iCiEgCSIgICAgICAgICAgICAgICAgICAgYXZyNSAtIEFU
bWVnYTE2MSwgQVRtZWdhMTYzLCBBVG1lZ2EzMiwgQVQ5NEssIEFUbWVnYTEyOFxuIgogIAkiICAg
ICAgICAgICAgICAgICAgIG9yIGltbWVkaWF0ZSBtaWNyb2NvbnRyb2xsZXIgbmFtZS5cbiIpKTsK
ICAgIGZwcmludGYgKHN0cmVhbSwKICAgICAgICBfKCIgIC1tYWxsLW9wY29kZXMgICAgYWNjZXB0
IGFsbCBBVlIgb3Bjb2RlcywgZXZlbiBpZiBub3Qgc3VwcG9ydGVkIGJ5IE1DVVxuIgpkaWZmIC1y
YzNQIGJpbnV0aWxzLTIuMTEuMi9pbmNsdWRlL29wY29kZS9hdnIuaCBiaW51dGlscy0yLjExLjIt
cGF0Y2gtMC4xL2luY2x1ZGUvb3Bjb2RlL2F2ci5oCioqKiBiaW51dGlscy0yLjExLjIvaW5jbHVk
ZS9vcGNvZGUvYXZyLmgJTW9uIEF1ZyAgNyAwMDowOToxNCAyMDAwCi0tLSBiaW51dGlscy0yLjEx
LjItcGF0Y2gtMC4xL2luY2x1ZGUvb3Bjb2RlL2F2ci5oCVdlZCBOb3YgIDcgMTI6MjY6NDcgMjAw
MQoqKioqKioqKioqKioqKioKKioqIDM0LDM5ICoqKioKLS0tIDM0LDQwIC0tLS0KICAjZGVmaW5l
IEFWUl9JU0FfTTgzICAoQVZSX0lTQV8yeHh4IHwgQVZSX0lTQV9NVUwgfCBBVlJfSVNBX0xQTVgg
fCBBVlJfSVNBX1NQTSkKICAjZGVmaW5lIEFWUl9JU0FfTTYwMyAoQVZSX0lTQV8yeHh4IHwgQVZS
X0lTQV9NRUdBKQogICNkZWZpbmUgQVZSX0lTQV9NMTAzIChBVlJfSVNBX002MDMgfCBBVlJfSVNB
X0VMUE0pCisgI2RlZmluZSBBVlJfSVNBX00xMjggKEFWUl9JU0FfTTYwMyB8IEFWUl9JU0FfTVVM
IHwgQVZSX0lTQV9MUE1YIHwgQVZSX0lTQV9FTFBNWCApCiAgI2RlZmluZSBBVlJfSVNBX00xNjEg
KEFWUl9JU0FfTTYwMyB8IEFWUl9JU0FfTVVMIHwgQVZSX0lTQV9MUE1YIHwgQVZSX0lTQV9TUE0p
CiAgI2RlZmluZSBBVlJfSVNBXzk0SyAgKEFWUl9JU0FfTTYwMyB8IEFWUl9JU0FfTVVMIHwgQVZS
X0lTQV9MUE1YKQoKZGlmZiAtcmMzUCBiaW51dGlscy0yLjExLjIvbGQvTWFrZWZpbGUuYW0gYmlu
dXRpbHMtMi4xMS4yLXBhdGNoLTAuMS9sZC9NYWtlZmlsZS5hbQoqKiogYmludXRpbHMtMi4xMS4y
L2xkL01ha2VmaWxlLmFtCU1vbiBKdW4gMTEgMjA6MDU6MDcgMjAwMQotLS0gYmludXRpbHMtMi4x
MS4yLXBhdGNoLTAuMS9sZC9NYWtlZmlsZS5hbQlXZWQgTm92ICA3IDEzOjQzOjE1IDIwMDEKKioq
KioqKioqKioqKioqCioqKiAxMTksMTI0ICoqKioKLS0tIDExOSwxMjUgLS0tLQogIAllYXZyNDR4
NC5vIFwKICAJZWF2cjg1eHgubyBcCiAgCWVhdnJtZWdhMTAzLm8gXAorIAllYXZybWVnYTEyOC5v
IFwKICAJZWF2cm1lZ2ExNjEubyBcCiAgCWVhdnJtZWdhNjAzLm8gXAogIAllY29mZl9zcGFyYy5v
IFwKKioqKioqKioqKioqKioqCioqKiAzODAsMzg1ICoqKioKLS0tIDM4MSwzOTAgLS0tLQogICAg
JChzcmNkaXIpL2VtdWx0ZW1wbC9nZW5lcmljLmVtICQoc3JjZGlyKS9zY3JpcHR0ZW1wbC9lbGYz
MmF2ci5zYyBcCiAgICAke0dFTl9ERVBFTkRTfQogIAkke0dFTlNDUklQVFN9IGF2cm1lZ2ExMDMg
IiQodGRpcl9hdnI4NXh4KSIKKyBlYXZybWVnYTEyOC5jOiAkKHNyY2RpcikvZW11bHBhcmFtcy9h
dnJtZWdhMTI4LnNoIFwKKyAgICQoc3JjZGlyKS9lbXVsdGVtcGwvZ2VuZXJpYy5lbSAkKHNyY2Rp
cikvc2NyaXB0dGVtcGwvZWxmMzJhdnIuc2MgXAorICAgJHtHRU5fREVQRU5EU30KKyAJJHtHRU5T
Q1JJUFRTfSBhdnJtZWdhMTI4ICIkKHRkaXJfYXZyODV4eCkiCiAgZWF2cm1lZ2ExNjEuYzogJChz
cmNkaXIpL2VtdWxwYXJhbXMvYXZybWVnYTE2MS5zaCBcCiAgICAkKHNyY2RpcikvZW11bHRlbXBs
L2dlbmVyaWMuZW0gJChzcmNkaXIpL3NjcmlwdHRlbXBsL2VsZjMyYXZyLnNjIFwKICAgICR7R0VO
X0RFUEVORFN9CmRpZmYgLXJjM1AgYmludXRpbHMtMi4xMS4yL2xkL01ha2VmaWxlLmluIGJpbnV0
aWxzLTIuMTEuMi1wYXRjaC0wLjEvbGQvTWFrZWZpbGUuaW4KKioqIGJpbnV0aWxzLTIuMTEuMi9s
ZC9NYWtlZmlsZS5pbglNb24gSnVuIDExIDIwOjA1OjA3IDIwMDEKLS0tIGJpbnV0aWxzLTIuMTEu
Mi1wYXRjaC0wLjEvbGQvTWFrZWZpbGUuaW4JV2VkIE5vdiAgNyAxMzo0Mzo0OCAyMDAxCioqKioq
KioqKioqKioqKgoqKiogMjI3LDIzMiAqKioqCi0tLSAyMjcsMjMzIC0tLS0KICAJZWF2cjQ0eDQu
byBcCiAgCWVhdnI4NXh4Lm8gXAogIAllYXZybWVnYTEwMy5vIFwKKyAJZWF2cm1lZ2ExMjgubyBc
CiAgCWVhdnJtZWdhMTYxLm8gXAogIAllYXZybWVnYTYwMy5vIFwKICAJZWNvZmZfc3BhcmMubyBc
CioqKioqKioqKioqKioqKgoqKiogMTA5NCwxMDk5ICoqKioKLS0tIDEwOTUsMTEwNCAtLS0tCiAg
ICAkKHNyY2RpcikvZW11bHRlbXBsL2dlbmVyaWMuZW0gJChzcmNkaXIpL3NjcmlwdHRlbXBsL2Vs
ZjMyYXZyLnNjIFwKICAgICR7R0VOX0RFUEVORFN9CiAgCSR7R0VOU0NSSVBUU30gYXZybWVnYTEw
MyAiJCh0ZGlyX2F2cjg1eHgpIgorIGVhdnJtZWdhMTI4LmM6ICQoc3JjZGlyKS9lbXVscGFyYW1z
L2F2cm1lZ2ExMjguc2ggXAorICAgJChzcmNkaXIpL2VtdWx0ZW1wbC9nZW5lcmljLmVtICQoc3Jj
ZGlyKS9zY3JpcHR0ZW1wbC9lbGYzMmF2ci5zYyBcCisgICAke0dFTl9ERVBFTkRTfQorIAkke0dF
TlNDUklQVFN9IGF2cm1lZ2ExMjggIiQodGRpcl9hdnI4NXh4KSIKICBlYXZybWVnYTE2MS5jOiAk
KHNyY2RpcikvZW11bHBhcmFtcy9hdnJtZWdhMTYxLnNoIFwKICAgICQoc3JjZGlyKS9lbXVsdGVt
cGwvZ2VuZXJpYy5lbSAkKHNyY2Rpcikvc2NyaXB0dGVtcGwvZWxmMzJhdnIuc2MgXAogICAgJHtH
RU5fREVQRU5EU30KZGlmZiAtcmMzUCBiaW51dGlscy0yLjExLjIvbGQvY29uZmlndXJlLnRndCBi
aW51dGlscy0yLjExLjItcGF0Y2gtMC4xL2xkL2NvbmZpZ3VyZS50Z3QKKioqIGJpbnV0aWxzLTIu
MTEuMi9sZC9jb25maWd1cmUudGd0CU1vbiBKdW4gMTEgMjA6MDU6MDggMjAwMQotLS0gYmludXRp
bHMtMi4xMS4yLXBhdGNoLTAuMS9sZC9jb25maWd1cmUudGd0CVdlZCBOb3YgIDcgMTM6NDQ6MTcg
MjAwMQoqKioqKioqKioqKioqKioKKioqIDIyLDI4ICoqKioKICAJCQl0YXJnX2V4dHJhX29maWxl
cz0iZGVmZmlsZXAubyBwZS1kbGwubyIgOzsKICBhcmMtKi1lbGYqKQkJdGFyZ19lbXVsPWFyY2Vs
ZiA7OwogIGF2ci0qLSopCQl0YXJnX2VtdWw9YXZyODV4eAohIAkJCXRhcmdfZXh0cmFfZW11bHM9
ImF2cjEyMDAgYXZyMjN4eCBhdnI0NHg0IGF2cjQ0MzMgYXZybWVnYTYwMyBhdnJtZWdhMTAzIGF2
cm1lZ2ExNjEiIDs7CiAgY3Jpcy0qLSphb3V0KikJCXRhcmdfZW11bD1jcmlzYW91dAogIAkJCXRh
cmdfZXh0cmFfZW11bHM9ImNyaXNlbGYgY3Jpc2xpbnV4IgogIAkJCXRhcmdfZXh0cmFfbGlicGF0
aD0kdGFyZ19leHRyYV9lbXVscyA7OwotLS0gMjIsMjggLS0tLQogIAkJCXRhcmdfZXh0cmFfb2Zp
bGVzPSJkZWZmaWxlcC5vIHBlLWRsbC5vIiA7OwogIGFyYy0qLWVsZiopCQl0YXJnX2VtdWw9YXJj
ZWxmIDs7CiAgYXZyLSotKikJCXRhcmdfZW11bD1hdnI4NXh4CiEgCQkJdGFyZ19leHRyYV9lbXVs
cz0iYXZyMTIwMCBhdnIyM3h4IGF2cjQ0eDQgYXZyNDQzMyBhdnJtZWdhNjAzIGF2cm1lZ2ExMDMg
YXZybWVnYTEyOCBhdnJtZWdhMTYxIiA7OwogIGNyaXMtKi0qYW91dCopCQl0YXJnX2VtdWw9Y3Jp
c2FvdXQKICAJCQl0YXJnX2V4dHJhX2VtdWxzPSJjcmlzZWxmIGNyaXNsaW51eCIKICAJCQl0YXJn
X2V4dHJhX2xpYnBhdGg9JHRhcmdfZXh0cmFfZW11bHMgOzsKZGlmZiAtcmMzUCBiaW51dGlscy0y
LjExLjIvbGQvZW11bHBhcmFtcy9hdnIxMjAwLnNoIGJpbnV0aWxzLTIuMTEuMi1wYXRjaC0wLjEv
bGQvZW11bHBhcmFtcy9hdnIxMjAwLnNoCioqKiBiaW51dGlscy0yLjExLjIvbGQvZW11bHBhcmFt
cy9hdnIxMjAwLnNoCVN1biBNYXkgMjggMDE6MzY6NTggMjAwMAotLS0gYmludXRpbHMtMi4xMS4y
LXBhdGNoLTAuMS9sZC9lbXVscGFyYW1zL2F2cjEyMDAuc2gJU3VuIE5vdiAxMSAwODo1Nzo0MiAy
MDAxCioqKioqKioqKioqKioqKgoqKiogNywxMiAqKioqCi0tLSA3LDEzIC0tLS0KICBURU1QTEFU
RV9OQU1FPWdlbmVyaWMKCiAgVEVYVF9MRU5HVEg9MUsKKyBEQVRBX1NUQVJUPTB4NjAKICBEQVRB
X0xFTkdUSD0wCiAgRUVQUk9NX0xFTkdUSD02NAogIFNUQUNLPTAKZGlmZiAtcmMzUCBiaW51dGls
cy0yLjExLjIvbGQvZW11bHBhcmFtcy9hdnIyM3h4LnNoIGJpbnV0aWxzLTIuMTEuMi1wYXRjaC0w
LjEvbGQvZW11bHBhcmFtcy9hdnIyM3h4LnNoCioqKiBiaW51dGlscy0yLjExLjIvbGQvZW11bHBh
cmFtcy9hdnIyM3h4LnNoCVN1biBNYXkgMjggMDE6MzY6NTggMjAwMAotLS0gYmludXRpbHMtMi4x
MS4yLXBhdGNoLTAuMS9sZC9lbXVscGFyYW1zL2F2cjIzeHguc2gJU3VuIE5vdiAxMSAwODo1Nzo1
MSAyMDAxCioqKioqKioqKioqKioqKgoqKiogNywxMiAqKioqCi0tLSA3LDEzIC0tLS0KICBURU1Q
TEFURV9OQU1FPWdlbmVyaWMKCiAgVEVYVF9MRU5HVEg9MksKKyBEQVRBX1NUQVJUPTB4NjAKICBE
QVRBX0xFTkdUSD0xMjgKICBFRVBST01fTEVOR1RIPTEyOAogIFNUQUNLPTB4MERGCmRpZmYgLXJj
M1AgYmludXRpbHMtMi4xMS4yL2xkL2VtdWxwYXJhbXMvYXZyNDQzMy5zaCBiaW51dGlscy0yLjEx
LjItcGF0Y2gtMC4xL2xkL2VtdWxwYXJhbXMvYXZyNDQzMy5zaAoqKiogYmludXRpbHMtMi4xMS4y
L2xkL2VtdWxwYXJhbXMvYXZyNDQzMy5zaAlTdW4gTWF5IDI4IDAxOjM2OjU4IDIwMDAKLS0tIGJp
bnV0aWxzLTIuMTEuMi1wYXRjaC0wLjEvbGQvZW11bHBhcmFtcy9hdnI0NDMzLnNoCVN1biBOb3Yg
MTEgMDg6NTg6MDAgMjAwMQoqKioqKioqKioqKioqKioKKioqIDcsMTIgKioqKgotLS0gNywxMyAt
LS0tCiAgVEVNUExBVEVfTkFNRT1nZW5lcmljCgogIFRFWFRfTEVOR1RIPTRLCisgREFUQV9TVEFS
VD0weDYwCiAgREFUQV9MRU5HVEg9MTI4CiAgRUVQUk9NX0xFTkdUSD0yNTYKICBTVEFDSz0weDBE
RgpkaWZmIC1yYzNQIGJpbnV0aWxzLTIuMTEuMi9sZC9lbXVscGFyYW1zL2F2cjQ0eDQuc2ggYmlu
dXRpbHMtMi4xMS4yLXBhdGNoLTAuMS9sZC9lbXVscGFyYW1zL2F2cjQ0eDQuc2gKKioqIGJpbnV0
aWxzLTIuMTEuMi9sZC9lbXVscGFyYW1zL2F2cjQ0eDQuc2gJU3VuIE1heSAyOCAwMTozNjo1OCAy
MDAwCi0tLSBiaW51dGlscy0yLjExLjItcGF0Y2gtMC4xL2xkL2VtdWxwYXJhbXMvYXZyNDR4NC5z
aAlTdW4gTm92IDExIDA4OjU4OjEwIDIwMDEKKioqKioqKioqKioqKioqCioqKiA3LDEyICoqKioK
LS0tIDcsMTMgLS0tLQogIFRFTVBMQVRFX05BTUU9Z2VuZXJpYwoKICBURVhUX0xFTkdUSD00Swor
IERBVEFfU1RBUlQ9MHg2MAogIERBVEFfTEVOR1RIPTI1NgogIEVFUFJPTV9MRU5HVEg9MjU2CiAg
U1RBQ0s9MHgxNUYKZGlmZiAtcmMzUCBiaW51dGlscy0yLjExLjIvbGQvZW11bHBhcmFtcy9hdnI4
NXh4LnNoIGJpbnV0aWxzLTIuMTEuMi1wYXRjaC0wLjEvbGQvZW11bHBhcmFtcy9hdnI4NXh4LnNo
CioqKiBiaW51dGlscy0yLjExLjIvbGQvZW11bHBhcmFtcy9hdnI4NXh4LnNoCVN1biBNYXkgMjgg
MDE6MzY6NTggMjAwMAotLS0gYmludXRpbHMtMi4xMS4yLXBhdGNoLTAuMS9sZC9lbXVscGFyYW1z
L2F2cjg1eHguc2gJU3VuIE5vdiAxMSAwODo1ODoxNiAyMDAxCioqKioqKioqKioqKioqKgoqKiog
NywxMiAqKioqCi0tLSA3LDEzIC0tLS0KICBURU1QTEFURV9OQU1FPWdlbmVyaWMKCiAgVEVYVF9M
RU5HVEg9OEsKKyBEQVRBX1NUQVJUPTB4NjAKICBEQVRBX0xFTkdUSD01MTIKICBFRVBST01fTEVO
R1RIPTUxMgogIFNUQUNLPTB4MjVGCmRpZmYgLXJjM1AgYmludXRpbHMtMi4xMS4yL2xkL2VtdWxw
YXJhbXMvYXZybWVnYTEwMy5zaCBiaW51dGlscy0yLjExLjItcGF0Y2gtMC4xL2xkL2VtdWxwYXJh
bXMvYXZybWVnYTEwMy5zaAoqKiogYmludXRpbHMtMi4xMS4yL2xkL2VtdWxwYXJhbXMvYXZybWVn
YTEwMy5zaAlTdW4gTWF5IDI4IDAxOjM2OjU4IDIwMDAKLS0tIGJpbnV0aWxzLTIuMTEuMi1wYXRj
aC0wLjEvbGQvZW11bHBhcmFtcy9hdnJtZWdhMTAzLnNoCVN1biBOb3YgMTEgMDg6NTg6MjQgMjAw
MQoqKioqKioqKioqKioqKioKKioqIDcsMTIgKioqKgotLS0gNywxMyAtLS0tCiAgVEVNUExBVEVf
TkFNRT1nZW5lcmljCgogIFRFWFRfTEVOR1RIPTEyOEsKKyBEQVRBX1NUQVJUPTB4NjAKICBEQVRB
X0xFTkdUSD00MDAwCiAgRUVQUk9NX0xFTkdUSD00SwogIFNUQUNLPTB4MEZGRgpkaWZmIC1yYzNQ
IGJpbnV0aWxzLTIuMTEuMi9sZC9lbXVscGFyYW1zL2F2cm1lZ2ExMjguc2ggYmludXRpbHMtMi4x
MS4yLXBhdGNoLTAuMS9sZC9lbXVscGFyYW1zL2F2cm1lZ2ExMjguc2gKKioqIGJpbnV0aWxzLTIu
MTEuMi9sZC9lbXVscGFyYW1zL2F2cm1lZ2ExMjguc2gJVGh1IEphbiAgMSAxMDowMDowMCAxOTcw
Ci0tLSBiaW51dGlscy0yLjExLjItcGF0Y2gtMC4xL2xkL2VtdWxwYXJhbXMvYXZybWVnYTEyOC5z
aAlTdW4gTm92IDExIDA5OjAwOjQ0IDIwMDEKKioqKioqKioqKioqKioqCioqKiAwICoqKioKLS0t
IDEsMTMgLS0tLQorIEFSQ0g9YXZyOjUKKyBNQUNISU5FPQorIFNDUklQVF9OQU1FPWVsZjMyYXZy
CisgT1VUUFVUX0ZPUk1BVD0iZWxmMzItYXZyIgorIE1BWFBBR0VTSVpFPTEKKyBFTUJFRERFRD15
ZXMKKyBURU1QTEFURV9OQU1FPWdlbmVyaWMKKworIFRFWFRfTEVOR1RIPTEyOEsKKyBEQVRBX1NU
QVJUPTB4MTAwCisgREFUQV9MRU5HVEg9NDA5NgorIEVFUFJPTV9MRU5HVEg9NEsKKyBTVEFDSz0w
eDEwRkYKZGlmZiAtcmMzUCBiaW51dGlscy0yLjExLjIvbGQvZW11bHBhcmFtcy9hdnJtZWdhMTYx
LnNoIGJpbnV0aWxzLTIuMTEuMi1wYXRjaC0wLjEvbGQvZW11bHBhcmFtcy9hdnJtZWdhMTYxLnNo
CioqKiBiaW51dGlscy0yLjExLjIvbGQvZW11bHBhcmFtcy9hdnJtZWdhMTYxLnNoCVR1ZSBKdW4g
MjcgMTE6NDU6MzAgMjAwMAotLS0gYmludXRpbHMtMi4xMS4yLXBhdGNoLTAuMS9sZC9lbXVscGFy
YW1zL2F2cm1lZ2ExNjEuc2gJU3VuIE5vdiAxMSAwOTowMDo1MCAyMDAxCioqKioqKioqKioqKioq
KgoqKiogNywxMiAqKioqCi0tLSA3LDEzIC0tLS0KICBURU1QTEFURV9OQU1FPWdlbmVyaWMKCiAg
VEVYVF9MRU5HVEg9MTZLCisgREFUQV9TVEFSVD0weDYwCiAgREFUQV9MRU5HVEg9MUsKICBFRVBS
T01fTEVOR1RIPTUxMgogIFNUQUNLPTB4NDVGCmRpZmYgLXJjM1AgYmludXRpbHMtMi4xMS4yL2xk
L2VtdWxwYXJhbXMvYXZybWVnYTYwMy5zaCBiaW51dGlscy0yLjExLjItcGF0Y2gtMC4xL2xkL2Vt
dWxwYXJhbXMvYXZybWVnYTYwMy5zaAoqKiogYmludXRpbHMtMi4xMS4yL2xkL2VtdWxwYXJhbXMv
YXZybWVnYTYwMy5zaAlTdW4gTWF5IDI4IDAxOjM2OjU4IDIwMDAKLS0tIGJpbnV0aWxzLTIuMTEu
Mi1wYXRjaC0wLjEvbGQvZW11bHBhcmFtcy9hdnJtZWdhNjAzLnNoCVN1biBOb3YgMTEgMDk6MDE6
MDEgMjAwMQoqKioqKioqKioqKioqKioKKioqIDcsMTIgKioqKgotLS0gNywxMyAtLS0tCiAgVEVN
UExBVEVfTkFNRT1nZW5lcmljCgogIFRFWFRfTEVOR1RIPTY0SworIERBVEFfU1RBUlQ9MHg2MAog
IERBVEFfTEVOR1RIPTQwMDAKICBFRVBST01fTEVOR1RIPTJLCiAgU1RBQ0s9MHgwRkZGCmRpZmYg
LXJjM1AgYmludXRpbHMtMi4xMS4yL2xkL3NjcmlwdHRlbXBsL2VsZjMyYXZyLnNjIGJpbnV0aWxz
LTIuMTEuMi1wYXRjaC0wLjEvbGQvc2NyaXB0dGVtcGwvZWxmMzJhdnIuc2MKKioqIGJpbnV0aWxz
LTIuMTEuMi9sZC9zY3JpcHR0ZW1wbC9lbGYzMmF2ci5zYwlUdWUgTm92IDE0IDA5OjI2OjM4IDIw
MDAKLS0tIGJpbnV0aWxzLTIuMTEuMi1wYXRjaC0wLjEvbGQvc2NyaXB0dGVtcGwvZWxmMzJhdnIu
c2MJU3VuIE5vdiAxMSAwOTo1NTowNyAyMDAxCioqKioqKioqKioqKioqKgoqKiogNSwxMSAqKioq
CiAgTUVNT1JZCiAgewogICAgdGV4dCAgIChyeCkgICA6IE9SSUdJTiA9IDAsICAgIExFTkdUSCA9
ICRURVhUX0xFTkdUSAohICAgZGF0YSAgIChydyF4KSA6IE9SSUdJTiA9IDB4ODAwMDYwLCBMRU5H
VEggPSAkREFUQV9MRU5HVEgKICAgIGVlcHJvbSAocncheCkgOiBPUklHSU4gPSAweDgxMDAwMCwg
TEVOR1RIID0gJEVFUFJPTV9MRU5HVEgKICB9CgotLS0gNSwxMSAtLS0tCiAgTUVNT1JZCiAgewog
ICAgdGV4dCAgIChyeCkgICA6IE9SSUdJTiA9IDAsICAgIExFTkdUSCA9ICRURVhUX0xFTkdUSAoh
ICAgZGF0YSAgIChydyF4KSA6IE9SSUdJTiA9ICgweDgwMDAwMCArICREQVRBX1NUQVJUKSwgTEVO
R1RIID0gJERBVEFfTEVOR1RICiAgICBlZXByb20gKHJ3IXgpIDogT1JJR0lOID0gMHg4MTAwMDAs
IExFTkdUSCA9ICRFRVBST01fTEVOR1RICiAgfQoKKioqKioqKioqKioqKioqCioqKiAxMDEsMTA2
ICoqKioKLS0tIDEwMSwxMDcgLS0tLQogICAgICAqKC5ic3MpCiAgICAgICooQ09NTU9OKQogICAg
ICAke1JFTE9DQVRJTkcrIFBST1ZJREUgKF9fYnNzX2VuZCA9IC4pIDsgfQorICAgICAke1JFTE9D
QVRJTkcrIFBST1ZJREUgKGVuZCA9IC4pO30KICAgICAgJHtSRUxPQ0FUSU5HKyBfZW5kID0gLiA7
ICB9CiAgICB9ICR7UkVMT0NBVElORysgPiBkYXRhfQoK

--------------Boundary-00=_97W2UJZ67BCD04R9DO6X--
avr-gcc-list at http://avr1.org

From [email-masked] Sat Jan 19 10:22:17 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16RgSk-0003RZ-00
for <avrgcclist@localhost>; Sat, 19 Jan 2002 10:22:14 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sat, 19 Jan 2002 10:22:14 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0HLaBn16259
for <[email-masked]>; Thu, 17 Jan 2002 15:36:11 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0HJa3826930
for avr-gcc-list-list.japetos; Thu, 17 Jan 2002 13:36:03 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0HJa2B26927
for <[email-masked]>; Thu, 17 Jan 2002 13:36:02 -0600
Received: from mail.intekom.com (mid-mail-02.intekom.com [196.25.69.45])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g0HJZpL00967
for <[email-masked]>; Thu, 17 Jan 2002 13:35:51 -0600
Received: (qmail 30371 invoked from network); 17 Jan 2002 19:32:48 -0000
Received: from bnb53-01-p33.nt.saix.net (HELO scorpio) ([155.239.180.33]) (envelope-sender <[email-masked]>)
by intekom.com (qmail-ldap-1.03) with SMTP
for <[email-masked]>; 17 Jan 2002 19:32:48 -0000
X-vSMTP: intekom.com
From: "Anton Erasmus" <[email-masked]>
Organization: Home
To: [email-masked]
Date: Thu, 17 Jan 2002 21:33:28 +0200
MIME-Version: 1.0
Content-type: Multipart/Mixed; boundary=Message-Boundary-31982
X-finfo: DOS,"atmega128_patch.zip",,,,ZIP-archive
Subject: [avr-gcc-list] Patch for Win32 build of avr-gcc to support ATMega128
CC: [email-masked], [email-masked],
[email-masked], [email-masked]
Message-ID: <3C474328.4121.873311@localhost>
In-reply-to: <[email-masked]>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

--Message-Boundary-31982
Content-type: text/plain; charset=US-ASCII
Content-disposition: inline
Content-description: Attachment information.

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

---- File information -----------
File: atmega128_patch.zip
Date: 17 Jan 2002, 21:12
Size: 9322 bytes.
Type: ZIP-archive

--Message-Boundary-31982
Content-type: Application/ZIP; name="atmega128_patch.zip"
Content-disposition: attachment; filename="atmega128_patch.zip"
Content-transfer-encoding: BASE64

UEsDBBQAAgAIAE5nKyz2uoAo4wEAAKsDAAAFAAAAbWFrZTGNk1Fv2jAQx59B4jucRB9AwgE2
ddqm8UDTlkVKYIKuk/Z2cRxwsePINhT26XcOHd3DutYPUe5897u/7+wuzOKYTe+X4DxWBdoC
MtyKUioBNVoP4067C/dGbYWFhd/AePhuNBoFZ2YKWUpRQH4EApRW4NZFlfBQGgtOG+M3lCQr
L9YW3YOp4FESIRRb+V0hTQS90YfAG/c7bUI2CwqqXglwRgvYo5WYK+EgR0eliEHQBhEcJJGA
soKLHrn6cCJ0O+1WHLcmgHvL1pyTOV09m8AOgM4JTVzLgiTG67pFUcuMoqwGVgZjTobe099V
Mn/KNvkDN/WRfKvk582T08lfgjzJPL5OluSLyEiTq5NxEjakuKGSeUj8epOmAHDeymU1dJtI
HMS5A2bn613TRo0eOFaQUz+s4AOQG3GAHuFICkgHqB7x6IBT870o/u7A7WKZTe+oTkj8g/7X
Cg3HnfKg+Q78sRbwcuwJncXfiYv+08h9vBxfvgg/k7nRNd0oC6XCtfsPP0zu2206nYV5sTWw
xXtgP1Ap+jpvJfestsabINOFnQHDjdJuctH78jnik0g5339dz3n8rwlqrk6jhw7clFvTO8nd
m/qpZLV9U4n0+rmEGrAMazrP3XLWjzTWA8ZounQjfwNQSwMEFAACAAgA+bowLJJ/zxvbAgAA
ZQYAAAUAAABtYWtlMo1U3W/aMBB/LhL/w4mClGxNSvswaVGZStMPMZUyha4PezOOAyGJHdmG
rvvrd3YIpAyqPUB8Z9/9fvd5Cg9h6A1fIlCa8JjIGMYkY0maMyiJ1HDZbp3Ci8gzJmGiF3Bx
ftnv941yLOI0SVkMszdAB4lkJFM+ZxoSIUEVQugFGqVcs7kkaik4vKbowYBN9SpOhQ9O/4vx
d+G2W+gyRlzOgOQ5lFIsGdWgSkYRhYKYWdkQU+3WyeTm+8kAus5wGoWBrwa+cFGyAjUCPgl/
3D8OH6bweQBeUdDVoOuMw5/mZjg9dvN4e+QG2elFqqCiqABDA5IWCkRizwUmzZCmTCE9jCA4
6TrP0YPrI3HYHFme1Ecpiq2WlfVRZMiB0YWwRcA/adL+Db2bg2GBPKgoSsxCgJlVWq6oTgVH
QgIoVkAjLaVYMcvREAt6jqVopg4SgxyCEitJWbvVExBAjyJs1wlDFzyKXDaZQ2nUdUZP4e0o
wuxegSege2049NSe1fR/rJB7ze0o+QbXiuoumk3pK8bKYg+nG8abin6Inac8O4prSiNWulw1
sd/3XA/fBIiFrefuIl+DxwXOjtRVflEdPbubZ/h5HN3Yz21NsGZ0WpdrLU2L7FD3qJiIZ0sM
GfUW9mb0hG4mtaEXgWkh21BXe75nKQcnXbDfZ6Ako+6HKKg9gNJ17ifReIghHQLqoeIfo+X2
necppvFn0+0lOZnjpFZ3gw4OiaBnuSBxBx/SBeFztn2bF6T2Mui/57GLcpTYXVHtGaVZqWAz
HCAyM5Yc7DB17qQUUgXABWcdHy2fmBlUIt/srtptJNMRKx4zabchuiAa2JrJNxx+PodXxjW6
9k1NsgBDvj7g31Kz+6DRa8ZxzHKGRalqE9dtRXNGeGDTF43dZn9VYr3T1CFlrnRTbZdIQcp9
VV2fhgpbZ19Fvvb3Vdg6qNpqP/kzkjWkXMzttUr/sCqE6ejX3R5su/UXUEsDBBQAAgAIABCp
MSx8nU+5DwAAAA0AAAAGAAAAbWFya2Vy803MTlXwTSzKTi3i5QIAUEsDBBQAAgAIAACpMSzh
ULL3MwIAACQEAAAFAAAAbWsxMjiFU8Fu4jAQPYPEP4wEB5CStIBYlWpzYKm2qgTtCtj2iIwz
JF4cO7LNtvx9x26gqEi7vsRJ5r0Zv/fchqUoK4kwZzvcComtZhuetdyhgSdXQJf3oD8ej1vN
VlMoLvcZQqc7eV70rurXq5KQff+//bmAF0zlCK4QFqRQaIFxrk0mVA5Ow0HvDVRG/0HuoH2x
Alu1d4RHUKxE0Nuwd8zk6KDkeyjQIHSZG1/bm1F/FEG9HYatE+owGPhdiTn7dj0EdDzptZrg
13z6G1Jgf83of528JHWrV+EKTZX45lBZoRWxNVaL+0YKZX9w49C6E1s43xQsPXiQ1QYSAiwX
UwJ0ugTsJfwEYFkmHHEyCcxaLDeSDPiAf85A8Anh/QnSgDxDSbExzAgvtMpAb4KyH51Jb7Jg
R+jZw49LZO1jqOO6rEIIGg+PNGcotRVysRWYATe1IDUjdB+1gxdtdt7WAzqvyHSxIm2p1IuS
6EBR0xrYSpZbX/Tr52xyvyQlIM4hfhpC/MKkhPhuvaZwrScrbxsRrNf0xzojuIspL067Q0Wj
UnUUs0KWNu10v98mPE2k9e390U76HbtNlqEbjRXn1rGNDXX+BGdFs7tjEbHLKJ6zKq1tKlkV
xTE3uI0gXsnMciMql7x9DT25DpYyIjNQJIxC0syLerwLZKWWUr96tfylgC+h/8cFG9CEjWM3
yLBClZEtaCMfHfL8cPyo/NcwSugfsnt5w6hbfThNabo9BRLOV7kjB1rNd1BLAwQUAAIACAAO
cCgs2Ji4wPYEAAA1CgAACQAAAG1rMTI4X2NydJVWa2/bNhT9PAP+D7dtgFmYZcdxk2ZdA8xN
Hwtmt0HctPlQzKApyuYiiQJJxfUK//edS8l5NB3SAQkskfdx7utcPaGLi4vn5Jfa0URcqlRn
ivDsjSFp8jLTUniVdEkUCRXGU2msF/NMtVtPqGOKbE1eOUjQSvslvX13TjnM0LD37FnUIzrx
RG5pqiyhuSKrVlZ7r4qgrVyppBYZ21gqkpWP4SUuBexRXmVeZ3pOrirZZ9RjnZcK2pbWynep
copE5Y00RRrg8UtwHuN1TUuVlRzKSmWIRD1qt9jCCS3ElaKqJG/XulggUiDWhcc/mULdZMEv
haeVsZcO5zQ3fsn6K10M94I7q0RGplRWeLbj1oCdO/otgv8yUwLwrkxWFV4BsU5ZeW0qkqKg
xATrXUqNRVZXW/m/K+dDXArJhNY1FmNZffsa1yASVaoiYd/AB9OW3k+R8qmxdv2IKJ5MaG93
dxDvHsSDgzr6NycXk9dcbmWRPPxfwjuCqxaOEH9og9p43vjqklPIcMLaj/nwMaVCZ46EI4e0
UqKtkt5YrVywyE1iVW6uVNJjpx9fn9FRADIY7DUwdOE86o7EAXlp4egLdZzyNQCdhkQlpvjZ
b0VpjoIi61G7RVuNI9rpjD6ehaPRy+np6MMf12d9tE5fXNkYvzLe6QBF1HdW9msAhQByk5IX
dgG3wsql9gijQgAdFCAJleHOMjZnaWQZfhrxI4JlNlQDmeGNHX+tXzf9na+14KbdmmtU6PYt
C2/6OG63dCGzKlHfu2+u2i3A/949jtk/AqpvQ6aPj4Nc4zteSNlujabfnlH8BbVzKscQ25in
NpZlCcmzO5LCclrPJji0OT9OXoXkumqOHu13P3fzS/a983vI/8m76YfReHxL5HO335UlxVcU
p7TzV8QIR9M349FbhhR/Et14gdLOHYDfOkWp40/4c95q6ePSGm/8ukRzxe/3KF7U9Qtj7rha
KxUmKkWeiUdgqUSCyeHWddThZmRuaboIdcWIuxrLeDzb4vkFrk8APKQz6vd62wLcPkZyGvlN
rX38/5SPt7ocQEN9lGYCo8fNlug0xVQWHnHN47oMjkVN6XWu/1FBCnohCBp9yNVCUCcz3nEn
w5BbdjHJ0M/MStnovi4/QPXF0eGfNDk+b/IjwT2WVsx2GL55YNjnyPYQrIOfOlswNHOlkGom
a8gIOpdIKVcoM4sqFMhtBQHyluD7IZtA4+7NhNueIps3FdjAWi6rI+F/3XWH+4P9RlzelT6+
KwwJXHwLbRN0hw+74gQOdoeN+EOuhteuboKrXT39MVeHw0b6IU9P/zOo/R8M6mDQiD/kav/7
QXHrnGMNBcKnRVEdDR7zogwrN0N/FKBubNErZR0oPDRgWAZpVUgm9dC4nTk2EVoRZGpNHr4N
mI0j9JqWS8zwmr8J6obD3jpnsvUVTKts3WUDPLkrEb4O1mG34GtEFczOnfHb03G0NcEfK1bV
jMGw0npdYuvnyoYxY+CdZq+EmPiA+R8eMiMvaa696/V6USBSnSYq5bCZ2RxYBWXAEHMew6HK
nLp/NXdYkryQ00DNt+7AEGkZvmV8Uv9Y3tpl3jzk2smawj9eLzGRJM2au6GWLj/f2I3CZLZb
0vp8sHfYM89pgedBb9pu/cRktWHWOT29X3SKX81mWJOzmkWgPJvdayjJq7Req9HOC4oNuL52
+C9QSwMEFAACAAgAC6kxLNHo71oQAAAADgAAAAYAAABjYy5iYXTLTcxOVdBNy802NLLg5QIA
UEsDBBQAAgAIAIyoMSzfjtnQdwIAABQGAAAKAAAAbTEyOHRlc3QuY61UUW/aMBB+R+I/nKhU
JYiVpMBUqQ1SCpQhNVsVUlppnSJD3GA1cZDjjNC1++2znaRlMG17wH7I5fPdd6fPdz4idBFl
AYaLlAcRmZ8s+/Xa0TZIkj2MERoqcBve8yOUY8ayFS9dF0vEIJzQx+TrN/B9xAXPPOPY90HT
ViwJYxzrOlggDr2JMxJ4Q2zfH9qe+DmvGEZYOMdDxNEuj6aleMFJQkFrnGDl1tAVZcPDKW+c
yzLaTZghRtA8wkAojHJRJUURuLYD2qVgw2wDl2jxhAMdmu16LaMpCSkOIEpoCKGDQrKYiYC/
5J4jzpDKrVIeBfiRUAyOPZ4M/Jl9DcUy8p5tXBlXPfv2WvrJ/T0hAXBRrSYtGa+QEZUF34si
3/BqC50hRoQWB/Xaj3oN4K1opRmPVyoAtnn0EhKHFqErbTh0xxJTyIulmRcXHf1FfroFnGR8
pYmzVuEJIKR00BOGm4Tx8UkHEA1Ku6ucM54qBd9z3Hxxvf0k1f+x9fNP6cogle9m3BHXORsM
WsLsCnP8eahyyIj1kkRYM3VpKxWgULLgey2cGOYZo5ohwddK8whxovqBQ97atJ5LedvNA6yH
eq0JB1jNgme6TNZgezEOkXl6Bp8QC9aIYYiziJNVtPlfnkPU83AIfdp7TV/2cG6ZPXVzG6vb
K6xnK29uqosT7WDAhz50VANUQ3ZnTzx/6ok3A+D0HZ66d6Yhqv74NmS7I/WPyala2BncDtyd
Fp66IzEp2nvqYyM3TF0eiKw77fw7geK8dwauvcd5fSpJt1j7fVPfZjZ3mEsaNSjicTkzDKWP
kV+JBSnmwJNtfdaIcEg5EsorCctx+AVQSwMEFAACAAgAzXkoLLQEwaosCAAA0TMAAAoAAABp
b21hY3Jvcy5o7Vttc9pGEP7emfyHLR1nJFe2oR8ymdRuizGOmbGNB0gaz2RGI6TDXCPp1JMw
IW3627t3J2EBJyGDU6dJ9CGGQ/tyu8/tm5SD3SffAQBlgeNyFu+Pn3wnF1osTDgdThLG4xdy
Bdc4cRLiwXAGFw4n7+CCumPHf0fJlLof4DAQi8FvPg0n7/cZv9mP/F9SdoOzTh/63dPB781e
G/DzZXcAre7Vda/z8mzQPsluG9MYYjbhLgGXeQTwKxuNCEepI8ZhEuNSCMmYQDQZ+tQFDxWn
4T7ANZtA4MwkG7zNgoB5dDQDpPJorPaCxAmMOCH+bD8vMRN1d6OXiRmziOAHJxGkU+r7MCSC
/2jiW4B3Sia/dwZn3VcDaF5eA26w17wcXKNKzfPz7Gun3beg/eaq1+73oduDzsXVead9AsIa
Z+1e+/haMjrp9Fvnzc5F+2Q/VY2Grj/xSCxkCRVDloBPAypUTBhMHc6dMKFE2EmyuGj3Wmco
sXncOe8MrsX+TzuDSyH3FAU34arZG3Rar86bPbh61bvq9ttoC9g9EAb5gY5Cj4zA7nQvmq1e
t2+f2biKSzQkS6vibqUcHNIwSWYRQfj8kmdz/FqolJEfvzbem2A04PAQ8JOJ95EQfbQg2O6f
9uzu6Wm/PcgJzq1CPaODg134fuEntQlcviAB4zPEQxShnToHXdiT2BEYClm457IwTtBu8qc4
chBujudxEse4B8iMMZceBJQZEeMJqr9rGLfMdxLqIw5w38/tBHZNw0g/m/K+vbxaJvwI9fc/
1U2xZaWePGtSG8d1Uapw5fO9IVUKcXKDQCQ8RsAlY5grm6qoUZCGw0y/v6DwepueY3FCUs1t
O/m5mGCBxLadOLBt/JvtH78YpSTZVcPDtFO3dhq1tVKy6wXUjngNDFTQrE7SQYoyT5gFLMxS
I2hJ1lkuT/Ixc/ybN28QiYx7hON5hcjhTkCkp2UUCkeTmIY3ljrs8rxHnA2doT9DhDBAsxOp
AcIFI294QxDNUwviMZv4nohMcs8W3Dq+iYIwbiQ0RF+xEJiKZz4ZJRBTj1iSkSMiDAQkiAni
K/SghUsxvQkDgoDD2McdkQE0kGOTZGigHAsU8CoYbHP8oDDYaVg7dT2AtGBAc4cMkDKaJDGq
X4GkxhfwI6xoWmUksAXkVs1pfyA8izP66yHNWbdsKdDGcGPbtXKSzcy5lW3uEycNBwsVhHtC
3ETFyyxYmnPoIr/M3DSMsnBp28MJ9fGU2FmYtSND/WjCr2lozb6/yHJBumBK1hqu5WyfPgV5
aA7r75/VoYIYof7CBoQb5OFT8jwGJWF/0baYN0u1M5dYaTxbzEKeGLE/9RGOjgDTnv7kqCuP
/FSDhbCqISU+ZvIK11qpSkkLVuXmSD9WllcoddGbcARS7mr2kKkCpmNRWhh1cynkfkKfC4/N
AfkNAPCZAKAsCjae6cJg86RlQafVa1jQlf8OWpeDBpYCUids3zzw2RQbOGyFRpTHWCpgURDC
mN6M1aox4iyQlcKgfXE1522qcmHKsfFQfdGcQvIBA3XSUCn2svBI5e5LRp2RqMexqRPSMEEQ
zicR5hWsR6YEmyz8O1dENHiiDrrBYskSPRrWQ6oMyhGmu0l7REG2a2PpEmCLeIumwQpIZIlb
Rr0cVcpESaGeh2bHqkxVPaJm2hO/cNWFhliDsXB5g9pafFqhFtegRSTKxrMKRfkqadViQEOa
XbJGb6oivfY2fJtUr9Ul6XHdMnYa5o9FNb6edF2ZX056r/pCw6pq2a8hrVr+50k/mitISTFa
BTCfFVJQcBCpyhHLyH6v/VKUkIu40ZG6Pi2HV6nUTfEp6t1MSyun+hKnLwnaOVa8oGsqIn3k
U4HOmq5vLLXCt4e2QIrytYVuL0RaWY/aLDf3Bs1VKeldzyoiwkrTWkx6395Vw0rjuSygrXfg
FxGUtsTLhkHpK4RaXov7xrO0jrZtd0jhAP/G+JeTPyeUk7vp6opOcCjHtnIsNr9LFN3LFR+y
Tedu+Ou6gPXQuBd7KputFpNuh4W1DrXKWaxgQthOY7zicBM/ptnjr8zs8vwIcbY4DgfZF+y3
poy/Uw8qnHC2eJxWTkrGID+mrmS8T5AhdgrCtY5U7HmBVl+Els5acwG+msKPDhTNNLyq9I1i
9BJOGK8Gk88IJ3gcKsDkG07m0rfK5WryKMGSpfX80l1gUk8E8s9+i/J4jj6fW3TD1qX5ajrd
S4sGOQPVj0hlwNWORFUlofhYoG7UtVM50vuNJguGk/OonIn+5/h1pufPC6RLw8mFXPzIposf
z3QYqDLJOsMVzXVfkpBwxwdVlYqCQr2DA3tLOdVYxS/a1UmclenjUiX6sM+FKphj6QQV+OOh
nbAwXH96lIPvGidkZosf2Wzx45vt7yPQWk1rNtx0IwVxMiaxGJ7fjBOE7zsCQ5Ik4u2GKKEB
/UA8+XLVrwsPSlGITWM7JguBwsi/xvIUjMbhYXqUVihdnzh8gfZ7LU+lrTBW3tuFTAqcvsFr
MxrSB+n1fA5F5cgaUoRYLGcGP5WS6+shF4revCgn/cQj0E/Q6jzm6LPgWBSGoi8Fl+43XH6e
uLx7OzNFqM9YZE9CBImtB2uZGhvDrHZu7xyh3bMgtu4ZkA4r/I8gAsHnKxnXFHtsJe0V8Xko
j7nfPHYfj0UOp8nMJrckFC5Tr9GUPBh+2CxQ4t8i0uyqBey2yuBEmwWmTlQhg+hICeMrc5OK
UrdQ2I83znhbkP7v9qpTuBrpdim6/h9OpDZPzWJz2Ok07vP2eT41iziX/z8Zssn6F1BLAwQU
AAIACAAccCgsM8MBXrUFAADYEgAACQAAAGNydG0xMjgub82XXWxURRTHz9KyW75MmRBA+dpW
wA/Kdu/tF1QqHwWEhO8iRS1edu8updjulru3pTUkkkCUBx8IoQETSTBBQiRGAirxQT4Sg2iM
JkYfTExcE5980kTDk9E5d2ZnZo8TxTdvMnt//ztz58zcu+eec17ZsGVjLBaDyhGD3nqtAPYn
ACbzc2ukHocZMBVmLl50M1m+PNHwcbK85Fa5/Es5Xb5QvlpOlp+6Nel24tSM0xfS1xLf3RfX
YrcXRPrH+9PPAGCbO/HpW8JGABP8dz5vOWmvg7djktfythi2RdzL2wljXethu8E7odbKu6DO
yj0w3cq7od7Kz8IsK++BuVbujfb0d94LSSs/x/dp4+f5E7fxC9Bk5T5IW3mffH+UX4QVVvZg
lZX3wxorZ3izcRY2WdmHLVbOwQ4r5/nbsPEB/hRt3M93b+ODfNU2HlD/v2o+xEfZ+CUYtPIg
DFt5CEIrF2DMykU4auVh5RvVfFj5RjUHcNLKJXhdcWjwiMGjBh9RjP9N5OMRHwdQY84YPAGT
FJ81/PEcxBW/Yfjjm/yrUuHzhj++DQ8pvmT442Vgit8x/PEKzFb8ruGP78EjVr5q+OY1WGjl
64affgCNim8YfvoRLFV82/DTO/Ck4k8MP70LKcX3DD/9HFzFXxh++iW0K/7K8NOvDd/8Vvkj
rmsdQndnX+/mbeu39/b07d6wdUef7+8Neg71Z1Olf+oaLQ7kOkOny4GU55XCTBB6xQPeQGEg
9LzOjQ6/tXntnl3PdHc3Dw5kmzOjwXJ+9pe76bTjOG57cynwm/v9IHRSPTiDL+YYGRZ3V4LA
/6FBqjQ+FGay/BwG4nywQmF+LIRUkB/MSMxlwgyksqUSjsYRUV9J3p7J8hshhU9J9kRYggc8
5gHGXlD+0Vp5h/KoxOQG3mqN6zu4U7zPz9PkGOxD/2mSukaOGyX2KvPh/63uAcZ1GIwHfqty
PDFISF2x20XWVzsTov83rm+yMW6TYROP73nnhMXuTqh+LofjoL5F5rheYreV270YE3brDLsz
id0/+HxZy3x4nmRcPzgFIFkr5pgl58Pv0RQy38kZAHeNG81nZh7m9Vr49c800bT/38abc9cQ
qzVVK0RdG8XEx9QVen+dioHiqOMRANS3Blf/KtkNvrtGQ1/ivwsN/SGA+rahvgsAaUNX259M
dIJ/3fSR5O0non8juoZPuUbpGJhJLeo5Mb0f1A1ELyO6jejVRG8muofofUT3E32Y6KNEv0b0
aaLPE32Z6OtE3yT6M6K/IfoHon8m+nei0XlMPY3o2UQ3EN1EdAfR64jeSvReon2iC0SPE33C
8OF6rk9VaYCzRF8k+grRN4i+Q/QDRdWhjB8USzyy+P8pCBeK3mjeDy3hHLyRQn5smHfmc57j
kXANKb84PO5h4BMXzQuDxeIwpF7OB0WPx8RKv9JRtyfMDPkjfoDGhMwTfSQXCmmsBUQXRAsv
Bp6jyFXUoqhVUZuidkUdilYoWqlnTmvUVhxtxtF2HG3I0ZYcbcrRthxtzNHWXG3NNfakrbna
mqutudqaq6252pqrrbnaWou21qKttRiPUFtr4daCfGaw8uDzUdbjmW/fy0c5kGe8cMH5Qg6G
MgMFEHExLpNwzOnjMjnHPD6+Sv/fE5Ixj6+TjEPjXYJxioRkzOMTTwvGGBOXjHl2fLVgzLMT
kjH3SawRjDEnLhnzZrZWMJpkc7TdWFzfG5uqx1f4Xo0eE61bFhe4X/awYMwzmCwuME9g8/R+
2Xxtiy3Q+2IySGI3WyQ4iZwUjLk8a9D7ZY16nexRwRhHmSxGMG9kS4z9LjX2KwM+Pg4mixSs
1dkTgjEnY7JgwZqcLROMdTiTxQvW3my5YKy3mSxkMJ9gzYL3I8vgjnkEcwRj/cxkEoA1M2sR
jHUyk8UO1sasTTDmmEwWPlgDsw7Bx5BlEYS1LlspGOtb1in4L1BLAwQUAAIACABoZyssP6KI
uGgEAAAdEAAACgAAAGxkc2NyaXB0Lnidl1tv2zYUx58dIN/hrE9WlqpythZFhg5wfavRxCpk
Z8P2ItAS7QixpIBSEntBvvt4N0VRTVG/2Prrd64ij+jTk/Bm9e1mFU/D6Hq46r/Bu81vF2/R
I3lz3vHbO1U2w2j0pU+ly/dUu55ch9E/pyfPpycANd7XANAne49+XUIYzWfzBXyC4Jxew9Vk
MVt9oZeDi49fGZ+iGnH+6RdqYfL7j0EwCKiZtgn20yBgRmtUE5R3GA1sow/SCuN7UnZYUZuG
1e80uZfTk+VktJqHi6Us7t0ZRBilb8tid4AKJ3VWFtU55JhscQpZUZei/gpvc1zUl3D2jpn5
t6i6Bf25hGc463PR6/VeOJEeiuqQW4QQG0xNHExNNLMtHvxHTCqa2JExRK/NxamTjFMXS9ws
USzBOz8rsrqRoxINCB2pI4RsyperiVFMA3gWX6DcMsBzaP6ZrbJ0d1lxVxYJ9mt120hIx3KH
Qq5YyB0MvRbN39BKWz1iYqNHmjJ7ZFE+KeUe6uqRAOx+CPWVPhFHn3S8rj4546GugOi1iL4q
r7NAV3k/UFzqKE7H6irOWdqPFNaO5ssx9r3SBGKXIdSfKM+I2FWgMyLqCvl6kUldkspe6Vxs
LHWNmUvdxvzU5SxtOUtdzmzM35ZytpjOqKiHqaivbA0zZFP+uqrarqjYdKUp05VF+fc7R1ZU
bLrSlOnKoOibal7UmBRoJ19J9yjBUBKgF0LOcV6Sg3pFcYivCbkiqFM+jfUVfXnSt1rub5Pk
rKUqxafvzuHVfLboX3h/aMiYnN2A/30ffOzJxRdjnu4ninLgBeBPXqZ4T9Ld2GOdGa6gPxyP
I5AZwK+wnP87CadK8Ix64VsU/jUfT6Afx8xDXNWI8BgeHLOQ2783ooeCVXQzWoURPRz04lGZ
4mX2H1Y5XYWLGfSD/efhOPg8mUw9BY1ucXJXPeQ2OJ4Mx6NgPDl21r2xHM2h7eBjq9kOJvF2
8FUn6pb50z6wtqiry44uUEN3E9iSVRej8Po6XHhua1ykDVtQiitPeTxj6fRefXKmwKvwmktX
ONPTKo6F4IgvbohOyen4cxmYgnBqJyX8G0kJwZGUuCE38rJG6wpSvH7YbrNiqw+ePqjNS5/S
GgI1C9iVJycw+80OjY2b7MBo3PfxPtk1CS61mJYjpTbIrEjx3uK41qbaDpWs2KTM2Un6SElB
3qfdGf89jKaiO8fOyA4vD/m63FX0ZA71LTbRRiMBEQxsgtbZIwZ2iKfwGlOmoJj0VW64LG2g
KuFJQkzPAdEk9RPReQ3UIxIJ6o+uh+uqWrrdMTggph8rni1utHc2zYuKF2EGiiuSZMWmtAMp
XQWU4qZAOa7asNDtXg/8ASC6ZMXVRTMwIqjYOnxJvRn4/mEtIluw0u3IVixRYaubsajQHqFP
GX3DNMKj9Zrgx7a90JusfjQWazwaqWzozsUOkutW49XfObvxxw0go5SJE6R6E8yR+7lLXcLG
mKa7Lrnj/4GD6XTKJzVF/gdQSwECFAAUAAIACABOZyss9rqAKOMBAACrAwAABQAAAAAAAAAA
ACAAAAAAAAAAbWFrZTFQSwECFAAUAAIACAD5ujAskn/PG9sCAABlBgAABQAAAAAAAAAAACAA
AAAGAgAAbWFrZTJQSwECFAAUAAIACAAQqTEsfJ1PuQ8AAAANAAAABgAAAAAAAAAAACAAAAAE
BQAAbWFya2VyUEsBAhQAFAACAAgAAKkxLOFQsvczAgAAJAQAAAUAAAAAAAAAAAAgAAAANwUA
AG1rMTI4UEsBAhQAFAACAAgADnAoLNiYuMD2BAAANQoAAAkAAAAAAAAAAAAgAAAAjQcAAG1r
MTI4X2NydFBLAQIUABQAAgAIAAupMSzR6O9aEAAAAA4AAAAGAAAAAAAAAAAAIAAAAKoMAABj
Yy5iYXRQSwECFAAUAAIACACMqDEs347Z0HcCAAAUBgAACgAAAAAAAAAAACAAAADeDAAAbTEy
OHRlc3QuY1BLAQIUABQAAgAIAM15KCy0BMGqLAgAANEzAAAKAAAAAAAAAAAAIAAAAH0PAABp
b21hY3Jvcy5oUEsBAhQAFAACAAgAHHAoLDPDAV61BQAA2BIAAAkAAAAAAAAAAAAgAAAA0RcA
AGNydG0xMjgub1BLAQIUABQAAgAIAGhnKyw/ooi4aAQAAB0QAAAKAAAAAAAAAAAAIAAAAK0d
AABsZHNjcmlwdC54UEsFBgAAAAAKAAoAFwIAAD0iAAAAAA==

--Message-Boundary-31982--
avr-gcc-list at http://avr1.org

From [email-masked] Sat Jan 19 10:22:15 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16RgSj-0003RZ-00
for <avrgcclist@localhost>; Sat, 19 Jan 2002 10:22:13 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sat, 19 Jan 2002 10:22:13 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0HE7k623319
for <[email-masked]>; Thu, 17 Jan 2002 08:07:46 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0HC88J21048
for avr-gcc-list-list.japetos; Thu, 17 Jan 2002 06:08:08 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0HC87B21045
for <[email-masked]>; Thu, 17 Jan 2002 06:08:07 -0600
Received: from stargate.pd-ef.de (pD956928B.dip.t-dialin.net [217.86.146.139])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0HC84b14165
for <[email-masked]>; Thu, 17 Jan 2002 06:08:04 -0600
Received: from dce.pd-ef.ef (dce.pd-ef.ef [192.168.30.100])
by stargate.pd-ef.de (Postfix) with ESMTP id EFEFBDB73
for <[email-masked]>; Thu, 17 Jan 2002 13:07:55 +0100 (MET)
Received: from localhost (localhost [127.0.0.1])
by dce.pd-ef.ef (Postfix on SuSE Linux 7.2 (i386)) with ESMTP id 96006276C2
for <[email-masked]>; Thu, 17 Jan 2002 13:07:57 +0100 (CET)
Received: from prodesigncad.de (asic13.isytec.ef [192.168.30.113])
by dce.pd-ef.ef (Postfix on SuSE Linux 7.2 (i386)) with ESMTP id D1DB026697
for <[email-masked]>; Thu, 17 Jan 2002 13:07:55 +0100 (CET)
Message-ID: <[email-masked]>
Date: Thu, 17 Jan 2002 13:06:07 +0100
From: Matthias Lange <[email-masked]>
Organization: Pro Design
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.4-4GB i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [email-masked]
Subject: Re: [avr-gcc-list] Win32 Build Of The GCC Compiler And ATMEGA128 support
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS perl-11
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Anton Erasmus wrote:

> Hi,
>
> I am using the current version of the Win32 binary avr-gcc on
> www.avrfreaks.net to compile code for the ATMega128. I had to
> assemble a correct version of gcrt1.s for the ATMega128. I then
> had to modify the ATMega103 linker script to correctly define the
> ATMega128 memory areas. I also modified the iomacros.h file to
> update the inp and outp macros, so that they work correctly on the
> ATMega128.
> With this setup I have succefully generated code for the
> ATMega128. I have run the code on an actual ATMega128 - Not
> just simulated it.
>
> If you need more detail, or copies of the modified files then I can
> email them.
>
> Regards
> Anton Erasmus
>
> avr-gcc-list at http://avr1.org

Hi,
I am working on Linux with the gcc and ATMega128 in ATMega103 mode. I
tried several patches for gcc and libc to get 128 support without
success. If you could send some information and the modified files I
will try it on Windows, because I am starting to run out of time.

Thanks a lot,

-Matthias Lange
avr-gcc-list at http://avr1.org

From [email-masked] Sat Jan 19 10:22:20 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16RgSl-0003RZ-00
for <avrgcclist@localhost>; Sat, 19 Jan 2002 10:22:15 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sat, 19 Jan 2002 10:22:15 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0HLbln16467
for <[email-masked]>; Thu, 17 Jan 2002 15:37:47 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0HJaC226936
for avr-gcc-list-list.japetos; Thu, 17 Jan 2002 13:36:12 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0HJaBB26933
for <[email-masked]>; Thu, 17 Jan 2002 13:36:11 -0600
Received: from mail.intekom.com (mid-mail-02.intekom.com [196.25.69.45])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g0HJZxL01013
for <[email-masked]>; Thu, 17 Jan 2002 13:36:05 -0600
Received: (qmail 30588 invoked from network); 17 Jan 2002 19:32:58 -0000
Received: from bnb53-01-p33.nt.saix.net (HELO scorpio) ([155.239.180.33]) (envelope-sender <[email-masked]>)
by intekom.com (qmail-ldap-1.03) with SMTP
for <[email-masked]>; 17 Jan 2002 19:32:58 -0000
X-vSMTP: intekom.com
From: "Anton Erasmus" <[email-masked]>
Organization: Home
To: [email-masked]
Date: Thu, 17 Jan 2002 21:33:28 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: [avr-gcc-list] Patch for Win32 build of avr-gcc to support ATMega128
CC: [email-masked], [email-masked],
[email-masked], [email-masked]
Message-ID: <3C474328.12878.873314@localhost>
In-reply-to: <[email-masked]>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Hi,

It seems that quite a number of people are interested in compiling
for the ATMega128 without having to build the avr-gcc binaries with
proper ATMega128 support for themselves.

Attached is a zip file with the modified files I use to compile code
for the ATMega128 as well as a small example that shows using
the inp and outp macros to access ATMega128 I/O registers that
cannot be accessed with the "in" and "out" instructions.

The make1 and make2 files are modified versions of the Volker Oth
originals. These should be copied to avrgcc/include.
mk128 is the make file to make the example. Use make -fmk128
or use cc.bat.
m128test.c is the example c file.
iomacros.h is a modified version of the standard iomacros.h files.
This should be copied to avrgcc/avr/include.
Only the inp and outp macros have been modified.
crtm128.o is the startup object file for the ATMega128. This is
assembled from the gcrt1.s file using the make file m128_crt.
ldscript.x is the linker script modified for the ATMega128. It also
adds a section "batram" which is external memory from 0x1100 to
0x7FFF. This section is not initialised by the startup file. Hence
suitable for battery backed RAM. See the example C file on how to
declare a variable in this section.

Remember that the ATMega128 as shipped is in ATmega103
mode. One has to update the fuses to get it to run in ATMega128
mode.

I see no reason why these patches would not work for a Linux build
of avr-gcc.

Regards
Anton Erasmus
avr-gcc-list at http://avr1.org

From [email-masked] Sat Jan 19 10:22:20 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16RgSn-0003RZ-00
for <avrgcclist@localhost>; Sat, 19 Jan 2002 10:22:17 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sat, 19 Jan 2002 10:22:17 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0HNrkI20709
for <[email-masked]>; Thu, 17 Jan 2002 17:53:46 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0HMBug29265
for avr-gcc-list-list.japetos; Thu, 17 Jan 2002 16:11:56 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0HMBsB29262
for <[email-masked]>; Thu, 17 Jan 2002 16:11:54 -0600
Received: from mail-vie-pub-p.1012internet.at (mail-vie-pub-p.1012internet.at [212.95.31.10])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0HMBmC25096
for <[email-masked]>; Thu, 17 Jan 2002 16:11:48 -0600
Received: from telering.at (dis212095022209.vie.telering.at [212.95.22.209])
by mail-vie-pub-p.1012internet.at (8.9.3/8.9.3) with SMTP id XAA23075
for <[email-masked]>; Thu, 17 Jan 2002 23:11:46 +0100 (MET)
Received: (qmail 941 invoked by uid 501); 17 Jan 2002 22:06:26 -0000
From: [email-masked]
Reply-To: [email-masked]
To: Pieter Potgieter <[email-masked]>,
"avr-gcc-list" <[email-masked]>
Subject: [avr-gcc-list] Re: Latest source
Date: Thu, 17 Jan 2002 22:40:40 +0100
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
References: <[email-masked]> <[email-masked]> <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Message-Id: <[email-masked]>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by majordomo2.host4u.net id g0HMBtB29263
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Thu, 17 Jan 2002, Pieter Potgieter wrote:
>
> Hi
> I want to use the Mega128, but have the following problem
> Can I use Reinhard's script with the following source
>
> 1. gcc-3.0.2
> 2. binutils-2.11.2
> 3. avr-libc-20020115
The only change is the libc version. The script doesn't include patches for the
libc, so it should work.
The gcc-patch is only necessary to build avr-gcc with C++ support, but this
will not work until now. I don't know if Peter Jansen has finished his work with
the con/destructors.

<snip>

> Question:
> Is the avr-libc-20020115 patches already applied, and will it support the
> Mega128
I have seen some atmega128 defines in the source, but the start code isn't
generated (missing in configure.in).
I can remember of an email of Peter Jansen, who wrote, that the lates avr-libc
will contain the needed things.

Peter, what do you think about the start code?

> Any comments on wether I am on the right track?
> Are this toolchain proven?
>
> Hi Reinard, your script is VERY COOL, just one suggestion maybe; do not
> include the patches in the script itself how about downloading the latest
> patches also from some website, this will then ensure that everybody has got
> the latest and greatest patches and upgrades without scanning through emails
> to get the correct patches.
Thank you very much for your praise.

The script is intended for the novices and for the lazy experts (like me).
For avr-gcc, you will not need patches. If the C++ support is ready, we can put
the patches on the net, but I don't know where this could be.
Any suggestion?

For the avr-libc there are no patches necessary and I don't think that this
would ever be, because Marek Michalkiewicz is really quick with new releases,
if you send him a patch.

Regards,
Reinhard

--
Ing. Reinhard Jessich mailto: [email-masked]
A-1190 Vienna, Goergengasse 2/2/1 phone: +43/1/3692600
http://members.telering.at/jessich mobile: +43/664/1735439
avr-gcc-list at http://avr1.org

From [email-masked] Sat Jan 19 10:22:23 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16RgSn-0003RZ-01
for <avrgcclist@localhost>; Sat, 19 Jan 2002 10:22:17 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sat, 19 Jan 2002 10:22:17 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0I0I0326600
for <[email-masked]>; Thu, 17 Jan 2002 18:18:00 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0HMnau29581
for avr-gcc-list-list.japetos; Thu, 17 Jan 2002 16:49:36 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0HMnYB29578
for <[email-masked]>; Thu, 17 Jan 2002 16:49:34 -0600
Received: from mail-vie-pub-p.1012internet.at (mail-vie-pub-p.1012internet.at [212.95.31.10])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0HMnSt02630
for <[email-masked]>; Thu, 17 Jan 2002 16:49:28 -0600
Received: from telering.at (dis212095024221.vie.telering.at [212.95.24.221])
by mail-vie-pub-p.1012internet.at (8.9.3/8.9.3) with SMTP id XAA05299
for <[email-masked]>; Thu, 17 Jan 2002 23:49:25 +0100 (MET)
Received: (qmail 1064 invoked by uid 501); 17 Jan 2002 22:46:11 -0000
From: [email-masked]
Reply-To: [email-masked]
To: Peter Jansen <[email-masked]>
Subject: Re: [avr-gcc-list] [Fwd: building gcc/g++]
Date: Thu, 17 Jan 2002 23:31:45 +0100
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
Cc: Avr Gcc List <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]>
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Message-Id: <[email-masked]>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by majordomo2.host4u.net id g0HMnZB29579
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

On Fri, 11 Jan 2002, Peter Jansen wrote:
> Marek,
>
>
> > Could I have 4 bytes in the startup code to support C++, something like
> >
> > ;; Call any C++ constructors
> > CALL _U(__do_global_ctors)
> > .weak _U(__do_global_ctors)
> >
> > ;; Call Main function
>
>
> This does not work for several reasons, as I found out today, hmm any ideas?
How far are you with the C++ support?
I have stopped my work, because it doesn't make sense if 2 people are working on
the same thing. I would like to review your work (if you like this).

For the problem above. I think the solution of the m68hc11 port is good. They
use different sections for the con/destructor functions. So you will not add
the initialization code, if you don't need it (C code).

If you need help for this, put the patches to the web or send it to me.
I have lost the current state of you work. There are sent some other patches
for the ATmega128 to this list. This is a little bit confusing.
I would need the patches for binutils (2.11.2), gcc (3.0.2) and for the
avr-libc (20020115). Then I can start.

Regards,
Reinhard

--
Ing. Reinhard Jessich mailto: [email-masked]
A-1190 Vienna, Goergengasse 2/2/1 phone: +43/1/3692600
http://members.telering.at/jessich mobile: +43/664/1735439
avr-gcc-list at http://avr1.org

From [email-masked] Sat Jan 19 10:22:23 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16RgSp-0003RZ-00
for <avrgcclist@localhost>; Sat, 19 Jan 2002 10:22:20 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sat, 19 Jan 2002 10:22:19 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0IF36X25634
for <[email-masked]>; Fri, 18 Jan 2002 09:03:06 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0IDF2315575
for avr-gcc-list-list.japetos; Fri, 18 Jan 2002 07:15:02 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0IDF1B15572
for <[email-masked]>; Fri, 18 Jan 2002 07:15:01 -0600
Received: from stargate.pd-ef.de (pC19F9D3C.dip.t-dialin.net [193.159.157.60])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0IDEhk22691
for <[email-masked]>; Fri, 18 Jan 2002 07:14:43 -0600
Received: from dce.pd-ef.ef (dce.pd-ef.ef [192.168.30.100])
by stargate.pd-ef.de (Postfix) with ESMTP
id F0D71FF02; Fri, 18 Jan 2002 14:14:41 +0100 (MET)
Received: from localhost (localhost [127.0.0.1])
by dce.pd-ef.ef (Postfix on SuSE Linux 7.2 (i386)) with ESMTP
id 4DEC126BF8; Fri, 18 Jan 2002 14:14:43 +0100 (CET)
Received: from prodesigncad.de (asic13.isytec.ef [192.168.30.113])
by dce.pd-ef.ef (Postfix on SuSE Linux 7.2 (i386)) with ESMTP
id 2EBA626A4C; Fri, 18 Jan 2002 14:14:42 +0100 (CET)
Message-ID: <[email-masked]>
Date: Fri, 18 Jan 2002 14:12:51 +0100
From: Matthias Lange <[email-masked]>
Organization: Pro Design
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.4-4GB i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Anton Erasmus <[email-masked]>,
"[email-masked]" <[email-masked]>
Subject: [avr-gcc-list] Re: Patch for Win32 build of avr-gcc to support ATMega128
References: <3C474328.12878.873314@localhost>
Content-Type: multipart/mixed;
boundary="------------61C3DE1412940C7F140B15EC"
X-Virus-Scanned: by AMaViS perl-11
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

This is a multi-part message in MIME format.
--------------61C3DE1412940C7F140B15EC
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Anton Erasmus wrote:
>
> Hi,
>
> It seems that quite a number of people are interested in compiling
> for the ATMega128 without having to build the avr-gcc binaries with
> proper ATMega128 support for themselves.
>
> Attached is a zip file with the modified files I use to compile code
> for the ATMega128 as well as a small example that shows using
> the inp and outp macros to access ATMega128 I/O registers that
> cannot be accessed with the "in" and "out" instructions.
>
> The make1 and make2 files are modified versions of the Volker Oth
> originals. These should be copied to avrgcc/include.
> mk128 is the make file to make the example. Use make -fmk128
> or use cc.bat.
> m128test.c is the example c file.
> iomacros.h is a modified version of the standard iomacros.h files.
> This should be copied to avrgcc/avr/include.
> Only the inp and outp macros have been modified.
> crtm128.o is the startup object file for the ATMega128. This is
> assembled from the gcrt1.s file using the make file m128_crt.
> ldscript.x is the linker script modified for the ATMega128. It also
> adds a section "batram" which is external memory from 0x1100 to
> 0x7FFF. This section is not initialised by the startup file. Hence
> suitable for battery backed RAM. See the example C file on how to
> declare a variable in this section.
>
> Remember that the ATMega128 as shipped is in ATmega103
> mode. One has to update the fuses to get it to run in ATMega128
> mode.
>
> I see no reason why these patches would not work for a Linux build
> of avr-gcc.
>
> Regards
> Anton Erasmus

Hi Anton,

I got it working, on Linux, thanks a lot !

This is my configuration :

binutils-2.11.2
gcc-3.0.2
avr-libc-20020115

I am using your crtm128.o, iomacros.h and the setting MCU = atmega128 in
my makefile.

In addition I made some changes to the iom128.h file to get
compatibility with my atmega103 sources.

I did some changes to your iomacros.h too:

- cbi, sbi, bit_is_clear and bit_is_set are now working on PORTG too
- I added outw() and inw() macros to access the extended 16Bit registers
like TCNT3L/H

I am not sure if this is the best way and if it works on all MCUs. But
anyway I have attached these files. Perhaps its useful for somebody else
too.

Best regards

-Matthias Lange
--------------61C3DE1412940C7F140B15EC
Content-Type: application/x-zip-compressed;
name="iom128.zip"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="iom128.zip"

UEsDBBQAAAAIAOhkMixXsXPB1BIAAIdYAAAIABUAaW9tMTI4LmhVVAkAA2QJSDzQGUg8VXgE
AOgH0AetXG1vo8qS/pwr7X9o6UqrmbPzYiC2k6vVanlpHM6NYwQ4ycyXiNhk4nscO/LLmcm/
32oM/VJQ2Dl3/SEKVPdDVT1FdXXT8PW3//gbY2yxfrHsiy/P7DNzbxPmZi/FjxzOsHnxtFgV
27JR+cdfr3abxeN+t95s/1GeYf6myHfFnD2+sbjYFRv2e77aFiv236/i6H+3L/lmN4NuOSBt
vqyK3f8AVNk1u4pSlk7C7M5NOIP/byYZ8yfxtyQaXWU8qJs9L7Zsu95vZgWbrecFg8P101Ox
gYs+rTdsv4VTK7Z7Ltjr/nG5mLH5+gWu9oWxb+s9e8nfShho9om9rOeLpzcGveaL7cES6Lxj
T5uiWL590a9YX0o1nNeXeV6/FvBPvhNdfy6WS/ZYCPyn/fITg5YlyF2UXU2mGXNvvjEwMHFv
sm+gknt9XR9GPP3E+H2c8DRlk4RF4/g64gET3rjiCfe+lUBBlPrXbjTmwZdKtcVqttzPi624
llBxtd6x5eJlIVTcrdnPfLPJV7tFIfxUQox54l/BFV0vuo6yb8L+MMpuxHVDuLDLYjfJIn96
7SYsnibxJOWlL377Kv7+ffG0gkhgDw/RZAxhAWcOgSHPMKtsV52FGHoY85Erzurn+A3o4IOB
ZeuvIvZ+YzHQWDaZszQEVebzTbHdFtsvpRQigv8DjC6A47wWSZcXC2BjwwI3c8HE8SQpLYu+
Tuoj2eVTiTYvXovVfLH6wdYrIPEne4P4kKbA5R8mYZjyjH3o/eqVsQVYn1jvl304Ehf6eFAs
hMN8NjvoAz5/KV7Wmze2XM/y3WK92h467Z436/2PZ9Gg96sffmI/ZjO23T/uNvlsty2BDuCb
9UsZWZXC0Ob1dbkAn+SruYisLfxTGrZYQTTuZ+Ian9gmL+2HSFyVWDmb57u81uWgnt6DfUAQ
EOWAu14t3+SVAbHEelpstjs2OC+viq2rnOC9gW7CnUJ1w4Hbt5fH9ZLVzOaVP+r7p8jnoPfT
Ygm3ZL5clmDb12K2yJflWbYpfsBtV2y27INhkgwBIKj3+XPvlxV+LCGEmiVMd89SDdFPkKFZ
psQHWCf8ePAouF+gF792EDlgiehz9BKDEiMMP5bufTw4FFgsHbHYfoIA3j2v4d59LIT3fm7y
19dDdnnJZ5t1GVD5/F97IEALitLnX8WNw/7eFrQiZoWcENq9w13HotUrXDqGMPjE4vVmx0Kj
WxzdhKz8lXfBfxk4HykMjjG4xLAIjED4LlhsikNsJpVXWwGDIFGAdhdgJ0w8STJewzgEjBv4
7BqSg/cGY4PeGwTXUonzjt5XC7jn27pfye79ju7lIAt3jwi+7S7f7bcy5DBgmtSAgw7A8X65
W7wui18AsC2W4HCEM57e1zhDCmeVL9c/QLeX1xzyDqQ/Xc30oGbSqmatpYC/IOCnKYxAPebl
+zlLoJ5QUIIKHW7qJUnvuoK77IbrUtEzUUHJnlehun8d1W2iuhWq14VaJhYjgE2gIOlJH/oE
UBpHUrdWlDT2FRNBB0oXnWms0ck7QLotSuNAwYSnppkAp5lApRkqV3XnmQDnGQ2xM3N14ohE
E0gcKmE1zPOxef7ZAYHKVd22+di2Go5KXm2G+Q3DfGkYlcUahnnYME95mcpc3bZ52DYNkcph
beZ5DfM8iUMlq4Z5LjbPVcpQKarbPBebpyFS6anNPLdhnitxqITEeZxMxt2phHMtlVhURqqQ
6CzAuZYFLColVTDV3IAeGjh3k2uJRuUmCq0ctTHclYSjclRa1a3hfnVgUuS99pQXRhM5XttU
urrLd7PnOQy12eKl2HSzcBdkvkKk0tVk9Xn2vHhlQfG4/9EONPGD5JAbbCpZlerYbLLfieA/
1AEFhZbYqlqjclcJ+NVf71eiv20gZP5NZksEKl1hhNpXrdVS5tdaCUgqc2VffWZVN7ifv+72
m45SJPITS8abTeWxTshG0AlMGXQ2lckMyy2SFK+hMlBjeXX1ZFMJ7mT4hvol/lWNT+W+E/Hd
VvVdqT6VCE+Gb1XflepTCdKMO6uhpYheS2pJJUeM0lCmhJHKUMkRw5xalov7waorXptKlhQ6
DVmXuzaVME3IHnO3b6vZ82a9WoOqNf5/dk8pUq0GdahMSvHew5Sr0tqhcihWGvPUkwid+VND
OOpJBUll0LE/7XQTyNUE0aGyqED5UayKDQxinUpBQzXaOGQGNeyMxN/N/nXHwmVODD5ZFGps
kmmUwB3n6T+JjB+NQVTjUqmU/4J+MLk9SVVuqEqlzxZIWktuaEllzBbIBlcewvUTWco6VKpM
3DGL8x8F+16vDLQqCc3i7xKMyov3QXQLJe2fi7lYqe8Yi8uGEo6cz+7y2R9Qxi5WbYNvGleL
MSUGOZs1MBopNo2vNBByNlvdY3zUUtTBWYVA5bzuYt9cgINiXy3ADayu6h6t3EF1Hx6quIFN
zlVGeK6i1B84p+k7wvpqEOdd+o4a+o4qffvK12vI1fFm/WOTv7DxYWn1yKrG2K+K18HFe+4X
t3G/uBWM24ChFDHvuXvQxKsw/JMx3AZGrUcgh7LtbLFcHpbd8uXicZMbvJgDWur77nWFENYI
9uefQCdLi82i9spTPiuYt9ihBTcjhd55lWuHvWNIncXGXVrjWMdwGhMzE8itgexjQPS0M7ur
pztD5xhK9zh9V4fe8FwfqJiqmKgqxG8tbv2KuOHFu+Fai1n/qsK7PLmi8xuViFWtGw2N+6J8
HnKYpJ40dIphvsLxj+KM8+0fJA4MmBVQ0G6V844ZnFN5/KL3Tqy2qZtTufvCosDeFQ5OHQ4X
9vvx2uLBqePhwnkvYOtc0vFqBc/fj9eqoFcr2H8vYOts0akz4cXg/XitCrq1gkMKsP6PjhQx
Y5Bxd/Fv4tT6EHe4c2zQEne4U41aF+7JIG4TpBq2LryTQZq5xqlyzYXMEfSjoYY/ymdD9Yz5
socQumbGpiLlc5tKkcu+AWOdrIhVEXN5cRwAIrfRvYqPy0vU/X0PtayK2Uv3HTDNp1hWxe2l
h2COPreyqo7+O67fZKMegi7rjC/2tfymDRi3UKqKLRqiy6LcpFC2+KpvTEmj0UN0k/EkmcZZ
7+zs4c+y04NFNLFUE5toYqsmDtHEUU3OiSbnqkmfaNJXTQZEk4FqMiSaDFWTC7PJZJrF0+zB
n4xjN+G2bHaJmt3yJLye3Gl2Wz18sRLIjbNpwi3VzOq6IMSXbGh3NvRUQ6ddN40267wLq6fa
9duh9CBBbk/j6EyTIo9PRcZ5SLh/q7W5aGsjNhVpbS7b2mSJe5NqwYg87ga+poqNHH143gG6
uME31Qg5+eARN5skGhD2r0mErxo24lqLAEc1w0428BwVAfags6GKAHvY2VDTEEd7xa92b9ot
nrcQg06vrY3JoGO1tUEMOsj99l2U8IeUJxHUK7KRgyOuZlE1OdfzG78JHm65X5L4wREVmSxN
b7JS8pBG33k5vM60PCo22GljCMwIV/mL2HO2ETuxXmE2VqyqLZ6752KxYY+iyf7lEVp/6H0e
iu1gh0yr5lGd0yZxyTvQqVp7YUMk4m4tYQMkSjMp6zdEk1p0jkR3vgR08LVupMjGGnIp6pnW
dc5Ry77uQPbF1rl90jr3XIqwda4jRdg61yatcy3SOrcnRRYSjXxpOTK8a5J/IGFI2p0qlzRY
VS5psKpcgu1OlUuw3XEqDcfGxak0vKdNQ9+xRAO/NLlWTh9gkXJ6H4uU08+R6K4nuzkNkexm
Y5GlG/pXFq3gdz/2/knQdj8eK0NtLFKGWlikDK293LU8jBWCpvLGHDZEMpAGDZEMpH5DJAPp
vCGSgeQ0RNJ6uyEiQkyIGiF24kK7+JWL7T2z+/vXM+EXpb4jdRw2RFLHARbZsle/IZK9zrHI
IuJXiIj4BVGP8KIQ0TfqyY9BDkhD2g1D2g0D2g0D2g192g192g3ntBvOG254/yI5/KB8UAOa
6Ybk7i712t0gRPXeW2Srd+2JrcVttsaju0SO7jYS8SRttxU0VKNxB+X0wzThsJuMGoJARA1B
IKKGIBBRQxCIqCEoqjewtLB9k1F5M6qfJB/xAL3MegAJpQsaHgiJ5ClERPIUIj15/sXnsfCb
+BG321XLJpoI1QcRdLNaVROAlqtUw6I6qp3GtSQFdqOXpMBq9Grciu9/3F1eJFTBgd1wSxUW
kR9ShQUASi803BBKLzTccEuVh9CLLA8nt+0xSizkd4RDSWx9BzWJdWhiHZpYeUc2iXXqaYDV
jJRadNSi7nvPD1VGaHDk0Bw5NEcKsMGRNKhhUSgNkhadvNGDicJSzX1QhELNqUSo9NU64dJX
qxVx6avVirj01YpPnEVvU17vAMBZ9FbNXwzrj8xefq/2bLcY/XtWP5RvqH8XaCJTfW+iiUz1
+b2GaKof673a88wx+sKJmvAiS+5GmrtN+vzJmEowIKJmLgCoepn2+2mPGgRBRA2CIGommP+H
XWPwc1My1DL/pjetb0J8oyVKhJKhLjqRq0adDs51iQJViIgCFUQeUaAKEVGggsgnClQhIgpU
4NglClQhOjIqnv7EgokMeqNiF1UvPpeVI3IGaOHJPNmIT09GIY5Pj45Pj45P71h8HnnQxco7
VC1yDbFIDgbITBAp5/RP39/NWLnFm6gKhYioCoWIqAqFiJhSCxExpRYiYkotRESQCVEjyN6z
U17EQaCNCjiFawOXg0QxFSIgokIERM0QOf1NAfhl6VipZNLlBldKaBri+mNlCZqSTbXBDU3J
0oQq9kDkyNUAWRqd8III/DhP1ITTQaLxHW9XhnMlQcoAYHNcP7x9RT6BZOV4mhGRL0RE5AsR
EflCRES+EBGRL0RE5AsREflC1Ih8ZXNzjx62PgjUdBhZHwRqOoysDwI1HUbWB4GaDiPrg0DV
qsj6ICAruSDQSkMLibTx2rBe7Wts0B3dUAsAIKIWAEBELQCAiFoAABG1AAAiKnGAiEocIGom
jsNrW8bWSXd4NtQPB2cD/bB/1tcPz8/O9UPnzNEP7TNbP7TOLP2wd1arUb6FZu78NNWAY0MP
ODYUgWNDEzg2VIFjQxc4NpSBY6VN+ZYdfu3O9AqcMP0CJ0zPwAnTN3DC9A6cMP0DJ0wPwQlN
q/IFQkMtz1TKM1XyTIU8Ux3PVMYzVfFMRTyDKvyCpIeo8hBVHqLKQ1R5iCoPUeUhqjyDquYL
oJgqD1PlYao8TJWHqfIwVR6myjOpQi+3+sMzPWPE/uBMTxOx3z/Tc0Psn5/pCSH2nTM9C8S+
fabf+rFvnen3e+z3zphGGX5f10eU+YgyH1HmI8p8RJmPKPMRZb5BWfNlZEyZjynzMWU+pszH
lPmYMh9T5puUoRetA0RZgCgLEGUBoixAlAWIsgBRFpiU4dfHA0RZgCgLEGUBoixAlAWIsgBR
FhiUNV+Px5QFmLIAUxZgygJMWYApCzBlgUkZ+ggHN5XipkrcVIib6nBTGW6qwk1FuJEQ8RdF
OKKKI6o4ooojqjiiiiOqOKKKG1Q1P5iCqeKYKo6p4pgqjqnimCqOqeImVeiNktBUKjRVCk2F
QlOd0FQmNFUJTUVCgyr8QkyIqAoRVSGiKkRUhYiqEFEVIqpCg6rm93EwVSGmKsRUhZiqEFMV
YqpCTFVoUoVephmZVxiZ+CMTfWRijwzv49d7RsibI+TNEfLmCHlzZHiz+f4Rds0Iu2aEXTPC
rtEucWQFULyv9RC1zg5KUf3UEu/pAFH9qhje0wGielkK7+kA0W3r7KAU1c868Z4OEH1vnR2U
Ivyg4tgHW0S/OFIrymg52J/IVXRsdBzZ93gucvQjM4eOnLhcGmsrLWjKOUnUCoXp43GaJVKE
1jNjTX+0uhdfqSU25OM4oWZgIGrOwA7f6KFX86Zj7WGEadY0JhfVQUQtqk9TTy11mmZN/fQ7
8fBSiIiHl1PdUaZZ3bu/4Zfck08TMl2EDA+01RrT8FALArx0eKuYZuXcWiyuiq8elm3Krd1s
vhDff9yq7+aJ77A9rtd/lJqLLlpj8TG1P9eLOXvdrB+Xxcu2/Pxa2W2SGJ/Hk3sYD345Fubg
FmpDRaaLGm5Roj4C1DYjos1uuqgZD1JkI0DvQorQgwtdVMfDX//IFxNrj+TTM9f3RkSUuP5E
9eojUaREeJ1TyzAOFqmQtLGI2hYoRI1ltvd8jE1gBBpHeMk2VUohBwShinjkgCCiHjqCiHRA
EKfEOqMQUQ4IWvZFnvDxOPglPEyJx1dCRDy+cgPxtdFWu8fTe2rBDUTUghuIqAU3EFHpHkQt
C27V++JaFsEbFOtcurFNs+6vpMB0xTfV48IUqB6XhuC77KHvOxcC2cOp93xCmEJ0rnaN1dDE
HfPyK2niC2nhIZyg/XW+3YkHR754cJSKzYnX1cc9G5bWCOKLlmFoyLh9wBbfnsSy8NpNr4RY
fDupFIJYfH71SVxffjlWXO3/AFBLAwQUAAAACADCbDIsokcmYo4IAAC9NAAACgAVAGlvbWFj
cm9zLmhVVAkAAywXSDzQGUg8VXgEAOgH0AftW21z2kgS/nxbtf+hlyu7hCPbsB9SqSzOHsY4
psoYF5BsXJUqlUCDmYuk0Y2EMbnN/vbrmZFsCUZCBmfJ7kUfYhj0dPf0PNMvI+X44McfAIAy
zx5zFh5Nf/xBDrSYH3E6mkWMh6/lCI5xYkfEgdECujYnn6BLx1Pb/UTJnI4/Q8MTg96/XOrP
7o8Yvz0K3DexuOFFZwCD3vnwt2a/Dfj5qjeEVu/6pt95ezFsnyW3TWkIIZvxMYExcwjgVzaZ
EI5aJ4zDLMQhH6IpgWA2cukYHDSc+kcAN2wGnr2QYvA2Ezzm0MkCEOXQUM0FwRFMOCHu4iit
MVH1eKOTqJmygOAHOxLQOXVdGBEhfzJzTcA7pZDfOsOL3rshNK9uACfYb14Nb9Ck5uVl8rXT
HpjQ/nDdbw8G0OtDp3t92WmfgfDGRbvfPr2Rgs46g9Zls9Ntnx3FplF/7M4cEgpdwkSfReBS
jwoTIwZzm3PbjygRfpIiuu1+6wI1Nk87l53hjZj/eWd4JfSeo+ImXDf7w07r3WWzD9fv+te9
QRt9AQfHwiH/pBPfIROwOr1us9XvDawLC0dxiPpkaVTcrYyDBvWjaBEQpM+btJjT98KkBH76
3rivglGHRgPwUxXvIz6uUUaxNTjvW73z80F7mFKcGoVagoPjA/gp85OaBA53icf4AvkQBOin
znEPDiV3BId85h+OmR9G6Df5UxjYSDfbcTgJQ5wDJM540O55lBkB4xGaf2AYd8y1I+oiD3De
r6wIDqqGEX+uyvsO02ZV4QXU7n+uVcWUlXlyr0lr7PEYtYqlfHU4osogTm6RiISHSLhoCg/G
xiZqDKT+KLHvv5B7fYz3sdghseWWFf2SD8hALMsOPcvCv8n88YtRCEmuCm6mvZq5V6+s1ZJc
r6FywitgoIHV8pAuIopWopojolroBC1knefSkC/Jwn/48AGZyLhDOO5XCGxue0SutIxC/mQW
Uv/WVJtd7veAs5E9chfIEAbodiItQLpg5PVvCbJ5bkI4ZTPXEZFJztmEO9utoiKMGxH1ca2Y
D0zFM5dMIgipQ0wpyBYRBjzihQT55TvQwqGQ3voeQcJh7OO2yAAayrFZNDJQjwmKeCUctjl/
UBns1c29mp5AWjKgu30GiAxmUYjml4BUeIY/wotVswgCW1Bu1Z3WZ8KTOKO/ntOdNdOSCi0M
N5ZVKYZs5s6tfPOUOGnYWKgg3SMyjlS8TIJldYW61A+SWInRZTSjLu4RKwmyVmCoX6uwvw+S
243a/csaVOHXONAmv79OMkM8kFlR4Si5PZQqh0FBYM7OHjPbWsMe7KouydUsRL48SXAhTn2E
kxPALKUnurrSRI3NyURBDZS4mHhLXGu1KiNNWNWbgn4prS9Xa3ZV4QSk3tVgLyM7zKeiEjBq
cvXzWVt/qaNt86xlQqfVr5vQk/8OW1fDOoZuaRWW2w64bI4FN5auE8pDDO0YxH2Y0tupGjUm
nHkysg/b3esH2VUV3uccC0VVxz4gpBww0CYNSomXiSLWeyQFdSaifsIiXGjDDU04nwUYBzB/
zAkWxfj3wRBRkIu8dYvJzRQ1NeYvlbZSwHg2cU0vYAcWphoPS/o7dA1mLLGr7xh1UqhYiNJC
HQcdj1lUZSmR4w7FL1x1DT7mTOYvT1BbO81L1E4avojAVn9ZoohahZYN3hpocsmaqqmKqspH
/2NUvraS0NOaaezVqy/yajI9dF1ZVgx9Uj7QiCpbpmmgZcu1NPRLdYUpMUfLEOabYgoq9gKV
6THtD/rttyLlZ3mjg45dWkyvQq2b8lPUJ4mVZsr0JUnfErU7W1I7JYrnVLl50B3vClys+fpG
QKt8e2oLpqi1NnHZc5lW1FM0i929QTFcCH3sMUREWGky8qFP7TU0ojQrlwS09Qv4twhKW/Jl
w6D0F6TaLuOZqqTTHdt8m45tnurYcpoMY6nmf5Edwe91HG004NVqmzd/Spu3VZ+n7VWWwm9e
OM+0SE+8UljZXJUok3XY5NJ4VvVY8OYNOviXsthH3D7U7s/PM3NH7D82muhKRyd7Ossajygc
498Q/3Lynxnl5PFkdmV/QEMe+cojtYe7RAO43H2g2PjMDn9dlzyfOwaLORWdy+ZDt4tLa/OY
WSxiJT4J32mcl5/6wl26Pfw/c7vcP0KdJbbDcfIFe/8545/UQw7bX2S308pOSQSkj7hLOe8r
VCt7OaWDDirmnMHqG6LCc9pUsVHO4J0TRXOSXlb7RvXCEk8YL0eTb4gnuB1K0OQ7Tx60b8ST
JJerekuSJUnr6aHHwKSeJqSfG+fl8RQ+nVt0NeFSFRjXM3HRIAs/fWEoA672gF5VEkqOCepG
XS24XMs94dJqfYjKieo/Tt8ndmYruaXCKpOLd+y6cHeuw0CVaNY5Tus65PBb4hOOla+qSkVB
od7fgcOlnGqs8hf9akf2ykn4UiX6FZ9Y5fI3TYOc9XjuRci0E/snKfquWYTEbeGO3Rbu3m2/
n4DWa1q34aTrMYmjKQnFg5zbaYT0/URgRKJIvBkRRNSjn4kjX8z6NXmt5zhxOSqyaGiFJBMs
jPRrMPtg1BuNeDullysHu9mT4FVdRU8x42v5sfGyrUuWjl1i84ytP2nnoGYpFlcz3VUhOSTd
4BUhDfRZelOXQ175tAaKWyKU520/F8L19dsY8t4yKYZ+5ccHX6E12+Vjg5xtmBs6/y68HH/n
5bfJy8c3UWOGuowF1sxHklh6shaZsTHNKpfW3gn6PQli656f6rjC/+0FIOT8ycdLu+BK8Yqt
pL08Oc+1YuPvK/aUFQtsTqOFRe6IL5ZMvYRW8FLF82aBgvXNgyZXxWN3ZQ56tFlgbgclMogO
ShhfOecpqXULg91w44y3BfQvN1edweWg26Xo2p94grZ5ahaTw06n/pQ37dOpWcS59P8/kU3h
/wBQSwECFwMUAAAACADoZDIsV7FzwdQSAACHWAAACAANAAAAAAABAAAApIEAAAAAaW9tMTI4
LmhVVAUAA2QJSDxVeAAAUEsBAhcDFAAAAAgAwmwyLKJHJmKOCAAAvTQAAAoADQAAAAAAAQAA
AKSBDxMAAGlvbWFjcm9zLmhVVAUAAywXSDxVeAAAUEsFBgAAAAACAAIAiAAAANobAAAAAA==
--------------61C3DE1412940C7F140B15EC--

avr-gcc-list at http://avr1.org

From [email-masked] Sat Jan 19 10:22:27 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16RgSt-0003RZ-00
for <avrgcclist@localhost>; Sat, 19 Jan 2002 10:22:23 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sat, 19 Jan 2002 10:22:23 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0IHe1e32129
for <[email-masked]>; Fri, 18 Jan 2002 11:40:02 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0IG36a17961
for avr-gcc-list-list.japetos; Fri, 18 Jan 2002 10:03:06 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0IG36B17958
for <[email-masked]>; Fri, 18 Jan 2002 10:03:06 -0600
Received: from mail.intekom.com (mid-mail-01.intekom.com [196.25.69.44])
by japetos.host4u.net (8.11.6/8.11.6) with SMTP id g0IG2lS21624
for <[email-masked]>; Fri, 18 Jan 2002 10:02:48 -0600
Received: (qmail 13144 invoked from network); 18 Jan 2002 16:02:38 -0000
Received: from bnb53-01-p164.nt.saix.net (HELO scorpio) ([155.239.180.164]) (envelope-sender <[email-masked]>)
by intekom.com (qmail-ldap-1.03) with SMTP
for <[email-masked]>; 18 Jan 2002 16:02:38 -0000
X-vSMTP: intekom.com
From: "Anton Erasmus" <[email-masked]>
Organization: Home
To: Matthias Lange <[email-masked]>
Date: Fri, 18 Jan 2002 18:03:28 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: [avr-gcc-list] Re: Patch for Win32 build of avr-gcc to support ATMega128
CC: [email-masked]
Message-ID: <3C486370.25371.17CF53@localhost>
In-reply-to: <[email-masked]>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Date sent: Fri, 18 Jan 2002 14:12:51 +0100
From: Matthias Lange <[email-masked]>
Organization: Pro Design
To: Anton Erasmus <[email-masked]>,
"[email-masked]" <[email-masked]>
Subject: Re: Patch for Win32 build of avr-gcc to support ATMega128

> This is a multi-part message in MIME format.
> --------------61C3DE1412940C7F140B15EC
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> Anton Erasmus wrote:
> >
> > Hi,
> >
> > It seems that quite a number of people are interested in compiling
> > for the ATMega128 without having to build the avr-gcc binaries with
> > proper ATMega128 support for themselves.
> >
> > Attached is a zip file with the modified files I use to compile code
> > for the ATMega128 as well as a small example that shows using the
> > inp and outp macros to access ATMega128 I/O registers that cannot be
> > accessed with the "in" and "out" instructions.
> >
> > The make1 and make2 files are modified versions of the Volker Oth
> > originals. These should be copied to avrgcc/include. mk128 is the
> > make file to make the example. Use make -fmk128 or use cc.bat.
> > m128test.c is the example c file. iomacros.h is a modified version
> > of the standard iomacros.h files. This should be copied to
> > avrgcc/avr/include. Only the inp and outp macros have been modified.
> > crtm128.o is the startup object file for the ATMega128. This is
> > assembled from the gcrt1.s file using the make file m128_crt.
> > ldscript.x is the linker script modified for the ATMega128. It also
> > adds a section "batram" which is external memory from 0x1100 to
> > 0x7FFF. This section is not initialised by the startup file. Hence
> > suitable for battery backed RAM. See the example C file on how to
> > declare a variable in this section.
> >
> > Remember that the ATMega128 as shipped is in ATmega103
> > mode. One has to update the fuses to get it to run in ATMega128
> > mode.
> >
> > I see no reason why these patches would not work for a Linux build
> > of avr-gcc.
> >
> > Regards
> > Anton Erasmus
>
>
>
> Hi Anton,
>
> I got it working, on Linux, thanks a lot !
>
> This is my configuration :
>
> binutils-2.11.2
> gcc-3.0.2
> avr-libc-20020115
>
> I am using your crtm128.o, iomacros.h and the setting MCU = atmega128
> in my makefile.
>
> In addition I made some changes to the iom128.h file to get
> compatibility with my atmega103 sources.
>
> I did some changes to your iomacros.h too:
>
> - cbi, sbi, bit_is_clear and bit_is_set are now working on PORTG too -
> I added outw() and inw() macros to access the extended 16Bit registers
> like TCNT3L/H
>
> I am not sure if this is the best way and if it works on all MCUs. But
> anyway I have attached these files. Perhaps its useful for somebody
> else too.
>
> Best regards
>
> -Matthias Lange
>

Hi Matthias,

Thanks for the iomacros.h additions.

If your compiler build accepts the mcu=atmega128 option, then it
already has support for the atmega128. It should not be
neccessary to manually link with crtm128.o.

If I specify mcu=atmega128 on the Win32 binary build from
avrfreaks.net, then I get the error: cc1.exe: MCU `atmega128' not
supported

Regards
Anton Erasmus

avr-gcc-list at http://avr1.org

From [email-masked] Sat Jan 19 10:22:27 2002
Received: from localhost ([127.0.0.1] ident=avrgcclist)
by jpk3.jpk.co.nz with esmtp (Exim 3.12 #1 (Debian))
id 16RgSu-0003RZ-00
for <avrgcclist@localhost>; Sat, 19 Jan 2002 10:22:24 +1300
Received: from avr1.org
by localhost with POP3 (fetchmail-5.3.3)
for avrgcclist@localhost (single-drop); Sat, 19 Jan 2002 10:22:24 +1300 (NZDT)
Received: from majordomo2.host4u.net (majordomo2.host4u.net [209.150.128.179])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0IIFOj16756
for <[email-masked]>; Fri, 18 Jan 2002 12:15:24 -0600
Received: (from majordomo@localhost)
by majordomo2.host4u.net (8.11.6/8.11.6) id g0IGddC18245
for avr-gcc-list-list.japetos; Fri, 18 Jan 2002 10:39:39 -0600
Received: from japetos.host4u.net (japetos.host4u.net [216.71.64.154])
by majordomo2.host4u.net (8.11.6/8.11.6) with ESMTP id g0IGdcB18242
for <[email-masked]>; Fri, 18 Jan 2002 10:39:38 -0600
Received: from stargate.pd-ef.de (p3E9BF632.dip.t-dialin.net [62.155.246.50])
by japetos.host4u.net (8.11.6/8.11.6) with ESMTP id g0IGdIO31782
for <[email-masked]>; Fri, 18 Jan 2002 10:39:18 -0600
Received: from dce.pd-ef.ef (dce.pd-ef.ef [192.168.30.100])
by stargate.pd-ef.de (Postfix) with ESMTP id 002ABA793
for <[email-masked]>; Fri, 18 Jan 2002 17:39:14 +0100 (MET)
Received: from localhost (localhost [127.0.0.1])
by dce.pd-ef.ef (Postfix on SuSE Linux 7.2 (i386)) with ESMTP id 47029271CA
for <[email-masked]>; Fri, 18 Jan 2002 17:39:17 +0100 (CET)
Received: from prodesigncad.de (asic13.isytec.ef [192.168.30.113])
by dce.pd-ef.ef (Postfix on SuSE Linux 7.2 (i386)) with ESMTP id 64F3826C1C
for <[email-masked]>; Fri, 18 Jan 2002 17:39:16 +0100 (CET)
Message-ID: <[email-masked]>
Date: Fri, 18 Jan 2002 17:37:25 +0100
From: Matthias Lange <[email-masked]>
Organization: Pro Design
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.4-4GB i686)
X-Accept-Language: en
MIME-Version: 1.0
To: "[email-masked]" <[email-masked]>
Subject: [avr-gcc-list] Re: Patch for Win32 build of avr-gcc to support ATMega128
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS perl-11
Precedence: bulk
Sender: [email-masked]
Errors-To: [email-masked]
X-BeenThere: [email-masked]
X-Mailman-Version: 2.0
List-Help: <mailto:[email-masked]?subject=help>
List-Post: <mailto:[email-masked]>
List-Subscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=subscribe>
List-Id: avr-gcc mailing list <avr-gcc-list.avr.jpk.co.nz>
List-Unsubscribe: <http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list>,
<mailto:[email-masked]?subject=unsubscribe>
List-Archive: <http://avr.jpk.co.nz/pipermail/avr-gcc-list/>

Anton Erasmus wrote:

> Hi Matthias,
>
> Thanks for the iomacros.h additions.
>
> If your compiler build accepts the mcu=atmega128 option, then it
> already has support for the atmega128. It should not be
> neccessary to manually link with crtm128.o.
>
> If I specify mcu=atmega128 on the Win32 binary build from
> avrfreaks.net, then I get the error: cc1.exe: MCU `atmega128' not
> supported
>
> Regards
> Anton Erasmus

Hi Anton,

it is possible that my compiler has the 128 support. I tried several
patches and use the avr-libc-20020115, where I uncommented the 128
option in the configure file. But I didn't get it to work. I am not
really sure if I made som mistakes because I am a little new on Linux.
But with your crtm128.o it works and I can work again on my project.

Best regards

-Matthias Lange
avr-gcc-list at http://avr1.org