From MAILER-DAEMON Mon Aug 09 14:00:50 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1BuES2-0007Q4-6s for mharc-avr-libc-dev@gnu.org; Mon, 09 Aug 2004 14:00:50 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BuES0-0007OI-2w for avr-libc-dev@nongnu.org; Mon, 09 Aug 2004 14:00:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BuERy-0007NL-HY for avr-libc-dev@nongnu.org; Mon, 09 Aug 2004 14:00:46 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BuERy-0007MT-Eq for avr-libc-dev@nongnu.org; Mon, 09 Aug 2004 14:00:46 -0400 Received: from [204.162.124.33] (helo=TELECOMM2.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1BuENX-00037K-8x for avr-libc-dev@nongnu.org; Mon, 09 Aug 2004 13:56:12 -0400 Date: Mon, 09 Aug 2004 10:57:15 -0800 To: "Avr-libc-dev" From: "Harald.kipp" Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="--------tvtsogluvnhsxidvjclc" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: [avr-libc-dev] (no subject) X-BeenThere: avr-libc-dev@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of avr-libc development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Aug 2004 18:00:49 -0000 ----------tvtsogluvnhsxidvjclc Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" ----------tvtsogluvnhsxidvjclc-- From MAILER-DAEMON Mon Aug 09 17:53:48 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1BuI5U-0008FW-7P for mharc-avr-libc-dev@gnu.org; Mon, 09 Aug 2004 17:53:48 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BuI5R-0008Ec-Ag for avr-libc-dev@nongnu.org; Mon, 09 Aug 2004 17:53:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BuI5O-0008E9-Nl for avr-libc-dev@nongnu.org; Mon, 09 Aug 2004 17:53:43 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BuI5O-0008Dy-Em for avr-libc-dev@nongnu.org; Mon, 09 Aug 2004 17:53:42 -0400 Received: from [193.101.57.9] (helo=ida.interface-business.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BuI1a-00049a-0u for avr-libc-dev@nongnu.org; Mon, 09 Aug 2004 17:49:46 -0400 Received: by ida.interface-business.de (Postfix, from userid 107) id E85617A62; Mon, 9 Aug 2004 23:49:43 +0200 (MET DST) Date: Mon, 9 Aug 2004 23:49:43 +0200 From: Joerg Wunsch To: avr-libc-dev@nongnu.org Message-ID: <20040809214943.GA87627@ida.interface-business.de> Mail-Followup-To: avr-libc-dev@nongnu.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="PNTmBPCT7hxwcZjr" Content-Disposition: inline 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 User-Agent: Mutt/1.5.6i Subject: [avr-libc-dev] [Commit HEAD/1.0] updated twidemo X-BeenThere: avr-libc-dev@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Joerg Wunsch List-Id: Discussion of avr-libc development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Aug 2004 21:53:46 -0000 --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I just committed the attached patch to the twidemo example project. It allows running the demo off the default 1 MHz calibrated RC oscillator, albeit at reduced TWI speed only (compared to the goal of 100 kHz), due to the required minimum value for TWBR as per the datasheet. I tested it on an ATmega8. -- J"org Wunsch Unix support engineer joerg_wunsch@interface-systems.de http://www.interface-systems.de/~j/ --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="twitest.diff" 2004-08-09 Joerg Wunsch * doc/examples/twitest/twitest.c: Make it work on 1 MHz clock. * doc/examples/twitest/twitest.dox: Renumber annotations. Index: doc/examples/twitest/twitest.c =================================================================== RCS file: /cvsroot/avr-libc/avr-libc/doc/examples/twitest/twitest.c,v retrieving revision 1.1 diff -u -u -r1.1 twitest.c --- doc/examples/twitest/twitest.c 18 Dec 2002 22:35:38 -0000 1.1 +++ doc/examples/twitest/twitest.c 9 Aug 2004 21:09:24 -0000 @@ -98,19 +98,33 @@ ioinit(void) { - UCSRB = _BV(TXEN); /* tx enable */ +#if SYSCLK <= 1000000UL + /* + * Note [4] + * Slow system clock, double Baud rate to improve rate error. + */ + UCSRA = _BV(U2X); + UBRR = (SYSCLK / (8 * 9600UL)) - 1; /* 9600 Bd */ +#else UBRR = (SYSCLK / (16 * 9600UL)) - 1; /* 9600 Bd */ +#endif + UCSRB = _BV(TXEN); /* tx enable */ /* initialize TWI clock: 100 kHz clock, TWPS = 0 => prescaler = 1 */ #if defined(TWPS0) /* has prescaler (mega128 & newer) */ TWSR = 0; #endif + +#if SYSCLK < 3600000UL + TWBR = 10; /* smallest TWBR value, see note [5] */ +#else TWBR = (SYSCLK / 100000UL - 16) / 2; +#endif } /* - * Note [4] + * Note [6] * Send character c down the UART Tx, wait until tx holding register * is empty. */ @@ -126,7 +140,7 @@ } /* - * Note [5] + * Note [7] * * Read "len" bytes from EEPROM starting at "eeaddr" into "buf". * @@ -152,7 +166,7 @@ sla = TWI_SLA_24CXX | (((eeaddr >> 8) & 0x07) << 1); /* - * Note [6] + * Note [8] * First cycle: master transmitter mode */ restart: @@ -168,7 +182,7 @@ case TW_START: break; - case TW_MT_ARB_LOST: /* Note [7] */ + case TW_MT_ARB_LOST: /* Note [9] */ goto begin; default: @@ -176,7 +190,7 @@ /* NB: do /not/ send stop condition */ } - /* Note [8] */ + /* Note [10] */ /* send SLA+W */ TWDR = sla | TW_WRITE; TWCR = _BV(TWINT) | _BV(TWEN); /* clear interrupt to start transmission */ @@ -187,7 +201,7 @@ break; case TW_MT_SLA_NACK: /* nack during select: device busy writing */ - /* Note [9] */ + /* Note [11] */ goto restart; case TW_MT_ARB_LOST: /* re-arbitrate */ @@ -196,7 +210,7 @@ default: goto error; /* must send stop condition */ } - + TWDR = eeaddr; /* low 8 bits of addr */ TWCR = _BV(TWINT) | _BV(TWEN); /* clear interrupt to start transmission */ while ((TWCR & _BV(TWINT)) == 0) ; /* wait for transmission */ @@ -216,7 +230,7 @@ } /* - * Note [10] + * Note [12] * Next cycle(s): master receiver mode */ TWCR = _BV(TWINT) | _BV(TWSTA) | _BV(TWEN); /* send (rep.) start condition */ @@ -253,7 +267,7 @@ goto error; } - for (twcr = _BV(TWINT) | _BV(TWEN) | _BV(TWEA) /* Note [11] */; + for (twcr = _BV(TWINT) | _BV(TWEN) | _BV(TWEA) /* Note [13] */; len > 0; len--) { @@ -276,7 +290,7 @@ } } quit: - /* Note [12] */ + /* Note [14] */ TWCR = _BV(TWINT) | _BV(TWSTO) | _BV(TWEN); /* send stop condition */ return rv; @@ -326,7 +340,7 @@ return -1; begin: - /* Note 13 */ + /* Note [15] */ TWCR = _BV(TWINT) | _BV(TWSTA) | _BV(TWEN); /* send start condition */ while ((TWCR & _BV(TWINT)) == 0) ; /* wait for transmission */ switch ((twst = TW_STATUS)) @@ -361,7 +375,7 @@ default: goto error; /* must send stop condition */ } - + TWDR = eeaddr; /* low 8 bits of addr */ TWCR = _BV(TWINT) | _BV(TWEN); /* clear interrupt to start transmission */ while ((TWCR & _BV(TWINT)) == 0) ; /* wait for transmission */ @@ -388,7 +402,7 @@ switch ((twst = TW_STATUS)) { case TW_MT_DATA_NACK: - goto error; /* device write protected -- Note [14] */ + goto error; /* device write protected -- Note [16] */ case TW_MT_DATA_ACK: rv++; Index: doc/examples/twitest/twitest.dox =================================================================== RCS file: /cvsroot/avr-libc/avr-libc/doc/examples/twitest/twitest.dox,v retrieving revision 1.4 diff -u -u -r1.4 twitest.dox --- doc/examples/twitest/twitest.dox 23 Jul 2004 21:24:39 -0000 1.4 +++ doc/examples/twitest/twitest.dox 9 Aug 2004 21:09:25 -0000 @@ -123,10 +123,24 @@ \par Note [4] +For slow clocks, enable the 2 x U[S]ART clock multiplier, to improve +the baud rate error. This will allow a 9600 Bd communication using +the standard 1 MHz calibrated RC oscillator. See also the Baud rate +tables in the datasheets. + +\par Note [5] + +The datasheet explains why a minimum TWBR value of 10 should be +maintained when running in master mode. Thus, for system clocks below +3.6 MHz, we cannot run the bus at the intented clock rate of 100 kHz +but have to slow down accordingly. + +\par Note [6] + This function is used by the standard output facilities that are utilized in this example for debugging and demonstration purposes. -\par Note [5] +\par Note [7] In order to shorten the data to be sent over the TWI bus, the 24Cxx EEPROMs support multiple data bytes transfered within a single @@ -136,7 +150,7 @@ would wrap around and start back from 0 when reaching the end of the device). -\par Note [6] +\par Note [8] When reading the EEPROM, a first device selection must be made with write intent (R/~W bit set to 0 indicating a write operation) in order @@ -150,7 +164,7 @@ required when using a true interrupt routine, since as soon as TWINT is re-asserted, the next bus transaction will start. -\par Note [7] +\par Note [9] Since the TWI bus is multi-master capable, there is potential for a bus contention when one master starts to access the bus. Normally, @@ -167,7 +181,7 @@ start condition to be initiated, which will normally be delayed until the currently active master has released the bus. -\par Note [8] +\par Note [10] Next, the device slave is going to be reselected (using a so-called repeated start condition which is meant to guarantee that the bus @@ -176,7 +190,7 @@ order to request the device slave to start transfering data from the slave to the master in the next packet. -\par Note [9] +\par Note [11] If the EEPROM device is still busy writing one or more cells after a previous write request, it will simply leave its bus interface drivers @@ -193,7 +207,7 @@ device is declared to be not responding at all, and an error is returned, will be limited to MAX_ITER. -\par Note [10] +\par Note [12] This is called master receiver mode: the bus master still supplies the SCL clock, but the device slave drives the SDA line with @@ -204,19 +218,19 @@ ACK is handled by setting the TWEA bit in TWCR when starting the current transfer. -\par Note [11] +\par Note [13] The control word sent out in order to initiate the transfer of the next data packet is initially set up to assert the TWEA bit. During the last loop iteration, TWEA is de-asserted so the client will get informed that no further transfer is desired. -\par Note [12] +\par Note [14] Except in the case of lost arbitration, all bus transactions must properly be terminated by the master initiating a stop condition. -\par Note [13] +\par Note [15] Writing to the EEPROM device is simpler than reading, since only a master transmitter mode transfer is needed. Note that the first @@ -228,7 +242,7 @@ at the indicated address. The internal address pointer will be incremented after each write operation. -\par Note [14] +\par Note [16] 24Cxx devices can become write-protected by strapping their ~WC pin to logic high. (Leaving it unconnected is explicitly allowed, and --PNTmBPCT7hxwcZjr-- From MAILER-DAEMON Fri Aug 13 04:50:33 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1BvXlg-0002KB-Q9 for mharc-avr-libc-dev@gnu.org; Fri, 13 Aug 2004 04:50:32 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BvXle-0002K6-Fq for avr-libc-dev@nongnu.org; Fri, 13 Aug 2004 04:50:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BvXlc-0002Ju-Jn for avr-libc-dev@nongnu.org; Fri, 13 Aug 2004 04:50:30 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BvXlc-0002Jr-BN for avr-libc-dev@nongnu.org; Fri, 13 Aug 2004 04:50:28 -0400 Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1BvXhY-0000tb-Ul for avr-libc-dev@nongnu.org; Fri, 13 Aug 2004 04:46:17 -0400 Received: (qmail 10914 invoked by uid 0); 13 Aug 2004 08:46:05 -0000 Received: from 62.245.186.163 by www40.gmx.net with HTTP; Fri, 13 Aug 2004 10:46:05 +0200 (MEST) Date: Fri, 13 Aug 2004 10:46:05 +0200 (MEST) From: "Alexander Stohr" To: avr-libc-dev@nongnu.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="========GMXBoundary32461092386765" X-Priority: 3 (Normal) X-Authenticated: #15156664 Message-ID: <3246.1092386765@www40.gmx.net> X-Mailer: WWW-Mail 1.6 (Global Message Exchange) X-Flags: 0001 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: [avr-libc-dev] [patch] strpbrk X-BeenThere: avr-libc-dev@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of avr-libc development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Aug 2004 08:50:30 -0000 This is a MIME encapsulated multipart message - please use a MIME-compliant e-mail program to open it. Dies ist eine mehrteilige Nachricht im MIME-Format - bitte verwenden Sie zum Lesen ein MIME-konformes Mailprogramm. --========GMXBoundary32461092386765 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello, the attached patch adds the strpbrk function to avr-libc. i have tested it in a standalone program, but non-nicely failed on the CVS version of the sources where the patch was worked in due to a bunch of strange AMDEP problems (maybe its a problem with the version autoconf toolset on my local machine). thus perform one explicit compilation check when integrating. -Alex. (i am subscribed to some avr lists, but not sure right her if libc is amongst them - so please CC me on any talkbacks) PS: submitting this patch means i agree with publisihing under the same license that avr-libc is released, even if its not GPL v2 or higher. -- NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler! GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl --========GMXBoundary32461092386765-- From MAILER-DAEMON Fri Aug 13 04:55:31 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1BvXqV-0003mA-Dn for mharc-avr-libc-dev@gnu.org; Fri, 13 Aug 2004 04:55:31 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BvXqS-0003lj-SL for avr-libc-dev@nongnu.org; Fri, 13 Aug 2004 04:55:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BvXqQ-0003l8-NV for avr-libc-dev@nongnu.org; Fri, 13 Aug 2004 04:55:28 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BvXqQ-0003km-6U for avr-libc-dev@nongnu.org; Fri, 13 Aug 2004 04:55:26 -0400 Received: from [193.101.57.9] (helo=ida.interface-business.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BvXlx-0001TG-Vd for avr-libc-dev@nongnu.org; Fri, 13 Aug 2004 04:50:50 -0400 Received: by ida.interface-business.de (Postfix, from userid 107) id 148AF7A62; Fri, 13 Aug 2004 10:50:49 +0200 (MET DST) Date: Fri, 13 Aug 2004 10:50:48 +0200 From: Joerg Wunsch To: Alexander Stohr Subject: Re: [avr-libc-dev] [patch] strpbrk Message-ID: <20040813085048.GE12206@ida.interface-business.de> Mail-Followup-To: Alexander Stohr , avr-libc-dev@nongnu.org References: <3246.1092386765@www40.gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3246.1092386765@www40.gmx.net> 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 User-Agent: Mutt/1.5.6i Cc: avr-libc-dev@nongnu.org X-BeenThere: avr-libc-dev@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Joerg Wunsch List-Id: Discussion of avr-libc development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Aug 2004 08:55:29 -0000 As Alexander Stohr wrote: > the attached patch adds the strpbrk function to avr-libc. Great! > PS: submitting this patch means i agree with publisihing under the > same license that avr-libc is released, even if its not GPL v2 or > higher. Fine. Since it's going to be a separate file, it would be best if you cloned one of the existing copyright notices, and put it on top of your file. (The license is a cut-down BSD license, which allows the incorporation of the code e.g. into an embedded system without requiring the potential user to offer the source code.) Only one minor nit: where's the patch? ;-) -- J"org Wunsch Unix support engineer joerg_wunsch@interface-systems.de http://www.interface-systems.de/~j/ From MAILER-DAEMON Fri Aug 13 06:01:33 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1BvYsP-0008SQ-IL for mharc-avr-libc-dev@gnu.org; Fri, 13 Aug 2004 06:01:33 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BvYsM-0008SK-SK for avr-libc-dev@nongnu.org; Fri, 13 Aug 2004 06:01:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BvYsL-0008S8-7f for avr-libc-dev@nongnu.org; Fri, 13 Aug 2004 06:01:29 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BvYsK-0008S5-LD for avr-libc-dev@nongnu.org; Fri, 13 Aug 2004 06:01:29 -0400 Received: from [199.232.41.5] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1BvYo7-0001FA-RL for avr-libc-dev@nongnu.org; Fri, 13 Aug 2004 05:57:07 -0400 Received: from localhost ([127.0.0.1]) by savannah.gnu.org with smtp (Exim 4.34) id 1BvYoH-0006EJ-Qh for avr-libc-dev@nongnu.org; Fri, 13 Aug 2004 05:57:18 -0400 From: "anonymous" To: avr-libc-dev@nongnu.org X-Savannah-Server: savannah.nongnu.org:80 [199.232.41.4] X-Savannah-Project: avr-libc X-Savannah-Artifact: bugs X-Savannah-Artifact-ID: 10001 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) X-Apparently-From: 62.238.255.224 X-Copy-To: Array Message-Id: Date: Fri, 13 Aug 2004 06:01:29 -0400 Subject: [avr-libc-dev] [bugs #10001] error in iomx8.h TIMSK1 and 2 WinAVR-20040720 X-BeenThere: avr-libc-dev@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of avr-libc development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Aug 2004 10:01:31 -0000 This mail is an automated notification from the bugs tracker of the project: AVR C Runtime Library. /**************************************************************************/ [bugs #10001] Full Item Snapshot: URL: Project: AVR C Runtime Library Submitted by: 0 On: Fri 08/13/04 at 05:57 Category: Header Severity: 5 - Average Item Group: None Resolution: None Assigned to: None Originator Email: D.Kleppe@dci-electronics.nl Status: Open Summary: error in iomx8.h TIMSK1 and 2 WinAVR-20040720 Original Submission: WinAVR-20040720: The OCIExA and B defines are wrong this is correct: /* TIMSK1 */ #define ICIE1 5 #define OCIE1B 2 #define OCIE1A 1 #define TOIE1 0 /* TIMSK2 */ #define OCIE2B 2 #define OCIE2A 1 #define TOIE2 0 For detailed info, follow this link: _______________________________________________ Message sent via/by Savannah http://savannah.nongnu.org/ From MAILER-DAEMON Fri Aug 13 18:22:29 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1BvkRR-0008Mz-Mv for mharc-avr-libc-dev@gnu.org; Fri, 13 Aug 2004 18:22:29 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BvkRP-0008MW-6Q for avr-libc-dev@nongnu.org; Fri, 13 Aug 2004 18:22:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BvkRO-0008MC-9r for avr-libc-dev@nongnu.org; Fri, 13 Aug 2004 18:22:26 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BvkRO-0008M2-4c for avr-libc-dev@nongnu.org; Fri, 13 Aug 2004 18:22:26 -0400 Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1BvkMc-0003iK-Iv for avr-libc-dev@nongnu.org; Fri, 13 Aug 2004 18:17:30 -0400 Received: (qmail 15158 invoked by uid 65534); 13 Aug 2004 22:17:21 -0000 Received: from 1Cust113.tnt11.muc2.deu.da.uu.net (EHLO alexs) (149.225.158.113) by mail.gmx.net (mp003) with SMTP; 14 Aug 2004 00:17:21 +0200 X-Authenticated: #15156664 Message-ID: <001601c48183$546c5060$8511050a@alexs> From: "Alexander Stohr" To: Date: Sat, 14 Aug 2004 00:16:55 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0013_01C48194.026171E0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: avr-libc-dev@nongnu.org Subject: [avr-libc-dev] Fw: [patch] strpbrk X-BeenThere: avr-libc-dev@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of avr-libc development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Aug 2004 22:22:27 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0013_01C48194.026171E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit whereever that attachment went... (seems to be a habit of nongnu.org mailing lists for a few subscribers only) i am now inlining the patch as text. (if it still fails, i have to "try" the web interface) BSD license is okay for me as well. add the comments that do make this clear. now its dual licensed giving two choices. -Alex. diff -Nur avr-libc-snapshot-2004-08-13.orig/include/string.h avr-libc-snapshot-2004-08-13/include/string.h --- avr-libc-snapshot-2004-08-13.orig/include/string.h 2003-08-11 23:42:13.000000000 +0200 +++ avr-libc-snapshot-2004-08-13/include/string.h 2004-08-13 09:08:40.000000000 +0200 @@ -76,6 +76,7 @@ extern char *strncpy(char *, const char *, size_t); extern int strncasecmp(const char *, const char *, size_t) __ATTR_PURE__; extern size_t strnlen(const char *, size_t) __ATTR_PURE__; +extern char *strpbrk(const char *s, const char *accept); extern char *strrchr(const char *, int) __ATTR_PURE__; extern char *strrev(char *); extern char *strsep(char **, const char *) __ATTR_PURE__; diff -Nur avr-libc-snapshot-2004-08-13.orig/libc/string/Makefile.am avr-libc-snapshot-2004-08-13/libc/string/Makefile.am --- avr-libc-snapshot-2004-08-13.orig/libc/string/Makefile.am 2003-06-19 22:11:29.000000000 +0200 +++ avr-libc-snapshot-2004-08-13/libc/string/Makefile.am 2004-08-13 09:10:11.000000000 +0200 @@ -30,7 +30,8 @@ noinst_LIBRARIES = lib.a -lib_a_c_sources = +lib_a_c_sources = \ + strpbrk.c \ lib_a_asm_sources = \ memccpy.S \ diff -Nur avr-libc-snapshot-2004-08-13.orig/libc/string/strpbrk.c avr-libc-snapshot-2004-08-13/libc/string/strpbrk.c --- avr-libc-snapshot-2004-08-13.orig/libc/string/strpbrk.c 1970-01-01 01:00:00.000000000 +0100 +++ avr-libc-snapshot-2004-08-13/libc/string/strpbrk.c 2004-08-13 09:12:07.000000000 +0200 @@ -0,0 +1,13 @@ +/* (C) 2004 by Alexander Stohr (alexander dot stohr at gmx dot de) */ +/* License: GPL v2 or higher */ + +#include + +char *strpbrk(const char *s, const char *accept) +{ char *p = (char *)s; + while (*p) + { if (strchr(accept, *p) != 0) return p; + p++; + } + return 0; +} ----- Original Message ----- From: "Alexander Stohr" To: Sent: Friday, August 13, 2004 10:46 AM Subject: [patch] strpbrk > Hello, > > the attached patch adds the strpbrk function to avr-libc. > > i have tested it in a standalone program, but non-nicely failed > on the CVS version of the sources where the patch was worked in > due to a bunch of strange AMDEP problems (maybe its a problem > with the version autoconf toolset on my local machine). > thus perform one explicit compilation check when integrating. > > -Alex. (i am subscribed to some avr lists, but not sure right her > if libc is amongst them - so please CC me on any talkbacks) > > PS: submitting this patch means i agree with publisihing under the > same license that avr-libc is released, even if its not GPL v2 or higher. > > -- > NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler! > GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl ------=_NextPart_000_0013_01C48194.026171E0-- From MAILER-DAEMON Tue Aug 17 11:13:14 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1Bx5eE-00088B-56 for mharc-avr-libc-dev@gnu.org; Tue, 17 Aug 2004 11:13:14 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Bx0na-0005l5-3u for avr-libc-dev@nongnu.org; Tue, 17 Aug 2004 06:02:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Bx0nW-0005iX-AW for avr-libc-dev@nongnu.org; Tue, 17 Aug 2004 06:02:31 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bx0nV-0005iD-Qs for avr-libc-dev@nongnu.org; Tue, 17 Aug 2004 06:02:29 -0400 Received: from [81.28.224.28] (helo=smtp.variomedia.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bx0jG-00083v-46 for avr-libc-dev@nongnu.org; Tue, 17 Aug 2004 05:58:06 -0400 Received: from [83.129.203.216] (helo=hugo.local) by vm16.variomedia.de with asmtp (Exim 4.30) id 1Bx0e2-0006SY-Re for avr-libc-dev@nongnu.org; Tue, 17 Aug 2004 11:52:43 +0200 Received: from localhost (localhost [127.0.0.1]) by hugo.local (Postfix) with ESMTP id 2D0F26EF83 for ; Tue, 17 Aug 2004 11:58:04 +0200 (CEST) Received: from by localhost (amavisd-new, port ) id XXKQMv0R for ; Tue, 17 Aug 2004 11:58:03 +0200 (CEST) Received: by hugo.local (Postfix, from userid 500) id BE3396EF88; Tue, 17 Aug 2004 11:58:03 +0200 (CEST) Date: Tue, 17 Aug 2004 11:58:03 +0200 From: Bernhard Walle To: avr-libc-dev@nongnu.org Message-ID: <20040817095803.GC2319@mail1.bwalle.de> Mail-Followup-To: avr-libc-dev@nongnu.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0F1p//8PRICkK4MW" Content-Disposition: inline X-PGP-Key-ID: 0xDDAF6454 X-PGP-Fingerprint: F61F 34CC 09CA FB82 C9F6 BA4B 8865 3696 DDAF 6454 User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at local X-Relay-User: bernhard@bwalle.de X-Mailman-Approved-At: Tue, 17 Aug 2004 11:13:12 -0400 Subject: [avr-libc-dev] RPM packages X-BeenThere: avr-libc-dev@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of avr-libc development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2004 10:02:35 -0000 --0F1p//8PRICkK4MW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, I made RPM packages for the GNU Toolchain, including avr-libc. They are built on SuSE 9.0, but at least the SRPMs should work on every RPM-based distribution. The packages install all the stuff in /opt/avr, a login script is included (/etc/profile.d) that puts all in $PATH, $MANPATH, $INFOPATH. You may put a link on the homepage:=20 =20 http://turing.fh-landshut.de/~bwalle/avr/=20 Regards, Bernhard --0F1p//8PRICkK4MW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBIdariGU2lt2vZFQRAvKvAJ9vtV/XSyuN3aSOU/FFHYPYSB4UMACgsR03 6bZz1BsumziEGJcEIGbfeWk= =LQKT -----END PGP SIGNATURE----- --0F1p//8PRICkK4MW-- From MAILER-DAEMON Thu Aug 19 16:27:04 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1BxtV2-0001kL-L6 for mharc-avr-libc-dev@gnu.org; Thu, 19 Aug 2004 16:27:04 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BxtV1-0001kG-9L for avr-libc-dev@nongnu.org; Thu, 19 Aug 2004 16:27:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BxtUz-0001k4-Pe for avr-libc-dev@nongnu.org; Thu, 19 Aug 2004 16:27:03 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BxtUz-0001k1-M2 for avr-libc-dev@nongnu.org; Thu, 19 Aug 2004 16:27:01 -0400 Received: from [199.232.41.5] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1BxtQE-0005tr-0M for avr-libc-dev@nongnu.org; Thu, 19 Aug 2004 16:22:06 -0400 Received: from localhost ([127.0.0.1]) by savannah.gnu.org with smtp (Exim 4.34) id 1BxtQS-0003Oc-Q0 for avr-libc-dev@nongnu.org; Thu, 19 Aug 2004 16:22:21 -0400 From: "anonymous" To: avr-libc-dev@nongnu.org X-Savannah-Server: savannah.nongnu.org:80 [199.232.41.4] X-Savannah-Project: avr-libc X-Savannah-Artifact: bugs X-Savannah-Artifact-ID: 10068 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803 X-Apparently-From: 24.108.180.197 X-Copy-To: Array Message-Id: Date: Thu, 19 Aug 2004 16:27:02 -0400 Subject: [avr-libc-dev] [bugs #10068] vfscanf fails to properly process multiple floating point numbers. X-BeenThere: avr-libc-dev@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of avr-libc development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2004 20:27:03 -0000 This mail is an automated notification from the bugs tracker of the project: AVR C Runtime Library. /**************************************************************************/ [bugs #10068] Full Item Snapshot: URL: Project: AVR C Runtime Library Submitted by: 0 On: Thu 08/19/2004 at 20:22 Category: Library Severity: 5 - Average Item Group: None Resolution: None Assigned to: None Originator Email: avr@aml.bc.ca Status: Open Summary: vfscanf fails to properly process multiple floating point numbers. Original Submission: Hi, In the vfcsanf function the array fltchars location 10 and 12 are set to zero to prevent multiple occurrences of the 'e' and '.' characters in the floating point conversion case statement. Unfortunately the array is not restored for the next value. Thanks Brent For detailed info, follow this link: _______________________________________________ Message sent via/by Savannah http://savannah.nongnu.org/ From MAILER-DAEMON Fri Aug 20 12:38:19 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1ByCPD-0001GQ-Dk for mharc-avr-libc-dev@gnu.org; Fri, 20 Aug 2004 12:38:19 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1ByCPC-0001F2-DQ for avr-libc-dev@nongnu.org; Fri, 20 Aug 2004 12:38:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1ByCPA-0001CQ-T2 for avr-libc-dev@nongnu.org; Fri, 20 Aug 2004 12:38:18 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1ByCPA-0001CG-O3 for avr-libc-dev@nongnu.org; Fri, 20 Aug 2004 12:38:16 -0400 Received: from [199.232.41.5] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1ByCKP-00019T-7Q for avr-libc-dev@nongnu.org; Fri, 20 Aug 2004 12:33:21 -0400 Received: from localhost ([127.0.0.1]) by savannah.gnu.org with smtp (Exim 4.34) id 1ByCKf-0000LC-GZ for avr-libc-dev@nongnu.org; Fri, 20 Aug 2004 12:33:37 -0400 From: "anonymous" To: avr-libc-dev@nongnu.org X-Savannah-Server: savannah.nongnu.org:80 [199.232.41.4] X-Savannah-Project: avr-libc X-Savannah-Artifact: bugs X-Savannah-Artifact-ID: 10078 User-Agent: Mozilla/5.0 (compatible; Konqueror/3.2; Linux) (KHTML, like Gecko) X-Apparently-From: 64.207.12.107 X-Copy-To: Array Message-Id: Date: Fri, 20 Aug 2004 12:38:18 -0400 Subject: [avr-libc-dev] [bugs #10078] strsep() should not be pure X-BeenThere: avr-libc-dev@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of avr-libc development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2004 16:38:18 -0000 This mail is an automated notification from the bugs tracker of the project: AVR C Runtime Library. /**************************************************************************/ [bugs #10078] Full Item Snapshot: URL: Project: AVR C Runtime Library Submitted by: 0 On: Fri 08/20/2004 at 16:33 Category: Header Severity: 5 - Average Item Group: None Resolution: None Assigned to: None Originator Email: gwossum@acm.org Status: Open Summary: strsep() should not be pure Original Submission: strsep() is defined as pure (__ATTR_PURE__) in the avr-libc string.h file. It should not be, as it modifies its parameters, causing the result to change each time it is called. Due to the __ATTR_PURE__ declaration, calls to strsep() are optimized away when they should not be, causing puzzling errors. File Attachments ------------------- ------------------------------------------------------- Date: Fri 08/20/2004 at 16:33 Name: strsep-pure.diff Size: 570B By: None Patch against avr-libc-1.0.4 sources to remove pure attribute from strsep http://savannah.nongnu.org/bugs/download.php?item_id=10078&item_file_id=1590 For detailed info, follow this link: _______________________________________________ Message sent via/by Savannah http://savannah.nongnu.org/ From MAILER-DAEMON Fri Aug 20 12:42:20 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1ByCT6-0002Os-Cg for mharc-avr-libc-dev@gnu.org; Fri, 20 Aug 2004 12:42:20 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1ByCT4-0002OX-OC for avr-libc-dev@nongnu.org; Fri, 20 Aug 2004 12:42:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1ByCT3-0002O5-5P for avr-libc-dev@nongnu.org; Fri, 20 Aug 2004 12:42:18 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1ByCT3-0002O2-1S for avr-libc-dev@nongnu.org; Fri, 20 Aug 2004 12:42:17 -0400 Received: from [64.207.12.107] (helo=lrssbs.LONGRANGE.LOCAL) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ByCOX-0001gU-Al for avr-libc-dev@nongnu.org; Fri, 20 Aug 2004 12:37:37 -0400 Received: from your-2s4kn5k0h3 ([192.168.0.145]) by lrssbs.LONGRANGE.LOCAL with Microsoft SMTPSVC(5.0.2195.6713); Fri, 20 Aug 2004 11:39:43 -0500 From: Geoffrey Wossum To: avr-libc-dev@nongnu.org Date: Fri, 20 Aug 2004 11:38:41 -0500 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_RkiJBDb6p+SEinA" Message-Id: <200408201138.41402.geoffrey@pager.net> X-OriginalArrivalTime: 20 Aug 2004 16:39:43.0390 (UTC) FILETIME=[4BAAF3E0:01C486D4] Subject: [avr-libc-dev] strsep() should not be pure X-BeenThere: avr-libc-dev@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of avr-libc development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2004 16:42:18 -0000 --Boundary-00=_RkiJBDb6p+SEinA Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I just submitted a bug, #10078, about avr-libc having strsep() declared with __ATTR_PURE__, along with a patch to remove it. strsep() should not be pure, as you can not optimize calls to it away. This created all kinds of weird bugs in my code that would go away when I would add debugging printf()'s. I thought I was losing my mind, and my programs started spitting out all kinds of useless debug information their serial ports because that would make the problem go away. Without the __ATTR_PURE__, I don't need the debug statements for it to work right anymore ^_^ Attaching the patch here also... --- Geoffrey Wossum Software Engineer Long Range Systems - http://www.pager.net --Boundary-00=_RkiJBDb6p+SEinA Content-Type: text/x-diff; charset="us-ascii"; name="strsep-pure.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="strsep-pure.diff" --- include/string.h 2003-08-11 16:42:13.000000000 -0500 +++ /usr/local/avr-1.0.4/avr/include/string.h 2004-08-20 11:29:14.614158216 -0500 @@ -78,7 +78,7 @@ extern size_t strnlen(const char *, size_t) __ATTR_PURE__; extern char *strrchr(const char *, int) __ATTR_PURE__; extern char *strrev(char *); -extern char *strsep(char **, const char *) __ATTR_PURE__; +extern char *strsep(char **, const char *); extern char *strstr(const char *, const char *) __ATTR_PURE__; extern char *strtok_r(char *, const char *, char **) __ATTR_PURE__; extern char *strupr(char *); --Boundary-00=_RkiJBDb6p+SEinA-- From MAILER-DAEMON Sun Aug 22 11:51:16 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1Byucm-0007un-J5 for mharc-avr-libc-dev@gnu.org; Sun, 22 Aug 2004 11:51:16 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Byuck-0007uV-LX for avr-libc-dev@nongnu.org; Sun, 22 Aug 2004 11:51:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Byucj-0007uC-ND for avr-libc-dev@nongnu.org; Sun, 22 Aug 2004 11:51:14 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Byucj-0007u9-Kq for avr-libc-dev@nongnu.org; Sun, 22 Aug 2004 11:51:13 -0400 Received: from [217.160.92.226] (helo=p15095813.pureserver.info) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ByuYB-0007zu-MO for avr-libc-dev@nongnu.org; Sun, 22 Aug 2004 11:46:31 -0400 Received: from nissiros.egnite.de (pD9E13BF8.dip.t-dialin.net [217.225.59.248]) by p15095813.pureserver.info (Postfix) with ESMTP id 7F5AD2F42F7 for ; Sun, 22 Aug 2004 17:46:29 +0200 (CEST) Message-Id: <5.1.1.6.0.20040822171935.01b973d0@egnite.de> X-Sender: web2p2@egnite.de X-Mailer: QUALCOMM Windows Eudora Version 5.1.1 Date: Sun, 22 Aug 2004 17:46:37 +0200 To: "Avr-libc-dev" From: Harald Kipp Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: [avr-libc-dev] Determine defined port X-BeenThere: avr-libc-dev@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of avr-libc development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2004 15:51:14 -0000 Hi all, I stumbled over the following pre-processor problem. Somewhere in an include file there's a macro #define MY_PORT PORTC User's should be able to adapt the program to their hardware be simply changing this include file. To make the code independent from the specified port, I need something like #if (MY_PORT == PORTC) /* Do something PORTC specific, like disabling XMEM */ #endif sbi(MY_PORT, 7); Obviously this won't work, because PORTC is an already dereferenced volatile pointer. No chance to retrieve the pointer address, right? I could enumerate the ports by #define GPIO_A 1 ... #define GPIO_C 3 ... and replace the macro MY_PORT in the configuration header by /* Please use GPIO_A for PORTA, GPIO_B for PORTB etc. */ #define MY_GPIO GPIO_C and further define #if (MY_GPIO == GPIO_C) #define MY_PORT PORTC #endif for any port available, so finally /* GPIO_C refers to PORTC */ #if (MY_GPIO == GPIO_C) /* Do something PORTC specific, like disabling XMEM */ #endif sbi(MY_PORT, 7); will give the expected result. Any ideas for a simpler and less confusing method? Thanks for your time, Harald P.S.: I just recognized I sent an empty message to this list some time ago. I'm sorry for that. From MAILER-DAEMON Sun Aug 22 12:40:19 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1ByvOF-0007HA-Eb for mharc-avr-libc-dev@gnu.org; Sun, 22 Aug 2004 12:40:19 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1ByvOD-0007Fo-PQ for avr-libc-dev@nongnu.org; Sun, 22 Aug 2004 12:40:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1ByvOC-0007Fc-Ak for avr-libc-dev@nongnu.org; Sun, 22 Aug 2004 12:40:17 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1ByvOC-0007FZ-6Q for avr-libc-dev@nongnu.org; Sun, 22 Aug 2004 12:40:16 -0400 Received: from [217.160.92.226] (helo=p15095813.pureserver.info) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ByvJU-0000FV-V0 for avr-libc-dev@nongnu.org; Sun, 22 Aug 2004 12:35:25 -0400 Received: from nissiros.egnite.de (pD9E13BF8.dip.t-dialin.net [217.225.59.248]) by p15095813.pureserver.info (Postfix) with ESMTP id A541C2F42F5 for ; Sun, 22 Aug 2004 18:35:23 +0200 (CEST) Message-Id: <5.1.1.6.0.20040822182147.01b9cec0@egnite.de> X-Sender: web2p2@egnite.de X-Mailer: QUALCOMM Windows Eudora Version 5.1.1 Date: Sun, 22 Aug 2004 18:35:31 +0200 To: "Avr-libc-dev" From: Harald Kipp Subject: Re: [avr-libc-dev] Determine defined port In-Reply-To: <5.1.1.6.0.20040822171935.01b973d0@egnite.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-BeenThere: avr-libc-dev@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of avr-libc development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2004 16:40:18 -0000 I found a simpler solution myself by using the ## operator. The user specifies what he easily understands #define MY_PORT PORTC There is still an enumerated list required #define GPIO_PORTA 1 ... #define GPIO_PORTC 3 ... but it is hidden from the user. The code will use #define MY_GPIO GPIO_##MY_PORT and #if (MY_GPIO == GPIO_PORTC) ... #endif sbi(MY_PORT, 7); will allow to add port specific code. Yeah, I was too fast with asking questions, but may be one day someone else benefits from this monologue. :-) Thanks again, Harald From MAILER-DAEMON Mon Aug 23 11:22:29 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1BzGeS-0005Kt-Ul for mharc-avr-libc-dev@gnu.org; Mon, 23 Aug 2004 11:22:29 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BzGeR-0005KW-7o for avr-libc-dev@nongnu.org; Mon, 23 Aug 2004 11:22:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BzGeP-0005KG-Cf for avr-libc-dev@nongnu.org; Mon, 23 Aug 2004 11:22:26 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BzGeP-0005K6-BL for avr-libc-dev@nongnu.org; Mon, 23 Aug 2004 11:22:25 -0400 Received: from [66.17.141.91] (helo=www.evcohs.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1BzGZU-0000Ee-FH for avr-libc-dev@nongnu.org; Mon, 23 Aug 2004 11:17:20 -0400 Received: (qmail 546 invoked from network); 23 Aug 2004 15:17:17 -0000 Received: from unknown (HELO [127.0.0.1]) (66.180.104.54) by 66.17.141.91 with SMTP; Mon, 23 Aug 2004 15:17:17 +0000 Message-ID: <412A0A75.1030003@evcohs.com> Date: Mon, 23 Aug 2004 09:17:09 -0600 From: "E. Weddington" User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Harald Kipp Subject: Re: [avr-libc-dev] Determine defined port References: <5.1.1.6.0.20040822171935.01b973d0@egnite.de> In-Reply-To: <5.1.1.6.0.20040822171935.01b973d0@egnite.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Avr-libc-dev X-BeenThere: avr-libc-dev@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of avr-libc development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2004 15:22:27 -0000 Harald Kipp wrote: > Hi all, > > I stumbled over the following pre-processor problem. > > Somewhere in an include file there's a macro > > #define MY_PORT PORTC > > User's should be able to adapt the program to their hardware > be simply changing this include file. > > To make the code independent from the specified port, > I need something like > > #if (MY_PORT == PORTC) > /* Do something PORTC specific, like disabling XMEM */ > #endif > sbi(MY_PORT, 7); > > Obviously this won't work, because PORTC is an already dereferenced > volatile pointer. No chance to retrieve the pointer address, right? > Actually you *can* retrieve the pointer address. The register names can be used as variables, so you can take the address of it like so: &PORTC HTH Eric From MAILER-DAEMON Mon Aug 23 13:54:55 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1BzJ1z-0004tG-4S for mharc-avr-libc-dev@gnu.org; Mon, 23 Aug 2004 13:54:55 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BzJ1y-0004sZ-3t for avr-libc-dev@nongnu.org; Mon, 23 Aug 2004 13:54:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BzJ1x-0004rt-2U for avr-libc-dev@nongnu.org; Mon, 23 Aug 2004 13:54:53 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BzJ1x-0004rc-0Q for avr-libc-dev@nongnu.org; Mon, 23 Aug 2004 13:54:53 -0400 Received: from [217.160.92.226] (helo=p15095813.pureserver.info) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BzIxO-0001fg-2N for avr-libc-dev@nongnu.org; Mon, 23 Aug 2004 13:50:10 -0400 Received: from nissiros.egnite.de (pD9FF2173.dip.t-dialin.net [217.255.33.115]) by p15095813.pureserver.info (Postfix) with ESMTP id E376B2F42F5 for ; Mon, 23 Aug 2004 19:50:01 +0200 (CEST) Message-Id: <5.1.1.6.0.20040823193433.0320ef50@egnite.de> X-Sender: web2p2@egnite.de X-Mailer: QUALCOMM Windows Eudora Version 5.1.1 Date: Mon, 23 Aug 2004 19:50:10 +0200 To: From: Harald Kipp Subject: Re: [avr-libc-dev] Determine defined port In-Reply-To: <412A0A75.1030003@evcohs.com> References: <5.1.1.6.0.20040822171935.01b973d0@egnite.de> <5.1.1.6.0.20040822171935.01b973d0@egnite.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-BeenThere: avr-libc-dev@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of avr-libc development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2004 17:54:54 -0000 Eric, thanks for your response, but still I'm not able to use it during preprocessing to exclude or include specific code. In the meantime I found out, that not even my proposed solution worked. :-( It's a lot more complicated than expected. The related document is here http://gcc.gnu.org/onlinedocs/gcc-3.3.3/cpp/Argument-Prescan.html#Argument%20Prescan I finally discovered a solution by using two macros as described in that document _and_ use them before including any avr-libc headers like avr/iom128.h. Now I'm in doubt, if all that had been worth the hassle and how portable my code will be. Well, at least I got some deeper insight into the preprocessor. Harald At 09:17 23.08.2004 -0600, E. Weddington wrote: >Harald Kipp wrote: > >>Hi all, >> >>I stumbled over the following pre-processor problem. >> >>Somewhere in an include file there's a macro >> >> #define MY_PORT PORTC >> >>User's should be able to adapt the program to their hardware >>be simply changing this include file. >> >>To make the code independent from the specified port, >>I need something like >> >> #if (MY_PORT == PORTC) >> /* Do something PORTC specific, like disabling XMEM */ >> #endif >> sbi(MY_PORT, 7); >> >>Obviously this won't work, because PORTC is an already dereferenced >>volatile pointer. No chance to retrieve the pointer address, right? >Actually you *can* retrieve the pointer address. The register names can be >used as variables, so you can take the address of it like so: > >&PORTC > >HTH >Eric > From MAILER-DAEMON Tue Aug 24 11:27:57 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1BzdDJ-0004N2-Mb for mharc-avr-libc-dev@gnu.org; Tue, 24 Aug 2004 11:27:57 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Bzd6q-0001dJ-3a for avr-libc-dev@nongnu.org; Tue, 24 Aug 2004 11:21:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Bzd6o-0001c1-4d for avr-libc-dev@nongnu.org; Tue, 24 Aug 2004 11:21:15 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bzd6o-0001by-11 for avr-libc-dev@nongnu.org; Tue, 24 Aug 2004 11:21:14 -0400 Received: from [81.28.232.18] (helo=relay1.mail.vrmd.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bzd27-00010a-49 for avr-libc-dev@nongnu.org; Tue, 24 Aug 2004 11:16:23 -0400 Received: from [83.129.161.28] (helo=hugo.local) by vm8.bln2.vrmd.de with asmtp (Exim 4.41) id 1Bzd1x-0001AZ-UB for avr-libc-dev@nongnu.org; Tue, 24 Aug 2004 17:16:14 +0200 Received: from localhost (localhost [127.0.0.1]) by hugo.local (Postfix) with ESMTP id 5792411950 for ; Tue, 24 Aug 2004 17:16:11 +0200 (CEST) Received: from by localhost (amavisd-new, port ) id XXPfdGYO for ; Tue, 24 Aug 2004 17:16:10 +0200 (CEST) Received: by hugo.local (Postfix, from userid 500) id C6E205CC3D; Tue, 24 Aug 2004 17:16:10 +0200 (CEST) Date: Tue, 24 Aug 2004 17:16:10 +0200 From: Bernhard Walle To: avr-libc-dev@nongnu.org Message-ID: <20040824151610.GD2117@mail1.bwalle.de> Mail-Followup-To: avr-libc-dev@nongnu.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TybLhxa8M7aNoW+V" Content-Disposition: inline X-PGP-Key-ID: 0xDDAF6454 X-PGP-Fingerprint: F61F 34CC 09CA FB82 C9F6 BA4B 8865 3696 DDAF 6454 User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at local X-Relay-User: bernhard@bwalle.de X-Mailman-Approved-At: Tue, 24 Aug 2004 11:27:55 -0400 Subject: [avr-libc-dev] Problem with unsigned long long printf() X-BeenThere: avr-libc-dev@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of avr-libc development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2004 15:21:16 -0000 --TybLhxa8M7aNoW+V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, following code: unsigned long long x =3D 0x1; printf("%x|%x|%x|%x\n",=20 *((unsigned int*)(&x) + 0), *((unsigned int*)(&x) + 1), *((unsigned int*)(&x) + 2), *((unsigned int*)(&x) + 3) ); printf("X =3D %llu \n", x); The output is: 1|0|0|0 X =3D 1543650816 While the first proves that the assignment is correct, the second output is wrong. Does anybody know the reason? Bug? I'm using avr-libc 1.0.4. Regards, Bernhard --=20 "Only two things are infinite, the universe and human stupidity,=20 and I'm not sure about the former." -- Albert Einstein --TybLhxa8M7aNoW+V Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBK1u6iGU2lt2vZFQRAkDWAJ9I6nSODOFAfb4k6/ILPIgiIcyOaACfeiOA P0IWagRn/vsbQ8nXFTbyLcE= =N8Qx -----END PGP SIGNATURE----- --TybLhxa8M7aNoW+V-- From MAILER-DAEMON Wed Aug 25 15:41:23 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1C03e6-0003MA-Qk for mharc-avr-libc-dev@gnu.org; Wed, 25 Aug 2004 15:41:22 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C01MY-0000pD-5J for avr-libc-dev@nongnu.org; Wed, 25 Aug 2004 13:15:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C01MP-0000nH-K2 for AVR-libc-dev@nongnu.org; Wed, 25 Aug 2004 13:15:01 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C00yj-0001aE-PJ for AVR-libc-dev@nongnu.org; Wed, 25 Aug 2004 12:50:29 -0400 Received: from [65.54.186.57] (helo=hotmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bzy52-00007m-Im for AVR-libc-dev@nongnu.org; Wed, 25 Aug 2004 09:44:48 -0400 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 25 Aug 2004 06:43:44 -0700 Received: from 146.87.48.133 by by16fd.bay16.hotmail.msn.com with HTTP; Wed, 25 Aug 2004 13:43:43 GMT X-Originating-IP: [146.87.48.133] X-Originating-Email: [oksuzenakos@hotmail.com] X-Sender: oksuzenakos@hotmail.com From: "Elias Nakos" To: AVR-libc-dev@nongnu.org Bcc: Date: Wed, 25 Aug 2004 14:43:43 +0100 Message-ID: X-OriginalArrivalTime: 25 Aug 2004 13:43:44.0208 (UTC) FILETIME=[89F86500:01C48AA9] X-Mailman-Approved-At: Wed, 25 Aug 2004 15:41:20 -0400 MIME-Version: 1.0 Content-Type: text/plain X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: [avr-libc-dev] simulavr X-BeenThere: avr-libc-dev@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of avr-libc development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Aug 2004 17:15:08 -0000 From MAILER-DAEMON Thu Aug 26 00:14:22 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1C0BeY-00019e-DV for mharc-avr-libc-dev@gnu.org; Thu, 26 Aug 2004 00:14:22 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C0BeX-00019S-AU for avr-libc-dev@nongnu.org; Thu, 26 Aug 2004 00:14:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C0BeW-00019G-Nl for avr-libc-dev@nongnu.org; Thu, 26 Aug 2004 00:14:21 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C0BeW-00018z-ME for avr-libc-dev@nongnu.org; Thu, 26 Aug 2004 00:14:20 -0400 Received: from [199.232.41.5] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1C0BZW-0002Vk-4I for avr-libc-dev@nongnu.org; Thu, 26 Aug 2004 00:09:10 -0400 Received: from localhost ([127.0.0.1]) by savannah.gnu.org with smtp (Exim 4.34) id 1C0BZr-0003sM-Oe for avr-libc-dev@nongnu.org; Thu, 26 Aug 2004 00:09:31 -0400 From: anonymous To: avr-libc-dev@nongnu.org X-Savannah-Server: savannah.nongnu.org:80 [199.232.41.4] X-Savannah-Project: avr-libc X-Savannah-Artifact: bugs X-Savannah-Artifact-ID: 10150 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1 X-Apparently-From: 65.13.29.247 X-Copy-To: Array Message-Id: Date: Thu, 26 Aug 2004 00:14:21 -0400 Subject: [avr-libc-dev] [bugs #10150] Clarity regarding compatibility between gcc, binutils and avr-libc X-BeenThere: avr-libc-dev@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of avr-libc development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2004 04:14:21 -0000 This mail is an automated notification from the bugs tracker of the project: AVR C Runtime Library. /**************************************************************************/ [bugs #10150] Full Item Snapshot: URL: Project: AVR C Runtime Library Submitted by: 0 On: Thu 08/26/2004 at 00:09 Category: Documentation Severity: 5 - Average Item Group: None Resolution: None Privacy: Public Assigned to: None Originator Email: marvindickens@bellsouth.net Status: Open Summary: Clarity regarding compatibility between gcc, binutils and avr-libc Original Submission: The INSTALL document in avr-libc, version 1.0.4 says to use the most current version of binutils which is R2.15, but in the same sentence, says to use R2.13 "When available". It also says to use the most current version of gcc, but in that same sentence says to use R3.33 "When available". Also, the INSTALL document said if you grab avr-libc from cvs, be sure you have autoconf R2.13 and automake 1.4 = or > but, do not use R1.6. Best regards Marvin Dickens For detailed info, follow this link: _______________________________________________ Message sent via/by Savannah http://savannah.nongnu.org/