On Tue 11 Sep 2012 01:16:12 NZST +1200, Bob von Knobloch wrote:
> struct ctl
> {
> char cmdname[10];
> void* func;
> char cmdhelp[];
I am not sure what this does in an array, but at best it's allocating
memory sized to fit the largest element for all elements, which is a
waste of space. At worst it's broken, or undefined. You need to make
this a pointer. Try "char * cmdhelp" and change the source where this is
accessed.
Packing the struct makes no difference on 8bit AVR, as with any other
8bit architecture alignment only needs to be byte-wise so packing makes
no sense because everything is already packed anyway.
Volker
--
Volker Kuhlmann
http://volker.dnsalias.net/ Please do not CC list postings to me.
_______________________________________________
AVR-chat mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/avr-chat