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
> 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
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
"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
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
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
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
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
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
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
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
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
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_
* 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
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
> 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
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
17 matches
Mail list logo