When I try to build WP-34S on a 64-bit Linux platform (Fedora 14) using the CodeSourcery toolchain, I get several errors. The first ones are in post_process.c:
printf( "sizeof(struct argcmd) = %d\n", sizeof(struct argcmd) );
The sizeof() macro returns a value of type size_t, which may not fit in an int. The correct conversion (according to the ISO C standard) for printf is "%zu" rather than "%d".
The rest of the problems in that file are all like:
post_process.c:72:2: error: cast from pointer to integer of different size
Resulting from source lines like:
ADJUST( p_monfuncs, monfunc );
The ADJUST macro is defined as:
#define ADJUST(p,type) (info->p = (struct type *) BUFF(info->p))
I haven't yet figured out how to fix this. It appears to me that the code does an fread() of data intended for the target machine (ARM) into a buffer, and depends on the pointer size and endianness of the build host matching that of the target, which is not a good assumption.
I used a workaround for that, and got another two more errors:
In file included from asone.c:26:0:
main.c: In function 'main':
keys.c:428:15: error: 'runmode' may be used uninitialized in this function
keys.c:429:15: error: 'alphas' may be used uninitialized in this function
I removed -Werror to try to get past that, and the linker tells me:
region `flash' overflowed by 520 bytes
Is there any feature I can easily remove/disable that is likely to reduce the ROM size by at least 520 bytes?
Is this the right place to discuss such problems? It didn't appear that the tracker on Sourceforge is being used.
Thanks!
Eric
Edited: 2 Oct 2011, 10:24 p.m.