Re: [avr-gcc-list] How to force GCC to not to remove nop statements ?

2009-02-20 Thread Vincent Trouilliez
On Fri, 20 Feb 2009 08:03:52 +0100 (MET) j...@uriah.heep.sax.de (Joerg Wunsch) wrote: Vincent Trouilliez vincent.trouill...@modulonet.fr wrote: lcd.c:96: error: »asm« undeclared (first use in this function) That's because you are using a -std setting the prevents GCC from using its

Re: [avr-gcc-list] How to force GCC to not to remove nop statements?

2009-02-20 Thread David Kelly
On Fri, Feb 20, 2009 at 08:00:00AM +0100, Joerg Wunsch wrote: David Kelly dke...@hiwaay.net wrote: Strangely the JTAGICE mkII didn't work on the above hardware where the ICE Cube did. I put a small 50 mA or maybe 100 mA linear regulator on the 3.3V supply and the mkII drew more power

[avr-gcc-list] How to force GCC to not to remove nop statements ?

2009-02-19 Thread Vincent Trouilliez
Hi list, Like many people I guess, I am using in-lined nop asm statements to respect the timing of external devices, when toggling their control lines. In the case at hand I am driving a text LCD module, and the Enable line must be pulsed low for 250ns. void lcd_send_nibble(uint8_t data) { ...

RE: [avr-gcc-list] How to force GCC to not to remove nop statements ?

2009-02-19 Thread Weddington, Eric
] How to force GCC to not to remove nop statements ? Hi list, Like many people I guess, I am using in-lined nop asm statements to respect the timing of external devices, when toggling their control lines. snip Am using avr-gcc 4.3.2 If you are using WinAVR 20081205 then you can use

Re: [avr-gcc-list] How to force GCC to not to remove nop statements ?

2009-02-19 Thread Ruud Vlaming
On Thursday 19 February 2009 19:01, Vincent Trouilliez wrote: I made a few trials. It appears that up to and including 3 nop statements, GCC leaves them alone. But if I put 4 of them, it removes them all ! Are you absolutely sure they are really left out? I assume they are just not shown in

Re: [avr-gcc-list] How to force GCC to not to remove nop statements ?

2009-02-19 Thread Parthasaradhi Nayani
Trouilliez vincent.trouill...@modulonet.fr wrote: From: Vincent Trouilliez vincent.trouill...@modulonet.fr Subject: [avr-gcc-list] How to force GCC to not to remove nop statements ? To: avr-gcc-list@nongnu.org avr-gcc-list@nongnu.org Date: Thursday, February 19, 2009, 11:31 PM Hi list, Like many

Re: [avr-gcc-list] How to force GCC to not to remove nop statements ?

2009-02-19 Thread Vincent Trouilliez
On Thu, 19 Feb 2009 11:14:40 -0700 Weddington, Eric ewedding...@cso.atmel.com wrote: If you are using WinAVR 20081205 then you can use one of the new builtin functions: void __builtin_avr_delay_cycles(unsigned long __n); Hmm, sweet ! Unfortunately I am on Linux so no WinAVR for me ! ;-) --

Re: [avr-gcc-list] How to force GCC to not to remove nop statements ?

2009-02-19 Thread Vincent Trouilliez
On Thu, 19 Feb 2009 10:22:23 -0800 (PST) Parthasaradhi Nayani partha_nay...@yahoo.com wrote: Hi Vincent, If I understand correctly, the word volatile itself is to tell the compiler not to ignore the statement. I am not sure if your statement is correct, but I have used  asm volatile

Re: [avr-gcc-list] How to force GCC to not to remove nop statements ?

2009-02-19 Thread David Kelly
On Thu, Feb 19, 2009 at 11:14:40AM -0700, Weddington, Eric wrote: If you are using WinAVR 20081205 then you can use one of the new builtin functions: void __builtin_avr_delay_cycles(unsigned long __n); The prototype can be found in avr/builtins.h, but you shouldn't need the prototype

RE: [avr-gcc-list] How to force GCC to not to remove nop statements?

2009-02-19 Thread Weddington, Eric
] How to force GCC to not to remove nop statements? On Thu, Feb 19, 2009 at 11:14:40AM -0700, Weddington, Eric wrote: If you are using WinAVR 20081205 then you can use one of the new builtin functions: void __builtin_avr_delay_cycles(unsigned long __n); The prototype can be found

Re: [avr-gcc-list] How to force GCC to not to remove nop statements?

2009-02-19 Thread David Kelly
On Thu, Feb 19, 2009 at 12:46:50PM -0700, Weddington, Eric wrote: Hey Joerg, you must be busy! FreeBSD's avr-gcc used to track WinAVR closer than this. :-) He has been busy. He's been working on support for the new ATmega128RFA1 device, which has been added recently to the toolchain.

Re: [avr-gcc-list] How to force GCC to not to remove nop statements?

2009-02-19 Thread Jim Brain
David Kelly wrote: Related to another thread: as to why *not* to use an 8051: Doesn't have avr-gcc. So true. Althought it's pointless to add to the recent Freaks AVR vs PIC thread, this is one of the most significant reasons why I prefer the AVR line. They are inexpensive, the programmers

Re: [avr-gcc-list] How to force GCC to not to remove nop statements?

2009-02-19 Thread Joerg Wunsch
David Kelly dke...@hiwaay.net wrote: Strangely the JTAGICE mkII didn't work on the above hardware where the ICE Cube did. I put a small 50 mA or maybe 100 mA linear regulator on the 3.3V supply and the mkII drew more power off the target than the regulator would provide. The JTAG ICE

Re: [avr-gcc-list] How to force GCC to not to remove nop statements ?

2009-02-19 Thread Joerg Wunsch
Vincent Trouilliez vincent.trouill...@modulonet.fr wrote: Unfortunately I am on Linux so no WinAVR for me ! ;-) Once I'm done with updating the FreeBSD toolchain (see the other part of this thread), Bingo600's Linux build script will also track that as well. -- cheers, Jorg

Re: [avr-gcc-list] How to force GCC to not to remove nop statements ?

2009-02-19 Thread Joerg Wunsch
Vincent Trouilliez vincent.trouill...@modulonet.fr wrote: lcd.c:96: error: »asm« undeclared (first use in this function) That's because you are using a -std setting the prevents GCC from using its extensions by a name (asm) that is in the application name space, like -std=c99. Either use