Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?
David Kelly wrote: > Odds are that is an avr-gcc patch and not standard gcc. Am more certain > the support of entering binary values is an avr-gcc enhancement because > I see the patch file in the FreeBSD port. You're confusing that with binary constants, that are introduced by the string "0b". I've eventually been able to convince the GCC folks to accept that as a general extension, so it's now no longer an AVR-GCC specific hack but a generic GCC thing. If they ever come round to decide about a new C standard, so they can at least no longer claim "lack of precedent" next time (which they did when someone requested that feature for the ISO C99 standard). -- 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 AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Re: [avr-gcc-list] Failing to share a flag between two files/modules :-/
Hello, I guess there are two variables named "flag" being created, one in main and the other in ui.c. Please define the global variable in one .C file of your choice and tell the other file by using "extern" directive. Hope this solves your problem Nayani --- On Sun, 2/8/09, Vincent Trouilliez wrote: From: Vincent Trouilliez Subject: [avr-gcc-list] Failing to share a flag between two files/modules :-/ To: "avr-gcc-list@nongnu.org" Date: Sunday, February 8, 2009, 2:02 PM Hello Gents, I am having problem communicating between main.c and another file/module, ui.c to name it. In main.c I set a flag from a timer ISR, every 100ms. In ui.c I am watching for that flag, but unfortunately it always reads zero :-/ However if I watch for the flag in main() then it works fine. I am watching the flag in ui.c, so I declared it in ui.h, then ui.h gets included in main.c so I can set the flag from there. Well that was my reasoning, but doesn't quite work sadly ! I must be doing something wrong obviously, just would love to learn what it is ! ;-) Regards, -- Vince, a bit stuck and wondering again... ui.h --- static volatile uint8_t flag; ui.c if( flag ) { flag = 0; /* Do some stuff */ } main.c #include "ui.h" ISR (TIMER0_COMP_vect) { flag = 1; } main() {} ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
[avr-gcc-list] Can avr-gdb + avarice work perfectly ?
Hello, everyone. I have been working on a project for AVR ATmega128 for quite a long time and I found it hard to debug programs with avr-gdb and avarice. For example, I can not use command 'n' to step over a line of code, since avr-gdb always step into it. There are other problems too and it is even impossible for me to do some real debugging. So, for times I have to use AVR Studio4 in Windows instead of using avr-gdb in Linux. I am using a AVR JTAGICE mkI to debug the device which is a little old. I don't know where my problem is from. ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Re: [avr-gcc-list] Failing to share a flag between two files/modules :-/
Just a quick collective thank you to Dave Hylands and Chris Kuethe who sorted me out off-list ! :-) "static" flag was precisely telling the compiler NOT to share the flag, "extern" OTOH does just that. Program works as expected now, thanks chaps. -- Vince ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
[avr-gcc-list] Failing to share a flag between two files/modules :-/
Hello Gents, I am having problem communicating between main.c and another file/module, ui.c to name it. In main.c I set a flag from a timer ISR, every 100ms. In ui.c I am watching for that flag, but unfortunately it always reads zero :-/ However if I watch for the flag in main() then it works fine. I am watching the flag in ui.c, so I declared it in ui.h, then ui.h gets included in main.c so I can set the flag from there. Well that was my reasoning, but doesn't quite work sadly ! I must be doing something wrong obviously, just would love to learn what it is ! ;-) Regards, -- Vince, a bit stuck and wondering again... ui.h --- static volatile uint8_t flag; ui.c if( flag ) { flag = 0; /* Do some stuff */ } main.c #include "ui.h" ISR (TIMER0_COMP_vect) { flag = 1; } main() {} ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list