Re: [avr-gcc-list] Re: [avr-libc-dev] Please have a look at avr-libc patch #3750

2005-09-06 Thread Björn Haase
Russell Shaw wrote on Dienstag, 6. September 2005 04:45 : - The INTERRUPT() macro has been deprecated, and it will be removed in a future version. Use __attribute__((interrupt)) explicitly if this functionality is really needed. Maybe instead of interrupt, you could use

Re: [avr-gcc-list] Digital clock assembler programming problem

2005-09-06 Thread Sivakumar Ganesan
Thank you guys. It works now. On 9/5/05, Alan Kilian [EMAIL PROTECTED] wrote: I can increment the second'ssecond variable up to 9. But, how can i display numbers greater than 9, i.e, 10, 11,... by changing both second's first and second's second varaible at the same time? Can't you increment

Re: [avr-gcc-list] Re: [avr-libc-dev] Please have a look at avr-libc patch #3750

2005-09-06 Thread Joerg Wunsch
As Bernard Fouche wrote: Errm, you'd still need to supply a dummy implementation for malloc() anyway when using the floating-point versions. ... Now why not have an alloca(3) in libc? Sure it is not the best way to manage dynamic memory but vfprintf/scanf are typicall applications where it

Re: [avr-gcc-list] String Utilities and Memories

2005-09-06 Thread E. Weddington
Chinmay Pendharkar wrote: Hi everyone, I am a new member of this list. I have just started using AVRs and have been developing on a mega32 for a few months. My question is on memory access for string operations. I realise that the two different memories have different methods of accessing,

Re: [avr-gcc-list] Re: [avr-libc-dev] Please have a look at avr-libc patch #3750

2005-09-06 Thread Joerg Wunsch
As Bernard Fouché wrote: (about [not] malloc()ing the FP conversion buffer) Of course, if there's consensus among the users that this is not needed, and an additional 40 bytes on the stack are no big deal for the floating-point versions, we could easily drop that completely, and always

[avr-gcc-list] ordering of EEPROM variables

2005-09-06 Thread Wolfgang Wegner
Hello list, I am porting a project from IAR to gcc because the latest IAR version broke it anyways, and am having some problems with my EEPROM variables. The declaration is as follows: #ifdef GENERATE_STATIC_VARS #ifdef __GNU__ #define PREFIX #define EEVAR(vdecl, ...) vdecl __attribute__

Re: [avr-gcc-list] Using X and Z register in global variables

2005-09-06 Thread Ben L. Titzer
Hi,On Sep 4, 2005, at 1:22 PM, User Tomdean wrote:When I use a register like this, I ALWAYS use avr-objdump and sed tocheck for conflicts!  I spent some time trying to build an analysistool, but, for my latest app, 288 lines of code produced 101 lines, 32of them comments.  All registers were used

Re: [avr-gcc-list] malloc-less i/o: small comparison

2005-09-06 Thread Joerg Wunsch
Dmitry K. [EMAIL PROTECTED] wrote: Sounds great - any chance you have a patch that we can try and see how this works for us ? OK, after a few of days. Now it is only a quick realization for comparison purpose. Oh, you did that work independently from the currently running discussion about

Re: [avr-gcc-list] ordering of EEPROM variables

2005-09-06 Thread Joerg Wunsch
Wolfgang Wegner [EMAIL PROTECTED] wrote: The problem is that the variables are sorted top-down by gcc (or the linker), so my placeholders do not work. I can of course manually fill these, but I think there has to be a better way. There's no guarantee for any particular order. The only

[avr-gcc-list] EEprom variable ordering

2005-09-06 Thread Björn Haase
The best solution for your problem is IMO: 1.) define a struct typedef struct { int my_var1 ... other variables ... } my_struct_t; 2.) declare it for all files extern my_struct_t my_eeprom_vars EEMEM; // EEMEM define available starting with recent 2.1.15 3.) define it in one file my_struct_t

Re: [avr-gcc-list] Debugging under Linux

2005-09-06 Thread Lars Noschinski
* Joerg Wunsch [EMAIL PROTECTED] [2005-09-05 23:05]: [...] Note that of course, AVR Studio and VMLAB aren't your only versions. You could as well use GDB (plus one of its frontends as you prefer), either against AVaRICE and a JTAG ICE (JTAG ICE mkII support being currently beta), or against

[avr-gcc-list] [EMAIL PROTECTED]: [avr-libc-commit] avr-libc ./ChangeLog ./NEWS doc/examples/twites...]

2005-09-06 Thread Joerg Wunsch
FYI. -- cheers, Jorg .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) ---BeginMessage--- CVSROOT:/cvsroot/avr-libc Module name:avr-libc Branch:

[avr-gcc-list] Global variables and ISRs ???

2005-09-06 Thread Vincent Trouilliez
Hi gents, After the highly technical thread that just ended today, I would like to pick your brains on something much lower flying so to speak, sorry for that ! ;-) Problem : on my ATmega32, after several experiments (only just started using it, learning...), I am suffering a big problem. It

Re: [avr-gcc-list] Global variables and ISRs ???

2005-09-06 Thread Lars Noschinski
* Vincent Trouilliez [EMAIL PROTECTED] [2005-09-06 21:37]: Problem : on my ATmega32, after several experiments (only just started using it, learning...), I am suffering a big problem. It seems that when I declare a variable as global, then modify it within an interrupt routine, the 'main'

Re: [avr-gcc-list] Global variables and ISRs ???

2005-09-06 Thread Vincent Trouilliez
Try making 'flag' volatile: Thanks chaps, that did it :-) What's probably happening is the compiler, not seeing that 'flag' is modified anywhere in the while loop, isn't reloading it every loop iteration Must be that, 'cause I looked at the assembler output closely enough to see that the

Re: [avr-gcc-list] Global variables and ISRs ???

2005-09-06 Thread Johnathan Corgan
Vincent Trouilliez wrote: unsigned char flag, bin; //global variables Try making 'flag' volatile: volatile unsigned char flag; unsigned char bin; What's probably happening is the compiler, not seeing that 'flag' is modified anywhere in the while loop, isn't reloading it every loop iteration

Re: [avr-gcc-list] malloc-less i/o: small comparison

2005-09-06 Thread Dmitry K.
On Wednesday 07 September 2005 03:55, Joerg Wunsch wrote: [...] Oh, you did that work independently from the currently running discussion about stdio improvements that will be in avr-libc 1.4? Too bad, I've already get everything ready to commit right now. I have executed this experiment,

Re: [avr-gcc-list] Global variables and ISRs ???

2005-09-06 Thread Parthasaradhi Nayani
Hello Vincent, To be able to modify/access a variable in interrupt, declare it as volatile. Secondly, to test your code, turn off optimization (s=0) in your make file. There is a problem in your code also - you are not making flag=0 after you send back the character. HTH. Nayani --- Vincent

Re: [avr-gcc-list] Re: [avr-libc-dev] Please have a look at avr-libc patch #3750

2005-09-06 Thread Erik Christiansen
On Tue, Sep 06, 2005 at 10:24:34AM +0200, Joerg Wunsch wrote: How about the following: #ifdef __STDIO_FDEVOPEN_COMPAT_12 /* discontinued version */ extern FILE *fdevopen(int (*__put)(char), int (*__get)(void), int __opts); #else /* version of avr-libc 1.4 and above