I suspect that you are running out of memory.
Keep the string literals out of SRAM: Serial.println(F("starting setup"));