Segger J-link, Adafruit Metro M4 -> USB dies when debug starts

Since the USB is handled by the main micro it makes sense that it would disconnect from WIndows when the micro stops at a breakpoint.

Additionally, when debugging you may need to configure it to use the no boot loader linker script if the boot loader doesn’t stick around when the J-Link flashes the application for debugging. You can do that by adding this to your configuration:

board_upload.offset_address = 0x00000000
board_build.arduino.ldscript = flash_without_bootloader.ld

This tells it to flash at 0x00000000 (normally the boot loader lives here) and tells it to compile such that the application addresses start at 0x00000000.

2 Likes