The debugger needs to be connected for the cycle counter to run, when programming with the Arduino IDE this is not the case and the counter stays at 0 crashing the ezWS2812 library, this can be enabled in firmware but seems unreliable. A better approach would be to use a timer running at CPU clock.
//enable debug cycle counter
volatile unsigned int *DWT_LAR = (volatile unsigned int *)0xE0001FB0;
volatile unsigned int *SCB_DEMCR = (volatile unsigned int *)0xE000EDFC;
*DWT_LAR = 0xC5ACCE55;
*SCB_DEMCR |= 0x01000000;
*DWT_LAR = 0xC5ACCE55;
DWT->CTRL |= 1;