It appears that serialEventRun() is missing in Due. There is only this definition:
extern void serialEventRun(void) __attribute__((weak));
The idea is that the real serialEventRun() only gets linked if you use Serial.
You can define serialEventRun() and serialEvent() will work.
void serialEventRun(void) {
if (Serial.available()) serialEvent();
}
void serialEvent() {
if (Serial.available()) Serial.print((char)Serial.read());
}
void setup() {
Serial.begin(9600) ;
}
void loop() {}
Type a line in the serial monitor to demonstrate this works then remove serialEventRun() and run the sketch.
Serial input has garbage when a sketch starts. The reset done by the serial monitor seems to cause this. I have not found a reliable way to avoid this problem.