[avr-gcc-list] patching info file names for binutils, gcc, gdb?

2005-09-28 Thread Galen Seitz
I'm trying to update Ted Roth's Linux rpms and I've run into an issue with info file naming. Ted's packages for binutils, gcc, and gdb all contain patches to prefix the info file names with 'avr-'. For example, here's is a small piece of his gcc patch: [EMAIL PROTECTED] gcc.info [EMAIL PROTECTE

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

2005-09-28 Thread Vincent Trouilliez
> Thanks chaps, it's a no-no then. I will just move the strings out of the > structure, or make them fixed size, by setting a limit to the number of > items/options I can have in a menu. Replying to my post but, since my struct has two arrays, one of strings and one of pointers, and one of them MU

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

2005-09-28 Thread Vincent Trouilliez
On Wed, 2005-09-28 at 21:18 -0700, stevech 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. Thanks chaps, it's a no-no then. I will just move the s

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

2005-09-28 Thread Joerg Wunsch
"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. I disagree. Vincent was going to put a table of initialized struct

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

2005-09-28 Thread Oleksandr Redchuk
Hi, Vincent Trouilliez! 28-Sep-05 11:53 you wrote: VT> Problem: my function pointers are in an array, within a structure, which VT> itself is accessed via pointers... oh dear. I suggest using intermediate typedefs #include #include #include typedef int (*menuf)(); struct menu { int

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

2005-09-28 Thread stevech
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. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joerg Wunsch Sent: W

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

2005-09-28 Thread Dave Hansen
From: Vincent Trouilliez <[EMAIL PROTECTED]> [...] However, something still causes me trouble apparently The actual/complete declaration of my "menu" data type / structure is : struct menu { uint8_t options; //options to control the operation of the menu uint8_t nb; //nu

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

2005-09-28 Thread Joerg Wunsch
Vincent Trouilliez <[EMAIL PROTECTED]> wrote: > What's the trick ? None. You cannot have two arrays with unspecified size within the same object. The compiler needs to be able to compute the offset of each struct element at compile-time, and this offset needs to be the same for each instantiate

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

2005-09-28 Thread Vincent Trouilliez
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 : st

RE: [avr-gcc-list] Unable to install interrupt vector for attiny2 313

2005-09-28 Thread Steve Franks
kchoo,   Unfortunately, Atmel changes the names of things in their datasheets from part to part.  In an effort to remain unambiguous, gccavr always uses the exact names from the datasheet.  Therefore, when changing devices, you will often need to changes port, device, or interrupt names.  Loo

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

2005-09-28 Thread Thomas Buchta
On Wed, 28 Sep 2005 14:29:02 +0200, Lars Noschinski <[EMAIL PROTECTED]> wrote: Hi Lars! In many of my applications I use a called function pointer within an array in program memory like such example code: typedef INT8S (*PF_KEYFUNCTION) (MAIN_SYSTEM_STATE_T *ptrSystemState); PF_KEYFUNCTION P

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

2005-09-28 Thread Dave Hansen
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 poin

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

2005-09-28 Thread Joerg Wunsch
Vincent Trouilliez <[EMAIL PROTECTED]> wrote: > struct menu { > .; > .; > int (*fp)()[]; //table to store all the pointers > }; Better declare them in a prototyped fashion: int (*fp)(void)[]; > //definition for a menu > const struct menu __ATTR_PROGMEM__ menu_

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

2005-09-28 Thread Lars Noschinski
* Vincent Trouilliez <[EMAIL PROTECTED]> [2005-09-28 14:16]: Another pointer problem again, oops... I need pointers to functions in my project. Using the great on-line resource http://www.eskimo.com/~scs/C-faq/q4.12.html which someone on here mentioned recently, I got the basics working. But my a

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

2005-09-28 Thread Vincent Trouilliez
Hi list, Another pointer problem again, oops... I need pointers to functions in my project. Using the great on-line resource http://www.eskimo.com/~scs/C-faq/q4.12.html which someone on here mentioned recently, I got the basics working. But my actual case at hand is a bit trickier and I am lost a

Re: [avr-gcc-list] Accessing structures defined in ROM ?

2005-09-28 Thread Vincent Trouilliez
> If your target allow it, print pointer values when deferencing fails. > Matched with the symbol file, it will help you understand if your > problem comes from pointer calculation or not. (if you have dynamic > memory allocation, that's another story) > > Bernard Thanks for the tip Bernard

Re: [avr-gcc-list] Accessing structures defined in ROM ?

2005-09-28 Thread Bernard Fouché
Vincent Trouilliez wrote: It's just that I find the use of pointers a bit inconsistent, the syntax and operators change depending on whether you work on discrete data types, or complex ones like structures or arrays, so I sometimes find myself scratching my head when I have to use pointers on my