Thank you, Björn and Jörg,
I really did not think about using a struct for all of the variables,
but this is obviously the best solution.
Regards,
Wolfgang
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinf
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
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 T
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,
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
> 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 t
On Tue, 6 Sep 2005, Vincent Trouilliez wrote:
> 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' function can'
* 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' funct
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 se
FYI.
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)
--- Begin Message ---
CVSROOT:/cvsroot/avr-libc
Module name:avr-libc
Branch:
* 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 sim
Björn Haase wrote on Dienstag, 6. September 2005 19:18 :
> 3.) define it in one file
> my_struct_t my_eeprom_vars;
Sorry I forgot the EEMEM define. It should read:
3.) define it in one file
my_struct_t my_eeprom_vars EEMEM;
Bjoern.
___
AVR-GCC-list ma
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 my_e
David Kelly <[EMAIL PROTECTED]> wrote:
> Unix is putc(char, FILE*) so I think the put() function in avr-libc
> should be same.
As this function is purely internal to the avr-libc implementation,
that's not an issue (and seriously, I always found the Unix order here
illogical). However, what cou
"David Shoemaker" <[EMAIL PROTECTED]> wrote:
> Does anyone have a good debug method for figuring out why my
> ATMega16 is = resetting while my application is running (a robot).
Please don't cross-post.
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg
"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 on
"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
discussi
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 e
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__ ((sec
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
> >alway
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, es
Joerg Wunsch wrote:
As malloc() was `in' there (from fdevopen()) anyway, it came in handy.
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
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 wh
Thank you guys.
It works now.
On 9/5/05, Alan Kilian <[EMAIL PROTECTED]> wrote:
> I can increment the second's second 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 inc
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
25 matches
Mail list logo