The code is all running OK, as long as I don't attempt to combine functions onto cores.
Currently, it is broken into 7 "driver" functions (so far) and one application function. Interfaces (11 so far) are used extensively between the drivers and the application. It is complicated.
Code: Select all
int main( void )
{
interface iface_graphics igraphics[2];
interface iface_touch_event itouch_evt;
interface iface_touch_control itouch;
interface iface_font ifont;
interface iface_sdcard isd;
interface iface_flash iflash;
interface iface_Display idisplay;
interface iface_ui iui;
interface iface_stepper istepper;
interface iface_gpout igpout[1];
interface iface_sensor isensor;
par
{
on tile[0]: application( iui, igraphics[0], isd, iflash, istepper, isensor );
on tile[0].core[1]: GraphicsDriver( igraphics, 2, idisplay, ifont );
on tile[0].core[2]: DisplayDriver( idisplay );
on tile[0].core[3]: UserDriver( iui, igraphics[1], itouch_evt, itouch );
on tile[0].core[4]: DisplayAuxDriver( itouch_evt, itouch, ifont, isd, iflash );
on tile[0].core[5]: StepperDriver( istepper, igpout[0] );
on tile[0].core[6]: GPOutDriver( igpout, 1 );
on tile[0].core[6]: SensorDriver( isensor );
}
return 0;
}
Code: Select all
out port gpport = GPOUTPORT;
[[combinable]]
void GPOutDriver( server interface iface_gpout p[n], unsigned n )
{
unsigned int state = 0;
gpport <: state;
while(1)
{
select
{
case p[int i].Update( unsigned int mask, unsigned int value ):
state = ( state & ~ mask ) | (value & mask );
gpport <: state;
break;
}
}
}
The problem is that if I attempt to combine drivers onto cores, I get the application hanging. No compile-time errors, no runtime exceptions. Just the code reaches some point and stops.
Only in one driver do I get a compiler error when attempting to deploy the driver sharing a core:
Code: Select all
../src/Application.xc: Error: Undefined reference to 'DisplayDriver.select.0.enable.cases'
Code: Select all
xcc1: terminated due to internal unrecoverable error
For bug reporting instructions, please see:
http://www.xmos.com/support
Hardware platform is startKit. Software is Community Ed 13.2.1.
I am looking for any kind of hint as to where to start looking.