Re: [avr-gcc-list] Passing a string variable to lcd_puts

2009-03-27 Thread Preston Wilson
Sorry David for the second reply to you. I intended to reply to everyone. David VanHorn wrote: In C there are 3 char types.  char signed char unsigned char  so maybe char isn't signed?   Ok, so that leaves me VERY confused..   Correct me if I'm wrong, but signed variables use the high bit

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

2009-03-05 Thread Preston Wilson
Gene Smith wrote: Beginner question: If I build the avr-gcc-4.3.2 toolchain on linux using all the WinAVR (sourceforge) patches, as seems to be done in the femtoos scripts mention on freaks, will I have the same features (such as function mentioned above) on linux as winavr provides on

Re: [avr-gcc-list] avr-ld on Windows crashes with -relax

2009-02-24 Thread Preston Wilson
Ruud Vlaming wrote: On Tuesday 24 February 2009 05:29, Jim Brain wrote: WinAVR 20081205 in use. I have an app that, if I use: LDFLAGS += -Wl,-O9,-relax avr-ld dies during link. If I take off -relax, as is well. Does as is well mean that avr-ld also dies with just -Wl,-O9 ? If

Re: [avr-gcc-list] ICE in GNU ld

2009-02-13 Thread Preston Wilson
Daniel O'Connor wrote: On Saturday 14 February 2009 09:23:00 Preston Wilson wrote: It *might* work again with 2.19.x. No guarantees. If you want someone to try it under WinAVR 20081205, I will be glad to do that and report what happens. I'll send you my code off-list. Note

Re: [avr-libc-dev] RE: [avr-gcc-list] no avr/lib/avr25/attiny13a/Makefile.in

2009-01-30 Thread Preston Wilson
Yes i realized that when after i submitted the patch. I tested it on two linux distro's mac os and cygwin (and they run), but on a third distro it turns out that the declaration #! /bin/sh is not compatible with the function declaration, and should be changed to #!/bin/bash What?!

Re: [avr-gcc-list] About context saving in Vectors

2009-01-14 Thread Preston Wilson
Weddington, Eric wrote: I have been focused on a problem for three days. My program does not work if compiled with -Os in Ubuntu Linux 8.10 (Avr Gcc 4.3.0), but works if compiled with -Os in Windows+WinAVR(20080512). Version 4.3.0 of AVR GCC has known code generation problems that

Re: [avr-gcc-list] Tiny88 C++ code optimized out of existence?

2009-01-14 Thread Preston Wilson
Bob Paddock wrote: for(;;) { uint8_t byte_u8 = LED2H; // Start LED You're initializing the variable inside the loop. I knew I was overlooking the obvious. Thanks. Still not sure why I was getting the warning about byte_u8 not being used, when it was not in the loop,

Re: [avr-gcc-list] About context saving in Vectors

2009-01-14 Thread Preston Wilson
The solution is to NOT call functions from within your ISR. That is just evil. Get your data in the ISR, put it in a mailbox or buffer and have a regularly scheduled function handle the details from outside the ISR. I like to use ring buffers to store data from an ISR. When using the

Re: [avr-gcc-list] How to specifiy binary constants ?

2009-01-03 Thread Preston Wilson
Vincent Trouilliez wrote: what is the syntax to specify a binary constant (something like say b10101 ?). I can't find this information in the avr-libc manual, but I swear that 2/3 years ago, Joerg said that this would be soon implemented, so 3 years later I am hoping it's available ! :-)

Re: [avr-gcc-list] Re: AVR LLVM backend?

2008-11-18 Thread Preston Wilson
I'm pretty sure this is not an issue (anymore, at least). I could be wrong. The recently-added PIC port of LLVM would be a good place to start looking. Ummm... are you sure they mean PIC as in a processor from Microchip, or do they mean PIC as in Position Independent Code? That

Re: [avr-gcc-list] Stack usage under heavy inlining

2008-09-08 Thread Preston Wilson
I took Paulo's message to mean this void functionA(void) { ... functionB(); functionC(); functionD(); ... } Where functions B, C, and D do not call one another. In this case, you would not allocate 96 bytes of stack without inline calls. -Preston Stu Bell wrote: I don't understand

Re: [avr-gcc-list] Problem to control S1D13305 (SED1335-Epson Controller) with using ATmega32

2008-07-04 Thread Preston Wilson
Paulo Marques wrote: Sach wrote: hi, I am trying to control S1D13305 (SED1335-Epson Controller) based Graphic LCD with using AVR ATmega32 microcontroller. [...] void Delay(unsigned int counter) { while(counter) { counter = counter - 1; } } I didn't check the whole code, but at

