Serial.println() was not printing on serial monitor

OK. That was simply to try to isolate the problem. serialEventRun() is not the main issue. I don't have the old "David Clarke" STM core installed (that DanDrown link) to try.

However, if that is the only problem that code in setup() does not run until one full loop iteration is executed before it behaves normally, you can do a trick like this creating your own version of setup() :

uint8_t loopCount = 0 ;

void mySetup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  delay(1000);
  Serial.println("setup()");
}

void setup()
{ /* leave empty */
}


void loop()
{
  // =============================
  if ( loopCount == 0 ) {
    loopCount++ ;
    return ;
  } else if ( loopCount == 1 ) {
    loopCount ++ ;
    mySetup() ;
  }
  // =============================

  static uint32_t i = 0 ;
  Serial.print("loop()");  // should start at 0
  Serial.println( i++ ) ;
  delay( 100) ;
}

But if there is a basic problem with the Arduino core software that you are using, you'd be better clearing that issue first rather than resorting to work arounds.