This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Windows Subsystem for Linux (WSL) - ERROR: There is no debugger connected to the PC

Hello

I'm a .NET developer now getting my hands in the embedded world so I'm a total beginner.

I'm using the nRF51 DK and I'm trying to flash my board using the Makefile example in the blinky project.

I' doing that in bash (Debian 9) on Windows 10 (WSL)

I installed nrfjprog and JLink

$ nrfjprog --version
nrfjprog version: 9.7.3
JLinkARM.dll version: 6.32i

As well as gcc-arm-none-eabi and updated my Makefile.posix consequently

$ /usr/share/gcc-arm-none-eabi-7-2018-q2-update/bin/arm-none-eabi-gcc --version && cat /mnt/c/Users/jerome/Desktop/nRF51\ DK/nRF5_SDK_12.3.0/components/toolchain/gcc/Makefile.posix
arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 7-2018-q2-update) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

GNU_INSTALL_ROOT := /usr/share/gcc-arm-none-eabi-7-2018-q2-update
GNU_VERSION := 7.3.1
GNU_PREFIX := arm-none-eabi

The make command builds the project as expected but make flash returns an error

$ make flash
Flashing: _build/nrf51422_xxac.hex
nrfjprog --program _build/nrf51422_xxac.hex -f nrf51 --sectorerase
ERROR: There is no debugger connected to the PC.
Makefile:192: recipe for target 'flash' failed
make: *** [flash] Error 41

I guess I have to link the COM port in Windows to the Serial Port in Linux so I followed Microsoft's blog post

sudo chmod 666 /dev/ttyS3
stty -F /dev/ttyS3 -a
stty -F /dev/ttyS3 sane 9600
cu -l /dev/ttyS3 -s 9600

But when I execute cu I just get a black shell, same with the screen command and same with Putty under Windows. I'm not sure what kind of behavior I should expect from the board.
I tried to run cu then open a new terminal and try to simply run the command nrfjprog --reset -f nrf51 but same result.

I've read many posts on this forum or blog posts which helped me quite a lot but at this point I'm stuck.
I don't know how to make Bash recognize my board connected over USB.
I really would like to get this working, or alternative, is it possible to execute the Makefile directly under Windows? (I tried Cygwin but the build failed with a weird error)

Thanks a lot

Parents Reply Children
Related