diff --git a/cores/nRF5/main.cpp b/cores/nRF5/main.cpp index bdd66498c..d6d42b56a 100644 --- a/cores/nRF5/main.cpp +++ b/cores/nRF5/main.cpp @@ -52,14 +52,7 @@ static void loop_task(void* arg) TinyUSB_Device_Init(0); #endif -#if defined(ARDUINO_Seeed_XIAO_nRF52840) || defined(ARDUINO_Seeed_XIAO_nRF52840_Sense) || defined(ARDUINO_Seeed_XIAO_nRF52840_Plus) || defined(ARDUINO_Seeed_XIAO_nRF52840_Sense_Plus) - -#if CFG_DEBUG - // If Serial is not begin(), call it to avoid hard fault - if(!Serial) Serial.begin(115200); -#endif - -#elif defined(ARDUINO_WIO_TRACKER_1110) +#if defined(ARDUINO_WIO_TRACKER_1110) #if CFG_LOGGER == 0 // If Serial is not begin(), call it to avoid hard fault @@ -81,7 +74,10 @@ static void loop_task(void* arg) #else -#error "Unsupported board" +#if CFG_DEBUG + // If Serial is not begin(), call it to avoid hard fault + if(!Serial) Serial.begin(115200); +#endif #endif