Rename picoprobe to debugprobe

Picoprobe is a registered trademark. Rename to debugprobe, and make it clear
that the code in this repository is firmware for the Debug Probe.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ffa907f..d86942d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,11 +5,11 @@
 set(FREERTOS_KERNEL_PATH ${CMAKE_CURRENT_LIST_DIR}/freertos)
 include(FreeRTOS_Kernel_import.cmake)
 
-project(picoprobe)
+project(debugprobe)
 
 pico_sdk_init()
 
-add_executable(picoprobe
+add_executable(debugprobe
         src/led.c
         src/main.c
         src/usb_descriptors.c
@@ -20,7 +20,7 @@
         src/tusb_edpt_handler.c
 )
 
-target_sources(picoprobe PRIVATE
+target_sources(debugprobe PRIVATE
         CMSIS_5/CMSIS/DAP/Firmware/Source/DAP.c
         CMSIS_5/CMSIS/DAP/Firmware/Source/JTAG_DP.c
         CMSIS_5/CMSIS/DAP/Firmware/Source/DAP_vendor.c
@@ -28,35 +28,35 @@
         #CMSIS_5/CMSIS/DAP/Firmware/Source/SW_DP.c
         )
 
-target_include_directories(picoprobe PRIVATE
+target_include_directories(debugprobe PRIVATE
         CMSIS_5/CMSIS/DAP/Firmware/Include/
         CMSIS_5/CMSIS/Core/Include/
         include/
         )
 
-target_compile_options(picoprobe PRIVATE -Wall)
+target_compile_options(debugprobe PRIVATE -Wall)
 
-pico_generate_pio_header(picoprobe ${CMAKE_CURRENT_LIST_DIR}/src/probe.pio)
-pico_generate_pio_header(picoprobe ${CMAKE_CURRENT_LIST_DIR}/src/probe_oen.pio)
+pico_generate_pio_header(debugprobe ${CMAKE_CURRENT_LIST_DIR}/src/probe.pio)
+pico_generate_pio_header(debugprobe ${CMAKE_CURRENT_LIST_DIR}/src/probe_oen.pio)
 
-target_include_directories(picoprobe PRIVATE src)
+target_include_directories(debugprobe PRIVATE src)
 
-target_compile_definitions (picoprobe PRIVATE
+target_compile_definitions (debugprobe PRIVATE
 	PICO_RP2040_USB_DEVICE_ENUMERATION_FIX=1
 )
 
-option (DEBUGPROBE "compile for the debugprobe" OFF)
-if (DEBUGPROBE)
-    target_compile_definitions (picoprobe PRIVATE 
-	DEBUGPROBE=1
+option (DEBUG_ON_PICO "Compile firmware for the Pico instead of Debugprobe" OFF)
+if (DEBUG_ON_PICO)
+    target_compile_definitions (debugprobe PRIVATE 
+	DEBUG_ON_PICO=1
     )
-    set_target_properties(picoprobe PROPERTIES 
-        OUTPUT_NAME "debugprobe"
+    set_target_properties(debugprobe PROPERTIES 
+        OUTPUT_NAME "debugprobe_on_pico"
     )
 endif ()
 
 
-target_link_libraries(picoprobe PRIVATE
+target_link_libraries(debugprobe PRIVATE
         pico_multicore
         pico_stdlib
         pico_unique_id
@@ -67,6 +67,6 @@
         FreeRTOS-Kernel-Heap1
 )
 
-pico_set_binary_type(picoprobe copy_to_ram)
+pico_set_binary_type(debugprobe copy_to_ram)
 
-pico_add_extra_outputs(picoprobe)
+pico_add_extra_outputs(debugprobe)
diff --git a/README.md b/README.md
index efdc18a..4b39bed 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,10 @@
-# Picoprobe
-Picoprobe allows a Pico / RP2040 to be used as USB -> SWD and UART bridge. This means it can be used as a debugger and serial console for another Pico.
+# Debugprobe
+
+Firmware source for the Debug Probe SWD/UART accessory. Can also be run on a Pico.
 
 # Documentation
-Picoprobe documentation can be found in the [Pico Getting Started Guide](https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf). See "Appendix A: Using Picoprobe".
+
+Debug Probe documentation can be found in the [Pico Getting Started Guide](https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf). See "Appendix A: Using the Debug Probe".
 
 # Hacking
 
@@ -22,20 +24,18 @@
  cmake ..
  make
 ```
-Done! You should now have a `picoprobe.uf2` that you can upload to your Pico in the normal way. 
+Done! You should now have a `debugprobe.uf2` that you can upload to your Debug Probe via the UF2 bootloader.
 
-If you want to create the version that runs on the Raspberry Pi Debug Probe, then you need to invoke `cmake` in the sequence above with the `DEBUGPROBE=ON` option: 
+If you want to create the version that runs on the Raspberry Pi Pico, then you need to invoke `cmake` in the sequence above with the `DEBUG_ON_PICO=ON` option: 
 ```
-cmake -DDEBUGPROBE=ON ..
+cmake -DDEBUG_ON_PICO=ON ..
 ```
 
-This will build with the configuration for the Debug Probe and call the output program `debugprobe.uf2`, as opposed to `picoprobe.uf2` for the vanilla version. 
+This will build with the configuration for the Pico and call the output program `debugprobe_on_pico.uf2`, as opposed to `debugprobe.uf2` for the accessory hardware.
 
-Note that if you first ran through the whole sequence to compile for the Pico, then you don't need to start back at the top. You can just go back to the `cmake` step and start from there.
+Note that if you first ran through the whole sequence to compile for the Debug Probe, then you don't need to start back at the top. You can just go back to the `cmake` step and start from there.
 
 
 # TODO
-- TinyUSB's vendor interface is FIFO-based and not packet-based. Using raw tx/rx callbacks is preferable as this stops DAP command batches from being concatenated, which confused openOCD.
-- Instead of polling, move the DAP thread to an asynchronously started/stopped one-shot operation to reduce CPU wakeups
 - AutoBaud selection, as PIO is a capable frequency counter
 - Possibly include RTT support
diff --git a/include/DAP_config.h b/include/DAP_config.h
index f95a2a7..db7512d 100755
--- a/include/DAP_config.h
+++ b/include/DAP_config.h
@@ -47,12 +47,12 @@
 #include <hardware/gpio.h>
 
 #include "cmsis_compiler.h"
-#include "picoprobe_config.h"
+#include "probe_config.h"
 #include "probe.h"
 
 /// Processor Clock of the Cortex-M MCU used in the Debug Unit.
 /// This value is used to calculate the SWD/JTAG clock speed.
-/* Picoprobe actually uses kHz rather than Hz, so just lie about it here */
+/* Debugprobe actually uses kHz rather than Hz, so just lie about it here */
 #define CPU_CLOCK               125000000U      ///< Specifies the CPU Clock in Hz.
 
 /// Number of processor cycles for I/O Port write operations.
@@ -502,8 +502,8 @@
            - 0: Connect LED OFF: debugger is not connected to CMSIS-DAP Debug Unit.
 */
 __STATIC_INLINE void LED_CONNECTED_OUT (uint32_t bit) {
-#ifdef PICOPROBE_DAP_CONNECTED_LED
-  gpio_put(PICOPROBE_DAP_CONNECTED_LED, bit);
+#ifdef DEBUGPROBE_DAP_CONNECTED_LED
+  gpio_put(DEBUGPROBE_DAP_CONNECTED_LED, bit);
 #endif
 }
 
@@ -513,8 +513,8 @@
            - 0: Target Running LED OFF: program execution in target stopped.
 */
 __STATIC_INLINE void LED_RUNNING_OUT (uint32_t bit) {
-#ifdef PICOPROBE_DAP_RUNNING_LED
-  gpio_put(PICOPROBE_DAP_RUNNING_LED, bit);
+#ifdef DEBUGPROBE_DAP_RUNNING_LED
+  gpio_put(DEBUGPROBE_DAP_RUNNING_LED, bit);
 #endif
 }
 
diff --git a/include/board_debugprobe_config.h b/include/board_debugprobe_config.h
index 32b744c..d56e04e 100644
--- a/include/board_debugprobe_config.h
+++ b/include/board_debugprobe_config.h
@@ -39,16 +39,16 @@
 #define PROBE_PIN_SWDIO (PROBE_PIN_OFFSET + 2)
 
 // UART config
-#define PICOPROBE_UART_TX 4
-#define PICOPROBE_UART_RX 5
-#define PICOPROBE_UART_INTERFACE uart1
-#define PICOPROBE_UART_BAUDRATE 115200
+#define DEBUGPROBE_UART_TX 4
+#define DEBUGPROBE_UART_RX 5
+#define DEBUGPROBE_UART_INTERFACE uart1
+#define DEBUGPROBE_UART_BAUDRATE 115200
 
-#define PICOPROBE_USB_CONNECTED_LED 2
-#define PICOPROBE_DAP_CONNECTED_LED 15
-#define PICOPROBE_DAP_RUNNING_LED 16
-#define PICOPROBE_UART_RX_LED 7
-#define PICOPROBE_UART_TX_LED 8
+#define DEBUGPROBE_USB_CONNECTED_LED 2
+#define DEBUGPROBE_DAP_CONNECTED_LED 15
+#define DEBUGPROBE_DAP_RUNNING_LED 16
+#define DEBUGPROBE_UART_RX_LED 7
+#define DEBUGPROBE_UART_TX_LED 8
 
 #define PROBE_PRODUCT_STRING "Debug Probe (CMSIS-DAP)"
 
diff --git a/include/board_example_config.h b/include/board_example_config.h
index 32c0908..6f93f34 100644
--- a/include/board_example_config.h
+++ b/include/board_example_config.h
@@ -64,21 +64,21 @@
 #endif
 
 #if defined(PROBE_CDC_UART)
-#define PICOPROBE_UART_TX 4
-#define PICOPROBE_UART_RX 5
-#define PICOPROBE_UART_INTERFACE uart1
-#define PICOPROBE_UART_BAUDRATE 115200
+#define DEBUGPROBE_UART_TX 4
+#define DEBUGPROBE_UART_RX 5
+#define DEBUGPROBE_UART_INTERFACE uart1
+#define DEBUGPROBE_UART_BAUDRATE 115200
 /* Flow control - some or all of these can be omitted if not used */
-#define PICOPROBE_UART_RTS 9
-#define PICOPROBE_UART_DTR 10
+#define DEBUGPROBE_UART_RTS 9
+#define DEBUGPROBE_UART_DTR 10
 #endif
 
 /* LED config - some or all of these can be omitted if not used */
-#define PICOPROBE_USB_CONNECTED_LED 2
-#define PICOPROBE_DAP_CONNECTED_LED 15
-#define PICOPROBE_DAP_RUNNING_LED 16
-#define PICOPROBE_UART_RX_LED 7
-#define PICOPROBE_UART_TX_LED 8
+#define DEBUGPROBE_USB_CONNECTED_LED 2
+#define DEBUGPROBE_DAP_CONNECTED_LED 15
+#define DEBUGPROBE_DAP_RUNNING_LED 16
+#define DEBUGPROBE_UART_RX_LED 7
+#define DEBUGPROBE_UART_TX_LED 8
 
 #define PROBE_PRODUCT_STRING "Example Debug Probe"
 
diff --git a/include/board_pico_config.h b/include/board_pico_config.h
index dd5f766..f8315f3 100644
--- a/include/board_pico_config.h
+++ b/include/board_pico_config.h
@@ -40,13 +40,13 @@
 #endif
 
 // UART config
-#define PICOPROBE_UART_TX 4
-#define PICOPROBE_UART_RX 5
-#define PICOPROBE_UART_INTERFACE uart1
-#define PICOPROBE_UART_BAUDRATE 115200
+#define DEBUGPROBE_UART_TX 4
+#define DEBUGPROBE_UART_RX 5
+#define DEBUGPROBE_UART_INTERFACE uart1
+#define DEBUGPROBE_UART_BAUDRATE 115200
 
-#define PICOPROBE_USB_CONNECTED_LED 25
+#define DEBUGPROBE_USB_CONNECTED_LED 25
 
-#define PROBE_PRODUCT_STRING "Picoprobe (CMSIS-DAP)"
+#define PROBE_PRODUCT_STRING "Debugprobe on Pico (CMSIS-DAP)"
 
 #endif
\ No newline at end of file
diff --git a/src/cdc_uart.c b/src/cdc_uart.c
index 3e7afa2..7e54383 100644
--- a/src/cdc_uart.c
+++ b/src/cdc_uart.c
@@ -29,7 +29,7 @@
 
 #include "tusb.h"
 
-#include "picoprobe_config.h"
+#include "debugprobe_config.h"
 
 TaskHandle_t uart_taskhandle;
 TickType_t last_wake, interval = 100;
@@ -41,30 +41,30 @@
 #define DEBOUNCE_MS 40
 static uint debounce_ticks = 5;
 
-#ifdef PICOPROBE_UART_TX_LED
+#ifdef DEBUGPROBE_UART_TX_LED
 static uint tx_led_debounce;
 #endif
 
-#ifdef PICOPROBE_UART_RX_LED
+#ifdef DEBUGPROBE_UART_RX_LED
 static uint rx_led_debounce;
 #endif
 
 void cdc_uart_init(void) {
-    gpio_set_function(PICOPROBE_UART_TX, GPIO_FUNC_UART);
-    gpio_set_function(PICOPROBE_UART_RX, GPIO_FUNC_UART);
-    gpio_set_pulls(PICOPROBE_UART_TX, 1, 0);
-    gpio_set_pulls(PICOPROBE_UART_RX, 1, 0);
-    uart_init(PICOPROBE_UART_INTERFACE, PICOPROBE_UART_BAUDRATE);
+    gpio_set_function(DEBUGPROBE_UART_TX, GPIO_FUNC_UART);
+    gpio_set_function(DEBUGPROBE_UART_RX, GPIO_FUNC_UART);
+    gpio_set_pulls(DEBUGPROBE_UART_TX, 1, 0);
+    gpio_set_pulls(DEBUGPROBE_UART_RX, 1, 0);
+    uart_init(DEBUGPROBE_UART_INTERFACE, DEBUGPROBE_UART_BAUDRATE);
 
-#ifdef PICOPROBE_UART_RTS
-    gpio_init(PICOPROBE_UART_RTS);
-    gpio_set_dir(PICOPROBE_UART_RTS, GPIO_OUT);
-    gpio_put(PICOPROBE_UART_RTS, 1);
+#ifdef DEBUGPROBE_UART_RTS
+    gpio_init(DEBUGPROBE_UART_RTS);
+    gpio_set_dir(DEBUGPROBE_UART_RTS, GPIO_OUT);
+    gpio_put(DEBUGPROBE_UART_RTS, 1);
 #endif
-#ifdef PICOPROBE_UART_DTR
-    gpio_init(PICOPROBE_UART_DTR);
-    gpio_set_dir(PICOPROBE_UART_DTR, GPIO_OUT);
-    gpio_put(PICOPROBE_UART_DTR, 1);
+#ifdef DEBUGPROBE_UART_DTR
+    gpio_init(DEBUGPROBE_UART_DTR);
+    gpio_set_dir(DEBUGPROBE_UART_DTR, GPIO_OUT);
+    gpio_put(DEBUGPROBE_UART_DTR, 1);
 #endif
 }
 
@@ -75,8 +75,8 @@
     uint rx_len = 0;
 
     // Consume uart fifo regardless even if not connected
-    while(uart_is_readable(PICOPROBE_UART_INTERFACE) && (rx_len < sizeof(rx_buf))) {
-        rx_buf[rx_len++] = uart_getc(PICOPROBE_UART_INTERFACE);
+    while(uart_is_readable(DEBUGPROBE_UART_INTERFACE) && (rx_len < sizeof(rx_buf))) {
+        rx_buf[rx_len++] = uart_getc(DEBUGPROBE_UART_INTERFACE);
     }
 
     if (tud_cdc_connected()) {
@@ -85,8 +85,8 @@
         /* Implicit overflow if we don't write all the bytes to the host.
          * Also throw away bytes if we can't write... */
         if (rx_len) {
-#ifdef PICOPROBE_UART_RX_LED
-          gpio_put(PICOPROBE_UART_RX_LED, 1);
+#ifdef DEBUGPROBE_UART_RX_LED
+          gpio_put(DEBUGPROBE_UART_RX_LED, 1);
           rx_led_debounce = debounce_ticks;
 #endif
           written = MIN(tud_cdc_write_available(), rx_len);
@@ -98,11 +98,11 @@
             tud_cdc_write_flush();
           }
         } else {
-#ifdef PICOPROBE_UART_RX_LED
+#ifdef DEBUGPROBE_UART_RX_LED
           if (rx_led_debounce)
             rx_led_debounce--;
           else
-            gpio_put(PICOPROBE_UART_RX_LED, 0);
+            gpio_put(DEBUGPROBE_UART_RX_LED, 0);
 #endif
         }
 
@@ -110,20 +110,20 @@
       size_t watermark = MIN(tud_cdc_available(), sizeof(tx_buf));
       if (watermark > 0) {
         size_t tx_len;
-#ifdef PICOPROBE_UART_TX_LED
-        gpio_put(PICOPROBE_UART_TX_LED, 1);
+#ifdef DEBUGPROBE_UART_TX_LED
+        gpio_put(DEBUGPROBE_UART_TX_LED, 1);
         tx_led_debounce = debounce_ticks;
 #endif
         /* Batch up to half a FIFO of data - don't clog up on RX */
         watermark = MIN(watermark, 16);
         tx_len = tud_cdc_read(tx_buf, watermark);
-        uart_write_blocking(PICOPROBE_UART_INTERFACE, tx_buf, tx_len);
+        uart_write_blocking(DEBUGPROBE_UART_INTERFACE, tx_buf, tx_len);
       } else {
-#ifdef PICOPROBE_UART_TX_LED
+#ifdef DEBUGPROBE_UART_TX_LED
           if (tx_led_debounce)
             tx_led_debounce--;
           else
-            gpio_put(PICOPROBE_UART_TX_LED, 0);
+            gpio_put(DEBUGPROBE_UART_TX_LED, 0);
 #endif
       }
     } else if (was_connected) {
@@ -158,12 +158,12 @@
   vTaskSuspend(uart_taskhandle);
   interval = MAX(1, micros / ((1000 * 1000) / configTICK_RATE_HZ));
   debounce_ticks = MAX(1, configTICK_RATE_HZ / (interval * DEBOUNCE_MS));
-  picoprobe_info("New baud rate %ld micros %ld interval %lu\n",
+  debugprobe_info("New baud rate %ld micros %ld interval %lu\n",
                   line_coding->bit_rate, micros, interval);
-  uart_deinit(PICOPROBE_UART_INTERFACE);
+  uart_deinit(DEBUGPROBE_UART_INTERFACE);
   tud_cdc_write_clear();
   tud_cdc_read_flush();
-  uart_init(PICOPROBE_UART_INTERFACE, line_coding->bit_rate);
+  uart_init(DEBUGPROBE_UART_INTERFACE, line_coding->bit_rate);
 
   switch (line_coding->parity) {
   case CDC_LINE_CODING_PARITY_ODD:
@@ -173,7 +173,7 @@
     parity = UART_PARITY_EVEN;
     break;
   default:
-    picoprobe_info("invalid parity setting %u\n", line_coding->parity);
+    debugprobe_info("invalid parity setting %u\n", line_coding->parity);
     /* fallthrough */
   case CDC_LINE_CODING_PARITY_NONE:
     parity = UART_PARITY_NONE;
@@ -188,7 +188,7 @@
     data_bits = line_coding->data_bits;
     break;
   default:
-    picoprobe_info("invalid data bits setting: %u\n", line_coding->data_bits);
+    debugprobe_info("invalid data bits setting: %u\n", line_coding->data_bits);
     data_bits = 8;
     break;
   }
@@ -201,36 +201,36 @@
     stop_bits = 2;
   break;
   default:
-    picoprobe_info("invalid stop bits setting: %u\n", line_coding->stop_bits);
+    debugprobe_info("invalid stop bits setting: %u\n", line_coding->stop_bits);
     /* fallthrough */
   case CDC_LINE_CONDING_STOP_BITS_1:
     stop_bits = 1;
   break;
   }
 
-  uart_set_format(PICOPROBE_UART_INTERFACE, data_bits, stop_bits, parity);
+  uart_set_format(DEBUGPROBE_UART_INTERFACE, data_bits, stop_bits, parity);
   vTaskResume(uart_taskhandle);
 }
 
 void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts)
 {
-#ifdef PICOPROBE_UART_RTS
-  gpio_put(PICOPROBE_UART_RTS, !rts);
+#ifdef DEBUGPROBE_UART_RTS
+  gpio_put(DEBUGPROBE_UART_RTS, !rts);
 #endif
-#ifdef PICOPROBE_UART_DTR
-  gpio_put(PICOPROBE_UART_DTR, !dtr);
+#ifdef DEBUGPROBE_UART_DTR
+  gpio_put(DEBUGPROBE_UART_DTR, !dtr);
 #endif
 
   /* CDC drivers use linestate as a bodge to activate/deactivate the interface.
    * Resume our UART polling on activate, stop on deactivate */
   if (!dtr && !rts) {
     vTaskSuspend(uart_taskhandle);
-#ifdef PICOPROBE_UART_RX_LED
-    gpio_put(PICOPROBE_UART_RX_LED, 0);
+#ifdef DEBUGPROBE_UART_RX_LED
+    gpio_put(DEBUGPROBE_UART_RX_LED, 0);
     rx_led_debounce = 0;
 #endif
-#ifdef PICOPROBE_UART_RX_LED
-    gpio_put(PICOPROBE_UART_TX_LED, 0);
+#ifdef DEBUGPROBE_UART_RX_LED
+    gpio_put(DEBUGPROBE_UART_TX_LED, 0);
     tx_led_debounce = 0;
 #endif
   } else
diff --git a/src/led.c b/src/led.c
index f1e9f87..e3c109f 100644
--- a/src/led.c
+++ b/src/led.c
@@ -26,27 +26,27 @@
 #include <pico/stdlib.h>
 #include <stdint.h>
 
-#include "picoprobe_config.h"
+#include "debugprobe_config.h"
 
 void led_init(void) {
-#ifdef PICOPROBE_USB_CONNECTED_LED
-    gpio_init(PICOPROBE_USB_CONNECTED_LED);
-    gpio_set_dir(PICOPROBE_USB_CONNECTED_LED, GPIO_OUT);
+#ifdef DEBUGPROBE_USB_CONNECTED_LED
+    gpio_init(DEBUGPROBE_USB_CONNECTED_LED);
+    gpio_set_dir(DEBUGPROBE_USB_CONNECTED_LED, GPIO_OUT);
 #endif
-#ifdef PICOPROBE_DAP_CONNECTED_LED
-    gpio_init(PICOPROBE_DAP_CONNECTED_LED);
-    gpio_set_dir(PICOPROBE_DAP_CONNECTED_LED, GPIO_OUT);
+#ifdef DEBUGPROBE_DAP_CONNECTED_LED
+    gpio_init(DEBUGPROBE_DAP_CONNECTED_LED);
+    gpio_set_dir(DEBUGPROBE_DAP_CONNECTED_LED, GPIO_OUT);
 #endif
-#ifdef PICOPROBE_DAP_RUNNING_LED
-    gpio_init(PICOPROBE_DAP_RUNNING_LED);
-    gpio_set_dir(PICOPROBE_DAP_RUNNING_LED, GPIO_OUT);
+#ifdef DEBUGPROBE_DAP_RUNNING_LED
+    gpio_init(DEBUGPROBE_DAP_RUNNING_LED);
+    gpio_set_dir(DEBUGPROBE_DAP_RUNNING_LED, GPIO_OUT);
 #endif
-#ifdef PICOPROBE_UART_RX_LED
-    gpio_init(PICOPROBE_UART_RX_LED);
-    gpio_set_dir(PICOPROBE_UART_RX_LED, GPIO_OUT);
+#ifdef DEBUGPROBE_UART_RX_LED
+    gpio_init(DEBUGPROBE_UART_RX_LED);
+    gpio_set_dir(DEBUGPROBE_UART_RX_LED, GPIO_OUT);
 #endif
-#ifdef PICOPROBE_UART_TX_LED
-    gpio_init(PICOPROBE_UART_TX_LED);
-    gpio_set_dir(PICOPROBE_UART_TX_LED, GPIO_OUT);
+#ifdef DEBUGPROBE_UART_TX_LED
+    gpio_init(DEBUGPROBE_UART_TX_LED);
+    gpio_set_dir(DEBUGPROBE_UART_TX_LED, GPIO_OUT);
 #endif
 }
diff --git a/src/main.c b/src/main.c
index 3616486..5c52005 100644
--- a/src/main.c
+++ b/src/main.c
@@ -34,7 +34,7 @@
 #include "bsp/board.h"
 #include "tusb.h"
 
-#include "picoprobe_config.h"
+#include "probe_config.h"
 #include "probe.h"
 #include "cdc_uart.h"
 #include "get_serial.h"
@@ -42,8 +42,8 @@
 #include "tusb_edpt_handler.h"
 #include "DAP.h"
 
-// UART0 for Picoprobe debug
-// UART1 for picoprobe to target device
+// UART0 for debugprobe debug
+// UART1 for debugprobe to target device
 
 static uint8_t TxDataBuffer[CFG_TUD_HID_EP_BUFSIZE];
 static uint8_t RxDataBuffer[CFG_TUD_HID_EP_BUFSIZE];
@@ -62,11 +62,11 @@
     wake = xTaskGetTickCount();
     do {
         tud_task();
-#ifdef PICOPROBE_USB_CONNECTED_LED
-        if (!gpio_get(PICOPROBE_USB_CONNECTED_LED) && tud_ready())
-            gpio_put(PICOPROBE_USB_CONNECTED_LED, 1);
+#ifdef DEBUGPROBE_USB_CONNECTED_LED
+        if (!gpio_get(DEBUGPROBE_USB_CONNECTED_LED) && tud_ready())
+            gpio_put(DEBUGPROBE_USB_CONNECTED_LED, 1);
         else
-            gpio_put(PICOPROBE_USB_CONNECTED_LED, 0);
+            gpio_put(DEBUGPROBE_USB_CONNECTED_LED, 0);
 #endif
         // Go to sleep for up to a tick if nothing to do
         if (!tud_task_event_ready())
@@ -91,7 +91,7 @@
 
     led_init();
 
-    picoprobe_info("Welcome to Picoprobe!\n");
+    debugprobe_info("Welcome to Debugprobe!\n");
 
     if (THREADED) {
         /* UART needs to preempt USB as if we don't, characters get lost */
@@ -106,7 +106,7 @@
         tud_task();
         cdc_task();
 
-#if (PICOPROBE_DEBUG_PROTOCOL == PROTO_DAP_V2)
+#if (DEBUGPROBE_DEBUG_PROTOCOL == PROTO_DAP_V2)
         if (tud_vendor_available()) {
             uint32_t resp_len;
             tud_vendor_read(RxDataBuffer, sizeof(RxDataBuffer));
@@ -145,7 +145,7 @@
   tud_hid_report(0, TxDataBuffer, response_size);
 }
 
-#if (PICOPROBE_DEBUG_PROTOCOL == PROTO_DAP_V2)
+#if (DEBUGPROBE_DEBUG_PROTOCOL == PROTO_DAP_V2)
 extern uint8_t const desc_ms_os_20[];
 
 bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t const * request)
diff --git a/src/probe.c b/src/probe.c
index 8e55879..95c2d62 100644
--- a/src/probe.c
+++ b/src/probe.c
@@ -31,7 +31,7 @@
 #include <hardware/gpio.h>
 
 #include "led.h"
-#include "picoprobe_config.h"
+#include "debugprobe_config.h"
 #include "probe.pio.h"
 #include "tusb.h"
 
@@ -61,7 +61,7 @@
 
 void probe_set_swclk_freq(uint freq_khz) {
         uint clk_sys_freq_khz = clock_get_hz(clk_sys) / 1000;
-        picoprobe_info("Set swclk freq %dKHz sysclk %dkHz\n", freq_khz, clk_sys_freq_khz);
+        debugprobe_info("Set swclk freq %dKHz sysclk %dkHz\n", freq_khz, clk_sys_freq_khz);
         uint32_t divider = clk_sys_freq_khz / freq_khz / 4;
         if (divider == 0)
             divider = 1;
@@ -105,7 +105,7 @@
     DEBUG_PINS_SET(probe_timing, DBG_PIN_WRITE);
     pio_sm_put_blocking(pio0, PROBE_SM, fmt_probe_command(bit_count, true, CMD_WRITE));
     pio_sm_put_blocking(pio0, PROBE_SM, data_byte);
-    picoprobe_dump("Write %d bits 0x%x\n", bit_count, data_byte);
+    debugprobe_dump("Write %d bits 0x%x\n", bit_count, data_byte);
     // Return immediately so we can cue up the next command whilst this one runs
     DEBUG_PINS_CLR(probe_timing, DBG_PIN_WRITE);
 }
@@ -124,7 +124,7 @@
         data_shifted = data >> (32 - bit_count);
     }
 
-    picoprobe_dump("Read %d bits 0x%x (shifted 0x%x)\n", bit_count, data, data_shifted);
+    debugprobe_dump("Read %d bits 0x%x (shifted 0x%x)\n", bit_count, data, data_shifted);
     DEBUG_PINS_CLR(probe_timing, DBG_PIN_READ);
     return data_shifted;
 }
diff --git a/src/picoprobe_config.h b/src/probe_config.h
similarity index 81%
rename from src/picoprobe_config.h
rename to src/probe_config.h
index fd46f31..d17e4c5 100644
--- a/src/picoprobe_config.h
+++ b/src/probe_config.h
@@ -23,49 +23,49 @@
  *
  */
 
-#ifndef PICOPROBE_H_
-#define PICOPROBE_H_
+#ifndef PROBE_CONFIG_H_
+#define PROBE_CONFIG_H_
 
 #include "FreeRTOS.h"
 #include "task.h"
 
 #if false
-#define picoprobe_info(format,args...) \
+#define debugprobe_info(format,args...) \
 do { \
 	vTaskSuspendAll(); \
 	printf(format, ## args); \
 	xTaskResumeAll(); \
 } while (0)
 #else
-#define picoprobe_info(format,...) ((void)0)
+#define debugprobe_info(format,...) ((void)0)
 #endif
 
 
 #if false
-#define picoprobe_debug(format,args...) \
+#define debugprobe_debug(format,args...) \
 do { \
 	vTaskSuspendAll(); \
 	printf(format, ## args); \
 	xTaskResumeAll(); \
 } while (0)
 #else
-#define picoprobe_debug(format,...) ((void)0)
+#define debugprobe_debug(format,...) ((void)0)
 #endif
 
 #if false
-#define picoprobe_dump(format,args...)\
+#define debugprobe_dump(format,args...)\
 do { \
 	vTaskSuspendAll(); \
 	printf(format, ## args); \
 	xTaskResumeAll(); \
 } while (0)
 #else
-#define picoprobe_dump(format,...) ((void)0)
+#define debugprobe_dump(format,...) ((void)0)
 #endif
 
 // TODO tie this up with PICO_BOARD defines in the main SDK
 
-#ifndef DEBUGPROBE 
+#ifdef DEBUG_ON_PICO 
 #include "board_pico_config.h"
 #else
 #include "board_debugprobe_config.h"
@@ -77,8 +77,8 @@
 #define PROTO_DAP_V2 2
 
 // Interface config
-#ifndef PICOPROBE_DEBUG_PROTOCOL
-#define PICOPROBE_DEBUG_PROTOCOL PROTO_DAP_V2
+#ifndef DEBUGPROBE_DEBUG_PROTOCOL
+#define DEBUGPROBE_DEBUG_PROTOCOL PROTO_DAP_V2
 #endif
 
 #endif
diff --git a/src/sw_dp_pio.c b/src/sw_dp_pio.c
index 75b277b..ba7e6ed 100755
--- a/src/sw_dp_pio.c
+++ b/src/sw_dp_pio.c
@@ -19,7 +19,7 @@
 
 /*
  * This is a shim between the SW_DP functions and the PIO
- * implementation used for Picoprobe. Instead of calling bitbash functions,
+ * implementation used for Debugprobe. Instead of calling bitbash functions,
  * hand off the bit sequences to a SM for asynchronous completion.
  */
 
@@ -47,7 +47,7 @@
     probe_set_swclk_freq(MAKE_KHZ(DAP_Data.clock_delay));
     cached_delay = DAP_Data.clock_delay;
   }
-  picoprobe_debug("SWJ sequence count = %d FDB=0x%2x\n", count, data[0]);
+  debugprobe_debug("SWJ sequence count = %d FDB=0x%2x\n", count, data[0]);
   n = count;
   while (n > 0) {
     if (n > 8)
@@ -74,7 +74,7 @@
     probe_set_swclk_freq(MAKE_KHZ(DAP_Data.clock_delay));
     cached_delay = DAP_Data.clock_delay;
   }
-  picoprobe_debug("SWD sequence\n");
+  debugprobe_debug("SWD sequence\n");
   n = info & SWD_SEQUENCE_CLK;
   if (n == 0U) {
     n = 64U;
@@ -119,7 +119,7 @@
     probe_set_swclk_freq(MAKE_KHZ(DAP_Data.clock_delay));
     cached_delay = DAP_Data.clock_delay;
   }
-  picoprobe_debug("SWD_transfer\n");
+  debugprobe_debug("SWD_transfer\n");
   /* Generate the request packet */
   prq |= (1 << 0); /* Start Bit */
   for (n = 1; n < 5; n++) {
@@ -149,7 +149,7 @@
       }
       if (data)
         *data = val;
-      picoprobe_debug("Read %02x ack %02x 0x%08x parity %01x\n",
+      debugprobe_debug("Read %02x ack %02x 0x%08x parity %01x\n",
                       prq, ack, val, bit);
       /* Turnaround for line idle */
       probe_hiz_clocks(DAP_Data.swd_conf.turnaround);
@@ -163,7 +163,7 @@
       parity = __builtin_popcount(val);
       /* Write Parity Bit */
       probe_write_bits(1, parity & 0x1);
-      picoprobe_debug("write %02x ack %02x 0x%08x parity %01x\n",
+      debugprobe_debug("write %02x ack %02x 0x%08x parity %01x\n",
                       prq, ack, val, parity);
     }
     /* Capture Timestamp */
diff --git a/src/tusb_edpt_handler.c b/src/tusb_edpt_handler.c
index ffa0d2a..93d4b58 100644
--- a/src/tusb_edpt_handler.c
+++ b/src/tusb_edpt_handler.c
@@ -82,8 +82,8 @@
 {
 
 	TU_VERIFY(TUSB_CLASS_VENDOR_SPECIFIC == itf_desc->bInterfaceClass &&
-			PICOPROBE_INTERFACE_SUBCLASS == itf_desc->bInterfaceSubClass &&
-			PICOPROBE_INTERFACE_PROTOCOL == itf_desc->bInterfaceProtocol, 0);
+			DAP_INTERFACE_SUBCLASS == itf_desc->bInterfaceSubClass &&
+			DAP_INTERFACE_PROTOCOL == itf_desc->bInterfaceProtocol, 0);
 
 	//  Initialise circular buffer indices
 	USBResponseBuffer.wptr = 0;
@@ -198,20 +198,20 @@
 			 */
 			n = USBRequestBuffer.rptr;
 			while (USBRequestBuffer.data[n % DAP_PACKET_COUNT][0] == ID_DAP_QueueCommands) {
-				picoprobe_info("%u %u DAP queued cmd %s len %02x\n",
+				debugprobe_info("%u %u DAP queued cmd %s len %02x\n",
 					       USBRequestBuffer.wptr, USBRequestBuffer.rptr,
 					       dap_cmd_string[USBRequestBuffer.data[n % DAP_PACKET_COUNT][0]], USBRequestBuffer.data[n % DAP_PACKET_COUNT][1]);
 				USBRequestBuffer.data[n % DAP_PACKET_COUNT][0] = ID_DAP_ExecuteCommands;
 				n++;
 				while (n == USBRequestBuffer.wptr) {
 					/* Need yield in a loop here, as IN callbacks will also wake the thread */
-					picoprobe_info("DAP wait\n");
+					debugprobe_info("DAP wait\n");
 					vTaskSuspend(dap_taskhandle);
 				}
 			}
 			// Read a single packet from the USB buffer into the DAP Request buffer
 			memcpy(DAPRequestBuffer, RD_SLOT_PTR(USBRequestBuffer), DAP_PACKET_SIZE);
-			picoprobe_info("%u %u DAP cmd %s len %02x\n",
+			debugprobe_info("%u %u DAP cmd %s len %02x\n",
 				       USBRequestBuffer.wptr, USBRequestBuffer.rptr,
 				       dap_cmd_string[DAPRequestBuffer[0]], DAPRequestBuffer[1]);
 			USBRequestBuffer.rptr++;
@@ -227,7 +227,7 @@
 			}
 
 			_resp_len = DAP_ExecuteCommand(DAPRequestBuffer, DAPResponseBuffer);
-			picoprobe_info("%u %u DAP resp %s\n",
+			debugprobe_info("%u %u DAP resp %s\n",
 					USBResponseBuffer.wptr, USBResponseBuffer.rptr,
 					dap_cmd_string[DAPResponseBuffer[0]]);
 
@@ -268,7 +268,7 @@
 		.xfer_cb = dap_edpt_xfer_cb,
 		.sof = NULL,
 #if CFG_TUSB_DEBUG >= 2
-		.name = "PICOPROBE ENDPOINT"
+		.name = "DAP ENDPOINT"
 #endif
 };
 
diff --git a/src/tusb_edpt_handler.h b/src/tusb_edpt_handler.h
index e258508..f4e9ab2 100644
--- a/src/tusb_edpt_handler.h
+++ b/src/tusb_edpt_handler.h
@@ -12,8 +12,8 @@
 #include "device/usbd_pvt.h"
 #include "DAP_config.h"
 
-#define PICOPROBE_INTERFACE_SUBCLASS 0x00
-#define PICOPROBE_INTERFACE_PROTOCOL 0x00
+#define DAP_INTERFACE_SUBCLASS 0x00
+#define DAP_INTERFACE_PROTOCOL 0x00
 
 typedef struct {
 	uint8_t data[DAP_PACKET_COUNT][DAP_PACKET_SIZE];
@@ -29,10 +29,10 @@
 void dap_thread(void *ptr);
 
 /* Endpoint Handling */
-void picoprobe_edpt_init(void);
-uint16_t picoprobe_edpt_open(uint8_t __unused rhport, tusb_desc_interface_t const *itf_desc, uint16_t max_len);
-bool picoprobe_edpt_control_xfer_cb(uint8_t __unused rhport, uint8_t stage,  tusb_control_request_t const *request);
-bool picoprobe_edpt_xfer_cb(uint8_t __unused rhport, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes);
+void debugprobe_edpt_init(void);
+uint16_t debugprobe_edpt_open(uint8_t __unused rhport, tusb_desc_interface_t const *itf_desc, uint16_t max_len);
+bool debugprobe_edpt_control_xfer_cb(uint8_t __unused rhport, uint8_t stage,  tusb_control_request_t const *request);
+bool debugprobe_edpt_xfer_cb(uint8_t __unused rhport, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes);
 
 /* Helper Functions */
 bool buffer_full(buffer_t *buffer);
diff --git a/src/usb_descriptors.c b/src/usb_descriptors.c
index 5b0b54f..8f306f6 100644
--- a/src/usb_descriptors.c
+++ b/src/usb_descriptors.c
@@ -27,7 +27,7 @@
 
 #include "tusb.h"
 #include "get_serial.h"
-#include "picoprobe_config.h"
+#include "debugprobe_config.h"
 
 //--------------------------------------------------------------------+
 // Device Descriptors
@@ -36,7 +36,7 @@
 {
     .bLength            = sizeof(tusb_desc_device_t),
     .bDescriptorType    = TUSB_DESC_DEVICE,
-#if (PICOPROBE_DEBUG_PROTOCOL == PROTO_DAP_V2)
+#if (DEBUGPROBE_DEBUG_PROTOCOL == PROTO_DAP_V2)
     .bcdUSB             = 0x0210, // USB Specification version 2.1 for BOS
 #else
     .bcdUSB             = 0x0110,
@@ -80,7 +80,7 @@
 #define PROBE_OUT_EP_NUM 0x04
 #define PROBE_IN_EP_NUM 0x85
 
-#if (PICOPROBE_DEBUG_PROTOCOL == PROTO_DAP_V1)
+#if (DEBUGPROBE_DEBUG_PROTOCOL == PROTO_DAP_V1)
 #define CONFIG_TOTAL_LEN  (TUD_CONFIG_DESC_LEN + TUD_CDC_DESC_LEN + TUD_HID_INOUT_DESC_LEN)
 #else
 #define CONFIG_TOTAL_LEN  (TUD_CONFIG_DESC_LEN + TUD_CDC_DESC_LEN + TUD_VENDOR_DESC_LEN)
@@ -101,13 +101,13 @@
 {
   TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, 0, 100),
   // Interface 0
-#if (PICOPROBE_DEBUG_PROTOCOL == PROTO_DAP_V1)
+#if (DEBUGPROBE_DEBUG_PROTOCOL == PROTO_DAP_V1)
   // HID (named interface)
   TUD_HID_INOUT_DESCRIPTOR(ITF_NUM_PROBE, 4, HID_ITF_PROTOCOL_NONE, sizeof(desc_hid_report), PROBE_OUT_EP_NUM, PROBE_IN_EP_NUM, CFG_TUD_HID_EP_BUFSIZE, 1),
-#elif (PICOPROBE_DEBUG_PROTOCOL == PROTO_DAP_V2)
+#elif (DEBUGPROBE_DEBUG_PROTOCOL == PROTO_DAP_V2)
   // Bulk (named interface)
   TUD_VENDOR_DESCRIPTOR(ITF_NUM_PROBE, 5, PROBE_OUT_EP_NUM, PROBE_IN_EP_NUM, 64),
-#elif (PICOPROBE_DEBUG_PROTOCOL == PROTO_OPENOCD_CUSTOM)
+#elif (DEBUGPROBE_DEBUG_PROTOCOL == PROTO_OPENOCD_CUSTOM)
   // Bulk
   TUD_VENDOR_DESCRIPTOR(ITF_NUM_PROBE, 0, PROBE_OUT_EP_NUM, PROBE_IN_EP_NUM, 64),
 #endif