Hopefully the start of a single discussion of progress on getting SDCC to work with the
iMCU7100EVB.
For those unfamiliar with SDCC its is an open source C compiler (and thus that best of all possible
prices free!) for 8051s, Z80s, some PICs and a 68xx or two. It is available from
http://sdcc.sourceforge.net/
Two things I know so far:
1) Don't do this:
void main()
{
Init_iMCU(); // Initialize iMCUW7100
lcd_init(); // Initialize Charater LCD
/* Output LCD */
lcd_command(LCD_CLEAR);
evb_set_lcd_text(0," Network CH_LCD ");
}
it causes main() to return which is a no no (I spent most of the afternoon trying to figure out why
this doesn't work before noticing a comment in the assembler output about not returning from
main() because bad things will happen). This does as little (i.e. it does the initialization and then
nothing til reset) but the write to the LCD is successful rather than the puzzling garbage from the first case.
2) You can fix the complaint about the redefinition of size_t by adding a conditional to the types.h
file from this:
#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned int size_t;
#endif
to this
#if !defined(_SIZE_T) && !defined (_SIZE_T_DEFINED) /* added for sdcc pve */
#define _SIZE_T
typedef unsigned int size_t;
#endif
which also detects the sdcc definition of size_t (which is identical to this code, which is also important). It would be good if someone would verify that Keil doesn't get unhappy about this (it shouldn't, but you never know until someone tries).
Peter Van Epp
