Re: [avr-gcc-list] calling function pointers via pointers ?

2005-09-29 Thread David Brown
Thank you so much chaps, after an hour experimenting, armed with all your suggestion, I have now improved my understanding of pointers again... and it now works... However, something still causes me trouble apparently The actual/complete declaration of my menu data type / structure is

Re: [avr-gcc-list] calling function pointers via pointers ?

2005-09-29 Thread David Brown
From: Vincent Trouilliez [EMAIL PROTECTED] [...] Problem: my function pointers are in an array, within a structure, which itself is accessed via pointers... oh dear. [...] //data type for a menu struct menu { .; .; int (*fp)()[]; //table to store all the pointers Err...

Re: [avr-gcc-list] calling function pointers via pointers ?

2005-09-29 Thread David Brown
Joerg Wunsch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] stevech [EMAIL PROTECTED] wrote: Unspecified array sizes are a basic no-no on a microprocessor platform. The compiler strategies have to be simple and explicit, unlike elegant situations on multi-megabyte big computers.

[avr-gcc-list] avr-objcopy failed to produce coff/ext-coff

2005-09-29 Thread choo kok seng
Hi, I am using winavr to compile a simple c code with the compiler option dwarf2 enabled. CFLAGS = -ggdwarf-2, but I failed to generate extcoff file. The following is the command line I used to generate the extcoff file, I always get "no recognized debugging information": make extcoff

[avr-gcc-list] avr-objcopy failed to produce coff/ext-coff

2005-09-29 Thread choo kok seng
Hi, I am using winavr to compile a simple c code with the compiler option dwarf2 enabled. CFLAGS = -ggdwarf-2, but I failed to generate extcoff file. The following is the command line I used to generate the extcoff file, I always get "no recognized debugging information": make extcoff

[avr-gcc-list] avr-objcopy failed to produce coff/ext-coff

2005-09-29 Thread kchoo
Hi, I am using winavr to compile a simple c code with the compiler option dwarf2 enabled. CFLAGS = -ggdwarf-2, but I failed to generate extcoff file. The following is the command line I used to generate the extcoff file, I always get "no recognized debugging information": make extcoff

[avr-gcc-list] Building avr-gdb fails

2005-09-29 Thread Thiagraj Peri Natraj
Hi list, When i tried to build the tool chain as per instructions in the avr-libc manual, when building avr-gdb $ ../configure --prefix=$PREFIX --target=avr $ make gives out, configure: error: no termcap library found make: *** [configure-gdb] Error 1 On the archieves, i got a single thread

Re: [avr-gcc-list] calling function pointers via pointers ?

2005-09-29 Thread Vincent Trouilliez
On Thu, 2005-09-29 at 09:25 +0200, David Brown wrote: It's a little easier to follow than all this void (*fp[])(void) crap, wouldn't you say? Thanks for pointing out that my code is crap ! ;-P I do mean it ! I mean, I am beginner... very motivated and eager to learn the art, but I can only do

Re: [avr-gcc-list] calling function pointers via pointers ?

2005-09-29 Thread David Brown
- Original Message - From: Vincent Trouilliez [EMAIL PROTECTED] On Thu, 2005-09-29 at 09:25 +0200, David Brown wrote: It's a little easier to follow than all this void (*fp[])(void) crap, wouldn't you say? Thanks for pointing out that my code is crap ! ;-P I didn't mean it

Re: [avr-gcc-list] calling function pointers via pointers ?

2005-09-29 Thread Vincent Trouilliez
On Thu, 2005-09-29 at 14:24 +0200, David Brown wrote: You've picked a chalenge with your complex menu structures, but you are definitely going about it the right way. Unconstrained arrays are almost certainly the most elegant way to deal with the structures - when you figure them out fully,

Re: [avr-gcc-list] calling function pointers via pointers ?

2005-09-29 Thread David Brown
- Original Message - From: Vincent Trouilliez [EMAIL PROTECTED] On Thu, 2005-09-29 at 14:24 +0200, David Brown wrote: You've picked a chalenge with your complex menu structures, but you are definitely going about it the right way. Unconstrained arrays are almost certainly the

Re: [avr-gcc-list] calling function pointers via pointers ?

2005-09-29 Thread Dave Hansen
From: Vincent Trouilliez [EMAIL PROTECTED] [...] What more could I possibly want ? Well, there is one thing actually: the pointer points to a function, any function. However if the item is actually a sub-menu, then the 'menu_item' structure needs to store a pointer to a 'menu' structure, so that

Re: [avr-gcc-list] calling function pointers via pointers ?

2005-09-29 Thread Vincent Trouilliez
On Thu, 2005-09-29 at 16:20 +0200, David Brown wrote: You're getting very close now - don't give up! David Thanks again David for the detailed review, and thanks everyone else :-) The forward declaration did the trick indeed, magic ! :o) So now the definition of my menus look like this. I

Re: [avr-gcc-list] calling function pointers via pointers ?

2005-09-29 Thread Vincent Trouilliez
I tried the '' sign, but I get this error: ui.c:63: warning: initialization discards qualifiers from pointer target type I am really lost as to how to specify the address of menu_sub in ui_menu_main Well, once I manage to initialise the main menu with the address of the sub menu,

Re: [avr-gcc-list] calling function pointers via pointers ?

2005-09-29 Thread Andy Warner
Vincent Trouilliez wrote: [...] ui.c:63: warning: initialization discards qualifiers from pointer target type I am really lost as to how to specify the address of menu_sub in ui_menu_main OK - I'm going to ask _you_ to do something, just to mix things up here: 1. realise it's a

Re: [avr-gcc-list] Building avr-gdb fails

2005-09-29 Thread Joerg Wunsch
Thiagraj Peri Natraj [EMAIL PROTECTED] wrote: configure: error: no termcap library found Presumably, termcap is needed in order to get the readline support running. What environment is that, Linux? /usr/bin/install: cannot create regular file Permission denied. I donot have root access.

Re: [avr-gcc-list] avr-objcopy failed to produce coff/ext-coff

2005-09-29 Thread Joerg Wunsch
(Please don't post the same message four(!) times!) kchoo [EMAIL PROTECTED] wrote: I am using winavr to compile a simple c code with the compiler option dwarf2 enabled. CFLAGS = -ggdwarf-2, but I failed to generate extcoff file. The COFF converter is incompatible with DWARF-2