Re: [avr-gcc-list] even register number required

2008-05-30 Thread Preston Wilson
John Regehr wrote: We found a bug in avr-gcc 4.1.2. Thanks, John Regehr [EMAIL PROTECTED] tmp11]$ avr-gcc --version avr-gcc (GCC) 4.1.2 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even

Re: [avr-gcc-list] Order of variables placed in .data and .bss sections

2008-05-20 Thread Preston Wilson
Weddington, Eric wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] org] On Behalf Of Raj Sharma Dear all, Is there a way to force some order in the way variables (global/static) are placed in .data and .bss sections ? For example, let my program has

Re: [avr-gcc-list] ATmega2560 and r30/31 save in function prologue

2008-05-02 Thread Preston Wilson
Stu Bell wrote: Hi all, I'm chasing down a problem with WinAVR 20080430 and my ATmega2560 code. In generated code comparisons of an ISR between 20071221 and 20080430, I noticed that r30 and r31 are not saved on the stack. Normally, this wouldn't be a problem as the ISR itself does not use

Re: [avr-gcc-list] Preprocessor question

2008-05-02 Thread Preston Wilson
Thomas D. Dean wrote: I have a question about preprocessor syntax. I want to declare som macros that ease controlling port assignments. in the include file, I have #define GLUE(a, b) (a##b) #define PORT(x)(GLUE(PORT, x)) #define PIN(x) (_BV((x))) #define DDR(x)

Re: [avr-gcc-list] RE: Internal linking path Issues WinAVR-20080402

2008-04-03 Thread Preston Wilson
I believe I am seeing the same issue. The project below builds under both WinAVR-20071221 and WinAVR-20070525. The system that I am using had WinAVR-20070525 installed, but that was uninstalled before WinAVR-20071221 was installed. And I uninstalled WinAVR-20071221 before installing

Re: [avr-gcc-list] RE: Internal linking path Issues WinAVR-20080402

2008-04-03 Thread Preston Wilson
--disabl e-shared --disable-libada Thread model: single gcc version 4.2.2 (WinAVR 20071221) Robert Nelson FAE - Digi-Key Preston Wilson wrote: I believe I am seeing the same issue. The project below builds under both WinAVR-20071221 and WinAVR-20070525. The system that I am using had

Re: [avr-gcc-list] RE: Internal linking path Issues WinAVR-20080402

2008-04-03 Thread Preston Wilson
Weddington, Eric wrote: GCC_EXEC_PREFIX isn't set, attached my win32 path, and those registry key are correctly set. GCC=C:\\WinAVR-20080402 BINUTILS=C:\\WinAVR-20080402 G++=C:\\WinAVR-20080402 What's up with the double slashes above? Make those just a single slash. \ is the escape

Re: [avr-gcc-list] RE: Internal linking path Issues WinAVR-20080402

2008-04-03 Thread Preston Wilson
Weddington, Eric wrote: From Cygwin bash command line, which is what I run make under $ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/WinAVR -20080402/bin :/cygdrive/c/WinAVR-20080402/utils/bin:/cygdrive/c/Perl/bin/:/ Hi Preston, Thanks for the report and the

Re: [avr-gcc-list] testsuite needs sys/types.h

2008-01-21 Thread Preston Wilson
Anyway, some tests in gcc.c-torture/execute/builtins fail because they are expecting a sys/types.h include file. I manually added a sys/types.h file to my avr-libc with just: #include inttypes.h #include stdint.h and the testsuite passed a lot more tests from this section. The

Re: [avr-gcc-list] Problem with delay loop

2007-10-01 Thread Preston Wilson
Eric Weddington wrote: ... I agree with the statement above that 'volatile' is precisely to warn the compiler that it should not 'reason' anything about [the] variable. However, David brings up a good point. A local variable is put on the stack, generally not the place for hardware to

Re: [avr-gcc-list] avr-gcc hangs on XP.

2007-05-16 Thread Preston Wilson
What version of avr-gcc/WinAVR are you using? What version of Cygwin are you running? ($ uname -a) Are you compiling to and from a local file system or are you building over a networked file system (SMB, NFS, AFS, ...)? If you are building over a networked file system, have you tried compiling

Re: [avr-gcc-list] Inconsisten behaviour of switch statement

2007-03-26 Thread Preston Wilson
Schwichtenberg, Knut [EMAIL PROTECTED] wrote: BTW: Is there any reason why the compares within the switch are at least 16 bit and not type dependent for 8 bit types? If you program this as a normal if, 8 bit compares are generated. The promotion of the controlling expression in the switch