serialEvent is not supported by libmaple, and this function is plain nonsense. On Arduino it is called after loop is called
int main(void)
{
init();
#if defined(USBCON)
USBDevice.attach();
#endif
setup();
for (;;) {
loop();
if (serialEventRun) serialEventRun();
}
return 0;
}
and it does this:
void serialEventRun(void)
{
#ifdef serialEvent_implemented
if (Serial.available()) serialEvent();
#endif
#ifdef serialEvent1_implemented
if (Serial1.available()) serialEvent1();
#endif
#ifdef serialEvent2_implemented
if (Serial2.available()) serialEvent2();
#endif
#ifdef serialEvent3_implemented
if (Serial3.available()) serialEvent3();
#endif
}
So in case you need serialEvent() called for compatibility reasons, add this at the end of your loop:
if (Serial.available()) serialEvent();
Depending on if you use Serial or USB communication, you might need to use SerialUSB.