i can see a couple of things..
Are you using windows? you may need to do some magic to make the core wait for windows to connect. have a look at this
it looks like you are missing the Serial1.begin() call so the core can get that set up too.. I'm a little surprised there wasn't some fun hard to read and understand errors when compiling the code