I'm using this code:
unsigned int FX1;
unsigned int FX2;
const unsigned char FX_Names[10][11] = {"THRU", "F:92 LP", "F:92 BP", "F:92 HP", "F:T2 L/H", "F:T2 L/W", "Delay", "Reverb", "Flanger", "BeatMasher"};
int FX_Values[10] = {0,10,20,30,40,50,60,70,80,90};
/////////////////////////////////////////////////////////////////////////////
// This function is called by MIOS after startup to initialize the
// application
/////////////////////////////////////////////////////////////////////////////
void Init(void) __wparam
{
FX1 = 5;
MIOS_SRIO_UpdateFrqSet(1);
MIOS_SRIO_NumberSet(4);
}
void DISPLAY_Tick(void) __wparam
{
//int n = 5 => works
//or
//int n = FX1 => does not work
MIOS_LCD_CursorSet(0x00);
MIOS_LCD_PrintCString("FX 1: ");
MIOS_LCD_PrintCString( (FX_Names[n]) );
}
Now I have the following problem:
If i Initialize the var n in the display_tick function everything works well, but if i use FX1 instead (global var) i get a linker error:
Makefile generated.
Makefile.bat generated.
Assembling MIOS SDCC wrapper
==========================================================================
Compiling pic18f452.c
==========================================================================
Compiling main.c
==========================================================================
Linking project
error: missing definition for symbol "__mulint", required by "_output\main.o"
ERROR! I don't know why it should use that function. Has anyone an idea?