diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h
index d78acd9b4..ed8d27a38 100644
--- a/cores/arduino/Arduino.h
+++ b/cores/arduino/Arduino.h
@@ -73,18 +73,6 @@ extern "C"{
 #ifdef __cplusplus
 extern "C" {
 #endif
-/*
- * \brief SAMD products have only one reference for ADC
- */
-typedef enum _eAnalogReference
-{
-  AR_DEFAULT,
-  AR_INTERNAL,
-  AR_EXTERNAL,
-  AR_INTERNAL1V0,
-  AR_INTERNAL1V65,
-  AR_INTERNAL2V23
-} eAnalogReference ;
 
 /*
  * \brief Set the resolution of analogRead return values. Default is 10 bits (range from 0 to 1023).
diff --git a/cores/arduino/wiring_analog.c b/cores/arduino/wiring_analog.c
index 2476e0105..5d3e63b7f 100644
--- a/cores/arduino/wiring_analog.c
+++ b/cores/arduino/wiring_analog.c
@@ -91,7 +91,7 @@ static inline uint32_t mapResolution(uint32_t value, uint32_t from, uint32_t to)
  *
  * Warning : On Arduino Zero board the input/output voltage for SAMD21G18 is 3.3 volts maximum
  */
-void analogReference(eAnalogReference mode)
+void analogReference(AnalogReference mode)
 {
   syncADC();
   switch (mode)
diff --git a/variants/nano_33_iot/debug_scripts/variant.gdb b/variants/nano_33_iot/debug_scripts/variant.gdb
index 3c37ffde2..d16d62edf 100644
--- a/variants/nano_33_iot/debug_scripts/variant.gdb
+++ b/variants/nano_33_iot/debug_scripts/variant.gdb
@@ -28,4 +28,4 @@ break main
 # End of 'reset' command
 end
 
-target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log"
+target extended-remote | openocd -c "adapter driver cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log"