Debugging with CMSIS-DAP with mbed LPC1768 is very slow

21 May 2017

I'm using PlatformIO for debugging a mbed LPC1768 board (with mbed2). I made a small test program with on one counter variable and a blinky led. I set one watchpoint for the counter variable.

#include "mbed.h"

DigitalOut led1(LED1);
int counter;

int main() {
  led1 = 1;
  while(1) {
    printf("counter %i\n", counter);
    counter++;
    led1 = !led1;
    wait(1);
    }
  }

The debugging process is very slow, it needs nearly 20s for starting debugging and over 5 seconds for each cycle. See also the discussion at https://community.platformio.org/t/pio-unified-debugger/1704/60 it seems it is a problem only with the mbed LPC1768 board. /Users/sstaub/Desktop/nxpdebug.png

21 May 2017

Hi Stefan,

I made a similar discovery and posed the question if anyone has a solution - in thread 27678. Sadly, so far there has been no response at all.

Since the LPC1768 was the first mbed module for some time, it happened to be the one that I started with and have focused most on for projects. I've tried various tools, most recently including VisualGDB, Like we are discovering, it is not likely to be the tools, but to be the target integration of CMSIS-DAP.

06 Jul 2017

I'm also having a similar problem when trying to debug the example mbed-os blinky program as an initial test. Takes about 5 minutes to flash the LPC1768 target. Then running the digital out write function to the LED takes about 20 seconds to process!!

It's basically unusable...

I'm using Eclipse with the GNU ARM plugins, OpenOCD and "6 2017-q2-update" GNU ARM GDB.

Hoping they'll be a fix for this and that it isn't just a limitation of the mbed interface uC or GDB stub.