runner: nrfjprog: Improve error messages

When a debugger is already connected to the JLink debug adapter would incorrectly detect that the snr is '0' and try to
flash a device with that snr.

Also, when there were no boards connected, would
incorrectly state that there were multiple boards connected.

This patch improves the error feedback so that a user can more easily
debug why he can't flash his device.

Signed-off-by: Sebastian Bøe <>
1 file changed